[OpenAFS-devel] Delta cellconfig-check-for-corrupt-keyfile-20051007 is in error

Rainer Toebbicke rtb@pclella.cern.ch
Mon, 07 Nov 2005 15:01:18 +0100


This is a multi-part message in MIME format.
--------------090504090003050005060801
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

cellconfig-check-for-corrupt-keyfile-20051007 should convert at least 
nkeys to host byte order before checking anything - fails on little 
endians otherwise.


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rainer Toebbicke
European Laboratory for Particle Physics(CERN) - Geneva, Switzerland
Phone: +41 22 767 8985       Fax: +41 22 767 7155

--------------090504090003050005060801
Content-Type: text/plain;
 name="patch_KeyFileChk"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="patch_KeyFileChk"

--- openafs/src/auth/cellconfig.c.o141	2005-10-15 16:55:39.000000000 +0200
+++ openafs/src/auth/cellconfig.c	2005-11-07 14:49:00.000000000 +0100
@@ -1125,14 +1125,14 @@
 	return 0;
     }
 
+    /* convert key structure to host order */
+    tstr->nkeys = ntohl(tstr->nkeys);
     if (code < sizeof(afs_int32) + (tstr->nkeys*sizeof(struct afsconf_key))) {
 	tstr->nkeys = 0;
 	UNLOCK_GLOBAL_MUTEX;
 	return 0;
     }
 
-    /* convert key structure to host order */
-    tstr->nkeys = ntohl(tstr->nkeys);
     for (fd = 0; fd < tstr->nkeys; fd++)
 	tstr->key[fd].kvno = ntohl(tstr->key[fd].kvno);
 

--------------090504090003050005060801--