rapido-linux / rapido

Quickly test Linux kernel changes
GNU Lesser General Public License v2.1
22 stars 22 forks source link

su failing for fstests #224

Closed ddiss closed 1 year ago

ddiss commented 1 year ago

As a follow up to https://github.com/rapido-linux/rapido/issues/171 it appears that su is failing on SLE15-SP5. A bit of stracing shows that it's due to a missing /etc/security/limits.conf file.

Werkov commented 1 year ago

I think the kernel tests could do with plain setpriv (from util-linux) without the complexity of su and PAM configuration.

ddiss commented 1 year ago

I think the kernel tests could do with plain setpriv (from util-linux) without the complexity of su and PAM configuration.

Unfortunately a PAM setup is needed for xfstests, which does things like echo $cmd | su $user. https://github.com/rapido-linux/rapido/pull/203 added most of the functionality, but I didn't see any problems with a missing /etc/security/limits.conf back then.

pevik commented 1 year ago

I wonder if the rest of xfstests community is ok with su setup and would not complain about setpriv, because replacement with sed/awk would be simple.

ddiss commented 1 year ago

I wonder if the rest of xfstests community is ok with su setup and would not complain about setpriv, because replacement with sed/awk would be simple.

I expect su use is a relic that goes back to the days of Irix xfs support. I'll a look at what's needed for setpriv, but will submit the straightforward PAM fix here first.

Werkov commented 1 year ago

I didn't notice su is so long used in xfstests.

It's a terrible archaeology, there was no PAM in su (and maybe no PAM at all) at xfs su introduction. PAM to su was ~added in 2010~ floating around since 2003 to reduce fascism(?).

So maybe just add few/edit PAM configs into initrd and be done with this.

ddiss commented 1 year ago

Fixed via 5bf090745c7cd013d57c8e18ffc7937761661ace .