On 11/02/2013 01:00 PM, Richard Guy Briggs wrote: > On Fri, Nov 01, 2013 at 07:34:46PM +0800, Gao feng wrote: >> The type of oldloginuid should be unsigned long. > > Can you say why unsigned long rather than int returned from > audit_get_sessionid() or unsigned int expected by > audit_log_set_loginuid()?
Oh..it's my miss, it definitely should be unsigned int. I will resend this one separately. Thanks! > > Kees: For that matter, why does audit_get_sessionid() return int rather > than unsigned int from task_struct? That was introduced in commit > 9321d526. > >> Signed-off-by: Gao feng <gaof...@cn.fujitsu.com> >> --- >> kernel/auditsc.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/kernel/auditsc.c b/kernel/auditsc.c >> index ceb396f..9f871ad 100644 >> --- a/kernel/auditsc.c >> +++ b/kernel/auditsc.c >> @@ -2018,7 +2018,8 @@ int audit_set_loginuid(kuid_t loginuid) >> { >> struct task_struct *task = current; >> unsigned int sessionid = -1; >> - kuid_t oldloginuid, oldsessionid; >> + kuid_t oldloginuid; >> + unsigned long oldsessionid; >> int rc; >> >> oldloginuid = audit_get_loginuid(current); >> -- >> 1.8.3.1 > > - RGB > > -- > Richard Guy Briggs <rbri...@redhat.com> > Senior Software Engineer, Kernel Security, AMER ENG Base Operating Systems, > Red Hat > Remote, Ottawa, Canada > Voice: +1.647.777.2635, Internal: (81) 32635, Alt: +1.613.693.0684x3545 > -- Linux-audit mailing list Linux-audit@redhat.com https://www.redhat.com/mailman/listinfo/linux-audit