From 6a02d37882239111849025935845b217e45eb154 Mon Sep 17 00:00:00 2001 From: wpaul Date: Thu, 10 Apr 1997 20:26:04 +0000 Subject: Don't even think about processing bogus domain names here. --- lib/libc/yp/yplib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/libc') diff --git a/lib/libc/yp/yplib.c b/lib/libc/yp/yplib.c index ab404ab..2e0223d 100644 --- a/lib/libc/yp/yplib.c +++ b/lib/libc/yp/yplib.c @@ -28,7 +28,7 @@ */ #ifndef LINT -static char *rcsid = "$Id$"; +static char *rcsid = "$Id: yplib.c,v 1.28 1997/02/22 15:05:02 peter Exp $"; #endif #include @@ -226,6 +226,10 @@ _yp_dobind(dom, ypdb) struct sockaddr_in check; int checklen = sizeof(struct sockaddr_in); + /* Not allowed; bad doggie. Bad. */ + if (strchr(dom, '/') != NULL) + return(YPERR_BADARGS); + gpid = getpid(); if( !(pid==-1 || pid==gpid) ) { ysd = _ypbindlist; -- cgit v1.1