Bug 203010 - RFE: allow daemon() in /etc/init.d/functions to pass -m to /sbin/runuser
RFE: allow daemon() in /etc/init.d/functions to pass -m to /sbin/runuser
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
rawhide
All Linux
medium Severity low
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
: FutureFeature
: 203011 (view as bug list)
Depends On:
Blocks: 564093 564105
  Show dependency treegraph
 
Reported: 2006-08-17 15:23 EDT by Japheth Cleaver
Modified: 2014-03-16 23:01 EDT (History)
1 user (show)

See Also:
Fixed In Version: initscripts-9.09-1.fc13
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 564093 (view as bug list)
Environment:
Last Closed: 2010-02-11 15:52:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Japheth Cleaver 2006-08-17 15:23:09 EDT
Description of problem:
When running the daemon() function from an initscript and using the "--user" 
option, daemon will run "/sbin/runuser" to execute. This command clears the 
environment by default unless the -m or -p arguments are given. This can create 
a problem because some initscripts set environment variables for their 
programs' use.


Version-Release number of selected component (if applicable):
FC5+

How reproducible:
Always.

Steps to Reproduce:
1. Export a variable in an initscript which sources /etc/init.d/functions
2. call a program using the "daemon --user BLAH program" syntax
  
Actual results:
The variable you exported will not be present in the program's environment.

Expected results:
That the variable would be available, yo, regardless of the fact that we're 
switching users.
Comment 1 Japheth Cleaver 2006-08-17 15:26:02 EDT
*** Bug 203011 has been marked as a duplicate of this bug. ***
Comment 2 Japheth Cleaver 2006-08-17 15:38:12 EDT
This is identical to Bug 123032, which was closed.
Comment 3 Jon Stanley 2008-04-23 16:28:50 EDT
Adding FutureFeature keyword to RFE's.
Comment 4 Japheth Cleaver 2009-03-24 18:05:56 EDT
Any thoughts on this bug/feature? Given the lack of documentation, it seems like a simple declaration that daemon() no longer clears the environment would be sufficient; then add '-m' to the relevant line.


if [ -z "$user" ]; then
     $nice /bin/bash -c "$corelimit >/dev/null 2>&1 ; $*"
else
     $nice runuser -s /bin/bash - $user -c "$corelimit >/dev/null 2>&1 ; $*"
fi
Comment 5 Bill Nottingham 2010-02-11 15:51:55 EST
Wow, apologies. I let this sit a long time.

http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=89183909b2965e6bc2991b2512161414d2028be8

Will be in future rawhide releases, and F13.
Comment 6 Fedora Update System 2010-04-09 16:13:24 EDT
mdadm-3.1.2-9.fc13,initscripts-9.09-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/mdadm-3.1.2-9.fc13,initscripts-9.09-1.fc13
Comment 7 Fedora Update System 2010-04-27 23:09:05 EDT
initscripts-9.09-1.fc13, mdadm-3.1.2-10.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

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