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

Paul Moore
2015-08-05T20:23:13Z

On Wed, Aug 5, 2015 at 3:38 PM, Richard Guy Briggs <rgb@redhat.com> wrote:
> On 15/08/05, William Roberts wrote:
>> On Aug 1, 2015 12:44 PM, "Richard Guy Briggs" <rgb@redhat.com> wrote:
>> >
>> > Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
>> > ---
>> > 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