diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-03 00:48:12 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-03 18:49:59 +0200 |
commit | b61c37f57988567c84359645f8202a7c84bc798a (patch) | |
tree | a808c891711d060060a751f4119198dc06e2c847 /security/smack | |
parent | SELinux: do not allocate stack space for AVC data unless needed (diff) | |
download | linux-b61c37f57988567c84359645f8202a7c84bc798a.tar.xz linux-b61c37f57988567c84359645f8202a7c84bc798a.zip |
lsm_audit: don't specify the audit pre/post callbacks in 'struct common_audit_data'
It just bloats the audit data structure for no good reason, since the
only time those fields are filled are just before calling the
common_lsm_audit() function, which is also the only user of those
fields.
So just make them be the arguments to common_lsm_audit(), rather than
bloating that structure that is passed around everywhere, and is
initialized in hot paths.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'security/smack')
-rw-r--r-- | security/smack/smack_access.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/security/smack/smack_access.c b/security/smack/smack_access.c index 2af7fcc98a71..c8115f7308f8 100644 --- a/security/smack/smack_access.c +++ b/security/smack/smack_access.c @@ -321,9 +321,8 @@ void smack_log(char *subject_label, char *object_label, int request, sad->object = object_label; sad->request = request_buffer; sad->result = result; - a->lsm_pre_audit = smack_log_callback; - common_lsm_audit(a); + common_lsm_audit(a, smack_log_callback, NULL); } #else /* #ifdef CONFIG_AUDIT */ void smack_log(char *subject_label, char *object_label, int request, |