ujail: bug or feature ?

e9hack e9hack at gmail.com
Fri Mar 26 09:54:32 GMT 2021


Am 26.03.2021 um 10:17 schrieb Daniel Golle:
> On Fri, Mar 26, 2021 at 09:32:33AM +0100, e9hack wrote:
>> Hi,
>>
>> a program run by ujail gets a PID of 1. The real PID is different. If such a program generates a PID file by its own and the PID from that file is used by a script that is not run by ujail, then any operation will be performed with the wrong PID, which is the PID of /sbin/procd in the real world.
>>
>> Is this the expected behaviour?
> 
> Yes, this is expected behaviour as the program run by ujail ends up in
> a new PID namespace (so that it cannot "see" other running processes).
> If this presents a problem to your use-case, I can add an option to
> have a the process live in the root PID namespace instead (ie. trade
> some isolation for interoperatibility).
> 

I use a modified init script for dnsmasq and let dnsmasq generate the PID file. Another script is using this PID file and this doesn't work as I switched to ujail. I have changed it now. The PID file is generated via "procd_set_param pidfile ...".

>>
>> Regards,
>> Hartmut
>>
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel




More information about the openwrt-devel mailing list