New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rec: Delay the creation of RPZ threads until we have dropped privileges #6984

Merged
merged 1 commit into from Sep 25, 2018

Conversation

Projects
None yet
2 participants
@Habbie
Member

Habbie commented Sep 21, 2018

This is a backport of #6792.

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 e6ec15b)

Short description

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)
  • checked that this code was merged to master
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 e6ec15b)

@Habbie Habbie added rec defect labels Sep 21, 2018

@Habbie Habbie added this to the rec-4.1.x milestone Sep 21, 2018

@Habbie Habbie requested a review from rgacogne Sep 21, 2018

@Habbie

This comment has been minimized.

Member

Habbie commented Sep 21, 2018

@rgacogne rgacogne merged commit 4cd5af0 into PowerDNS:rel/rec-4.1.x Sep 25, 2018

3 of 4 checks passed

LGTM analysis: C/C++ Analysis Failed (could not build the merge commit)
Details
LGTM analysis: JavaScript No alert changes
Details
LGTM analysis: Python No alert changes
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment