summaryrefslogtreecommitdiff
path: root/usr.bin/sndiod
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2015-11-18 08:36:21 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2015-11-18 08:36:21 +0000
commitd8230553a35783ce3d3e402ed945025d414f3e30 (patch)
tree8cd1a1ceea614139abe7cd2ae13ea0485f9a2a61 /usr.bin/sndiod
parent6163e679f5596a5810d3f055759666b327ff386f (diff)
disable networking (i.e. -L option) until privilege separation is
implemented
Diffstat (limited to 'usr.bin/sndiod')
-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();