]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: legacy tools shall never be interactive
authorIvan Shapovalov <intelfx100@gmail.com>
Mon, 22 Jun 2015 16:04:38 +0000 (19:04 +0300)
committerIvan Shapovalov <intelfx100@gmail.com>
Wed, 9 Sep 2015 22:14:07 +0000 (01:14 +0300)
Fixes (the main concern of) issue #213.

src/systemctl/systemctl.c

index 74d7fc2b3bfd1b4454e23935c9417578e10dbccc..16a8eef3084040e8c27a7351148399eb58cc5efa 100644 (file)
@@ -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) {