diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /security/capability.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'security/capability.c')
-rw-r--r-- | security/capability.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/security/capability.c b/security/capability.c index fce07a7bc825..4875142b858d 100644 --- a/security/capability.c +++ b/security/capability.c | |||
@@ -308,6 +308,22 @@ static int cap_path_truncate(struct path *path, loff_t length, | |||
308 | { | 308 | { |
309 | return 0; | 309 | return 0; |
310 | } | 310 | } |
311 | |||
312 | static int cap_path_chmod(struct dentry *dentry, struct vfsmount *mnt, | ||
313 | mode_t mode) | ||
314 | { | ||
315 | return 0; | ||
316 | } | ||
317 | |||
318 | static int cap_path_chown(struct path *path, uid_t uid, gid_t gid) | ||
319 | { | ||
320 | return 0; | ||
321 | } | ||
322 | |||
323 | static int cap_path_chroot(struct path *root) | ||
324 | { | ||
325 | return 0; | ||
326 | } | ||
311 | #endif | 327 | #endif |
312 | 328 | ||
313 | static int cap_file_permission(struct file *file, int mask) | 329 | static int cap_file_permission(struct file *file, int mask) |
@@ -405,7 +421,7 @@ static int cap_kernel_create_files_as(struct cred *new, struct inode *inode) | |||
405 | return 0; | 421 | return 0; |
406 | } | 422 | } |
407 | 423 | ||
408 | static int cap_kernel_module_request(void) | 424 | static int cap_kernel_module_request(char *kmod_name) |
409 | { | 425 | { |
410 | return 0; | 426 | return 0; |
411 | } | 427 | } |
@@ -890,10 +906,6 @@ static void cap_audit_rule_free(void *lsmrule) | |||
890 | } | 906 | } |
891 | #endif /* CONFIG_AUDIT */ | 907 | #endif /* CONFIG_AUDIT */ |
892 | 908 | ||
893 | struct security_operations default_security_ops = { | ||
894 | .name = "default", | ||
895 | }; | ||
896 | |||
897 | #define set_to_cap_if_null(ops, function) \ | 909 | #define set_to_cap_if_null(ops, function) \ |
898 | do { \ | 910 | do { \ |
899 | if (!ops->function) { \ | 911 | if (!ops->function) { \ |
@@ -977,6 +989,9 @@ void security_fixup_ops(struct security_operations *ops) | |||
977 | set_to_cap_if_null(ops, path_link); | 989 | set_to_cap_if_null(ops, path_link); |
978 | set_to_cap_if_null(ops, path_rename); | 990 | set_to_cap_if_null(ops, path_rename); |
979 | set_to_cap_if_null(ops, path_truncate); | 991 | set_to_cap_if_null(ops, path_truncate); |
992 | set_to_cap_if_null(ops, path_chmod); | ||
993 | set_to_cap_if_null(ops, path_chown); | ||
994 | set_to_cap_if_null(ops, path_chroot); | ||
980 | #endif | 995 | #endif |
981 | set_to_cap_if_null(ops, file_permission); | 996 | set_to_cap_if_null(ops, file_permission); |
982 | set_to_cap_if_null(ops, file_alloc_security); | 997 | set_to_cap_if_null(ops, file_alloc_security); |