On 2023-10-21 14:49 +03, Kapetanakis Giannis <[email protected]> wrote:
> Rev 1.140 by florian@ seems to have changed that.
>
> Do not try to unlink the control socket in an unprivileged child
> process on shutdown.
> Found while working ontame(2) <http://man.openbsd.org/tame.2>.
> OK benno@
>
Which was 8 years ago. I don't understand why you see a change in 7.4.
Anyway, we decided to not clean up control sockets in any of our
privsep daemons because leaving them behind does not cause any issues.
> G
>
>
> On 21/10/2023 14:41, Kapetanakis Giannis wrote:
>> After 7.4 relayd does not unlink it's socket
>>
>> I've added the following but it's probably not enough. unveil?
>>
>> G
>>
>> Index: relayd.c
>> ===================================================================
>> RCS file: /cvs/src/usr.sbin/relayd/relayd.c,v
>> retrieving revision 1.191
>> diff -u -p -r1.191 relayd.c
>> --- relayd.c 25 Jun 2023 08:07:38 -0000 1.191
>> +++ relayd.c 21 Oct 2023 11:39:44 -0000
>> @@ -382,6 +382,8 @@ parent_shutdown(struct relayd *env)
>> free(env->sc_ps);
>> free(env);
>>
>> + unlink(env->sc_ps->ps_csock.cs_name);
>> +
>> log_info("parent terminating, pid %d", getpid());
>>
>> exit(0);
>>
>
--
In my defence, I have been left unsupervised.