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

Garrett Cooper yanegomi at gmail.com
Wed Jan 11 02:43:52 UTC 2012


On Tue, Jan 10, 2012 at 1:01 PM, Guy Helmer
<guy.helmer at palisadesystems.com> wrote:
> On Jan 6, 2012, at 12:00 AM, Garrett Cooper wrote:
>
>> On Thu, Jan 5, 2012 at 6:58 PM, Doug Barton <dougb at freebsd.org> 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?
>>
>>    As another aside, the file descriptor never has fcntl(,
>> FD_CLOEXEC) run on it, so it leaks the file descriptors across execs..
>> that's not good...
>
> I just added an fcntl(…, FD_CLOEXEC) call to pidfile_open() so this particular problem should be resolved.

I saw -- thanks!
-Garrett


More information about the svn-src-all mailing list