summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mount/mount-tool.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/mount/mount-tool.c b/src/mount/mount-tool.c
index fb9e3b3a14..278890dd69 100644
--- a/src/mount/mount-tool.c
+++ b/src/mount/mount-tool.c
@@ -638,10 +638,6 @@ static int start_transient_mount(
if (r < 0)
return bus_log_create_error(r);
- r = sd_bus_message_set_allow_interactive_authorization(m, arg_ask_password);
- if (r < 0)
- return bus_log_create_error(r);
-
/* Name and mode */
r = sd_bus_message_append(m, "ss", mount_unit, "fail");
if (r < 0)
@@ -719,10 +715,6 @@ static int start_transient_automount(
if (r < 0)
return bus_log_create_error(r);
- r = sd_bus_message_set_allow_interactive_authorization(m, arg_ask_password);
- if (r < 0)
- return bus_log_create_error(r);
-
/* Name and mode */
r = sd_bus_message_append(m, "ss", automount_unit, "fail");
if (r < 0)
@@ -923,10 +915,6 @@ static int stop_mount(
if (r < 0)
return bus_log_create_error(r);
- r = sd_bus_message_set_allow_interactive_authorization(m, arg_ask_password);
- if (r < 0)
- return bus_log_create_error(r);
-
/* Name and mode */
r = sd_bus_message_append(m, "ss", mount_unit, "fail");
if (r < 0)
@@ -1527,6 +1515,8 @@ static int run(int argc, char* argv[]) {
if (r < 0)
return bus_log_connect_error(r, arg_transport);
+ (void) sd_bus_set_allow_interactive_authorization(bus, arg_ask_password);
+
if (arg_action == ACTION_UMOUNT)
return action_umount(bus, argc, argv);