diff options
author | 2006-08-18 03:06:18 +0000 | |
---|---|---|
committer | 2006-08-18 03:06:18 +0000 | |
commit | bb370364bd6da8e5664a428d156729d94908198a (patch) | |
tree | 00064c87491622f1dbe90a5b53a5250213e91306 | |
parent | support for ucycom: (diff) | |
download | wireguard-openbsd-bb370364bd6da8e5664a428d156729d94908198a.tar.xz wireguard-openbsd-bb370364bd6da8e5664a428d156729d94908198a.zip |
tip/cu always set "dc" because the code was reading from the wrong value
in the array. Point it at the correct chunk of memory. For now, also
preserve the old ":dc:" is always set behavior.
ok deraadt
-rw-r--r-- | usr.bin/tip/tip.c | 7 | ||||
-rw-r--r-- | usr.bin/tip/tip.h | 4 | ||||
-rw-r--r-- | usr.bin/tip/vars.c | 6 |
3 files changed, 11 insertions, 6 deletions
diff --git a/usr.bin/tip/tip.c b/usr.bin/tip/tip.c index 2a9d7c68fc5..f8eddf59120 100644 --- a/usr.bin/tip/tip.c +++ b/usr.bin/tip/tip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tip.c,v 1.29 2006/06/06 23:24:52 deraadt Exp $ */ +/* $OpenBSD: tip.c,v 1.30 2006/08/18 03:06:18 jason Exp $ */ /* $NetBSD: tip.c,v 1.13 1997/04/20 00:03:05 mellon Exp $ */ /* @@ -40,7 +40,7 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)tip.c 8.1 (Berkeley) 6/6/93"; #endif -static const char rcsid[] = "$OpenBSD: tip.c,v 1.29 2006/06/06 23:24:52 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: tip.c,v 1.30 2006/08/18 03:06:18 jason Exp $"; #endif /* not lint */ /* @@ -65,6 +65,9 @@ main(int argc, char *argv[]) char *sys = NOSTR, sbuf[12], *p; int i; + /* XXX preserve previous braindamaged behavior */ + setboolean(value(DC), TRUE); + gid = getgid(); egid = getegid(); uid = getuid(); diff --git a/usr.bin/tip/tip.h b/usr.bin/tip/tip.h index 1e82091c2b5..975590029ac 100644 --- a/usr.bin/tip/tip.h +++ b/usr.bin/tip/tip.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tip.h,v 1.26 2006/06/06 23:24:52 deraadt Exp $ */ +/* $OpenBSD: tip.h,v 1.27 2006/08/18 03:06:18 jason Exp $ */ /* $NetBSD: tip.h,v 1.7 1997/04/20 00:02:46 mellon Exp $ */ /* @@ -89,7 +89,6 @@ long CL; /* char delay for file transfers to remote */ long ET; /* echocheck timeout */ long LD; /* line disc */ short HD; /* this host is half duplex - do local echo */ -short DC; /* this host is directly connected. */ /* * String value table @@ -227,6 +226,7 @@ extern value_t vtable[]; /* variable table */ #define PARITY 32 #define HARDWAREFLOW 33 #define LINEDISC 34 +#define DC 35 #define NOVAL ((value_t *)NULL) #define NOACU ((acu_t *)NULL) diff --git a/usr.bin/tip/vars.c b/usr.bin/tip/vars.c index c7e21171712..56027ca2011 100644 --- a/usr.bin/tip/vars.c +++ b/usr.bin/tip/vars.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vars.c,v 1.7 2006/06/06 23:24:52 deraadt Exp $ */ +/* $OpenBSD: vars.c,v 1.8 2006/08/18 03:06:18 jason Exp $ */ /* $NetBSD: vars.c,v 1.3 1994/12/08 09:31:19 jtc Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)vars.c 8.1 (Berkeley) 6/6/93"; #endif -static const char rcsid[] = "$OpenBSD: vars.c,v 1.7 2006/06/06 23:24:52 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: vars.c,v 1.8 2006/08/18 03:06:18 jason Exp $"; #endif /* not lint */ #include "tip.h" @@ -114,5 +114,7 @@ value_t vtable[] = { "hf", (char *)FALSE }, { "linedisc", NUMBER|IREMOTE|INIT, (READ|WRITE)<<PUBLIC, "ld", (char *)&LD }, + { "direct", BOOL, (READ<<PUBLIC)|(WRITE<<ROOT), + "dc", (char *)FALSE }, { NOSTR, NULL, NULL, NOSTR, NOSTR } }; |