Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44672e4f authored by Nick Piggin's avatar Nick Piggin Committed by Al Viro
Browse files

apparmor: use task path helpers



apparmor: use task path helpers

Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent baa03890
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -62,19 +62,14 @@ static int d_namespace_path(struct path *path, char *buf, int buflen,
	int deleted, connected;
	int error = 0;

	/* Get the root we want to resolve too */
	/* Get the root we want to resolve too, released below */
	if (flags & PATH_CHROOT_REL) {
		/* resolve paths relative to chroot */
		read_lock(&current->fs->lock);
		root = current->fs->root;
		/* released below */
		path_get(&root);
		read_unlock(&current->fs->lock);
		get_fs_root(current->fs, &root);
	} else {
		/* resolve paths relative to namespace */
		root.mnt = current->nsproxy->mnt_ns->root;
		root.dentry = root.mnt->mnt_root;
		/* released below */
		path_get(&root);
	}