1
0
mirror of https://github.com/systemd/systemd synced 2024-07-01 07:34:28 +00:00

nspawn: machine registration is now available unpriv

This commit is contained in:
Lennart Poettering 2024-05-27 13:30:11 +02:00
parent f98e821cda
commit e16be05858

View File

@ -1659,12 +1659,6 @@ static int verify_arguments(void) {
SET_FLAG(arg_mount_settings, MOUNT_PRIVILEGED, arg_privileged);
if (!arg_privileged) {
/* machined is not accessible to unpriv clients */
if (arg_register) {
log_notice("Automatically implying --register=no, since machined is not accessible to unprivileged clients.");
arg_register = false;
}
if (!arg_private_network) {
log_notice("Automatically implying --private-network, since mounting /sys/ in an unprivileged user namespaces requires network namespacing.");
arg_private_network = true;
@ -5350,7 +5344,7 @@ static int run_container(
}
if (arg_register || !arg_keep_unit) {
if (arg_privileged)
if (arg_privileged || arg_register)
r = sd_bus_default_system(&bus);
else
r = sd_bus_default_user(&bus);