Re: 'syslogd -u' and pidfile creation

Jan Schaumann <[email protected]>
Newsgroups gmane.os.netbsd.devel.userlevel
Message-ID <[email protected]>
Mouse <[email protected]> wrote:
> > [I]f you use 'syslogd -u user', then syslogd can't create a pidfile
> > because that is done post-setuid.
> 
> What is the intended use case for -u?

To run syslogd as an unprivileged user rather than as
root.  It starts up as root to open the log sockets,
then changes euid to the target user.

With this option, right now syslogd starts up, changes
euid, daemonizes and then silently fails to create the
pidfile.  This means that then "/etc/rc.d/syslogd
stop" will be unable to kill syslogd, and
"/etc/rc.d/syslogd restart" will start a second
instance.

-Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.