summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-07-20 23:17:37 +0200
committerDaniel Mack <daniel@zonque.org>2015-07-21 15:58:59 +0200
commit6f566391a428789d0bb54654642d4dc3d6948c68 (patch)
treebee2bdad4048ac0093938f2cb98f52cd7bc26a77
parentbd37a199c941a3d49edca97807ebad24abe4a890 (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.
-rw-r--r--src/login/logind-dbus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index 049e33e2a6..e6371ff04d 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