]> granicus.if.org Git - pdns/commit
rec: Delay the creation of RPZ threads until we have dropped privileges
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 13 Jul 2018 09:19:04 +0000 (11:19 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 13 Jul 2018 09:19:04 +0000 (11:19 +0200)
commite6ec15bfe4c391a51eab7c51c38307c7e009768f
treed26d953cec1fc3c98694b74a6ed9bc63f10efd61
parentdd2225fa92ec7fdca195f1668ea47c96417d1fac
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.
pdns/pdns_recursor.cc
pdns/rec-lua-conf.cc
pdns/rec-lua-conf.hh
pdns/rec_channel_rec.cc