summaryrefslogtreecommitdiff
path: root/src/basic/process-util.h
diff options
context:
space:
mode:
authorFranck Bui <fbui@suse.com>2020-04-03 10:00:25 +0200
committerFranck Bui <fbui@suse.com>2020-04-09 14:17:07 +0200
commit5e37d1930b41b24c077ce37c6db0e36c745106c7 (patch)
tree512fbc9fd7df783eca9a5d2e34ef9b506d64a09d /src/basic/process-util.h
parent4047a411f45e5e015126538902562416ed5aa5d3 (diff)
downloadsystemd-5e37d1930b41b24c077ce37c6db0e36c745106c7.tar.gz
pid1: by default make user units inherit their umask from the user manager
This patch changes the way user managers set the default umask for the units it manages. Indeed one can expect that if user manager's umask is redefined through PAM (via /etc/login.defs or pam_umask), all its children including the units it spawns have their umask set to the new value. Hence make user units inherit their umask value from their parent instead of the hard coded value 0022 but allow them to override this value via their unit file. Note that reexecuting managers with 'systemctl daemon-reexec' after changing UMask= has no effect. To take effect managers need to be restarted with 'systemct restart' instead. This behavior was already present before this patch. Fixes #6077.
Diffstat (limited to 'src/basic/process-util.h')
-rw-r--r--src/basic/process-util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/process-util.h b/src/basic/process-util.h
index 4160af45ba..ca9825293c 100644
--- a/src/basic/process-util.h
+++ b/src/basic/process-util.h
@@ -45,6 +45,7 @@ int get_process_cwd(pid_t pid, char **cwd);
int get_process_root(pid_t pid, char **root);
int get_process_environ(pid_t pid, char **environ);
int get_process_ppid(pid_t pid, pid_t *ppid);
+int get_process_umask(pid_t pid, mode_t *umask);
int wait_for_terminate(pid_t pid, siginfo_t *status);