diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-02-09 11:58:39 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-02-09 13:17:58 +0100 |
commit | 6732edab4eff2f656690681bc37595a59470e4a1 (patch) | |
tree | e062b027c34ceda274c0e8a46408709a43ff4ffb /src/shared/uid-range.h | |
parent | 23deef88b9bb020c87c8b4ad30113a4f97445a1a (diff) |
execute: set working directory to /root if User= is not set, but WorkingDirectory=~ is
Or actually, try to to do the right thing depending on what is
available:
- If we know $HOME from User=, then use that.
- If the UID for the service is 0, hardcode that WorkingDirectory=~ means WorkingDirectory=/root
- In any other case (which will be the unprivileged --user case), use
get_home_dir() to find the $HOME of the user we are running as.
- Otherwise fail.
Fixes: #5246 #5124
Diffstat (limited to 'src/shared/uid-range.h')
0 files changed, 0 insertions, 0 deletions