mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-24 21:34:08 +03:00
core: refuse StateDirectory=private, as our internal DynamicUser=1 symlink is called that way
Let's better be safe than sorry.
This commit is contained in:
parent
0e960f9b5c
commit
e886568873
@ -3988,9 +3988,21 @@ int config_parse_exec_directories(
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!path_is_normalized(k) || path_is_absolute(k)) {
|
||||
if (!path_is_normalized(k)) {
|
||||
log_syntax(unit, LOG_ERR, filename, line, 0,
|
||||
"%s= path is not valid, ignoring assignment: %s", lvalue, rvalue);
|
||||
"%s= path is not normalized, ignoring assignment: %s", lvalue, rvalue);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (path_is_absolute(k)) {
|
||||
log_syntax(unit, LOG_ERR, filename, line, 0,
|
||||
"%s= path is absolute, ignoring assignment: %s", lvalue, rvalue);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (path_startswith(k, "private")) {
|
||||
log_syntax(unit, LOG_ERR, filename, line, 0,
|
||||
"%s= path can't be 'private', ingoring assignment: %s", lvalue, rvalue);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user