* [PATCH v2] audit: fix incorrect type of sessionid
@ 2013-11-02 6:45 Gao feng
2013-11-03 1:14 ` Richard Guy Briggs
0 siblings, 1 reply; 2+ messages in thread
From: Gao feng @ 2013-11-02 6:45 UTC (permalink / raw)
To: linux-audit; +Cc: rgb
The type of task->sessionid is unsigned int, the return
type of audit_get_sessionid should be consistent with it.
And this patch also changes the type of oldsessionid to
unsigned int.
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
---
include/linux/audit.h | 4 ++--
kernel/auditsc.c | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 7b31bec..01b40f7 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -202,7 +202,7 @@ static inline kuid_t audit_get_loginuid(struct task_struct *tsk)
return tsk->loginuid;
}
-static inline int audit_get_sessionid(struct task_struct *tsk)
+static inline unsigned int audit_get_sessionid(struct task_struct *tsk)
{
return tsk->sessionid;
}
@@ -360,7 +360,7 @@ static inline kuid_t audit_get_loginuid(struct task_struct *tsk)
{
return INVALID_UID;
}
-static inline int audit_get_sessionid(struct task_struct *tsk)
+static inline unsigned int audit_get_sessionid(struct task_struct *tsk)
{
return -1;
}
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index ceb396f..e4aaa9d 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 int oldsessionid;
int rc;
oldloginuid = audit_get_loginuid(current);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2] audit: fix incorrect type of sessionid
2013-11-02 6:45 [PATCH v2] audit: fix incorrect type of sessionid Gao feng
@ 2013-11-03 1:14 ` Richard Guy Briggs
0 siblings, 0 replies; 2+ messages in thread
From: Richard Guy Briggs @ 2013-11-03 1:14 UTC (permalink / raw)
To: Gao feng; +Cc: linux-audit
On Sat, Nov 02, 2013 at 02:45:02PM +0800, Gao feng wrote:
> The type of task->sessionid is unsigned int, the return
> type of audit_get_sessionid should be consistent with it.
>
> And this patch also changes the type of oldsessionid to
> unsigned int.
Looks good, thanks!
> Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
> ---
> include/linux/audit.h | 4 ++--
> kernel/auditsc.c | 3 ++-
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/audit.h b/include/linux/audit.h
> index 7b31bec..01b40f7 100644
> --- a/include/linux/audit.h
> +++ b/include/linux/audit.h
> @@ -202,7 +202,7 @@ static inline kuid_t audit_get_loginuid(struct task_struct *tsk)
> return tsk->loginuid;
> }
>
> -static inline int audit_get_sessionid(struct task_struct *tsk)
> +static inline unsigned int audit_get_sessionid(struct task_struct *tsk)
> {
> return tsk->sessionid;
> }
> @@ -360,7 +360,7 @@ static inline kuid_t audit_get_loginuid(struct task_struct *tsk)
> {
> return INVALID_UID;
> }
> -static inline int audit_get_sessionid(struct task_struct *tsk)
> +static inline unsigned int audit_get_sessionid(struct task_struct *tsk)
> {
> return -1;
> }
> diff --git a/kernel/auditsc.c b/kernel/auditsc.c
> index ceb396f..e4aaa9d 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 int oldsessionid;
> int rc;
>
> oldloginuid = audit_get_loginuid(current);
> --
> 1.8.3.1
>
- RGB
--
Richard Guy Briggs <rbriggs@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-03 1:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-02 6:45 [PATCH v2] audit: fix incorrect type of sessionid Gao feng
2013-11-03 1:14 ` Richard Guy Briggs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox