lkml.org 
[lkml]   [2014]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] audit: Convert int limit uses to u32
From
Date
On Tue, 2014-01-14 at 10:33 -0800, Joe Perches wrote:
> The equivalent uapi struct uses __u32 so make the kernel
> uses u32 too.
>
> This can prevent some oddities where the limit is
> logged/emitted as a negative value.
>
> Convert kstrtol to kstrtouint to disallow negative values.


> diff --git a/kernel/audit.c b/kernel/audit.c
> index f397ab2..902c3aa 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -79,16 +79,16 @@ static int audit_initialized;
> #define AUDIT_OFF 0
> #define AUDIT_ON 1
> #define AUDIT_LOCKED 2
> -int audit_enabled;
> -int audit_ever_enabled;
> +u32 audit_enabled;
> +u32 audit_ever_enabled;
>
> EXPORT_SYMBOL_GPL(audit_enabled);
>
> /* Default state when kernel boots without any parameters. */
> -static int audit_default;
> +u32 audit_default;

Can't figure out why you dropped the static...
I'm putting it back.

>
> /* If auditing cannot proceed, audit_failure selects what happens. */
> -static int audit_failure = AUDIT_FAIL_PRINTK;
> +static u32 audit_failure = AUDIT_FAIL_PRINTK;
>
> /*
> * If audit records are to be written to the netlink socket, audit_pid




\
 
 \ /
  Last update: 2014-01-14 21:01    [W:1.582 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site