Re: svn commit: r229667 - head/usr.sbin/daemon

[ Available lists | Index of svn-src-head | Month of Jan 2012 | Week of 6 Jan 2012 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Guy Helmer <guy.helmer@palisadesystems.com>
Date
6 Jan 2012 16:49:43
Subject
Re: svn commit: r229667 - head/usr.sbin/daemon
Message-ID
C1CE4875-6FD5-4A3F-AB6A-64C0573C29AE@palisadesystems.com


[ Hide this part ]
On Jan 5, 2012, at 8:58 PM, Doug Barton wrote:

> On 01/05/2012 14:48, Guy Helmer wrote:
>> Allow daemon(8) to run pidfile_open() before relenquishing privileges
>> so pid files can be written in /var/run when started as root.
>
> I'm not sure how useful this is since when daemon is exiting it won't be
> able to remove the pid file (unless I'm missing something).
>
> Isn't it better to pre-create the pid file with the proper permissions
> for the unprivileged user?
>

Would it be OK for daemon to hang around and wait for the child process to exit, then remove the pid file?

The only other alternative I see would be to create a subdirectory that is writable by the user so the child can create and delete the pid file.

Guy--------
This message has been scanned by ComplianceSafe, powered by Palisade's PacketSure.

Elapsed time: 0.227 seconds