Bug 521764 - runuser preferred to su -
Summary: runuser preferred to su -
Keywords:
Status: CLOSED DUPLICATE of bug 828804
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 530
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jan Pazdziora
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: 462714
TreeView+ depends on / blocked
 
Reported: 2009-09-08 09:13 UTC by Tomas Lestach
Modified: 2012-06-21 11:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-21 11:54:14 UTC


Attachments (Terms of Use)

Description Tomas Lestach 2009-09-08 09:13:29 UTC
Description of problem:
According to BZ#460547, all occurrences of "su -" shall be replaced by "runuser"

Version-Release number of selected component (if applicable):
Satellite-5.3.0-RHEL5-re20090820.1

How reproducible:
always

Steps to Reproduce:
1. grep -r "su -" ./<path-to-spacewalk-git-directory>
  
Results:
...
./backend/satellite_tools/spacewalk-debug:    /bin/su - oracle -c "/usr/bin/db-control report" > $DIR/db-control-report
./web/modules/dobby/scripts/db-control:  $cli->fatal("Error: please run this command as the $username user ('su - oracle').");
...

(Not all of the grep results have to be replaced.)

Additional info:
All necessary info in BZ#460547.

Comment 1 Miroslav Suchý 2012-03-17 18:37:35 UTC
Fixed in spacewalk.git commit 83d6be2bc585ae04178c12334c3b5d219335ca38

I left untouched:
monitoring/PerlModules/NP/Probe/rhn-runprobe:    print "Please 'su - nocpulse' to run this program as uid $1 may not run /opt/home/nocpulse/bin/runprobe.pl.\n";
monitoring/rhnmd/rhnmd.init.SUSE:SU="/bin/su -s /bin/bash - nocpulse -c"
monitoring/rhnmd/rhnmd.init.SUSE:               /bin/su -s /bin/bash -c "/usr/bin/ssh-keygen -q -t dsa -N '' -f $IDENTITY" - nocpulse
web/modules/dobby/scripts/db-control:  $cli->fatal("Error: please run this command as the $username user ('su - oracle').");

I did not changed those suse bits, because I'm not sure if SUSE has runuser.

I did not changed rest, because it may be run by ordinary user, while runuser is intended only for root.

Comment 3 Jan Pazdziora 2012-06-21 11:54:14 UTC
The fix 83d6be2bc585ae04178c12334c3b5d219335ca38 became obsolete by fix for bug 828804 where we removed the user switch altogether: 5474173de9555402c9175a016c2d1491404b81e0.

*** This bug has been marked as a duplicate of bug 828804 ***


Note You need to log in before you can comment on or make changes to this bug.