Re: [PATCH V4 (was V6)] audit: use macros for unset inode and device values

From: Paul Moore
Date: Wed Aug 05 2015 - 16:23:17 EST


On Wed, Aug 5, 2015 at 3:38 PM, Richard Guy Briggs <rgb@xxxxxxxxxx> wrote:
> On 15/08/05, William Roberts wrote:
>> On Aug 1, 2015 12:44 PM, "Richard Guy Briggs" <rgb@xxxxxxxxxx> wrote:
>> >
>> > Signed-off-by: Richard Guy Briggs <rgb@xxxxxxxxxx>
>> > ---
>> > include/uapi/linux/audit.h | 2 ++
>> > kernel/audit.c | 2 +-
>> > kernel/audit_watch.c | 8 ++++----
>> > kernel/auditsc.c | 6 +++---
>> > 4 files changed, 10 insertions(+), 8 deletions(-)
>> >
>> > diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
>> > index d3475e1..971df22 100644
>> > --- a/include/uapi/linux/audit.h
>> > +++ b/include/uapi/linux/audit.h
>> > @@ -440,6 +440,8 @@ struct audit_tty_status {
>> > };
>> >
>> > #define AUDIT_UID_UNSET (unsigned int)-1
>> > +#define AUDIT_INO_UNSET (unsigned long)-1
>> > +#define AUDIT_DEV_UNSET (unsigned)-1
>>
>> Why unsigned int in one but unsigned in the other?
>
> It was based on one of the instances it was originally replacing (I
> can't find it now). It could be dev_t if it was moved out of uapi as
> Paul preferred, but I prefer unsigned int now that you point it out.

Once we move it out of the uapi header it should probably be (dev_t)-1.


--
paul moore
www.paul-moore.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/