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]
---
+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);
+