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


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

Reply via email to