summaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-03-22 17:48:24 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2008-04-21 23:13:23 -0400
commitb5266eb4c8d1a2887a19aaec8144ee4ad1b054c3 (patch)
tree37105d0640169ad758d20847cf3effe77381f50f /fs/namespace.c
parent1a60a280778ff90270fc7390d9ec102f713a5a29 (diff)
downloadblackbird-op-linux-b5266eb4c8d1a2887a19aaec8144ee4ad1b054c3.tar.gz
blackbird-op-linux-b5266eb4c8d1a2887a19aaec8144ee4ad1b054c3.zip
[PATCH] switch a bunch of LSM hooks from nameidata to path
Namely, ones from namespace.c Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index af2fb3707d0a..87d2d82010bb 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1220,7 +1220,7 @@ static int graft_tree(struct vfsmount *mnt, struct nameidata *nd)
if (IS_DEADDIR(nd->path.dentry->d_inode))
goto out_unlock;
- err = security_sb_check_sb(mnt, nd);
+ err = security_sb_check_sb(mnt, &nd->path);
if (err)
goto out_unlock;
@@ -1230,7 +1230,7 @@ static int graft_tree(struct vfsmount *mnt, struct nameidata *nd)
out_unlock:
mutex_unlock(&nd->path.dentry->d_inode->i_mutex);
if (!err)
- security_sb_post_addmount(mnt, nd);
+ security_sb_post_addmount(mnt, &nd->path);
return err;
}
@@ -1746,7 +1746,8 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
if (retval)
return retval;
- retval = security_sb_mount(dev_name, &nd, type_page, flags, data_page);
+ retval = security_sb_mount(dev_name, &nd.path,
+ type_page, flags, data_page);
if (retval)
goto dput_out;
@@ -2007,7 +2008,7 @@ asmlinkage long sys_pivot_root(const char __user * new_root,
if (error)
goto out1;
- error = security_sb_pivotroot(&old_nd, &new_nd);
+ error = security_sb_pivotroot(&old_nd.path, &new_nd.path);
if (error) {
path_put(&old_nd.path);
goto out1;
@@ -2070,7 +2071,7 @@ asmlinkage long sys_pivot_root(const char __user * new_root,
touch_mnt_namespace(current->nsproxy->mnt_ns);
spin_unlock(&vfsmount_lock);
chroot_fs_refs(&user_nd.path, &new_nd.path);
- security_sb_post_pivotroot(&user_nd, &new_nd);
+ security_sb_post_pivotroot(&user_nd.path, &new_nd.path);
error = 0;
path_put(&root_parent);
path_put(&parent_path);
OpenPOWER on IntegriCloud