On Sat, Jan 16, 2016 at 11:40:35AM +0100, Landry Breuil wrote: > Hi, > > playing with ldapd, i noticed that upon exit, the child process (ldape) > is aborted by pledge: > > ldapd(10229): syscall 10 "cpath" > > and /var/run/ldapi / ldapd.sock are left behind. > > ktracing and looking at the code, it seems control_cleanup in > control.c:117 tries to unlink the control socket, and i havent found yet > the code that tries to remove the listening ldapi socket (i think > there's none). > > Interestingly, adding cpath to the pledge() call in ldape.c makes the > abort go away, but the two sockets are still left behind.. so i'm not > sure this is the right way to go, and there's probably more to do.
Thinking more about it (after more coffee), the child process can't unlink those socks since it has chroot'ed.. so the cleanup has to be done by the parent process. Landry
