su does not work when /bin is before /usr/bin in PATH
This is a new install of Alpine edge, but I can reproduce this on my
v3.6 VM. If $PATH
has /bin
before
/usr/bin
, su
fails:
su: must be suid to work properly
We can see clearly using ls -l
:
lrwxrwxrwx 1 root root 12 Jun 11 02:02 /bin/su ->/bin/busybox
lrwxrwxrwx 1 root root 11 Jun 11 02:02 /usr/bin/su ->/bin/bbsuid
And apk info -W
:
/bin/su symlink target is owned by busybox-1.26.2-r7
/usr/bin/su symlink target is owned by busybox-suid-1.26.2-r7
Yet, confstr PATH
:
/bin:/usr/bin
Either /bin/su
should not be installed, or
busybox-suid
should be the one to install it.
(from redmine: issue id 7412, created on 2017-06-11, closed on 2017-06-11)