Bug 123032 - daemon --user loose env variables
Summary: daemon --user loose env variables
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-05-11 16:10 UTC by Andrea Gazzaniga
Modified: 2014-03-17 02:45 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-30 20:35:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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