summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-07-21 17:20:55 +0200
committerDaniel Mack <github@zonque.org>2015-07-21 17:20:55 +0200
commit81fc63daa49e2a902cce62ba8fcc7783f0ba1908 (patch)
treeeefab61af167df5cae79c017e4935ff707b06e3c
parentbd37a199c941a3d49edca97807ebad24abe4a890 (diff)
parent81b72a962f0b6ebbe8e7dfcad306d33bf086529a (diff)
Merge pull request #643 from zonque/fileio
basic/fileio: fix write_string_file() fallout
-rw-r--r--src/login/logind-dbus.c2
-rw-r--r--src/user-sessions/user-sessions.c2
2 files changed, 2 insertions, 2 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
diff --git a/src/user-sessions/user-sessions.c b/src/user-sessions/user-sessions.c
index ddeb310c3c..e80a7771de 100644
--- a/src/user-sessions/user-sessions.c
+++ b/src/user-sessions/user-sessions.c
@@ -65,7 +65,7 @@ int main(int argc, char*argv[]) {
} else if (streq(argv[1], "stop")) {
int r;
- 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");
return EXIT_FAILURE;