emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#12954: closed (Differences between 'su' version gi


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#12954: closed (Differences between 'su' version give different results)
Date: Wed, 21 Nov 2012 17:08:02 +0000

Your message dated Wed, 21 Nov 2012 10:06:09 -0700
with message-id <address@hidden>
and subject line Re: bug#12954: Differences between 'su' version give different 
results
has caused the debbugs.gnu.org bug report #12954,
regarding Differences between 'su' version give different results
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
12954: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12954
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Differences between 'su' version give different results Date: Wed, 21 Nov 2012 18:07:22 +0200 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121029 Thunderbird/16.0.2 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




--- End Message ---
--- Begin Message --- Subject: Re: bug#12954: Differences between 'su' version give different results Date: Wed, 21 Nov 2012 10:06:09 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121029 Thunderbird/16.0.2
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   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]