From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gao feng Subject: Re: [PATCH 5/5] audit: change the type of oldloginuid from kuid_t to unsigned long Date: Sat, 02 Nov 2013 14:16:35 +0800 Message-ID: <527498C3.4050604@cn.fujitsu.com> References: <1383305686-9752-1-git-send-email-gaofeng@cn.fujitsu.com> <1383305686-9752-5-git-send-email-gaofeng@cn.fujitsu.com> <20131102050054.GB3405@madcap2.tricolour.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20131102050054.GB3405@madcap2.tricolour.ca> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: Richard Guy Briggs Cc: linux-audit@redhat.com List-Id: linux-audit@redhat.com 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 >> --- >> 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 > 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 >