Re: syslogd fork+exec

2016-10-05 Thread Alexander Bluhm
On Sun, Oct 02, 2016 at 11:07:21PM +0200, Alexander Bluhm wrote: > On Sat, Oct 01, 2016 at 07:41:13PM +0200, Rafael Zalamena wrote: > > This could be replaced with "closefrom(4);". > > Updated diff: > - use closefrom(2) > - use execvp(3) to allow starting syslogd(8) without full path > - add a deb

Re: syslogd fork+exec

2016-10-02 Thread Alexander Bluhm
On Sat, Oct 01, 2016 at 07:41:13PM +0200, Rafael Zalamena wrote: > This could be replaced with "closefrom(4);". Updated diff: - use closefrom(2) - use execvp(3) to allow starting syslogd(8) without full path - add a debug message to make testing easier ok? bluhm Index: usr.sbin/syslogd/privsep.

Re: syslogd fork+exec

2016-10-01 Thread Rafael Zalamena
On Thu, Sep 29, 2016 at 08:09:23PM +0200, Alexander Bluhm wrote: > Hi, > > With this diff syslogd(8) does an exec on itself in the privileged > parent process to reshuffle its memory layout. > > As syslogd only forks once, it does not really matter wether we > fork+exec in the child or in the par

syslogd fork+exec

2016-09-29 Thread Alexander Bluhm
Hi, With this diff syslogd(8) does an exec on itself in the privileged parent process to reshuffle its memory layout. As syslogd only forks once, it does not really matter wether we fork+exec in the child or in the parent. To do it in the parent is easier as it has much less state. ok? bluhm