Am Sonntag, 11. Mai 2014, 08:57:29 schrieb Marc Haber:
> >IMVHO opening a PAM session in an initscript is a bad idea from day
> >one, as you don't know which modules are being called, as it can create
> >bogus audit trails or cause other subtile issues.
> 
> Just curious as the maintainer of another package using su in an init
> script since 2001, how am I supposed to start a non-root process from
> an init script?

Hmmm, start-stop-daemon can take a user argument.

                output=$(start-stop-daemon --start --quiet --exec $DAEMON \
                        --oknodo --pidfile $PIDFILE --umask 027 --chuid dirmngr 
\
                        -- --daemon --sh) || return 1

works just well here and gives:

martin@merkaba:~> ps aux | head -1 ; ps aux | grep dirmngr | grep -v grep
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
dirmngr   1106  0.0  0.0  17412  1368 ?        Ss   Mai10   0:02 
/usr/bin/dirmngr --daemon --sh


For the record: I am not in disagreement of fixing this in dirmngr init script.

Ciao,
-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/2285690.2OTcgiLF2I@merkaba

Reply via email to