Don't even think about processing bogus domain names here.

This commit is contained in:
Bill Paul 1997-04-10 20:26:04 +00:00
parent f91ddb3f3c
commit 6e8caff794

View File

@ -28,7 +28,7 @@
*/ */
#ifndef LINT #ifndef LINT
static char *rcsid = "$Id$"; static char *rcsid = "$Id: yplib.c,v 1.28 1997/02/22 15:05:02 peter Exp $";
#endif #endif
#include <sys/param.h> #include <sys/param.h>
@ -226,6 +226,10 @@ _yp_dobind(dom, ypdb)
struct sockaddr_in check; struct sockaddr_in check;
int checklen = sizeof(struct sockaddr_in); int checklen = sizeof(struct sockaddr_in);
/* Not allowed; bad doggie. Bad. */
if (strchr(dom, '/') != NULL)
return(YPERR_BADARGS);
gpid = getpid(); gpid = getpid();
if( !(pid==-1 || pid==gpid) ) { if( !(pid==-1 || pid==gpid) ) {
ysd = _ypbindlist; ysd = _ypbindlist;