diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 12:15:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 12:15:43 -0400 |
commit | 0f6e0e8448a16d8d22119ce91d8dd24b44865b51 (patch) | |
tree | 7c295c02db035fc6a0b867465911a2bc9dc6b1ef /fs/reiserfs | |
parent | 0d2ecee2bdb2a19d04bc5cefac0f86e790f1aad4 (diff) | |
parent | a002951c97ff8da49938c982a4c236bf2fafdc9f (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: (33 commits)
AppArmor: kill unused macros in lsm.c
AppArmor: cleanup generated files correctly
KEYS: Add an iovec version of KEYCTL_INSTANTIATE
KEYS: Add a new keyctl op to reject a key with a specified error code
KEYS: Add a key type op to permit the key description to be vetted
KEYS: Add an RCU payload dereference macro
AppArmor: Cleanup make file to remove cruft and make it easier to read
SELinux: implement the new sb_remount LSM hook
LSM: Pass -o remount options to the LSM
SELinux: Compute SID for the newly created socket
SELinux: Socket retains creator role and MLS attribute
SELinux: Auto-generate security_is_socket_class
TOMOYO: Fix memory leak upon file open.
Revert "selinux: simplify ioctl checking"
selinux: drop unused packet flow permissions
selinux: Fix packet forwarding checks on postrouting
selinux: Fix wrong checks for selinux_policycap_netpeer
selinux: Fix check for xfrm selinux context algorithm
ima: remove unnecessary call to ima_must_measure
IMA: remove IMA imbalance checking
...
Diffstat (limited to 'fs/reiserfs')
-rw-r--r-- | fs/reiserfs/namei.c | 9 | ||||
-rw-r--r-- | fs/reiserfs/xattr_security.c | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c index 4b2eb564fdad..118662690cdf 100644 --- a/fs/reiserfs/namei.c +++ b/fs/reiserfs/namei.c | |||
@@ -593,7 +593,7 @@ static int reiserfs_create(struct inode *dir, struct dentry *dentry, int mode, | |||
593 | new_inode_init(inode, dir, mode); | 593 | new_inode_init(inode, dir, mode); |
594 | 594 | ||
595 | jbegin_count += reiserfs_cache_default_acl(dir); | 595 | jbegin_count += reiserfs_cache_default_acl(dir); |
596 | retval = reiserfs_security_init(dir, inode, &security); | 596 | retval = reiserfs_security_init(dir, inode, &dentry->d_name, &security); |
597 | if (retval < 0) { | 597 | if (retval < 0) { |
598 | drop_new_inode(inode); | 598 | drop_new_inode(inode); |
599 | return retval; | 599 | return retval; |
@@ -667,7 +667,7 @@ static int reiserfs_mknod(struct inode *dir, struct dentry *dentry, int mode, | |||
667 | new_inode_init(inode, dir, mode); | 667 | new_inode_init(inode, dir, mode); |
668 | 668 | ||
669 | jbegin_count += reiserfs_cache_default_acl(dir); | 669 | jbegin_count += reiserfs_cache_default_acl(dir); |
670 | retval = reiserfs_security_init(dir, inode, &security); | 670 | retval = reiserfs_security_init(dir, inode, &dentry->d_name, &security); |
671 | if (retval < 0) { | 671 | if (retval < 0) { |
672 | drop_new_inode(inode); | 672 | drop_new_inode(inode); |
673 | return retval; | 673 | return retval; |
@@ -747,7 +747,7 @@ static int reiserfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) | |||
747 | new_inode_init(inode, dir, mode); | 747 | new_inode_init(inode, dir, mode); |
748 | 748 | ||
749 | jbegin_count += reiserfs_cache_default_acl(dir); | 749 | jbegin_count += reiserfs_cache_default_acl(dir); |
750 | retval = reiserfs_security_init(dir, inode, &security); | 750 | retval = reiserfs_security_init(dir, inode, &dentry->d_name, &security); |
751 | if (retval < 0) { | 751 | if (retval < 0) { |
752 | drop_new_inode(inode); | 752 | drop_new_inode(inode); |
753 | return retval; | 753 | return retval; |
@@ -1032,7 +1032,8 @@ static int reiserfs_symlink(struct inode *parent_dir, | |||
1032 | } | 1032 | } |
1033 | new_inode_init(inode, parent_dir, mode); | 1033 | new_inode_init(inode, parent_dir, mode); |
1034 | 1034 | ||
1035 | retval = reiserfs_security_init(parent_dir, inode, &security); | 1035 | retval = reiserfs_security_init(parent_dir, inode, &dentry->d_name, |
1036 | &security); | ||
1036 | if (retval < 0) { | 1037 | if (retval < 0) { |
1037 | drop_new_inode(inode); | 1038 | drop_new_inode(inode); |
1038 | return retval; | 1039 | return retval; |
diff --git a/fs/reiserfs/xattr_security.c b/fs/reiserfs/xattr_security.c index 237c6928d3c6..ef66c18a9332 100644 --- a/fs/reiserfs/xattr_security.c +++ b/fs/reiserfs/xattr_security.c | |||
@@ -54,6 +54,7 @@ static size_t security_list(struct dentry *dentry, char *list, size_t list_len, | |||
54 | * of blocks needed for the transaction. If successful, reiserfs_security | 54 | * of blocks needed for the transaction. If successful, reiserfs_security |
55 | * must be released using reiserfs_security_free when the caller is done. */ | 55 | * must be released using reiserfs_security_free when the caller is done. */ |
56 | int reiserfs_security_init(struct inode *dir, struct inode *inode, | 56 | int reiserfs_security_init(struct inode *dir, struct inode *inode, |
57 | const struct qstr *qstr, | ||
57 | struct reiserfs_security_handle *sec) | 58 | struct reiserfs_security_handle *sec) |
58 | { | 59 | { |
59 | int blocks = 0; | 60 | int blocks = 0; |
@@ -65,7 +66,7 @@ int reiserfs_security_init(struct inode *dir, struct inode *inode, | |||
65 | if (IS_PRIVATE(dir)) | 66 | if (IS_PRIVATE(dir)) |
66 | return 0; | 67 | return 0; |
67 | 68 | ||
68 | error = security_inode_init_security(inode, dir, &sec->name, | 69 | error = security_inode_init_security(inode, dir, qstr, &sec->name, |
69 | &sec->value, &sec->length); | 70 | &sec->value, &sec->length); |
70 | if (error) { | 71 | if (error) { |
71 | if (error == -EOPNOTSUPP) | 72 | if (error == -EOPNOTSUPP) |