[LTP] [RFC PATCH v3 10/10] ima: Print /proc/cmdline and IMA kernel config

Michael Moese mmoese@suse.de
Wed Apr 25 09:41:16 CEST 2018


Hi Petr,
 
On Tue, Apr 24, 2018 at 08:35:56PM +0200, Petr Vorel wrote:  
> +print_ima_config()
> +{
> +	local config="/boot/config-$(uname -r)"
Just a small remark here: not all distributions have /boot/config-* files
in place. I don't remember which ones this were.
Wouldn't it make sense to check this file, if it does not exist check
if /proc/config.gz is available? 
> +	local i
> +
> +	tst_res TINFO "/proc/cmdline: $(cat /proc/cmdline)"
> +
> +	if [ -r "$config" ]; then
> +		tst_res TINFO "IMA kernel config"
> +		for i in $(grep ^CONFIG_IMA $config); do
> +			tst_res TINFO "$i"
> +		done
> +	fi
> +}

Kind regards,
Michael

-- 
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)


More information about the ltp mailing list