diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-06-14 07:12:15 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-06-14 07:12:15 +0000 |
commit | 87d64b7359397613bd67602508a68574a7ca4d97 (patch) | |
tree | 522eb9c404101d129b12b7e2f148a7182ad86771 /usr.sbin/ypbind | |
parent | bcc74127df9c9277cfc0bfaadf070270e51ae3b8 (diff) |
i have made a mistake, and i do not yet understand how
Diffstat (limited to 'usr.sbin/ypbind')
-rw-r--r-- | usr.sbin/ypbind/ypbind.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c index 82ce46b2110..8e540a6aeb6 100644 --- a/usr.sbin/ypbind/ypbind.c +++ b/usr.sbin/ypbind/ypbind.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypbind.c,v 1.27 1997/06/12 19:55:41 deraadt Exp $ */ +/* $OpenBSD: ypbind.c,v 1.28 1997/06/14 07:12:14 deraadt Exp $ */ /* * Copyright (c) 1996 Theo de Raadt <deraadt@theos.com> @@ -34,7 +34,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: ypbind.c,v 1.27 1997/06/12 19:55:41 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ypbind.c,v 1.28 1997/06/14 07:12:14 deraadt Exp $"; #endif #include <sys/param.h> @@ -79,7 +79,6 @@ struct _dom_binding { int dom_socket; CLIENT *dom_client; long dom_vers; - time_t dom_first_t; time_t dom_check_t; time_t dom_ask_t; int dom_lockfd; @@ -166,21 +165,8 @@ ypbindproc_domain_2x(transp, argp, clnt) for (ypdb = ypbindlist; ypdb && count < 100; ypdb = ypdb->dom_pnext) count++; - if (count >= 100) { - struct _dom_binding *ypdbo = NULL; - - /* OK, find an old inactive domain, and kill it */ - for (ypdb = ypbindlist; ypdb; ypdbo = ypdb, ypdb = ypdb->dom_pnext) - if (ypdb->dom_alive == 0 && - ypdb->dom_first_t + 120 < time(NULL)) { - if (ypdb == ypbindlist) - ypbindlist = ypdb->dom_pnext; - else - ypdbo->dom_pnext = ypdb->dom_pnext; - free(ypdb); - break; - } - } + if (count >= 100) + return NULL; /* prevent DOS: sorry, you lose */ for (ypdb = ypbindlist; ypdb; ypdb = ypdb->dom_pnext) if (!strcmp(ypdb->dom_domain, *argp)) |