Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/ypbind ypbindlist -> domains



details:   https://anonhg.NetBSD.org/src/rev/fd5b0ef6f584
branches:  trunk
changeset: 765306:fd5b0ef6f584
user:      dholland <dholland%NetBSD.org@localhost>
date:      Tue May 24 06:59:07 2011 +0000

description:
ypbindlist -> domains

diffstat:

 usr.sbin/ypbind/ypbind.c |  34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diffs (111 lines):

diff -r 26105732a314 -r fd5b0ef6f584 usr.sbin/ypbind/ypbind.c
--- a/usr.sbin/ypbind/ypbind.c  Tue May 24 06:58:54 2011 +0000
+++ b/usr.sbin/ypbind/ypbind.c  Tue May 24 06:59:07 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ypbind.c,v 1.76 2011/05/24 06:58:54 dholland Exp $     */
+/*     $NetBSD: ypbind.c,v 1.77 2011/05/24 06:59:07 dholland Exp $     */
 
 /*
  * Copyright (c) 1992, 1993 Theo de Raadt <deraadt%fsa.ca@localhost>
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #ifndef LINT
-__RCSID("$NetBSD: ypbind.c,v 1.76 2011/05/24 06:58:54 dholland Exp $");
+__RCSID("$NetBSD: ypbind.c,v 1.77 2011/05/24 06:59:07 dholland Exp $");
 #endif
 
 #include <sys/types.h>
@@ -103,7 +103,7 @@
 
 static char *domainname;
 
-static struct domain *ypbindlist;
+static struct domain *domains;
 static int check;
 
 static ypbind_mode_t ypbindmode;
@@ -196,7 +196,7 @@
 {
        struct domain *ypdb;
 
-       for (ypdb = ypbindlist; ypdb; ypdb = ypdb->dom_pnext)
+       for (ypdb = domains; ypdb; ypdb = ypdb->dom_pnext)
                if (ypdb->dom_xid == xid)
                        break;
        return (ypdb);
@@ -335,7 +335,7 @@
        if (!insecure && ntohs(raddrp->sin_port) >= IPPORT_RESERVED)
                return;
 
-       for (ypdb = ypbindlist; ypdb; ypdb = ypdb->dom_pnext)
+       for (ypdb = domains; ypdb; ypdb = ypdb->dom_pnext)
                if (!strcmp(ypdb->dom_domain, dom))
                        break;
 
@@ -344,8 +344,8 @@
                        return;
                ypdb = domain_create(dom);
                ypdb->dom_lockfd = -1;
-               ypdb->dom_pnext = ypbindlist;
-               ypbindlist = ypdb;
+               ypdb->dom_pnext = domains;
+               domains = ypdb;
        }
 
        /* soft update, alive */
@@ -430,7 +430,7 @@
        (void)memset(&res, 0, sizeof res);
        res.ypbind_status = YPBIND_FAIL_VAL;
 
-       for (count = 0, ypdb = ypbindlist;
+       for (count = 0, ypdb = domains;
            ypdb != NULL;
            ypdb = ypdb->dom_pnext, count++) {
                if (count > 100)
@@ -446,8 +446,8 @@
                ypdb->dom_lockfd = -1;
                removelock(ypdb);
                ypdb->dom_xid = unique_xid(ypdb);
-               ypdb->dom_pnext = ypbindlist;
-               ypbindlist = ypdb;
+               ypdb->dom_pnext = domains;
+               domains = ypdb;
                check++;
                DPRINTF("unknown domain %s\n", arg);
                return NULL;
@@ -1115,7 +1115,7 @@
        check = 0;
 
        (void)time(&t);
-       for (ypdb = ypbindlist; ypdb; ypdb = ypdb->dom_pnext) {
+       for (ypdb = domains; ypdb; ypdb = ypdb->dom_pnext) {
                if (ypdb->dom_checktime < t) {
                        if (ypdb->dom_alive == 1)
                                (void)ping(ypdb);
@@ -1210,11 +1210,11 @@
                errx(1, "unable to purge old bindings from %s", BINDINGDIR);
 
        /* build initial domain binding, make it "unsuccessful" */
-       ypbindlist = domain_create(domainname);
-       ypbindlist->dom_vers = YPVERS;
-       ypbindlist->dom_alive = 0;
-       ypbindlist->dom_lockfd = -1;
-       removelock(ypbindlist);
+       domains = domain_create(domainname);
+       domains->dom_vers = YPVERS;
+       domains->dom_alive = 0;
+       domains->dom_lockfd = -1;
+       removelock(domains);
 
        checkwork();
 
@@ -1249,7 +1249,7 @@
                        break;
                }
 
-               if (!evil && ypbindlist->dom_alive) {
+               if (!evil && domains->dom_alive) {
                        evil = 1;
 #ifdef DEBUG
                        if (!debug)



Home | Main Index | Thread Index | Old Index