Convert /proc/audit debug output from label-value per line to one title
line with one output line.
Signed-off-by: Richard Guy Briggs <rgb(a)redhat.com>
---
kernel/audit.c | 75 ++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 51 insertions(+), 24 deletions(-)
diff --git a/kernel/audit.c b/kernel/audit.c
index ffdec0c..30b3b08 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1188,30 +1188,57 @@ static struct pernet_operations audit_net_ops __net_initdata = {
/* Display information about audit subsystem */
static int proc_auditstats_show(struct seq_file *m, void *v)
{
- //seq_printf(m, "audit_initialized\t%d\n", audit_initialized);
- //seq_printf(m, "audit_enabled\t%u\n", audit_enabled);
- //seq_printf(m, "audit_ever_enabled\t%u\n", audit_ever_enabled);
- //seq_printf(m, "audit_default\t%u\n", audit_default);
- //seq_printf(m, "audit_failure\t%u\n", audit_failure);
- seq_printf(m, "audit_pid\t\t\t%d\n", audit_pid);
- //seq_printf(m, "audit_nlk_portid\t%u\n", audit_nlk_portid);
- //seq_printf(m, "audit_rate_limit\t%u\n", audit_rate_limit);
- //seq_printf(m, "audit_backlog_limit\t%u\n", audit_backlog_limit);
- //seq_printf(m, "audit_backlog_wait_time\t%u\n", audit_backlog_wait_time);
- //seq_printf(m, "audit_sig_uid\t%u\n", from_kuid(&init_user_ns,
audit_sig_uid));
- //seq_printf(m, "audit_sig_pid\t%d\n", audit_sig_pid);
- //seq_printf(m, "audit_sig_sid\t%u\n", audit_sig_sid);
- seq_printf(m, "audit_lost\t\t\t%d\n", atomic_read(&audit_lost));
- seq_printf(m, "audit_hold_lost\t\t\t%d\n",
atomic_read(&audit_hold_lost));
- seq_printf(m, "audit_freelist_count\t\t%u\n", audit_freelist_count);
- seq_printf(m, "audit_skb_queue len\t\t%d\n",
skb_queue_len(&audit_skb_queue));
- seq_printf(m, "audit_skb_queue len_max\t\t%d\n",
skb_queue_len_max(&audit_skb_queue));
- seq_printf(m, "audit_skb_hold_queue len\t%d\n",
skb_queue_len(&audit_skb_hold_queue));
- seq_printf(m, "audit_skb_hold_queue len_max\t%d\n",
skb_queue_len_max(&audit_skb_hold_queue));
- seq_printf(m, "audit_overflows\t\t\t%d\n",
atomic_read(&audit_overflows));
- seq_printf(m, "audit_waiters\t\t\t%d\n", atomic_read(&audit_waiters));
- seq_printf(m, "audit_recovers\t\t\t%d\n", atomic_read(&audit_recovers));
- seq_printf(m, "audit_reserves\t\t\t%d\n", atomic_read(&audit_reserves));
+ //seq_printf(m, "init\t");
+ //seq_printf(m, "en\t");
+ //seq_printf(m, "ever_en\t");
+ //seq_printf(m, "def\t");
+ //seq_printf(m, "failure\t");
+ seq_printf(m, "pid\t");
+ //seq_printf(m, "portid\t");
+ //seq_printf(m, "rt_lim\t");
+ //seq_printf(m, "bk_lim\t");
+ //seq_printf(m, "bk_wait\t");
+ //seq_printf(m, "sig_uid\t");
+ //seq_printf(m, "sig_pid\t");
+ //seq_printf(m, "sig_sid\t");
+ seq_printf(m, "lost\t");
+ seq_printf(m, "hlost\t");
+ seq_printf(m, "freelis\t");
+ seq_printf(m, "Qln\t");
+ seq_printf(m, "Qln_mx\t");
+ seq_printf(m, "hQln\t");
+ seq_printf(m, "hQln_mx\t");
+ seq_printf(m, "oflow\t");
+ seq_printf(m, "waiter\t");
+ seq_printf(m, "recover\t");
+ seq_printf(m, "reserve\t");
+ seq_printf(m, "\n");
+
+ //seq_printf(m, "%d\t", audit_initialized);
+ //seq_printf(m, "%u\t", audit_enabled);
+ //seq_printf(m, "%u\t", audit_ever_enabled);
+ //seq_printf(m, "%u\t", audit_default);
+ //seq_printf(m, "%u\t", audit_failure);
+ seq_printf(m, "%d\t", audit_pid);
+ //seq_printf(m, "%u\t", audit_nlk_portid);
+ //seq_printf(m, "%u\t", audit_rate_limit);
+ //seq_printf(m, "%u\t", audit_backlog_limit);
+ //seq_printf(m, "%u\t", audit_backlog_wait_time);
+ //seq_printf(m, "%u\t", from_kuid(&init_user_ns, audit_sig_uid));
+ //seq_printf(m, "%d\t", audit_sig_pid);
+ //seq_printf(m, "%u\t", audit_sig_sid);
+ seq_printf(m, "%d\t", atomic_read(&audit_lost));
+ seq_printf(m, "%d\t", atomic_read(&audit_hold_lost));
+ seq_printf(m, "%u\t", audit_freelist_count);
+ seq_printf(m, "%d\t", skb_queue_len(&audit_skb_queue));
+ seq_printf(m, "%d\t", skb_queue_len_max(&audit_skb_queue));
+ seq_printf(m, "%d\t", skb_queue_len(&audit_skb_hold_queue));
+ seq_printf(m, "%d\t", skb_queue_len_max(&audit_skb_hold_queue));
+ seq_printf(m, "%d\t", atomic_read(&audit_overflows));
+ seq_printf(m, "%d\t", atomic_read(&audit_waiters));
+ seq_printf(m, "%d\t", atomic_read(&audit_recovers));
+ seq_printf(m, "%d\t", atomic_read(&audit_reserves));
+ seq_printf(m, "\n");
return 0;
}
--
1.7.1