tlssrv: fix usage, dont cat
This commit is contained in:
parent
a55c2b2b81
commit
ebeb158a08
1 changed files with 4 additions and 4 deletions
|
@ -30,7 +30,7 @@ reporter(char *fmt, ...)
|
|||
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 @@ main(int argc, char *argv[])
|
|||
usage();
|
||||
}ARGEND
|
||||
|
||||
if(*argv == nil)
|
||||
usage();
|
||||
|
||||
if(cert == nil)
|
||||
sysfatal("no certificate specified");
|
||||
conn = (TLSconn*)mallocz(sizeof *conn, 1);
|
||||
|
@ -85,9 +88,6 @@ main(int argc, char *argv[])
|
|||
dup(fd, 0);
|
||||
dup(fd, 1);
|
||||
|
||||
if(*argv == nil)
|
||||
*--argv = "/bin/cat";
|
||||
|
||||
exec(*argv, argv);
|
||||
reporter("can't exec %s: %r", *argv);
|
||||
exits("exec");
|
||||
|
|
Loading…
Reference in a new issue