diff options
author | Mattias Andrée <m@maandree.se> | 2025-02-08 15:28:43 +0100 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2025-02-08 15:28:43 +0100 |
commit | 14c9a4b9efbad54b3f4275b0d0678a688eb3f77b (patch) | |
tree | df86b82d3aca125e420ecbfa59c910337d521f57 /sshexec.c | |
parent | Fix operand count check (diff) | |
download | sshexec-14c9a4b9efbad54b3f4275b0d0678a688eb3f77b.tar.gz sshexec-14c9a4b9efbad54b3f4275b0d0678a688eb3f77b.tar.bz2 sshexec-14c9a4b9efbad54b3f4275b0d0678a688eb3f77b.tar.xz |
Forbid - and variable assigment formatted command
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r-- | sshexec.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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); |