how to get fullname from inode_symlink() ?

From: NAHieu (nahieu@private)
Date: Fri Dec 16 2005 - 01:52:45 PST


Hello,

I have a problem when trying to hook inode_symlink(). According to
security.h, this hook and its args like below:

--
int (*inode_symlink) (struct inode *dir, struct dentry *dentry, const
char *old_name);

 * @inode_symlink:
 *      Check the permission to create a symbolic link to a file.
 *      @dir contains the inode structure of parent directory of the
symbolic link.
 *      @dentry contains the dentry structure of the symbolic link.
 *      @old_name contains the pathname of file.
 *      Return 0 if permission is granted.
---

Of 3 args, the last one old_name should give us the full-name of the
"original" file (which has a new file points to), but that is not the
case (at least with 2.6.12 I am working on). For example If I link to
a file in the current directory, the old_name returned is without any
path at all.

So is this a bug, or intentional? If it is not a bug, how can I find
the fullname of the original file?

Many thanks.
Hieu



This archive was generated by hypermail 2.1.3 : Fri Dec 16 2005 - 01:53:45 PST