Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 18430

Summary: WRAPPER support in start-stop-daemon
Product: Gentoo Linux Reporter: Joshua Brindle (RETIRED) <method>
Component: [OLD] Core systemAssignee: Zach Welch (RETIRED) <zwelch>
Status: RESOLVED LATER    
Severity: normal CC: azarah, natey, pebenito, tdickenson
Priority: High    
Version: 1.4_rc2   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Joshua Brindle (RETIRED) gentoo-dev 2003-03-29 11:20:58 UTC
we need to be able to specify a wrapper in an environment variable 
in /etc/conf.d/whatever to cause start-stop-daemon to run the daemon under the 
wrapper. 
for example WRAPPER="systrace -a" for systrace or WRAPPER="run_init" for 
selinux
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-04-08 09:56:11 UTC
Zack, mind having a look?  I think this might be a bit beyond my C skills.
Comment 2 Zach Welch (RETIRED) gentoo-dev 2003-04-08 17:12:48 UTC
Martin, I talked with Method and pebenito in irc, and I'll happily take this one
off your todo list.
Comment 3 Zach Welch (RETIRED) gentoo-dev 2003-04-08 17:15:02 UTC
Now just waiting for the clear requirements to be posted here, seems there
was still some confusion on exactly what is required here.
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2003-04-08 17:52:19 UTC
Lets say we have an env var SSD_WRAPPER.  Check main() ... just before it
does the exec(whatever), it must:

1)  break SSD_WRAPPER up in parts (if applicable), meaning binary and flags
    ('strace -a' for instance).

2)  Change argv to have argv[0] the binary in SSD_WRAPPER, and move all the
    original stuff in argv up to make space for stuff in SSD_WRAPPER.

3)  Now do the exec(whatever).

Should be a simplification.
Comment 5 Zach Welch (RETIRED) gentoo-dev 2003-05-09 17:32:22 UTC
Method and I decided to put this on the deep back burner for now.