Bug 123032 - daemon --user loose env variables
daemon --user loose env variables
Status: CLOSED DEFERRED
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-05-11 12:10 EDT by Andrea Gazzaniga
Modified: 2014-03-16 22:45 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-30 16:35:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Andrea Gazzaniga 2004-05-11 12:10:50 EDT
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 16:35:18 EDT
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.

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