[RFC][PATCH] loginuid through procfs (+ a question)
Serge E. Hallyn
serue at us.ibm.com
Mon Jan 10 01:00:44 UTC 2005
Thanks for the comments, I plan to incorporate them tomorrow. However,
one response inline:
Quoting Steve Grubb (sgrubb at redhat.com):
> On Friday 07 January 2005 16:58, Serge Hallyn wrote:
> > Attached is a first stab at setting loginuid through /proc/$$/loginuid.
> > Compiled and tested here.
>
> OK, spent some time looking at the patch & have some comments:
>
> line 66:
> + length = snprintf((char *)page, count, "%u",
> + audit_loginuid(task->audit_context));
>
> What if "audit_loginuid" returns a -1? How do we signify its not set. Besides,
> -1 & %u don't get along.
This I was wondering about. loginuid is a uid_t, which is
kernel_uid32_t, which is an unsigned int. So I have to ask
again: do we really want to use -1 as a default?
-serge
More information about the Linux-audit
mailing list