diff options
| author | Bill Paul <wpaul@FreeBSD.org> | 1997-04-10 14:18:03 +0000 |
|---|---|---|
| committer | Bill Paul <wpaul@FreeBSD.org> | 1997-04-10 14:18:03 +0000 |
| commit | fcccefae4aa1535b923670f48ff5a2cfc73be0e0 (patch) | |
| tree | 17446f7c7c3bdc477d87f0b662172939b819fc64 /usr.sbin/ypbind | |
| parent | 832035088b01314a4ee66534a4f927e53ec4685e (diff) | |
Notes
Diffstat (limited to 'usr.sbin/ypbind')
| -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 858e6259bd1e6..fc8bc94c2d97b 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) { |
