ref: ebeb158a082f5f0b21029cf356d2099bcbaca0fb
parent: a55c2b2b816998618398f85f1ca7839126afbed0
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Feb 17 01:59:55 EST 2015
tlssrv: fix usage, dont cat
--- a/sys/src/cmd/tlssrv.c
+++ b/sys/src/cmd/tlssrv.c
@@ -30,7 +30,7 @@
void
usage(void)
{
- fprint(2, "usage: tlssrv -c cert [-D] [-l logfile] [-r remotesys] [cmd args...]\n");
+ fprint(2, "usage: tlssrv -c cert [-D] [-l logfile] [-r remotesys] cmd [args...]\n");
fprint(2, " after auth/secretpem key.pem > /mnt/factotum/ctl\n");
exits("usage");
}
@@ -60,6 +60,9 @@
usage();
}ARGEND
+ if(*argv == nil)
+ usage();
+
if(cert == nil)
sysfatal("no certificate specified");
conn = (TLSconn*)mallocz(sizeof *conn, 1);
@@ -84,9 +87,6 @@
dup(fd, 0);
dup(fd, 1);
-
- if(*argv == nil)
- *--argv = "/bin/cat";
exec(*argv, argv);
reporter("can't exec %s: %r", *argv);