Bug 772073

Summary: RFE: before spawning a process log the actual argv[] after replacing specifiers and env vars
Product: [Fedora] Fedora Reporter: Philip Prindeville <philipp>
Component: systemdAssignee: systemd-maint
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 18CC: harald, johannbg, lpoetter, metherid, mschmidt, notting, philipp, plautrba, systemd-maint
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-05 23:15:26 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:
Bug Depends On:    
Bug Blocks: 784611    

Description Philip Prindeville 2012-01-05 21:27:04 UTC
Description of problem:

See the referenced proftpd bug for more background on this.

The line:

EnvironmentFile = -/etc/sysconfig/proftpd

was found to be ignored, but not logged as an error.  Further, during the debugging process it could not be determined easily if the proftpd was being invoked with the $PROFTPD_OPTIONS coming from the referenced /etc/sysconfig/proftpd file or from the value specified on the preceding line:

Environment = PROFTPD_OPTIONS=

because the program in question obliterated its argv[] vector, so it wasn't available to 'ps'.

Highly recommend that (1) an error be indicated for lines that are not correctly parsed and (2) an option be added to capture the actual exec()'d line post variable substitution as well.


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

37-3

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Michal Schmidt 2012-01-05 21:40:10 UTC
I cannot reproduce the problem. Using a simple hello.service:

[Unit]
Description = Parametrized Hello

[Service]
Type = oneshot
Environment = HELLO_ARGS=
EnvironmentFile = -/etc/sysconfig/hello
ExecStart = /bin/echo $HELLO_ARGS


And /etc/sysconfig/hello:
HELLO_ARGS="Hello world"

Running the service results in "Hello world" in /var/log/messages as expected.

Comment 2 Philip Prindeville 2012-01-05 22:27:31 UTC
(In reply to comment #1)
> I cannot reproduce the problem. [snip]

Then something else was causing it to ignore the contents of the sysconfig/ file, but it's not clear how to go about root-causing this.

Comment 3 Michal Schmidt 2012-01-09 11:51:42 UTC
In bug 772063 Paul Howarth cannot reproduce the whitespace problem either.

There's no bug to fix here, unless someone can clearly demonstrate the problem by changing whitespace in the unit file and nothing else.

I'm changing this to an RFE. systemd could at least log_debug the actual arguments.

Comment 4 Lennart Poettering 2012-01-12 14:49:04 UTC
(In reply to comment #0)
> Description of problem:
> 
> See the referenced proftpd bug for more background on this.
> 
> The line:
> 
> EnvironmentFile = -/etc/sysconfig/proftpd
> 
> was found to be ignored, but not logged as an error. 

By prepending the file name with "-" you explicitly turned off error logging for this. Drop the "-" and an error will be generated.

Comment 5 Lennart Poettering 2012-03-13 01:57:08 UTC
OK, closing, since there appears to be no bug to fix here.

Comment 6 Philip Prindeville 2012-03-13 02:03:57 UTC
(In reply to comment #3)
> In bug 772063 Paul Howarth cannot reproduce the whitespace problem either.
> 
> There's no bug to fix here, unless someone can clearly demonstrate the problem
> by changing whitespace in the unit file and nothing else.
> 
> I'm changing this to an RFE. systemd could at least log_debug the actual
> arguments.

Sorry, I thought we were all on the same page with Michal's suggestion: log the actual arguments.

Comment 7 Lennart Poettering 2012-10-30 21:43:12 UTC
*** Bug 812556 has been marked as a duplicate of this bug. ***

Comment 8 Fedora End Of Life 2013-01-17 00:25:16 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 9 Harald Hoyer 2013-04-10 09:53:29 UTC
sent patch to ML 
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010293.html

Comment 10 Harald Hoyer 2013-04-17 09:09:29 UTC
commit 03bb799e0b3560dca8c9b70de3dbadb0c281b36f

Comment 11 Fedora End Of Life 2013-12-21 15:38:15 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Fedora End Of Life 2014-02-05 23:15:26 UTC
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.