[Fedora-packaging] commands under privileged users' path

Mamoru Tasaka mtasaka at ioa.s.u-tokyo.ac.jp
Fri Aug 24 06:31:32 UTC 2007


Ville Skyttä wrote, at 08/24/2007 04:10 AM +9:00:
> On Thursday 23 August 2007, Mamoru Tasaka wrote:
> 
>> IMO this will cause 
>> a problem when "yum update" or "rpm -ivh" is done by normal
>> users using "su -c" or "sudo" because normal users usually
>> don't have /usr/sbin in their path.
> 
> rpm ensures that it is there.  More specifically, it sets this for all 
> scriptlets (based on rpm hg sources, lib/psm.c):
> 
> static char * SCRIPT_PATH 
> = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin";
> 
> Have you actually tested and found that the problem you describe exists in 
> some scenarios?  I do rpm/smart/yum operations from a "sudo -s" shell all the 
> time (no /usr/sbin in PATH there), and have not encountered any problems like 
> this.

Thank you for clarifying this. As I have always met with umask (permission)
problem on the directories not properly owned, I was thinking that scriptlet
path _may_ also have similar problems.

Mamoru




More information about the Fedora-packaging mailing list