summaryrefslogtreecommitdiff
path: root/security/smack
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-04-02 15:48:12 -0700
committerVarun Wadekar <vwadekar@nvidia.com>2012-04-18 18:37:16 +0530
commit57ab8e1b1722147fd892b3f91cffec6f4e4f31da (patch)
tree02387bfc9ab36910dcc2cd224968d438a1707ca5 /security/smack
parent8b905836fe935e31d1110258a06fc96eeccb2a57 (diff)
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.c3
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,