nspawn: machine registration is now available unpriv
This commit is contained in:
+1
-7
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user