umask-util: add helper that resets umask until end of current code block

This commit is contained in:
Lennart Poettering
2021-11-12 16:01:40 +01:00
parent b0c4b28246
commit 52f05ef21d
4 changed files with 9 additions and 9 deletions
+1 -2
View File
@@ -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