Bug 123032

Summary: daemon --user loose env variables
Product: [Fedora] Fedora Reporter: Andrea Gazzaniga <andrea.gazzaniga>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED DEFERRED QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: rvokal
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-30 20:35:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrea Gazzaniga 2004-05-11 16:10:50 UTC
Description of problem:

I have a deamon that rely on an environment variable, and I tried
to set it in a '/etc/sysconfig/mydaemon' script, read in by my
'/etc/init.d/mydaemon'.
Using the 'daemon --user' function, I loose the environment I just
set up, bacause of the 'su -c' command used.

Do you think is possible to make daemon() to call 'su -m -c' instead?
Is there any drawback?

Thanks,
Andrea


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

All

How reproducible:
Always

Steps to Reproduce:
1. export SOMEVAR='foobar'
2. daemon --user=you echo $SOMEVAR

3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Bill Nottingham 2005-09-30 20:35:18 UTC
Closing bugs on older, no longer supported, releases. Apologies for any lack of
response.

Please try to reproduce this on a current release, such as Fedora Core 4. If the
issue persists, please open a new issue. Note that this moves to a new mechanism
(runuser) to execute such commands.