mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-24 21:34:08 +03:00
core: log when we convert from DynamicUser=1 to =0 or vice versa
This commit is contained in:
parent
9a02707561
commit
cf52c45d6b
@ -2153,6 +2153,10 @@ static int setup_exec_directory(
|
||||
* it over. Most likely the service has been upgraded from one that didn't use
|
||||
* DynamicUser=1, to one that does. */
|
||||
|
||||
log_info("Found pre-existing public %s= directory %s, migrating to %s.\n"
|
||||
"Apparently, service previously had DynamicUser= turned off, and has now turned it on.",
|
||||
exec_directory_type_to_string(type), p, pp);
|
||||
|
||||
if (rename(p, pp) < 0) {
|
||||
r = -errno;
|
||||
goto fail;
|
||||
@ -2191,6 +2195,10 @@ static int setup_exec_directory(
|
||||
/* Hmm, apparently DynamicUser= was once turned on for this service,
|
||||
* but is no longer. Let's move the directory back up. */
|
||||
|
||||
log_info("Found pre-existing private %s= directory %s, migrating to %s.\n"
|
||||
"Apparently, service previously had DynamicUser= turned on, and has now turned it off.",
|
||||
exec_directory_type_to_string(type), q, p);
|
||||
|
||||
if (unlink(p) < 0) {
|
||||
r = -errno;
|
||||
goto fail;
|
||||
|
Loading…
Reference in New Issue
Block a user