aboutsummaryrefslogtreecommitdiffstats
path: root/security/capability.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/capability.c')
-rw-r--r--security/capability.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/security/capability.c b/security/capability.c
index fac2f61b69a9..efeb6d9e0e6a 100644
--- a/security/capability.c
+++ b/security/capability.c
@@ -340,12 +340,16 @@ static int cap_task_create(unsigned long clone_flags)
340 return 0; 340 return 0;
341} 341}
342 342
343static int cap_cred_alloc_security(struct cred *cred) 343static void cap_cred_free(struct cred *cred)
344{
345}
346
347static int cap_cred_prepare(struct cred *new, const struct cred *old, gfp_t gfp)
344{ 348{
345 return 0; 349 return 0;
346} 350}
347 351
348static void cap_cred_free(struct cred *cred) 352static void cap_cred_commit(struct cred *new, const struct cred *old)
349{ 353{
350} 354}
351 355
@@ -750,7 +754,7 @@ static void cap_release_secctx(char *secdata, u32 seclen)
750} 754}
751 755
752#ifdef CONFIG_KEYS 756#ifdef CONFIG_KEYS
753static int cap_key_alloc(struct key *key, struct task_struct *ctx, 757static int cap_key_alloc(struct key *key, const struct cred *cred,
754 unsigned long flags) 758 unsigned long flags)
755{ 759{
756 return 0; 760 return 0;
@@ -760,7 +764,7 @@ static void cap_key_free(struct key *key)
760{ 764{
761} 765}
762 766
763static int cap_key_permission(key_ref_t key_ref, struct task_struct *context, 767static int cap_key_permission(key_ref_t key_ref, const struct cred *cred,
764 key_perm_t perm) 768 key_perm_t perm)
765{ 769{
766 return 0; 770 return 0;
@@ -814,8 +818,7 @@ void security_fixup_ops(struct security_operations *ops)
814 set_to_cap_if_null(ops, ptrace_may_access); 818 set_to_cap_if_null(ops, ptrace_may_access);
815 set_to_cap_if_null(ops, ptrace_traceme); 819 set_to_cap_if_null(ops, ptrace_traceme);
816 set_to_cap_if_null(ops, capget); 820 set_to_cap_if_null(ops, capget);
817 set_to_cap_if_null(ops, capset_check); 821 set_to_cap_if_null(ops, capset);
818 set_to_cap_if_null(ops, capset_set);
819 set_to_cap_if_null(ops, acct); 822 set_to_cap_if_null(ops, acct);
820 set_to_cap_if_null(ops, capable); 823 set_to_cap_if_null(ops, capable);
821 set_to_cap_if_null(ops, quotactl); 824 set_to_cap_if_null(ops, quotactl);
@@ -890,10 +893,11 @@ void security_fixup_ops(struct security_operations *ops)
890 set_to_cap_if_null(ops, file_receive); 893 set_to_cap_if_null(ops, file_receive);
891 set_to_cap_if_null(ops, dentry_open); 894 set_to_cap_if_null(ops, dentry_open);
892 set_to_cap_if_null(ops, task_create); 895 set_to_cap_if_null(ops, task_create);
893 set_to_cap_if_null(ops, cred_alloc_security);
894 set_to_cap_if_null(ops, cred_free); 896 set_to_cap_if_null(ops, cred_free);
897 set_to_cap_if_null(ops, cred_prepare);
898 set_to_cap_if_null(ops, cred_commit);
895 set_to_cap_if_null(ops, task_setuid); 899 set_to_cap_if_null(ops, task_setuid);
896 set_to_cap_if_null(ops, task_post_setuid); 900 set_to_cap_if_null(ops, task_fix_setuid);
897 set_to_cap_if_null(ops, task_setgid); 901 set_to_cap_if_null(ops, task_setgid);
898 set_to_cap_if_null(ops, task_setpgid); 902 set_to_cap_if_null(ops, task_setpgid);
899 set_to_cap_if_null(ops, task_getpgid); 903 set_to_cap_if_null(ops, task_getpgid);
@@ -910,7 +914,6 @@ void security_fixup_ops(struct security_operations *ops)
910 set_to_cap_if_null(ops, task_wait); 914 set_to_cap_if_null(ops, task_wait);
911 set_to_cap_if_null(ops, task_kill); 915 set_to_cap_if_null(ops, task_kill);
912 set_to_cap_if_null(ops, task_prctl); 916 set_to_cap_if_null(ops, task_prctl);
913 set_to_cap_if_null(ops, task_reparent_to_init);
914 set_to_cap_if_null(ops, task_to_inode); 917 set_to_cap_if_null(ops, task_to_inode);
915 set_to_cap_if_null(ops, ipc_permission); 918 set_to_cap_if_null(ops, ipc_permission);
916 set_to_cap_if_null(ops, ipc_getsecid); 919 set_to_cap_if_null(ops, ipc_getsecid);