[AppArmor 33/41] Add d_namespace_path() to obtain namespace relative pathnames

2007-04-12 Thread jjohansen
In AppArmor we are interested in pathnames relative to the namespace root. Except for the root where the search ends, this is the same as d_path(). Add d_namespace_path() for that. internals. Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Reviewed-by: John Johansen [EMAIL PROTECTED] ---

Re: [AppArmor 33/41] Add d_namespace_path() to obtain namespace relative pathnames

2007-04-12 Thread Al Viro
+char *d_namespace_path(struct dentry *dentry, struct vfsmount *vfsmnt, +char *buf, int buflen) +{ + char *res; + struct vfsmount *rootmnt, *nsrootmnt; + struct dentry *root; + + read_lock(current-fs-lock); + rootmnt = mntget(current-fs-rootmnt); +