]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-viced-no-nulluuid-20070719
authorDerrick Brashear <shadow@dementia.org>
Thu, 19 Jul 2007 16:11:09 +0000 (16:11 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 19 Jul 2007 16:11:09 +0000 (16:11 +0000)
a host with a zero uuid has no uuid support

(cherry picked from commit 91fee8a699e31ad825e84a4f2bd56eb9093ea85a)

src/viced/host.c

index 38b9f7baff1fdbf939af57061e03844eea99eb97..baa95efe10b9fcb2dd8eb2168062e369639ded64 100644 (file)
@@ -82,6 +82,7 @@ extern struct afsconf_dir *confDir;   /* config dir object */
 extern int lwps;               /* the max number of server threads */
 extern afsUUID FS_HostUUID;
 
+afsUUID nulluuid;
 int CEs = 0;                   /* active clients */
 int CEBlocks = 0;              /* number of blocks of CEs */
 struct client *CEFree = 0;     /* first free client */
@@ -1356,7 +1357,8 @@ h_GetHost_r(struct rx_connection *tcon)
        rx_PutConnection(cb_conn);
        cb_conn=NULL;
        H_LOCK;
-       if (code == RXGEN_OPCODE) {
+       if ((code == RXGEN_OPCODE) || 
+           (afs_uuid_equal(&interf.uuid, &nulluuid))) {
            identP = (struct Identity *)malloc(sizeof(struct Identity));
            if (!identP) {
                ViceLog(0, ("Failed malloc in h_GetHost_r\n"));
@@ -1479,7 +1481,8 @@ h_GetHost_r(struct rx_connection *tcon)
            rx_PutConnection(cb_conn);
            cb_conn=NULL;
            H_LOCK;
-           if (code == RXGEN_OPCODE) {
+           if ((code == RXGEN_OPCODE) || 
+               afs_uuid_equal(&interf.uuid, &nulluuid)) {
                if (!identP)
                    identP =
                        (struct Identity *)malloc(sizeof(struct Identity));
@@ -1690,6 +1693,7 @@ int  num_lrealms = -1;
 void
 h_InitHostPackage()
 {
+    memset(&nulluuid, 0, sizeof(afsUUID));
     afsconf_GetLocalCell(confDir, localcellname, PR_MAXNAMELEN);
     if (num_lrealms == -1) {
        int i;