Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236626
b: refs/heads/master
c: fbabf31
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Graf authored and Patrick McHardy committed Jan 16, 2011
1 parent 561be95 commit 9bc655e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 43f393caec0362abe03c72799d3f342af3973070
refs/heads/master: fbabf31e4d482149b5e2704eb0287cf9117bdcf3
1 change: 1 addition & 0 deletions trunk/include/linux/audit.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
#define AUDIT_CAPSET 1322 /* Record showing argument to sys_capset */
#define AUDIT_MMAP 1323 /* Record showing descriptor and flags in mmap */
#define AUDIT_NETFILTER_PKT 1324 /* Packets traversing netfilter chains */
#define AUDIT_NETFILTER_CFG 1325 /* Netfilter chain modifications */

#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */
#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */
Expand Down
16 changes: 16 additions & 0 deletions trunk/net/netfilter/x_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <linux/mutex.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/audit.h>
#include <net/net_namespace.h>

#include <linux/netfilter/x_tables.h>
Expand Down Expand Up @@ -834,6 +835,21 @@ xt_replace_table(struct xt_table *table,
*/
local_bh_enable();

#ifdef CONFIG_AUDIT
if (audit_enabled) {
struct audit_buffer *ab;

ab = audit_log_start(current->audit_context, GFP_KERNEL,
AUDIT_NETFILTER_CFG);
if (ab) {
audit_log_format(ab, "table=%s family=%u entries=%u",
table->name, table->af,
private->number);
audit_log_end(ab);
}
}
#endif

return private;
}
EXPORT_SYMBOL_GPL(xt_replace_table);
Expand Down

0 comments on commit 9bc655e

Please sign in to comment.