aboutsummaryrefslogtreecommitdiffstats
path: root/sshexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshexec.c')
-rw-r--r--sshexec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sshexec.c b/sshexec.c
index 987511d..9306c5c 100644
--- a/sshexec.c
+++ b/sshexec.c
@@ -235,6 +235,11 @@ main(int argc_unused, char *argv[])
if (!destination || !*argv)
usage();
+ if (!strcmp(*argv, "-"))
+ exitf("%s: the command argument must not be \"-\"\n", argv0);
+ else if (strchr(*argv, '='))
+ exitf("%s: the command argument must contain an \'=\'\n", argv0);
+
if (dir) {
build_command_asis("cd -- ");
build_command_escape(dir);