core: drop implicit support of PrivateUsers=off
Follow-up for fa693fdc7e.
The documentation says the option takes a boolean or one of the "self"
and "identity". But the parser uses private_users_from_string() which
also accepts "off". Let's drop the implicit support of "off".
This commit is contained in:
@@ -1038,7 +1038,7 @@ static int property_get_private_users(
|
||||
sd_bus_error *error) {
|
||||
|
||||
PrivateUsers *p = ASSERT_PTR(userdata);
|
||||
int b = *p != PRIVATE_USERS_OFF;
|
||||
int b = *p != PRIVATE_USERS_NO;
|
||||
|
||||
return sd_bus_message_append_basic(reply, 'b', &b);
|
||||
}
|
||||
@@ -1882,7 +1882,7 @@ int bus_exec_context_set_transient_property(
|
||||
return r;
|
||||
|
||||
if (!UNIT_WRITE_FLAGS_NOOP(flags)) {
|
||||
c->private_users = v ? PRIVATE_USERS_SELF : PRIVATE_USERS_OFF;
|
||||
c->private_users = v ? PRIVATE_USERS_SELF : PRIVATE_USERS_NO;
|
||||
(void) unit_write_settingf(u, flags, name, "%s=%s", name, yes_no(v));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user