When we are in --user mode there's no point in doing PolicyKit/ask-pw
because both of these systems are only used by system-level services.
Let's disable the two agents for that automaticlly hence.
Prompted by: #20576
assert_not_reached();
}
+ if (arg_user)
+ arg_ask_password = false;
+
if (arg_user && arg_transport != BUS_TRANSPORT_LOCAL)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"Execution in user context is not supported on non-local systems.");
assert_not_reached();
}
+ /* If we are talking to the per-user instance PolicyKit isn't going to help */
+ if (arg_user)
+ arg_ask_password = false;
+
with_trigger = !!arg_path_property || !!arg_socket_property || arg_with_timer;
/* currently, only single trigger (path, socket, timer) unit can be created simultaneously */
assert_not_reached();
}
+ /* If we are in --user mode, there's no point in talking to PolicyKit or the infra to query system
+ * passwords */
+ if (arg_scope != UNIT_FILE_SYSTEM)
+ arg_ask_password = false;
+
if (arg_transport == BUS_TRANSPORT_REMOTE && arg_scope != UNIT_FILE_SYSTEM)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"Cannot access user instance remotely.");