Subject: Re: bug#12954: Differences between 'su' version give different results

From: Ondrej Vasik <[email-masked]>
Date: Thu, 22 Nov 2012 10:51:23 +0100

On Wed, 2012-11-21 at 10:06 -0700, Eric Blake wrote:
> tag 12954 notabug
> thanks
> 
> On 11/21/2012 09:07 AM, ybronhei wrote:
> > Differences between 'su' version give different results in the following
> > shell script:
> 
> > over fedora 17 I run - coreutils 8.15-8: if the file is not accessible
> > by user the script prints no access, and the other way around.
> > over rhel 6.3 we run - coreutils 8.4: the result of func is always
> > "access" without any dependency of the file permissions.. My first guess
> > was that it returns 0 because the 'su' command was succeeded, but with
> > strace you see that the script runs differently.
> > 
> > Is it a bug?
> 
> Thanks for the report.  Perhaps it is a bug in the older coreutils 8.4
> that was fixed for coreutils 8.15, although a quick read through NEWS
> didn't find such a mention (only that 8.9 was the point at which
> upstream quit building su by default, and therefore Fedora 17 is using a
> non-default build in order to get su from coreutils 8.15).  Or it could
> be a patch that is applied to Fedora but not to RHEL.  Either way,

No such patch, but there was a big change in PAM RHEL/Fedora patch to
sync PAM support in SuSE and RHEL/Fedora. This may be the reason for the
difference. 

> upstream coreutils no longer maintains coreutils (newer distros, such as
> Fedora 18, use 'su' from util-linux); furthermore, upstream, we only
> focus on fixing current bugs, and not on backporting fixes to older
> releases.  So your question should be redirected downstream to your
> particular distro (that is, please file a support request with Red Hat),
> as it is not something we are worried about here.

Just to clarify, Fedora 18 still uses su from coreutils (and last
version of coreutils with su), the switch to util-linux su was done only
in Fedora Rawhide.

Yaniv, feel free to email me and Karel Zak ([email-masked] , maintainer
of util-linux) if you want to discuss the issue as the distro-related
thing.

Greetings,
         Ondrej Vasik