提交 46b20c38 编写于 作者: G Geliang Tang 提交者: Pablo Neira Ayuso

netfilter: use audit_log()

Use audit_log() instead of open-coding it.
Signed-off-by: NGeliang Tang <geliangtang@gmail.com>
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
上级 166327d7
...@@ -1069,15 +1069,10 @@ static int do_replace_finish(struct net *net, struct ebt_replace *repl, ...@@ -1069,15 +1069,10 @@ static int do_replace_finish(struct net *net, struct ebt_replace *repl,
#ifdef CONFIG_AUDIT #ifdef CONFIG_AUDIT
if (audit_enabled) { if (audit_enabled) {
struct audit_buffer *ab; audit_log(current->audit_context, GFP_KERNEL,
AUDIT_NETFILTER_CFG,
ab = audit_log_start(current->audit_context, GFP_KERNEL, "table=%s family=%u entries=%u",
AUDIT_NETFILTER_CFG);
if (ab) {
audit_log_format(ab, "table=%s family=%u entries=%u",
repl->name, AF_BRIDGE, repl->nentries); repl->name, AF_BRIDGE, repl->nentries);
audit_log_end(ab);
}
} }
#endif #endif
return ret; return ret;
......
...@@ -1192,16 +1192,10 @@ xt_replace_table(struct xt_table *table, ...@@ -1192,16 +1192,10 @@ xt_replace_table(struct xt_table *table,
#ifdef CONFIG_AUDIT #ifdef CONFIG_AUDIT
if (audit_enabled) { if (audit_enabled) {
struct audit_buffer *ab; audit_log(current->audit_context, GFP_KERNEL,
AUDIT_NETFILTER_CFG,
ab = audit_log_start(current->audit_context, GFP_KERNEL, "table=%s family=%u entries=%u",
AUDIT_NETFILTER_CFG); table->name, table->af, private->number);
if (ab) {
audit_log_format(ab, "table=%s family=%u entries=%u",
table->name, table->af,
private->number);
audit_log_end(ab);
}
} }
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册