diff options
author | Jan Janssen <medhefgo@web.de> | 2013-05-17 15:38:12 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-05-23 00:28:04 -0400 |
commit | 546158bc6f46f8004cc11e81d19d223e0da56730 (patch) | |
tree | c9f9ebe8e7e62c5dbcd0b433de7506a715b0429d /src/timedate/timedatectl.c | |
parent | a057be1fcc61ca1fed96898db05dfe88f54ab2db (diff) |
Fix --no-ask-password
POSIX_ME_HARDER mode is disabled for localectl. It doesn't
make much sense in case of localectl, and there's little reason
for localectl to behave specially.
Diffstat (limited to 'src/timedate/timedatectl.c')
-rw-r--r-- | src/timedate/timedatectl.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c index be3b8b4da3..e8bc4529f3 100644 --- a/src/timedate/timedatectl.c +++ b/src/timedate/timedatectl.c @@ -304,7 +304,7 @@ static int show_status(DBusConnection *bus, char **args, unsigned n) { static int set_time(DBusConnection *bus, char **args, unsigned n) { _cleanup_dbus_message_unref_ DBusMessage *reply = NULL; - dbus_bool_t relative = false, interactive = true; + dbus_bool_t relative = false, interactive = arg_ask_password; usec_t t; dbus_int64_t u; int r; @@ -338,7 +338,7 @@ static int set_time(DBusConnection *bus, char **args, unsigned n) { static int set_timezone(DBusConnection *bus, char **args, unsigned n) { _cleanup_dbus_message_unref_ DBusMessage *reply = NULL; - dbus_bool_t interactive = true; + dbus_bool_t interactive = arg_ask_password; assert(args); assert(n == 2); @@ -360,7 +360,7 @@ static int set_timezone(DBusConnection *bus, char **args, unsigned n) { static int set_local_rtc(DBusConnection *bus, char **args, unsigned n) { _cleanup_dbus_message_unref_ DBusMessage *reply = NULL; - dbus_bool_t interactive = true, b, q; + dbus_bool_t interactive = arg_ask_password, b, q; int r; assert(args); @@ -393,7 +393,7 @@ static int set_local_rtc(DBusConnection *bus, char **args, unsigned n) { static int set_ntp(DBusConnection *bus, char **args, unsigned n) { _cleanup_dbus_message_unref_ DBusMessage *reply = NULL; - dbus_bool_t interactive = true, b; + dbus_bool_t interactive = arg_ask_password, b; int r; assert(args); @@ -541,7 +541,7 @@ static int parse_argv(int argc, char *argv[]) { assert(argc >= 0); assert(argv); - while ((c = getopt_long(argc, argv, "+hH:P", options, NULL)) >= 0) { + while ((c = getopt_long(argc, argv, "hH:P", options, NULL)) >= 0) { switch (c) { @@ -563,6 +563,10 @@ static int parse_argv(int argc, char *argv[]) { arg_host = optarg; break; + case ARG_NO_ASK_PASSWORD: + arg_ask_password = false; + break; + case ARG_ADJUST_SYSTEM_CLOCK: arg_adjust_system_clock = true; break; |