Skip to content

Commit a99abce

Browse files
committed
Merge branch 'upstream' of git://git.infradead.org/users/pcmoore/audit
Pull audit updates from Paul Moore: "Two small patches from the audit next branch; only one of which has any real significant code changes, the other is simply a MAINTAINERS update for audit. The single code patch is pretty small and rather straightforward, it changes the audit "version" number reported to userspace from an integer to a bitmap which is used to indicate the functionality of the running kernel. This really doesn't have much impact on the kernel, but it will make life easier for the audit userspace folks. Thankfully we were still on a version number which allowed us to do this without breaking userspace" * 'upstream' of git://git.infradead.org/users/pcmoore/audit: audit: convert status version to a feature bitmap audit: add Paul Moore to the MAINTAINERS entry
2 parents e3aa91a + 0f7e94e commit a99abce

3 files changed

Lines changed: 17 additions & 7 deletions

File tree

MAINTAINERS

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,10 +1801,11 @@ S: Supported
18011801
F: drivers/scsi/esas2r
18021802

18031803
AUDIT SUBSYSTEM
1804+
M: Paul Moore <paul@paul-moore.com>
18041805
M: Eric Paris <eparis@redhat.com>
1805-
L: linux-audit@redhat.com (subscribers-only)
1806+
L: linux-audit@redhat.com (moderated for non-subscribers)
18061807
W: http://people.redhat.com/sgrubb/audit/
1807-
T: git git://git.infradead.org/users/eparis/audit.git
1808+
T: git git://git.infradead.org/users/pcmoore/audit
18081809
S: Maintained
18091810
F: include/linux/audit.h
18101811
F: include/uapi/linux/audit.h

include/uapi/linux/audit.h

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,15 @@ enum {
322322
#define AUDIT_STATUS_BACKLOG_LIMIT 0x0010
323323
#define AUDIT_STATUS_BACKLOG_WAIT_TIME 0x0020
324324

325-
#define AUDIT_VERSION_BACKLOG_LIMIT 1
326-
#define AUDIT_VERSION_BACKLOG_WAIT_TIME 2
327-
#define AUDIT_VERSION_LATEST AUDIT_VERSION_BACKLOG_WAIT_TIME
325+
#define AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT 0x00000001
326+
#define AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME 0x00000002
327+
#define AUDIT_FEATURE_BITMAP_ALL (AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT | \
328+
AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME)
329+
330+
/* deprecated: AUDIT_VERSION_* */
331+
#define AUDIT_VERSION_LATEST AUDIT_FEATURE_BITMAP_ALL
332+
#define AUDIT_VERSION_BACKLOG_LIMIT AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT
333+
#define AUDIT_VERSION_BACKLOG_WAIT_TIME AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME
328334

329335
/* Failure-to-log actions */
330336
#define AUDIT_FAIL_SILENT 0
@@ -404,7 +410,10 @@ struct audit_status {
404410
__u32 backlog_limit; /* waiting messages limit */
405411
__u32 lost; /* messages lost */
406412
__u32 backlog; /* messages waiting in queue */
407-
__u32 version; /* audit api version number */
413+
union {
414+
__u32 version; /* deprecated: audit api version num */
415+
__u32 feature_bitmap; /* bitmap of kernel audit features */
416+
};
408417
__u32 backlog_wait_time;/* message queue wait timeout */
409418
};
410419

kernel/audit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
833833
s.backlog_limit = audit_backlog_limit;
834834
s.lost = atomic_read(&audit_lost);
835835
s.backlog = skb_queue_len(&audit_skb_queue);
836-
s.version = AUDIT_VERSION_LATEST;
836+
s.feature_bitmap = AUDIT_FEATURE_BITMAP_ALL;
837837
s.backlog_wait_time = audit_backlog_wait_time;
838838
audit_send_reply(skb, seq, AUDIT_GET, 0, 0, &s, sizeof(s));
839839
break;

0 commit comments

Comments
 (0)