lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 25 Oct 2013 14:33:24 -0400
From:	Richard Guy Briggs <rgb@...hat.com>
To:	Gao feng <gaofeng@...fujitsu.com>
Cc:	linux-audit@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] audit: remove useless code in audit_enable

On Thu, Oct 24, 2013 at 10:59:54AM +0800, Gao feng wrote:
> Since kernel parameter is operated before
> initcall, so the audit_initialized must be
> AUDIT_UNINITIALIZED or DISABLED in audit_enable.

Looks good, but should convert "printk(KERN_INFO " to "pr_info(".

> Signed-off-by: Gao feng <gaofeng@...fujitsu.com>
> ---
>  kernel/audit.c | 13 ++-----------
>  1 file changed, 2 insertions(+), 11 deletions(-)
> 
> diff --git a/kernel/audit.c b/kernel/audit.c
> index 50fdcba..b7269a4 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -927,17 +927,8 @@ static int __init audit_enable(char *str)
>  	if (!audit_default)
>  		audit_initialized = AUDIT_DISABLED;
>  
> -	printk(KERN_INFO "audit: %s", audit_default ? "enabled" : "disabled");
> -
> -	if (audit_initialized == AUDIT_INITIALIZED) {
> -		audit_enabled = audit_default;
> -		audit_ever_enabled |= !!audit_default;
> -	} else if (audit_initialized == AUDIT_UNINITIALIZED) {
> -		printk(" (after initialization)");
> -	} else {
> -		printk(" (until reboot)");
> -	}
> -	printk("\n");
> +	printk(KERN_INFO "audit: %s\n", audit_default ?
> +		"enabled (after initialization)" : "disabled (until reboot)");
>  
>  	return 1;
>  }

- RGB

--
Richard Guy Briggs <rbriggs@...hat.com>
Senior Software Engineer
Kernel Security
AMER ENG Base Operating Systems
Remote, Ottawa, Canada
Voice: +1.647.777.2635
Internal: (81) 32635
Alt: +1.613.693.0684x3545
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ