]> git.ipfire.org Git - thirdparty/systemd.git/commit
namespace: make whole namespace_setup() work regardless of configured umask
authorLennart Poettering <lennart@poettering.net>
Fri, 12 Nov 2021 10:11:27 +0000 (11:11 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 12 Nov 2021 15:02:17 +0000 (16:02 +0100)
commitcdf42f9bd40ff21a67d58b948efea055d56ad398
tree8f4507a6ef9b8f71d5e8ae40acfc48793dd624d3
parentd73020f2420aa3f220481016829aaa2602abf081
namespace: make whole namespace_setup() work regardless of configured umask

Let's reset the umask during the whole namespace_setup() logic, so that
all our mkdir() + mknod() are not subjected to whatever umask might
currently be set.

This mostly moves the umask save/restore logic out of
mount_private_dev() and into the stack frame of namespace_setup() that
is further out.

Fixes #19899
src/core/namespace.c