diff options
author | Richard Guy Briggs <rgb@redhat.com> | 2014-12-23 13:02:04 -0500 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2014-12-23 16:40:18 -0500 |
commit | 041d7b98ffe59c59fdd639931dea7d74f9aa9a59 (patch) | |
tree | 1655d8bc82a0fcbf4f1d4e118aa1b6daeed6f9e0 /include/linux/audit.h | |
parent | 4a92843601ad0f5067f441d2f0dca55bbe18c076 (diff) |
audit: restore AUDIT_LOGINUID unset ABI
A regression was caused by commit 780a7654cee8:
audit: Make testing for a valid loginuid explicit.
(which in turn attempted to fix a regression caused by e1760bd)
When audit_krule_to_data() fills in the rules to get a listing, there was a
missing clause to convert back from AUDIT_LOGINUID_SET to AUDIT_LOGINUID.
This broke userspace by not returning the same information that was sent and
expected.
The rule:
auditctl -a exit,never -F auid=-1
gives:
auditctl -l
LIST_RULES: exit,never f24=0 syscall=all
when it should give:
LIST_RULES: exit,never auid=-1 (0xffffffff) syscall=all
Tag it so that it is reported the same way it was set. Create a new
private flags audit_krule field (pflags) to store it that won't interact with
the public one from the API.
Cc: stable@vger.kernel.org # v3.10-rc1+
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'include/linux/audit.h')
-rw-r--r-- | include/linux/audit.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index 36dffeccebdb..93331929d643 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -47,6 +47,7 @@ struct sk_buff; | |||
47 | 47 | ||
48 | struct audit_krule { | 48 | struct audit_krule { |
49 | int vers_ops; | 49 | int vers_ops; |
50 | u32 pflags; | ||
50 | u32 flags; | 51 | u32 flags; |
51 | u32 listnr; | 52 | u32 listnr; |
52 | u32 action; | 53 | u32 action; |
@@ -64,6 +65,9 @@ struct audit_krule { | |||
64 | u64 prio; | 65 | u64 prio; |
65 | }; | 66 | }; |
66 | 67 | ||
68 | /* Flag to indicate legacy AUDIT_LOGINUID unset usage */ | ||
69 | #define AUDIT_LOGINUID_LEGACY 0x1 | ||
70 | |||
67 | struct audit_field { | 71 | struct audit_field { |
68 | u32 type; | 72 | u32 type; |
69 | union { | 73 | union { |