GNU bug report logs -
#12954
Differences between 'su' version give different results
Previous Next
Reported by: ybronhei <ybronhei <at> redhat.com>
Date: Wed, 21 Nov 2012 16:52:01 UTC
Severity: normal
Tags: notabug
Done: Eric Blake <eblake <at> redhat.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12954 in the body.
You can then email your comments to 12954 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#12954
; Package
coreutils
.
(Wed, 21 Nov 2012 16:52:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
ybronhei <ybronhei <at> redhat.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Wed, 21 Nov 2012 16:52:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Differences between 'su' version give different results in the following
shell script:
# !/bin/sh
func() {
su user > /dev/null 2>&1 << EOF
echo >> /tmp/b
EOF
}
if func; then
echo "access"
else
echo "no access"
fi
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.
--
Yaniv Bronhaim.
RedHat, Israel
09-7692289
054-7744187
Added tag(s) notabug.
Request was from
Eric Blake <eblake <at> redhat.com>
to
control <at> debbugs.gnu.org
.
(Wed, 21 Nov 2012 17:08:01 GMT)
Full text and
rfc822 format available.
Reply sent
to
Eric Blake <eblake <at> redhat.com>
:
You have taken responsibility.
(Wed, 21 Nov 2012 17:08:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
ybronhei <ybronhei <at> redhat.com>
:
bug acknowledged by developer.
(Wed, 21 Nov 2012 17:08:02 GMT)
Full text and
rfc822 format available.
Message #12 received at 12954-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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,
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.
I'm closing this bug report because there is nothing further to do
upstream; but obviously the issue is real for your setup, and you should
feel free to send further replies if you have more questions and/or file
a downstream bug and want to post the results of that downstream bug
resolution back to this list.
--
Eric Blake eblake <at> redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#12954
; Package
coreutils
.
(Thu, 22 Nov 2012 08:41:02 GMT)
Full text and
rfc822 format available.
Message #15 received at 12954 <at> debbugs.gnu.org (full text, mbox):
Hey,
I would like to have a fix for that issue (as it was fixed in newer
versions), I want to merge it to the current version of rhel6.3
(coreutils-8.4-19.el6.x86_64)
Please update me.
Thanks.
--
Yaniv Bronhaim.
RedHat, Israel
09-7692289
054-7744187
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#12954
; Package
coreutils
.
(Thu, 22 Nov 2012 09:53:03 GMT)
Full text and
rfc822 format available.
Message #18 received at 12954-done <at> debbugs.gnu.org (full text, mbox):
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 (kzak <at> redhat.com , maintainer
of util-linux) if you want to discuss the issue as the distro-related
thing.
Greetings,
Ondrej Vasik
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 20 Dec 2012 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 180 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.