[LTP] [PATCH] quota_remount_test01: update to new API

Petr Vorel pvorel@suse.cz
Fri Jan 29 15:37:19 CET 2021


Hi Li, Jan,

> +	# some distros (CentOS 6.x, for example) doesn't permit creating
> +	# of quota files in a directory with SELinux file_t type
Could you please check if this is still relevant?
If yes, would be enough to detect this case with tst_selinux_enabled
(from tst_security.sh)? I.e. considering only SELinux in enforce mode
(detecting with /sys/fs/selinux/enforce or /selinux/enforce).

> +	if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
> +		chcon -t tmp_t $MNTDIR || tst_brk TFAIL "Could not change SELinux file type"
> +		tst_res TINFO "Successfully changed SELinux file type"
> +	fi

Kind regards,
Petr


More information about the ltp mailing list