diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/dbus.c | 2 | ||||
-rw-r--r-- | src/core/main.c | 2 | ||||
-rw-r--r-- | src/core/manager.c | 6 | ||||
-rw-r--r-- | src/core/namespace.c | 8 | ||||
-rw-r--r-- | src/core/unit.c | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/core/dbus.c b/src/core/dbus.c index 0bf2391b03..c6024a061e 100644 --- a/src/core/dbus.c +++ b/src/core/dbus.c @@ -941,7 +941,7 @@ int bus_init_private(Manager *m) { if (fd < 0) return log_error_errno(errno, "Failed to allocate private socket: %m"); - RUN_WITH_UMASK(0077) + WITH_UMASK(0077) r = bind(fd, &sa.sa, sa_len); if (r < 0) return log_error_errno(errno, "Failed to bind private socket: %m"); diff --git a/src/core/main.c b/src/core/main.c index 9c1de3624c..25a558b6cf 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1376,7 +1376,7 @@ static int write_container_id(void) { if (isempty(c)) return 0; - RUN_WITH_UMASK(0022) + WITH_UMASK(0022) r = write_string_file("/run/systemd/container", c, WRITE_STRING_FILE_CREATE); if (r < 0) return log_warning_errno(r, "Failed to write /run/systemd/container, ignoring: %m"); diff --git a/src/core/manager.c b/src/core/manager.c index 598604d694..e9b7b26160 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -1103,7 +1103,7 @@ static int manager_setup_cgroups_agent(Manager *m) { (void) sockaddr_un_unlink(&sa.un); /* Only allow root to connect to this socket */ - RUN_WITH_UMASK(0077) + WITH_UMASK(0077) r = bind(fd, &sa.sa, SOCKADDR_UN_LEN(sa.un)); if (r < 0) return log_error_errno(errno, "bind(%s) failed: %m", sa.un.sun_path); @@ -3674,7 +3674,7 @@ static int manager_run_environment_generators(Manager *m) { if (!generator_path_any((const char* const*) paths)) return 0; - RUN_WITH_UMASK(0022) + WITH_UMASK(0022) r = execute_directories((const char* const*) paths, DEFAULT_TIMEOUT_USEC, gather_environment, args, NULL, m->transient_environment, EXEC_DIR_PARALLEL | EXEC_DIR_IGNORE_ERRORS | EXEC_DIR_SET_SYSTEMD_EXEC_PID); @@ -3776,7 +3776,7 @@ static int manager_run_generators(Manager *m) { goto finish; } - RUN_WITH_UMASK(0022) + WITH_UMASK(0022) (void) execute_directories( (const char* const*) paths, DEFAULT_TIMEOUT_USEC, diff --git a/src/core/namespace.c b/src/core/namespace.c index 4920716f34..7082cd19d8 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -2708,7 +2708,7 @@ static int make_tmp_prefix(const char *prefix) { if (errno != ENOENT) return -errno; - RUN_WITH_UMASK(000) + WITH_UMASK(000) r = mkdir_parents(prefix, 0755); if (r < 0) return r; @@ -2765,7 +2765,7 @@ static int setup_one_tmp_dir(const char *id, const char *prefix, char **path, ch if (r < 0) return r; - RUN_WITH_UMASK(0077) + WITH_UMASK(0077) if (!mkdtemp(x)) { if (errno == EROFS || ERRNO_IS_DISK_SPACE(errno)) rw = false; @@ -2778,7 +2778,7 @@ static int setup_one_tmp_dir(const char *id, const char *prefix, char **path, ch if (!y) return -ENOMEM; - RUN_WITH_UMASK(0000) + WITH_UMASK(0000) if (mkdir(y, 0777 | S_ISVTX) < 0) return -errno; @@ -2792,7 +2792,7 @@ static int setup_one_tmp_dir(const char *id, const char *prefix, char **path, ch /* Trouble: we failed to create the directory. Instead of failing, let's simulate /tmp being * read-only. This way the service will get the EROFS result as if it was writing to the real * file system. */ - RUN_WITH_UMASK(0000) + WITH_UMASK(0000) r = mkdir_p(RUN_SYSTEMD_EMPTY, 0500); if (r < 0) return r; diff --git a/src/core/unit.c b/src/core/unit.c index b052402cfb..b7cca3e287 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -4469,7 +4469,7 @@ int unit_make_transient(Unit *u) { /* Let's open the file we'll write the transient settings into. This file is kept open as long as we are * creating the transient, and is closed in unit_load(), as soon as we start loading the file. */ - RUN_WITH_UMASK(0022) { + WITH_UMASK(0022) { f = fopen(path, "we"); if (!f) return -errno; |