summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorRichard Guy Briggs <rgb@redhat.com>2013-05-20 15:08:18 -0400
committerBharat Nihalani <bnihalani@nvidia.com>2014-01-29 04:48:04 -0800
commit6b0e309f4fee61637e3a511027111acbd3958965 (patch)
treef68b78a1aadadda7832b33d925352afb77c3f8b1 /kernel
parentedb2cbc616bec7f607623fb8781431c5aa8d1558 (diff)
audit: change decimal constant to macro for invalid uid
SFR reported this 2013-05-15: > After merging the final tree, today's linux-next build (i386 defconfig) > produced this warning: > > kernel/auditfilter.c: In function 'audit_data_to_entry': > kernel/auditfilter.c:426:3: warning: this decimal constant is unsigned only > in ISO C90 [enabled by default] > > Introduced by commit 780a7654cee8 ("audit: Make testing for a valid > loginuid explicit") from Linus' tree. Replace this decimal constant in the code with a macro to make it more readable (add to the unsigned cast to quiet the warning). Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Eric Paris <eparis@redhat.com> (cherry picked from commit 42f74461a5b60cf6b42887e6d2ff5b7be4abf1ca) Change-Id: Ic6bf1f225cb8d8d9678b209a963bacfa8d9b0216 Signed-off-by: Philip Rakity <prakity@nvidia.com> Reviewed-on: http://git-master/r/361012 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/auditfilter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 6bd4a90d1991..38c475cc55ab 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -423,7 +423,7 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data,
f->lsm_rule = NULL;
/* Support legacy tests for a valid loginuid */
- if ((f->type == AUDIT_LOGINUID) && (f->val == 4294967295)) {
+ if ((f->type == AUDIT_LOGINUID) && (f->val == AUDIT_UID_UNSET)) {
f->type = AUDIT_LOGINUID_SET;
f->val = 0;
}