summaryrefslogtreecommitdiff
path: root/src/login/logind-dbus.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-02-22 14:21:30 +0100
committerSven Eden <yamakuzure@gmx.net>2018-05-30 07:59:03 +0200
commit5e7eb6fbbd4a55cb4b26929482478ca7b2eef6aa (patch)
treee39e97234084d3e8c7d1eb1589b69347f883cbd9 /src/login/logind-dbus.c
parentfc145f67d8597dea9bd9bfcacac1e6fec533051d (diff)
nologin: extend the /run/nologin descriptions a bit (#8244)
This is an attempt to improve #8228 a bit, by extending the /run/nologin a bit, but still keeping it somewhat brief. On purpose I used the vague wording "unprivileged user" rather than "non-root user" so that pam_nologin can be updated to disable its behaviour for members of the "wheel" group one day, and our messages would still make sense. See #8228.
Diffstat (limited to 'src/login/logind-dbus.c')
-rw-r--r--src/login/logind-dbus.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index 87734d8e5..ee3a1e919 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -1969,15 +1969,11 @@ static int nologin_timeout_handler(
void *userdata) {
Manager *m = userdata;
- int r;
log_info("Creating /run/nologin, blocking further logins...");
- r = write_string_file_atomic_label("/run/nologin", "System is going down.");
- if (r < 0)
- log_error_errno(r, "Failed to create /run/nologin: %m");
- else
- m->unlink_nologin = true;
+ m->unlink_nologin =
+ create_shutdown_run_nologin_or_warn() >= 0;
return 0;
}