projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15e99a4
)
logind: don's change dry-run boolean before we actually enqueue the operation
author
Lennart Poettering
<lennart@poettering.net>
Mon, 2 Oct 2017 14:09:24 +0000
(16:09 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 4 Oct 2017 18:56:24 +0000
(20:56 +0200)
Let's not affect change before the PK check.
src/login/logind-dbus.c
patch
|
blob
|
history
diff --git
a/src/login/logind-dbus.c
b/src/login/logind-dbus.c
index 61029580e2d2b99dc46d341cd7c49ca325901ee8..c6f184e080762512bd8af8fbe35512a9a51966b3 100644
(file)
--- a/
src/login/logind-dbus.c
+++ b/
src/login/logind-dbus.c
@@
-2037,6
+2037,7
@@
static int method_schedule_shutdown(sd_bus_message *message, void *userdata, sd_
uint64_t elapse;
char *type;
int r;
+ bool dry_run = false;
assert(m);
assert(message);
@@
-2047,7
+2048,7
@@
static int method_schedule_shutdown(sd_bus_message *message, void *userdata, sd_
if (startswith(type, "dry-")) {
type += 4;
-
m->shutdown_
dry_run = true;
+ dry_run = true;
}
if (streq(type, "poweroff")) {
@@
-2091,6
+2092,8
@@
static int method_schedule_shutdown(sd_bus_message *message, void *userdata, sd_
return log_oom();
}
+ m->shutdown_dry_run = dry_run;
+
if (m->nologin_timeout_source) {
r = sd_event_source_set_time(m->nologin_timeout_source, elapse);
if (r < 0)