Commit 165ed9e7 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Older tweaks that I added so I can capture/console on my machine at

home without worrying about ssl/capserv/acl stuff.
parent 6e575e9f
......@@ -30,6 +30,9 @@ CFLAGS= -g -O2 -DLOG_DROPS -I${OBJDIR}
capture: capture.c capdecls.h
cc $(CFLAGS) -DUSESOCKETS -DWITHSSL -DPREFIX=\"$(TBROOT)\" -o capture $< -lssl -lcrypto
capture-nossl: capture.c capdecls.h
cc $(CFLAGS) -DUSESOCKETS -DPREFIX=\"$(TBROOT)\" -o capture-nossl $<
capture-tty: capture.c capdecls.h
cc $(CFLAGS) -o capture-tty $<
......
......@@ -99,7 +99,7 @@ char *Ptyname;
char *Devname;
char *Machine;
int logfd, runfd, devfd, ptyfd;
int hwflow = 0, speed = B9600, debug = 0, runfile = 0;
int hwflow = 0, speed = B9600, debug = 0, runfile = 0, standalone = 0;
sigset_t actionsigmask;
sigset_t allsigmask;
#ifdef USESOCKETS
......@@ -143,7 +143,7 @@ main(argc, argv)
Progname = (Progname = rindex(argv[0], '/')) ? ++Progname : *argv;
while ((op = getopt(argc, argv, "rds:Hb:itp:c:")) != EOF)
while ((op = getopt(argc, argv, "rds:Hb:ip:c:")) != EOF)
switch (op) {
#ifdef USESOCKETS
#ifdef WITHSSL
......@@ -158,6 +158,10 @@ main(argc, argv)
case 'p':
serverport = atoi(optarg);
break;
case 'i':
standalone = 1;
break;
#endif /* USESOCKETS */
case 'H':
++hwflow;
......@@ -1354,6 +1358,12 @@ handshake()
whoami_t whoami;
tipowner_t tipown;
/*
* In standalone, do not contact the capserver.
*/
if (standalone)
return err;
/*
* Global. If we fail, we keep trying from the main loop. This
* allows local tip to operate while still trying to contact the
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment