diff options
Diffstat (limited to 'security/dummy.c')
-rw-r--r-- | security/dummy.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/security/dummy.c b/security/dummy.c index 2a0337a52d32..3ca5f2b828a0 100644 --- a/security/dummy.c +++ b/security/dummy.c | |||
@@ -803,6 +803,23 @@ static int dummy_setprocattr(struct task_struct *p, char *name, void *value, siz | |||
803 | return -EINVAL; | 803 | return -EINVAL; |
804 | } | 804 | } |
805 | 805 | ||
806 | #ifdef CONFIG_KEYS | ||
807 | static inline int dummy_key_alloc(struct key *key) | ||
808 | { | ||
809 | return 0; | ||
810 | } | ||
811 | |||
812 | static inline void dummy_key_free(struct key *key) | ||
813 | { | ||
814 | } | ||
815 | |||
816 | static inline int dummy_key_permission(key_ref_t key_ref, | ||
817 | struct task_struct *context, | ||
818 | key_perm_t perm) | ||
819 | { | ||
820 | return 0; | ||
821 | } | ||
822 | #endif /* CONFIG_KEYS */ | ||
806 | 823 | ||
807 | struct security_operations dummy_security_ops; | 824 | struct security_operations dummy_security_ops; |
808 | 825 | ||
@@ -954,5 +971,11 @@ void security_fixup_ops (struct security_operations *ops) | |||
954 | set_to_dummy_if_null(ops, sk_alloc_security); | 971 | set_to_dummy_if_null(ops, sk_alloc_security); |
955 | set_to_dummy_if_null(ops, sk_free_security); | 972 | set_to_dummy_if_null(ops, sk_free_security); |
956 | #endif /* CONFIG_SECURITY_NETWORK */ | 973 | #endif /* CONFIG_SECURITY_NETWORK */ |
974 | #ifdef CONFIG_KEYS | ||
975 | set_to_dummy_if_null(ops, key_alloc); | ||
976 | set_to_dummy_if_null(ops, key_free); | ||
977 | set_to_dummy_if_null(ops, key_permission); | ||
978 | #endif /* CONFIG_KEYS */ | ||
979 | |||
957 | } | 980 | } |
958 | 981 | ||