aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2014-01-13 16:48:45 -0500
committerEric Paris <eparis@redhat.com>2014-01-13 22:33:36 -0500
commit70249a9cfdb405f654708699c679c6774efb31d8 (patch)
tree3e3f102a255fe974fb0b7ae3841daff4021517c9
parentd7961148258cfe19908b5a29941a8c9f3fa7a4d6 (diff)
audit: use define's for audit version
Give names to the audit versions. Just something for a userspace programmer to know what the version provides. Signed-off-by: Eric Paris <eparis@redhat.com>
-rw-r--r--include/uapi/linux/audit.h5
-rw-r--r--kernel/audit.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
index 14afb0d22902..3e1fbe933016 100644
--- a/include/uapi/linux/audit.h
+++ b/include/uapi/linux/audit.h
@@ -320,6 +320,11 @@ enum {
320#define AUDIT_STATUS_RATE_LIMIT 0x0008 320#define AUDIT_STATUS_RATE_LIMIT 0x0008
321#define AUDIT_STATUS_BACKLOG_LIMIT 0x0010 321#define AUDIT_STATUS_BACKLOG_LIMIT 0x0010
322#define AUDIT_STATUS_BACKLOG_WAIT_TIME 0x0020 322#define AUDIT_STATUS_BACKLOG_WAIT_TIME 0x0020
323
324#define AUDIT_VERSION_BACKLOG_LIMIT 1
325#define AUDIT_VERSION_BACKLOG_WAIT_TIME 2
326#define AUDIT_VERSION_LATEST AUDIT_VERSION_BACKLOG_WAIT_TIME
327
323 /* Failure-to-log actions */ 328 /* Failure-to-log actions */
324#define AUDIT_FAIL_SILENT 0 329#define AUDIT_FAIL_SILENT 0
325#define AUDIT_FAIL_PRINTK 1 330#define AUDIT_FAIL_PRINTK 1
diff --git a/kernel/audit.c b/kernel/audit.c
index 57d47f08ed15..b6717231d3d4 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -792,7 +792,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
792 s.backlog_limit = audit_backlog_limit; 792 s.backlog_limit = audit_backlog_limit;
793 s.lost = atomic_read(&audit_lost); 793 s.lost = atomic_read(&audit_lost);
794 s.backlog = skb_queue_len(&audit_skb_queue); 794 s.backlog = skb_queue_len(&audit_skb_queue);
795 s.version = 2; 795 s.version = AUDIT_VERSION_LATEST;
796 s.backlog_wait_time = audit_backlog_wait_time; 796 s.backlog_wait_time = audit_backlog_wait_time;
797 audit_send_reply(NETLINK_CB(skb).portid, seq, AUDIT_GET, 0, 0, 797 audit_send_reply(NETLINK_CB(skb).portid, seq, AUDIT_GET, 0, 0,
798 &s, sizeof(s)); 798 &s, sizeof(s));