summaryrefslogtreecommitdiff
path: root/src/timedate
diff options
context:
space:
mode:
authorDaniel Wallace <danielwallace@gtmanfred.com>2013-06-09 15:54:39 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-06-09 18:26:41 -0400
commit7085053a437456ab87d726f3697002dd811fdf7a (patch)
treeca12f96e9cb69ee08fa3a5558c42650692dcfb28 /src/timedate
parent856323c9cb0ef368367126588d0b43b4846ab0d7 (diff)
Allow for the use of @ in remote host calls
Without this you have to use %40 with the -H flag because dbus doesn't like the @ sign being unescaped.
Diffstat (limited to 'src/timedate')
-rw-r--r--src/timedate/timedatectl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c
index e8bc4529f3..d2b483efac 100644
--- a/src/timedate/timedatectl.c
+++ b/src/timedate/timedatectl.c
@@ -44,7 +44,8 @@ static enum transport {
TRANSPORT_POLKIT
} arg_transport = TRANSPORT_NORMAL;
static bool arg_ask_password = true;
-static const char *arg_host = NULL;
+static char *arg_host = NULL;
+static char *arg_user = NULL;
static void pager_open_if_enabled(void) {
@@ -560,7 +561,7 @@ static int parse_argv(int argc, char *argv[]) {
case 'H':
arg_transport = TRANSPORT_SSH;
- arg_host = optarg;
+ parse_user_at_host(optarg, &arg_user, &arg_host);
break;
case ARG_NO_ASK_PASSWORD: