Skip to content

Commit 70249a9

Browse files
committed
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>
1 parent d796114 commit 70249a9

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎include/uapi/linux/audit.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,11 @@ enum {
320320
#define AUDIT_STATUS_RATE_LIMIT 0x0008
321321
#define AUDIT_STATUS_BACKLOG_LIMIT 0x0010
322322
#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+
323328
/* Failure-to-log actions */
324329
#define AUDIT_FAIL_SILENT 0
325330
#define AUDIT_FAIL_PRINTK 1

‎kernel/audit.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
792792
s.backlog_limit = audit_backlog_limit;
793793
s.lost = atomic_read(&audit_lost);
794794
s.backlog = skb_queue_len(&audit_skb_queue);
795-
s.version = 2;
795+
s.version = AUDIT_VERSION_LATEST;
796796
s.backlog_wait_time = audit_backlog_wait_time;
797797
audit_send_reply(NETLINK_CB(skb).portid, seq, AUDIT_GET, 0, 0,
798798
&s, sizeof(s));

0 commit comments

Comments
 (0)