summaryrefslogtreecommitdiff
path: root/src/shared/dev-setup.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-11-12 11:06:46 +0100
committerLennart Poettering <lennart@poettering.net>2021-11-12 16:01:40 +0100
commit52f05ef21d7790f37bc3cd6e54fb9a4bcb16efa5 (patch)
tree52a9ead4db8ae30d8b4cf69b0e19e39c9fbc37c4 /src/shared/dev-setup.c
parentb0c4b2824693fe6a27ea9439ec7a6328a0e23704 (diff)
downloadsystemd-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.c3
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