]> git.ipfire.org Git - thirdparty/unbound.git/commit
Change file mode before changing file owner 600/head
authorPetr Mensik <pemensik@redhat.com>
Fri, 7 Jan 2022 11:01:28 +0000 (12:01 +0100)
committerPetr Mensik <pemensik@redhat.com>
Fri, 7 Jan 2022 11:08:32 +0000 (12:08 +0100)
commitc7f44b99e343820e50f9a09485d685fb22d357b8
tree7b161ac7c29ad56bdf74d10ff36a4a1142724f00
parent9bbbca5de9bcbbe30f1631d98b17c9bb3cc1c56c
Change file mode before changing file owner

Change mode first when configuring remote control unix socket. Some
security systems might strip capability of changing other user's system
even to process with effective uid 0. That is done on Fedora by SELinux
policy and systemd for example. SELinux audit then shows errors, because
unbound tries modifying permissions of not own file. Fix just by mode
change as first step, make it owned by unbound:unbound user as the last
step only.

Related: rhbz#1905441
daemon/remote.c