diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-05 21:32:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-05 21:32:06 -0500 |
commit | 520c85346666d4d9a6fcaaa8450542302dc28b91 (patch) | |
tree | 9c9cc9e2493b606104dd8602302ae28258ebeac0 /security | |
parent | e8c82c2e23e3527e0c9dc195e432c16784d270fa (diff) | |
parent | 4ae8978cf92a96257cd8998a49e781be83571d64 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
inotify: fix type errors in interfaces
fix breakage in reiserfs_new_inode()
fix the treatment of jfs special inodes
vfs: remove duplicate code in get_fs_type()
add a vfs_fsync helper
sys_execve and sys_uselib do not call into fsnotify
zero i_uid/i_gid on inode allocation
inode->i_op is never NULL
ntfs: don't NULL i_op
isofs check for NULL ->i_op in root directory is dead code
affs: do not zero ->i_op
kill suid bit only for regular files
vfs: lseek(fd, 0, SEEK_CUR) race condition
Diffstat (limited to 'security')
-rw-r--r-- | security/commoncap.c | 6 | ||||
-rw-r--r-- | security/inode.c | 3 | ||||
-rw-r--r-- | security/selinux/selinuxfs.c | 2 |
3 files changed, 3 insertions, 8 deletions
diff --git a/security/commoncap.c b/security/commoncap.c index 79713545cd63..69fc9952650f 100644 --- a/security/commoncap.c +++ b/security/commoncap.c | |||
@@ -238,7 +238,7 @@ int cap_inode_need_killpriv(struct dentry *dentry) | |||
238 | struct inode *inode = dentry->d_inode; | 238 | struct inode *inode = dentry->d_inode; |
239 | int error; | 239 | int error; |
240 | 240 | ||
241 | if (!inode->i_op || !inode->i_op->getxattr) | 241 | if (!inode->i_op->getxattr) |
242 | return 0; | 242 | return 0; |
243 | 243 | ||
244 | error = inode->i_op->getxattr(dentry, XATTR_NAME_CAPS, NULL, 0); | 244 | error = inode->i_op->getxattr(dentry, XATTR_NAME_CAPS, NULL, 0); |
@@ -259,7 +259,7 @@ int cap_inode_killpriv(struct dentry *dentry) | |||
259 | { | 259 | { |
260 | struct inode *inode = dentry->d_inode; | 260 | struct inode *inode = dentry->d_inode; |
261 | 261 | ||
262 | if (!inode->i_op || !inode->i_op->removexattr) | 262 | if (!inode->i_op->removexattr) |
263 | return 0; | 263 | return 0; |
264 | 264 | ||
265 | return inode->i_op->removexattr(dentry, XATTR_NAME_CAPS); | 265 | return inode->i_op->removexattr(dentry, XATTR_NAME_CAPS); |
@@ -317,7 +317,7 @@ int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data | |||
317 | 317 | ||
318 | memset(cpu_caps, 0, sizeof(struct cpu_vfs_cap_data)); | 318 | memset(cpu_caps, 0, sizeof(struct cpu_vfs_cap_data)); |
319 | 319 | ||
320 | if (!inode || !inode->i_op || !inode->i_op->getxattr) | 320 | if (!inode || !inode->i_op->getxattr) |
321 | return -ENODATA; | 321 | return -ENODATA; |
322 | 322 | ||
323 | size = inode->i_op->getxattr((struct dentry *)dentry, XATTR_NAME_CAPS, &caps, | 323 | size = inode->i_op->getxattr((struct dentry *)dentry, XATTR_NAME_CAPS, &caps, |
diff --git a/security/inode.c b/security/inode.c index efea5a605466..007ef252dde7 100644 --- a/security/inode.c +++ b/security/inode.c | |||
@@ -61,9 +61,6 @@ static struct inode *get_inode(struct super_block *sb, int mode, dev_t dev) | |||
61 | 61 | ||
62 | if (inode) { | 62 | if (inode) { |
63 | inode->i_mode = mode; | 63 | inode->i_mode = mode; |
64 | inode->i_uid = 0; | ||
65 | inode->i_gid = 0; | ||
66 | inode->i_blocks = 0; | ||
67 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; | 64 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
68 | switch (mode & S_IFMT) { | 65 | switch (mode & S_IFMT) { |
69 | default: | 66 | default: |
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index e5520996a75b..8f612c8becb5 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c | |||
@@ -847,8 +847,6 @@ static struct inode *sel_make_inode(struct super_block *sb, int mode) | |||
847 | 847 | ||
848 | if (ret) { | 848 | if (ret) { |
849 | ret->i_mode = mode; | 849 | ret->i_mode = mode; |
850 | ret->i_uid = ret->i_gid = 0; | ||
851 | ret->i_blocks = 0; | ||
852 | ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME; | 850 | ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME; |
853 | } | 851 | } |
854 | return ret; | 852 | return ret; |