summaryrefslogtreecommitdiff
path: root/usr.sbin/ypserv/ypxfr
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-04-12 00:12:59 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-04-12 00:12:59 +0000
commitac808dd0020d95a1ebcd4bcd3bb1f84d25692808 (patch)
tree15a29507406d7be5efe9baeaa4ccc3e46e7966af /usr.sbin/ypserv/ypxfr
parentadfbdc8011c52399fc983d2597f8ffd06e135221 (diff)
bit more care with domainnames, adam@math.tau.ac.il
Diffstat (limited to 'usr.sbin/ypserv/ypxfr')
-rw-r--r--usr.sbin/ypserv/ypxfr/ypxfr.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/ypserv/ypxfr/ypxfr.c b/usr.sbin/ypserv/ypxfr/ypxfr.c
index 6bcd6003642..fda6dbf27ad 100644
--- a/usr.sbin/ypserv/ypxfr/ypxfr.c
+++ b/usr.sbin/ypserv/ypxfr/ypxfr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ypxfr.c,v 1.15 1997/02/09 09:49:37 maja Exp $ */
+/* $OpenBSD: ypxfr.c,v 1.16 1997/04/12 00:12:58 deraadt Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
@@ -32,7 +32,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: ypxfr.c,v 1.15 1997/02/09 09:49:37 maja Exp $";
+static char rcsid[] = "$OpenBSD: ypxfr.c,v 1.16 1997/04/12 00:12:58 deraadt Exp $";
#endif
#include <sys/types.h>
@@ -450,6 +450,8 @@ char *argv[];
cflag++;
break;
case 'd':
+ if (strchr(optarg, '/')) /* Ha ha, we are not listening */
+ break;
domain = optarg;
break;
case 'f':
@@ -459,6 +461,8 @@ char *argv[];
host = optarg;
break;
case 's':
+ if (strchr(optarg, '/')) /* Ha ha, we are not listening */
+ break;
srcdomain = optarg;
break;
case 'C':
@@ -532,6 +536,7 @@ char *argv[];
}
};
+ /* XXX this is raceable if portmap has holes! */
if (status > 0) {
yplog("Check for reserved port on host: %s", host);