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

src/viced/host.c

index c4b0c10e351ca5b8c101dd4268eab83161b6c29e..87f7c1318c3610fd4985e9d6c07b66885faa44f9 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 */
@@ -1357,7 +1358,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"));
@@ -1480,7 +1482,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));
@@ -1691,6 +1694,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;