summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorratchov <ratchov@openbsd.org>2015-11-18 08:36:20 +0000
committerratchov <ratchov@openbsd.org>2015-11-18 08:36:20 +0000
commit53b96084efee564f96c460cfdf4ba7d791835753 (patch)
treeda15f9f58ebbb74ea2dc3a9339973a8fcac51f7e
parentsay that network communication is not secure (diff)
downloadwireguard-openbsd-53b96084efee564f96c460cfdf4ba7d791835753.tar.xz
wireguard-openbsd-53b96084efee564f96c460cfdf4ba7d791835753.zip
disable networking (i.e. -L option) until privilege separation is
implemented
-rw-r--r--usr.bin/sndiod/listen.c4
-rw-r--r--usr.bin/sndiod/sndiod.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/sndiod/listen.c b/usr.bin/sndiod/listen.c
index 2c9195e8acf..dca8466fa4e 100644
--- a/usr.bin/sndiod/listen.c
+++ b/usr.bin/sndiod/listen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: listen.c,v 1.2 2013/03/13 08:28:33 ratchov Exp $ */
+/* $OpenBSD: listen.c,v 1.3 2015/11/18 08:36:20 ratchov Exp $ */
/*
* Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org>
*
@@ -126,6 +126,7 @@ listen_new_un(char *path)
exit(1);
}
+#ifdef USE_TCP
void
listen_new_tcp(char *addr, unsigned int port)
{
@@ -204,6 +205,7 @@ listen_new_tcp(char *addr, unsigned int port)
if (n == 0)
exit(1);
}
+#endif
int
listen_init(struct listen *f)
diff --git a/usr.bin/sndiod/sndiod.c b/usr.bin/sndiod/sndiod.c
index 08f0ec95844..9aba139a4b1 100644
--- a/usr.bin/sndiod/sndiod.c
+++ b/usr.bin/sndiod/sndiod.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sndiod.c,v 1.11 2015/10/02 12:21:59 ratchov Exp $ */
+/* $OpenBSD: sndiod.c,v 1.12 2015/11/18 08:36:20 ratchov Exp $ */
/*
* Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org>
*
@@ -381,7 +381,11 @@ main(int argc, char **argv)
errx(1, "%s: unit number is %s", optarg, str);
break;
case 'L':
+#ifdef USE_TCP
listen_new_tcp(optarg, AUCAT_PORT + unit);
+#else
+ errx(1, "-L option disabled at compilation time");
+#endif
break;
case 'm':
mode = opt_mode();