diff options
author | Daniel Mack <daniel@zonque.org> | 2015-07-20 23:17:37 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-03-14 10:07:02 +0100 |
commit | 6609ed3a939c2feb8a7cd39ce4f45413f2d58315 (patch) | |
tree | 0a0b3dee2f0e12c1a0cff6cf2d21af8b15768194 /src | |
parent | 919d0fd3c8394b0988c0b4f81c081a20f25a8e87 (diff) |
logind: fix write_string_file() fallout
WRITE_STRING_FILE_ATOMIC is only valid if WRITE_STRING_FILE_CREATE is also
given. IOW, an atomic file write operation is only possible when creating a
file is also being asked for.
This is a regression from the recent write_string_file() rework.
Diffstat (limited to 'src')
-rw-r--r-- | src/login/logind-dbus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 049e33e2a..e6371ff04 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -1774,7 +1774,7 @@ static int nologin_timeout_handler( log_info("Creating /run/nologin, blocking further logins..."); - r = write_string_file("/run/nologin", "System is going down.", WRITE_STRING_FILE_ATOMIC); + r = write_string_file("/run/nologin", "System is going down.", WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_ATOMIC); if (r < 0) log_error_errno(r, "Failed to create /run/nologin: %m"); else |