Re: [PATCH] BUG/MINOR: init: fix set-dumpable when using uid/gid

2019-11-19 Thread Willy Tarreau
On Tue, Nov 19, 2019 at 10:11:36AM +0100, William Dauchy wrote: > Here is the backport for haproxy-20 tree. Now merged, thanks William. Willy

Re: [PATCH] BUG/MINOR: init: fix set-dumpable when using uid/gid

2019-11-19 Thread William Dauchy
Hi, On Tue, Nov 19, 2019 at 02:42:23PM +0500, Илья Шипицин wrote: > small question. > `/proc/sys/fs/suid_dumpable` is linux specific. will it work under freebsd, > openbsd ? windows ? > also, linux might not mount that filesystem. will it work ? this code is protected around USE_PRCTL define,

Re: [PATCH] BUG/MINOR: init: fix set-dumpable when using uid/gid

2019-11-19 Thread Илья Шипицин
вт, 19 нояб. 2019 г. в 14:15, William Dauchy : > in mworker mode used with uid/gid settings, it was not possible to get > a coredump despite the set-dumpable option. > indeed prctl(2) manual page specifies the dumpable attribute is reverted > to `/proc/sys/fs/suid_dumpable` in a few conditions

Re: [PATCH] BUG/MINOR: init: fix set-dumpable when using uid/gid

2019-11-17 Thread Willy Tarreau
On Sun, Nov 17, 2019 at 10:54:08AM +, William Dauchy wrote: > Yes, there are different cases; I was able to reproduce it only with the > mworker mode (-W or -Ws); indeed we currently do setuid in this order: > -> global.mode & (MODE_MWORKER|MODE_DAEMON) > -> setuid/setgid > -> set dumpable >

Re: [PATCH] BUG/MINOR: init: fix set-dumpable when using uid/gid

2019-11-17 Thread William Dauchy
Hi Willy, Thank you for the quick ansswer. On Sun, Nov 17, 2019 at 11:12:29AM +0100, Willy Tarreau wrote: > That's strange, I was absolutely certain it was done after the setuid > stuff precisely for the reason you explain above. Do you think the > sequence differs in master-worker mode maybe ?

Re: [PATCH] BUG/MINOR: init: fix set-dumpable when using uid/gid

2019-11-17 Thread Willy Tarreau
Hi William, On Sun, Nov 17, 2019 at 10:26:23AM +0100, William Dauchy wrote: > in mworker mode used with uid/gid settings, it was not possible to get > a coredump despite the set-dumpable option. > indeed prctl(2) manual page specifies the dumpable attribute is reverted > to