OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: Re: Nonpriveleged daemons and pid files
From: Alfred Perlstein (brightwintelcom.net)
Date: Fri Feb 18 2000 - 03:01:04 CST


* Sheldon Hearn <sheldonhuunet.co.za> [000218 00:51] wrote:
>
> Since nobody else seems to have mentioned the solution I use, I'll
> describe it here.
>
> Quite simple really; I use /var/run/<daemon_name>/ for each
> non-priveledged daemon. I still haven't run into a daemon that could be
> configured to run non-priveledged but could not be configured to use an
> arbitrary run state directory. I suppose I'd run into more of them if I
> installed pre-compiled binaries. However, many fine daemons allow for
> run-time specification of the pid_file location.
>
> The drawback is that you don't have all your pid_files in one directory.
> However, if the daemon_name directory names are carefully chosen, it's
> not hard to find the pid_files with an ls command or even...
>
> kill -HUP `find /var/run -name exim.pid -exec cat {} \;`

You could have symlinks in /var/run/ point to pidfiles in
/var/run/<daemon_name>/<daemon_name>.pid that way accesses will
sorta fail with file not found if the pid isn't there. :)

-Alfred

To Unsubscribe: send mail to majordomoFreeBSD.org
with "unsubscribe freebsd-security" in the body of the message