From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Moore Subject: Re: [PATCH V5] audit: use macros for unset inode and device values Date: Wed, 05 Aug 2015 17:53:17 -0400 Message-ID: <6956887.xCl3Q82COv@sifl> References: <4dbec928da0490e35bee7388e698845e70caa9ed.1438805802.git.rgb@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4dbec928da0490e35bee7388e698845e70caa9ed.1438805802.git.rgb@redhat.com> 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, linux-kernel@vger.kernel.org List-Id: linux-audit@redhat.com On Wednesday, August 05, 2015 04:19:09 PM Richard Guy Briggs wrote: > Clean up a number of places were casted magic numbers are used to represent > unset inode and device numbers in preparation for the audit by executable > path patch set. > > Signed-off-by: Richard Guy Briggs > --- > v5: Move macros from include/uapi/linux/audit.h to include/linux/audit.h > Use "unsigned int" rather than bare "unsigned". > > include/linux/audit.h | 3 +++ > kernel/audit.c | 2 +- > kernel/audit_watch.c | 8 ++++---- > kernel/auditsc.c | 6 +++--- > 4 files changed, 11 insertions(+), 8 deletions(-) > > diff --git a/include/linux/audit.h b/include/linux/audit.h > index c2e7e3a..48ae90c 100644 > --- a/include/linux/audit.h > +++ b/include/linux/audit.h > @@ -27,6 +27,9 @@ > #include > #include > > +#define AUDIT_INO_UNSET (unsigned long)-1 > +#define AUDIT_DEV_UNSET (unsigned int)-1 I suspect it was lost in the noise when I mentioned it on v4, but how about changing AUDIT_DEV_UNSET to "(dev_t)-1"? -- paul moore security @ redhat