diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-11-12 11:06:46 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-11-12 16:01:40 +0100 |
commit | 52f05ef21d7790f37bc3cd6e54fb9a4bcb16efa5 (patch) | |
tree | 52a9ead4db8ae30d8b4cf69b0e19e39c9fbc37c4 /src/shared/dev-setup.c | |
parent | b0c4b2824693fe6a27ea9439ec7a6328a0e23704 (diff) | |
download | systemd-52f05ef21d7790f37bc3cd6e54fb9a4bcb16efa5.tar.gz |
umask-util: add helper that resets umask until end of current code block
Diffstat (limited to 'src/shared/dev-setup.c')
-rw-r--r-- | src/shared/dev-setup.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/shared/dev-setup.c b/src/shared/dev-setup.c index c3e717ae11..0390abbfdc 100644 --- a/src/shared/dev-setup.c +++ b/src/shared/dev-setup.c @@ -81,13 +81,12 @@ int make_inaccessible_nodes( { "inaccessible/blk", S_IFBLK | 0000 }, }; - _unused_ _cleanup_umask_ mode_t u; int r; if (!parent_dir) parent_dir = "/run/systemd"; - u = umask(0000); + BLOCK_WITH_UMASK(0000); /* Set up inaccessible (and empty) file nodes of all types. This are used to as mount sources for over-mounting * ("masking") file nodes that shall become inaccessible and empty for specific containers or services. We try |