aboutsummaryrefslogtreecommitdiffstats
path: root/fs
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
parent1a60a280778ff90270fc7390d9ec102f713a5a29 (diff)
[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')
-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)
1220 if (IS_DEADDIR(nd->path.dentry->d_inode)) 1220 if (IS_DEADDIR(nd->path.dentry->d_inode))
1221 goto out_unlock; 1221 goto out_unlock;
1222 1222
1223 err = security_sb_check_sb(mnt, nd); 1223 err = security_sb_check_sb(mnt, &nd->path);
1224 if (err) 1224 if (err)
1225 goto out_unlock; 1225 goto out_unlock;
1226 1226
@@ -1230,7 +1230,7 @@ static int graft_tree(struct vfsmount *mnt, struct nameidata *nd)
1230out_unlock: 1230out_unlock:
1231 mutex_unlock(&nd->path.dentry->d_inode->i_mutex); 1231 mutex_unlock(&nd->path.dentry->d_inode->i_mutex);
1232 if (!err) 1232 if (!err)
1233 security_sb_post_addmount(mnt, nd); 1233 security_sb_post_addmount(mnt, &nd->path);
1234 return err; 1234 return err;
1235} 1235}
1236 1236
@@ -1746,7 +1746,8 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
1746 if (retval) 1746 if (retval)
1747 return retval; 1747 return retval;
1748 1748
1749 retval = security_sb_mount(dev_name, &nd, type_page, flags, data_page); 1749 retval = security_sb_mount(dev_name, &nd.path,
1750 type_page, flags, data_page);
1750 if (retval) 1751 if (retval)
1751 goto dput_out; 1752 goto dput_out;
1752 1753
@@ -2007,7 +2008,7 @@ asmlinkage long sys_pivot_root(const char __user * new_root,
2007 if (error) 2008 if (error)
2008 goto out1; 2009 goto out1;
2009 2010
2010 error = security_sb_pivotroot(&old_nd, &new_nd); 2011 error = security_sb_pivotroot(&old_nd.path, &new_nd.path);
2011 if (error) { 2012 if (error) {
2012 path_put(&old_nd.path); 2013 path_put(&old_nd.path);
2013 goto out1; 2014 goto out1;
@@ -2070,7 +2071,7 @@ asmlinkage long sys_pivot_root(const char __user * new_root,
2070 touch_mnt_namespace(current->nsproxy->mnt_ns); 2071 touch_mnt_namespace(current->nsproxy->mnt_ns);
2071 spin_unlock(&vfsmount_lock); 2072 spin_unlock(&vfsmount_lock);
2072 chroot_fs_refs(&user_nd.path, &new_nd.path); 2073 chroot_fs_refs(&user_nd.path, &new_nd.path);
2073 security_sb_post_pivotroot(&user_nd, &new_nd); 2074 security_sb_post_pivotroot(&user_nd.path, &new_nd.path);
2074 error = 0; 2075 error = 0;
2075 path_put(&root_parent); 2076 path_put(&root_parent);
2076 path_put(&parent_path); 2077 path_put(&parent_path);