diff options
Diffstat (limited to 'security/dummy.c')
-rw-r--r-- | security/dummy.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/security/dummy.c b/security/dummy.c index fb2e942efbb6..1ac9f8e66aa2 100644 --- a/security/dummy.c +++ b/security/dummy.c | |||
@@ -993,6 +993,30 @@ static inline int dummy_key_permission(key_ref_t key_ref, | |||
993 | } | 993 | } |
994 | #endif /* CONFIG_KEYS */ | 994 | #endif /* CONFIG_KEYS */ |
995 | 995 | ||
996 | #ifdef CONFIG_AUDIT | ||
997 | static inline int dummy_audit_rule_init(u32 field, u32 op, char *rulestr, | ||
998 | void **lsmrule) | ||
999 | { | ||
1000 | return 0; | ||
1001 | } | ||
1002 | |||
1003 | static inline int dummy_audit_rule_known(struct audit_krule *krule) | ||
1004 | { | ||
1005 | return 0; | ||
1006 | } | ||
1007 | |||
1008 | static inline int dummy_audit_rule_match(u32 secid, u32 field, u32 op, | ||
1009 | void *lsmrule, | ||
1010 | struct audit_context *actx) | ||
1011 | { | ||
1012 | return 0; | ||
1013 | } | ||
1014 | |||
1015 | static inline void dummy_audit_rule_free(void *lsmrule) | ||
1016 | { } | ||
1017 | |||
1018 | #endif /* CONFIG_AUDIT */ | ||
1019 | |||
996 | struct security_operations dummy_security_ops; | 1020 | struct security_operations dummy_security_ops; |
997 | 1021 | ||
998 | #define set_to_dummy_if_null(ops, function) \ | 1022 | #define set_to_dummy_if_null(ops, function) \ |
@@ -1182,6 +1206,11 @@ void security_fixup_ops (struct security_operations *ops) | |||
1182 | set_to_dummy_if_null(ops, key_free); | 1206 | set_to_dummy_if_null(ops, key_free); |
1183 | set_to_dummy_if_null(ops, key_permission); | 1207 | set_to_dummy_if_null(ops, key_permission); |
1184 | #endif /* CONFIG_KEYS */ | 1208 | #endif /* CONFIG_KEYS */ |
1185 | 1209 | #ifdef CONFIG_AUDIT | |
1210 | set_to_dummy_if_null(ops, audit_rule_init); | ||
1211 | set_to_dummy_if_null(ops, audit_rule_known); | ||
1212 | set_to_dummy_if_null(ops, audit_rule_match); | ||
1213 | set_to_dummy_if_null(ops, audit_rule_free); | ||
1214 | #endif | ||
1186 | } | 1215 | } |
1187 | 1216 | ||