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

Petr Vorel
2021-01-29T14:37:19Z

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