diff options
-rw-r--r-- | usr.sbin/ypbind/ypbind.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c index 858e625..fc8bc94 100644 --- a/usr.sbin/ypbind/ypbind.c +++ b/usr.sbin/ypbind/ypbind.c @@ -28,7 +28,7 @@ */ #ifndef LINT -static char rcsid[] = "$Id$"; +static char rcsid[] = "$Id: ypbind.c,v 1.23 1997/02/22 16:14:56 peter Exp $"; #endif #include <sys/param.h> @@ -175,6 +175,12 @@ CLIENT *clnt; res.ypbind_status = YPBIND_FAIL_VAL; res.ypbind_resp_u.ypbind_error = YPBIND_ERR_NOSERV; + if (strchr(*argp, '/')) { + syslog(LOG_WARNING, "Domain name '%s' has embedded slash -- \ +rejecting.", *argp); + return(&res); + } + for(ypdb=ypbindlist; ypdb; ypdb=ypdb->dom_pnext) { if( strcmp(ypdb->dom_domain, *argp) == 0) break; @@ -236,6 +242,11 @@ CLIENT *clnt; { struct sockaddr_in *fromsin, bindsin; + if (strchr(argp->ypsetdom_domain, '/')) { + syslog(LOG_WARNING, "Domain name '%s' has embedded slash -- \ +rejecting.", argp->ypsetdom_domain); + return; + } fromsin = svc_getcaller(transp); switch(ypsetmode) { |