aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2013-11-27 17:35:17 -0500
committerEric Paris <eparis@redhat.com>2014-01-13 22:31:46 -0500
commit4440e8548153e9e6d56db9abe6f3bc0e5b9eb74f (patch)
tree1752c5edd77a746fdb2aad2806b31fbe4dd39a76 /kernel
parentff235f51a138fc61e1a22dcb8b072d9c78c2a8cc (diff)
audit: convert all sessionid declaration to unsigned int
Right now the sessionid value in the kernel is a combination of u32, int, and unsigned int. Just use unsigned int throughout. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/audit.c2
-rw-r--r--kernel/auditfilter.c2
-rw-r--r--kernel/auditsc.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index 25e4ed016793..ce8514f9aa6c 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1611,7 +1611,7 @@ void audit_log_d_path(struct audit_buffer *ab, const char *prefix,
1611 1611
1612void audit_log_session_info(struct audit_buffer *ab) 1612void audit_log_session_info(struct audit_buffer *ab)
1613{ 1613{
1614 u32 sessionid = audit_get_sessionid(current); 1614 unsigned int sessionid = audit_get_sessionid(current);
1615 uid_t auid = from_kuid(&init_user_ns, audit_get_loginuid(current)); 1615 uid_t auid = from_kuid(&init_user_ns, audit_get_loginuid(current));
1616 1616
1617 audit_log_format(ab, " auid=%u ses=%u", auid, sessionid); 1617 audit_log_format(ab, " auid=%u ses=%u", auid, sessionid);
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 6cc8240b7aaf..629834aa4ca4 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -1005,7 +1005,7 @@ static void audit_log_rule_change(char *action, struct audit_krule *rule, int re
1005{ 1005{
1006 struct audit_buffer *ab; 1006 struct audit_buffer *ab;
1007 uid_t loginuid = from_kuid(&init_user_ns, audit_get_loginuid(current)); 1007 uid_t loginuid = from_kuid(&init_user_ns, audit_get_loginuid(current));
1008 u32 sessionid = audit_get_sessionid(current); 1008 unsigned int sessionid = audit_get_sessionid(current);
1009 1009
1010 if (!audit_enabled) 1010 if (!audit_enabled)
1011 return; 1011 return;
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 05634b3ba244..5c237343cd9b 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -2011,7 +2011,7 @@ int audit_set_loginuid(kuid_t loginuid)
2011 2011
2012 /* are we setting or clearing? */ 2012 /* are we setting or clearing? */
2013 if (uid_valid(loginuid)) 2013 if (uid_valid(loginuid))
2014 sessionid = atomic_inc_return(&session_id); 2014 sessionid = (unsigned int)atomic_inc_return(&session_id);
2015 2015
2016 task->sessionid = sessionid; 2016 task->sessionid = sessionid;
2017 task->loginuid = loginuid; 2017 task->loginuid = loginuid;