diff options
author | Steve Grubb <viro@zeniv.linux.org.uk> | 2006-01-09 15:48:17 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2006-03-20 20:08:55 +0100 |
commit | 5d3301088f7e412992d9e61cc3604cbdff3090ff (patch) | |
tree | 6dbcea6a4707474393b640f8aaa588b2aa90309e /kernel | |
parent | [PATCH] audit string fields interface + consumer (diff) | |
download | linux-5d3301088f7e412992d9e61cc3604cbdff3090ff.tar.xz linux-5d3301088f7e412992d9e61cc3604cbdff3090ff.zip |
[PATCH] add/remove rule update
Hi,
The following patch adds a little more information to the add/remove rule message emitted
by the kernel.
Signed-off-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/auditfilter.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index 686d514a3518..35f8fa82bb8b 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c @@ -487,10 +487,11 @@ int audit_receive_filter(int type, int pid, int uid, int seq, void *data, err = audit_add_rule(entry, &audit_filter_list[entry->rule.listnr]); - if (!err) - audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, - "auid=%u added an audit rule\n", loginuid); - else + audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, + "auid=%u add rule to list=%d res=%d\n", + loginuid, entry->rule.listnr, !err); + + if (err) audit_free_rule(entry); break; case AUDIT_DEL: @@ -504,9 +505,10 @@ int audit_receive_filter(int type, int pid, int uid, int seq, void *data, err = audit_del_rule(entry, &audit_filter_list[entry->rule.listnr]); - if (!err) - audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, - "auid=%u removed an audit rule\n", loginuid); + audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, + "auid=%u remove rule from list=%d res=%d\n", + loginuid, entry->rule.listnr, !err); + audit_free_rule(entry); break; default: |