]> git.ipfire.org Git - thirdparty/pdns.git/commit
rec: Delay the creation of RPZ threads until we have dropped privileges 6984/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 13 Jul 2018 09:19:04 +0000 (11:19 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Fri, 21 Sep 2018 18:20:42 +0000 (20:20 +0200)
commit31d0cfaeda4a72ae7809950d2dc872bf267005de
tree1b1166bf9efbddc104b591ac8318baddef8a49a4
parent48f90ce524851b7890d79de9cc416922df9a921f
rec: Delay the creation of RPZ threads until we have dropped privileges

On Linux/glibc, calling `set*id()` from a thread results in the other
threads being sent the `SIGRT_1` signal so they are aware that they
should switch credentials too, because `POSIX` requires that all threads
use the same credentials but Linux actually handles it per thread.
The reception of the signal interrupts the current `syscall` with
`EINTR`, causing the loading of the `RPZ` zone to fail.

(cherry picked from commit e6ec15bfe4c391a51eab7c51c38307c7e009768f)
pdns/pdns_recursor.cc
pdns/rec-lua-conf.cc
pdns/rec-lua-conf.hh
pdns/rec_channel_rec.cc