aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Grubb <viro@zeniv.linux.org.uk>2006-01-09 09:48:17 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2006-03-20 14:08:55 -0500
commit5d3301088f7e412992d9e61cc3604cbdff3090ff (patch)
tree6dbcea6a4707474393b640f8aaa588b2aa90309e
parent93315ed6dd12dacfc941f9eb8ca0293aadf99793 (diff)
[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>
-rw-r--r--include/linux/audit.h2
-rw-r--r--kernel/auditfilter.c16
2 files changed, 10 insertions, 8 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 8a3b98175c25..d760430c8de3 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -240,7 +240,7 @@ struct audit_rule_data {
240 __u32 flags; /* AUDIT_PER_{TASK,CALL}, AUDIT_PREPEND */ 240 __u32 flags; /* AUDIT_PER_{TASK,CALL}, AUDIT_PREPEND */
241 __u32 action; /* AUDIT_NEVER, AUDIT_POSSIBLE, AUDIT_ALWAYS */ 241 __u32 action; /* AUDIT_NEVER, AUDIT_POSSIBLE, AUDIT_ALWAYS */
242 __u32 field_count; 242 __u32 field_count;
243 __u32 mask[AUDIT_BITMASK_SIZE]; 243 __u32 mask[AUDIT_BITMASK_SIZE]; /* syscall(s) affected */
244 __u32 fields[AUDIT_MAX_FIELDS]; 244 __u32 fields[AUDIT_MAX_FIELDS];
245 __u32 values[AUDIT_MAX_FIELDS]; 245 __u32 values[AUDIT_MAX_FIELDS];
246 __u32 fieldflags[AUDIT_MAX_FIELDS]; 246 __u32 fieldflags[AUDIT_MAX_FIELDS];
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,
487 487
488 err = audit_add_rule(entry, 488 err = audit_add_rule(entry,
489 &audit_filter_list[entry->rule.listnr]); 489 &audit_filter_list[entry->rule.listnr]);
490 if (!err) 490 audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE,
491 audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, 491 "auid=%u add rule to list=%d res=%d\n",
492 "auid=%u added an audit rule\n", loginuid); 492 loginuid, entry->rule.listnr, !err);
493 else 493
494 if (err)
494 audit_free_rule(entry); 495 audit_free_rule(entry);
495 break; 496 break;
496 case AUDIT_DEL: 497 case AUDIT_DEL:
@@ -504,9 +505,10 @@ int audit_receive_filter(int type, int pid, int uid, int seq, void *data,
504 505
505 err = audit_del_rule(entry, 506 err = audit_del_rule(entry,
506 &audit_filter_list[entry->rule.listnr]); 507 &audit_filter_list[entry->rule.listnr]);
507 if (!err) 508 audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE,
508 audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE, 509 "auid=%u remove rule from list=%d res=%d\n",
509 "auid=%u removed an audit rule\n", loginuid); 510 loginuid, entry->rule.listnr, !err);
511
510 audit_free_rule(entry); 512 audit_free_rule(entry);
511 break; 513 break;
512 default: 514 default: