summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Shapovalov <intelfx100@gmail.com>2015-06-22 19:04:38 +0300
committerIvan Shapovalov <intelfx100@gmail.com>2015-09-10 01:14:07 +0300
commit16f017fa6e3417edb4bba5db13a623f7289a3abc (patch)
treed688b28b9646d2045293d2ec347d4ec55b6c7e0a /src
parentf24aa148ab793054a5a29e0e16c5ad9b3f7da93e (diff)
systemctl: legacy tools shall never be interactive
Fixes (the main concern of) issue #213.
Diffstat (limited to 'src')
-rw-r--r--src/systemctl/systemctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 74d7fc2b3b..16a8eef308 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -100,7 +100,7 @@ static bool arg_quiet = false;
static bool arg_full = false;
static bool arg_recursive = false;
static int arg_force = 0;
-static bool arg_ask_password = true;
+static bool arg_ask_password = false;
static bool arg_runtime = false;
static UnitFilePresetMode arg_preset_mode = UNIT_FILE_PRESET_FULL;
static char **arg_wall = NULL;
@@ -6340,6 +6340,9 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
assert(argc >= 0);
assert(argv);
+ /* we default to allowing interactive authorization only in systemctl (not in the legacy commands) */
+ arg_ask_password = true;
+
while ((c = getopt_long(argc, argv, "ht:p:alqfs:H:M:n:o:ir", options, NULL)) >= 0)
switch (c) {