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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +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);
> +	read_unlock(&current->fs->lock);
> +	spin_lock(&vfsmount_lock);
> +	nsrootmnt = mntget(rootmnt->mnt_ns->root);

... and when somebody does umount -l on your chroot jail, you get
NULL ->mnt_ns.  Oops...
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux