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/jfs | |
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/jfs')
-rw-r--r-- | fs/jfs/jfs_xattr.h | 5 | ||||
-rw-r--r-- | fs/jfs/namei.c | 8 | ||||
-rw-r--r-- | fs/jfs/xattr.c | 6 |
3 files changed, 11 insertions, 8 deletions
diff --git a/fs/jfs/jfs_xattr.h b/fs/jfs/jfs_xattr.h index 88b6cc535bf2..e9e100fd7c09 100644 --- a/fs/jfs/jfs_xattr.h +++ b/fs/jfs/jfs_xattr.h | |||
@@ -62,10 +62,11 @@ extern ssize_t jfs_listxattr(struct dentry *, char *, size_t); | |||
62 | extern int jfs_removexattr(struct dentry *, const char *); | 62 | extern int jfs_removexattr(struct dentry *, const char *); |
63 | 63 | ||
64 | #ifdef CONFIG_JFS_SECURITY | 64 | #ifdef CONFIG_JFS_SECURITY |
65 | extern int jfs_init_security(tid_t, struct inode *, struct inode *); | 65 | extern int jfs_init_security(tid_t, struct inode *, struct inode *, |
66 | const struct qstr *); | ||
66 | #else | 67 | #else |
67 | static inline int jfs_init_security(tid_t tid, struct inode *inode, | 68 | static inline int jfs_init_security(tid_t tid, struct inode *inode, |
68 | struct inode *dir) | 69 | struct inode *dir, const struct qstr *qstr) |
69 | { | 70 | { |
70 | return 0; | 71 | return 0; |
71 | } | 72 | } |
diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c index 3f04a1804931..eaaf2b511e89 100644 --- a/fs/jfs/namei.c +++ b/fs/jfs/namei.c | |||
@@ -115,7 +115,7 @@ static int jfs_create(struct inode *dip, struct dentry *dentry, int mode, | |||
115 | if (rc) | 115 | if (rc) |
116 | goto out3; | 116 | goto out3; |
117 | 117 | ||
118 | rc = jfs_init_security(tid, ip, dip); | 118 | rc = jfs_init_security(tid, ip, dip, &dentry->d_name); |
119 | if (rc) { | 119 | if (rc) { |
120 | txAbort(tid, 0); | 120 | txAbort(tid, 0); |
121 | goto out3; | 121 | goto out3; |
@@ -253,7 +253,7 @@ static int jfs_mkdir(struct inode *dip, struct dentry *dentry, int mode) | |||
253 | if (rc) | 253 | if (rc) |
254 | goto out3; | 254 | goto out3; |
255 | 255 | ||
256 | rc = jfs_init_security(tid, ip, dip); | 256 | rc = jfs_init_security(tid, ip, dip, &dentry->d_name); |
257 | if (rc) { | 257 | if (rc) { |
258 | txAbort(tid, 0); | 258 | txAbort(tid, 0); |
259 | goto out3; | 259 | goto out3; |
@@ -929,7 +929,7 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry, | |||
929 | mutex_lock_nested(&JFS_IP(dip)->commit_mutex, COMMIT_MUTEX_PARENT); | 929 | mutex_lock_nested(&JFS_IP(dip)->commit_mutex, COMMIT_MUTEX_PARENT); |
930 | mutex_lock_nested(&JFS_IP(ip)->commit_mutex, COMMIT_MUTEX_CHILD); | 930 | mutex_lock_nested(&JFS_IP(ip)->commit_mutex, COMMIT_MUTEX_CHILD); |
931 | 931 | ||
932 | rc = jfs_init_security(tid, ip, dip); | 932 | rc = jfs_init_security(tid, ip, dip, &dentry->d_name); |
933 | if (rc) | 933 | if (rc) |
934 | goto out3; | 934 | goto out3; |
935 | 935 | ||
@@ -1392,7 +1392,7 @@ static int jfs_mknod(struct inode *dir, struct dentry *dentry, | |||
1392 | if (rc) | 1392 | if (rc) |
1393 | goto out3; | 1393 | goto out3; |
1394 | 1394 | ||
1395 | rc = jfs_init_security(tid, ip, dir); | 1395 | rc = jfs_init_security(tid, ip, dir, &dentry->d_name); |
1396 | if (rc) { | 1396 | if (rc) { |
1397 | txAbort(tid, 0); | 1397 | txAbort(tid, 0); |
1398 | goto out3; | 1398 | goto out3; |
diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c index 2d7f165d0f1d..3fa4c32272df 100644 --- a/fs/jfs/xattr.c +++ b/fs/jfs/xattr.c | |||
@@ -1091,7 +1091,8 @@ int jfs_removexattr(struct dentry *dentry, const char *name) | |||
1091 | } | 1091 | } |
1092 | 1092 | ||
1093 | #ifdef CONFIG_JFS_SECURITY | 1093 | #ifdef CONFIG_JFS_SECURITY |
1094 | int jfs_init_security(tid_t tid, struct inode *inode, struct inode *dir) | 1094 | int jfs_init_security(tid_t tid, struct inode *inode, struct inode *dir, |
1095 | const struct qstr *qstr) | ||
1095 | { | 1096 | { |
1096 | int rc; | 1097 | int rc; |
1097 | size_t len; | 1098 | size_t len; |
@@ -1099,7 +1100,8 @@ int jfs_init_security(tid_t tid, struct inode *inode, struct inode *dir) | |||
1099 | char *suffix; | 1100 | char *suffix; |
1100 | char *name; | 1101 | char *name; |
1101 | 1102 | ||
1102 | rc = security_inode_init_security(inode, dir, &suffix, &value, &len); | 1103 | rc = security_inode_init_security(inode, dir, qstr, &suffix, &value, |
1104 | &len); | ||
1103 | if (rc) { | 1105 | if (rc) { |
1104 | if (rc == -EOPNOTSUPP) | 1106 | if (rc == -EOPNOTSUPP) |
1105 | return 0; | 1107 | return 0; |