summaryrefslogtreecommitdiffstats
path: root/lib/libc/yp
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1997-04-10 20:26:04 +0000
committerwpaul <wpaul@FreeBSD.org>1997-04-10 20:26:04 +0000
commit6a02d37882239111849025935845b217e45eb154 (patch)
treebcf2a7d4ed27feec836ffa627dc08ad8c8b72c82 /lib/libc/yp
parent7d1e3d2f56cd4a501a022eda15e968d16a2846bc (diff)
downloadFreeBSD-src-6a02d37882239111849025935845b217e45eb154.zip
FreeBSD-src-6a02d37882239111849025935845b217e45eb154.tar.gz
Don't even think about processing bogus domain names here.
Diffstat (limited to 'lib/libc/yp')
-rw-r--r--lib/libc/yp/yplib.c6
1 files changed, 5 insertions, 1 deletions
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 <sys/param.h>
@@ -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;
OpenPOWER on IntegriCloud