aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/security/smack/smack.h
diff options
context:
space:
mode:
authorKonstantin Andreev <andreev@swemel.ru>2025-01-18 00:46:46 +0300
committerCasey Schaufler <casey@schaufler-ca.com>2025-02-13 18:33:55 -0800
commitbf9f14c91a05ec77ee3710703b699c2a32f80ae4 (patch)
tree1dcd07aacf0c8755e17062400abeb0228d815270 /security/smack/smack.h
parentsmack: ipv4/ipv6: tcp/dccp/sctp: fix incorrect child socket label (diff)
downloadwireguard-linux-bf9f14c91a05ec77ee3710703b699c2a32f80ae4.tar.xz
wireguard-linux-bf9f14c91a05ec77ee3710703b699c2a32f80ae4.zip
smack: remove /smack/logging if audit is not configured
If CONFIG_AUDIT is not set then SMACK does not generate audit messages, however, keeps audit control file, /smack/logging, while there is no entity to control. This change removes audit control file /smack/logging when audit is not configured in the kernel Signed-off-by: Konstantin Andreev <andreev@swemel.ru> Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'security/smack/smack.h')
-rw-r--r--security/smack/smack.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/security/smack/smack.h b/security/smack/smack.h
index d9d3113be664..bf6a6ed3946c 100644
--- a/security/smack/smack.h
+++ b/security/smack/smack.h
@@ -432,6 +432,12 @@ static inline struct smack_known *smk_of_current(void)
return smk_of_task(smack_cred(current_cred()));
}
+void smack_log(char *subject_label, char *object_label,
+ int request,
+ int result, struct smk_audit_info *auditdata);
+
+#ifdef CONFIG_AUDIT
+
/*
* logging functions
*/
@@ -439,12 +445,6 @@ static inline struct smack_known *smk_of_current(void)
#define SMACK_AUDIT_ACCEPT 0x2
extern int log_policy;
-void smack_log(char *subject_label, char *object_label,
- int request,
- int result, struct smk_audit_info *auditdata);
-
-#ifdef CONFIG_AUDIT
-
/*
* some inline functions to set up audit data
* they do nothing if CONFIG_AUDIT is not set