Index: openafs/src/WINNT/afs_setup_utils/afsrm.c
diff -c openafs/src/WINNT/afs_setup_utils/afsrm.c:1.3 openafs/src/WINNT/afs_setup_utils/afsrm.c:1.3.20.1
*** openafs/src/WINNT/afs_setup_utils/afsrm.c:1.3	Tue Sep 18 00:26:47 2001
--- openafs/src/WINNT/afs_setup_utils/afsrm.c	Wed Oct 31 00:09:10 2007
***************
*** 23,29 ****
  #include "forceremove.h"
  
  
! static int DoClient34(struct cmd_syndesc *as, char *arock)
  {
      DWORD status = Client34Eradicate(FALSE);
  
--- 23,29 ----
  #include "forceremove.h"
  
  
! static int DoClient34(struct cmd_syndesc *as, void *arock)
  {
      DWORD status = Client34Eradicate(FALSE);
  
***************
*** 40,46 ****
  {
      struct cmd_syndesc	*ts;
  
!     ts = cmd_CreateSyntax("client34", DoClient34, 0,
  			  "remove AFS 3.4a client");
  }
  
--- 40,46 ----
  {
      struct cmd_syndesc	*ts;
  
!     ts = cmd_CreateSyntax("client34", DoClient34, NULL,
  			  "remove AFS 3.4a client");
  }
  
Index: openafs/src/WINNT/afsd/afsd_init.c
diff -c openafs/src/WINNT/afsd/afsd_init.c:1.79.2.18 openafs/src/WINNT/afsd/afsd_init.c:1.79.2.20
*** openafs/src/WINNT/afsd/afsd_init.c:1.79.2.18	Sat Oct 20 00:03:04 2007
--- openafs/src/WINNT/afsd/afsd_init.c	Mon Nov  5 13:26:49 2007
***************
*** 23,28 ****
--- 23,31 ----
  
  #include <osi.h>
  #include "afsd.h"
+ #ifdef USE_BPLUS
+ #include "cm_btree.h"
+ #endif
  #include <rx\rx.h>
  #include <rx\rx_null.h>
  #include <WINNT/syscfg.h>
***************
*** 40,46 ****
--- 43,51 ----
  extern afs_int32 cryptall;
  extern int cm_enableServerLocks;
  extern int cm_deleteReadOnly;
+ #ifdef USE_BPLUS
  extern afs_int32 cm_BPlusTrees;
+ #endif
  extern afs_int32 cm_OfflineROIsValid;
  extern const char **smb_ExecutableExtensions;
  
***************
*** 1069,1074 ****
--- 1074,1080 ----
      } 
      afsi_log("CM DeleteReadOnly is %u", cm_deleteReadOnly);
      
+ #ifdef USE_BPLUS
      dummyLen = sizeof(DWORD);
      code = RegQueryValueEx(parmKey, "BPlusTrees", NULL, NULL,
                             (BYTE *) &dwValue, &dummyLen);
***************
*** 1077,1082 ****
--- 1083,1096 ----
      } 
      afsi_log("CM BPlusTrees is %u", cm_BPlusTrees);
  
+     if (cm_BPlusTrees && !cm_InitBPlusDir()) {
+         cm_BPlusTrees = 0;
+         afsi_log("CM BPlusTree initialization failure; disabled for this session");
+     }
+ #else
+     afsi_log("CM BPlusTrees is not supported");
+ #endif
+ 
      if ((RegQueryValueEx( parmKey, "PrefetchExecutableExtensions", 0, 
                            &regType, NULL, &dummyLen) == ERROR_SUCCESS) &&
           (regType == REG_MULTI_SZ)) 
***************
*** 1161,1167 ****
      smb_InitIoctl();
          
      cm_InitCallback();
!         
      code = cm_InitMappedMemory(virtualCache, cm_CachePath, stats, cm_chunkSize, cacheBlocks, blockSize);
      afsi_log("cm_InitMappedMemory code %x", code);
      if (code != 0) {
--- 1175,1181 ----
      smb_InitIoctl();
          
      cm_InitCallback();
! 
      code = cm_InitMappedMemory(virtualCache, cm_CachePath, stats, cm_chunkSize, cacheBlocks, blockSize);
      afsi_log("cm_InitMappedMemory code %x", code);
      if (code != 0) {
***************
*** 1366,1372 ****
  
  void afsd_printStack(HANDLE hThread, CONTEXT *c)
  {
- #if defined(_X86_)
      HANDLE hProcess = GetCurrentProcess();
      int frameNum;
  #if defined(_AMD64_)
--- 1380,1385 ----
***************
*** 1413,1421 ****
  #error The STACKFRAME initialization in afsd_printStack() for this platform
  #error must be properly configured
  #elif defined(_AMD64_)
!     s.AddrPC.Offset = 0;
      s.AddrPC.Mode = AddrModeFlat;
!     s.AddrFrame.Offset = 0;
      s.AddrFrame.Mode = AddrModeFlat;
  #else
      s.AddrPC.Offset = c->Eip;
--- 1426,1434 ----
  #error The STACKFRAME initialization in afsd_printStack() for this platform
  #error must be properly configured
  #elif defined(_AMD64_)
!     s.AddrPC.Offset = c->Rip;
      s.AddrPC.Mode = AddrModeFlat;
!     s.AddrFrame.Offset = c->Rbp;
      s.AddrFrame.Mode = AddrModeFlat;
  #else
      s.AddrPC.Offset = c->Eip;
***************
*** 1515,1521 ****
    
      SymCleanup(hProcess);
      GlobalFree(pSym);
- #endif /* _X86_ */
  }
  
  #ifdef _DEBUG
--- 1528,1533 ----
***************
*** 1665,1670 ****
--- 1677,1685 ----
  #if defined(_X86)    
          ep->ContextRecord->Eip++;
  #endif
+ #if defined(_AMD64_)
+         ep->ContextRecord->Rip++;
+ #endif
          return EXCEPTION_CONTINUE_EXECUTION;
      }
      else
Index: openafs/src/WINNT/afsd/afsd_service.c
diff -c openafs/src/WINNT/afsd/afsd_service.c:1.52.4.17 openafs/src/WINNT/afsd/afsd_service.c:1.52.4.18
*** openafs/src/WINNT/afsd/afsd_service.c:1.52.4.17	Wed Sep 19 23:55:42 2007
--- openafs/src/WINNT/afsd/afsd_service.c	Sun Nov  4 19:24:45 2007
***************
*** 61,66 ****
--- 61,68 ----
  #ifdef AFSIFS
      int i;
  #endif
+     if (!msgp)
+         msgp = "unspecified assert";
  
      if (filep)
      	LogEvent(EVENTLOG_ERROR_TYPE, MSG_SERVICE_ERROR_STOP_WITH_MSG_AND_LOCATION, 
Index: openafs/src/WINNT/afsd/cklog.c
diff -c openafs/src/WINNT/afsd/cklog.c:1.4.4.1 openafs/src/WINNT/afsd/cklog.c:1.4.4.2
*** openafs/src/WINNT/afsd/cklog.c:1.4.4.1	Tue Apr 10 14:39:48 2007
--- openafs/src/WINNT/afsd/cklog.c	Wed Oct 31 00:09:16 2007
***************
*** 22,28 ****
  #define BAD_ARGUMENT 1
  #define KLOGEXIT(code) exit(code)
  
! int CommandProc();
  
  static int zero_argc;
  static char **zero_argv;
--- 22,28 ----
  #define BAD_ARGUMENT 1
  #define KLOGEXIT(code) exit(code)
  
! static int CommandProc(struct cmd_syndesc *, void *);
  
  static int zero_argc;
  static char **zero_argv;
***************
*** 40,46 ****
      /* Start up sockets */
      WSAStartup(0x0101, &WSAjunk);
  
!     ts = cmd_CreateSyntax((char *) 0, CommandProc, 0, "obtain Kerberos authentication");
  
  #define aXFLAG 0
  #define aPRINCIPAL 1
--- 40,46 ----
      /* Start up sockets */
      WSAStartup(0x0101, &WSAjunk);
  
!     ts = cmd_CreateSyntax(NULL, CommandProc, NULL, "obtain Kerberos authentication");
  
  #define aXFLAG 0
  #define aPRINCIPAL 1
***************
*** 135,143 ****
      return !ok;
  }
  
! CommandProc (as, arock)
!   char *arock;
!   struct cmd_syndesc *as;
  {
      char  name[MAXKTCNAMELEN];
      char  instance[MAXKTCNAMELEN];
--- 135,142 ----
      return !ok;
  }
  
! static int
! CommandProc (struct cmd_syndesc *as, void *arock)
  {
      char  name[MAXKTCNAMELEN];
      char  instance[MAXKTCNAMELEN];
Index: openafs/src/WINNT/afsd/cm_aclent.c
diff -c openafs/src/WINNT/afsd/cm_aclent.c:1.14.2.1 openafs/src/WINNT/afsd/cm_aclent.c:1.14.2.2
*** openafs/src/WINNT/afsd/cm_aclent.c:1.14.2.1	Thu Jun  1 11:39:51 2006
--- openafs/src/WINNT/afsd/cm_aclent.c	Thu Oct 25 00:49:00 2007
***************
*** 92,100 ****
              } else {
                  *rightsp = aclp->randomAccess;
  		if (cm_data.aclLRUp != aclp) {
- 		    if (cm_data.aclLRUEndp == aclp)
- 			cm_data.aclLRUEndp = (cm_aclent_t *) osi_QPrev(&aclp->q);
- 
  		    /* move to the head of the LRU queue */
  		    osi_QRemoveHT((osi_queue_t **) &cm_data.aclLRUp, (osi_queue_t **) &cm_data.aclLRUEndp, &aclp->q);
  		    osi_QAddH((osi_queue_t **) &cm_data.aclLRUp,
--- 92,97 ----
***************
*** 123,130 ****
      if (cm_data.aclLRUp == NULL)
          osi_panic("empty aclent LRU", __FILE__, __LINE__);
  
      aclp = cm_data.aclLRUEndp;
-     cm_data.aclLRUEndp = (cm_aclent_t *) osi_QPrev(&aclp->q);
      osi_QRemoveHT((osi_queue_t **) &cm_data.aclLRUp, (osi_queue_t **) &cm_data.aclLRUEndp, &aclp->q);
  
      if (aclp->backp && scp != aclp->backp) {
--- 120,129 ----
      if (cm_data.aclLRUp == NULL)
          osi_panic("empty aclent LRU", __FILE__, __LINE__);
  
+     if (cm_data.aclLRUEndp == NULL)
+         osi_panic("inconsistent aclent LRUEndp == NULL", __FILE__, __LINE__);
+ 
      aclp = cm_data.aclLRUEndp;
      osi_QRemoveHT((osi_queue_t **) &cm_data.aclLRUp, (osi_queue_t **) &cm_data.aclLRUEndp, &aclp->q);
  
      if (aclp->backp && scp != aclp->backp) {
Index: openafs/src/WINNT/afsd/cm_btree.c
diff -c openafs/src/WINNT/afsd/cm_btree.c:1.1.2.7 openafs/src/WINNT/afsd/cm_btree.c:1.1.2.12
*** openafs/src/WINNT/afsd/cm_btree.c:1.1.2.7	Thu Oct  4 10:13:10 2007
--- openafs/src/WINNT/afsd/cm_btree.c	Mon Nov  5 13:26:49 2007
***************
*** 66,71 ****
--- 66,79 ----
  static void _xferentry(Nptr srcNode, int srcEntry, Nptr destNode, int destEntry);
  static void _setentry(Nptr node, int entry, keyT key, Nptr downNode);
  
+ /* access key and data values for B+tree methods */
+ /* pass values to getSlot(), descend...() */
+ static keyT   getfunkey(Tree  *B);
+ static dataT  getfundata(Tree *B);
+ static void   setfunkey(Tree *B,  keyT v);
+ static void   setfundata(Tree *B, dataT v);
+ 
+ 
  #ifdef DEBUG_BTREE
  static int _isRoot(Tree *B, Nptr n)
  {
***************
*** 114,119 ****
--- 122,140 ----
  /***********************************************************************\
  |	B+tree Initialization and Cleanup Routines                      |
  \***********************************************************************/
+ static DWORD TlsKeyIndex;
+ static DWORD TlsDataIndex;
+ 
+ long cm_InitBPlusDir(void)
+ {
+     if ((TlsKeyIndex = TlsAlloc()) == TLS_OUT_OF_INDEXES) 
+         return 0;
+ 
+     if ((TlsDataIndex = TlsAlloc()) == TLS_OUT_OF_INDEXES) 
+         return 0;
+ 
+     return 1;
+ }
  
  /********************   Set up B+tree structure   **********************/
  Tree *initBtree(unsigned int poolsz, unsigned int fanout, KeyCmp keyCmp)
***************
*** 168,181 ****
  }
  
  
  /***********************************************************************\
! |	Find location for data						|
  \***********************************************************************/
  
  /**********************   top level lookup   **********************/
  Nptr bplus_Lookup(Tree *B, keyT key)
  {
!     Nptr	findNode;
  
  #ifdef DEBUG_BTREE
      sprintf(B->message, "LOOKUP:  key %s.\n", key.name);
--- 189,269 ----
  }
  
  
+ /* access key and data values for B+tree methods */
+ /* pass values to getSlot(), descend...() */
+ static keyT getfunkey(Tree *B) {
+     keyT *tlsKey; 
+  
+     // Retrieve a data pointer for the current thread. 
+     tlsKey = (keyT *) TlsGetValue(TlsKeyIndex); 
+     if (tlsKey == NULL) {
+         if (GetLastError() != ERROR_SUCCESS)
+             osi_panic("TlsGetValue failed", __FILE__, __LINE__);
+         else
+             osi_panic("get before set", __FILE__, __LINE__);
+     }
+ 
+     return *tlsKey;
+ }
+ 
+ static dataT getfundata(Tree *B) {
+     dataT *tlsData; 
+  
+     // Retrieve a data pointer for the current thread. 
+     tlsData = (dataT *) TlsGetValue(TlsDataIndex); 
+     if (tlsData == NULL) {
+         if (GetLastError() != ERROR_SUCCESS)
+             osi_panic("TlsGetValue failed", __FILE__, __LINE__);
+         else
+             osi_panic("get before set", __FILE__, __LINE__);
+     }
+ 
+     return *tlsData;
+ }
+ 
+ static void setfunkey(Tree *B, keyT theKey) {
+     keyT *tlsKey;
+ 
+     tlsKey = (keyT *) TlsGetValue(TlsKeyIndex); 
+     if (tlsKey == NULL) {
+         if (GetLastError() != ERROR_SUCCESS)
+             osi_panic("TlsGetValue failed", __FILE__, __LINE__);
+ 
+         tlsKey = malloc(sizeof(keyT));
+         
+         if (!TlsSetValue(TlsKeyIndex, tlsKey)) 
+             osi_panic("TlsSetValue failed", __FILE__, __LINE__);
+     }
+ 
+     *tlsKey = theKey;
+ }
+ 
+ static void setfundata(Tree *B, dataT theData) {
+     dataT *tlsData;
+ 
+     tlsData = (dataT *) TlsGetValue(TlsDataIndex); 
+     if (tlsData == NULL) {
+         if (GetLastError() != ERROR_SUCCESS)
+             osi_panic("TlsGetValue failed", __FILE__, __LINE__);
+ 
+         tlsData = malloc(sizeof(dataT));
+         
+         if (!TlsSetValue(TlsDataIndex, tlsData)) 
+             osi_panic("TlsSetValue failed", __FILE__, __LINE__);
+     }
+ 
+     *tlsData = theData;
+ }
+ 
+ 
  /***********************************************************************\
! |	Find leaf node in which data nodes can be found                 |
  \***********************************************************************/
  
  /**********************   top level lookup   **********************/
  Nptr bplus_Lookup(Tree *B, keyT key)
  {
!     Nptr	leafNode;
  
  #ifdef DEBUG_BTREE
      sprintf(B->message, "LOOKUP:  key %s.\n", key.name);
***************
*** 183,203 ****
  #endif
  
      setfunkey(B, key);			/* set search key */
!     findNode = descendToLeaf(B, getroot(B));	/* start search from root node */
  
  #ifdef DEBUG_BTREE
!     if (findNode) {
          int         slot;
          Nptr        dataNode;
          dataT       data;
  
!         slot = findKey(B, findNode, 1, numentries(findNode));
!         dataNode = getnode(findNode, slot);
          data = getdatavalue(dataNode);
  
          sprintf(B->message, "LOOKUP: %s found on page %d value (%d.%d.%d).\n",
                   key.name,
!                  getnodenumber(B, findNode), 
                   data.fid.volume, 
                   data.fid.vnode,
                   data.fid.unique);
--- 271,294 ----
  #endif
  
      setfunkey(B, key);			/* set search key */
!     leafNode = descendToLeaf(B, getroot(B));	/* start search from root node */
  
  #ifdef DEBUG_BTREE
!     if (leafNode) {
          int         slot;
          Nptr        dataNode;
          dataT       data;
  
!         slot = getSlot(B, leafNode);
!         if (slot <= BTERROR)
!             return NONODE;
! 
!         dataNode = getnode(leafNode, slot);
          data = getdatavalue(dataNode);
  
          sprintf(B->message, "LOOKUP: %s found on page %d value (%d.%d.%d).\n",
                   key.name,
!                  getnodenumber(B, leafNode), 
                   data.fid.volume, 
                   data.fid.vnode,
                   data.fid.unique);
***************
*** 206,212 ****
      OutputDebugString(B->message);
  #endif
  
!     return findNode;
  }
  
  /**********************   `recurse' down B+tree   **********************/
--- 297,303 ----
      OutputDebugString(B->message);
  #endif
  
!     return leafNode;
  }
  
  /**********************   `recurse' down B+tree   **********************/
***************
*** 219,230 ****
  
      memset(prev, 0, sizeof(prev));
  
!     for (depth = 0, slot = getSlot(B, curr); isinternal(curr); depth++, slot = getSlot(B, curr)) {
          prev[depth] = curr;
          if (slot == 0)
              curr = getfirstnode(curr);
!         else
              curr = getnode(curr, slot);
  #ifdef DEBUG_BTREE
          if ( !isnode(curr) )
              DebugBreak();
--- 310,325 ----
  
      memset(prev, 0, sizeof(prev));
  
!     for (depth = 0, slot = getSlot(B, curr); (slot >= 0) && isinternal(curr); depth++, slot = getSlot(B, curr)) {
          prev[depth] = curr;
          if (slot == 0)
              curr = getfirstnode(curr);
!         else if (slot > 0)
              curr = getnode(curr, slot);
+         else /* BTERROR, BTLOWER, BTUPPER */ {
+             curr = NONODE;
+             break;
+         }
  #ifdef DEBUG_BTREE
          if ( !isnode(curr) )
              DebugBreak();
***************
*** 260,283 ****
  
  #ifdef DEBUG_BTREE
          if (findslot == BTERROR) {
!             sprintf(B->message, "Bad key ordering on node %d\n", getnodenumber(B, curr));
!             OutputDebugString(B->message);
          }
  #endif
      } else {
          mid = (lo + hi) >> 1;
          switch (findslot = bestMatch(B, curr, mid)) {
          case BTLOWER:				/* check lower half of range */
!             findslot = findKey(B, curr, lo, mid - 1);		/* never in 2-3+trees */
              break;
          case BTUPPER:				/* check upper half of range */
!             findslot = findKey(B, curr, mid + 1, hi);
              break;
          case BTERROR:
!             sprintf(B->message, "Bad key ordering on node %d\n", getnodenumber(B, curr));
!             OutputDebugString(B->message);
          }
      }
      return findslot;
  }
  
--- 355,389 ----
  
  #ifdef DEBUG_BTREE
          if (findslot == BTERROR) {
!             sprintf(B->message, "FINDKEY: (lo %d hi %d) Bad key ordering on node %d (0x%p)\n", 
!                     lo, hi, getnodenumber(B, curr), curr);
!             osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
          }
  #endif
      } else {
          mid = (lo + hi) >> 1;
          switch (findslot = bestMatch(B, curr, mid)) {
          case BTLOWER:				/* check lower half of range */
!             if (mid > 1)
!                 findslot = findKey(B, curr, lo, mid - 1);		/* never in 2-3+trees */
              break;
          case BTUPPER:				/* check upper half of range */
!             if (mid < getfanout(B))
!                 findslot = findKey(B, curr, mid + 1, hi);
              break;
          case BTERROR:
!             sprintf(B->message, "FINDKEY: (lo %d hi %d) Bad key ordering on node %d (0x%p)\n", 
!                     lo, hi, getnodenumber(B, curr), curr);
!             osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
          }
      }
+ 
+     if (isleaf(curr) && findslot == 0)
+     {
+         sprintf(B->message, "FINDKEY: (lo %d hi %d) findslot %d is invalid for leaf nodes, bad key ordering on node %d (0x%p)\n", 
+                 lo, hi, findslot, getnodenumber(B, curr), curr);
+         osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
+     }
      return findslot;
  }
  
***************
*** 285,327 ****
  /************   comparison of key with a target key slot   *************/
  static int bestMatch(Tree *B, Nptr curr, int slot)
  {
!     int diff, comp, findslot;
  
      diff = comparekeys(B)(getfunkey(B), getkey(curr, slot), 0);
!     if (diff < 0) {		/* also check previous slot */
!         if ((slot == 1) ||
!              ((comp = comparekeys(B)(getfunkey(B), getkey(curr, slot - 1), 0)) >= 0)) 
!         {
              findslot = slot - 1;
!         }
!         else if (comp < diff) {
              findslot = BTERROR;		/* inconsistent ordering of keys */
  #ifdef DEBUG_BTREE
              DebugBreak();
  #endif
!         }
!         else {
              findslot = BTLOWER;		/* key must be below in node ordering */
          }
      } else {			/* or check following slot */
!         if ((slot == numentries(curr)) ||
!              ((comp = comparekeys(B)(getfunkey(B), getkey(curr, slot + 1), 0)) < 0))
!         {
              findslot = slot;
!         }
!         else if (comp == 0) {
              findslot = slot + 1;
!         }
!         else if (comp > diff) {
              findslot = BTERROR;		/* inconsistent ordering of keys */
  #ifdef DEBUG_BTREE
              DebugBreak();
  #endif
!         }
!         else {
              findslot = BTUPPER;		/* key must be above in node ordering */
          }
      }
      return findslot;
  }
  
--- 391,444 ----
  /************   comparison of key with a target key slot   *************/
  static int bestMatch(Tree *B, Nptr curr, int slot)
  {
!     int diff, comp=2, findslot;
  
      diff = comparekeys(B)(getfunkey(B), getkey(curr, slot), 0);
!     if (diff == 0) {
!         findslot = slot;
!     } else if (diff < 0) {		/* also check previous slot */
!         if (slot == 1) {
!             if (isleaf(curr))
!                  findslot = BTLOWER;	/* not found in the tree */
!             else
!                  findslot = 0;				
!         } 
!         else if ((comp = comparekeys(B)(getfunkey(B), getkey(curr, slot - 1), 0)) >= 0) {
              findslot = slot - 1;
!         } else if (comp < diff) {
              findslot = BTERROR;		/* inconsistent ordering of keys */
  #ifdef DEBUG_BTREE
              DebugBreak();
  #endif
!         } else {
              findslot = BTLOWER;		/* key must be below in node ordering */
          }
      } else {			/* or check following slot */
!         if (slot == numentries(curr)) {
!             if (isleaf(curr) && numentries(curr) == getfanout(B)) 
!                 findslot = BTUPPER;
!             else 
!                 findslot = slot;
!         } else if ((comp = comparekeys(B)(getfunkey(B), getkey(curr, slot + 1), 0)) < 0) {
              findslot = slot;
!         } else if (comp == 0) {
              findslot = slot + 1;
!         } else if (comp > diff) {
              findslot = BTERROR;		/* inconsistent ordering of keys */
  #ifdef DEBUG_BTREE
              DebugBreak();
  #endif
!         } else {
              findslot = BTUPPER;		/* key must be above in node ordering */
          }
      }
+ 
+     if (findslot == BTERROR || isleaf(curr) && findslot == 0)
+     {
+         sprintf(B->message, "BESTMATCH: node %d (0x%p) slot %d diff %d comp %d findslot %d\n", 
+                 getnodenumber(B, curr), curr, slot, diff, comp, findslot);
+         osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
+     }
      return findslot;
  }
  
***************
*** 338,344 ****
  
  #ifdef DEBUG_BTREE
      sprintf(B->message, "INSERT:  key %s.\n", key.name);
!     OutputDebugString(B->message);
  #endif
  
      setfunkey(B, key);			        /* set insertion key */
--- 455,461 ----
  
  #ifdef DEBUG_BTREE
      sprintf(B->message, "INSERT:  key %s.\n", key.name);
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
  #endif
  
      setfunkey(B, key);			        /* set insertion key */
***************
*** 367,372 ****
--- 484,499 ----
          setsplitpath(B, curr);			/* indicates where nodes must split */
  
      slot = getSlot(B, curr);		        /* is null only if the root is empty */
+     if (slot == BTERROR)
+         return NONODE;
+ 
+     if (isleaf(curr)) {
+         if (slot == BTLOWER)
+             slot = 0;
+         else if (slot == BTUPPER)
+             slot = getfanout(B);
+     }
+ 
      if (isinternal(curr)) {	/* continue recursion to leaves */
          if (slot == 0)
              downNode = descendSplit(B, getfirstnode(curr));
***************
*** 402,408 ****
  
  #ifdef DEBUG_BTREE
      sprintf(B->message, "INSERT:  slot %d, down node %d.\n", slot, getnodenumber(B, downPtr));
!     OutputDebugString(B->message);
  #endif
  
      if (sibling == NONODE) {		/* no split occurred */
--- 529,535 ----
  
  #ifdef DEBUG_BTREE
      sprintf(B->message, "INSERT:  slot %d, down node %d.\n", slot, getnodenumber(B, downPtr));
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
  #endif
  
      if (sibling == NONODE) {		/* no split occurred */
***************
*** 606,612 ****
  
  #ifdef DEBUG_BTREE
      sprintf(B->message, "DELETE:  key %s.\n", key.name);
!     OutputDebugString(B->message);
  #endif
  
      setfunkey(B, key);			/* set deletion key */
--- 733,739 ----
  
  #ifdef DEBUG_BTREE
      sprintf(B->message, "DELETE:  key %s.\n", key.name);
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
  #endif
  
      setfunkey(B, key);			/* set deletion key */
***************
*** 615,621 ****
      if (isnode(newNode)) {
  #ifdef DEBUG_BTREE
          sprintf(B->message, "DELETE: collapsing node %d", getnodenumber(B, newNode));
!         OutputDebugString(B->message);
  #endif
          collapseRoot(B, getroot(B), newNode);	/* remove root when superfluous */
      }
--- 742,748 ----
      if (isnode(newNode)) {
  #ifdef DEBUG_BTREE
          sprintf(B->message, "DELETE: collapsing node %d", getnodenumber(B, newNode));
!         osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
  #endif
          collapseRoot(B, getroot(B), newNode);	/* remove root when superfluous */
      }
***************
*** 629,635 ****
  
  #ifdef DEBUG_BTREE
      sprintf(B->message, "COLLAPSE:  old %d, new %d.\n", getnodenumber(B, oldRoot), getnodenumber(B, newRoot));
!     OutputDebugString(B->message);
      showNode(B, "collapseRoot oldRoot", oldRoot);
      showNode(B, "collapseRoot newRoot", newRoot);
  #endif
--- 756,762 ----
  
  #ifdef DEBUG_BTREE
      sprintf(B->message, "COLLAPSE:  old %d, new %d.\n", getnodenumber(B, oldRoot), getnodenumber(B, newRoot));
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      showNode(B, "collapseRoot oldRoot", oldRoot);
      showNode(B, "collapseRoot newRoot", newRoot);
  #endif
***************
*** 657,663 ****
               lAnc ? getnodenumber(B, lAnc) : -1,
               rAnc ? getnodenumber(B, rAnc) : -1,
               parent ? getnodenumber(B, parent) : -1);
!     OutputDebugString(B->message);
  #endif
  
      if (!isfew(curr))
--- 784,790 ----
               lAnc ? getnodenumber(B, lAnc) : -1,
               rAnc ? getnodenumber(B, rAnc) : -1,
               parent ? getnodenumber(B, parent) : -1);
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
  #endif
  
      if (!isfew(curr))
***************
*** 666,671 ****
--- 793,807 ----
          setmergepath(B, curr);		/* mark which nodes may need rebalancing */
  
      slot = getSlot(B, curr);
+     if (slot == BTERROR)
+         return NONODE;
+ 
+     if (isleaf(curr)) {
+         if (slot == BTLOWER)
+             slot = 0;
+         else if (slot == BTUPPER)
+             slot = getfanout(B);
+     }
  
      if (isinternal(curr)) 	/* set up next recursion call's parameters */
      {
***************
*** 783,789 ****
      if (newMe != NONODE) {	/* this node removal doesn't consider duplicates */
  #ifdef DEBUG_BTREE
          sprintf(B->message, "descendBalance DELETE:  slot %d, node %d.\n", slot, getnodenumber(B, curr));
!         OutputDebugString(B->message);
  #endif
  
          removeEntry(B, curr, slot + (newMe != newNode));	/* removes one of two */
--- 919,925 ----
      if (newMe != NONODE) {	/* this node removal doesn't consider duplicates */
  #ifdef DEBUG_BTREE
          sprintf(B->message, "descendBalance DELETE:  slot %d, node %d.\n", slot, getnodenumber(B, curr));
!         osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
  #endif
  
          removeEntry(B, curr, slot + (newMe != newNode));	/* removes one of two */
***************
*** 837,843 ****
  
  #ifdef DEBUG_BTREE
      sprintf(B->message, "descendBalance returns %d\n", getnodenumber(B, newNode));
!     OutputDebugString(B->message);
  #endif
      return newNode;
  }
--- 973,979 ----
  
  #ifdef DEBUG_BTREE
      sprintf(B->message, "descendBalance returns %d\n", getnodenumber(B, newNode));
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
  #endif
      return newNode;
  }
***************
*** 869,875 ****
  
  #ifdef DEBUG_BTREE
      sprintf(B->message, "MERGE:  left %d, right %d.\n", getnodenumber(B, left), getnodenumber(B, right));
!     OutputDebugString(B->message);
      showNode(B, "pre-merge anchor", anchor);
      showNode(B, "pre-merge left", left);
      showNode(B, "pre-merge right", right);
--- 1005,1011 ----
  
  #ifdef DEBUG_BTREE
      sprintf(B->message, "MERGE:  left %d, right %d.\n", getnodenumber(B, left), getnodenumber(B, right));
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      showNode(B, "pre-merge anchor", anchor);
      showNode(B, "pre-merge left", left);
      showNode(B, "pre-merge right", right);
***************
*** 883,888 ****
--- 1019,1026 ----
  #endif
          setfunkey(B, getkey(right, 1));	/* defined but maybe just deleted */
          z = getSlot(B, anchor);		/* needs the just calculated key */
+         if (z <= BTERROR)
+             return NONODE;
          setfunkey(B, getkey(anchor, z));	/* set slot to delete in anchor */
          setentry(left, numentries(left), getfunkey(B), getfirstnode(right));
      }
***************
*** 927,933 ****
               getnodenumber(B, left), 
               getnodenumber(B, right), 
               getnodenumber(B, anchor));
!     OutputDebugString(B->message);
      showNode(B, "pre-shift anchor", anchor);
      showNode(B, "pre-shift left", left);
      showNode(B, "pre-shift right", right);
--- 1065,1071 ----
               getnodenumber(B, left), 
               getnodenumber(B, right), 
               getnodenumber(B, anchor));
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      showNode(B, "pre-shift anchor", anchor);
      showNode(B, "pre-shift left", left);
      showNode(B, "pre-shift right", right);
***************
*** 940,945 ****
--- 1078,1085 ----
          x = numentries(left) + y;
          setfunkey(B, getkey(right, y + 1 - i));	/* set new anchor key value */
          z = getSlot(B, anchor);			/* find slot in anchor node */
+         if (z <= BTERROR)
+             return NONODE;
  #ifdef DEBUG_BTREE
          if (z == 0 && !isroot(anchor))
              DebugBreak();
***************
*** 977,983 ****
              pushentry(right, z, y);
          
          setfunkey(B, getkey(left, x));			/* set new anchor key value */
!         z = getSlot(B, anchor) + 1;
          if (i) {
              decentries(left);
              incentries(right);
--- 1117,1127 ----
              pushentry(right, z, y);
          
          setfunkey(B, getkey(left, x));			/* set new anchor key value */
!         z = getSlot(B, anchor);
!         if (z <= BTERROR)
!             return NONODE;
!         z += 1;
! 
          if (i) {
              decentries(left);
              incentries(right);
***************
*** 1019,1025 ****
  
  #ifdef DEBUG_BTREE
      sprintf(B->message, "SHIFT:  left %d, right %d.\n", getnodenumber(B, left), getnodenumber(B, right));
!     OutputDebugString(B->message);
      showNode(B, "post-shift anchor", anchor);
      showNode(B, "post-shift left", left);
      showNode(B, "post-shift right", right);
--- 1163,1169 ----
  
  #ifdef DEBUG_BTREE
      sprintf(B->message, "SHIFT:  left %d, right %d.\n", getnodenumber(B, left), getnodenumber(B, right));
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      showNode(B, "post-shift anchor", anchor);
      showNode(B, "post-shift left", left);
      showNode(B, "post-shift right", right);
***************
*** 1237,1297 ****
      int x;
  
      sprintf(B->message, "-  --  --  --  --  --  --  --  --  --  --  --  -\n");
!     OutputDebugString(B->message);
      sprintf(B->message, "| %-20s                        |\n", where);
!     OutputDebugString(B->message);
      sprintf(B->message, "| node %6d                 ", getnodenumber(B, n));
!     OutputDebugString(B->message);
      sprintf(B->message, "  magic    %4x  |\n", getmagic(n));
!     OutputDebugString(B->message);
      sprintf(B->message, "-  --  --  --  --  --  --  --  --  --  --  --  -\n");
!     OutputDebugString(B->message);
      sprintf(B->message, "| flags   %1d%1d%1d%1d ", isfew(n), isfull(n), isroot(n), isleaf(n));
!     OutputDebugString(B->message);
      sprintf(B->message, "| keys = %5d ", numentries(n));
!     OutputDebugString(B->message);
      sprintf(B->message, "| node = %6d  |\n", getnodenumber(B, getfirstnode(n)));
!     OutputDebugString(B->message);
      for (x = 1; x <= numentries(n); x++) {
          sprintf(B->message, "| entry %6d ", x);
!         OutputDebugString(B->message);
          sprintf(B->message, "| key = %6s ", getkey(n, x).name);
!         OutputDebugString(B->message);
          sprintf(B->message, "| node = %6d  |\n", getnodenumber(B, getnode(n, x)));
!         OutputDebugString(B->message);
      }
      sprintf(B->message, "-  --  --  --  --  --  --  --  --  --  --  --  -\n");
!     OutputDebugString(B->message);
  }
  
  /******************   B+tree class variable printer   ******************/
  void showBtree(Tree *B)
  {
      sprintf(B->message, "-  --  --  --  --  --  -\n");
!     OutputDebugString(B->message);
      sprintf(B->message, "|  B+tree  %10p  |\n", (void *) B);
!     OutputDebugString(B->message);
      sprintf(B->message, "-  --  --  --  --  --  -\n");
!     OutputDebugString(B->message);
      sprintf(B->message, "|  root        %6d  |\n", getnodenumber(B, getroot(B)));
!     OutputDebugString(B->message);
      sprintf(B->message, "|  leaf        %6d  |\n", getnodenumber(B, getleaf(B)));
!     OutputDebugString(B->message);
      sprintf(B->message, "|  fanout         %3d  |\n", getfanout(B) + 1);
!     OutputDebugString(B->message);
      sprintf(B->message, "|  minfanout      %3d  |\n", getminfanout(B, getroot(B)) + 1);
!     OutputDebugString(B->message);
      sprintf(B->message, "|  height         %3d  |\n", gettreeheight(B));
!     OutputDebugString(B->message);
      sprintf(B->message, "|  freenode    %6d  |\n", getnodenumber(B, getfirstfreenode(B)));
!     OutputDebugString(B->message);
      sprintf(B->message, "|  theKey      %6s  |\n", getfunkey(B).name);
!     OutputDebugString(B->message);
      sprintf(B->message, "|  theData     %d.%d.%d |\n", getfundata(B).volume,
               getfundata(B).vnode, getfundata(B).unique);
!     OutputDebugString(B->message);
      sprintf(B->message, "-  --  --  --  --  --  -\n");
!     OutputDebugString(B->message);
  }
  
  void 
--- 1381,1441 ----
      int x;
  
      sprintf(B->message, "-  --  --  --  --  --  --  --  --  --  --  --  -\n");
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      sprintf(B->message, "| %-20s                        |\n", where);
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      sprintf(B->message, "| node %6d                 ", getnodenumber(B, n));
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      sprintf(B->message, "  magic    %4x  |\n", getmagic(n));
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      sprintf(B->message, "-  --  --  --  --  --  --  --  --  --  --  --  -\n");
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      sprintf(B->message, "| flags   %1d%1d%1d%1d ", isfew(n), isfull(n), isroot(n), isleaf(n));
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      sprintf(B->message, "| keys = %5d ", numentries(n));
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      sprintf(B->message, "| node = %6d  |\n", getnodenumber(B, getfirstnode(n)));
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      for (x = 1; x <= numentries(n); x++) {
          sprintf(B->message, "| entry %6d ", x);
!         osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
          sprintf(B->message, "| key = %6s ", getkey(n, x).name);
!         osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
          sprintf(B->message, "| node = %6d  |\n", getnodenumber(B, getnode(n, x)));
!         osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      }
      sprintf(B->message, "-  --  --  --  --  --  --  --  --  --  --  --  -\n");
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
  }
  
  /******************   B+tree class variable printer   ******************/
  void showBtree(Tree *B)
  {
      sprintf(B->message, "-  --  --  --  --  --  -\n");
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      sprintf(B->message, "|  B+tree  %10p  |\n", (void *) B);
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      sprintf(B->message, "-  --  --  --  --  --  -\n");
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      sprintf(B->message, "|  root        %6d  |\n", getnodenumber(B, getroot(B)));
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      sprintf(B->message, "|  leaf        %6d  |\n", getnodenumber(B, getleaf(B)));
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      sprintf(B->message, "|  fanout         %3d  |\n", getfanout(B) + 1);
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      sprintf(B->message, "|  minfanout      %3d  |\n", getminfanout(B, getroot(B)) + 1);
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      sprintf(B->message, "|  height         %3d  |\n", gettreeheight(B));
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      sprintf(B->message, "|  freenode    %6d  |\n", getnodenumber(B, getfirstfreenode(B)));
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      sprintf(B->message, "|  theKey      %6s  |\n", getfunkey(B).name);
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      sprintf(B->message, "|  theData     %d.%d.%d |\n", getfundata(B).volume,
               getfundata(B).vnode, getfundata(B).unique);
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
      sprintf(B->message, "-  --  --  --  --  --  -\n");
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
  }
  
  void 
***************
*** 1303,1309 ****
  
      if (isntnode(node)) {
          sprintf(B->message, "%s - NoNode!!!\n");
!         OutputDebugString(B->message);
          return;
      } 
      
--- 1447,1453 ----
  
      if (isntnode(node)) {
          sprintf(B->message, "%s - NoNode!!!\n");
!         osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
          return;
      } 
      
***************
*** 1313,1319 ****
          sprintf(B->message, "%s - data node %d (%d.%d.%d)\n", 
                   parent_desc, getnodenumber(B, node),
                   data.fid.volume, data.fid.vnode, data.fid.unique);
!         OutputDebugString(B->message);
          return;
      } else 
          showNode(B, parent_desc, node);
--- 1457,1463 ----
          sprintf(B->message, "%s - data node %d (%d.%d.%d)\n", 
                   parent_desc, getnodenumber(B, node),
                   data.fid.volume, data.fid.vnode, data.fid.unique);
!         osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
          return;
      } else 
          showNode(B, parent_desc, node);
***************
*** 1321,1327 ****
      if ( isinternal(node) || isroot(node) ) {
          sprintf(thisnode, "parent %6d", getnodenumber(B , node));
  
!         OutputDebugString(B->message);
          for ( i= isinternal(node) ? 0 : 1; i <= numentries(node); i++ ) {
              listBtreeNodes(B, thisnode, i == 0 ? getfirstnode(node) : getnode(node, i));
          }
--- 1465,1471 ----
      if ( isinternal(node) || isroot(node) ) {
          sprintf(thisnode, "parent %6d", getnodenumber(B , node));
  
!         osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
          for ( i= isinternal(node) ? 0 : 1; i <= numentries(node); i++ ) {
              listBtreeNodes(B, thisnode, i == 0 ? getfirstnode(node) : getnode(node, i));
          }
***************
*** 1339,1357 ****
      for (slot = 1; (n != NONODE) && num && numentries(n); num--) {
          if (comparekeys(B)(getkey(n, slot),prev, 0) < 0) {
              sprintf(B->message, "BOMB %8s\n", getkey(n, slot).name);
!             OutputDebugString(B->message);
              DebugBreak();
          }
          prev = getkey(n, slot);
          data = getdatavalue(getnode(n, slot));
          sprintf(B->message, "%8s (%d.%d.%d)\n", 
                  prev.name, data.fid.volume, data.fid.vnode, data.fid.unique);
!         OutputDebugString(B->message);
          if (++slot > numentries(n))
              n = getnextnode(n), slot = 1;
      }   
      sprintf(B->message, "\n\n");
!     OutputDebugString(B->message);
  }
  
  /********************   entire B+tree data printer   *******************/
--- 1483,1501 ----
      for (slot = 1; (n != NONODE) && num && numentries(n); num--) {
          if (comparekeys(B)(getkey(n, slot),prev, 0) < 0) {
              sprintf(B->message, "BOMB %8s\n", getkey(n, slot).name);
!             osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
              DebugBreak();
          }
          prev = getkey(n, slot);
          data = getdatavalue(getnode(n, slot));
          sprintf(B->message, "%8s (%d.%d.%d)\n", 
                  prev.name, data.fid.volume, data.fid.vnode, data.fid.unique);
!         osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
          if (++slot > numentries(n))
              n = getnextnode(n), slot = 1;
      }   
      sprintf(B->message, "\n\n");
!     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
  }
  
  /********************   entire B+tree data printer   *******************/
***************
*** 1373,1379 ****
      for (slot = 1; (n != NONODE) && num && numentries(n); num--) {
          if (comparekeys(B)(getkey(n, slot),prev, 0) < 0) {
              sprintf(B->message,"BOMB %8s\n", getkey(n, slot).name);
!             OutputDebugString(B->message);
  #ifdef DEBUG_BTREE
              DebugBreak();
  #endif
--- 1517,1523 ----
      for (slot = 1; (n != NONODE) && num && numentries(n); num--) {
          if (comparekeys(B)(getkey(n, slot),prev, 0) < 0) {
              sprintf(B->message,"BOMB %8s\n", getkey(n, slot).name);
!             osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
  #ifdef DEBUG_BTREE
              DebugBreak();
  #endif
***************
*** 1385,1391 ****
                  sprintf(B->message,"BOMB %8s cannot be found\n", prev.name);
              else 
                  sprintf(B->message,"BOMB lookup(%8s) finds wrong node\n", prev.name);
!             OutputDebugString(B->message);
  #ifdef DEBUG_BTREE
              DebugBreak();
  #endif
--- 1529,1535 ----
                  sprintf(B->message,"BOMB %8s cannot be found\n", prev.name);
              else 
                  sprintf(B->message,"BOMB lookup(%8s) finds wrong node\n", prev.name);
!             osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, B->message));
  #ifdef DEBUG_BTREE
              DebugBreak();
  #endif
***************
*** 1399,1414 ****
  /* 
   * the return must be -1, 0, or 1.  stricmp() in MSVC 8.0
   * does not return only those values.
   */
  static int
  compareKeys(keyT key1, keyT key2, int flags)
  {
      int comp;
  
!     if (flags & EXACT_MATCH)
          comp = strcmp(key1.name, key2.name);
-     else
-         comp = stricmp(key1.name, key2.name);
      return (comp < 0 ? -1 : (comp > 0 ? 1 : 0));
  }
  
--- 1543,1563 ----
  /* 
   * the return must be -1, 0, or 1.  stricmp() in MSVC 8.0
   * does not return only those values.
+  *
+  * the sorting of the tree is by case insensitive sort order
+  * therefore, unless the strings actually match via a case
+  * insensitive search do we want to perform the case sensitive
+  * match.  Otherwise, the search order might be considered 
+  * to be inconsistent when the EXACT_MATCH flag is set.
   */
  static int
  compareKeys(keyT key1, keyT key2, int flags)
  {
      int comp;
  
!     comp = stricmp(key1.name, key2.name);
!     if (comp == 0 && (flags & EXACT_MATCH))
          comp = strcmp(key1.name, key2.name);
      return (comp < 0 ? -1 : (comp > 0 ? 1 : 0));
  }
  
***************
*** 1434,1439 ****
--- 1583,1590 ----
          goto done;
      }
  
+     lock_AssertAny(&op->scp->dirlock);
+ 
      QueryPerformanceCounter(&start);
  
      leafNode = bplus_Lookup(op->scp->dirBplus, key);
***************
*** 1449,1455 ****
           * If we have an ambiguous match, return an error.
           * If we have only one inexact match, return that.
           */
!         slot = findKey(op->scp->dirBplus, leafNode, 1, numentries(leafNode));
          firstDataNode = getnode(leafNode, slot);
  
          for ( dataNode = firstDataNode; dataNode; dataNode = nextDataNode) {
--- 1600,1611 ----
           * If we have an ambiguous match, return an error.
           * If we have only one inexact match, return that.
           */
!         slot = getSlot(op->scp->dirBplus, leafNode);
!         if (slot <= BTERROR) {
!             op->scp->dirDataVersion = 0;
!             rc = (slot == BTERROR ? EINVAL : ENOENT);
!             goto done;
!         }
          firstDataNode = getnode(leafNode, slot);
  
          for ( dataNode = firstDataNode; dataNode; dataNode = nextDataNode) {
***************
*** 1508,1513 ****
--- 1664,1672 ----
          goto done;
      }
  
+ 
+     lock_AssertWrite(&op->scp->dirlock);
+ 
      data.fid.cell = cfid->cell;
      data.fid.volume = cfid->volume;
      data.fid.vnode = cfid->vnode;
***************
*** 1559,1564 ****
--- 1718,1725 ----
          goto done;
      }
  
+     lock_AssertWrite(&op->scp->dirlock);
+ 
      QueryPerformanceCounter(&start);
  
      bplus_remove_entry++;
***************
*** 1582,1588 ****
                   * If we have an ambiguous match, return an error.
                   * If we have only one inexact match, return that.
                   */
!                 slot = findKey(op->scp->dirBplus, leafNode, 1, numentries(leafNode));
                  firstDataNode = getnode(leafNode, slot);
  
                  for ( dataNode = firstDataNode; dataNode; dataNode = nextDataNode) {
--- 1743,1754 ----
                   * If we have an ambiguous match, return an error.
                   * If we have only one inexact match, return that.
                   */
!                 slot = getSlot(op->scp->dirBplus, leafNode);
!                 if (slot <= BTERROR) {
!                     op->scp->dirDataVersion = 0;
!                     rc = EINVAL;
!                     goto done;
!                 }
                  firstDataNode = getnode(leafNode, slot);
  
                  for ( dataNode = firstDataNode; dataNode; dataNode = nextDataNode) {
***************
*** 1634,1640 ****
                   * If we have an ambiguous match, return an error.
                   * If we have only one inexact match, return that.
                   */
!                 slot = findKey(op->scp->dirBplus, leafNode, 1, numentries(leafNode));
                  firstDataNode = getnode(leafNode, slot);
  
                  for ( dataNode = firstDataNode; dataNode; dataNode = nextDataNode) {
--- 1800,1812 ----
                   * If we have an ambiguous match, return an error.
                   * If we have only one inexact match, return that.
                   */
!                 slot = getSlot(op->scp->dirBplus, leafNode);
!                 if (slot <= BTERROR) {
!                     op->scp->dirDataVersion = 0;
!                     rc = EINVAL;
!                     goto done;
! 
!                 }
                  firstDataNode = getnode(leafNode, slot);
  
                  for ( dataNode = firstDataNode; dataNode; dataNode = nextDataNode) {
***************
*** 1658,1668 ****
              }
  
              if (rc != CM_ERROR_AMBIGUOUS_FILENAME) {
! 				if (longname) {
! 					key.name = longname;
! 					delete(op->scp->dirBplus, key);
! 	                key.name = entry;
! 				}
                  delete(op->scp->dirBplus, key);
              }
          }
--- 1830,1840 ----
              }
  
              if (rc != CM_ERROR_AMBIGUOUS_FILENAME) {
!                 if (longname) {
!                     key.name = longname;
!                     delete(op->scp->dirBplus, key);
!                     key.name = entry;
!                 }
                  delete(op->scp->dirBplus, key);
              }
          }
***************
*** 1723,1729 ****
      osi_hyper_t thyper;
      LARGE_INTEGER start, end;
  
!     osi_assert(scp->dirBplus == NULL);
  
      QueryPerformanceCounter(&start);
      bplus_build_tree++;
--- 1895,1903 ----
      osi_hyper_t thyper;
      LARGE_INTEGER start, end;
  
!     osi_assertx(scp->dirBplus == NULL, "cm_BPlusDirBuildTree called on non-empty tree");
! 
!     lock_AssertWrite(&scp->dirlock);
  
      QueryPerformanceCounter(&start);
      bplus_build_tree++;
***************
*** 1743,1748 ****
--- 1917,1925 ----
  
      bplus_build_time += (end.QuadPart - start.QuadPart);
  
+ #if 0
+     cm_BPlusDirEnumTest(scp, 1);
+ #endif
      return rc;
  }
  
***************
*** 1802,1805 ****
--- 1979,2238 ----
      afsi_log("            Build: %-16I64d", bplus_build_time);
      afsi_log("             Free: %-16I64d", bplus_free_time);
  }
+ 
+ static cm_direnum_t * 
+ cm_BPlusEnumAlloc(afs_uint32 entries)
+ {
+     cm_direnum_t * enump;
+     size_t	   size;
+ 
+     if (entries == 0)
+ 	return NULL;
+ 
+     size = sizeof(cm_direnum_t)+(entries-1)*sizeof(cm_direnum_entry_t);
+     enump = (cm_direnum_t *)malloc(size);
+     memset(enump, 0, size);
+     enump->count = entries;
+     return enump;
+ }
+ 
+ long 
+ cm_BPlusDirEnumerate(cm_scache_t *scp, afs_uint32 locked, 
+                      char * maskp, cm_direnum_t **enumpp)
+ {
+     afs_uint32 count = 0, slot, numentries;
+     Nptr leafNode = NONODE, nextLeafNode;
+     Nptr firstDataNode, dataNode, nextDataNode;
+     cm_direnum_t * enump;
+     long rc = 0;
+     char buffer[512];
+ 
+     osi_Log0(afsd_logp, "cm_BPlusDirEnumerate start");
+ 
+     /* Read lock the bplus tree so the data can't change */
+     if (!locked)
+ 	lock_ObtainRead(&scp->dirlock);
+ 
+     if (scp->dirBplus == NULL) {
+ 	osi_Log0(afsd_logp, "cm_BPlusDirEnumerate No BPlus Tree");
+ 	goto done;
+     }
+ 
+     /* Compute the number of entries */
+     for (count = 0, leafNode = getleaf(scp->dirBplus); leafNode; leafNode = nextLeafNode) {
+ 
+ 	for ( slot = 1, numentries = numentries(leafNode); slot <= numentries; slot++) {
+ 	    firstDataNode = getnode(leafNode, slot);
+ 
+ 	    for ( dataNode = firstDataNode; dataNode; dataNode = nextDataNode) {
+                 if (maskp == NULL) {
+                     /* name is in getdatakey(dataNode) */
+                     if (getdatavalue(dataNode).longname != NULL ||
+                         cm_Is8Dot3(getdatakey(dataNode).name))
+                         count++;
+                 } else {
+ 		    if (cm_Is8Dot3(getdatakey(dataNode).name) && 
+                         smb_V3MatchMask(getdatakey(dataNode).name, maskp, CM_FLAG_CASEFOLD) ||
+                         getdatavalue(dataNode).longname == NULL &&
+                         smb_V3MatchMask(getdatavalue(dataNode).longname, maskp, CM_FLAG_CASEFOLD))
+                         count++;
+                 }
+ 		nextDataNode = getdatanext(dataNode);
+ 	    }
+ 	}
+ 
+ 	nextLeafNode = getnextnode(leafNode);
+     }   
+ 
+     sprintf(buffer, "BPlusTreeEnumerate count = %d", count);
+     osi_Log1(afsd_logp, "BPlus: %s", osi_LogSaveString(afsd_logp, buffer));
+ 
+     /* Allocate the enumeration object */
+     enump = cm_BPlusEnumAlloc(count);
+     if (enump == NULL) {
+ 	osi_Log0(afsd_logp, "cm_BPlusDirEnumerate Alloc failed");
+ 	rc = ENOMEM;
+ 	goto done;
+     }
+ 	
+     /* Copy the name and fid for each longname entry into the enumeration */
+     for (count = 0, leafNode = getleaf(scp->dirBplus); leafNode; leafNode = nextLeafNode) {
+ 
+ 	for ( slot = 1, numentries = numentries(leafNode); slot <= numentries; slot++) {
+ 	    firstDataNode = getnode(leafNode, slot);
+ 
+ 	    for ( dataNode = firstDataNode; dataNode; dataNode = nextDataNode) {
+                 char * name;
+                 int hasShortName;
+                 int includeIt = 0;
+ 
+                 if (maskp == NULL) {
+                     if (getdatavalue(dataNode).longname != NULL ||
+                          cm_Is8Dot3(getdatakey(dataNode).name)) 
+                     {
+                         includeIt = 1;
+                     }
+                 } else {
+ 		    if (cm_Is8Dot3(getdatakey(dataNode).name) && 
+                         smb_V3MatchMask(getdatakey(dataNode).name, maskp, CM_FLAG_CASEFOLD) ||
+                         getdatavalue(dataNode).longname == NULL &&
+                          smb_V3MatchMask(getdatavalue(dataNode).longname, maskp, CM_FLAG_CASEFOLD)) 
+                     {
+                         includeIt = 1;
+                     }
+                 }
+ 
+                 if (includeIt) {
+                     if (getdatavalue(dataNode).longname) {
+                         name = strdup(getdatavalue(dataNode).longname);
+                         hasShortName = 1;
+                     } else {
+                         name = strdup(getdatakey(dataNode).name);
+                         hasShortName = 0;
+                     }
+ 
+                     if (name == NULL) {
+                         osi_Log0(afsd_logp, "cm_BPlusDirEnumerate strdup failed");
+                         rc = ENOMEM;
+                         goto done;
+                     }
+                     enump->entry[count].name = name;
+                     enump->entry[count].fid  = getdatavalue(dataNode).fid;
+                     if (hasShortName)
+                         strncpy(enump->entry[count].shortName, getdatakey(dataNode).name, 
+                                 sizeof(enump->entry[count].shortName));
+                     else
+                         enump->entry[count].shortName[0] = '\0';
+                     count++;
+                 }
+ 		nextDataNode = getdatanext(dataNode);
+ 	    }
+ 	}
+ 
+ 	nextLeafNode = getnextnode(leafNode);
+     }   
+ 
+   done:
+     if (!locked)
+ 	lock_ReleaseRead(&scp->dirlock);
+ 
+     /* if we failed, cleanup any mess */
+     if (rc != 0) {
+ 	osi_Log0(afsd_logp, "cm_BPlusDirEnumerate rc != 0");
+ 	if (enump) {
+ 	    for ( count = 0; count < enump->count && enump->entry[count].name; count++ ) {
+ 		free(enump->entry[count].name);
+ 	    }
+ 	    free(enump);
+ 	    enump = NULL;
+ 	}
+     }
+ 
+     osi_Log0(afsd_logp, "cm_BPlusDirEnumerate end");
+     *enumpp = enump;
+     return rc;
+ }
+ 
+ long 
+ cm_BPlusDirNextEnumEntry(cm_direnum_t *enump, cm_direnum_entry_t **entrypp)
+ {	
+     if (enump == NULL || entrypp == NULL || enump->next > enump->count) {
+ 	if (entrypp)
+ 	    *entrypp = NULL;
+ 	osi_Log0(afsd_logp, "cm_BPlusDirNextEnumEntry invalid input");
+ 	return CM_ERROR_INVAL;			      \
+     }
+ 
+     *entrypp = &enump->entry[enump->next++];
+     if ( enump->next == enump->count ) {
+ 	osi_Log0(afsd_logp, "cm_BPlusDirNextEnumEntry STOPNOW");
+ 	return CM_ERROR_STOPNOW;
+     }
+     else {
+ 	osi_Log0(afsd_logp, "cm_BPlusDirNextEnumEntry SUCCESS");
+ 	return 0;
+     }
+ }
+ 
+ long 
+ cm_BPlusDirFreeEnumeration(cm_direnum_t *enump)
+ {
+     afs_uint32 count;
+ 
+     osi_Log0(afsd_logp, "cm_BPlusDirFreeEnumeration");
+ 
+     if (enump) {
+ 	for ( count = 0; count < enump->count && enump->entry[count].name; count++ ) {
+ 	    free(enump->entry[count].name);
+ 	}
+ 	free(enump);
+     }
+     return 0;
+ }
+ 
+ long
+ cm_BPlusDirEnumTest(cm_scache_t * dscp, afs_uint32 locked)
+ {
+     cm_direnum_t * 	 enump = NULL;
+     cm_direnum_entry_t * entryp;
+     long 	   	 code;
+ 
+     osi_Log0(afsd_logp, "cm_BPlusDirEnumTest start");
+ 
+     for (code = cm_BPlusDirEnumerate(dscp, locked, NULL, &enump); code == 0; ) {
+ 	code = cm_BPlusDirNextEnumEntry(enump, &entryp);
+ 	if (code == 0 || code == CM_ERROR_STOPNOW) {
+ 	    char buffer[1024];
+ 	    cm_scache_t *scp;
+ 	    char * type = "ScpNotFound";
+ 	    afs_int32 dv = -1;
+ 
+ 	    scp = cm_FindSCache(&entryp->fid);
+ 	    if (scp) {
+ 		switch (scp->fileType) {
+ 		case CM_SCACHETYPE_FILE	:
+ 		    type = "File";
+ 		    break;
+ 		case CM_SCACHETYPE_DIRECTORY	:
+ 		    type = "Directory";
+ 		    break;
+ 		case CM_SCACHETYPE_SYMLINK	:
+ 		    type = "Symlink";
+ 		    break;
+ 		case CM_SCACHETYPE_MOUNTPOINT:
+ 		    type = "MountPoint";
+ 		    break;
+ 		case CM_SCACHETYPE_DFSLINK   :
+ 		    type = "Dfs";
+ 		    break;
+ 		case CM_SCACHETYPE_INVALID   :
+ 		    type = "Invalid";
+ 		    break;
+ 		default:
+ 		    type = "Unknown";
+ 		    break;
+ 		}
+ 
+ 		dv = scp->dataVersion;
+ 	    cm_ReleaseSCache(scp);
+ 	    }
+ 
+ 	    sprintf(buffer, "'%s' Fid = (%d,%d,%d,%d) Short = '%s' Type %s DV %d",
+ 		    entryp->name,
+ 		    entryp->fid.cell, entryp->fid.volume, entryp->fid.vnode, entryp->fid.unique,
+ 		    entryp->shortName,
+ 		    type, 
+ 		    dv);
+ 
+ 	    osi_Log0(afsd_logp, osi_LogSaveString(afsd_logp, buffer));
+ 	}
+     }
+ 
+     if (enump)
+ 	cm_BPlusDirFreeEnumeration(enump);
+ 
+     osi_Log0(afsd_logp, "cm_BPlusDirEnumTest end");
+ 
+     return 0;
+ }
  #endif /* USE_BPLUS */
Index: openafs/src/WINNT/afsd/cm_btree.h
diff -c openafs/src/WINNT/afsd/cm_btree.h:1.1.2.5 openafs/src/WINNT/afsd/cm_btree.h:1.1.2.7
*** openafs/src/WINNT/afsd/cm_btree.h:1.1.2.5	Wed Sep 19 23:55:42 2007
--- openafs/src/WINNT/afsd/cm_btree.h	Mon Nov  5 13:26:49 2007
***************
*** 107,116 ****
      unsigned int	height;		/* nodes traversed from root to leaves */
      Nptr		pool;		/* list of all nodes */
      Nptr                empty;          /* list of empty nodes */
-     keyT		theKey;		/*  the key value used in tree operations */
-     dataT		theData;	/*  data used for insertions/deletions */
      union {			        /* nodes to change in insert and delete */
!         Nptr	split;
          Nptr	merge;
      } branch;
      KeyCmp	keycmp;		        /* pointer to function comparing two keys */
--- 107,114 ----
      unsigned int	height;		/* nodes traversed from root to leaves */
      Nptr		pool;		/* list of all nodes */
      Nptr                empty;          /* list of empty nodes */
      union {			        /* nodes to change in insert and delete */
!         Nptr	split;                  /* protected by scp->dirlock write-lock */
          Nptr	merge;
      } branch;
      KeyCmp	keycmp;		        /* pointer to function comparing two keys */
***************
*** 145,154 ****
--- 143,176 ----
  void cm_BPlusDumpStats(void);
  int cm_MemDumpBPlusStats(FILE *outputFile, char *cookie, int lock);
  
+ 
+ /******************* directory enumeration operations ****************/
+ typedef struct cm_direnum_entry {
+     char * 	name;
+     cm_fid_t 	fid;
+     char        shortName[13];
+ } cm_direnum_entry_t;
+ 
+ typedef struct cm_direnum {
+     afs_uint32		count;
+     afs_uint32  	next;
+     cm_direnum_entry_t 	entry[1];
+ } cm_direnum_t;
+ 
+ long cm_BPlusDirEnumerate(cm_scache_t *scp, afs_uint32 locked, char *maskp, cm_direnum_t **enumpp);
+ long cm_BPlusDirNextEnumEntry(cm_direnum_t *enump, cm_direnum_entry_t **entrypp);
+ long cm_BPlusDirFreeEnumeration(cm_direnum_t *enump);
+ long cm_BPlusDirEnumTest(cm_scache_t * dscp, afs_uint32 locked);
+ 
+ long cm_InitBPlusDir(void);
+ 
+ /************ Statistic Counter ***************************************/
+ 
  extern afs_uint32 bplus_free_tree;
  extern afs_uint32 bplus_dv_error;
  extern afs_uint64 bplus_free_time;
  
+ 
  /************ Accessor Macros *****************************************/
  			
  /* low level definition of Nptr value usage */
***************
*** 227,240 ****
  #define xferentry(j, q, v, z) _xferentry(j, q, v, z)
  #define setentry(j, q, v, z) _setentry(j, q, v, z)
  
- 
- /* access key and data values for B+tree methods */
- /* pass values to getSlot(), descend...() */
- #define getfunkey(B) ((B)->theKey)
- #define getfundata(B) ((B)->theData)
- #define setfunkey(B,v) ((B)->theKey = (v))
- #define setfundata(B,v) ((B)->theData = (v))
- 
  /* define number of B+tree nodes for free node pool */
  #define getpoolsize(B) ((B)->poolsize)
  #define setpoolsize(B,v) ((B)->poolsize = (v))
--- 249,254 ----
Index: openafs/src/WINNT/afsd/cm_buf.c
diff -c openafs/src/WINNT/afsd/cm_buf.c:1.31.2.20 openafs/src/WINNT/afsd/cm_buf.c:1.31.2.22
*** openafs/src/WINNT/afsd/cm_buf.c:1.31.2.20	Tue Sep 18 12:59:23 2007
--- openafs/src/WINNT/afsd/cm_buf.c	Sun Nov  4 19:24:46 2007
***************
*** 91,97 ****
  
  void buf_HoldLocked(cm_buf_t *bp)
  {
!     osi_assert(bp->magic == CM_BUF_MAGIC);
      bp->refCount++;
  }
  
--- 91,97 ----
  
  void buf_HoldLocked(cm_buf_t *bp)
  {
!     osi_assertx(bp->magic == CM_BUF_MAGIC,"incorrect cm_buf_t magic");
      bp->refCount++;
  }
  
***************
*** 107,118 ****
  void buf_ReleaseLocked(cm_buf_t *bp)
  {
      /* ensure that we're in the LRU queue if our ref count is 0 */
!     osi_assert(bp->magic == CM_BUF_MAGIC);
  #ifdef DEBUG
      if (bp->refCount == 0)
  	osi_panic("buf refcount 0",__FILE__,__LINE__);;
  #else
!     osi_assert(bp->refCount > 0);
  #endif
      if (--bp->refCount == 0) {
          if (!(bp->flags & CM_BUF_INLRU)) {
--- 107,118 ----
  void buf_ReleaseLocked(cm_buf_t *bp)
  {
      /* ensure that we're in the LRU queue if our ref count is 0 */
!     osi_assertx(bp->magic == CM_BUF_MAGIC,"incorrect cm_buf_t magic");
  #ifdef DEBUG
      if (bp->refCount == 0)
  	osi_panic("buf refcount 0",__FILE__,__LINE__);;
  #else
!     osi_assertx(bp->refCount > 0, "cm_buf_t refCount == 0");
  #endif
      if (--bp->refCount == 0) {
          if (!(bp->flags & CM_BUF_INLRU)) {
***************
*** 327,334 ****
              cm_data.buf_allp = NULL;
              
              for (i=0; i<cm_data.buf_nbuffers; i++) {
!                 osi_assert(bp >= cm_data.bufHeaderBaseAddress && bp < (cm_buf_t *)cm_data.bufDataBaseAddress);
!                 osi_assert(data >= cm_data.bufDataBaseAddress && data < cm_data.bufEndOfData);
                  
                  /* allocate and zero some storage */
                  memset(bp, 0, sizeof(cm_buf_t));
--- 327,336 ----
              cm_data.buf_allp = NULL;
              
              for (i=0; i<cm_data.buf_nbuffers; i++) {
!                 osi_assertx(bp >= cm_data.bufHeaderBaseAddress && bp < (cm_buf_t *)cm_data.bufDataBaseAddress, 
!                             "invalid cm_buf_t address");
!                 osi_assertx(data >= cm_data.bufDataBaseAddress && data < cm_data.bufEndOfData,
!                             "invalid cm_buf_t data address");
                  
                  /* allocate and zero some storage */
                  memset(bp, 0, sizeof(cm_buf_t));
***************
*** 482,489 ****
      int release = 0;
  
      if (scp)
!         osi_assert(scp->magic == CM_SCACHE_MAGIC);
!     osi_assert(bp->magic == CM_BUF_MAGIC);
  
      while (1) {
          /* if no IO is happening, we're done */
--- 484,491 ----
      int release = 0;
  
      if (scp)
!         osi_assertx(scp->magic == CM_SCACHE_MAGIC, "invalid cm_scache_t magic");
!     osi_assertx(bp->magic == CM_BUF_MAGIC, "invalid cm_buf_t magic");
  
      while (1) {
          /* if no IO is happening, we're done */
***************
*** 595,601 ****
      cm_scache_t * scp = NULL;
      osi_hyper_t offset;
  
!     osi_assert(bp->magic == CM_BUF_MAGIC);
  
      while ((bp->flags & CM_BUF_DIRTY) == CM_BUF_DIRTY) {
  	isdirty = 1;
--- 597,603 ----
      cm_scache_t * scp = NULL;
      osi_hyper_t offset;
  
!     osi_assertx(bp->magic == CM_BUF_MAGIC, "invalid cm_buf_t magic");
  
      while ((bp->flags & CM_BUF_DIRTY) == CM_BUF_DIRTY) {
  	isdirty = 1;
***************
*** 675,681 ****
      cm_buf_t *tbp;
      cm_buf_t *prevBp, *nextBp;
  
!     osi_assert(bp->magic == CM_BUF_MAGIC);
  
      /* if we get here, we know that the buffer still has a 0 ref count,
       * and that it is clean and has no currently pending I/O.  This is
--- 677,683 ----
      cm_buf_t *tbp;
      cm_buf_t *prevBp, *nextBp;
  
!     osi_assertx(bp->magic == CM_BUF_MAGIC, "invalid cm_buf_t magic");
  
      /* if we get here, we know that the buffer still has a 0 ref count,
       * and that it is clean and has no currently pending I/O.  This is
***************
*** 687,694 ****
      osi_Log3( buf_logp, "buf_Recycle recycles 0x%p, off 0x%x:%08x",
                bp, bp->offset.HighPart, bp->offset.LowPart);
  
!     osi_assert(bp->refCount == 0);
!     osi_assert(!(bp->flags & (CM_BUF_READING | CM_BUF_WRITING | CM_BUF_DIRTY)));
      lock_AssertWrite(&buf_globalLock);
  
      if (bp->flags & CM_BUF_INHASH) {
--- 689,697 ----
      osi_Log3( buf_logp, "buf_Recycle recycles 0x%p, off 0x%x:%08x",
                bp, bp->offset.HighPart, bp->offset.LowPart);
  
!     osi_assertx(bp->refCount == 0, "cm_buf_t refcount != 0");
!     osi_assertx(!(bp->flags & (CM_BUF_READING | CM_BUF_WRITING | CM_BUF_DIRTY)),
!                 "incorrect cm_buf_t flags");
      lock_AssertWrite(&buf_globalLock);
  
      if (bp->flags & CM_BUF_INHASH) {
***************
*** 1036,1042 ****
       */
      if (created) {
          /* load the page; freshly created pages should be idle */
!         osi_assert(!(bp->flags & (CM_BUF_READING | CM_BUF_WRITING)));
  
          /* start the I/O; may drop lock */
          bp->flags |= CM_BUF_READING;
--- 1039,1045 ----
       */
      if (created) {
          /* load the page; freshly created pages should be idle */
!         osi_assertx(!(bp->flags & (CM_BUF_READING | CM_BUF_WRITING)), "incorrect cm_buf_t flags");
  
          /* start the I/O; may drop lock */
          bp->flags |= CM_BUF_READING;
***************
*** 1146,1152 ****
  long buf_CleanAsync(cm_buf_t *bp, cm_req_t *reqp)
  {
      long code;
!     osi_assert(bp->magic == CM_BUF_MAGIC);
  
      lock_ObtainMutex(&bp->mx);
      code = buf_CleanAsyncLocked(bp, reqp);
--- 1149,1155 ----
  long buf_CleanAsync(cm_buf_t *bp, cm_req_t *reqp)
  {
      long code;
!     osi_assertx(bp->magic == CM_BUF_MAGIC, "invalid cm_buf_t magic");
  
      lock_ObtainMutex(&bp->mx);
      code = buf_CleanAsyncLocked(bp, reqp);
***************
*** 1158,1164 ****
  /* wait for a buffer's cleaning to finish */
  void buf_CleanWait(cm_scache_t * scp, cm_buf_t *bp)
  {
!     osi_assert(bp->magic == CM_BUF_MAGIC);
  
      lock_ObtainMutex(&bp->mx);
      if (bp->flags & CM_BUF_WRITING) {
--- 1161,1167 ----
  /* wait for a buffer's cleaning to finish */
  void buf_CleanWait(cm_scache_t * scp, cm_buf_t *bp)
  {
!     osi_assertx(bp->magic == CM_BUF_MAGIC, "invalid cm_buf_t magic");
  
      lock_ObtainMutex(&bp->mx);
      if (bp->flags & CM_BUF_WRITING) {
***************
*** 1174,1181 ****
   */
  void buf_SetDirty(cm_buf_t *bp, afs_uint32 offset, afs_uint32 length)
  {
!     osi_assert(bp->magic == CM_BUF_MAGIC);
!     osi_assert(bp->refCount > 0);
  
      lock_ObtainWrite(&buf_globalLock);
      if (bp->flags & CM_BUF_DIRTY) {
--- 1177,1184 ----
   */
  void buf_SetDirty(cm_buf_t *bp, afs_uint32 offset, afs_uint32 length)
  {
!     osi_assertx(bp->magic == CM_BUF_MAGIC, "invalid cm_buf_t magic");
!     osi_assertx(bp->refCount > 0, "cm_buf_t refcount 0");
  
      lock_ObtainWrite(&buf_globalLock);
      if (bp->flags & CM_BUF_DIRTY) {
***************
*** 1425,1431 ****
                   * visible again.
                   */
                  bufferPos = sizep->LowPart & (cm_data.buf_blockSize - 1);
!                 osi_assert(bufferPos != 0);
                  memset(bufp->datap + bufferPos, 0,
                          cm_data.buf_blockSize - bufferPos);
              }
--- 1428,1434 ----
                   * visible again.
                   */
                  bufferPos = sizep->LowPart & (cm_data.buf_blockSize - 1);
!                 osi_assertx(bufferPos != 0, "non-zero bufferPos");
                  memset(bufp->datap + bufferPos, 0,
                          cm_data.buf_blockSize - bufferPos);
              }
***************
*** 1554,1559 ****
--- 1557,1564 ----
      unsigned int i;
      int found = 0;
  
+     lock_AssertMutex(&scp->mx);
+ 
      i = BUF_FILEHASH(&scp->fid);
  
      lock_ObtainWrite(&buf_globalLock);
Index: openafs/src/WINNT/afsd/cm_callback.c
diff -c openafs/src/WINNT/afsd/cm_callback.c:1.41.4.20 openafs/src/WINNT/afsd/cm_callback.c:1.41.4.21
*** openafs/src/WINNT/afsd/cm_callback.c:1.41.4.20	Sat Oct 20 00:03:04 2007
--- openafs/src/WINNT/afsd/cm_callback.c	Sun Nov  4 19:24:46 2007
***************
*** 1420,1426 ****
  #ifndef SIZE_MAX
  #define SIZE_MAX UINT_MAX
  #endif
!     osi_assert(allocsize < SIZE_MAX);
  #endif
      *configCount = (afs_uint32)allocsize;
      config->cacheConfig_val = t_config;
--- 1420,1426 ----
  #ifndef SIZE_MAX
  #define SIZE_MAX UINT_MAX
  #endif
!     osi_assertx(allocsize < SIZE_MAX, "allocsize >= SIZE_MAX");
  #endif
      *configCount = (afs_uint32)allocsize;
      config->cacheConfig_val = t_config;
***************
*** 1551,1560 ****
  
      lock_ObtainWrite(&cm_callbackLock);
      if (flags & CM_CALLBACK_MAINTAINCOUNT) {
!         osi_assert(cm_activeCallbackGrantingCalls > 0);
      }
      else {
!         osi_assert(cm_activeCallbackGrantingCalls-- > 0);
      }
      if (cm_activeCallbackGrantingCalls == 0) 
          freeFlag = 1;
--- 1551,1562 ----
  
      lock_ObtainWrite(&cm_callbackLock);
      if (flags & CM_CALLBACK_MAINTAINCOUNT) {
!         osi_assertx(cm_activeCallbackGrantingCalls > 0, 
!                     "CM_CALLBACK_MAINTAINCOUNT && cm_activeCallbackGrantingCalls == 0");
      }
      else {
!         osi_assertx(cm_activeCallbackGrantingCalls-- > 0,
!                     "!CM_CALLBACK_MAINTAINCOUNT && cm_activeCallbackGrantingCalls == 0");
      }
      if (cm_activeCallbackGrantingCalls == 0) 
          freeFlag = 1;
Index: openafs/src/WINNT/afsd/cm_conn.c
diff -c openafs/src/WINNT/afsd/cm_conn.c:1.49.2.22 openafs/src/WINNT/afsd/cm_conn.c:1.49.2.24
*** openafs/src/WINNT/afsd/cm_conn.c:1.49.2.22	Thu Sep 13 13:59:21 2007
--- openafs/src/WINNT/afsd/cm_conn.c	Sun Nov  4 19:24:46 2007
***************
*** 36,42 ****
  void cm_PutConn(cm_conn_t *connp)
  {
  	lock_ObtainWrite(&cm_connLock);
! 	osi_assert(connp->refCount-- > 0);
  	lock_ReleaseWrite(&cm_connLock);
  }
  
--- 36,42 ----
  void cm_PutConn(cm_conn_t *connp)
  {
  	lock_ObtainWrite(&cm_connLock);
! 	osi_assertx(connp->refCount-- > 0, "cm_conn_t refcount 0");
  	lock_ReleaseWrite(&cm_connLock);
  }
  
***************
*** 236,242 ****
              cm_CheckServers(CM_FLAG_CHECKDOWNSERVERS, cellp);
              retry = 1;
          }
!     } 
  
      /* if there is nosuchvolume, then we have a situation in which a 
       * previously known volume no longer has a set of servers 
--- 236,250 ----
              cm_CheckServers(CM_FLAG_CHECKDOWNSERVERS, cellp);
              retry = 1;
          }
!     }
! 
!     else if (errorCode == UAEWOULDBLOCK || errorCode == EWOULDBLOCK ||
!               errorCode == UAEAGAIN || errorCode == EAGAIN) {
!         if (timeLeft > 5 ) {
!             thrd_Sleep(1000);
!             retry = 1;
!         }
!     }
  
      /* if there is nosuchvolume, then we have a situation in which a 
       * previously known volume no longer has a set of servers 
***************
*** 625,630 ****
--- 633,640 ----
  	    case UAENOENT          : s = "UAENOENT";           break;
  	    case VICECONNBAD	   : s = "VICECONNBAD";	       break;
  	    case VICETOKENDEAD     : s = "VICETOKENDEAD";      break;
+             case WSAEWOULDBLOCK    : s = "WSAEWOULDBLOCK";     break;
+             case UAEWOULDBLOCK     : s = "UAEWOULDBLOCK";      break;
  	    case CM_ERROR_NOSUCHCELL	    : s = "CM_ERROR_NOSUCHCELL";         break; 			
  	    case CM_ERROR_NOSUCHVOLUME	    : s = "CM_ERROR_NOSUCHVOLUME";       break; 			
  	    case CM_ERROR_TIMEDOUT	    : s = "CM_ERROR_TIMEDOUT";           break; 		
***************
*** 832,838 ****
          serviceID = 52;
      }
      else {
!         osi_assert(serverp->type == CM_SERVER_FILE);
          port = htons(7000);
          serviceID = 1;
      }
--- 842,848 ----
          serviceID = 52;
      }
      else {
!         osi_assertx(serverp->type == CM_SERVER_FILE, "incorrect server type");
          port = htons(7000);
          serviceID = 1;
      }
***************
*** 852,858 ****
          tcp->cryptlevel = rxkad_clear;
          secObjp = rxnull_NewClientSecurityObject();
      }
!     osi_assert(secObjp != NULL);
      tcp->callp = rx_NewConnection(serverp->addr.sin_addr.s_addr,
                                    port,
                                    serviceID,
--- 862,868 ----
          tcp->cryptlevel = rxkad_clear;
          secObjp = rxnull_NewClientSecurityObject();
      }
!     osi_assertx(secObjp != NULL, "null rx_securityClass");
      tcp->callp = rx_NewConnection(serverp->addr.sin_addr.s_addr,
                                    port,
                                    serviceID,
Index: openafs/src/WINNT/afsd/cm_daemon.c
diff -c openafs/src/WINNT/afsd/cm_daemon.c:1.16.4.16 openafs/src/WINNT/afsd/cm_daemon.c:1.16.4.17
*** openafs/src/WINNT/afsd/cm_daemon.c:1.16.4.16	Thu Jul  5 15:22:15 2007
--- openafs/src/WINNT/afsd/cm_daemon.c	Sun Nov  4 19:24:46 2007
***************
*** 101,107 ****
  	}
  
          osi_QRemoveHT((osi_queue_t **) &cm_bkgListp, (osi_queue_t **) &cm_bkgListEndp, &rp->q);
!         osi_assert(cm_bkgQueueCount-- > 0);
          lock_ReleaseWrite(&cm_daemonLock);
  
  	osi_Log1(afsd_logp,"cm_BkgDaemon processing request 0x%p", rp);
--- 101,107 ----
  	}
  
          osi_QRemoveHT((osi_queue_t **) &cm_bkgListp, (osi_queue_t **) &cm_bkgListEndp, &rp->q);
!         osi_assertx(cm_bkgQueueCount-- > 0, "cm_bkgQueueCount 0");
          lock_ReleaseWrite(&cm_daemonLock);
  
  	osi_Log1(afsd_logp,"cm_BkgDaemon processing request 0x%p", rp);
***************
*** 471,491 ****
  	/* creating IP Address Change monitor daemon */
          phandle = thrd_Create((SecurityAttrib) 0, 0,
                                 (ThreadFunc) cm_IpAddrDaemon, 0, 0, &pid, "cm_IpAddrDaemon");
!         osi_assert(phandle != NULL);
          thrd_CloseHandle(phandle);
  #endif /* DJGPP */
  
          /* creating pinging daemon */
          phandle = thrd_Create((SecurityAttrib) 0, 0,
                                 (ThreadFunc) cm_Daemon, 0, 0, &pid, "cm_Daemon");
!         osi_assert(phandle != NULL);
          thrd_CloseHandle(phandle);
  
  	for(i=0; i < nDaemons; i++) {
              phandle = thrd_Create((SecurityAttrib) 0, 0,
                                     (ThreadFunc) cm_BkgDaemon, 0, 0, &pid,
                                     "cm_BkgDaemon");
!             osi_assert(phandle != NULL);
              thrd_CloseHandle(phandle);
          }
      }
--- 471,491 ----
  	/* creating IP Address Change monitor daemon */
          phandle = thrd_Create((SecurityAttrib) 0, 0,
                                 (ThreadFunc) cm_IpAddrDaemon, 0, 0, &pid, "cm_IpAddrDaemon");
!         osi_assertx(phandle != NULL, "cm_IpAddrDaemon thread creation failure");
          thrd_CloseHandle(phandle);
  #endif /* DJGPP */
  
          /* creating pinging daemon */
          phandle = thrd_Create((SecurityAttrib) 0, 0,
                                 (ThreadFunc) cm_Daemon, 0, 0, &pid, "cm_Daemon");
!         osi_assertx(phandle != NULL, "cm_Daemon thread creation failure");
          thrd_CloseHandle(phandle);
  
  	for(i=0; i < nDaemons; i++) {
              phandle = thrd_Create((SecurityAttrib) 0, 0,
                                     (ThreadFunc) cm_BkgDaemon, 0, 0, &pid,
                                     "cm_BkgDaemon");
!             osi_assertx(phandle != NULL, "cm_BkgDaemon thread creation failure");
              thrd_CloseHandle(phandle);
          }
      }
Index: openafs/src/WINNT/afsd/cm_dcache.c
diff -c openafs/src/WINNT/afsd/cm_dcache.c:1.30.2.19 openafs/src/WINNT/afsd/cm_dcache.c:1.30.2.20
*** openafs/src/WINNT/afsd/cm_dcache.c:1.30.2.19	Tue Sep 18 12:59:23 2007
--- openafs/src/WINNT/afsd/cm_dcache.c	Sun Nov  4 19:24:46 2007
***************
*** 75,82 ****
      cm_bulkIO_t biod;		/* bulk IO descriptor */
      int require_64bit_ops = 0;
  
!     osi_assert(userp != NULL);
!     osi_assert(scp != NULL);
  
      /* now, the buffer may or may not be filled with good data (buf_GetNew
       * drops lots of locks, and may indeed return a properly initialized
--- 75,82 ----
      cm_bulkIO_t biod;		/* bulk IO descriptor */
      int require_64bit_ops = 0;
  
!     osi_assertx(userp != NULL, "null cm_user_t");
!     osi_assertx(scp != NULL, "null cm_scache_t");
  
      /* now, the buffer may or may not be filled with good data (buf_GetNew
       * drops lots of locks, and may indeed return a properly initialized
***************
*** 207,213 ****
                      qdp = biod.bufListEndp;
                  else
                      qdp = (osi_queueData_t *) osi_QPrev(&qdp->q);
!                 osi_assert(qdp != NULL);
                  bufp = osi_GetQData(qdp);
                  bufferp = bufp->datap;
                  wbytes = nbytes;
--- 207,213 ----
                      qdp = biod.bufListEndp;
                  else
                      qdp = (osi_queueData_t *) osi_QPrev(&qdp->q);
!                 osi_assertx(qdp != NULL, "null osi_queueData_t");
                  bufp = osi_GetQData(qdp);
                  bufferp = bufp->datap;
                  wbytes = nbytes;
***************
*** 1573,1579 ****
                   * our check above for nbytes being less than
                   * biod.length should ensure this.
                   */
!                 osi_assert(bufferp != NULL);
  
                  /* read rbytes of data */
                  rbytes = (nbytes > cm_data.buf_blockSize? cm_data.buf_blockSize : nbytes);
--- 1573,1579 ----
                   * our check above for nbytes being less than
                   * biod.length should ensure this.
                   */
!                 osi_assertx(bufferp != NULL, "null cm_buf_t");
  
                  /* read rbytes of data */
                  rbytes = (nbytes > cm_data.buf_blockSize? cm_data.buf_blockSize : nbytes);
***************
*** 1624,1630 ****
               * all of the rest of the pages.
               */
              /* bytes fetched */
! 	    osi_assert((bufferp - tbufp->datap) < LONG_MAX);
              rbytes = (long) (bufferp - tbufp->datap);
  
              /* bytes left to zero */
--- 1624,1630 ----
               * all of the rest of the pages.
               */
              /* bytes fetched */
! 	    osi_assertx((bufferp - tbufp->datap) < LONG_MAX, "data >= LONG_MAX");
              rbytes = (long) (bufferp - tbufp->datap);
  
              /* bytes left to zero */
Index: openafs/src/WINNT/afsd/cm_dir.c
diff -c openafs/src/WINNT/afsd/cm_dir.c:1.4.4.6 openafs/src/WINNT/afsd/cm_dir.c:1.4.4.8
*** openafs/src/WINNT/afsd/cm_dir.c:1.4.4.6	Wed Sep 19 23:55:42 2007
--- openafs/src/WINNT/afsd/cm_dir.c	Sat Nov  3 12:19:28 2007
***************
*** 100,106 ****
  cm_DirOpDelBuffer(cm_dirOp_t * op, cm_buf_t * buffer, int flags);
  
  static long
! cm_DirCheckStatus(cm_dirOp_t * op);
  
  static long
  cm_DirReleasePage(cm_dirOp_t * op, cm_buf_t ** bufferpp, int modified);
--- 100,106 ----
  cm_DirOpDelBuffer(cm_dirOp_t * op, cm_buf_t * buffer, int flags);
  
  static long
! cm_DirCheckStatus(cm_dirOp_t * op, afs_uint32 locked);
  
  static long
  cm_DirReleasePage(cm_dirOp_t * op, cm_buf_t ** bufferpp, int modified);
***************
*** 958,972 ****
      }
  }
  
! /* Begin a sequence of directory operations.  scp->mx should be
!    locked.
! */
  long
  cm_BeginDirOp(cm_scache_t * scp, cm_user_t * userp, cm_req_t * reqp,
                afs_uint32 lockType, cm_dirOp_t * op)
  {
      long code;
!     int i, mxheld = 0;
  
      osi_Log3(afsd_logp, "Beginning dirOp[0x%p] for scp[0x%p], userp[0x%p]",
               op, scp, userp);
--- 958,972 ----
      }
  }
  
! /* Begin a sequence of directory operations.  
!  * Called with scp->mx unlocked.
!  */
  long
  cm_BeginDirOp(cm_scache_t * scp, cm_user_t * userp, cm_req_t * reqp,
                afs_uint32 lockType, cm_dirOp_t * op)
  {
      long code;
!     int i, mxheld = 0, haveWrite = 0;
  
      osi_Log3(afsd_logp, "Beginning dirOp[0x%p] for scp[0x%p], userp[0x%p]",
               op, scp, userp);
***************
*** 986,993 ****
          op->buffers[i].flags = 0;
      }
  
!     code = cm_DirCheckStatus(op);
! 
      if (code == 0) {
          op->length = scp->length;
          op->newLength = op->length;
--- 986,1001 ----
          op->buffers[i].flags = 0;
      }
  
!     if (lockType == CM_DIRLOCK_WRITE) {
!         lock_ObtainWrite(&scp->dirlock);
!         haveWrite = 1;
!     } else { 
!         lock_ObtainRead(&scp->dirlock);
!         haveWrite = 0;
!     }
!     lock_ObtainMutex(&scp->mx);
!     mxheld = 1;
!     code = cm_DirCheckStatus(op, 1);
      if (code == 0) {
          op->length = scp->length;
          op->newLength = op->length;
***************
*** 995,1036 ****
          op->newDataVersion = op->dataVersion;
  
  #ifdef USE_BPLUS
-         lock_ObtainRead(&scp->dirlock);
          if (!cm_BPlusTrees ||
              (scp->dirBplus &&
               scp->dirDataVersion == scp->dataVersion)) 
          {
!             int mxheld = 0;
! 
              switch (lockType) {
              case CM_DIRLOCK_NONE:
!                 lock_ReleaseRead(&scp->dirlock);
                  break;
              case CM_DIRLOCK_READ:
!                 /* got it already */
                  break;
              case CM_DIRLOCK_WRITE:
              default:
!                 lock_ReleaseRead(&scp->dirlock);
!                 lock_ObtainWrite(&scp->dirlock);
              }
          } else {
!             lock_ReleaseRead(&scp->dirlock);
!             lock_ObtainWrite(&scp->dirlock);
!             if (scp->dirBplus && 
!                 scp->dirDataVersion != scp->dataVersion)
              {
!                 bplus_dv_error++;
!                 bplus_free_tree++;
!                 freeBtree(scp->dirBplus);
!                 scp->dirBplus = NULL;
!                 scp->dirDataVersion = -1;
!             }
  
!             if (!scp->dirBplus) {
!                 cm_BPlusDirBuildTree(scp, userp, reqp);
!                 if (scp->dirBplus)
!                     scp->dirDataVersion = scp->dataVersion;
              }
  
              switch (lockType) {
--- 1003,1079 ----
          op->newDataVersion = op->dataVersion;
  
  #ifdef USE_BPLUS
          if (!cm_BPlusTrees ||
              (scp->dirBplus &&
               scp->dirDataVersion == scp->dataVersion)) 
          {
!             /* we know that haveWrite matches lockType at this point */
              switch (lockType) {
              case CM_DIRLOCK_NONE:
!                 if (haveWrite)
!                     lock_ReleaseWrite(&scp->dirlock);
!                 else
!                     lock_ReleaseRead(&scp->dirlock);
                  break;
              case CM_DIRLOCK_READ:
!                 osi_assert(!haveWrite);
                  break;
              case CM_DIRLOCK_WRITE:
              default:
!                 osi_assert(haveWrite);
              }
          } else {
!             if (!(scp->dirBplus && 
!                   scp->dirDataVersion == scp->dataVersion)) 
              {
!               repeat:
!                 if (!haveWrite) {
!                     if (mxheld) {
!                         lock_ReleaseMutex(&scp->mx);
!                         mxheld = 0;
!                     }
!                     lock_ReleaseRead(&scp->dirlock);
!                     lock_ObtainWrite(&scp->dirlock);
!                     haveWrite = 1;
!                 }
!                 if (!mxheld) {
!                     lock_ObtainMutex(&scp->mx);
!                     mxheld = 1;
!                 }
!                 if (scp->dirBplus && 
!                      scp->dirDataVersion != scp->dataVersion)
!                 {
!                     bplus_dv_error++;
!                     bplus_free_tree++;
!                     freeBtree(scp->dirBplus);
!                     scp->dirBplus = NULL;
!                     scp->dirDataVersion = -1;
!                 }
! 
!                 if (!scp->dirBplus) {
!                     if (mxheld) {
!                         lock_ReleaseMutex(&scp->mx);
!                         mxheld = 0;
!                     }
!                     cm_BPlusDirBuildTree(scp, userp, reqp);
!                     if (!mxheld) {
!                         lock_ObtainMutex(&scp->mx);
!                         mxheld = 1;
!                     }
!                     if (op->dataVersion != scp->dataVersion) {
!                         /* We lost the race, therefore we must update the
!                          * dirop state and retry to build the tree.
!                          */
!                         op->length = scp->length;
!                         op->newLength = op->length;
!                         op->dataVersion = scp->dataVersion;
!                         op->newDataVersion = op->dataVersion;
!                         goto repeat;
!                     }
  
!                     if (scp->dirBplus)
!                         scp->dirDataVersion = scp->dataVersion;
!                 }
              }
  
              switch (lockType) {
***************
*** 1044,1065 ****
              default:
                  /* got it already */;
              }
          }
  #else
          switch (lockType) {
          case CM_DIRLOCK_NONE:
              break;
          case CM_DIRLOCK_READ:
!             lock_ObtainRead(&scp->dirlock);
              break;
          case CM_DIRLOCK_WRITE:
          default:
!             lock_ObtainWrite(&scp->dirlock);
          }
  #endif
          op->lockType = lockType;
      } else {
!     
          cm_EndDirOp(op);
      }
  
--- 1087,1121 ----
              default:
                  /* got it already */;
              }
+             haveWrite = 0;
          }
  #else
+         /* we know that haveWrite matches lockType at this point */
          switch (lockType) {
          case CM_DIRLOCK_NONE:
+             if (haveWrite)
+                 lock_ReleaseWrite(&scp->dirlock);
+             else
+                 lock_ReleaseRead(&scp->dirlock);
              break;
          case CM_DIRLOCK_READ:
!             osi_assert(!haveWrite);
              break;
          case CM_DIRLOCK_WRITE:
          default:
!             osi_assert(haveWrite);
          }
  #endif
          op->lockType = lockType;
+         if (mxheld)
+             lock_ReleaseMutex(&scp->mx);
      } else {
!         if (haveWrite)
!             lock_ReleaseWrite(&scp->dirlock);
!         else
!             lock_ReleaseRead(&scp->dirlock);
!         if (mxheld)
!             lock_ReleaseMutex(&scp->mx);
          cm_EndDirOp(op);
      }
  
***************
*** 1072,1082 ****
  cm_CheckDirOpForSingleChange(cm_dirOp_t * op)
  {
      long code;
  
      if (op->scp == NULL)
          return 0;
  
!     code = cm_DirCheckStatus(op);
  
      if (code == 0 &&
          op->dataVersion == op->scp->dataVersion - 1) {
--- 1128,1140 ----
  cm_CheckDirOpForSingleChange(cm_dirOp_t * op)
  {
      long code;
+     int  rc = 0;
  
      if (op->scp == NULL)
          return 0;
  
!     lock_ObtainMutex(&op->scp->mx);
!     code = cm_DirCheckStatus(op, 1);
  
      if (code == 0 &&
          op->dataVersion == op->scp->dataVersion - 1) {
***************
*** 1086,1104 ****
          op->newDataVersion = op->scp->dataVersion;
          op->newLength = op->scp->serverLength;
  
!         osi_Log0(afsd_logp, "cm_CheckDirOpForSingleChange succeeded");
! 
!         return 1;
      }
! 
!     osi_Log3(afsd_logp,
!              "cm_CheckDirOpForSingleChange failed.  code=0x%x, old dv=%d, new dv=%d",
!              code, op->dataVersion, op->scp->dataVersion);
!     return 0;
  }
  
! /* End a sequence of directory operations.  Called with op->scp->mx
!    unlocked.*/
  long
  cm_EndDirOp(cm_dirOp_t * op)
  {
--- 1144,1164 ----
          op->newDataVersion = op->scp->dataVersion;
          op->newLength = op->scp->serverLength;
  
!         rc = 1;
      }
!     lock_ReleaseMutex(&op->scp->mx); 
!     
!     if (rc)
!         osi_Log0(afsd_logp, "cm_CheckDirOpForSingleChange succeeded");
!     else
!         osi_Log3(afsd_logp,
!                  "cm_CheckDirOpForSingleChange failed.  code=0x%x, old dv=%d, new dv=%d",
!                  code, op->dataVersion, op->scp->dataVersion);
!     return rc;
  }
  
! /* End a sequence of directory operations.  
!  * Called with op->scp->mx unlocked.*/
  long
  cm_EndDirOp(cm_dirOp_t * op)
  {
***************
*** 1111,1124 ****
               op, op->dirtyBufCount);
  
      if (op->dirtyBufCount > 0) {
-         /* we made changes.  We should go through the list of buffers
-            and update the dataVersion for each. */
-         code = buf_ForceDataVersion(op->scp, op->dataVersion, op->newDataVersion);
- 
  #ifdef USE_BPLUS
!         /* and update the data version on the B+ tree */
          if (op->scp->dirBplus && 
!             op->scp->dirDataVersion == op->dataVersion) {
  
              switch (op->lockType) {
              case CM_DIRLOCK_READ:
--- 1171,1180 ----
               op, op->dirtyBufCount);
  
      if (op->dirtyBufCount > 0) {
  #ifdef USE_BPLUS
!         /* update the data version on the B+ tree */
          if (op->scp->dirBplus && 
!              op->scp->dirDataVersion == op->dataVersion) {
  
              switch (op->lockType) {
              case CM_DIRLOCK_READ:
***************
*** 1135,1140 ****
--- 1191,1202 ----
              op->scp->dirDataVersion = op->newDataVersion;
          }
  #endif
+ 
+         /* we made changes.  We should go through the list of buffers
+          * and update the dataVersion for each. */
+         lock_ObtainMutex(&op->scp->mx);
+         code = buf_ForceDataVersion(op->scp, op->dataVersion, op->newDataVersion);
+         lock_ReleaseMutex(&op->scp->mx);
      }
  
      switch (op->lockType) {
***************
*** 1203,1221 ****
          lock_ObtainMutex(&op->scp->mx);
  
          /* Make sure we are synchronized. */
          code = cm_SyncOp(op->scp, bufferp, op->userp, &op->req, PRSFS_LOOKUP,
                           CM_SCACHESYNC_NEEDCALLBACK |
!                          CM_SCACHESYNC_WRITE |
                           CM_SCACHESYNC_BUFLOCKED);
  
!         if (code == 0 &&
!             bufferp->dataVersion != op->dataVersion) {
! 
              osi_Log2(afsd_logp, "cm_DirOpAddBuffer: buffer version mismatch. buf ver = %d. want %d", bufferp->dataVersion, op->dataVersion);
  
              cm_SyncOpDone(op->scp, bufferp,
                            CM_SCACHESYNC_NEEDCALLBACK |
!                           CM_SCACHESYNC_WRITE |
                            CM_SCACHESYNC_BUFLOCKED);
  
              code = CM_ERROR_INVAL;
--- 1265,1283 ----
          lock_ObtainMutex(&op->scp->mx);
  
          /* Make sure we are synchronized. */
+         osi_assert(op->lockType != CM_DIRLOCK_NONE);
+ 
          code = cm_SyncOp(op->scp, bufferp, op->userp, &op->req, PRSFS_LOOKUP,
                           CM_SCACHESYNC_NEEDCALLBACK |
!                          (op->lockType == CM_DIRLOCK_WRITE ? CM_SCACHESYNC_WRITE : CM_SCACHESYNC_READ) |
                           CM_SCACHESYNC_BUFLOCKED);
  
!         if (code == 0 && bufferp->dataVersion != op->dataVersion) {
              osi_Log2(afsd_logp, "cm_DirOpAddBuffer: buffer version mismatch. buf ver = %d. want %d", bufferp->dataVersion, op->dataVersion);
  
              cm_SyncOpDone(op->scp, bufferp,
                            CM_SCACHESYNC_NEEDCALLBACK |
!                          (op->lockType == CM_DIRLOCK_WRITE ? CM_SCACHESYNC_WRITE : CM_SCACHESYNC_READ) |
                            CM_SCACHESYNC_BUFLOCKED);
  
              code = CM_ERROR_INVAL;
***************
*** 1315,1321 ****
  
              cm_SyncOpDone(op->scp, bufferp,
                            CM_SCACHESYNC_NEEDCALLBACK |
!                           CM_SCACHESYNC_WRITE);
  
  #ifdef DEBUG
              osi_assert(bufferp->dataVersion == op->dataVersion);
--- 1377,1383 ----
  
              cm_SyncOpDone(op->scp, bufferp,
                            CM_SCACHESYNC_NEEDCALLBACK |
!                          (op->lockType == CM_DIRLOCK_WRITE ? CM_SCACHESYNC_WRITE : CM_SCACHESYNC_READ));
  
  #ifdef DEBUG
              osi_assert(bufferp->dataVersion == op->dataVersion);
***************
*** 1371,1393 ****
     This should be called before cm_DirGetPage() is called per scp.
  
     On entry:
!      scp->mx unlocked
  
     On exit:
!      scp->mx unlocked
  
     During:
       scp->mx may be released
   */
  static long
! cm_DirCheckStatus(cm_dirOp_t * op)
  {
      long code;
  
!     lock_ObtainMutex(&op->scp->mx);
      code = cm_SyncOp(op->scp, NULL, op->userp, &op->req, PRSFS_LOOKUP,
                       CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
!     lock_ReleaseMutex(&op->scp->mx);
  
      osi_Log2(afsd_logp, "cm_DirCheckStatus for op 0x%p returning code 0x%x",
               op, code);
--- 1433,1457 ----
     This should be called before cm_DirGetPage() is called per scp.
  
     On entry:
!      scp->mx locked state indicated by parameter
  
     On exit:
!      scp->mx same state as upon entry
  
     During:
       scp->mx may be released
   */
  static long
! cm_DirCheckStatus(cm_dirOp_t * op, afs_uint32 locked)
  {
      long code;
  
!     if (!locked)
!         lock_ObtainMutex(&op->scp->mx);
      code = cm_SyncOp(op->scp, NULL, op->userp, &op->req, PRSFS_LOOKUP,
                       CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
!     if (!locked)
!         lock_ReleaseMutex(&op->scp->mx);
  
      osi_Log2(afsd_logp, "cm_DirCheckStatus for op 0x%p returning code 0x%x",
               op, code);
Index: openafs/src/WINNT/afsd/cm_dir.h
diff -c openafs/src/WINNT/afsd/cm_dir.h:1.4.4.5 openafs/src/WINNT/afsd/cm_dir.h:1.4.4.6
*** openafs/src/WINNT/afsd/cm_dir.h:1.4.4.5	Wed Sep 19 23:55:42 2007
--- openafs/src/WINNT/afsd/cm_dir.h	Sat Nov  3 12:19:28 2007
***************
*** 186,190 ****
  extern int
  cm_MemDumpDirStats(FILE *outputFile, char *cookie, int lock);
  
! extern afs_int64 dir_enums;
  #endif /*  __CM_DIR_ENV__ */
--- 186,190 ----
  extern int
  cm_MemDumpDirStats(FILE *outputFile, char *cookie, int lock);
  
! extern afs_uint64 dir_enums;
  #endif /*  __CM_DIR_ENV__ */
Index: openafs/src/WINNT/afsd/cm_freelance.c
diff -c openafs/src/WINNT/afsd/cm_freelance.c:1.33.2.3 openafs/src/WINNT/afsd/cm_freelance.c:1.33.2.4
*** openafs/src/WINNT/afsd/cm_freelance.c:1.33.2.3	Thu Oct 18 01:28:39 2007
--- openafs/src/WINNT/afsd/cm_freelance.c	Sun Nov  4 19:24:46 2007
***************
*** 169,180 ****
      /* Start the registry monitor */
      phandle = thrd_Create(NULL, 65536, (ThreadFunc) cm_FreelanceChangeNotifier,
                            NULL, 0, &lpid, "cm_FreelanceChangeNotifier");
!     osi_assert(phandle != NULL);
      thrd_CloseHandle(phandle);
  
      phandle = thrd_Create(NULL, 65536, (ThreadFunc) cm_FreelanceSymlinkChangeNotifier,
                            NULL, 0, &lpid, "cm_FreelanceSymlinkChangeNotifier");
!     osi_assert(phandle != NULL);
      thrd_CloseHandle(phandle);
  #endif
  }
--- 169,180 ----
      /* Start the registry monitor */
      phandle = thrd_Create(NULL, 65536, (ThreadFunc) cm_FreelanceChangeNotifier,
                            NULL, 0, &lpid, "cm_FreelanceChangeNotifier");
!     osi_assertx(phandle != NULL, "cm_FreelanceChangeNotifier thread create failure");
      thrd_CloseHandle(phandle);
  
      phandle = thrd_Create(NULL, 65536, (ThreadFunc) cm_FreelanceSymlinkChangeNotifier,
                            NULL, 0, &lpid, "cm_FreelanceSymlinkChangeNotifier");
!     osi_assertx(phandle != NULL, "cm_FreelanceSymlinkChangeNotifier thread create failure");
      thrd_CloseHandle(phandle);
  #endif
  }
Index: openafs/src/WINNT/afsd/cm_ioctl.c
diff -c openafs/src/WINNT/afsd/cm_ioctl.c:1.73.2.26 openafs/src/WINNT/afsd/cm_ioctl.c:1.73.2.27
*** openafs/src/WINNT/afsd/cm_ioctl.c:1.73.2.26	Fri Oct 19 00:27:03 2007
--- openafs/src/WINNT/afsd/cm_ioctl.c	Sun Nov  4 19:24:46 2007
***************
*** 812,818 ****
  #endif
      {
          cellp = cm_FindCellByID(scp->fid.cell);
!         osi_assert(cellp);
  
          if (scp->flags & CM_SCACHEFLAG_RO) {
              cm_ReleaseSCache(scp);
--- 812,818 ----
  #endif
      {
          cellp = cm_FindCellByID(scp->fid.cell);
!         osi_assertx(cellp, "null cm_cell_t");
  
          if (scp->flags & CM_SCACHEFLAG_RO) {
              cm_ReleaseSCache(scp);
Index: openafs/src/WINNT/afsd/cm_scache.c
diff -c openafs/src/WINNT/afsd/cm_scache.c:1.35.2.44 openafs/src/WINNT/afsd/cm_scache.c:1.35.2.47
*** openafs/src/WINNT/afsd/cm_scache.c:1.35.2.44	Thu Sep 13 13:59:21 2007
--- openafs/src/WINNT/afsd/cm_scache.c	Mon Nov  5 13:24:34 2007
***************
*** 38,43 ****
--- 38,45 ----
  /* Dummy scache entry for use with pioctl fids */
  cm_scache_t cm_fakeSCache;
  
+ osi_queue_t * cm_allFreeWaiters;        /* protected by cm_scacheLock */
+ 
  #ifdef AFS_FREELANCE_CLIENT
  extern osi_mutex_t cm_Freelance_Lock;
  #endif
***************
*** 147,154 ****
  	buf_CleanDirtyBuffers(scp); 
      } else {
  	/* look for things that shouldn't still be set */
! 	osi_assert(scp->bufWritesp == NULL);
! 	osi_assert(scp->bufReadsp == NULL);
      }
  #endif
  
--- 149,156 ----
  	buf_CleanDirtyBuffers(scp); 
      } else {
  	/* look for things that shouldn't still be set */
! 	osi_assertx(scp->bufWritesp == NULL, "non-null cm_scache_t bufWritesp");
! 	osi_assertx(scp->bufReadsp == NULL, "non-null cm_scache_t bufReadsp");
      }
  #endif
  
***************
*** 166,171 ****
--- 168,174 ----
      scp->dataVersion = 0;
      scp->bulkStatProgress = hzero;
      scp->waitCount = 0;
+     scp->waitQueueT = NULL;
  
      if (scp->cbServerp) {
          cm_PutServer(scp->cbServerp);
***************
*** 203,208 ****
--- 206,212 ----
      scp->serverLock = (-1);
      scp->exclusiveLocks = 0;
      scp->sharedLocks = 0;
+     scp->lockDataVersion = -1;
  
      /* not locked, but there can be no references to this guy
       * while we hold the global refcount lock.
***************
*** 240,246 ****
  	  scp;
  	  scp = (cm_scache_t *) osi_QPrev(&scp->q)) 
      {
! 	osi_assert(scp >= cm_data.scacheBaseAddress && scp < (cm_scache_t *)cm_data.scacheHashTablep);
  
  	if (scp->refCount == 0) {
  	    if (scp->flags & CM_SCACHEFLAG_DELETED) {
--- 244,251 ----
  	  scp;
  	  scp = (cm_scache_t *) osi_QPrev(&scp->q)) 
      {
! 	osi_assertx(scp >= cm_data.scacheBaseAddress && scp < (cm_scache_t *)cm_data.scacheHashTablep,
!                     "invalid cm_scache_t address");
  
  	if (scp->refCount == 0) {
  	    if (scp->flags & CM_SCACHEFLAG_DELETED) {
***************
*** 309,315 ****
       * quota or we have a leak and need to allocate a new one to avoid panicing.
       */
      scp = cm_data.scacheBaseAddress + cm_data.currentSCaches;
!     osi_assert(scp >= cm_data.scacheBaseAddress && scp < (cm_scache_t *)cm_data.scacheHashTablep);
      memset(scp, 0, sizeof(cm_scache_t));
      scp->magic = CM_SCACHE_MAGIC;
      lock_InitializeMutex(&scp->mx, "cm_scache_t mutex");
--- 314,321 ----
       * quota or we have a leak and need to allocate a new one to avoid panicing.
       */
      scp = cm_data.scacheBaseAddress + cm_data.currentSCaches;
!     osi_assertx(scp >= cm_data.scacheBaseAddress && scp < (cm_scache_t *)cm_data.scacheHashTablep,
!                 "invalid cm_scache_t address");
      memset(scp, 0, sizeof(cm_scache_t));
      scp->magic = CM_SCACHE_MAGIC;
      lock_InitializeMutex(&scp->mx, "cm_scache_t mutex");
***************
*** 576,581 ****
--- 582,588 ----
                  scp->dirBplus = NULL;
                  scp->dirDataVersion = -1;
  #endif
+                 scp->waitQueueT = NULL;
                  scp->flags &= ~CM_SCACHEFLAG_WAITING;
              }
          }
***************
*** 583,588 ****
--- 590,596 ----
          cm_freeFileLocks = NULL;
          cm_lockRefreshCycle = 0;
          cm_fakeSCacheInit(newFile);
+         cm_allFreeWaiters = NULL;
          cm_dnlcInit(newFile);
          osi_EndOnce(&once);
      }
***************
*** 633,639 ****
          
      hash = CM_SCACHE_HASH(fidp);
          
!     osi_assert(fidp->cell != 0);
  
      if (fidp->cell== cm_data.rootFid.cell && 
           fidp->volume==cm_data.rootFid.volume &&
--- 641,647 ----
          
      hash = CM_SCACHE_HASH(fidp);
          
!     osi_assertx(fidp->cell != 0, "unassigned cell value");
  
      if (fidp->cell== cm_data.rootFid.cell && 
           fidp->volume==cm_data.rootFid.volume &&
***************
*** 779,785 ****
  	    osi_Log1(afsd_logp,"cm_GetSCache (3) outScpp 0x%p", scp);
  #endif
              cm_HoldSCacheNoLock(scp);
!             osi_assert(scp->volp == volp);
              cm_AdjustScacheLRU(scp);
              lock_ReleaseWrite(&cm_scacheLock);
              if (volp)
--- 787,793 ----
  	    osi_Log1(afsd_logp,"cm_GetSCache (3) outScpp 0x%p", scp);
  #endif
              cm_HoldSCacheNoLock(scp);
!             osi_assertx(scp->volp == volp, "cm_scache_t volume has unexpected value");
              cm_AdjustScacheLRU(scp);
              lock_ReleaseWrite(&cm_scacheLock);
              if (volp)
***************
*** 800,806 ****
      }
      osi_Log2(afsd_logp,"cm_GetNewSCache returns scp 0x%x flags 0x%x", scp, scp->flags);
  
!     osi_assert(!(scp->flags & CM_SCACHEFLAG_INHASH));
  
  #if not_too_dangerous
      /* dropping the cm_scacheLock allows more than one thread
--- 808,814 ----
      }
      osi_Log2(afsd_logp,"cm_GetNewSCache returns scp 0x%x flags 0x%x", scp, scp->flags);
  
!     osi_assertx(!(scp->flags & CM_SCACHEFLAG_INHASH), "CM_SCACHEFLAG_INHASH set");
  
  #if not_too_dangerous
      /* dropping the cm_scacheLock allows more than one thread
***************
*** 884,889 ****
--- 892,960 ----
      return pscp;
  }
  
+ void cm_SyncOpAddToWaitQueue(cm_scache_t * scp, afs_int32 flags, cm_buf_t * bufp)
+ {
+     cm_scache_waiter_t * w;
+ 
+     lock_ObtainWrite(&cm_scacheLock);
+     if (cm_allFreeWaiters == NULL) {
+         w = malloc(sizeof(*w));
+         memset(w, 0, sizeof(*w));
+     } else {
+         w = (cm_scache_waiter_t *) cm_allFreeWaiters;
+         osi_QRemove(&cm_allFreeWaiters, (osi_queue_t *) w);
+     }
+ 
+     w->threadId = thrd_Current();
+     w->scp = scp;
+     cm_HoldSCacheNoLock(scp);
+     w->flags = flags;
+     w->bufp = bufp;
+ 
+     osi_QAddT(&scp->waitQueueH, &scp->waitQueueT, (osi_queue_t *) w);
+     lock_ReleaseWrite(&cm_scacheLock);
+ 
+     osi_Log2(afsd_logp, "cm_SyncOpAddToWaitQueue : Adding thread to wait queue scp 0x%p w 0x%p", scp, w);
+ }
+ 
+ int cm_SyncOpCheckContinue(cm_scache_t * scp, afs_int32 flags, cm_buf_t * bufp)
+ {
+     cm_scache_waiter_t * w;
+     int this_is_me;
+ 
+     osi_Log0(afsd_logp, "cm_SyncOpCheckContinue checking for continuation");
+ 
+     lock_ObtainRead(&cm_scacheLock);
+     for (w = (cm_scache_waiter_t *)scp->waitQueueH;
+          w;
+          w = (cm_scache_waiter_t *)osi_QNext((osi_queue_t *) w)) {
+         if (w->flags == flags && w->bufp == bufp) {
+             break;
+         }
+     }
+ 
+     osi_assertx(w != NULL, "null cm_scache_waiter_t");
+     this_is_me = (w->threadId == thrd_Current());
+     lock_ReleaseRead(&cm_scacheLock);
+ 
+     if (!this_is_me) {
+         osi_Log1(afsd_logp, "cm_SyncOpCheckContinue MISS: Waiter 0x%p", w);
+         return 0;
+     }
+ 
+     osi_Log1(afsd_logp, "cm_SyncOpCheckContinue HIT: Waiter 0x%p", w);
+ 
+     lock_ObtainWrite(&cm_scacheLock);
+     osi_QRemoveHT(&scp->waitQueueH, &scp->waitQueueT, (osi_queue_t *) w);
+     cm_ReleaseSCacheNoLock(scp);
+     memset(w, 0, sizeof(*w));
+     osi_QAdd(&cm_allFreeWaiters, (osi_queue_t *) w);
+     lock_ReleaseWrite(&cm_scacheLock);
+ 
+     return 1;
+ }
+ 
+ 
  /* synchronize a fetch, store, read, write, fetch status or store status.
   * Called with scache mutex held, and returns with it held, but temporarily
   * drops it during the fetch.
***************
*** 950,961 ****
      afs_uint32 sleep_scp_flags = 0;
      afs_uint32 sleep_buf_cmflags = 0;
      afs_uint32 sleep_scp_bufs = 0;
  
      /* lookup this first */
      bufLocked = flags & CM_SCACHESYNC_BUFLOCKED;
  
! 	if (bufp)
! 		osi_assert(bufp->refCount > 0);
  
  
      /* Do the access check.  Now we don't really do the access check
--- 1021,1033 ----
      afs_uint32 sleep_scp_flags = 0;
      afs_uint32 sleep_buf_cmflags = 0;
      afs_uint32 sleep_scp_bufs = 0;
+     int wakeupCycle;
  
      /* lookup this first */
      bufLocked = flags & CM_SCACHESYNC_BUFLOCKED;
  
!     if (bufp)
!         osi_assertx(bufp->refCount > 0, "cm_buf_t refCount 0");
  
  
      /* Do the access check.  Now we don't really do the access check
***************
*** 1147,1153 ****
  
          if (rights) {
              /* can't check access rights without a callback */
!             osi_assert(flags & CM_SCACHESYNC_NEEDCALLBACK);
  
              if ((rights & PRSFS_WRITE) && (scp->flags & CM_SCACHEFLAG_RO))
                  return CM_ERROR_READONLY;
--- 1219,1225 ----
  
          if (rights) {
              /* can't check access rights without a callback */
!             osi_assertx(flags & CM_SCACHESYNC_NEEDCALLBACK, "!CM_SCACHESYNC_NEEDCALLBACK");
  
              if ((rights & PRSFS_WRITE) && (scp->flags & CM_SCACHEFLAG_RO))
                  return CM_ERROR_READONLY;
***************
*** 1181,1186 ****
--- 1253,1259 ----
          if (flags & CM_SCACHESYNC_NOWAIT) 
              return CM_ERROR_WOULDBLOCK;
  
+         /* These are used for minidump debugging */
  	sleep_scp_flags = scp->flags;		/* so we know why we slept */
  	sleep_buf_cmflags = bufp ? bufp->cmFlags : 0;
  	sleep_scp_bufs = (scp->bufReadsp ? 1 : 0) | (scp->bufWritesp ? 2 : 0);
***************
*** 1197,1205 ****
              scp->flags |= CM_SCACHEFLAG_WAITING;
              scp->waitCount = scp->waitRequests = 1;
          }
          if (bufLocked) 
              lock_ReleaseMutex(&bufp->mx);
!         osi_SleepM((LONG_PTR) &scp->flags, &scp->mx);
  
  	smb_UpdateServerPriority();
  
--- 1270,1286 ----
              scp->flags |= CM_SCACHEFLAG_WAITING;
              scp->waitCount = scp->waitRequests = 1;
          }
+ 
          if (bufLocked) 
              lock_ReleaseMutex(&bufp->mx);
! 
!         cm_SyncOpAddToWaitQueue(scp, flags, bufp);
!         wakeupCycle = 0;
!         do {
!             if (wakeupCycle++ != 0)
!                 lock_ObtainMutex(&scp->mx);
!             osi_SleepM((LONG_PTR) &scp->flags, &scp->mx);
!         } while (!cm_SyncOpCheckContinue(scp, flags, bufp));
  
  	smb_UpdateServerPriority();
  
***************
*** 1238,1244 ****
          if (bufp) {
              for(qdp = scp->bufReadsp; qdp; qdp = (osi_queueData_t *) osi_QNext(&qdp->q)) {
                  tbufp = osi_GetQData(qdp);
!                 osi_assert(tbufp != bufp);
              }
          }
  
--- 1319,1325 ----
          if (bufp) {
              for(qdp = scp->bufReadsp; qdp; qdp = (osi_queueData_t *) osi_QNext(&qdp->q)) {
                  tbufp = osi_GetQData(qdp);
!                 osi_assertx(tbufp != bufp, "unexpected cm_buf_t value");
              }
          }
  
***************
*** 1257,1263 ****
          if (bufp) {
              for(qdp = scp->bufWritesp; qdp; qdp = (osi_queueData_t *) osi_QNext(&qdp->q)) {
                  tbufp = osi_GetQData(qdp);
!                 osi_assert(tbufp != bufp);
              }
          }
  
--- 1338,1344 ----
          if (bufp) {
              for(qdp = scp->bufWritesp; qdp; qdp = (osi_queueData_t *) osi_QNext(&qdp->q)) {
                  tbufp = osi_GetQData(qdp);
!                 osi_assertx(tbufp != bufp, "unexpected cm_buf_t value");
              }
          }
  
***************
*** 1360,1366 ****
  
      if (flags & CM_SCACHESYNC_WRITE) {
          if (bufp) {
!             osi_assert(bufp->cmFlags & CM_BUF_CMWRITING);
  
              bufp->cmFlags &= ~CM_BUF_CMWRITING;
          }
--- 1441,1447 ----
  
      if (flags & CM_SCACHESYNC_WRITE) {
          if (bufp) {
!             osi_assertx(bufp->cmFlags & CM_BUF_CMWRITING, "!CM_BUF_CMWRITING");
  
              bufp->cmFlags &= ~CM_BUF_CMWRITING;
          }
***************
*** 1597,1603 ****
  void cm_HoldSCacheNoLock(cm_scache_t *scp)
  #endif
  {
!     osi_assert(scp != 0);
      scp->refCount++;
  #ifdef DEBUG_REFCOUNT
      osi_Log2(afsd_logp,"cm_HoldSCacheNoLock scp 0x%p ref %d",scp, scp->refCount);
--- 1678,1684 ----
  void cm_HoldSCacheNoLock(cm_scache_t *scp)
  #endif
  {
!     osi_assertx(scp != NULL, "null cm_scache_t");
      scp->refCount++;
  #ifdef DEBUG_REFCOUNT
      osi_Log2(afsd_logp,"cm_HoldSCacheNoLock scp 0x%p ref %d",scp, scp->refCount);
***************
*** 1611,1617 ****
  void cm_HoldSCache(cm_scache_t *scp)
  #endif
  {
!     osi_assert(scp != 0);
      lock_ObtainWrite(&cm_scacheLock);
      scp->refCount++;
  #ifdef DEBUG_REFCOUNT
--- 1692,1698 ----
  void cm_HoldSCache(cm_scache_t *scp)
  #endif
  {
!     osi_assertx(scp != NULL, "null cm_scache_t");
      lock_ObtainWrite(&cm_scacheLock);
      scp->refCount++;
  #ifdef DEBUG_REFCOUNT
***************
*** 1627,1636 ****
  void cm_ReleaseSCacheNoLock(cm_scache_t *scp)
  #endif
  {
!     osi_assert(scp != NULL);
      if (scp->refCount == 0)
  	osi_Log1(afsd_logp,"cm_ReleaseSCacheNoLock about to panic scp 0x%x",scp);
!     osi_assert(scp->refCount-- >= 0);
  #ifdef DEBUG_REFCOUNT
      osi_Log2(afsd_logp,"cm_ReleaseSCacheNoLock scp 0x%p ref %d",scp,scp->refCount);
      afsi_log("%s:%d cm_ReleaseSCacheNoLock scp 0x%p ref %d", file, line, scp, scp->refCount);
--- 1708,1717 ----
  void cm_ReleaseSCacheNoLock(cm_scache_t *scp)
  #endif
  {
!     osi_assertx(scp != NULL, "null cm_scache_t");
      if (scp->refCount == 0)
  	osi_Log1(afsd_logp,"cm_ReleaseSCacheNoLock about to panic scp 0x%x",scp);
!     osi_assertx(scp->refCount-- >= 0, "cm_scache_t refCount 0");
  #ifdef DEBUG_REFCOUNT
      osi_Log2(afsd_logp,"cm_ReleaseSCacheNoLock scp 0x%p ref %d",scp,scp->refCount);
      afsi_log("%s:%d cm_ReleaseSCacheNoLock scp 0x%p ref %d", file, line, scp, scp->refCount);
***************
*** 1643,1653 ****
  void cm_ReleaseSCache(cm_scache_t *scp)
  #endif
  {
!     osi_assert(scp != NULL);
      lock_ObtainWrite(&cm_scacheLock);
      if (scp->refCount == 0)
  	osi_Log1(afsd_logp,"cm_ReleaseSCache about to panic scp 0x%x",scp);
!     osi_assert(scp->refCount != 0);
      scp->refCount--;
  #ifdef DEBUG_REFCOUNT
      osi_Log2(afsd_logp,"cm_ReleaseSCache scp 0x%p ref %d",scp,scp->refCount);
--- 1724,1734 ----
  void cm_ReleaseSCache(cm_scache_t *scp)
  #endif
  {
!     osi_assertx(scp != NULL, "null cm_scache_t");
      lock_ObtainWrite(&cm_scacheLock);
      if (scp->refCount == 0)
  	osi_Log1(afsd_logp,"cm_ReleaseSCache about to panic scp 0x%x",scp);
!     osi_assertx(scp->refCount != 0, "cm_scache_t refCount 0");
      scp->refCount--;
  #ifdef DEBUG_REFCOUNT
      osi_Log2(afsd_logp,"cm_ReleaseSCache scp 0x%p ref %d",scp,scp->refCount);
***************
*** 1665,1671 ****
          
      hash = CM_SCACHE_HASH(fidp);
          
!     osi_assert(fidp->cell != 0);
  
      lock_ObtainWrite(&cm_scacheLock);
      for (scp=cm_data.scacheHashTablep[hash]; scp; scp=scp->nextp) {
--- 1746,1752 ----
          
      hash = CM_SCACHE_HASH(fidp);
          
!     osi_assertx(fidp->cell != 0, "unassigned cell value");
  
      lock_ObtainWrite(&cm_scacheLock);
      for (scp=cm_data.scacheHashTablep[hash]; scp; scp=scp->nextp) {
Index: openafs/src/WINNT/afsd/cm_scache.h
diff -c openafs/src/WINNT/afsd/cm_scache.h:1.21.2.15 openafs/src/WINNT/afsd/cm_scache.h:1.21.2.16
*** openafs/src/WINNT/afsd/cm_scache.h:1.21.2.15	Mon Sep 10 15:08:17 2007
--- openafs/src/WINNT/afsd/cm_scache.h	Sat Nov  3 12:33:54 2007
***************
*** 209,214 ****
--- 209,220 ----
      /* syncop state */
      afs_uint32 waitCount;           /* number of threads waiting */
      afs_uint32 waitRequests;        /* num of thread wait requests */
+     osi_queue_t * waitQueueH;       /* Queue of waiting threads.
+                                        Holds queue of
+                                        cm_scache_waiter_t
+                                        objects. Protected by
+                                        cm_cacheLock. */
+     osi_queue_t * waitQueueT;       /* locked by cm_scacheLock */
  } cm_scache_t;
  
  /* mask field - tell what has been modified */
***************
*** 312,317 ****
--- 318,332 ----
  				    (fidp)->unique))	\
  					% cm_data.scacheHashTableSize)
  
+ typedef struct cm_scache_waiter {
+     osi_queue_t q;
+     afs_int32   threadId;
+ 
+     cm_scache_t *scp;
+     afs_int32   flags;
+     void        *bufp;
+ } cm_scache_waiter_t;
+ 
  #include "cm_conn.h"
  #include "cm_buf.h"
  
Index: openafs/src/WINNT/afsd/cm_server.c
diff -c openafs/src/WINNT/afsd/cm_server.c:1.25.2.13 openafs/src/WINNT/afsd/cm_server.c:1.25.2.14
*** openafs/src/WINNT/afsd/cm_server.c:1.25.2.13	Thu Sep 13 13:59:21 2007
--- openafs/src/WINNT/afsd/cm_server.c	Sun Nov  4 19:24:46 2007
***************
*** 277,289 ****
  void cm_PutServer(cm_server_t *serverp)
  {
      lock_ObtainWrite(&cm_serverLock);
!     osi_assert(serverp->refCount-- > 0);
      lock_ReleaseWrite(&cm_serverLock);
  }
  
  void cm_PutServerNoLock(cm_server_t *serverp)
  {
!     osi_assert(serverp->refCount-- > 0);
  }
  
  void cm_SetServerNo64Bit(cm_server_t * serverp, int no64bit)
--- 277,289 ----
  void cm_PutServer(cm_server_t *serverp)
  {
      lock_ObtainWrite(&cm_serverLock);
!     osi_assertx(serverp->refCount-- > 0, "cm_server_t refCount 0");
      lock_ReleaseWrite(&cm_serverLock);
  }
  
  void cm_PutServerNoLock(cm_server_t *serverp)
  {
!     osi_assertx(serverp->refCount-- > 0, "cm_server_t refCount 0");
  }
  
  void cm_SetServerNo64Bit(cm_server_t * serverp, int no64bit)
***************
*** 368,374 ****
  cm_server_t *cm_NewServer(struct sockaddr_in *socketp, int type, cm_cell_t *cellp) {
      cm_server_t *tsp;
  
!     osi_assert(socketp->sin_family == AF_INET);
  
      tsp = malloc(sizeof(*tsp));
      if (tsp) {
--- 368,374 ----
  cm_server_t *cm_NewServer(struct sockaddr_in *socketp, int type, cm_cell_t *cellp) {
      cm_server_t *tsp;
  
!     osi_assertx(socketp->sin_family == AF_INET, "unexpected socket family");
  
      tsp = malloc(sizeof(*tsp));
      if (tsp) {
***************
*** 413,419 ****
  {
      cm_server_t *tsp;
  
!     osi_assert(addrp->sin_family == AF_INET);
          
      lock_ObtainWrite(&cm_serverLock);
      for (tsp = cm_allServersp; tsp; tsp=tsp->allNextp) {
--- 413,419 ----
  {
      cm_server_t *tsp;
  
!     osi_assertx(addrp->sin_family == AF_INET, "unexpected socket value");
          
      lock_ObtainWrite(&cm_serverLock);
      for (tsp = cm_allServersp; tsp; tsp=tsp->allNextp) {
Index: openafs/src/WINNT/afsd/cm_user.c
diff -c openafs/src/WINNT/afsd/cm_user.c:1.8.4.1 openafs/src/WINNT/afsd/cm_user.c:1.8.4.3
*** openafs/src/WINNT/afsd/cm_user.c:1.8.4.1	Sat Jun 24 16:41:54 2006
--- openafs/src/WINNT/afsd/cm_user.c	Sun Nov  4 19:24:46 2007
***************
*** 106,112 ****
          return;
  
      lock_ObtainWrite(&cm_userLock);
!     osi_assert(userp->refCount-- > 0);
      if (userp->refCount == 0) {
          lock_FinalizeMutex(&userp->mx);
          for (ucp = userp->cellInfop; ucp; ucp = ncp) {
--- 106,112 ----
          return;
  
      lock_ObtainWrite(&cm_userLock);
!     osi_assertx(userp->refCount-- > 0, "cm_user_t refCount 0");
      if (userp->refCount == 0) {
          lock_FinalizeMutex(&userp->mx);
          for (ucp = userp->cellInfop; ucp; ucp = ncp) {
***************
*** 137,143 ****
  void cm_ReleaseUserVCRef(cm_user_t *userp)
  {
      lock_ObtainMutex(&userp->mx);
!     osi_assert(userp->vcRefs-- > 0);
      lock_ReleaseMutex(&userp->mx);
  }       
  
--- 137,143 ----
  void cm_ReleaseUserVCRef(cm_user_t *userp)
  {
      lock_ObtainMutex(&userp->mx);
!     osi_assertx(userp->vcRefs-- > 0, "cm_user_t refCount 0");
      lock_ReleaseMutex(&userp->mx);
  }       
  
***************
*** 196,198 ****
--- 196,215 ----
      }
      lock_ReleaseWrite(&smb_rctLock);
  }
+ 
+ #ifdef USE_ROOT_TOKENS
+ /*
+  * Service/Parameters/RootTokens/<cellname>/
+  * -> UseLSA
+  * -> Keytab (required if UseLSA is 0)
+  * -> Principal (required if there is more than one principal in the keytab)
+  * -> Realm (required if realm is not upper-case of <cellname>
+  * -> RequireEncryption 
+  */
+ 
+ void
+ cm_RefreshRootTokens(void)
+ {
+ 
+ }
+ #endif 
Index: openafs/src/WINNT/afsd/cm_utils.c
diff -c openafs/src/WINNT/afsd/cm_utils.c:1.11.4.5 openafs/src/WINNT/afsd/cm_utils.c:1.11.4.6
*** openafs/src/WINNT/afsd/cm_utils.c:1.11.4.5	Thu Aug 23 23:21:49 2007
--- openafs/src/WINNT/afsd/cm_utils.c	Wed Oct 31 11:36:02 2007
***************
*** 14,20 ****
  #ifndef DJGPP
  #include <windows.h>
  #include <winsock2.h>
- #include <afs/unified_afs.h>
  #ifndef EWOULDBLOCK
  #define EWOULDBLOCK             WSAEWOULDBLOCK
  #define EINPROGRESS             WSAEINPROGRESS
--- 14,19 ----
***************
*** 64,69 ****
--- 63,69 ----
  #define EREMOTE                 WSAEREMOTE
  #endif /* EWOULDBLOCK */
  #endif /* !DJGPP */
+ #include <afs/unified_afs.h>
  
  #include <string.h>
  #include <malloc.h>
***************
*** 251,258 ****
          error = CM_ERROR_NOTDIR;
      else if (error == 2)	/* ENOENT */
          error = CM_ERROR_NOSUCHFILE;
!     else if (error == 11        /* EAGAIN, most servers */
!              || error == 35)	/* EAGAIN, Digital UNIX */
          error = CM_ERROR_WOULDBLOCK;
      else if (error == VDISKFULL
                || error == 28)   /* ENOSPC */ 
--- 251,259 ----
          error = CM_ERROR_NOTDIR;
      else if (error == 2)	/* ENOENT */
          error = CM_ERROR_NOSUCHFILE;
!     else if (error == 11           /* EAGAIN, most servers */
!              || error == 35 	   /* EAGAIN, Digital UNIX */
!              || error == WSAEWOULDBLOCK)
          error = CM_ERROR_WOULDBLOCK;
      else if (error == VDISKFULL
                || error == 28)   /* ENOSPC */ 
Index: openafs/src/WINNT/afsd/cm_vnodeops.c
diff -c openafs/src/WINNT/afsd/cm_vnodeops.c:1.69.2.44 openafs/src/WINNT/afsd/cm_vnodeops.c:1.69.2.45
*** openafs/src/WINNT/afsd/cm_vnodeops.c:1.69.2.44	Wed Sep 12 21:41:44 2007
--- openafs/src/WINNT/afsd/cm_vnodeops.c	Sun Nov  4 19:24:46 2007
***************
*** 337,343 ****
      long rights;
      long code;
  
!     osi_assert(ldpp != NULL);
      *ldpp = NULL;
  
      /* Always allow delete; the RPC will tell us if it's OK */
--- 337,343 ----
      long rights;
      long code;
  
!     osi_assertx(ldpp != NULL, "null cm_lock_data_t");
      *ldpp = NULL;
  
      /* Always allow delete; the RPC will tell us if it's OK */
***************
*** 2286,2292 ****
      osi_Log1(afsd_logp, "cm_TryBulkStat dir 0x%p", dscp);
  
      /* should be on a buffer boundary */
!     osi_assert((offsetp->LowPart & (cm_data.buf_blockSize - 1)) == 0);
  
      memset(&bb, 0, sizeof(bb));
      bb.bufOffset = *offsetp;
--- 2286,2292 ----
      osi_Log1(afsd_logp, "cm_TryBulkStat dir 0x%p", dscp);
  
      /* should be on a buffer boundary */
!     osi_assertx((offsetp->LowPart & (cm_data.buf_blockSize - 1)) == 0, "invalid offset");
  
      memset(&bb, 0, sizeof(bb));
      bb.bufOffset = *offsetp;
***************
*** 3905,3911 ****
          osi_QRemove(&cm_freeFileLocks, &l->q);
      } else {
          l = malloc(sizeof(cm_file_lock_t));
!         osi_assert(l);
      }
  
      memset(l, 0, sizeof(cm_file_lock_t));
--- 3905,3911 ----
          osi_QRemove(&cm_freeFileLocks, &l->q);
      } else {
          l = malloc(sizeof(cm_file_lock_t));
!         osi_assertx(l, "null cm_file_lock_t");
      }
  
      memset(l, 0, sizeof(cm_file_lock_t));
***************
*** 4048,4054 ****
          rights |= PRSFS_WRITE | PRSFS_LOCK;
      else {
          /* hmmkay */
!         osi_assert(FALSE);
          return 0;
      }
  
--- 4048,4054 ----
          rights |= PRSFS_WRITE | PRSFS_LOCK;
      else {
          /* hmmkay */
!         osi_assertx(FALSE, "invalid lock type");
          return 0;
      }
  
***************
*** 4292,4298 ****
                  newLock = Which;
  
                  /* am I sane? */
!                 osi_assert(newLock == LockRead);
  
                  code = cm_IntSetLock(scp, userp, newLock, reqp);
              }
--- 4292,4298 ----
                  newLock = Which;
  
                  /* am I sane? */
!                 osi_assertx(newLock == LockRead, "lock type not read");
  
                  code = cm_IntSetLock(scp, userp, newLock, reqp);
              }
***************
*** 4508,4514 ****
                       fileLock->scp->fid.volume,
                       fileLock->scp->fid.vnode,
                       fileLock->scp->fid.unique);
!             osi_assert(FALSE);
          }
  #endif
  
--- 4508,4514 ----
                       fileLock->scp->fid.volume,
                       fileLock->scp->fid.vnode,
                       fileLock->scp->fid.unique);
!             osi_assertx(FALSE, "invalid fid value");
          }
  #endif
  
***************
*** 4683,4689 ****
                       fileLock->scp->fid.volume,
                       fileLock->scp->fid.vnode,
                       fileLock->scp->fid.unique);
!             osi_assert(FALSE);
          }
  #endif
          if (!IS_LOCK_DELETED(fileLock) &&
--- 4683,4689 ----
                       fileLock->scp->fid.volume,
                       fileLock->scp->fid.vnode,
                       fileLock->scp->fid.unique);
!             osi_assertx(FALSE, "invalid fid value");
          }
  #endif
          if (!IS_LOCK_DELETED(fileLock) &&
***************
*** 4850,4856 ****
  
  #ifdef DEBUG
      /* With the current code, we can't lose a lock on a RO scp */
!     osi_assert(!(scp->flags & CM_SCACHEFLAG_RO));
  #endif
  
      /* cm_scacheLock needed because we are modifying fileLock->flags */
--- 4850,4856 ----
  
  #ifdef DEBUG
      /* With the current code, we can't lose a lock on a RO scp */
!     osi_assertx(!(scp->flags & CM_SCACHEFLAG_RO), "CM_SCACHEFLAG_RO unexpected");
  #endif
  
      /* cm_scacheLock needed because we are modifying fileLock->flags */
***************
*** 4911,4920 ****
  
              /* Server locks must have been enabled for us to have
                 received an active non-client-only lock. */
!             osi_assert(cm_enableServerLocks);
  
              scp = fileLock->scp;
!             osi_assert(scp != NULL);
  
              cm_HoldSCacheNoLock(scp);
  
--- 4911,4920 ----
  
              /* Server locks must have been enabled for us to have
                 received an active non-client-only lock. */
!             osi_assertx(cm_enableServerLocks, "!cm_enableServerLocks");
  
              scp = fileLock->scp;
!             osi_assertx(scp != NULL, "null cm_scache_t");
  
              cm_HoldSCacheNoLock(scp);
  
***************
*** 4931,4937 ****
                           fileLock->scp->fid.volume,
                           fileLock->scp->fid.vnode,
                           fileLock->scp->fid.unique);
!                 osi_assert(FALSE);
              }
  #endif
              /* Server locks are extended once per scp per refresh
--- 4931,4937 ----
                           fileLock->scp->fid.volume,
                           fileLock->scp->fid.vnode,
                           fileLock->scp->fid.unique);
!                 osi_assertx(FALSE, "invalid fid");
              }
  #endif
              /* Server locks are extended once per scp per refresh
***************
*** 5137,5143 ****
  
      scp = oldFileLock->scp;
  
!     osi_assert(scp != NULL);
  
      lock_ReleaseRead(&cm_scacheLock);
      lock_ObtainMutex(&scp->mx);
--- 5137,5143 ----
  
      scp = oldFileLock->scp;
  
!     osi_assertx(scp != NULL, "null cm_scache_t");
  
      lock_ReleaseRead(&cm_scacheLock);
      lock_ObtainMutex(&scp->mx);
***************
*** 5243,5249 ****
          oldFileLock->flags |= CM_FILELOCK_FLAG_WAITLOCK;
      }
  
!     osi_assert(IS_LOCK_WAITLOCK(oldFileLock));
  
      if (force_client_lock ||
          !SERVERLOCKS_ENABLED(scp) ||
--- 5243,5249 ----
          oldFileLock->flags |= CM_FILELOCK_FLAG_WAITLOCK;
      }
  
!     osi_assertx(IS_LOCK_WAITLOCK(oldFileLock), "!IS_LOCK_WAITLOCK");
  
      if (force_client_lock ||
          !SERVERLOCKS_ENABLED(scp) ||
***************
*** 5315,5321 ****
  
          if (scp->serverLock == LockRead) {
  
!             osi_assert(newLock == LockWrite);
  
              osi_Log0(afsd_logp, "  Attempting to UPGRADE from LockRead to LockWrite");
  
--- 5315,5321 ----
  
          if (scp->serverLock == LockRead) {
  
!             osi_assertx(newLock == LockWrite, "!LockWrite");
  
              osi_Log0(afsd_logp, "  Attempting to UPGRADE from LockRead to LockWrite");
  
***************
*** 5394,5402 ****
  cm_key_t cm_GenerateKey(unsigned int session_id, unsigned long process_id, unsigned int file_id)
  {
  #ifdef DEBUG
!     osi_assert((process_id & 0xffffffff) == process_id);
!     osi_assert((session_id & 0xffff) == session_id);
!     osi_assert((file_id & 0xffff) == file_id);
  #endif
  
      return 
--- 5394,5402 ----
  cm_key_t cm_GenerateKey(unsigned int session_id, unsigned long process_id, unsigned int file_id)
  {
  #ifdef DEBUG
!     osi_assertx((process_id & 0xffffffff) == process_id, "unexpected process_id");
!     osi_assertx((session_id & 0xffff) == session_id, "unexpected session_id");
!     osi_assertx((file_id & 0xffff) == file_id, "unexpected file_id");
  #endif
  
      return 
Index: openafs/src/WINNT/afsd/cm_volume.c
diff -c openafs/src/WINNT/afsd/cm_volume.c:1.14.4.17 openafs/src/WINNT/afsd/cm_volume.c:1.14.4.18
*** openafs/src/WINNT/afsd/cm_volume.c:1.14.4.17	Sat Oct 20 00:03:06 2007
--- openafs/src/WINNT/afsd/cm_volume.c	Sun Nov  4 19:24:46 2007
***************
*** 456,462 ****
              if ( !tsp->cellp ) 
                  tsp->cellp = cellp;
  
!             osi_assert(tsp != NULL);
                          
              /* and add it to the list(s). */
              /*
--- 456,462 ----
              if ( !tsp->cellp ) 
                  tsp->cellp = cellp;
  
!             osi_assertx(tsp != NULL, "null cm_server_t");
                          
              /* and add it to the list(s). */
              /*
***************
*** 605,611 ****
      }
  
  #ifdef SEARCH_ALL_VOLUMES
!     osi_assert(volp == volp2);
  #endif
  
      lock_ReleaseRead(&cm_volumeLock);
--- 605,611 ----
      }
  
  #ifdef SEARCH_ALL_VOLUMES
!     osi_assertx(volp == volp2, "unexpected cm_vol_t");
  #endif
  
      lock_ReleaseRead(&cm_volumeLock);
***************
*** 690,696 ****
      }
  
  #ifdef SEARCH_ALL_VOLUMES
!     osi_assert(volp2 == volp);
  #endif
  
      if (!volp && (flags & CM_GETVOL_FLAG_CREATE)) {
--- 690,696 ----
      }
  
  #ifdef SEARCH_ALL_VOLUMES
!     osi_assertx(volp2 == volp, "unexpected cm_vol_t");
  #endif
  
      if (!volp && (flags & CM_GETVOL_FLAG_CREATE)) {
***************
*** 856,862 ****
      }
  
  #ifdef SEARCH_ALL_VOLUMES
!     osi_assert(volp == volp2);
  #endif
  
      lock_ReleaseRead(&cm_volumeLock);
--- 856,862 ----
      }
  
  #ifdef SEARCH_ALL_VOLUMES
!     osi_assertx(volp == volp2, "unexpected cm_vol_t");
  #endif
  
      lock_ReleaseRead(&cm_volumeLock);
***************
*** 917,923 ****
  void cm_PutVolume(cm_volume_t *volp)
  {
      lock_ObtainWrite(&cm_volumeLock);
!     osi_assert(volp->refCount-- > 0);
      lock_ReleaseWrite(&cm_volumeLock);
  }
  
--- 917,923 ----
  void cm_PutVolume(cm_volume_t *volp)
  {
      lock_ObtainWrite(&cm_volumeLock);
!     osi_assertx(volp->refCount-- > 0, "cm_volume_t refCount 0");
      lock_ReleaseWrite(&cm_volumeLock);
  }
  
***************
*** 956,962 ****
  	lock_ReleaseMutex(&volp->mx);
  	
          lock_ObtainWrite(&cm_volumeLock);
! 	osi_assert(volp->refCount-- > 0);
      }
      lock_ReleaseWrite(&cm_volumeLock);
  
--- 956,962 ----
  	lock_ReleaseMutex(&volp->mx);
  	
          lock_ObtainWrite(&cm_volumeLock);
! 	osi_assertx(volp->refCount-- > 0, "cm_volume_t refCount 0");
      }
      lock_ReleaseWrite(&cm_volumeLock);
  
***************
*** 1112,1118 ****
          cm_CheckOfflineVolume(volp, 0);
  
  	lock_ObtainWrite(&cm_volumeLock);
! 	osi_assert(volp->refCount-- > 0);
      }
      lock_ReleaseWrite(&cm_volumeLock);
  }
--- 1112,1118 ----
          cm_CheckOfflineVolume(volp, 0);
  
  	lock_ObtainWrite(&cm_volumeLock);
! 	osi_assertx(volp->refCount-- > 0, "cm_volume_t refCount 0");
      }
      lock_ReleaseWrite(&cm_volumeLock);
  }
***************
*** 1205,1211 ****
  
  	lock_ReleaseMutex(&volp->mx);
  	lock_ObtainWrite(&cm_volumeLock);
! 	osi_assert(volp->refCount-- > 0);
      }
      lock_ReleaseWrite(&cm_volumeLock);
  }	
--- 1205,1211 ----
  
  	lock_ReleaseMutex(&volp->mx);
  	lock_ObtainWrite(&cm_volumeLock);
! 	osi_assertx(volp->refCount-- > 0, "cm_volume_t refCount 0");
      }
      lock_ReleaseWrite(&cm_volumeLock);
  }	
Index: openafs/src/WINNT/afsd/cunlog.c
diff -c openafs/src/WINNT/afsd/cunlog.c:1.2 openafs/src/WINNT/afsd/cunlog.c:1.2.32.1
*** openafs/src/WINNT/afsd/cunlog.c:1.2	Sat Nov  4 05:01:41 2000
--- openafs/src/WINNT/afsd/cunlog.c	Wed Oct 31 00:09:17 2007
***************
*** 15,23 ****
  #include <afsint.h>
  #include <winsock2.h>
  
! CommandProc (as, arock)
!   char *arock;
!   struct cmd_syndesc *as;
  {
    afs_int32 code, ecode=0;
    struct ktc_principal server;
--- 15,22 ----
  #include <afsint.h>
  #include <winsock2.h>
  
! static int
! CommandProc (struct cmd_syndesc *as, void *arock)
  {
    afs_int32 code, ecode=0;
    struct ktc_principal server;
***************
*** 55,61 ****
  
    WSAStartup(0x0101, &WSAjunk);
  
!   ts = cmd_CreateSyntax((char *) 0, CommandProc, 0, "Release Kerberos authentication");
    cmd_AddParm(ts, "-cell", CMD_LIST, CMD_OPTIONAL, "cell name");
  
    code = cmd_Dispatch(argc, argv);
--- 54,60 ----
  
    WSAStartup(0x0101, &WSAjunk);
  
!   ts = cmd_CreateSyntax(NULL, CommandProc, NULL, "Release Kerberos authentication");
    cmd_AddParm(ts, "-cell", CMD_LIST, CMD_OPTIONAL, "cell name");
  
    code = cmd_Dispatch(argc, argv);
Index: openafs/src/WINNT/afsd/fs.c
diff -c openafs/src/WINNT/afsd/fs.c:1.32.4.13 openafs/src/WINNT/afsd/fs.c:1.32.4.14
*** openafs/src/WINNT/afsd/fs.c:1.32.4.13	Tue Oct 16 13:26:08 2007
--- openafs/src/WINNT/afsd/fs.c	Wed Oct 31 00:09:17 2007
***************
*** 50,66 ****
  
  static struct ubik_client *uclient;
  
! static int GetClientAddrsCmd(struct cmd_syndesc *asp, char *arock);
! static int SetClientAddrsCmd(struct cmd_syndesc *asp, char *arock);
! static int FlushMountCmd(struct cmd_syndesc *asp, char *arock);
! static int RxStatProcCmd(struct cmd_syndesc *asp, char *arock);
! static int RxStatPeerCmd(struct cmd_syndesc *asp, char *arock);
  
  extern struct cmd_syndesc *cmd_CreateSyntax();
  
! static int MemDumpCmd(struct cmd_syndesc *asp, char *arock);
! static int CSCPolicyCmd(struct cmd_syndesc *asp, char *arock);
! static int MiniDumpCmd(struct cmd_syndesc *asp, char *arock);
  
  static char pn[] = "fs";
  static int rxInitDone = 0;
--- 50,66 ----
  
  static struct ubik_client *uclient;
  
! static int GetClientAddrsCmd(struct cmd_syndesc *asp, void *arock);
! static int SetClientAddrsCmd(struct cmd_syndesc *asp, void *arock);
! static int FlushMountCmd(struct cmd_syndesc *asp, void *arock);
! static int RxStatProcCmd(struct cmd_syndesc *asp, void *arock);
! static int RxStatPeerCmd(struct cmd_syndesc *asp, void *arock);
  
  extern struct cmd_syndesc *cmd_CreateSyntax();
  
! static int MemDumpCmd(struct cmd_syndesc *asp, void *arock);
! static int CSCPolicyCmd(struct cmd_syndesc *asp, void *arock);
! static int MiniDumpCmd(struct cmd_syndesc *asp, void *arock);
  
  static char pn[] = "fs";
  static int rxInitDone = 0;
***************
*** 873,879 ****
  }
  
  static int
! SetACLCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 873,879 ----
  }
  
  static int
! SetACLCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1003,1009 ****
  }
  
  static int 
! CopyACLCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1003,1009 ----
  }
  
  static int 
! CopyACLCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1179,1185 ****
  
  /* clean up an acl to not have bogus entries */
  static int 
! CleanACLCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct Acl *ta = 0;
--- 1179,1185 ----
  
  /* clean up an acl to not have bogus entries */
  static int 
! CleanACLCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct Acl *ta = 0;
***************
*** 1266,1272 ****
  }
  
  static int 
! ListACLCmd(struct cmd_syndesc *as, char *arock) 
  {
      afs_int32 code;
      struct Acl *ta = 0;
--- 1266,1272 ----
  }
  
  static int 
! ListACLCmd(struct cmd_syndesc *as, void *arock) 
  {
      afs_int32 code;
      struct Acl *ta = 0;
***************
*** 1332,1338 ****
  }
  
  static int
! FlushAllCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1332,1338 ----
  }
  
  static int
! FlushAllCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1347,1353 ****
  }
  
  static int
! FlushVolumeCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1347,1353 ----
  }
  
  static int
! FlushVolumeCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1369,1375 ****
  }
  
  static int 
! FlushCmd(struct cmd_syndesc *as, char *arock) 
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1369,1375 ----
  }
  
  static int 
! FlushCmd(struct cmd_syndesc *as, void *arock) 
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1397,1403 ****
  
  /* all this command does is repackage its args and call SetVolCmd */
  static int
! SetQuotaCmd(struct cmd_syndesc *as, char *arock) {
      struct cmd_syndesc ts;
  
      /* copy useful stuff from our command slot; we may later have to reorder */
--- 1397,1403 ----
  
  /* all this command does is repackage its args and call SetVolCmd */
  static int
! SetQuotaCmd(struct cmd_syndesc *as, void *arock) {
      struct cmd_syndesc ts;
  
      /* copy useful stuff from our command slot; we may later have to reorder */
***************
*** 1406,1412 ****
  }
  
  static int
! SetVolCmd(struct cmd_syndesc *as, char *arock) {
      afs_int32 code;
      struct ViceIoctl blob;
      struct cmd_item *ti;
--- 1406,1412 ----
  }
  
  static int
! SetVolCmd(struct cmd_syndesc *as, void *arock) {
      afs_int32 code;
      struct ViceIoctl blob;
      struct cmd_item *ti;
***************
*** 1482,1488 ****
  #endif /* WIN32 */
  
  static int 
! ExamineCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1482,1488 ----
  #endif /* WIN32 */
  
  static int 
! ExamineCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1563,1569 ****
  }
  
  static int
! ListQuotaCmd(struct cmd_syndesc *as, char *arock) 
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1563,1569 ----
  }
  
  static int
! ListQuotaCmd(struct cmd_syndesc *as, void *arock) 
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1595,1601 ****
  }
  
  static int
! WhereIsCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1595,1601 ----
  }
  
  static int
! WhereIsCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1634,1640 ****
  
  
  static int
! DiskFreeCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1634,1640 ----
  
  
  static int
! DiskFreeCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1665,1671 ****
  }
  
  static int
! QuotaCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1665,1671 ----
  }
  
  static int
! QuotaCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1697,1703 ****
  }
  
  static int
! ListMountCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1697,1703 ----
  }
  
  static int
! ListMountCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1849,1855 ****
  }
  
  static int
! MakeMountCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      char *cellName, *volName, *tmpName;
--- 1849,1855 ----
  }
  
  static int
! MakeMountCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      char *cellName, *volName, *tmpName;
***************
*** 1994,2000 ****
   *      tp: Set to point to the actual name of the mount point to nuke.
   */
  static int
! RemoveMountCmd(struct cmd_syndesc *as, char *arock) {
      afs_int32 code=0;
      struct ViceIoctl blob;
      struct cmd_item *ti;
--- 1994,2000 ----
   *      tp: Set to point to the actual name of the mount point to nuke.
   */
  static int
! RemoveMountCmd(struct cmd_syndesc *as, void *arock) {
      afs_int32 code=0;
      struct ViceIoctl blob;
      struct cmd_item *ti;
***************
*** 2070,2076 ****
  */
  
  static int
! CheckServersCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2070,2076 ----
  */
  
  static int
! CheckServersCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2176,2182 ****
  }
  
  static int
! MessagesCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code=0;
      struct ViceIoctl blob;
--- 2176,2182 ----
  }
  
  static int
! MessagesCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code=0;
      struct ViceIoctl blob;
***************
*** 2219,2225 ****
  }
  
  static int
! CheckVolumesCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2219,2225 ----
  }
  
  static int
! CheckVolumesCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2237,2243 ****
  }
  
  static int
! SetCacheSizeCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2237,2243 ----
  }
  
  static int
! SetCacheSizeCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2281,2287 ****
  }
  
  static int
! GetCacheParmsCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2281,2287 ----
  }
  
  static int
! GetCacheParmsCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2306,2312 ****
  }
  
  static int
! ListCellsCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      afs_int32 i, j, *lp, magic, size;
--- 2306,2312 ----
  }
  
  static int
! ListCellsCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      afs_int32 i, j, *lp, magic, size;
***************
*** 2366,2372 ****
  
  #ifndef WIN32
  static int
! ListAliasesCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code, i;
      char *tp, *aliasName, *realName;
--- 2366,2372 ----
  
  #ifndef WIN32
  static int
! ListAliasesCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code, i;
      char *tp, *aliasName, *realName;
***************
*** 2396,2402 ****
  }
  
  static int
! CallBackRxConnCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2396,2402 ----
  }
  
  static int
! CallBackRxConnCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2436,2442 ****
  #endif /* WIN32 */
  
  static int
! NewCellCmd(struct cmd_syndesc *as, char *arock)
  {
  #ifndef WIN32
      afs_int32 code, linkedstate=0, size=0, *lp;
--- 2436,2442 ----
  #endif /* WIN32 */
  
  static int
! NewCellCmd(struct cmd_syndesc *as, void *arock)
  {
  #ifndef WIN32
      afs_int32 code, linkedstate=0, size=0, *lp;
***************
*** 2533,2539 ****
  
  #ifndef WIN32
  static int
! NewAliasCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2533,2539 ----
  
  #ifndef WIN32
  static int
! NewAliasCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2569,2575 ****
  #endif /* WIN32 */
  
  static int
! WhichCellCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct cmd_item *ti;
--- 2569,2575 ----
  #endif /* WIN32 */
  
  static int
! WhichCellCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct cmd_item *ti;
***************
*** 2593,2599 ****
  }
  
  static int
! WSCellCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2593,2599 ----
  }
  
  static int
! WSCellCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2616,2622 ****
  
  /*
  static int
! PrimaryCellCmd(struct cmd_syndesc *as, char *arock)
  {
      fprintf(stderr,"This command is obsolete, as is the concept of a primary token.\n");
      return 0;
--- 2616,2622 ----
  
  /*
  static int
! PrimaryCellCmd(struct cmd_syndesc *as, void *arock)
  {
      fprintf(stderr,"This command is obsolete, as is the concept of a primary token.\n");
      return 0;
***************
*** 2624,2630 ****
  */
  
  static int
! MonitorCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2624,2630 ----
  */
  
  static int
! MonitorCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2684,2690 ****
  }
  
  static int
! SysNameCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2684,2690 ----
  }
  
  static int
! SysNameCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2754,2760 ****
  }
  
  static char *exported_types[] = {"null", "nfs", ""};
! static int ExportAfsCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2754,2760 ----
  }
  
  static char *exported_types[] = {"null", "nfs", ""};
! static int ExportAfsCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2857,2863 ****
  
  
  static int
! GetCellCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2857,2863 ----
  
  
  static int
! GetCellCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2906,2912 ****
      return error;
  }
  
! static int SetCellCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2906,2912 ----
      return error;
  }
  
! static int SetCellCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 3193,3199 ****
  
  #ifdef WIN32
  static int
! SetPrefCmd(struct cmd_syndesc *as, char * arock)
  {
      FILE *infd;
      afs_int32 code;
--- 3193,3199 ----
  
  #ifdef WIN32
  static int
! SetPrefCmd(struct cmd_syndesc *as, void * arock)
  {
      FILE *infd;
      afs_int32 code;
***************
*** 3283,3289 ****
  }
  #else
  static int
! SetPrefCmd(struct cmd_syndesc *as, char *arock)
  {
      FILE *infd;
      afs_int32 code;
--- 3283,3289 ----
  }
  #else
  static int
! SetPrefCmd(struct cmd_syndesc *as, void *arock)
  {
      FILE *infd;
      afs_int32 code;
***************
*** 3389,3395 ****
  
  #ifdef WIN32
  static int 
! GetPrefCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct cmd_item *ti;
--- 3389,3395 ----
  
  #ifdef WIN32
  static int 
! GetPrefCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct cmd_item *ti;
***************
*** 3460,3466 ****
  }
  #else
  static int
! GetPrefCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct cmd_item *ti;
--- 3460,3466 ----
  }
  #else
  static int
! GetPrefCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct cmd_item *ti;
***************
*** 3531,3537 ****
  #endif /* WIN32 */
  
  static int
! UuidCmd(struct cmd_syndesc *asp, char *arock)
  {
      long code;
      long inValue;
--- 3531,3537 ----
  #endif /* WIN32 */
  
  static int
! UuidCmd(struct cmd_syndesc *asp, void *arock)
  {
      long code;
      long inValue;
***************
*** 3580,3586 ****
  }
  
  static int
! TraceCmd(struct cmd_syndesc *asp, char *arock)
  {
      long code;
      struct ViceIoctl blob;
--- 3580,3586 ----
  }
  
  static int
! TraceCmd(struct cmd_syndesc *asp, void *arock)
  {
      long code;
      struct ViceIoctl blob;
***************
*** 3642,3648 ****
  
  /* fs sb -kbytes 9999 -files *.o -default 64 */
  static int
! StoreBehindCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code = 0;
      struct ViceIoctl blob;
--- 3642,3648 ----
  
  /* fs sb -kbytes 9999 -files *.o -default 64 */
  static int
! StoreBehindCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code = 0;
      struct ViceIoctl blob;
***************
*** 3749,3755 ****
  }
  
  static afs_int32 
! SetCryptCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code = 0, flag;
      struct ViceIoctl blob;
--- 3749,3755 ----
  }
  
  static afs_int32 
! SetCryptCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code = 0, flag;
      struct ViceIoctl blob;
***************
*** 3782,3788 ****
  }
  
  static afs_int32 
! GetCryptCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code = 0, flag;
      struct ViceIoctl blob;
--- 3782,3788 ----
  }
  
  static afs_int32 
! GetCryptCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code = 0, flag;
      struct ViceIoctl blob;
***************
*** 3810,3816 ****
  }
  
  static int
! MemDumpCmd(struct cmd_syndesc *asp, char *arock)
  {
      long code;
      struct ViceIoctl blob;
--- 3810,3816 ----
  }
  
  static int
! MemDumpCmd(struct cmd_syndesc *asp, void *arock)
  {
      long code;
      struct ViceIoctl blob;
***************
*** 3855,3861 ****
  }
  
  static int
! MiniDumpCmd(struct cmd_syndesc *asp, char *arock)
  {
      BOOL success = 0;
      SERVICE_STATUS status;
--- 3855,3861 ----
  }
  
  static int
! MiniDumpCmd(struct cmd_syndesc *asp, void *arock)
  {
      BOOL success = 0;
      SERVICE_STATUS status;
***************
*** 3896,3902 ****
  }
  
  static int
! CSCPolicyCmd(struct cmd_syndesc *asp, char *arock)
  {
      struct cmd_item *ti;
      char *share = NULL;
--- 3896,3902 ----
  }
  
  static int
! CSCPolicyCmd(struct cmd_syndesc *asp, void *arock)
  {
      struct cmd_item *ti;
      char *share = NULL;
***************
*** 4010,4016 ****
  #ifndef WIN32
  /* get clients interface addresses */
  static int
! GetClientAddrsCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct cmd_item *ti;
--- 4010,4016 ----
  #ifndef WIN32
  /* get clients interface addresses */
  static int
! GetClientAddrsCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct cmd_item *ti;
***************
*** 4056,4062 ****
  }
  
  static int
! SetClientAddrsCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code, addr;
      struct cmd_item *ti;
--- 4056,4062 ----
  }
  
  static int
! SetClientAddrsCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code, addr;
      struct cmd_item *ti;
***************
*** 4130,4136 ****
  }
  
  static int
! FlushMountCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 4130,4136 ----
  }
  
  static int
! FlushMountCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 4247,4253 ****
  #endif /* WIN32 */
  
  static int
! RxStatProcCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      afs_int32 flags = 0;
--- 4247,4253 ----
  #endif /* WIN32 */
  
  static int
! RxStatProcCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      afs_int32 flags = 0;
***************
*** 4281,4287 ****
  }
  
  static int
! RxStatPeerCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      afs_int32 flags = 0;
--- 4281,4287 ----
  }
  
  static int
! RxStatPeerCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      afs_int32 flags = 0;
***************
*** 4347,4378 ****
      osi_Init();
  
  #ifndef WIN32
!     ts = cmd_CreateSyntax("getclientaddrs", GetClientAddrsCmd, 0,
  			  "get client network interface addresses");
      cmd_CreateAlias(ts, "gc");
  
!     ts = cmd_CreateSyntax("setclientaddrs", SetClientAddrsCmd, 0,
  			  "set client network interface addresses");
      cmd_AddParm(ts, "-address", CMD_LIST, CMD_OPTIONAL | CMD_EXPANDS,
                  "client network interfaces");
      cmd_CreateAlias(ts, "sc");
  #endif /* WIN32 */
  
!     ts = cmd_CreateSyntax("setserverprefs", SetPrefCmd, 0, "set server ranks");
      cmd_AddParm(ts, "-servers", CMD_LIST, CMD_OPTIONAL|CMD_EXPANDS, "fileserver names and ranks");
      cmd_AddParm(ts, "-vlservers", CMD_LIST, CMD_OPTIONAL|CMD_EXPANDS, "VL server names and ranks");
      cmd_AddParm(ts, "-file", CMD_SINGLE, CMD_OPTIONAL, "input from named file");
      cmd_AddParm(ts, "-stdin", CMD_FLAG, CMD_OPTIONAL, "input from stdin");
      cmd_CreateAlias(ts, "sp");
  
!     ts = cmd_CreateSyntax("getserverprefs", GetPrefCmd, 0, "get server ranks");
      cmd_AddParm(ts, "-file", CMD_SINGLE, CMD_OPTIONAL, "output to named file");
      cmd_AddParm(ts, "-numeric", CMD_FLAG, CMD_OPTIONAL, "addresses only");
      cmd_AddParm(ts, "-vlservers", CMD_FLAG, CMD_OPTIONAL, "VL servers");
      /* cmd_AddParm(ts, "-cell", CMD_FLAG, CMD_OPTIONAL, "cellname"); */
      cmd_CreateAlias(ts, "gp");
  
!     ts = cmd_CreateSyntax("setacl", SetACLCmd, 0, "set access control list");
      cmd_AddParm(ts, "-dir", CMD_LIST, 0, "directory");
      cmd_AddParm(ts, "-acl", CMD_LIST, 0, "access list entries");
      cmd_AddParm(ts, "-clear", CMD_FLAG, CMD_OPTIONAL, "clear access list");
--- 4347,4378 ----
      osi_Init();
  
  #ifndef WIN32
!     ts = cmd_CreateSyntax("getclientaddrs", GetClientAddrsCmd, NULL,
  			  "get client network interface addresses");
      cmd_CreateAlias(ts, "gc");
  
!     ts = cmd_CreateSyntax("setclientaddrs", SetClientAddrsCmd, NULL,
  			  "set client network interface addresses");
      cmd_AddParm(ts, "-address", CMD_LIST, CMD_OPTIONAL | CMD_EXPANDS,
                  "client network interfaces");
      cmd_CreateAlias(ts, "sc");
  #endif /* WIN32 */
  
!     ts = cmd_CreateSyntax("setserverprefs", SetPrefCmd, NULL, "set server ranks");
      cmd_AddParm(ts, "-servers", CMD_LIST, CMD_OPTIONAL|CMD_EXPANDS, "fileserver names and ranks");
      cmd_AddParm(ts, "-vlservers", CMD_LIST, CMD_OPTIONAL|CMD_EXPANDS, "VL server names and ranks");
      cmd_AddParm(ts, "-file", CMD_SINGLE, CMD_OPTIONAL, "input from named file");
      cmd_AddParm(ts, "-stdin", CMD_FLAG, CMD_OPTIONAL, "input from stdin");
      cmd_CreateAlias(ts, "sp");
  
!     ts = cmd_CreateSyntax("getserverprefs", GetPrefCmd, NULL, "get server ranks");
      cmd_AddParm(ts, "-file", CMD_SINGLE, CMD_OPTIONAL, "output to named file");
      cmd_AddParm(ts, "-numeric", CMD_FLAG, CMD_OPTIONAL, "addresses only");
      cmd_AddParm(ts, "-vlservers", CMD_FLAG, CMD_OPTIONAL, "VL servers");
      /* cmd_AddParm(ts, "-cell", CMD_FLAG, CMD_OPTIONAL, "cellname"); */
      cmd_CreateAlias(ts, "gp");
  
!     ts = cmd_CreateSyntax("setacl", SetACLCmd, NULL, "set access control list");
      cmd_AddParm(ts, "-dir", CMD_LIST, 0, "directory");
      cmd_AddParm(ts, "-acl", CMD_LIST, 0, "access list entries");
      cmd_AddParm(ts, "-clear", CMD_FLAG, CMD_OPTIONAL, "clear access list");
***************
*** 4382,4398 ****
      cmd_AddParm(ts, "-if", CMD_FLAG, CMD_OPTIONAL, "initial file acl (DFS only)");
      cmd_CreateAlias(ts, "sa");
      
!     ts = cmd_CreateSyntax("listacl", ListACLCmd, 0, "list access control list");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      parm_listacl_id = ts->nParms;
      cmd_AddParm(ts, "-id", CMD_FLAG, CMD_OPTIONAL, "initial directory acl");
      cmd_AddParm(ts, "-if", CMD_FLAG, CMD_OPTIONAL, "initial file acl");
      cmd_CreateAlias(ts, "la");
      
!     ts = cmd_CreateSyntax("cleanacl", CleanACLCmd, 0, "clean up access control list");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      
!     ts = cmd_CreateSyntax("copyacl", CopyACLCmd, 0, "copy access control list");
      cmd_AddParm(ts, "-fromdir", CMD_SINGLE, 0, "source directory (or DFS file)");
      cmd_AddParm(ts, "-todir", CMD_LIST, 0, "destination directory (or DFS file)");
      cmd_AddParm(ts, "-clear", CMD_FLAG, CMD_OPTIONAL, "first clear dest access list");
--- 4382,4398 ----
      cmd_AddParm(ts, "-if", CMD_FLAG, CMD_OPTIONAL, "initial file acl (DFS only)");
      cmd_CreateAlias(ts, "sa");
      
!     ts = cmd_CreateSyntax("listacl", ListACLCmd, NULL, "list access control list");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      parm_listacl_id = ts->nParms;
      cmd_AddParm(ts, "-id", CMD_FLAG, CMD_OPTIONAL, "initial directory acl");
      cmd_AddParm(ts, "-if", CMD_FLAG, CMD_OPTIONAL, "initial file acl");
      cmd_CreateAlias(ts, "la");
      
!     ts = cmd_CreateSyntax("cleanacl", CleanACLCmd, NULL, "clean up access control list");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      
!     ts = cmd_CreateSyntax("copyacl", CopyACLCmd, NULL, "copy access control list");
      cmd_AddParm(ts, "-fromdir", CMD_SINGLE, 0, "source directory (or DFS file)");
      cmd_AddParm(ts, "-todir", CMD_LIST, 0, "destination directory (or DFS file)");
      cmd_AddParm(ts, "-clear", CMD_FLAG, CMD_OPTIONAL, "first clear dest access list");
***************
*** 4402,4417 ****
      
      cmd_CreateAlias(ts, "ca");
  
!     ts = cmd_CreateSyntax("flush", FlushCmd, 0, "flush file from cache");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      
  #ifndef WIN32
!     ts = cmd_CreateSyntax("flushmount", FlushMountCmd, 0,
                             "flush mount symlink from cache");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  #endif
  
!     ts = cmd_CreateSyntax("setvol", SetVolCmd, 0, "set volume status");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      cmd_AddParm(ts, "-max", CMD_SINGLE, CMD_OPTIONAL, "disk space quota in 1K units");
  #ifdef notdef
--- 4402,4417 ----
      
      cmd_CreateAlias(ts, "ca");
  
!     ts = cmd_CreateSyntax("flush", FlushCmd, NULL, "flush file from cache");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      
  #ifndef WIN32
!     ts = cmd_CreateSyntax("flushmount", FlushMountCmd, NULL,
                             "flush mount symlink from cache");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  #endif
  
!     ts = cmd_CreateSyntax("setvol", SetVolCmd, NULL, "set volume status");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      cmd_AddParm(ts, "-max", CMD_SINGLE, CMD_OPTIONAL, "disk space quota in 1K units");
  #ifdef notdef
***************
*** 4421,4449 ****
      cmd_AddParm(ts, "-offlinemsg", CMD_SINGLE, CMD_OPTIONAL, "offline message");
      cmd_CreateAlias(ts, "sv");
      
!     ts = cmd_CreateSyntax("messages", MessagesCmd, 0, "control Cache Manager messages");
      cmd_AddParm(ts, "-show", CMD_SINGLE, CMD_OPTIONAL, "[user|console|all|none]");
  
!     ts = cmd_CreateSyntax("examine", ExamineCmd, 0, "display file/volume status");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      cmd_CreateAlias(ts, "lv");
      cmd_CreateAlias(ts, "listvol");
      
!     ts = cmd_CreateSyntax("listquota", ListQuotaCmd, 0, "list volume quota");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      cmd_CreateAlias(ts, "lq");
      
!     ts = cmd_CreateSyntax("diskfree", DiskFreeCmd, 0, "show server disk space usage");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      cmd_CreateAlias(ts, "df");
      
!     ts = cmd_CreateSyntax("quota", QuotaCmd, 0, "show volume quota usage");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      
!     ts = cmd_CreateSyntax("lsmount", ListMountCmd, 0, "list mount point");    
      cmd_AddParm(ts, "-dir", CMD_LIST, 0, "directory");
      
!     ts = cmd_CreateSyntax("mkmount", MakeMountCmd, 0, "make mount point");
      cmd_AddParm(ts, "-dir", CMD_SINGLE, 0, "directory");
      cmd_AddParm(ts, "-vol", CMD_SINGLE, 0, "volume name");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell name");
--- 4421,4449 ----
      cmd_AddParm(ts, "-offlinemsg", CMD_SINGLE, CMD_OPTIONAL, "offline message");
      cmd_CreateAlias(ts, "sv");
      
!     ts = cmd_CreateSyntax("messages", MessagesCmd, NULL, "control Cache Manager messages");
      cmd_AddParm(ts, "-show", CMD_SINGLE, CMD_OPTIONAL, "[user|console|all|none]");
  
!     ts = cmd_CreateSyntax("examine", ExamineCmd, NULL, "display file/volume status");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      cmd_CreateAlias(ts, "lv");
      cmd_CreateAlias(ts, "listvol");
      
!     ts = cmd_CreateSyntax("listquota", ListQuotaCmd, NULL, "list volume quota");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      cmd_CreateAlias(ts, "lq");
      
!     ts = cmd_CreateSyntax("diskfree", DiskFreeCmd, NULL, "show server disk space usage");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      cmd_CreateAlias(ts, "df");
      
!     ts = cmd_CreateSyntax("quota", QuotaCmd, NULL, "show volume quota usage");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      
!     ts = cmd_CreateSyntax("lsmount", ListMountCmd, NULL, "list mount point");    
      cmd_AddParm(ts, "-dir", CMD_LIST, 0, "directory");
      
!     ts = cmd_CreateSyntax("mkmount", MakeMountCmd, NULL, "make mount point");
      cmd_AddParm(ts, "-dir", CMD_SINGLE, 0, "directory");
      cmd_AddParm(ts, "-vol", CMD_SINGLE, 0, "volume name");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell name");
***************
*** 4458,4488 ****
      */
  
      
!     ts = cmd_CreateSyntax("rmmount", RemoveMountCmd, 0, "remove mount point");
      cmd_AddParm(ts, "-dir", CMD_LIST, 0, "directory");
      
!     ts = cmd_CreateSyntax("checkservers", CheckServersCmd, 0, "check local cell's servers");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell to check");
      cmd_AddParm(ts, "-all", CMD_FLAG, CMD_OPTIONAL, "check all cells");
      cmd_AddParm(ts, "-fast", CMD_FLAG, CMD_OPTIONAL, "just list, don't check");
      cmd_AddParm(ts,"-interval",CMD_SINGLE,CMD_OPTIONAL,"seconds between probes");
      
!     ts = cmd_CreateSyntax("checkvolumes", CheckVolumesCmd,0, "check volumeID/name mappings");
      cmd_CreateAlias(ts, "checkbackups");
  
      
!     ts = cmd_CreateSyntax("setcachesize", SetCacheSizeCmd, 0, "set cache size");
      cmd_AddParm(ts, "-blocks", CMD_SINGLE, CMD_OPTIONAL, "size in 1K byte blocks (0 => reset)");
      cmd_CreateAlias(ts, "cachesize");
  
      cmd_AddParm(ts, "-reset", CMD_FLAG, CMD_OPTIONAL, "reset size back to boot value");
      
!     ts = cmd_CreateSyntax("getcacheparms", GetCacheParmsCmd, 0, "get cache usage info");
  
!     ts = cmd_CreateSyntax("listcells", ListCellsCmd, 0, "list configured cells");
      cmd_AddParm(ts, "-numeric", CMD_FLAG, CMD_OPTIONAL, "addresses only");
      
!     ts = cmd_CreateSyntax("setquota", SetQuotaCmd, 0, "set volume quota");
      cmd_AddParm(ts, "-path", CMD_SINGLE, CMD_OPTIONAL, "dir/file path");
      cmd_AddParm(ts, "-max", CMD_SINGLE, 0, "max quota in kbytes");
  #ifdef notdef
--- 4458,4488 ----
      */
  
      
!     ts = cmd_CreateSyntax("rmmount", RemoveMountCmd, NULL, "remove mount point");
      cmd_AddParm(ts, "-dir", CMD_LIST, 0, "directory");
      
!     ts = cmd_CreateSyntax("checkservers", CheckServersCmd, NULL, "check local cell's servers");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell to check");
      cmd_AddParm(ts, "-all", CMD_FLAG, CMD_OPTIONAL, "check all cells");
      cmd_AddParm(ts, "-fast", CMD_FLAG, CMD_OPTIONAL, "just list, don't check");
      cmd_AddParm(ts,"-interval",CMD_SINGLE,CMD_OPTIONAL,"seconds between probes");
      
!     ts = cmd_CreateSyntax("checkvolumes", CheckVolumesCmd, NULL, "check volumeID/name mappings");
      cmd_CreateAlias(ts, "checkbackups");
  
      
!     ts = cmd_CreateSyntax("setcachesize", SetCacheSizeCmd, NULL, "set cache size");
      cmd_AddParm(ts, "-blocks", CMD_SINGLE, CMD_OPTIONAL, "size in 1K byte blocks (0 => reset)");
      cmd_CreateAlias(ts, "cachesize");
  
      cmd_AddParm(ts, "-reset", CMD_FLAG, CMD_OPTIONAL, "reset size back to boot value");
      
!     ts = cmd_CreateSyntax("getcacheparms", GetCacheParmsCmd, NULL, "get cache usage info");
  
!     ts = cmd_CreateSyntax("listcells", ListCellsCmd, NULL, "list configured cells");
      cmd_AddParm(ts, "-numeric", CMD_FLAG, CMD_OPTIONAL, "addresses only");
      
!     ts = cmd_CreateSyntax("setquota", SetQuotaCmd, NULL, "set volume quota");
      cmd_AddParm(ts, "-path", CMD_SINGLE, CMD_OPTIONAL, "dir/file path");
      cmd_AddParm(ts, "-max", CMD_SINGLE, 0, "max quota in kbytes");
  #ifdef notdef
***************
*** 4490,4496 ****
  #endif
      cmd_CreateAlias(ts, "sq");
  
!     ts = cmd_CreateSyntax("newcell", NewCellCmd, 0, "configure new cell");
  #ifndef WIN32
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "cell name");
      cmd_AddParm(ts, "-servers", CMD_LIST, CMD_REQUIRED, "primary servers");
--- 4490,4496 ----
  #endif
      cmd_CreateAlias(ts, "sq");
  
!     ts = cmd_CreateSyntax("newcell", NewCellCmd, NULL, "configure new cell");
  #ifndef WIN32
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "cell name");
      cmd_AddParm(ts, "-servers", CMD_LIST, CMD_REQUIRED, "primary servers");
***************
*** 4507,4552 ****
      cmd_AddParm(ts, "-vlport", CMD_SINGLE, CMD_OPTIONAL, "cell's vldb server port");
  #endif
  
!     ts = cmd_CreateSyntax("newalias", NewAliasCmd, 0,
  			  "configure new cell alias");
      cmd_AddParm(ts, "-alias", CMD_SINGLE, 0, "alias name");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "real name of cell");
  #endif
  
!     ts = cmd_CreateSyntax("whichcell", WhichCellCmd, 0, "list file's cell");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
!     ts = cmd_CreateSyntax("whereis", WhereIsCmd, 0, "list file's location");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
!     ts = cmd_CreateSyntax("wscell", WSCellCmd, 0, "list workstation's cell");
      
      /*
       ts = cmd_CreateSyntax("primarycell", PrimaryCellCmd, 0, "obsolete (listed primary cell)");
       */
      
!     ts = cmd_CreateSyntax("monitor", MonitorCmd, 0, "set cache monitor host address");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "host name or 'off'");
      cmd_CreateAlias(ts, "mariner");
      
     
!     ts = cmd_CreateSyntax("getcellstatus", GetCellCmd, 0, "get cell status");
      cmd_AddParm(ts, "-cell", CMD_LIST, 0, "cell name");
      
!     ts = cmd_CreateSyntax("setcell", SetCellCmd, 0, "set cell status");
      cmd_AddParm(ts, "-cell", CMD_LIST, 0, "cell name");
      cmd_AddParm(ts, "-suid", CMD_FLAG, CMD_OPTIONAL, "allow setuid programs");
      cmd_AddParm(ts, "-nosuid", CMD_FLAG, CMD_OPTIONAL, "disallow setuid programs");
  
!     ts = cmd_CreateSyntax("flushall", FlushAllCmd, 0, "flush all data");
  
!     ts = cmd_CreateSyntax("flushvolume", FlushVolumeCmd, 0, "flush all data in volume");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
!     ts = cmd_CreateSyntax("sysname", SysNameCmd, 0, "get/set sysname (i.e. @sys) value");
      cmd_AddParm(ts, "-newsys", CMD_LIST, CMD_OPTIONAL, "new sysname");
  
!     ts = cmd_CreateSyntax("exportafs", ExportAfsCmd, 0, "enable/disable translators to AFS");
      cmd_AddParm(ts, "-type", CMD_SINGLE, 0, "exporter name");
      cmd_AddParm(ts, "-start", CMD_SINGLE, CMD_OPTIONAL, "start/stop translator ('on' or 'off')");
      cmd_AddParm(ts, "-convert", CMD_SINGLE, CMD_OPTIONAL, "convert from afs to unix mode ('on or 'off')");
--- 4507,4552 ----
      cmd_AddParm(ts, "-vlport", CMD_SINGLE, CMD_OPTIONAL, "cell's vldb server port");
  #endif
  
!     ts = cmd_CreateSyntax("newalias", NewAliasCmd, NULL,
  			  "configure new cell alias");
      cmd_AddParm(ts, "-alias", CMD_SINGLE, 0, "alias name");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "real name of cell");
  #endif
  
!     ts = cmd_CreateSyntax("whichcell", WhichCellCmd, NULL, "list file's cell");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
!     ts = cmd_CreateSyntax("whereis", WhereIsCmd, NULL, "list file's location");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
!     ts = cmd_CreateSyntax("wscell", WSCellCmd, NULL, "list workstation's cell");
      
      /*
       ts = cmd_CreateSyntax("primarycell", PrimaryCellCmd, 0, "obsolete (listed primary cell)");
       */
      
!     ts = cmd_CreateSyntax("monitor", MonitorCmd, NULL, "set cache monitor host address");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "host name or 'off'");
      cmd_CreateAlias(ts, "mariner");
      
     
!     ts = cmd_CreateSyntax("getcellstatus", GetCellCmd, NULL, "get cell status");
      cmd_AddParm(ts, "-cell", CMD_LIST, 0, "cell name");
      
!     ts = cmd_CreateSyntax("setcell", SetCellCmd, NULL, "set cell status");
      cmd_AddParm(ts, "-cell", CMD_LIST, 0, "cell name");
      cmd_AddParm(ts, "-suid", CMD_FLAG, CMD_OPTIONAL, "allow setuid programs");
      cmd_AddParm(ts, "-nosuid", CMD_FLAG, CMD_OPTIONAL, "disallow setuid programs");
  
!     ts = cmd_CreateSyntax("flushall", FlushAllCmd, NULL, "flush all data");
  
!     ts = cmd_CreateSyntax("flushvolume", FlushVolumeCmd, NULL, "flush all data in volume");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
!     ts = cmd_CreateSyntax("sysname", SysNameCmd, NULL, "get/set sysname (i.e. @sys) value");
      cmd_AddParm(ts, "-newsys", CMD_LIST, CMD_OPTIONAL, "new sysname");
  
!     ts = cmd_CreateSyntax("exportafs", ExportAfsCmd, NULL, "enable/disable translators to AFS");
      cmd_AddParm(ts, "-type", CMD_SINGLE, 0, "exporter name");
      cmd_AddParm(ts, "-start", CMD_SINGLE, CMD_OPTIONAL, "start/stop translator ('on' or 'off')");
      cmd_AddParm(ts, "-convert", CMD_SINGLE, CMD_OPTIONAL, "convert from afs to unix mode ('on or 'off')");
***************
*** 4554,4610 ****
      cmd_AddParm(ts, "-submounts", CMD_SINGLE, CMD_OPTIONAL, "allow nfs mounts to subdirs of /afs/.. ('on' or 'off')");
  
  
!     ts = cmd_CreateSyntax("storebehind", StoreBehindCmd, 0, 
  			  "store to server after file close");
      cmd_AddParm(ts, "-kbytes", CMD_SINGLE, CMD_OPTIONAL, "asynchrony for specified names");
      cmd_AddParm(ts, "-files", CMD_LIST, CMD_OPTIONAL, "specific pathnames");
      cmd_AddParm(ts, "-allfiles", CMD_SINGLE, CMD_OPTIONAL, "new default (KB)");
      cmd_CreateAlias(ts, "sb");
  
!     ts = cmd_CreateSyntax("setcrypt", SetCryptCmd, 0, "set cache manager encryption flag");
      cmd_AddParm(ts, "-crypt", CMD_SINGLE, 0, "on or off");
  
!     ts = cmd_CreateSyntax("getcrypt", GetCryptCmd, 0, "get cache manager encryption flag");
  
!     ts = cmd_CreateSyntax("rxstatproc", RxStatProcCmd, 0,
  			  "Manage per process RX statistics");
      cmd_AddParm(ts, "-enable", CMD_FLAG, CMD_OPTIONAL, "Enable RX stats");
      cmd_AddParm(ts, "-disable", CMD_FLAG, CMD_OPTIONAL, "Disable RX stats");
      cmd_AddParm(ts, "-clear", CMD_FLAG, CMD_OPTIONAL, "Clear RX stats");
  
!     ts = cmd_CreateSyntax("rxstatpeer", RxStatPeerCmd, 0,
  			  "Manage per peer RX statistics");
      cmd_AddParm(ts, "-enable", CMD_FLAG, CMD_OPTIONAL, "Enable RX stats");
      cmd_AddParm(ts, "-disable", CMD_FLAG, CMD_OPTIONAL, "Disable RX stats");
      cmd_AddParm(ts, "-clear", CMD_FLAG, CMD_OPTIONAL, "Clear RX stats");
  
  #ifndef WIN32
!     ts = cmd_CreateSyntax("setcbaddr", CallBackRxConnCmd, 0, "configure callback connection address");
      cmd_AddParm(ts, "-addr", CMD_SINGLE, CMD_OPTIONAL, "host name or address");
  #endif
  
!     ts = cmd_CreateSyntax("trace", TraceCmd, 0, "enable or disable CM tracing");
      cmd_AddParm(ts, "-on", CMD_FLAG, CMD_OPTIONAL, "enable tracing");
      cmd_AddParm(ts, "-off", CMD_FLAG, CMD_OPTIONAL, "disable tracing");
      cmd_AddParm(ts, "-reset", CMD_FLAG, CMD_OPTIONAL, "reset log contents");
      cmd_AddParm(ts, "-dump", CMD_FLAG, CMD_OPTIONAL, "dump log contents");
      cmd_CreateAlias(ts, "tr");
  
!     ts = cmd_CreateSyntax("uuid", UuidCmd, 0, "manage the UUID for the cache manager");
      cmd_AddParm(ts, "-generate", CMD_FLAG, CMD_OPTIONAL, "generate a new UUID");
  
!     ts = cmd_CreateSyntax("memdump", MemDumpCmd, 0, "dump memory allocs in debug builds");
      cmd_AddParm(ts, "-begin", CMD_FLAG, CMD_OPTIONAL, "set a memory checkpoint");
      cmd_AddParm(ts, "-end", CMD_FLAG, CMD_OPTIONAL, "dump memory allocs");
      
!     ts = cmd_CreateSyntax("cscpolicy", CSCPolicyCmd, 0, "change client side caching policy for AFS shares");
      cmd_AddParm(ts, "-share", CMD_SINGLE, CMD_OPTIONAL, "AFS share");
      cmd_AddParm(ts, "-manual", CMD_FLAG, CMD_OPTIONAL, "manual caching of documents");
      cmd_AddParm(ts, "-programs", CMD_FLAG, CMD_OPTIONAL, "automatic caching of programs and documents");
      cmd_AddParm(ts, "-documents", CMD_FLAG, CMD_OPTIONAL, "automatic caching of documents");
      cmd_AddParm(ts, "-disable", CMD_FLAG, CMD_OPTIONAL, "disable caching");
  
!     ts = cmd_CreateSyntax("minidump", MiniDumpCmd, 0, "Generate MiniDump of current service state");
  
      code = cmd_Dispatch(argc, argv);
  
--- 4554,4610 ----
      cmd_AddParm(ts, "-submounts", CMD_SINGLE, CMD_OPTIONAL, "allow nfs mounts to subdirs of /afs/.. ('on' or 'off')");
  
  
!     ts = cmd_CreateSyntax("storebehind", StoreBehindCmd, NULL, 
  			  "store to server after file close");
      cmd_AddParm(ts, "-kbytes", CMD_SINGLE, CMD_OPTIONAL, "asynchrony for specified names");
      cmd_AddParm(ts, "-files", CMD_LIST, CMD_OPTIONAL, "specific pathnames");
      cmd_AddParm(ts, "-allfiles", CMD_SINGLE, CMD_OPTIONAL, "new default (KB)");
      cmd_CreateAlias(ts, "sb");
  
!     ts = cmd_CreateSyntax("setcrypt", SetCryptCmd, NULL, "set cache manager encryption flag");
      cmd_AddParm(ts, "-crypt", CMD_SINGLE, 0, "on or off");
  
!     ts = cmd_CreateSyntax("getcrypt", GetCryptCmd, NULL, "get cache manager encryption flag");
  
!     ts = cmd_CreateSyntax("rxstatproc", RxStatProcCmd, NULL,
  			  "Manage per process RX statistics");
      cmd_AddParm(ts, "-enable", CMD_FLAG, CMD_OPTIONAL, "Enable RX stats");
      cmd_AddParm(ts, "-disable", CMD_FLAG, CMD_OPTIONAL, "Disable RX stats");
      cmd_AddParm(ts, "-clear", CMD_FLAG, CMD_OPTIONAL, "Clear RX stats");
  
!     ts = cmd_CreateSyntax("rxstatpeer", RxStatPeerCmd, NULL,
  			  "Manage per peer RX statistics");
      cmd_AddParm(ts, "-enable", CMD_FLAG, CMD_OPTIONAL, "Enable RX stats");
      cmd_AddParm(ts, "-disable", CMD_FLAG, CMD_OPTIONAL, "Disable RX stats");
      cmd_AddParm(ts, "-clear", CMD_FLAG, CMD_OPTIONAL, "Clear RX stats");
  
  #ifndef WIN32
!     ts = cmd_CreateSyntax("setcbaddr", CallBackRxConnCmd, NULL, "configure callback connection address");
      cmd_AddParm(ts, "-addr", CMD_SINGLE, CMD_OPTIONAL, "host name or address");
  #endif
  
!     ts = cmd_CreateSyntax("trace", TraceCmd, NULL, "enable or disable CM tracing");
      cmd_AddParm(ts, "-on", CMD_FLAG, CMD_OPTIONAL, "enable tracing");
      cmd_AddParm(ts, "-off", CMD_FLAG, CMD_OPTIONAL, "disable tracing");
      cmd_AddParm(ts, "-reset", CMD_FLAG, CMD_OPTIONAL, "reset log contents");
      cmd_AddParm(ts, "-dump", CMD_FLAG, CMD_OPTIONAL, "dump log contents");
      cmd_CreateAlias(ts, "tr");
  
!     ts = cmd_CreateSyntax("uuid", UuidCmd, NULL, "manage the UUID for the cache manager");
      cmd_AddParm(ts, "-generate", CMD_FLAG, CMD_OPTIONAL, "generate a new UUID");
  
!     ts = cmd_CreateSyntax("memdump", MemDumpCmd, NULL, "dump memory allocs in debug builds");
      cmd_AddParm(ts, "-begin", CMD_FLAG, CMD_OPTIONAL, "set a memory checkpoint");
      cmd_AddParm(ts, "-end", CMD_FLAG, CMD_OPTIONAL, "dump memory allocs");
      
!     ts = cmd_CreateSyntax("cscpolicy", CSCPolicyCmd, NULL, "change client side caching policy for AFS shares");
      cmd_AddParm(ts, "-share", CMD_SINGLE, CMD_OPTIONAL, "AFS share");
      cmd_AddParm(ts, "-manual", CMD_FLAG, CMD_OPTIONAL, "manual caching of documents");
      cmd_AddParm(ts, "-programs", CMD_FLAG, CMD_OPTIONAL, "automatic caching of programs and documents");
      cmd_AddParm(ts, "-documents", CMD_FLAG, CMD_OPTIONAL, "automatic caching of documents");
      cmd_AddParm(ts, "-disable", CMD_FLAG, CMD_OPTIONAL, "disable caching");
  
!     ts = cmd_CreateSyntax("minidump", MiniDumpCmd, NULL, "Generate MiniDump of current service state");
  
      code = cmd_Dispatch(argc, argv);
  
Index: openafs/src/WINNT/afsd/smb.c
diff -c openafs/src/WINNT/afsd/smb.c:1.118.2.45 openafs/src/WINNT/afsd/smb.c:1.118.2.46
*** openafs/src/WINNT/afsd/smb.c:1.118.2.45	Sun Oct 21 23:33:20 2007
--- openafs/src/WINNT/afsd/smb.c	Sun Nov  4 19:24:46 2007
***************
*** 882,888 ****
  {
      time_t diff_t = unixTime - smb_localZero;
  #if defined(DEBUG) && !defined(_USE_32BIT_TIME_T)
!     osi_assert(diff_t < _UI32_MAX);
  #endif
      *dosUTimep = (afs_uint32)diff_t;
  }
--- 882,888 ----
  {
      time_t diff_t = unixTime - smb_localZero;
  #if defined(DEBUG) && !defined(_USE_32BIT_TIME_T)
!     osi_assertx(diff_t < _UI32_MAX, "time_t > _UI32_MAX");
  #endif
      *dosUTimep = (afs_uint32)diff_t;
  }
***************
*** 951,957 ****
              if (nts != STATUS_SUCCESS)
                  osi_Log4(smb_logp,"MsV1_0Lm20ChallengeRequest failure: nts 0x%x ntsEx 0x%x respSize is %u needs %u",
                           nts, ntsEx, sizeof(lsaReq), lsaRespSize);
!             osi_assert(nts == STATUS_SUCCESS); /* this had better work! */
  
              memcpy(vcp->encKey, lsaResp->ChallengeToClient, MSV1_0_CHALLENGE_LENGTH);
              LsaFreeReturnBuffer(lsaResp);
--- 951,957 ----
              if (nts != STATUS_SUCCESS)
                  osi_Log4(smb_logp,"MsV1_0Lm20ChallengeRequest failure: nts 0x%x ntsEx 0x%x respSize is %u needs %u",
                           nts, ntsEx, sizeof(lsaReq), lsaRespSize);
!             osi_assertx(nts == STATUS_SUCCESS, "LsaCallAuthenticationPackage failed"); /* this had better work! */
  
              memcpy(vcp->encKey, lsaResp->ChallengeToClient, MSV1_0_CHALLENGE_LENGTH);
              LsaFreeReturnBuffer(lsaResp);
***************
*** 1197,1210 ****
  
      userp = NULL;
      lock_ObtainWrite(&smb_rctLock);
!     osi_assert(tidp->refCount-- > 0);
      if (tidp->refCount == 0 && (tidp->delete)) {
          ltpp = &tidp->vcp->tidsp;
          for(tp = *ltpp; tp; ltpp = &tp->nextp, tp = *ltpp) {
              if (tp == tidp) 
                  break;
          }
!         osi_assert(tp != NULL);
          *ltpp = tp->nextp;
          lock_FinalizeMutex(&tidp->mx);
          userp = tidp->userp;	/* remember to drop ref later */
--- 1197,1210 ----
  
      userp = NULL;
      lock_ObtainWrite(&smb_rctLock);
!     osi_assertx(tidp->refCount-- > 0, "smb_tid_t refCount 0");
      if (tidp->refCount == 0 && (tidp->delete)) {
          ltpp = &tidp->vcp->tidsp;
          for(tp = *ltpp; tp; ltpp = &tp->nextp, tp = *ltpp) {
              if (tp == tidp) 
                  break;
          }
!         osi_assertx(tp != NULL, "null smb_tid_t");
          *ltpp = tp->nextp;
          lock_FinalizeMutex(&tidp->mx);
          userp = tidp->userp;	/* remember to drop ref later */
***************
*** 1306,1312 ****
      time_t 	now = osi_Time();
  
      lock_ObtainWrite(&smb_rctLock);
!     osi_assert(unp->refCount-- > 0);
      if (unp->refCount == 0 && !(unp->flags & SMB_USERNAMEFLAG_AFSLOGON) &&
  	(unp->flags & SMB_USERNAMEFLAG_LOGOFF)) {
          lupp = &usernamesp;
--- 1306,1312 ----
      time_t 	now = osi_Time();
  
      lock_ObtainWrite(&smb_rctLock);
!     osi_assertx(unp->refCount-- > 0, "smb_username_t refCount 0");
      if (unp->refCount == 0 && !(unp->flags & SMB_USERNAMEFLAG_AFSLOGON) &&
  	(unp->flags & SMB_USERNAMEFLAG_LOGOFF)) {
          lupp = &usernamesp;
***************
*** 1314,1320 ****
              if (up == unp) 
                  break;
          }
!         osi_assert(up != NULL);
          *lupp = up->nextp;
  	up->nextp = NULL;			/* do not remove this */
          lock_FinalizeMutex(&unp->mx);
--- 1314,1320 ----
              if (up == unp) 
                  break;
          }
!         osi_assertx(up != NULL, "null smb_username_t");
          *lupp = up->nextp;
  	up->nextp = NULL;			/* do not remove this */
          lock_FinalizeMutex(&unp->mx);
***************
*** 1342,1355 ****
      smb_username_t *unp = NULL;
  
      lock_ObtainWrite(&smb_rctLock);
!     osi_assert(uidp->refCount-- > 0);
      if (uidp->refCount == 0) {
          lupp = &uidp->vcp->usersp;
          for(up = *lupp; up; lupp = &up->nextp, up = *lupp) {
              if (up == uidp) 
                  break;
          }
!         osi_assert(up != NULL);
          *lupp = up->nextp;
          lock_FinalizeMutex(&uidp->mx);
  	unp = uidp->unp;
--- 1342,1355 ----
      smb_username_t *unp = NULL;
  
      lock_ObtainWrite(&smb_rctLock);
!     osi_assertx(uidp->refCount-- > 0, "smb_user_t refCount 0");
      if (uidp->refCount == 0) {
          lupp = &uidp->vcp->usersp;
          for(up = *lupp; up; lupp = &up->nextp, up = *lupp) {
              if (up == uidp) 
                  break;
          }
!         osi_assertx(up != NULL, "null smb_user_t");
          *lupp = up->nextp;
          lock_FinalizeMutex(&uidp->mx);
  	unp = uidp->unp;
***************
*** 1566,1572 ****
  
      lock_ObtainMutex(&fidp->mx);
      lock_ObtainWrite(&smb_rctLock);
!     osi_assert(fidp->refCount-- > 0);
      if (fidp->refCount == 0 && (fidp->delete)) {
          vcp = fidp->vcp;
          fidp->vcp = NULL;
--- 1566,1572 ----
  
      lock_ObtainMutex(&fidp->mx);
      lock_ObtainWrite(&smb_rctLock);
!     osi_assertx(fidp->refCount-- > 0, "smb_fid_t refCount 0");
      if (fidp->refCount == 0 && (fidp->delete)) {
          vcp = fidp->vcp;
          fidp->vcp = NULL;
***************
*** 2063,2069 ****
      cm_scache_t *scp = NULL;
  
      lock_ObtainMutex(&dsp->mx);
!     osi_assert(dsp->refCount-- > 0);
      if (dsp->refCount == 0 && (dsp->flags & SMB_DIRSEARCH_DELETE)) {
          if (&dsp->q == (osi_queue_t *) smb_lastDirSearchp)
              smb_lastDirSearchp = (smb_dirSearch_t *) osi_QPrev(&smb_lastDirSearchp->q);
--- 2063,2069 ----
      cm_scache_t *scp = NULL;
  
      lock_ObtainMutex(&dsp->mx);
!     osi_assertx(dsp->refCount-- > 0, "cm_scache_t refCount 0");
      if (dsp->refCount == 0 && (dsp->flags & SMB_DIRSEARCH_DELETE)) {
          if (&dsp->q == (osi_queue_t *) smb_lastDirSearchp)
              smb_lastDirSearchp = (smb_dirSearch_t *) osi_QPrev(&smb_lastDirSearchp->q);
***************
*** 2265,2271 ****
          tbp->dos_pkt_sel = tb_sel;
  #endif /* DJGPP */
      }
!     osi_assert(tbp->magic == SMB_PACKETMAGIC);
  
      return tbp;
  }
--- 2265,2271 ----
          tbp->dos_pkt_sel = tb_sel;
  #endif /* DJGPP */
      }
!     osi_assertx(tbp->magic == SMB_PACKETMAGIC, "invalid smb_packet_t magic");
  
      return tbp;
  }
***************
*** 2319,2325 ****
          tbp->magic = SMB_NCBMAGIC;
      }
          
!     osi_assert(tbp->magic == SMB_NCBMAGIC);
  
      memset(&tbp->ncb, 0, sizeof(NCB));
      ncbp = &tbp->ncb;
--- 2319,2325 ----
          tbp->magic = SMB_NCBMAGIC;
      }
          
!     osi_assertx(tbp->magic == SMB_NCBMAGIC, "invalid smb_packet_t magic");
  
      memset(&tbp->ncb, 0, sizeof(NCB));
      ncbp = &tbp->ncb;
***************
*** 2332,2338 ****
  void smb_FreePacket(smb_packet_t *tbp)
  {
      smb_vc_t * vcp = NULL;
!     osi_assert(tbp->magic == SMB_PACKETMAGIC);
          
      lock_ObtainWrite(&smb_globalLock);
      tbp->nextp = smb_packetFreeListp;
--- 2332,2338 ----
  void smb_FreePacket(smb_packet_t *tbp)
  {
      smb_vc_t * vcp = NULL;
!     osi_assertx(tbp->magic == SMB_PACKETMAGIC, "invalid smb_packet_t magic");
          
      lock_ObtainWrite(&smb_globalLock);
      tbp->nextp = smb_packetFreeListp;
***************
*** 2360,2366 ****
      smb_ncb_t *tbp;
          
      tbp = (smb_ncb_t *) bufferp;
!     osi_assert(tbp->magic == SMB_NCBMAGIC);
          
      lock_ObtainWrite(&smb_globalLock);
      tbp->nextp = smb_ncbFreeListp;
--- 2360,2366 ----
      smb_ncb_t *tbp;
          
      tbp = (smb_ncb_t *) bufferp;
!     osi_assertx(tbp->magic == SMB_NCBMAGIC, "invalid smb_packet_t magic");
          
      lock_ObtainWrite(&smb_globalLock);
      tbp->nextp = smb_ncbFreeListp;
***************
*** 3677,3683 ****
                  if (wl->state == SMB_WAITINGLOCKSTATE_DONE)
                      continue;
  
!                 osi_assert(wl->state != SMB_WAITINGLOCKSTATE_ERROR);
                  
                  /* wl->state is either _DONE or _WAITING.  _ERROR
                     would no longer be on the queue. */
--- 3677,3683 ----
                  if (wl->state == SMB_WAITINGLOCKSTATE_DONE)
                      continue;
  
!                 osi_assertx(wl->state != SMB_WAITINGLOCKSTATE_ERROR, "!SMB_WAITINGLOCKSTATE_ERROR");
                  
                  /* wl->state is either _DONE or _WAITING.  _ERROR
                     would no longer be on the queue. */
***************
*** 3984,3994 ****
      /* pull pathname and stat block out of request */
      tp = smb_GetSMBData(inp, NULL);
      pathp = smb_ParseASCIIBlock(tp, (char **) &tp);
!     osi_assert(pathp != NULL);
      if (smb_StoreAnsiFilenames)
          OemToChar(pathp,pathp);
      statBlockp = smb_ParseVblBlock(tp, (char **) &tp, &statLen);
!     osi_assert(statBlockp != NULL);
      if (statLen == 0) {
          statBlockp = initStatBlock;
          statBlockp[0] = 8;
--- 3984,3994 ----
      /* pull pathname and stat block out of request */
      tp = smb_GetSMBData(inp, NULL);
      pathp = smb_ParseASCIIBlock(tp, (char **) &tp);
!     osi_assertx(pathp != NULL, "null path");
      if (smb_StoreAnsiFilenames)
          OemToChar(pathp,pathp);
      statBlockp = smb_ParseVblBlock(tp, (char **) &tp, &statLen);
!     osi_assertx(statBlockp != NULL, "null statBlock");
      if (statLen == 0) {
          statBlockp = initStatBlock;
          statBlockp[0] = 8;
***************
*** 4648,4654 ****
       * Deduct for them and fill in the length field.
       */
      temp -= 3;		/* deduct vbl block info */
!     osi_assert(temp == (43 * returnedNames));
      origOp[1] = (char)(temp & 0xff);
      origOp[2] = (char)((temp>>8) & 0xff);
      if (returnedNames == 0) 
--- 4648,4654 ----
       * Deduct for them and fill in the length field.
       */
      temp -= 3;		/* deduct vbl block info */
!     osi_assertx(temp == (43 * returnedNames), "unexpected data length");
      origOp[1] = (char)(temp & 0xff);
      origOp[2] = (char)((temp>>8) & 0xff);
      if (returnedNames == 0) 
***************
*** 5144,5150 ****
      }
  
      fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
!     osi_assert(fidp);
  
      /* save a pointer to the vnode */
      fidp->scp = scp;
--- 5144,5150 ----
      }
  
      fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
!     osi_assertx(fidp, "null smb_fid_t");
  
      /* save a pointer to the vnode */
      fidp->scp = scp;
***************
*** 6202,6209 ****
          fidp->NTopen_pathp = NULL;
  	fidp->flags &= ~SMB_FID_NTOPEN;
      } else {
! 	osi_assert(fidp->NTopen_dscp == NULL);
! 	osi_assert(fidp->NTopen_pathp == NULL);
      }
  
      if (fidp->NTopen_wholepathp) {
--- 6202,6209 ----
          fidp->NTopen_pathp = NULL;
  	fidp->flags &= ~SMB_FID_NTOPEN;
      } else {
! 	osi_assertx(fidp->NTopen_dscp == NULL, "null NTopen_dsc");
! 	osi_assertx(fidp->NTopen_pathp == NULL, "null NTopen_path");
      }
  
      if (fidp->NTopen_wholepathp) {
***************
*** 7495,7501 ****
  
      /* now all we have to do is open the file itself */
      fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
!     osi_assert(fidp);
  	
      cm_HoldUser(userp);
  
--- 7495,7501 ----
  
      /* now all we have to do is open the file itself */
      fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
!     osi_assertx(fidp, "null smb_fid_t");
  	
      cm_HoldUser(userp);
  
***************
*** 7907,7913 ****
          {
              /* this is fatal - log as much as possible */
              osi_Log1(smb_logp, "Fatal: NCBevents idx [ %d ] out of range.\n", idx);
!             osi_assert(0);
          }
          
          thrd_ResetEvent(NCBevents[idx]);
--- 7907,7913 ----
          {
              /* this is fatal - log as much as possible */
              osi_Log1(smb_logp, "Fatal: NCBevents idx [ %d ] out of range.\n", idx);
!             osi_assertx(0, "invalid index");
          }
          
          thrd_ResetEvent(NCBevents[idx]);
***************
*** 7965,7971 ****
          {
              /* this is fatal - log as much as possible */
              osi_Log1(smb_logp, "Fatal: session idx [ %d ] out of range.\n", idx_session);
!             osi_assert(0);
          }
  
  		/* Get an NCB */
--- 7965,7971 ----
          {
              /* this is fatal - log as much as possible */
              osi_Log1(smb_logp, "Fatal: session idx [ %d ] out of range.\n", idx_session);
!             osi_assertx(0, "invalid index");
          }
  
  		/* Get an NCB */
***************
*** 8009,8015 ****
          {
              /* this is fatal - log as much as possible */
              osi_Log1(smb_logp, "Fatal: idx_NCB [ %d ] out of range.\n", idx_NCB);
!             osi_assert(0);
          }
  
          /* Link them together */
--- 8009,8015 ----
          {
              /* this is fatal - log as much as possible */
              osi_Log1(smb_logp, "Fatal: idx_NCB [ %d ] out of range.\n", idx_NCB);
!             osi_assertx(0, "invalid index");
          }
  
          /* Link them together */
***************
*** 8118,8124 ****
          {
              /* this is fatal - log as much as possible */
              osi_Log1(smb_logp, "Fatal: idx_NCB %d out of range.\n", idx_NCB);
!             osi_assert(0);
          }
  
          ncbp = NCBs[idx_NCB];
--- 8118,8124 ----
          {
              /* this is fatal - log as much as possible */
              osi_Log1(smb_logp, "Fatal: idx_NCB %d out of range.\n", idx_NCB);
!             osi_assertx(0, "invalid index");
          }
  
          ncbp = NCBs[idx_NCB];
***************
*** 8374,8380 ****
      int i;
      char eventName[MAX_PATH];
  
!     osi_assert( idx < (sizeof(NCBs) / sizeof(NCBs[0])) );
  
      NCBs[idx] = GetNCB();
      sprintf(eventName,"NCBavails[%d]", idx);
--- 8374,8380 ----
      int i;
      char eventName[MAX_PATH];
  
!     osi_assertx( idx < (sizeof(NCBs) / sizeof(NCBs[0])), "invalid index" );
  
      NCBs[idx] = GetNCB();
      sprintf(eventName,"NCBavails[%d]", idx);
***************
*** 8671,8678 ****
               * we should probably want to wait for a session to be freed in case
               * we run out.
               */
!             osi_assert(session < SESSION_MAX - 1);
!             osi_assert(numNCBs < NCB_MAX - 1);   /* if we pass this test we can allocate one more */
  
  	    lock_ObtainMutex(&vcp->mx);
  	    vcp->session   = session;
--- 8671,8678 ----
               * we should probably want to wait for a session to be freed in case
               * we run out.
               */
!             osi_assertx(session < SESSION_MAX - 1, "invalid session");
!             osi_assertx(numNCBs < NCB_MAX - 1, "invalid numNCBs");   /* if we pass this test we can allocate one more */
  
  	    lock_ObtainMutex(&vcp->mx);
  	    vcp->session   = session;
***************
*** 8902,8908 ****
          }
      }
  
!     osi_assert(lana_list.length >= 0);
      if (!lana_found) {
          afsi_log("No valid LANA numbers found!");
  	lana_list.length = 0;
--- 8902,8908 ----
          }
      }
  
!     osi_assertx(lana_list.length >= 0, "empty lana list");
      if (!lana_found) {
          afsi_log("No valid LANA numbers found!");
  	lana_list.length = 0;
***************
*** 8942,8948 ****
              continue;
          phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_Listener,
                                 (void*)lana_list.lana[i], 0, &lpid, "smb_Listener");
!         osi_assert(phandle != NULL);
          thrd_CloseHandle(phandle);
      }
  }
--- 8942,8948 ----
              continue;
          phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_Listener,
                                 (void*)lana_list.lana[i], 0, &lpid, "smb_Listener");
!         osi_assertx(phandle != NULL, "smb_Listener thread creation failure");
          thrd_CloseHandle(phandle);
      }
  }
***************
*** 9397,9426 ****
  #ifndef DJGPP
      phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_ClientWaiter,
                            NULL, 0, &lpid, "smb_ClientWaiter");
!     osi_assert(phandle != NULL);
      thrd_CloseHandle(phandle);
  #endif /* !DJGPP */
  
      phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_ServerWaiter,
                            NULL, 0, &lpid, "smb_ServerWaiter");
!     osi_assert(phandle != NULL);
      thrd_CloseHandle(phandle);
  
      for (i=0; i<smb_NumServerThreads; i++) {
          phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_Server,
                                (void *) i, 0, &lpid, "smb_Server");
!         osi_assert(phandle != NULL);
          thrd_CloseHandle(phandle);
      }
  
      phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_Daemon,
                            NULL, 0, &lpid, "smb_Daemon");
!     osi_assert(phandle != NULL);
      thrd_CloseHandle(phandle);
  
      phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_WaitingLocksDaemon,
                            NULL, 0, &lpid, "smb_WaitingLocksDaemon");
!     osi_assert(phandle != NULL);
      thrd_CloseHandle(phandle);
  
  #ifdef DJGPP
--- 9397,9426 ----
  #ifndef DJGPP
      phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_ClientWaiter,
                            NULL, 0, &lpid, "smb_ClientWaiter");
!     osi_assertx(phandle != NULL, "smb_ClientWaiter thread creation failure");
      thrd_CloseHandle(phandle);
  #endif /* !DJGPP */
  
      phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_ServerWaiter,
                            NULL, 0, &lpid, "smb_ServerWaiter");
!     osi_assertx(phandle != NULL, "smb_ServerWaiter thread creation failure");
      thrd_CloseHandle(phandle);
  
      for (i=0; i<smb_NumServerThreads; i++) {
          phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_Server,
                                (void *) i, 0, &lpid, "smb_Server");
!         osi_assertx(phandle != NULL, "smb_Server thread creation failure");
          thrd_CloseHandle(phandle);
      }
  
      phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_Daemon,
                            NULL, 0, &lpid, "smb_Daemon");
!     osi_assertx(phandle != NULL, "smb_Daemon thread creation failure");
      thrd_CloseHandle(phandle);
  
      phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_WaitingLocksDaemon,
                            NULL, 0, &lpid, "smb_WaitingLocksDaemon");
!     osi_assertx(phandle != NULL, "smb_WaitingLocksDaemon thread creation failure");
      thrd_CloseHandle(phandle);
  
  #ifdef DJGPP
Index: openafs/src/WINNT/afsd/smb3.c
diff -c openafs/src/WINNT/afsd/smb3.c:1.95.2.47 openafs/src/WINNT/afsd/smb3.c:1.95.2.48
*** openafs/src/WINNT/afsd/smb3.c:1.95.2.47	Thu Oct 18 01:29:09 2007
--- openafs/src/WINNT/afsd/smb3.c	Sun Nov  4 19:24:46 2007
***************
*** 2303,2315 ****
          /* don't create if not found */
          if (dscp) 
              cm_ReleaseSCache(dscp);
!         osi_assert(scp == NULL);
          cm_ReleaseUser(userp);
          smb_FreeTran2Packet(outp);
          return CM_ERROR_NOSUCHFILE;
      }
      else {
!         osi_assert(dscp != NULL && scp == NULL);
          openAction = 2;	/* created file */
          setAttr.mask = CM_ATTRMASK_CLIENTMODTIME;
          smb_UnixTimeFromSearchTime(&setAttr.clientModTime, dosTime);
--- 2303,2315 ----
          /* don't create if not found */
          if (dscp) 
              cm_ReleaseSCache(dscp);
!         osi_assertx(scp == NULL, "null cm_scache_t");
          cm_ReleaseUser(userp);
          smb_FreeTran2Packet(outp);
          return CM_ERROR_NOSUCHFILE;
      }
      else {
!         osi_assertx(dscp != NULL && scp == NULL, "null dsc || non-null sc");
          openAction = 2;	/* created file */
          setAttr.mask = CM_ATTRMASK_CLIENTMODTIME;
          smb_UnixTimeFromSearchTime(&setAttr.clientModTime, dosTime);
***************
*** 2382,2388 ****
  
      /* now all we have to do is open the file itself */
      fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
!     osi_assert(fidp);
  	
      cm_HoldUser(userp);
      lock_ObtainMutex(&fidp->mx);
--- 2382,2388 ----
  
      /* now all we have to do is open the file itself */
      fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
!     osi_assertx(fidp, "null smb_fid_t");
  	
      cm_HoldUser(userp);
      lock_ObtainMutex(&fidp->mx);
***************
*** 4149,4155 ****
      cm_InitReq(&req);
  
      eos = 0;
!     osi_assert(p->opcode == 1);
  
      /* find first; obtain basic parameters from request */
  
--- 4149,4155 ----
      cm_InitReq(&req);
  
      eos = 0;
!     osi_assertx(p->opcode == 1, "invalid opcode");
  
      /* find first; obtain basic parameters from request */
  
***************
*** 4612,4618 ****
          strcpy(dsp->mask, maskp);	/* and save mask */
      }
      else {
!         osi_assert(p->opcode == 2);
          /* find next; obtain basic parameters from request or open dir file */
          dsp = smb_FindDirSearch(p->parmsp[0]);
          maxCount = p->parmsp[1];
--- 4612,4618 ----
          strcpy(dsp->mask, maskp);	/* and save mask */
      }
      else {
!         osi_assertx(p->opcode == 2, "invalid opcode");
          /* find next; obtain basic parameters from request or open dir file */
          dsp = smb_FindDirSearch(p->parmsp[0]);
          maxCount = p->parmsp[1];
***************
*** 5477,5483 ****
          return CM_ERROR_NOSUCHFILE;
      }
      else {
!         osi_assert(dscp != NULL);
          osi_Log1(smb_logp, "smb_ReceiveV3OpenX creating file %s",
                   osi_LogSaveString(smb_logp, lastNamep));
          openAction = 2;	/* created file */
--- 5477,5483 ----
          return CM_ERROR_NOSUCHFILE;
      }
      else {
!         osi_assertx(dscp != NULL, "null cm_scache_t");
          osi_Log1(smb_logp, "smb_ReceiveV3OpenX creating file %s",
                   osi_LogSaveString(smb_logp, lastNamep));
          openAction = 2;	/* created file */
***************
*** 5532,5538 ****
  
      /* now all we have to do is open the file itself */
      fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
!     osi_assert(fidp);
  	
      cm_HoldUser(userp);
      lock_ObtainMutex(&fidp->mx);
--- 5532,5538 ----
  
      /* now all we have to do is open the file itself */
      fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
!     osi_assertx(fidp, "null smb_fid_t");
  	
      cm_HoldUser(userp);
      lock_ObtainMutex(&fidp->mx);
***************
*** 5755,5761 ****
  
                  wlRequest = malloc(sizeof(smb_waitingLockRequest_t));
  
!                 osi_assert(wlRequest != NULL);
  
                  wlRequest->vcp = vcp;
                  smb_HoldVC(vcp);
--- 5755,5761 ----
  
                  wlRequest = malloc(sizeof(smb_waitingLockRequest_t));
  
!                 osi_assertx(wlRequest != NULL, "null wlRequest");
  
                  wlRequest->vcp = vcp;
                  smb_HoldVC(vcp);
***************
*** 5786,5792 ****
  
                      wLock = malloc(sizeof(smb_waitingLock_t));
  
!                     osi_assert(wLock != NULL);
  
                      wLock->key = tkey;
                      wLock->LOffset = tOffset;
--- 5786,5792 ----
  
                      wLock = malloc(sizeof(smb_waitingLock_t));
  
!                     osi_assertx(wLock != NULL, "null smb_waitingLock_t");
  
                      wLock->key = tkey;
                      wLock->LOffset = tOffset;
***************
*** 5800,5806 ****
  
              wLock = malloc(sizeof(smb_waitingLock_t));
  
!             osi_assert(wLock != NULL);
  
              wLock->key = key;
              wLock->LOffset = LOffset;
--- 5800,5806 ----
  
              wLock = malloc(sizeof(smb_waitingLock_t));
  
!             osi_assertx(wLock != NULL, "null smb_waitingLock_t");
  
              wLock->key = key;
              wLock->LOffset = LOffset;
***************
*** 6792,6798 ****
              code = 0;
              while (code == 0 && scp->fileType == CM_SCACHETYPE_SYMLINK) {
                  targetScp = 0;
!                 osi_assert(dscp != NULL);
                  code = cm_EvaluateSymLink(dscp, scp, &targetScp, userp, &req);
                  if (code == 0) {
                      /* we have a more accurate file to use (the
--- 6792,6798 ----
              code = 0;
              while (code == 0 && scp->fileType == CM_SCACHETYPE_SYMLINK) {
                  targetScp = 0;
!                 osi_assertx(dscp != NULL, "null cm_scache_t");
                  code = cm_EvaluateSymLink(dscp, scp, &targetScp, userp, &req);
                  if (code == 0) {
                      /* we have a more accurate file to use (the
***************
*** 6832,6838 ****
          free(realPathp);
          return CM_ERROR_NOSUCHFILE;
      } else if (realDirFlag == 0 || realDirFlag == -1) {
!         osi_assert(dscp != NULL);
          osi_Log1(smb_logp, "smb_ReceiveNTCreateX creating file %s",
                    osi_LogSaveString(smb_logp, lastNamep));
          openAction = 2;		/* created file */
--- 6832,6838 ----
          free(realPathp);
          return CM_ERROR_NOSUCHFILE;
      } else if (realDirFlag == 0 || realDirFlag == -1) {
!         osi_assertx(dscp != NULL, "null cm_scache_t");
          osi_Log1(smb_logp, "smb_ReceiveNTCreateX creating file %s",
                    osi_LogSaveString(smb_logp, lastNamep));
          openAction = 2;		/* created file */
***************
*** 6890,6896 ****
          /* create directory */
          if ( !treeCreate ) 
              treeStartp = lastNamep;
!         osi_assert(dscp != NULL);
          osi_Log1(smb_logp, "smb_ReceiveNTCreateX creating directory [%s]",
                    osi_LogSaveString(smb_logp, treeStartp));
          openAction = 2;		/* created directory */
--- 6890,6896 ----
          /* create directory */
          if ( !treeCreate ) 
              treeStartp = lastNamep;
!         osi_assertx(dscp != NULL, "null cm_scache_t");
          osi_Log1(smb_logp, "smb_ReceiveNTCreateX creating directory [%s]",
                    osi_LogSaveString(smb_logp, treeStartp));
          openAction = 2;		/* created directory */
***************
*** 7026,7032 ****
  
      /* open the file itself */
      fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
!     osi_assert(fidp);
  
      /* save a reference to the user */
      cm_HoldUser(userp);
--- 7026,7032 ----
  
      /* open the file itself */
      fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
!     osi_assertx(fidp, "null smb_fid_t");
  
      /* save a reference to the user */
      cm_HoldUser(userp);
***************
*** 7564,7570 ****
          return CM_ERROR_NOSUCHFILE;
      }
      else if (realDirFlag == 0 || realDirFlag == -1) {
!         osi_assert(dscp != NULL);
          osi_Log1(smb_logp, "smb_ReceiveNTTranCreate creating file %s",
                    osi_LogSaveString(smb_logp, lastNamep));
          openAction = 2;		/* created file */
--- 7564,7570 ----
          return CM_ERROR_NOSUCHFILE;
      }
      else if (realDirFlag == 0 || realDirFlag == -1) {
!         osi_assertx(dscp != NULL, "null cm_scache_t");
          osi_Log1(smb_logp, "smb_ReceiveNTTranCreate creating file %s",
                    osi_LogSaveString(smb_logp, lastNamep));
          openAction = 2;		/* created file */
***************
*** 7615,7621 ****
          }
      } else {
          /* create directory */
!         osi_assert(dscp != NULL);
          osi_Log1(smb_logp,
                    "smb_ReceiveNTTranCreate creating directory %s",
                    osi_LogSaveString(smb_logp, lastNamep));
--- 7615,7621 ----
          }
      } else {
          /* create directory */
!         osi_assertx(dscp != NULL, "null cm_scache_t");
          osi_Log1(smb_logp,
                    "smb_ReceiveNTTranCreate creating directory %s",
                    osi_LogSaveString(smb_logp, lastNamep));
***************
*** 7693,7699 ****
  
      /* open the file itself */
      fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
!     osi_assert(fidp);
  
      /* save a reference to the user */
      cm_HoldUser(userp);
--- 7693,7699 ----
  
      /* open the file itself */
      fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
!     osi_assertx(fidp, "null smb_fid_t");
  
      /* save a reference to the user */
      cm_HoldUser(userp);
Index: openafs/src/WINNT/afsd/smb_ioctl.c
diff -c openafs/src/WINNT/afsd/smb_ioctl.c:1.25.2.5 openafs/src/WINNT/afsd/smb_ioctl.c:1.25.2.6
*** openafs/src/WINNT/afsd/smb_ioctl.c:1.25.2.5	Sun Jun 10 13:00:07 2007
--- openafs/src/WINNT/afsd/smb_ioctl.c	Sun Nov  4 19:24:47 2007
***************
*** 339,345 ****
  	
      uidp = smb_FindUID(vcp, ((smb_t *)inp)->uid, 0);
      userp = smb_GetUserFromUID(uidp);
!     osi_assert(userp != 0);
      iop->uidp = uidp;
      if (uidp && uidp->unp) {
          osi_Log3(afsd_logp, "Ioctl uid %d user %x name %s",
--- 339,345 ----
  	
      uidp = smb_FindUID(vcp, ((smb_t *)inp)->uid, 0);
      userp = smb_GetUserFromUID(uidp);
!     osi_assertx(userp != NULL, "null cm_user_t");
      iop->uidp = uidp;
      if (uidp && uidp->unp) {
          osi_Log3(afsd_logp, "Ioctl uid %d user %x name %s",
Index: openafs/src/WINNT/afsd/symlink.c
diff -c openafs/src/WINNT/afsd/symlink.c:1.8.4.3 openafs/src/WINNT/afsd/symlink.c:1.8.4.4
*** openafs/src/WINNT/afsd/symlink.c:1.8.4.3	Thu Oct 18 01:28:39 2007
--- openafs/src/WINNT/afsd/symlink.c	Wed Oct 31 00:09:17 2007
***************
*** 269,276 ****
  }
  
  
! static ListLinkCmd(as)
! register struct cmd_syndesc *as; {
      register afs_int32 code;
      struct ViceIoctl blob;
      int error;
--- 269,276 ----
  }
  
  
! static ListLinkCmd(register struct cmd_syndesc *as, void *arock)
! {
      register afs_int32 code;
      struct ViceIoctl blob;
      int error;
***************
*** 420,427 ****
      return error;
  }
  
! static MakeLinkCmd(as)
! register struct cmd_syndesc *as; {
      register afs_int32 code;
      struct ViceIoctl blob;
      char * parent;
--- 420,427 ----
      return error;
  }
  
! static MakeLinkCmd(register struct cmd_syndesc *as, void *arock)
! {
      register afs_int32 code;
      struct ViceIoctl blob;
      char * parent;
***************
*** 484,491 ****
   *	    symlink (or ``.'' if none is provided)
   *      tp: Set to point to the actual name of the symlink to nuke.
   */
! static RemoveLinkCmd(as)
! register struct cmd_syndesc *as; {
      register afs_int32 code=0;
      struct ViceIoctl blob;
      register struct cmd_item *ti;
--- 484,491 ----
   *	    symlink (or ``.'' if none is provided)
   *      tp: Set to point to the actual name of the symlink to nuke.
   */
! static RemoveLinkCmd(register struct cmd_syndesc *as, void *arock)
! {
      register afs_int32 code=0;
      struct ViceIoctl blob;
      register struct cmd_item *ti;
***************
*** 589,602 ****
  
      osi_Init();
  
!     ts = cmd_CreateSyntax("list", ListLinkCmd, 0, "list symlink");    
      cmd_AddParm(ts, "-name", CMD_LIST, 0, "name");
      
!     ts = cmd_CreateSyntax("make", MakeLinkCmd, 0, "make symlink");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name");
      cmd_AddParm(ts, "-to", CMD_SINGLE, 0, "target");
  
!     ts = cmd_CreateSyntax("remove", RemoveLinkCmd, 0, "remove symlink");
      cmd_AddParm(ts, "-name", CMD_LIST, 0, "name");
      cmd_CreateAlias(ts, "rm");
  
--- 589,602 ----
  
      osi_Init();
  
!     ts = cmd_CreateSyntax("list", ListLinkCmd, NULL, "list symlink");    
      cmd_AddParm(ts, "-name", CMD_LIST, 0, "name");
      
!     ts = cmd_CreateSyntax("make", MakeLinkCmd, NULL, "make symlink");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name");
      cmd_AddParm(ts, "-to", CMD_SINGLE, 0, "target");
  
!     ts = cmd_CreateSyntax("remove", RemoveLinkCmd, NULL, "remove symlink");
      cmd_AddParm(ts, "-name", CMD_LIST, 0, "name");
      cmd_CreateAlias(ts, "rm");
  
Index: openafs/src/WINNT/afsd/sample/token.c
diff -c openafs/src/WINNT/afsd/sample/token.c:1.3.14.1 openafs/src/WINNT/afsd/sample/token.c:1.3.14.2
*** openafs/src/WINNT/afsd/sample/token.c:1.3.14.1	Tue Apr 10 14:39:48 2007
--- openafs/src/WINNT/afsd/sample/token.c	Wed Oct 31 00:09:18 2007
***************
*** 18,24 ****
  #define KABADARGUMENT 1
  #define KLOGEXIT(code) exit(code)
  
! int CommandProc();
  
  static int zero_argc;
  static char **zero_argv;
--- 18,24 ----
  #define KABADARGUMENT 1
  #define KLOGEXIT(code) exit(code)
  
! int CommandProc(struct cmd_syndesc *, void *);
  
  static int zero_argc;
  static char **zero_argv;
***************
*** 36,42 ****
      /* Start up sockets */
      WSAStartup(0x0101, &WSAjunk);
  
!     ts = cmd_CreateSyntax((char *) 0, CommandProc, 0, "obtain Kerberos authentication");
  
  #define aXFLAG 0
  #define aPRINCIPAL 1
--- 36,42 ----
      /* Start up sockets */
      WSAStartup(0x0101, &WSAjunk);
  
!     ts = cmd_CreateSyntax(NULL, CommandProc, NULL, "obtain Kerberos authentication");
  
  #define aXFLAG 0
  #define aPRINCIPAL 1
***************
*** 131,139 ****
      return !ok;
  }
  
! CommandProc (as, arock)
!   char *arock;
!   struct cmd_syndesc *as;
  {
      char  name[MAXKTCNAMELEN];
      char  defaultCell[256];
--- 131,138 ----
      return !ok;
  }
  
! int
! CommandProc (struct cmd_syndesc *as, void *arock)
  {
      char  name[MAXKTCNAMELEN];
      char  defaultCell[256];
Index: openafs/src/WINNT/afsreg/test/regman.c
diff -c openafs/src/WINNT/afsreg/test/regman.c:1.3.20.1 openafs/src/WINNT/afsreg/test/regman.c:1.3.20.2
*** openafs/src/WINNT/afsreg/test/regman.c:1.3.20.1	Tue Apr 10 14:39:49 2007
--- openafs/src/WINNT/afsreg/test/regman.c	Wed Oct 31 00:09:20 2007
***************
*** 35,41 ****
  static char* whoami;
  
  
! static int DoVptList(struct cmd_syndesc *as, char *arock)
  {
      struct vpt_iter vpiter;
      struct vptab vpentry;
--- 35,41 ----
  static char* whoami;
  
  
! static int DoVptList(struct cmd_syndesc *as, void *arock)
  {
      struct vpt_iter vpiter;
      struct vptab vpentry;
***************
*** 51,57 ****
      return 0;
  }
  
! static int DoVptAdd(struct cmd_syndesc *as, char *arock)
  {
      char *vpName, *vpDev;
      struct vptab vpentry;
--- 51,57 ----
      return 0;
  }
  
! static int DoVptAdd(struct cmd_syndesc *as, void *arock)
  {
      char *vpName, *vpDev;
      struct vptab vpentry;
***************
*** 79,85 ****
      return 0;
  }
  
! static int DoVptDel(struct cmd_syndesc *as, char *arock)
  {
      char *vpName;
  
--- 79,85 ----
      return 0;
  }
  
! static int DoVptDel(struct cmd_syndesc *as, void *arock)
  {
      char *vpName;
  
***************
*** 98,104 ****
  }
  
  
! static int DoDirGet(struct cmd_syndesc *as, char *arock)
  {
      char *buf;
  
--- 98,104 ----
  }
  
  
! static int DoDirGet(struct cmd_syndesc *as, void *arock)
  {
      char *buf;
  
***************
*** 115,121 ****
  }
  
  
! static int DoDirSet(struct cmd_syndesc *as, char *arock)
  {
      long status;
      HKEY key;
--- 115,121 ----
  }
  
  
! static int DoDirSet(struct cmd_syndesc *as, void *arock)
  {
      long status;
      HKEY key;
***************
*** 143,149 ****
  }
  
  
! static int DoBosCfg(struct cmd_syndesc *as, char *arock)
  {
      char bosSvcPath[AFSDIR_PATH_MAX];
      SC_HANDLE scmHandle, svcHandle;
--- 143,149 ----
  }
  
  
! static int DoBosCfg(struct cmd_syndesc *as, void *arock)
  {
      char bosSvcPath[AFSDIR_PATH_MAX];
      SC_HANDLE scmHandle, svcHandle;
***************
*** 213,219 ****
  }
  
  
! static int DoBosDel(struct cmd_syndesc *as, char *arock)
  {
      int rc = 0;
      SC_HANDLE scmHandle, svcHandle;
--- 213,219 ----
  }
  
  
! static int DoBosDel(struct cmd_syndesc *as, void *arock)
  {
      int rc = 0;
      SC_HANDLE scmHandle, svcHandle;
***************
*** 258,264 ****
      return (rc);
  }
  
! static int DoVersionGet(struct cmd_syndesc *as, char *arock)
  {
      unsigned major, minor, patch;
  
--- 258,264 ----
      return (rc);
  }
  
! static int DoVersionGet(struct cmd_syndesc *as, void *arock)
  {
      unsigned major, minor, patch;
  
***************
*** 286,300 ****
  {
      struct cmd_syndesc	*ts;
  
!     ts = cmd_CreateSyntax("vptlist", DoVptList, 0,
  			  "list vice partition table");
  
!     ts = cmd_CreateSyntax("vptadd", DoVptAdd, 0,
  			  "add entry to vice partition table");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_REQUIRED, "partition name");
      cmd_AddParm(ts, "-dev", CMD_SINGLE, CMD_REQUIRED, "device name");
  
!     ts = cmd_CreateSyntax("vptdel", DoVptDel, 0,
  			  "remove entry from vice partition table");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_REQUIRED, "partition name");
  }
--- 286,300 ----
  {
      struct cmd_syndesc	*ts;
  
!     ts = cmd_CreateSyntax("vptlist", DoVptList, NULL,
  			  "list vice partition table");
  
!     ts = cmd_CreateSyntax("vptadd", DoVptAdd, NULL,
  			  "add entry to vice partition table");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_REQUIRED, "partition name");
      cmd_AddParm(ts, "-dev", CMD_SINGLE, CMD_REQUIRED, "device name");
  
!     ts = cmd_CreateSyntax("vptdel", DoVptDel, NULL,
  			  "remove entry from vice partition table");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_REQUIRED, "partition name");
  }
***************
*** 304,313 ****
  {
      struct cmd_syndesc	*ts;
  
!     ts = cmd_CreateSyntax("dirget", DoDirGet, 0,
  			  "display the AFS server installation directory");
  
!     ts = cmd_CreateSyntax("dirset", DoDirSet, 0,
  			  "set the AFS server installation directory");
      cmd_AddParm(ts, "-path", CMD_SINGLE, CMD_REQUIRED, "directory path");
  }
--- 304,313 ----
  {
      struct cmd_syndesc	*ts;
  
!     ts = cmd_CreateSyntax("dirget", DoDirGet, NULL,
  			  "display the AFS server installation directory");
  
!     ts = cmd_CreateSyntax("dirset", DoDirSet, NULL,
  			  "set the AFS server installation directory");
      cmd_AddParm(ts, "-path", CMD_SINGLE, CMD_REQUIRED, "directory path");
  }
***************
*** 317,327 ****
  {
      struct cmd_syndesc	*ts;
  
!     ts = cmd_CreateSyntax("boscfg", DoBosCfg, 0,
  			  "configure the AFS BOS control service");
      cmd_AddParm(ts, "-path", CMD_SINGLE, CMD_OPTIONAL, "service binary path");
  
!     ts = cmd_CreateSyntax("bosdel", DoBosDel, 0,
  			  "delete (unconfigure) the AFS BOS control service");
  }
  
--- 317,327 ----
  {
      struct cmd_syndesc	*ts;
  
!     ts = cmd_CreateSyntax("boscfg", DoBosCfg, NULL,
  			  "configure the AFS BOS control service");
      cmd_AddParm(ts, "-path", CMD_SINGLE, CMD_OPTIONAL, "service binary path");
  
!     ts = cmd_CreateSyntax("bosdel", DoBosDel, NULL,
  			  "delete (unconfigure) the AFS BOS control service");
  }
  
***************
*** 330,336 ****
  {
      struct cmd_syndesc	*ts;
  
!     ts = cmd_CreateSyntax("version", DoVersionGet, 0,
  			  "display AFS version information");
  }
  
--- 330,336 ----
  {
      struct cmd_syndesc	*ts;
  
!     ts = cmd_CreateSyntax("version", DoVersionGet, NULL,
  			  "display AFS version information");
  }
  
Index: openafs/src/WINNT/client_osi/osibasel.h
diff -c openafs/src/WINNT/client_osi/osibasel.h:1.5.4.1 openafs/src/WINNT/client_osi/osibasel.h:1.5.4.2
*** openafs/src/WINNT/client_osi/osibasel.h:1.5.4.1	Mon Oct  2 22:48:23 2006
--- openafs/src/WINNT/client_osi/osibasel.h	Sun Nov  4 19:18:37 2007
***************
*** 121,132 ****
  
  /* and friendly macros */
  
! #define lock_AssertRead(x) osi_assert(lock_GetRWLockState(x) & OSI_RWLOCK_READHELD)
  
! #define lock_AssertWrite(x) osi_assert(lock_GetRWLockState(x) & OSI_RWLOCK_WRITEHELD)
  
! #define lock_AssertAny(x) osi_assert(lock_GetRWLockState(x) != 0)
  
! #define lock_AssertMutex(x) osi_assert(lock_GetMutexState(x) & OSI_MUTEX_HELD)
  
  #endif /*_OSIBASEL_H_ENV_ */
--- 121,132 ----
  
  /* and friendly macros */
  
! #define lock_AssertRead(x) osi_assertx(lock_GetRWLockState(x) & OSI_RWLOCK_READHELD, "!OSI_RWLOCK_READHELD")
  
! #define lock_AssertWrite(x) osi_assertx(lock_GetRWLockState(x) & OSI_RWLOCK_WRITEHELD, "!OSI_RWLOCK_WRITEHELD")
  
! #define lock_AssertAny(x) osi_assertx(lock_GetRWLockState(x) != 0, "!(OSI_RWLOCK_READHELD | OSI_RWLOCK_WRITEHELD)")
  
! #define lock_AssertMutex(x) osi_assertx(lock_GetMutexState(x) & OSI_MUTEX_HELD, "!OSI_MUTEX_HELD")
  
  #endif /*_OSIBASEL_H_ENV_ */
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm
diff -c openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm:1.5.4.21 openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm:1.5.4.22
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm:1.5.4.21	Sun Oct 14 23:23:00 2007
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm	Tue Nov  6 22:42:23 2007
***************
*** 57,63 ****
  
  <h1>OpenAFS for Windows</h1>
  
! <h2>Version 1.5.26</h2>
  
  <p class=MsoNormal>&nbsp; </p>
  
--- 57,63 ----
  
  <h1>OpenAFS for Windows</h1>
  
! <h2>Version 1.5.27</h2>
  
  <p class=MsoNormal>&nbsp; </p>
  
***************
*** 80,86 ****
  <span
  style='font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span><a
! href="ReleaseNotes/relnotes-frames.htm">OpenAFS for Windows 1.5.26
  Release Notes</a></p>
  
  <p style='margin-left:36.0pt;text-indent:-18.0pt;'>
--- 80,86 ----
  <span
  style='font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span><a
! href="ReleaseNotes/relnotes-frames.htm">OpenAFS for Windows 1.5.27
  Release Notes</a></p>
  
  <p style='margin-left:36.0pt;text-indent:-18.0pt;'>
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm
diff -c openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm:1.1.6.21 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm:1.1.6.22
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm:1.1.6.21	Sun Oct 14 23:23:06 2007
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm	Tue Nov  6 22:42:27 2007
***************
*** 18,24 ****
  .shape {behavior:url(#default#VML);}
  </style>
  <![endif]-->
! <title>OpenAFS for Windows 1.5.26 Release Notes</title>
  <!--[if gte mso 9]><xml>
   <o:DocumentProperties>
    <o:Revision>1</o:Revision>
--- 18,24 ----
  .shape {behavior:url(#default#VML);}
  </style>
  <![endif]-->
! <title>OpenAFS for Windows 1.5.27 Release Notes</title>
  <!--[if gte mso 9]><xml>
   <o:DocumentProperties>
    <o:Revision>1</o:Revision>
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes-frames.htm
diff -c openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes-frames.htm:1.1.4.23 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes-frames.htm:1.1.4.24
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes-frames.htm:1.1.4.23	Mon Oct 22 19:21:56 2007
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes-frames.htm	Tue Nov  6 22:42:27 2007
***************
*** 8,14 ****
  <meta name=Generator content="Microsoft Word 11">
  <meta name=Originator content="Microsoft Word 11">
  <link rel=File-List href="relnotes-frames_files/filelist.xml">
! <title>OpenAFS for Windows 1.5.26 Release Notes</title>
  <!--[if gte mso 9]><xml>
   <w:WordDocument>
    <w:Zoom>0</w:Zoom>
--- 8,14 ----
  <meta name=Generator content="Microsoft Word 11">
  <meta name=Originator content="Microsoft Word 11">
  <link rel=File-List href="relnotes-frames_files/filelist.xml">
! <title>OpenAFS for Windows 1.5.27 Release Notes</title>
  <!--[if gte mso 9]><xml>
   <w:WordDocument>
    <w:Zoom>0</w:Zoom>
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm
diff -c openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm:1.6.4.26 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm:1.6.4.27
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm:1.6.4.26	Mon Oct 22 19:21:56 2007
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm	Tue Nov  6 22:42:27 2007
***************
*** 19,25 ****
  .shape {behavior:url(#default#VML);}
  </style>
  <![endif]-->
! <title>OpenAFS for Windows 1.5.26 Release Notes</title>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
   name="PostalCode"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
--- 19,25 ----
  .shape {behavior:url(#default#VML);}
  </style>
  <![endif]-->
! <title>OpenAFS for Windows 1.5.27 Release Notes</title>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
   name="PostalCode"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
***************
*** 579,585 ****
  
  <div class=Section1>
  
! <p class=MsoTitle>OpenAFS for Windows 1.5.26<br>
  Release Notes</p>
  
  <p class=MsoBodyText>The Andrew File System (AFS) is a location-independent
--- 579,585 ----
  
  <div class=Section1>
  
! <p class=MsoTitle>OpenAFS for Windows 1.5.27<br>
  Release Notes</p>
  
  <p class=MsoBodyText>The Andrew File System (AFS) is a location-independent
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm
diff -c openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm:1.2.6.21 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm:1.2.6.22
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm:1.2.6.21	Mon Oct 22 19:21:57 2007
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm	Tue Nov  6 22:42:28 2007
***************
*** 10,16 ****
  <meta name=Originator content="Microsoft Word 11">
  <base target=body>
  <link rel=File-List href="toc_files/filelist.xml">
! <title>OpenAFS for Windows 1.5.26 Table of Contents</title>
  <!--[if gte mso 9]><xml>
   <o:DocumentProperties>
    <o:Author>Jeffrey Altman</o:Author>
--- 10,16 ----
  <meta name=Originator content="Microsoft Word 11">
  <base target=body>
  <link rel=File-List href="toc_files/filelist.xml">
! <title>OpenAFS for Windows 1.5.27 Table of Contents</title>
  <!--[if gte mso 9]><xml>
   <o:DocumentProperties>
    <o:Author>Jeffrey Altman</o:Author>
Index: openafs/src/WINNT/install/NSIS/CellServDB
diff -c openafs/src/WINNT/install/NSIS/CellServDB:1.6.4.3 openafs/src/WINNT/install/NSIS/CellServDB:1.6.4.4
*** openafs/src/WINNT/install/NSIS/CellServDB:1.6.4.3	Thu Jul  5 19:47:40 2007
--- openafs/src/WINNT/install/NSIS/CellServDB	Sat Nov  3 11:59:32 2007
***************
*** 1,4 ****
! >grand.central.org      #GCO Public CellServDB 05 Jul 2007
  18.92.0.108                     #grand-opening.mit.edu
  128.2.203.61                    #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
--- 1,4 ----
! >grand.central.org      #GCO Public CellServDB 25 Oct 2007
  18.92.0.108                     #grand-opening.mit.edu
  128.2.203.61                    #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
***************
*** 48,55 ****
  66.93.118.125                   #stormy
  130.85.24.11                    #weasel
  130.85.24.13                    #straykitten
- >midnightlinux.com      #Midnight Linux, Pittsburgh PA
- 208.10.142.82                   #outpost.midnightlinux.com
  >setfilepointer.com     #SetFilePointer.com
  63.224.10.2                     #hamlet.SetFilePointer.com
  63.224.10.4                     #troilus.SetFilePointer.com
--- 48,53 ----
***************
*** 62,67 ****
--- 60,69 ----
  213.187.92.33                   #gpp1.gppc.de
  213.187.92.34                   #paulchen.gppc.de
  213.187.92.35                   #lotus.gppc.de
+ >cms.hu-berlin.de       #Humboldt University Berlin
+ 141.20.1.65                     #commodus.cms.hu-berlin.de
+ 141.20.1.66                     #faustinus.cms.hu-berlin.de
+ 141.20.1.67                     #marcellus.cms.hu-berlin.de
  >ifh.de                 #DESY Zeuthen
  141.34.22.10                    #romulus.ifh.de
  141.34.22.11                    #remus.ifh.de
***************
*** 147,154 ****
  129.219.10.70                   #authen1.asu.edu
  129.219.10.72                   #authen3.asu.edu
  129.219.100.16                  #authen4.asu.edu
! >hep.caltech.edu        #CalTech High Energy Physics
! 131.215.126.150                 #afs.hep.caltech.edu
  >clarkson.edu           #Clarkson University, Potsdam, New York USA
  128.153.1.111                   #arthur.clarkson.edu
  128.153.9.111                   #lancelot.clarkson.edu
--- 149,160 ----
  129.219.10.70                   #authen1.asu.edu
  129.219.10.72                   #authen3.asu.edu
  129.219.100.16                  #authen4.asu.edu
! >eecs.berkeley.edu      #University of California, Berkeley - EECS Dept.
! 128.32.139.34                   #greed.eecs.berkeley.edu
! 128.32.139.35                   #gluttony.eecs.berkeley.edu
! 169.229.60.112                  #envy.eecs.berkeley.edu
! >hep.caltech.edu        #Caltech High Energy Physics
! 131.215.116.20                  #afs.hep.caltech.edu
  >clarkson.edu           #Clarkson University, Potsdam, New York USA
  128.153.1.111                   #arthur.clarkson.edu
  128.153.9.111                   #lancelot.clarkson.edu
***************
*** 160,173 ****
  128.2.10.28                     #vice28.fs.andrew.cmu.edu
  128.2.32.44                     #new-vice12.fs.andrew.cmu.edu
  >club.cc.cmu.edu        #Carnegie Mellon University Computer Club
  128.237.157.11                  #sodium.club.cc.cmu.edu
  128.237.157.13                  #potassium.club.cc.cmu.edu
  >chem.cmu.edu           #Carnegie Mellon University - Chemistry Dept.
  128.2.40.134                    #afs.chem.cmu.edu
  128.2.40.140                    #afs2.chem.cmu.edu
  >cs.cmu.edu             #Carnegie Mellon University - School of Comp. Sci.
  128.2.201.46                    #strawberry.srv.cs.cmu.edu
- 128.2.201.47                    #pumpkin.srv.cs.cmu.edu
  128.2.201.48                    #cherry.srv.cs.cmu.edu
  >ece.cmu.edu            #Carnegie Mellon University - Elec. Comp. Eng. Dept.
  128.2.129.7                     #porok.ece.cmu.edu
--- 166,180 ----
  128.2.10.28                     #vice28.fs.andrew.cmu.edu
  128.2.32.44                     #new-vice12.fs.andrew.cmu.edu
  >club.cc.cmu.edu        #Carnegie Mellon University Computer Club
+ 128.2.204.149                   #barium.club.cc.cmu.edu
  128.237.157.11                  #sodium.club.cc.cmu.edu
  128.237.157.13                  #potassium.club.cc.cmu.edu
  >chem.cmu.edu           #Carnegie Mellon University - Chemistry Dept.
  128.2.40.134                    #afs.chem.cmu.edu
  128.2.40.140                    #afs2.chem.cmu.edu
  >cs.cmu.edu             #Carnegie Mellon University - School of Comp. Sci.
+ 128.2.184.215                   #pumpkin.srv.cs.cmu.edu
  128.2.201.46                    #strawberry.srv.cs.cmu.edu
  128.2.201.48                    #cherry.srv.cs.cmu.edu
  >ece.cmu.edu            #Carnegie Mellon University - Elec. Comp. Eng. Dept.
  128.2.129.7                     #porok.ece.cmu.edu
***************
*** 199,205 ****
  >cs.fhm.edu             #Department Computer Science Munich University Of Applied Science
  129.187.208.2                   #srv1.informatik.fh-muenchen.de
  >eecs.harvard.edu       #Harvard - EECS
! 140.247.60.61                   #zermelo.eecs.harvard.edu
  140.247.60.83                   #corfu.eecs.harvard.edu
  >iastate.edu            #Iowa State University
  129.186.1.243                   #afsdb-1.iastate.edu
--- 206,212 ----
  >cs.fhm.edu             #Department Computer Science Munich University Of Applied Science
  129.187.208.2                   #srv1.informatik.fh-muenchen.de
  >eecs.harvard.edu       #Harvard - EECS
! 140.247.60.64                   #lefkada.eecs.harvard.edu
  140.247.60.83                   #corfu.eecs.harvard.edu
  >iastate.edu            #Iowa State University
  129.186.1.243                   #afsdb-1.iastate.edu
***************
*** 380,389 ****
  134.158.232.11                  #ccafsdb1.in2p3.fr
  134.158.232.12                  #ccafsdb2.in2p3.fr
  134.158.232.13                  #ccafsdb3.in2p3.fr
  >anl.gov                #Argonne National Laboratory
! 146.137.96.33                   #arteus.ctd.anl.gov
! 146.137.162.88                  #agamemnon.ctd.anl.gov
! 146.137.194.80                  #antenor.ctd.anl.gov
  >rhic.bnl.gov           #Relativistic Heavy Ion Collider
  130.199.6.51                    #rafs03.rcf.bnl.gov
  130.199.6.52                    #rafs02.rcf.bnl.gov
--- 387,400 ----
  134.158.232.11                  #ccafsdb1.in2p3.fr
  134.158.232.12                  #ccafsdb2.in2p3.fr
  134.158.232.13                  #ccafsdb3.in2p3.fr
+ >mcc.ac.gb              #University of Manchester
+ 130.88.203.41                   #nevis.mc.man.ac.uk
+ 130.88.203.144                  #eryri.mc.man.ac.uk
+ 130.88.203.145                  #scafell.mc.man.ac.uk
  >anl.gov                #Argonne National Laboratory
! 146.137.96.33                   #arteus.it.anl.gov
! 146.137.162.88                  #agamemnon.it.anl.gov
! 146.137.194.80                  #antenor.it.anl.gov
  >rhic.bnl.gov           #Relativistic Heavy Ion Collider
  130.199.6.51                    #rafs03.rcf.bnl.gov
  130.199.6.52                    #rafs02.rcf.bnl.gov
***************
*** 484,492 ****
  >laroia.net             #Laroia Networks
  66.66.102.254                   #supercore.laroia.net
  >sinenomine.net         #Sine Nomine Associates
! 192.204.203.218                 #va.sinenomine.net
  >slackers.net           #The Slackers' Network
! 63.201.48.27                    #alexandria.slackers.net
  >tproa.net              #The People's Republic of Ames
  72.13.4.23                      #service-3.tproa.net
  72.13.4.24                      #service-4.tproa.net
--- 495,504 ----
  >laroia.net             #Laroia Networks
  66.66.102.254                   #supercore.laroia.net
  >sinenomine.net         #Sine Nomine Associates
! 66.135.48.108                   #tx2srv03.sinenomine.net
! 72.73.30.42                     #va.sinenomine.net
  >slackers.net           #The Slackers' Network
! 199.4.150.159                   #alexandria.slackers.net
  >tproa.net              #The People's Republic of Ames
  72.13.4.23                      #service-3.tproa.net
  72.13.4.24                      #service-4.tproa.net
***************
*** 506,511 ****
--- 518,527 ----
  >dementia.org           #Dementia Unlimited
  128.2.12.45                     #alycia.dementia.org
  128.2.120.216                   #meredith.dementia.org
+ >dsrw.org               #The DSRW
+ 65.103.82.83                    #straylight.dsrw.org
+ 65.103.82.84                    #chiba.dsrw.org
+ 65.103.82.85                    #freeside.dsrw.org
  >hackish.org            #Hackish.org
  24.167.65.213                   #avatar.sys.hackish.org
  128.2.120.138                   #kurma.sys.hackish.org
***************
*** 572,577 ****
--- 588,595 ----
  194.249.156.1                   #brenta.ijs.si
  >p-ng.si                #Nova Gorica Polytechnic
  193.2.120.2                     #solkan.p-ng.si
+ >hep-ex.physics.metu.edu.tr #METU Department of Physics, Experimental HEP group, Ankara/Turke
+ 144.122.31.131                  #neutrino.physics.metu.edu.tr
  >phy.bris.ac.uk         #Bristol University - phyics
  137.222.58.9                    #afs1.phy.bris.ac.uk
  >inf.ed.ac.uk           #School of Informatics, University of Edinburgh
Index: openafs/src/WINNT/install/wix/CellServDB
diff -c openafs/src/WINNT/install/wix/CellServDB:1.6.4.3 openafs/src/WINNT/install/wix/CellServDB:1.6.4.4
*** openafs/src/WINNT/install/wix/CellServDB:1.6.4.3	Thu Jul  5 19:47:44 2007
--- openafs/src/WINNT/install/wix/CellServDB	Sat Nov  3 11:59:36 2007
***************
*** 1,4 ****
! >grand.central.org      #GCO Public CellServDB 05 Jul 2007
  18.92.0.108                     #grand-opening.mit.edu
  128.2.203.61                    #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
--- 1,4 ----
! >grand.central.org      #GCO Public CellServDB 25 Oct 2007
  18.92.0.108                     #grand-opening.mit.edu
  128.2.203.61                    #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
***************
*** 48,55 ****
  66.93.118.125                   #stormy
  130.85.24.11                    #weasel
  130.85.24.13                    #straykitten
- >midnightlinux.com      #Midnight Linux, Pittsburgh PA
- 208.10.142.82                   #outpost.midnightlinux.com
  >setfilepointer.com     #SetFilePointer.com
  63.224.10.2                     #hamlet.SetFilePointer.com
  63.224.10.4                     #troilus.SetFilePointer.com
--- 48,53 ----
***************
*** 62,67 ****
--- 60,69 ----
  213.187.92.33                   #gpp1.gppc.de
  213.187.92.34                   #paulchen.gppc.de
  213.187.92.35                   #lotus.gppc.de
+ >cms.hu-berlin.de       #Humboldt University Berlin
+ 141.20.1.65                     #commodus.cms.hu-berlin.de
+ 141.20.1.66                     #faustinus.cms.hu-berlin.de
+ 141.20.1.67                     #marcellus.cms.hu-berlin.de
  >ifh.de                 #DESY Zeuthen
  141.34.22.10                    #romulus.ifh.de
  141.34.22.11                    #remus.ifh.de
***************
*** 147,154 ****
  129.219.10.70                   #authen1.asu.edu
  129.219.10.72                   #authen3.asu.edu
  129.219.100.16                  #authen4.asu.edu
! >hep.caltech.edu        #CalTech High Energy Physics
! 131.215.126.150                 #afs.hep.caltech.edu
  >clarkson.edu           #Clarkson University, Potsdam, New York USA
  128.153.1.111                   #arthur.clarkson.edu
  128.153.9.111                   #lancelot.clarkson.edu
--- 149,160 ----
  129.219.10.70                   #authen1.asu.edu
  129.219.10.72                   #authen3.asu.edu
  129.219.100.16                  #authen4.asu.edu
! >eecs.berkeley.edu      #University of California, Berkeley - EECS Dept.
! 128.32.139.34                   #greed.eecs.berkeley.edu
! 128.32.139.35                   #gluttony.eecs.berkeley.edu
! 169.229.60.112                  #envy.eecs.berkeley.edu
! >hep.caltech.edu        #Caltech High Energy Physics
! 131.215.116.20                  #afs.hep.caltech.edu
  >clarkson.edu           #Clarkson University, Potsdam, New York USA
  128.153.1.111                   #arthur.clarkson.edu
  128.153.9.111                   #lancelot.clarkson.edu
***************
*** 160,173 ****
  128.2.10.28                     #vice28.fs.andrew.cmu.edu
  128.2.32.44                     #new-vice12.fs.andrew.cmu.edu
  >club.cc.cmu.edu        #Carnegie Mellon University Computer Club
  128.237.157.11                  #sodium.club.cc.cmu.edu
  128.237.157.13                  #potassium.club.cc.cmu.edu
  >chem.cmu.edu           #Carnegie Mellon University - Chemistry Dept.
  128.2.40.134                    #afs.chem.cmu.edu
  128.2.40.140                    #afs2.chem.cmu.edu
  >cs.cmu.edu             #Carnegie Mellon University - School of Comp. Sci.
  128.2.201.46                    #strawberry.srv.cs.cmu.edu
- 128.2.201.47                    #pumpkin.srv.cs.cmu.edu
  128.2.201.48                    #cherry.srv.cs.cmu.edu
  >ece.cmu.edu            #Carnegie Mellon University - Elec. Comp. Eng. Dept.
  128.2.129.7                     #porok.ece.cmu.edu
--- 166,180 ----
  128.2.10.28                     #vice28.fs.andrew.cmu.edu
  128.2.32.44                     #new-vice12.fs.andrew.cmu.edu
  >club.cc.cmu.edu        #Carnegie Mellon University Computer Club
+ 128.2.204.149                   #barium.club.cc.cmu.edu
  128.237.157.11                  #sodium.club.cc.cmu.edu
  128.237.157.13                  #potassium.club.cc.cmu.edu
  >chem.cmu.edu           #Carnegie Mellon University - Chemistry Dept.
  128.2.40.134                    #afs.chem.cmu.edu
  128.2.40.140                    #afs2.chem.cmu.edu
  >cs.cmu.edu             #Carnegie Mellon University - School of Comp. Sci.
+ 128.2.184.215                   #pumpkin.srv.cs.cmu.edu
  128.2.201.46                    #strawberry.srv.cs.cmu.edu
  128.2.201.48                    #cherry.srv.cs.cmu.edu
  >ece.cmu.edu            #Carnegie Mellon University - Elec. Comp. Eng. Dept.
  128.2.129.7                     #porok.ece.cmu.edu
***************
*** 199,205 ****
  >cs.fhm.edu             #Department Computer Science Munich University Of Applied Science
  129.187.208.2                   #srv1.informatik.fh-muenchen.de
  >eecs.harvard.edu       #Harvard - EECS
! 140.247.60.61                   #zermelo.eecs.harvard.edu
  140.247.60.83                   #corfu.eecs.harvard.edu
  >iastate.edu            #Iowa State University
  129.186.1.243                   #afsdb-1.iastate.edu
--- 206,212 ----
  >cs.fhm.edu             #Department Computer Science Munich University Of Applied Science
  129.187.208.2                   #srv1.informatik.fh-muenchen.de
  >eecs.harvard.edu       #Harvard - EECS
! 140.247.60.64                   #lefkada.eecs.harvard.edu
  140.247.60.83                   #corfu.eecs.harvard.edu
  >iastate.edu            #Iowa State University
  129.186.1.243                   #afsdb-1.iastate.edu
***************
*** 380,389 ****
  134.158.232.11                  #ccafsdb1.in2p3.fr
  134.158.232.12                  #ccafsdb2.in2p3.fr
  134.158.232.13                  #ccafsdb3.in2p3.fr
  >anl.gov                #Argonne National Laboratory
! 146.137.96.33                   #arteus.ctd.anl.gov
! 146.137.162.88                  #agamemnon.ctd.anl.gov
! 146.137.194.80                  #antenor.ctd.anl.gov
  >rhic.bnl.gov           #Relativistic Heavy Ion Collider
  130.199.6.51                    #rafs03.rcf.bnl.gov
  130.199.6.52                    #rafs02.rcf.bnl.gov
--- 387,400 ----
  134.158.232.11                  #ccafsdb1.in2p3.fr
  134.158.232.12                  #ccafsdb2.in2p3.fr
  134.158.232.13                  #ccafsdb3.in2p3.fr
+ >mcc.ac.gb              #University of Manchester
+ 130.88.203.41                   #nevis.mc.man.ac.uk
+ 130.88.203.144                  #eryri.mc.man.ac.uk
+ 130.88.203.145                  #scafell.mc.man.ac.uk
  >anl.gov                #Argonne National Laboratory
! 146.137.96.33                   #arteus.it.anl.gov
! 146.137.162.88                  #agamemnon.it.anl.gov
! 146.137.194.80                  #antenor.it.anl.gov
  >rhic.bnl.gov           #Relativistic Heavy Ion Collider
  130.199.6.51                    #rafs03.rcf.bnl.gov
  130.199.6.52                    #rafs02.rcf.bnl.gov
***************
*** 484,492 ****
  >laroia.net             #Laroia Networks
  66.66.102.254                   #supercore.laroia.net
  >sinenomine.net         #Sine Nomine Associates
! 192.204.203.218                 #va.sinenomine.net
  >slackers.net           #The Slackers' Network
! 63.201.48.27                    #alexandria.slackers.net
  >tproa.net              #The People's Republic of Ames
  72.13.4.23                      #service-3.tproa.net
  72.13.4.24                      #service-4.tproa.net
--- 495,504 ----
  >laroia.net             #Laroia Networks
  66.66.102.254                   #supercore.laroia.net
  >sinenomine.net         #Sine Nomine Associates
! 66.135.48.108                   #tx2srv03.sinenomine.net
! 72.73.30.42                     #va.sinenomine.net
  >slackers.net           #The Slackers' Network
! 199.4.150.159                   #alexandria.slackers.net
  >tproa.net              #The People's Republic of Ames
  72.13.4.23                      #service-3.tproa.net
  72.13.4.24                      #service-4.tproa.net
***************
*** 506,511 ****
--- 518,527 ----
  >dementia.org           #Dementia Unlimited
  128.2.12.45                     #alycia.dementia.org
  128.2.120.216                   #meredith.dementia.org
+ >dsrw.org               #The DSRW
+ 65.103.82.83                    #straylight.dsrw.org
+ 65.103.82.84                    #chiba.dsrw.org
+ 65.103.82.85                    #freeside.dsrw.org
  >hackish.org            #Hackish.org
  24.167.65.213                   #avatar.sys.hackish.org
  128.2.120.138                   #kurma.sys.hackish.org
***************
*** 572,577 ****
--- 588,595 ----
  194.249.156.1                   #brenta.ijs.si
  >p-ng.si                #Nova Gorica Polytechnic
  193.2.120.2                     #solkan.p-ng.si
+ >hep-ex.physics.metu.edu.tr #METU Department of Physics, Experimental HEP group, Ankara/Turke
+ 144.122.31.131                  #neutrino.physics.metu.edu.tr
  >phy.bris.ac.uk         #Bristol University - phyics
  137.222.58.9                    #afs1.phy.bris.ac.uk
  >inf.ed.ac.uk           #School of Informatics, University of Edinburgh
Index: openafs/src/WINNT/install/wix/property.wxi
diff -c openafs/src/WINNT/install/wix/property.wxi:1.10.2.1 openafs/src/WINNT/install/wix/property.wxi:1.10.2.2
*** openafs/src/WINNT/install/wix/property.wxi:1.10.2.1	Tue Jul 18 12:03:59 2006
--- openafs/src/WINNT/install/wix/property.wxi	Tue Oct 23 23:50:35 2007
***************
*** 117,123 ****
  	  <RegistrySearch Win64="$(var.Win64)" Id="rl_NSIS_Ver" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" Name="DisplayVersion" Type="raw" />
  	</Property>
      <Property Id="NSISUNINSTALL">
! 	  <RegistrySearch Win64="$(var.Win64)" Id="rl_NSIS_Uninst" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" Name="UninstallString" Type="file" />
      </Property>
      
      <Property Id="OLDCELLSERVDB">
--- 117,123 ----
  	  <RegistrySearch Win64="$(var.Win64)" Id="rl_NSIS_Ver" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" Name="DisplayVersion" Type="raw" />
  	</Property>
      <Property Id="NSISUNINSTALL">
! 	  <RegistrySearch Win64="$(var.Win64)" Id="rl_NSIS_Uninst" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" Name="UninstallString" Type="raw" />
      </Property>
      
      <Property Id="OLDCELLSERVDB">
Index: openafs/src/afs/afs_call.c
diff -c openafs/src/afs/afs_call.c:1.86.4.17 openafs/src/afs/afs_call.c:1.86.4.18
*** openafs/src/afs/afs_call.c:1.86.4.17	Wed Oct 17 10:34:53 2007
--- openafs/src/afs/afs_call.c	Tue Nov  6 23:33:59 2007
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_call.c,v 1.86.4.17 2007/10/17 14:34:53 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_call.c,v 1.86.4.18 2007/11/07 04:33:59 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 1272,1277 ****
--- 1272,1278 ----
      shutdown_rx();
      afs_shutdown_BKG();
  #endif
+     return;
      shutdown_bufferpackage();
      shutdown_cache();
      shutdown_osi();
Index: openafs/src/afs/afs_prototypes.h
diff -c openafs/src/afs/afs_prototypes.h:1.74.2.7 openafs/src/afs/afs_prototypes.h:1.74.2.9
*** openafs/src/afs/afs_prototypes.h:1.74.2.7	Wed Jun 27 12:30:46 2007
--- openafs/src/afs/afs_prototypes.h	Wed Oct 24 11:45:03 2007
***************
*** 301,306 ****
--- 301,307 ----
  /* afs_exporter.c */
  extern struct afs_exporter *root_exported;
  extern struct afs_exporter *exporter_find(int type);
+ extern void shutdown_exporter(void);
  
  /* afs_icl.c */
  extern struct afs_icl_set *afs_icl_allSets;
***************
*** 488,493 ****
--- 489,495 ----
  				    struct AFS_UCRED **cred,
  				    afs_int32 host, afs_int32 *pagparam,
  				    struct afs_exporter **outexporter);
+ extern void shutdown_nfsclnt(void);
  
  /* afs_osi.c */
  extern afs_lock_t afs_ftf;
***************
*** 502,507 ****
--- 504,510 ----
  extern void afs_osi_RxkRegister(void);
  extern void afs_osi_Invisible(void);
  extern void shutdown_osi(void);
+ extern void shutdown_osinet(void);
  extern int afs_osi_suser(void *credp);
  extern void afs_osi_TraverseProcTable(void);
  #if defined(KERNEL) && !defined(UKERNEL) && defined(AFS_PROC)
***************
*** 525,530 ****
--- 528,534 ----
  extern void osi_FreeSmallSpace(void *adata);
  extern void *osi_AllocLargeSpace(size_t size);
  extern void *osi_AllocSmallSpace(size_t size);
+ extern void shutdown_osinet(void);
  
  /* afs_osi_pag.c */
  extern int afs_setpag();
Index: openafs/src/afs/DARWIN/osi_misc.c
diff -c openafs/src/afs/DARWIN/osi_misc.c:1.11 openafs/src/afs/DARWIN/osi_misc.c:1.11.2.1
*** openafs/src/afs/DARWIN/osi_misc.c:1.11	Mon Feb 13 13:51:55 2006
--- openafs/src/afs/DARWIN/osi_misc.c	Tue Oct 23 13:39:19 2007
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_misc.c,v 1.11 2006/02/13 18:51:55 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_misc.c,v 1.11.2.1 2007/10/23 17:39:19 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
***************
*** 102,111 ****
     user_addr_t iovaddr;
     user_size_t iovsize;
  
!    /* XXX 64 bit userspaace? */
!    res = uio_create(uio_iovcnt(auio), uio_offset(auio),
!                     uio_isuserspace(auio) ? UIO_USERSPACE32 : UIO_SYSSPACE32,
!                     uio_rw(auio));
  
     for (i = 0;i < uio_iovcnt(auio) && size > 0;i++) {
         if (uio_getiov(auio, i, &iovaddr, &iovsize))
--- 102,116 ----
     user_addr_t iovaddr;
     user_size_t iovsize;
  
!    if (proc_is64bit(current_proc())) {
!        res = uio_create(uio_iovcnt(auio), uio_offset(auio),
! 			uio_isuserspace(auio) ? UIO_USERSPACE64 : UIO_SYSSPACE32,
! 			uio_rw(auio));
!    } else {
!        res = uio_create(uio_iovcnt(auio), uio_offset(auio),
! 			uio_isuserspace(auio) ? UIO_USERSPACE32 : UIO_SYSSPACE32,
! 			uio_rw(auio));
!    }
  
     for (i = 0;i < uio_iovcnt(auio) && size > 0;i++) {
         if (uio_getiov(auio, i, &iovaddr, &iovsize))
Index: openafs/src/afs/DARWIN/osi_vnodeops.c
diff -c openafs/src/afs/DARWIN/osi_vnodeops.c:1.41.2.7 openafs/src/afs/DARWIN/osi_vnodeops.c:1.41.2.9
*** openafs/src/afs/DARWIN/osi_vnodeops.c:1.41.2.7	Mon Oct 22 20:31:23 2007
--- openafs/src/afs/DARWIN/osi_vnodeops.c	Wed Oct 24 01:41:44 2007
***************
*** 5,11 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_vnodeops.c,v 1.41.2.7 2007/10/23 00:31:23 shadow Exp $");
  
  #include <afs/sysincludes.h>	/* Standard vendor system headers */
  #include <afsincludes.h>	/* Afs-based standard headers */
--- 5,11 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_vnodeops.c,v 1.41.2.9 2007/10/24 05:41:44 shadow Exp $");
  
  #include <afs/sysincludes.h>	/* Standard vendor system headers */
  #include <afsincludes.h>	/* Afs-based standard headers */
***************
*** 542,547 ****
--- 542,549 ----
      else
  	code = afs_close(avc, ap->a_fflag, &afs_osi_cred, vop_proc);
      osi_FlushPages(avc, vop_cred);	/* hold bozon lock, but not basic vnode lock */
+     /* This is legit; it just forces the fstrace event to happen */
+     code = afs_CheckCode(code, NULL, 60);
      AFS_GUNLOCK();
  
      return code;
***************
*** 634,655 ****
      /* we can't check for KAUTH_VNODE_TAKE_OWNERSHIP, so we always permit it */
      
      code = afs_AccessOK(tvc, bits, &treq, cmb);
! 
      if (code == 1 && vnode_vtype(ap->a_vp) == VREG &&
          ap->a_action & KAUTH_VNODE_EXECUTE &&
          (tvc->m.Mode & 0100) != 0100) {
          code = 0;
!      }
      if (code) {
          code= 0;               /* if access is ok */
      } else {
- #if defined(AFS_DARWIN80_ENV) && !defined(AFS_DARWIN90_ENV)
- 	if (ap->a_action == KAUTH_VNODE_READ_DATA) {
- 	    /* In 10.4 cp will loop forever on EACCES */
- 	    code = afs_CheckCode(EACCES, &treq, 57);
-         } else 
- 	    /* but kinit wants EACCES or it gets dumb */
- #endif
  	    code = afs_CheckCode(EACCES, &treq, 57);        /* failure code */
      }
  out:
--- 636,656 ----
      /* we can't check for KAUTH_VNODE_TAKE_OWNERSHIP, so we always permit it */
      
      code = afs_AccessOK(tvc, bits, &treq, cmb);
! #if defined(AFS_DARWIN80_ENV)
!     /* In a dropbox, cp on 10.4 behaves badly, looping on EACCES */
!     /* In a dropbox, Finder may reopen the file. Let it. */
!     if (code == 0 && ((bits &~(PRSFS_READ|PRSFS_WRITE)) == 0)) {
! 	code = afs_AccessOK(tvc, PRSFS_ADMINISTER|PRSFS_INSERT|bits, &treq, cmb);
!     }
! #endif
      if (code == 1 && vnode_vtype(ap->a_vp) == VREG &&
          ap->a_action & KAUTH_VNODE_EXECUTE &&
          (tvc->m.Mode & 0100) != 0100) {
          code = 0;
!     }
      if (code) {
          code= 0;               /* if access is ok */
      } else {
  	    code = afs_CheckCode(EACCES, &treq, 57);        /* failure code */
      }
  out:
***************
*** 689,700 ****
--- 690,704 ----
  
      AFS_GLOCK();
      code = afs_getattr(VTOAFS(ap->a_vp), ap->a_vap, vop_cred);
+     /* This is legit; it just forces the fstrace event to happen */
+     code = afs_CheckCode(code, NULL, 58);
      AFS_GUNLOCK();
  #ifdef AFS_DARWIN80_ENV
      VATTR_SET_SUPPORTED(ap->a_vap, va_type);
      VATTR_SET_SUPPORTED(ap->a_vap, va_mode);
      VATTR_SET_SUPPORTED(ap->a_vap, va_uid);
      VATTR_SET_SUPPORTED(ap->a_vap, va_gid);
+     VATTR_SET_SUPPORTED(ap->a_vap, va_fsid);
      VATTR_SET_SUPPORTED(ap->a_vap, va_fileid);
      VATTR_SET_SUPPORTED(ap->a_vap, va_nlink);
      VATTR_SET_SUPPORTED(ap->a_vap, va_data_size);
***************
*** 721,726 ****
--- 725,732 ----
      int code;
      AFS_GLOCK();
      code = afs_setattr(VTOAFS(ap->a_vp), ap->a_vap, vop_cred);
+     /* This is legit; it just forces the fstrace event to happen */
+     code = afs_CheckCode(code, NULL, 59);
      AFS_GUNLOCK();
      return code;
  }
***************
*** 1197,1202 ****
--- 1203,1209 ----
      GETNAME();
      AFS_GLOCK();
      error = afs_remove(VTOAFS(dvp), name, vop_cn_cred);
+     error = afs_CheckCode(error, NULL, 61);
      AFS_GUNLOCK();
      cache_purge(vp);
      if (!error) {
***************
*** 1214,1219 ****
--- 1221,1232 ----
  	/* If crashes continue in ubc_hold, comment this out */
          (void)ubc_uncache(vp);
  #endif
+     } else {
+ 	/* should check for PRSFS_INSERT and not PRSFS_DELETE, but the
+ 	   goal here is to deal with Finder's unhappiness with resource
+ 	   forks that have no resources in a dropbox setting */
+ 	if (name[0] == '.' && name[1] == '_' && error == EACCES) 
+ 	    error = 0;
      }
  
  #ifndef AFS_DARWIN80_ENV
Index: openafs/src/afs/LINUX/osi_export.c
diff -c openafs/src/afs/LINUX/osi_export.c:1.1.2.2 openafs/src/afs/LINUX/osi_export.c:1.1.2.3
*** openafs/src/afs/LINUX/osi_export.c:1.1.2.2	Mon Jul 31 17:27:39 2006
--- openafs/src/afs/LINUX/osi_export.c	Wed Oct 24 11:45:04 2007
***************
*** 15,23 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_export.c,v 1.1.2.2 2006/07/31 21:27:39 shadow Exp $");
  
  #include <linux/module.h> /* early to avoid printf->printk mapping */
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
  #include "afs/afs_dynroot.h"
--- 15,27 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_export.c,v 1.1.2.3 2007/10/24 15:45:04 shadow Exp $");
  
  #include <linux/module.h> /* early to avoid printf->printk mapping */
+ #include <linux/fs.h>
+ #ifdef EXPORTFS_H_EXISTS
+ #include <linux/exportfs.h>
+ #endif
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
  #include "afs/afs_dynroot.h"
Index: openafs/src/afs/LINUX/osi_module.c
diff -c openafs/src/afs/LINUX/osi_module.c:1.74.2.8 openafs/src/afs/LINUX/osi_module.c:1.74.2.9
*** openafs/src/afs/LINUX/osi_module.c:1.74.2.8	Tue Aug 21 22:17:52 2007
--- openafs/src/afs/LINUX/osi_module.c	Wed Oct 24 14:22:21 2007
***************
*** 15,21 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_module.c,v 1.74.2.8 2007/08/22 02:17:52 shadow Exp $");
  
  #include <linux/module.h> /* early to avoid printf->printk mapping */
  #include "afs/sysincludes.h"
--- 15,21 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_module.c,v 1.74.2.9 2007/10/24 18:22:21 shadow Exp $");
  
  #include <linux/module.h> /* early to avoid printf->printk mapping */
  #include "afs/sysincludes.h"
***************
*** 88,111 ****
  #endif
  #endif
  
- #ifndef LINUX_KEYRING_SUPPORT
      err = osi_syscall_init();
      if (err)
  	return err;
- #endif
      err = afs_init_inodecache();
      if (err) {
- #ifndef LINUX_KEYRING_SUPPORT
  	osi_syscall_clean();
- #endif
  	return err;
      }
      err = register_filesystem(&afs_fs_type);
      if (err) {
  	afs_destroy_inodecache();
- #ifndef LINUX_KEYRING_SUPPORT
  	osi_syscall_clean();
- #endif
  	return err;
      }
  
--- 88,105 ----
***************
*** 133,141 ****
      osi_keyring_shutdown();
  #endif
      osi_sysctl_clean();
- #ifndef LINUX_KEYRING_SUPPORT
      osi_syscall_clean();
- #endif
      unregister_filesystem(&afs_fs_type);
  
      afs_destroy_inodecache();
--- 127,133 ----
Index: openafs/src/afs/LINUX/osi_nfssrv.c
diff -c openafs/src/afs/LINUX/osi_nfssrv.c:1.1.2.5 openafs/src/afs/LINUX/osi_nfssrv.c:1.1.2.6
*** openafs/src/afs/LINUX/osi_nfssrv.c:1.1.2.5	Tue Aug 21 17:28:45 2007
--- openafs/src/afs/LINUX/osi_nfssrv.c	Wed Oct 24 11:45:04 2007
***************
*** 15,24 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_nfssrv.c,v 1.1.2.5 2007/08/21 21:28:45 shadow Exp $");
  
  #if !defined(AFS_NONFSTRANS) || defined(AFS_AIX_IAUTH_ENV)
  #include <linux/module.h> /* early to avoid printf->printk mapping */
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
  #include "nfsclient.h"
--- 15,25 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_nfssrv.c,v 1.1.2.6 2007/10/24 15:45:04 shadow Exp $");
  
  #if !defined(AFS_NONFSTRANS) || defined(AFS_AIX_IAUTH_ENV)
  #include <linux/module.h> /* early to avoid printf->printk mapping */
+ #include <linux/fs.h>
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
  #include "nfsclient.h"
***************
*** 96,101 ****
--- 97,103 ----
      struct nfs_server_thread *ns;
      struct afs_exporter *outexp;
      struct AFS_UCRED *credp;
+     struct sockaddr_in *addr;
      int code;
  
      code = afs_orig_authtab[rqstp->rq_authop->flavour]->accept(rqstp, authp);
***************
*** 109,119 ****
  	/* XXX maybe we should fail this with rpc_system_err? */
  	return SVC_OK;
      }
  
      ns->active		= 1;
      ns->flavor		= rqstp->rq_authop->flavour;
      ns->code		= EACCES;
!     ns->client_addr	= rqstp->rq_addr;
      ns->client_addrlen	= rqstp->rq_addrlen;
      ns->client_uid	= rqstp->rq_cred.cr_uid;
      ns->client_gid	= rqstp->rq_cred.cr_gid;
--- 111,126 ----
  	/* XXX maybe we should fail this with rpc_system_err? */
  	return SVC_OK;
      }
+ #if HAVE_SVC_ADDR_IN
+     addr = svc_addr_in(rqstp);
+ #else
+     addr = &rqstp->rq_addr;
+ #endif
  
      ns->active		= 1;
      ns->flavor		= rqstp->rq_authop->flavour;
      ns->code		= EACCES;
!     ns->client_addr	= *addr;
      ns->client_addrlen	= rqstp->rq_addrlen;
      ns->client_uid	= rqstp->rq_cred.cr_uid;
      ns->client_gid	= rqstp->rq_cred.cr_gid;
***************
*** 126,135 ****
      else
  	ns->client_g1	= -1;
  
!     /* NB: Don't check the length; it's not always filled in! */
!     if (rqstp->rq_addr.sin_family != AF_INET) {
  	printk("afs: NFS request from non-IPv4 client (family %d len %d)\n",
! 	       rqstp->rq_addr.sin_family, rqstp->rq_addrlen);
  	goto done;
      }
  
--- 133,141 ----
      else
  	ns->client_g1	= -1;
  
!     if (addr->sin_family != AF_INET) {
  	printk("afs: NFS request from non-IPv4 client (family %d len %d)\n",
! 	       addr->sin_family, rqstp->rq_addrlen);
  	goto done;
      }
  
***************
*** 143,149 ****
       * clients to afs_nobody */
      if (credp->cr_uid == -1)
  	credp->cr_uid = -2;
!     code = afs_nfsclient_reqhandler(0, &credp, rqstp->rq_addr.sin_addr.s_addr,
  				    &ns->uid, &outexp);
      if (!code && outexp) EXP_RELE(outexp);
      if (!code) ns->code = 0;
--- 149,155 ----
       * clients to afs_nobody */
      if (credp->cr_uid == -1)
  	credp->cr_uid = -2;
!     code = afs_nfsclient_reqhandler(0, &credp, addr->sin_addr.s_addr,
  				    &ns->uid, &outexp);
      if (!code && outexp) EXP_RELE(outexp);
      if (!code) ns->code = 0;
Index: openafs/src/afs/LINUX/osi_vfsops.c
diff -c openafs/src/afs/LINUX/osi_vfsops.c:1.42.4.19 openafs/src/afs/LINUX/osi_vfsops.c:1.42.4.20
*** openafs/src/afs/LINUX/osi_vfsops.c:1.42.4.19	Thu Oct  4 23:10:00 2007
--- openafs/src/afs/LINUX/osi_vfsops.c	Tue Nov  6 23:04:20 2007
***************
*** 16,22 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_vfsops.c,v 1.42.4.19 2007/10/05 03:10:00 shadow Exp $");
  
  #define __NO_VERSION__		/* don't define kernel_version in module.h */
  #include <linux/module.h> /* early to avoid printf->printk mapping */
--- 16,22 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_vfsops.c,v 1.42.4.20 2007/11/07 04:04:20 shadow Exp $");
  
  #define __NO_VERSION__		/* don't define kernel_version in module.h */
  #include <linux/module.h> /* early to avoid printf->printk mapping */
***************
*** 538,543 ****
--- 538,544 ----
      ip->i_size = vp->va_size;
  #if defined(AFS_LINUX26_ENV)
      ip->i_atime.tv_sec = vp->va_atime.tv_sec;
+     ip->i_atime.tv_nsec = 0;
      ip->i_mtime.tv_sec = vp->va_mtime.tv_sec;
      /* Set the mtime nanoseconds to the sysname generation number.
       * This convinces NFS clients that all directories have changed
***************
*** 545,550 ****
--- 546,552 ----
       */
      ip->i_mtime.tv_nsec = afs_sysnamegen;
      ip->i_ctime.tv_sec = vp->va_ctime.tv_sec;
+     ip->i_ctime.tv_nsec = 0;
  #else
      ip->i_atime = vp->va_atime.tv_sec;
      ip->i_mtime = vp->va_mtime.tv_sec;
Index: openafs/src/afs/LINUX/osi_vnodeops.c
diff -c openafs/src/afs/LINUX/osi_vnodeops.c:1.126.2.18 openafs/src/afs/LINUX/osi_vnodeops.c:1.126.2.20
*** openafs/src/afs/LINUX/osi_vnodeops.c:1.126.2.18	Thu Oct  4 23:10:00 2007
--- openafs/src/afs/LINUX/osi_vnodeops.c	Tue Nov  6 13:32:39 2007
***************
*** 22,28 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.126.2.18 2007/10/05 03:10:00 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
--- 22,28 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.126.2.20 2007/11/06 18:32:39 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
***************
*** 661,666 ****
--- 661,670 ----
  #if defined(AFS_LINUX26_ENV) && defined(STRUCT_FILE_OPERATIONS_HAS_SENDFILE)
    .sendfile =   generic_file_sendfile,
  #endif
+ #if defined(AFS_LINUX26_ENV) && defined(STRUCT_FILE_OPERATIONS_HAS_SPLICE)
+   .splice_write = generic_file_splice_write,
+   .splice_read = generic_file_splice_read,
+ #endif
    .release =	afs_linux_release,
    .fsync =	afs_linux_fsync,
    .lock =	afs_linux_lock,
***************
*** 896,901 ****
--- 900,914 ----
      AFS_GLOCK();
      (void) afs_InactiveVCache(vcp, NULL);
      AFS_GUNLOCK();
+ #ifdef DCACHE_NFSFS_RENAMED
+ #ifdef AFS_LINUX26_ENV
+     spin_lock(&dp->d_lock);
+ #endif
+     dp->d_flags &= ~DCACHE_NFSFS_RENAMED;   
+ #ifdef AFS_LINUX26_ENV
+     spin_unlock(&dp->d_lock);
+ #endif
+ #endif
  
      iput(ip);
  }
***************
*** 1131,1136 ****
--- 1144,1158 ----
              }
              tvc->uncred = credp;
  	    tvc->states |= CUnlinked;
+ #ifdef DCACHE_NFSFS_RENAMED
+ #ifdef AFS_LINUX26_ENV
+ 	    spin_lock(&dp->d_lock);
+ #endif
+ 	    dp->d_flags |= DCACHE_NFSFS_RENAMED;   
+ #ifdef AFS_LINUX26_ENV
+ 	    spin_unlock(&dp->d_lock);
+ #endif
+ #endif
  	} else {
  	    osi_FreeSmallSpace(__name);	
  	}
Index: openafs/src/afs/SOLARIS/osi_vfsops.c
diff -c openafs/src/afs/SOLARIS/osi_vfsops.c:1.18.14.3 openafs/src/afs/SOLARIS/osi_vfsops.c:1.18.14.4
*** openafs/src/afs/SOLARIS/osi_vfsops.c:1.18.14.3	Tue Jan  2 02:34:46 2007
--- openafs/src/afs/SOLARIS/osi_vfsops.c	Thu Nov  1 12:57:37 2007
***************
*** 14,26 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/SOLARIS/osi_vfsops.c,v 1.18.14.3 2007/01/02 07:34:46 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
  #include "afs/afs_stats.h"	/* statistics stuff */
  #include "h/modctl.h"
  #include "h/syscall.h"
  #include <sys/kobj.h>
  
  
--- 14,29 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/SOLARIS/osi_vfsops.c,v 1.18.14.4 2007/11/01 16:57:37 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
  #include "afs/afs_stats.h"	/* statistics stuff */
  #include "h/modctl.h"
  #include "h/syscall.h"
+ #if defined(AFS_SUN511_ENV)
+ #include <sys/vfs_opreg.h>
+ #endif
  #include <sys/kobj.h>
  
  
***************
*** 245,251 ****
  }
  
  
! #ifdef AFS_SUN510_ENV
  /* The following list must always be NULL-terminated */
  const fs_operation_def_t afs_vfsops_template[] = {
      VFSNAME_MOUNT,		afs_mount,
--- 248,268 ----
  }
  
  
! #if defined(AFS_SUN511_ENV)
! /* The following list must always be NULL-terminated */
! static const fs_operation_def_t afs_vfsops_template[] = {
!     VFSNAME_MOUNT,		{ .vfs_mount = afs_mount },
!     VFSNAME_UNMOUNT,		{ .vfs_unmount = afs_unmount },
!     VFSNAME_ROOT,		{ .vfs_root = afs_root },
!     VFSNAME_STATVFS,		{ .vfs_statvfs = afs_statvfs },
!     VFSNAME_SYNC,		{ .vfs_sync = afs_sync },
!     VFSNAME_VGET,		{ .vfs_vget = afs_vget },
!     VFSNAME_MOUNTROOT,  	{ .vfs_mountroot = afs_mountroot },
!     VFSNAME_FREEVFS,		{ .vfs_freevfs = fs_freevfs },
!     NULL,			NULL
! };
! struct vfsops *afs_vfsopsp;
! #elif defined(AFS_SUN510_ENV)
  /* The following list must always be NULL-terminated */
  const fs_operation_def_t afs_vfsops_template[] = {
      VFSNAME_MOUNT,		afs_mount,
***************
*** 256,262 ****
      VFSNAME_VGET,		afs_vget,
      VFSNAME_MOUNTROOT,  	afs_mountroot,
      VFSNAME_FREEVFS,		fs_freevfs,
!     NULL,                     NULL
  };
  struct vfsops *afs_vfsopsp;
  #else
--- 273,279 ----
      VFSNAME_VGET,		afs_vget,
      VFSNAME_MOUNTROOT,  	afs_mountroot,
      VFSNAME_FREEVFS,		fs_freevfs,
!     NULL,			NULL
  };
  struct vfsops *afs_vfsopsp;
  #else
Index: openafs/src/afs/SOLARIS/osi_vnodeops.c
diff -c openafs/src/afs/SOLARIS/osi_vnodeops.c:1.28.2.2 openafs/src/afs/SOLARIS/osi_vnodeops.c:1.28.2.3
*** openafs/src/afs/SOLARIS/osi_vnodeops.c:1.28.2.2	Thu Dec 28 17:28:10 2006
--- openafs/src/afs/SOLARIS/osi_vnodeops.c	Thu Nov  1 12:57:37 2007
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/SOLARIS/osi_vnodeops.c,v 1.28.2.2 2006/12/28 22:28:10 shadow Exp $");
  
  /*
   * SOLARIS/osi_vnodeops.c
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/SOLARIS/osi_vnodeops.c,v 1.28.2.3 2007/11/01 16:57:37 shadow Exp $");
  
  /*
   * SOLARIS/osi_vnodeops.c
***************
*** 47,52 ****
--- 47,55 ----
  #include <vm/seg_map.h>
  #include <vm/seg_vn.h>
  #include <vm/rm.h>
+ #if defined(AFS_SUN511_ENV)
+ #include <sys/vfs_opreg.h>
+ #endif
  #include <sys/modctl.h>
  #include <sys/syscall.h>
  #include <sys/debug.h>
***************
*** 1441,1447 ****
  extern int afs_lockctl();
  extern void gafs_inactive();
  
! #ifdef AFS_SUN510_ENV
  /* The following list must always be NULL-terminated */
  const fs_operation_def_t afs_vnodeops_template[] = {
      VOPNAME_OPEN,		gafs_open,
--- 1444,1499 ----
  extern int afs_lockctl();
  extern void gafs_inactive();
  
! #if defined(AFS_SUN511_ENV)
! /* The following list must always be NULL-terminated */
! const fs_operation_def_t afs_vnodeops_template[] = {
!     VOPNAME_OPEN,		{ .vop_open = gafs_open },
!     VOPNAME_CLOSE,		{ .vop_close = gafs_close },
!     VOPNAME_READ,		{ .vop_read = afs_vmread },
!     VOPNAME_WRITE,		{ .vop_write = afs_vmwrite },
!     VOPNAME_IOCTL,		{ .vop_ioctl = afs_ioctl },
!     VOPNAME_SETFL,		{ .vop_setfl = fs_setfl },
!     VOPNAME_GETATTR,		{ .vop_getattr = gafs_getattr },
!     VOPNAME_SETATTR,		{ .vop_setattr = gafs_setattr },
!     VOPNAME_ACCESS,		{ .vop_access = gafs_access },
!     VOPNAME_LOOKUP,		{ .vop_lookup = gafs_lookup },
!     VOPNAME_CREATE,		{ .vop_create = gafs_create },
!     VOPNAME_REMOVE,		{ .vop_remove = gafs_remove },
!     VOPNAME_LINK,		{ .vop_link = gafs_link },
!     VOPNAME_RENAME,		{ .vop_rename = gafs_rename },
!     VOPNAME_MKDIR,		{ .vop_mkdir = gafs_mkdir },
!     VOPNAME_RMDIR,		{ .vop_rmdir = gafs_rmdir },
!     VOPNAME_READDIR,		{ .vop_readdir = gafs_readdir },
!     VOPNAME_SYMLINK,		{ .vop_symlink = gafs_symlink },   
!     VOPNAME_READLINK,		{ .vop_readlink = gafs_readlink },
!     VOPNAME_FSYNC,		{ .vop_fsync = gafs_fsync },
!     VOPNAME_INACTIVE,		{ .vop_inactive = gafs_inactive },
!     VOPNAME_FID,		{ .vop_fid = gafs_fid },
!     VOPNAME_RWLOCK,		{ .vop_rwlock = afs_rwlock },
!     VOPNAME_RWUNLOCK,		{ .vop_rwunlock = afs_rwunlock },
!     VOPNAME_SEEK,		{ .vop_seek = afs_seek },
!     VOPNAME_CMP,		{ .vop_cmp = afs_cmp },
!     VOPNAME_FRLOCK,		{ .vop_frlock = afs_frlock },
!     VOPNAME_SPACE,		{ .vop_space = afs_space },
!     VOPNAME_REALVP,		{ .vop_realvp = afs_realvp },
!     VOPNAME_GETPAGE,		{ .vop_getpage = afs_getpage },
!     VOPNAME_PUTPAGE,		{ .vop_putpage = afs_putpage },
!     VOPNAME_MAP,		{ .vop_map = afs_map },
!     VOPNAME_ADDMAP,		{ .vop_addmap = afs_addmap },
!     VOPNAME_DELMAP,		{ .vop_delmap = afs_delmap },
!     VOPNAME_POLL,		{ .vop_poll = fs_poll },
!     VOPNAME_PATHCONF,		{ .vop_pathconf = afs_pathconf },
!     VOPNAME_PAGEIO,		{ .vop_pageio = afs_pageio },
!     VOPNAME_DUMP,		{ .vop_dump = afs_dump },
!     VOPNAME_DUMPCTL,		{ .vop_dumpctl = afs_dumpctl },   
!     VOPNAME_DISPOSE,		{ .vop_dispose = afs_dispose },
!     VOPNAME_GETSECATTR,		{ .vop_getsecattr = afs_getsecattr },
!     VOPNAME_SETSECATTR, 	{ .vop_setsecattr = afs_setsecattr },
!     VOPNAME_SHRLOCK,		{ .vop_shrlock = fs_shrlock },
!     NULL,			NULL
! };
! vnodeops_t *afs_ops;
! #elif defined(AFS_SUN510_ENV)
  /* The following list must always be NULL-terminated */
  const fs_operation_def_t afs_vnodeops_template[] = {
      VOPNAME_OPEN,		gafs_open,
Index: openafs/src/afs/UKERNEL/afs_usrops.c
diff -c openafs/src/afs/UKERNEL/afs_usrops.c:1.30.6.4 openafs/src/afs/UKERNEL/afs_usrops.c:1.30.6.5
*** openafs/src/afs/UKERNEL/afs_usrops.c:1.30.6.4	Thu Nov  9 23:05:31 2006
--- openafs/src/afs/UKERNEL/afs_usrops.c	Wed Oct 31 18:31:57 2007
***************
*** 15,21 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/UKERNEL/afs_usrops.c,v 1.30.6.4 2006/11/10 04:05:31 shadow Exp $");
  
  
  #ifdef	UKERNEL
--- 15,21 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/UKERNEL/afs_usrops.c,v 1.30.6.5 2007/10/31 22:31:57 shadow Exp $");
  
  
  #ifdef	UKERNEL
***************
*** 1389,1396 ****
      return (0);
  }
  
! static
! ConfigCell(register struct afsconf_cell *aci, char *arock,
  	   struct afsconf_dir *adir)
  {
      register int isHomeCell;
--- 1389,1396 ----
      return (0);
  }
  
! static int
! ConfigCell(register struct afsconf_cell *aci, void *arock,
  	   struct afsconf_dir *adir)
  {
      register int isHomeCell;
***************
*** 1420,1429 ****
  }
  
  static int
! ConfigCellAlias(aca, arock, adir)
! 	struct afsconf_cellalias *aca;
! 	char *arock;
! 	struct afsconf_dir *adir;
  {
  	call_syscall(AFSOP_ADDCELLALIAS, (long)aca->aliasName, 
  		     (long)aca->realName, 0, 0, 0);
--- 1420,1426 ----
  }
  
  static int
! ConfigCellAlias(struct afsconf_cellalias *aca, void *arock, struct afsconf_dir *adir)
  {
  	call_syscall(AFSOP_ADDCELLALIAS, (long)aca->aliasName, 
  		     (long)aca->realName, 0, 0, 0);
Index: openafs/src/afsd/afsd.c
diff -c openafs/src/afsd/afsd.c:1.60.2.7 openafs/src/afsd/afsd.c:1.60.2.10
*** openafs/src/afsd/afsd.c:1.60.2.7	Wed Oct 10 13:01:44 2007
--- openafs/src/afsd/afsd.c	Wed Oct 31 18:31:59 2007
***************
*** 58,64 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsd/afsd.c,v 1.60.2.7 2007/10/10 17:01:44 shadow Exp $");
  
  #define VFS 1
  
--- 58,64 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsd/afsd.c,v 1.60.2.10 2007/10/31 22:31:59 shadow Exp $");
  
  #define VFS 1
  
***************
*** 430,436 ****
  
      CFRunLoopRemoveSource(CFRunLoopGetCurrent(), source, kCFRunLoopDefaultMode);
      CFRelease (source);
!     IODeregisterForSystemPower(iterator);
      IOServiceClose(root_port);
      IONotificationPortDestroy(notify);
  
--- 430,436 ----
  
      CFRunLoopRemoveSource(CFRunLoopGetCurrent(), source, kCFRunLoopDefaultMode);
      CFRelease (source);
!     IODeregisterForSystemPower(&iterator);
      IOServiceClose(root_port);
      IONotificationPortDestroy(notify);
  
***************
*** 1391,1398 ****
      return doSweepAFSCache(vFilesFound, cacheBaseDir, -2, maxDir);
  }
  
! static
! ConfigCell(struct afsconf_cell *aci, char *arock, struct afsconf_dir *adir)
  {
      int isHomeCell;
      int i, code;
--- 1391,1398 ----
      return doSweepAFSCache(vFilesFound, cacheBaseDir, -2, maxDir);
  }
  
! static int
! ConfigCell(struct afsconf_cell *aci, void *arock, struct afsconf_dir *adir)
  {
      int isHomeCell;
      int i, code;
***************
*** 1424,1430 ****
  
  static
  ConfigCellAlias(struct afsconf_cellalias *aca,
! 		char *arock, struct afsconf_dir *adir)
  {
      /* push the alias into the kernel */
      call_syscall(AFSOP_ADDCELLALIAS, aca->aliasName, aca->realName);
--- 1424,1430 ----
  
  static
  ConfigCellAlias(struct afsconf_cellalias *aca,
! 		void *arock, struct afsconf_dir *adir)
  {
      /* push the alias into the kernel */
      call_syscall(AFSOP_ADDCELLALIAS, aca->aliasName, aca->realName);
***************
*** 1517,1523 ****
  #endif
  #endif
  
! mainproc(struct cmd_syndesc *as, char *arock)
  {
      static char rn[] = "afsd";	/*Name of this routine */
      afs_int32 code;		/*Result of fork() */
--- 1517,1523 ----
  #endif
  #endif
  
! mainproc(struct cmd_syndesc *as, void *arock)
  {
      static char rn[] = "afsd";	/*Name of this routine */
      afs_int32 code;		/*Result of fork() */
Index: openafs/src/afsd/vsys.c
diff -c openafs/src/afsd/vsys.c:1.6 openafs/src/afsd/vsys.c:1.6.14.1
*** openafs/src/afsd/vsys.c:1.6	Tue Jul 15 19:14:31 2003
--- openafs/src/afsd/vsys.c	Tue Oct 30 11:16:33 2007
***************
*** 12,30 ****
  #include <stdio.h>
  #include <stdlib.h>
  #include <ctype.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsd/vsys.c,v 1.6 2003/07/15 23:14:31 shadow Exp $");
  
  #include <afs/afs_args.h>
  
--- 12,24 ----
  #include <stdio.h>
  #include <stdlib.h>
  #include <ctype.h>
  #include <string.h>
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsd/vsys.c,v 1.6.14.1 2007/10/30 15:16:33 shadow Exp $");
  
  #include <afs/afs_args.h>
  
Index: openafs/src/afsmonitor/afsmon-output.c
diff -c openafs/src/afsmonitor/afsmon-output.c:1.10 openafs/src/afsmonitor/afsmon-output.c:1.10.2.1
*** openafs/src/afsmonitor/afsmon-output.c:1.10	Tue Apr  4 16:51:13 2006
--- openafs/src/afsmonitor/afsmon-output.c	Tue Oct 30 11:16:36 2007
***************
*** 19,35 ****
  #include <time.h>
  #include <afsconfig.h>
  #include <afs/param.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsmonitor/afsmon-output.c,v 1.10 2006/04/04 20:51:13 shadow Exp $");
  
  #include <afs/xstat_fs.h>
  #include <afs/xstat_cm.h>
--- 19,28 ----
  #include <time.h>
  #include <afsconfig.h>
  #include <afs/param.h>
  #include <string.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsmonitor/afsmon-output.c,v 1.10.2.1 2007/10/30 15:16:36 shadow Exp $");
  
  #include <afs/xstat_fs.h>
  #include <afs/xstat_cm.h>
Index: openafs/src/afsmonitor/afsmon-win.c
diff -c openafs/src/afsmonitor/afsmon-win.c:1.10 openafs/src/afsmonitor/afsmon-win.c:1.10.14.1
*** openafs/src/afsmonitor/afsmon-win.c:1.10	Tue Jul 15 19:14:32 2003
--- openafs/src/afsmonitor/afsmon-win.c	Tue Oct 30 11:16:36 2007
***************
*** 16,30 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsmonitor/afsmon-win.c,v 1.10 2003/07/15 23:14:32 shadow Exp $");
  
  #include <stdio.h>
  #include <signal.h>
  #include <math.h>
  #include <cmd.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #endif
  #undef IN
  #include <time.h>
  
--- 16,28 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsmonitor/afsmon-win.c,v 1.10.14.1 2007/10/30 15:16:36 shadow Exp $");
  
  #include <stdio.h>
  #include <signal.h>
  #include <math.h>
  #include <cmd.h>
  #include <string.h>
  #undef IN
  #include <time.h>
  
Index: openafs/src/afsmonitor/afsmonitor.c
diff -c openafs/src/afsmonitor/afsmonitor.c:1.21 openafs/src/afsmonitor/afsmonitor.c:1.21.2.1
*** openafs/src/afsmonitor/afsmonitor.c:1.21	Thu Mar  9 01:34:29 2006
--- openafs/src/afsmonitor/afsmonitor.c	Wed Oct 31 00:09:22 2007
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsmonitor/afsmonitor.c,v 1.21 2006/03/09 06:34:29 shadow Exp $");
  
  #include <stdio.h>
  #include <math.h>
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsmonitor/afsmonitor.c,v 1.21.2.1 2007/10/31 04:09:22 shadow Exp $");
  
  #include <stdio.h>
  #include <math.h>
***************
*** 3880,3887 ****
   *----------------------------------------------------------------------*/
  
  int
! afsmonInit(as)
!      struct cmd_syndesc *as;
  {				/* afsmonInit() */
  
      static char rn[] = "afsmonInit";	/* Routine name */
--- 3880,3886 ----
   *----------------------------------------------------------------------*/
  
  int
! afsmonInit(struct cmd_syndesc *as, void *arock)
  {				/* afsmonInit() */
  
      static char rn[] = "afsmonInit";	/* Routine name */
***************
*** 4185,4191 ****
      /*
       * Set up the commands we understand.
       */
!     ts = cmd_CreateSyntax("initcmd", afsmonInit, 0, "initialize the program");
      cmd_AddParm(ts, "-config", CMD_SINGLE, CMD_OPTIONAL,
  		"configuration file");
      cmd_AddParm(ts, "-frequency", CMD_SINGLE, CMD_OPTIONAL,
--- 4184,4190 ----
      /*
       * Set up the commands we understand.
       */
!     ts = cmd_CreateSyntax("initcmd", afsmonInit, NULL, "initialize the program");
      cmd_AddParm(ts, "-config", CMD_SINGLE, CMD_OPTIONAL,
  		"configuration file");
      cmd_AddParm(ts, "-frequency", CMD_SINGLE, CMD_OPTIONAL,
Index: openafs/src/afsweb/weblog.c
diff -c openafs/src/afsweb/weblog.c:1.8.14.1 openafs/src/afsweb/weblog.c:1.8.14.2
*** openafs/src/afsweb/weblog.c:1.8.14.1	Mon Jul  3 15:07:13 2006
--- openafs/src/afsweb/weblog.c	Wed Oct 31 00:09:22 2007
***************
*** 25,31 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsweb/weblog.c,v 1.8.14.1 2006/07/03 19:07:13 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 25,31 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsweb/weblog.c,v 1.8.14.2 2007/10/31 04:09:22 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 123,129 ****
      zero_argc = argc;
      zero_argv = argv;
  
!     ts = cmd_CreateSyntax(NULL, CommandProc, 0,
  			  "obtain Kerberos authentication for web servers");
  
  /* define the command line arguments */
--- 123,129 ----
      zero_argc = argc;
      zero_argv = argv;
  
!     ts = cmd_CreateSyntax(NULL, CommandProc, NULL,
  			  "obtain Kerberos authentication for web servers");
  
  /* define the command line arguments */
***************
*** 803,812 ****
   * arrive through a pipe from the httpds, authenticates the user and
   * returns a token (or a failure message) over the pipe
   */
! CommandProc(as, arock)
!      char *arock;
!      struct cmd_syndesc *as;
! 
  {
      char name[MAXKTCNAMELEN];
      char cell[MAXKTCREALMLEN];
--- 803,810 ----
   * arrive through a pipe from the httpds, authenticates the user and
   * returns a token (or a failure message) over the pipe
   */
! static int
! CommandProc(struct cmd_syndesc *as, void *arock)
  {
      char name[MAXKTCNAMELEN];
      char cell[MAXKTCREALMLEN];
Index: openafs/src/aklog/Makefile.in
diff -c openafs/src/aklog/Makefile.in:1.10.2.2 openafs/src/aklog/Makefile.in:1.10.2.3
*** openafs/src/aklog/Makefile.in:1.10.2.2	Tue Apr 10 14:39:49 2007
--- openafs/src/aklog/Makefile.in	Thu Nov  1 12:51:47 2007
***************
*** 16,22 ****
  SRCS=	aklog.c aklog_main.c  krb_util.c linked_list.c
  OBJS=   aklog.o aklog_main.o krb_util.o linked_list.o
  
! all: aklog asetkey
  
  aklog:	${OBJS} ${AFSLIBS}
  	${CC} -o $@ ${CFLAGS} ${OBJS} ${AKLIBS} ${AFSLIBS} ${XLIBS}
--- 16,22 ----
  SRCS=	aklog.c aklog_main.c  krb_util.c linked_list.c
  OBJS=   aklog.o aklog_main.o krb_util.o linked_list.o
  
! all: aklog asetkey klog
  
  aklog:	${OBJS} ${AFSLIBS}
  	${CC} -o $@ ${CFLAGS} ${OBJS} ${AKLIBS} ${AFSLIBS} ${XLIBS}
***************
*** 24,29 ****
--- 24,33 ----
  asetkey: asetkey.o ${AFSLIBS}
  	${CC} -o $@ ${CFLAGS} asetkey.o ${AKLIBS} ${AFSLIBS} ${XLIBS}
  
+ klog: klog.o skipwrap.o ${AFSLIBS}
+ 	${CC} -o $@ ${CFLAGS} skipwrap.o klog.o ${AKLIBS} ${AFSLIBS} \
+ 		${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/librx.a ${XLIBS}
+ 
  #
  # Installation targets
  #
***************
*** 49,55 ****
  # Misc. targets
  #
  clean:
! 	$(RM) -f *.o ${OBJS} aklog asetkey
  
  include ../config/Makefile.version
  
--- 53,59 ----
  # Misc. targets
  #
  clean:
! 	$(RM) -f *.o ${OBJS} aklog asetkey klog
  
  include ../config/Makefile.version
  
Index: openafs/src/aklog/aklog_main.c
diff -c openafs/src/aklog/aklog_main.c:1.12.2.8 openafs/src/aklog/aklog_main.c:1.12.2.9
*** openafs/src/aklog/aklog_main.c:1.12.2.8	Thu Sep 20 00:53:31 2007
--- openafs/src/aklog/aklog_main.c	Mon Nov  5 17:10:48 2007
***************
*** 1,5 ****
  /* 
!  * $Id: aklog_main.c,v 1.12.2.8 2007/09/20 04:53:31 shadow Exp $
   *
   * Copyright 1990,1991 by the Massachusetts Institute of Technology
   * For distribution and copying rights, see the file "mit-copyright.h"
--- 1,5 ----
  /* 
!  * $Id: aklog_main.c,v 1.12.2.9 2007/11/05 22:10:48 shadow Exp $
   *
   * Copyright 1990,1991 by the Massachusetts Institute of Technology
   * For distribution and copying rights, see the file "mit-copyright.h"
***************
*** 36,42 ****
  
  #if !defined(lint) && !defined(SABER)
  static char *rcsid =
! 	"$Id: aklog_main.c,v 1.12.2.8 2007/09/20 04:53:31 shadow Exp $";
  #endif /* lint || SABER */
  
  #include <afsconfig.h>
--- 36,42 ----
  
  #if !defined(lint) && !defined(SABER)
  static char *rcsid =
! 	"$Id: aklog_main.c,v 1.12.2.9 2007/11/05 22:10:48 shadow Exp $";
  #endif /* lint || SABER */
  
  #include <afsconfig.h>
***************
*** 198,204 ****
  #error "Must have either krb5_princ_size or krb5_principal_get_comp_string"
  #endif
  
! #if !defined(HAVE_KRB5_ENCRYPT_TKT_PART) && defined(HAVE_ENCODE_KRB5_ENC_TKT_PART)
  krb5_error_code
  krb5_encrypt_tkt_part(krb5_context context,
  		      const krb5_keyblock *key,
--- 198,204 ----
  #error "Must have either krb5_princ_size or krb5_principal_get_comp_string"
  #endif
  
! #if !defined(HAVE_KRB5_ENCRYPT_TKT_PART) && defined(HAVE_ENCODE_KRB5_ENC_TKT_PART) && defined(HAVE_KRB5_C_ENCRYPT) 
  krb5_error_code
  krb5_encrypt_tkt_part(krb5_context context,
  		      const krb5_keyblock *key,
***************
*** 1700,1706 ****
  						int *paddress,
  						krb5_creds** out_creds /* out */ )
  {
! #if defined(USING_HEIMDAL) || (defined(HAVE_ENCODE_KRB5_ENC_TKT) && defined(HAVE_ENCODE_KRB5_TICKET))
      krb5_error_code code;
      krb5_keytab kt = 0;
      krb5_kt_cursor cursor[1];
--- 1700,1706 ----
  						int *paddress,
  						krb5_creds** out_creds /* out */ )
  {
! #if defined(USING_HEIMDAL) || (defined(HAVE_ENCODE_KRB5_ENC_TKT) && defined(HAVE_ENCODE_KRB5_TICKET) && defined(HAVE_KRB5_C_ENCRYPT))
      krb5_error_code code;
      krb5_keytab kt = 0;
      krb5_kt_cursor cursor[1];
Index: openafs/src/aklog/asetkey.c
diff -c openafs/src/aklog/asetkey.c:1.4.4.3 openafs/src/aklog/asetkey.c:1.4.4.4
*** openafs/src/aklog/asetkey.c:1.4.4.3	Tue Apr 10 14:39:49 2007
--- openafs/src/aklog/asetkey.c	Tue Oct 30 11:16:36 2007
***************
*** 1,5 ****
  /*
!  * $Id: asetkey.c,v 1.4.4.3 2007/04/10 18:39:49 shadow Exp $
   *
   * asetkey - Manipulates an AFS KeyFile
   *
--- 1,5 ----
  /*
!  * $Id: asetkey.c,v 1.4.4.4 2007/10/30 15:16:36 shadow Exp $
   *
   * asetkey - Manipulates an AFS KeyFile
   *
***************
*** 14,32 ****
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
- #ifdef HAVE_STDLIB_H
  #include <stdlib.h>
- #endif
  #ifdef HAVE_MEMORY_H
  #include <memory.h>
  #endif /* HAVE_MEMORY_H */
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else /* HAVE_STRING_H */
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif /* HAVE_STRINGS_H */
- #endif /* HAVE_STRING_H */
  
  #include <afs/stds.h>
  #include <krb5.h>
--- 14,24 ----
Index: openafs/src/aklog/klog.c
diff -c /dev/null openafs/src/aklog/klog.c:1.3.2.3
*** /dev/null	Wed Nov  7 00:06:18 2007
--- openafs/src/aklog/klog.c	Mon Nov  5 16:44:23 2007
***************
*** 0 ****
--- 1,738 ----
+ /*
+  * Copyright 2000, International Business Machines Corporation and others.
+  * All Rights Reserved.
+  * 
+  * This software has been released under the terms of the IBM Public
+  * License.  For details, see the LICENSE file in the top-level source
+  * directory or online at http://www.openafs.org/dl/license10.html
+  */
+ 
+ #include <afsconfig.h>
+ #include <afs/param.h>
+ 
+ #include <afs/stds.h>
+ #include <sys/types.h>
+ #include <rx/xdr.h>
+ #ifdef	AFS_AIX32_ENV
+ #include <signal.h>
+ #endif
+ #ifdef HAVE_STRING_H
+ #include <string.h>
+ #else
+ #ifdef HAVE_STRINGS_H
+ #include <strings.h>
+ #endif
+ #endif
+ #include <errno.h>
+ 
+ #include <lock.h>
+ #include <ubik.h>
+ 
+ #include <stdio.h>
+ #include <pwd.h>
+ #if 0
+ #include <afs/com_err.h>
+ #endif
+ #include <afs/auth.h>
+ #include <afs/afsutil.h>
+ #include <afs/cellconfig.h>
+ #ifdef AFS_RXK5
+ #include "rxk5_utilafs.h"
+ #endif
+ #include <afs/ptclient.h>
+ #include <afs/cmd.h>
+ #include <krb5.h>
+ 
+ #ifdef HAVE_KRB5_CREDS_KEYBLOCK
+ #define USING_MIT 1
+ #endif
+ #ifdef HAVE_KRB5_CREDS_SESSION
+ #define USING_HEIMDAL 1
+ #endif
+ 
+ #ifndef USING_HEIMDAL
+ extern krb5_cc_ops krb5_mcc_ops;
+ #endif
+ 
+ #include "assert.h"
+ 
+ 
+ /* This code borrowed heavily from the previous version of log.  Here is the
+    intro comment for that program: */
+ 
+ /*
+ 	log -- tell the Andrew Cache Manager your password
+ 	5 June 1985
+ 	modified
+ 	February 1986
+ 
+ 	Further modified in August 1987 to understand cell IDs.
+ 
+ 	Further modified in October 2006 to understand kerberos 5.
+  */
+ 
+ /* Current Usage:
+      klog [principal [password]] [-t] [-c cellname] [-k <k5realm>]
+ 
+      where:
+        principal is of the form 'name' or 'name@cell' which provides the
+ 	  cellname.  See the -c option below.
+        password is the user's password.  This form is NOT recommended for
+ 	  interactive users.
+        -t advises klog to write a Kerberos style ticket file in /tmp.
+        -c identifies cellname as the cell in which authentication is to take
+ 	  place.
+        -k identifies an alternate kerberos realm to use provide
+ 	  authentication services for the cell.
+  */
+ 
+ #define KLOGEXIT(code) rx_Finalize(); \
+                        (exit(!!code))
+ extern int CommandProc(struct cmd_syndesc *as, char *arock);
+ 
+ static int zero_argc;
+ static char **zero_argv;
+ 
+ static krb5_context k5context;
+ static struct afsconf_dir *tdir;
+ static int always_evil = 2;	/* gcc optimizes 0 into bss.  fools. */
+ 
+ int
+ main(int argc, char *argv[])
+ {
+     struct cmd_syndesc *ts;
+     afs_int32 code;
+ #ifdef	AFS_AIX32_ENV
+     /*
+      * The following signal action for AIX is necessary so that in case of a 
+      * crash (i.e. core is generated) we can include the user's data section 
+      * in the core dump. Unfortunately, by default, only a partial core is
+      * generated which, in many cases, isn't too useful.
+      */
+     struct sigaction nsa;
+ 
+     sigemptyset(&nsa.sa_mask);
+     nsa.sa_handler = SIG_DFL;
+     nsa.sa_flags = SA_FULLDUMP;
+     sigaction(SIGABRT, &nsa, NULL);
+     sigaction(SIGSEGV, &nsa, NULL);
+ #endif
+     zero_argc = argc;
+     zero_argv = argv;
+ 
+     ts = cmd_CreateSyntax(NULL, CommandProc, 0,
+ 			  "obtain Kerberos authentication");
+ 
+ #define aXFLAG 0
+ #define aPRINCIPAL 1
+ #define aPASSWORD 2
+ #define aCELL 3
+ #define aKRBREALM 4
+ #define aPIPE 5
+ #define aSILENT 6
+ #define aLIFETIME 7
+ #define aSETPAG 8
+ #define aTMP 9
+ #define aNOPRDB 10
+ #define aUNWRAP 11
+ #define aK5 12
+ #define aK4 13
+ 
+     cmd_AddParm(ts, "-x", CMD_FLAG, CMD_OPTIONAL|CMD_HIDDEN, 0);
+     cmd_Seek(ts, aPRINCIPAL);
+     cmd_AddParm(ts, "-principal", CMD_SINGLE, CMD_OPTIONAL, "user name");
+     cmd_AddParm(ts, "-password", CMD_SINGLE, CMD_OPTIONAL, "user's password");
+     cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell name");
+     cmd_AddParm(ts, "-k", CMD_SINGLE, CMD_OPTIONAL, "krb5 realm");
+     cmd_AddParm(ts, "-pipe", CMD_FLAG, CMD_OPTIONAL,
+ 		"read password from stdin");
+     cmd_AddParm(ts, "-silent", CMD_FLAG, CMD_OPTIONAL, "silent operation");
+     cmd_AddParm(ts, "-lifetime", CMD_SINGLE, CMD_OPTIONAL,
+ 		"ticket lifetime in hh[:mm[:ss]]");
+     cmd_AddParm(ts, "-setpag", CMD_FLAG, CMD_OPTIONAL,
+ 		"Create a new setpag before authenticating");
+     cmd_AddParm(ts, "-tmp", CMD_FLAG, CMD_OPTIONAL,
+ 		"write Kerberos-style ticket file in /tmp");
+     cmd_AddParm(ts, "-noprdb", CMD_FLAG, CMD_OPTIONAL, "don't consult pt");
+     cmd_AddParm(ts, "-unwrap", CMD_FLAG, CMD_OPTIONAL, "perform 524d conversion");
+ #ifdef AFS_RXK5
+     cmd_AddParm(ts, "-k5", CMD_FLAG, CMD_OPTIONAL, "get rxk5 credentials");
+     cmd_AddParm(ts, "-k4", CMD_FLAG, CMD_OPTIONAL, "get rxkad credentials");
+ #else
+     ++ts->nParms;	/* skip -k5 */
+     cmd_AddParm(ts, "-k4", CMD_FLAG, CMD_OPTIONAL|CMD_HIDDEN, 0);
+ #endif
+ 
+     code = cmd_Dispatch(argc, argv);
+     KLOGEXIT(code);
+ }
+ 
+ static char *
+ getpipepass(void)
+ {
+     static char gpbuf[BUFSIZ];
+     /* read a password from stdin, stop on \n or eof */
+     register int i, tc;
+     memset(gpbuf, 0, sizeof(gpbuf));
+     for (i = 0; i < (sizeof(gpbuf) - 1); i++) {
+ 	tc = fgetc(stdin);
+ 	if (tc == '\n' || tc == EOF)
+ 	    break;
+ 	gpbuf[i] = tc;
+     }
+     return gpbuf;
+ }
+ 
+ void
+ silent_errors(const char *who,
+     afs_int32 code,
+     const char *fmt,
+     va_list ap)
+ {
+     /* ignore and don't print error */
+ }
+ 
+ #if defined(HAVE_KRB5_PRINC_SIZE) || defined(krb5_princ_size)
+ 
+ #define get_princ_str(c, p, n) krb5_princ_component(c, p, n)->data
+ #define get_princ_len(c, p, n) krb5_princ_component(c, p, n)->length
+ #define num_comp(c, p) (krb5_princ_size(c, p))
+ #define realm_data(c, p) krb5_princ_realm(c, p)->data
+ #define realm_len(c, p) krb5_princ_realm(c, p)->length
+ 
+ #elif defined(HAVE_KRB5_PRINCIPAL_GET_COMP_STRING)
+ 
+ #define get_princ_str(c, p, n) krb5_principal_get_comp_string(c, p, n)
+ #define get_princ_len(c, p, n) strlen(krb5_principal_get_comp_string(c, p, n))
+ #define num_comp(c, p) ((p)->name.name_string.len)
+ #define realm_data(c, p) krb5_realm_data(krb5_principal_get_realm(c, p))
+ #define realm_len(c, p) krb5_realm_length(krb5_principal_get_realm(c, p))
+ 
+ #else
+ #error "Must have either krb5_princ_size or krb5_principal_get_comp_string"
+ #endif
+ 
+ #if defined(HAVE_KRB5_CREDS_KEYBLOCK)
+ 
+ #define get_cred_keydata(c) c->keyblock.contents
+ #define get_cred_keylen(c) c->keyblock.length
+ #define get_creds_enctype(c) c->keyblock.enctype
+ 
+ #elif defined(HAVE_KRB5_CREDS_SESSION)
+ 
+ #define get_cred_keydata(c) c->session.keyvalue.data
+ #define get_cred_keylen(c) c->session.keyvalue.length
+ #define get_creds_enctype(c) c->session.keytype
+ 
+ #else
+ #error "Must have either keyblock or session member of krb5_creds"
+ #endif
+ 
+ static int
+ whoami(struct ktc_token *atoken,
+     struct afsconf_cell *cellconfig,
+     struct ktc_principal *aclient,
+     int *vicep)
+ {
+     int scIndex;
+     int code;
+     int i;
+     struct ubik_client *ptconn = 0;
+     struct rx_securityClass *sc;
+     struct rx_connection *conns[MAXSERVERS+1];
+     idlist lids[1];
+     namelist lnames[1];
+     char tempname[PR_MAXNAMELEN + 1];
+ 
+     memset(lnames, 0, sizeof *lnames);
+     memset(lids, 0, sizeof *lids);
+     scIndex = 2;
+     sc = rxkad_NewClientSecurityObject(rxkad_auth,
+ 	&atoken->sessionKey, atoken->kvno,
+ 	atoken->ticketLen, atoken->ticket);
+     for (i = 0; i < cellconfig->numServers; ++i)
+ 	conns[i] = rx_NewConnection(cellconfig->hostAddr[i].sin_addr.s_addr,
+ 		cellconfig->hostAddr[i].sin_port, PRSRV, sc, scIndex);
+     conns[i] = 0;
+     ptconn = 0;
+     if ((code = ubik_ClientInit(conns, &ptconn)))
+ 	goto Failed;
+     if (*aclient->instance)
+ 	snprintf (tempname, sizeof tempname, "%s.%s",
+ 	    aclient->name, aclient->instance);
+     else
+ 	snprintf (tempname, sizeof tempname, "%s", aclient->name);
+     lnames->namelist_len = 1;
+     lnames->namelist_val = (prname *) tempname;
+     code = ubik_PR_NameToID(ptconn, 0, lnames, lids);
+     if (lids->idlist_val) {
+ 	*vicep = *lids->idlist_val;
+     }
+ Failed:
+     if (lids->idlist_val) free(lids->idlist_val);
+     if (ptconn) ubik_ClientDestroy(ptconn);
+     return code;
+ }
+ 
+ static void
+ k5_to_k4_name(krb5_context k5context,
+     krb5_principal k5princ,
+     struct ktc_principal *ktcprinc)
+ {
+     int i;
+ 
+     switch(num_comp(k5context, k5princ)) {
+ 	default:
+ 	/* case 2: */
+ 	    i = get_princ_len(k5context, k5princ, 1);
+ 	    if (i > MAXKTCNAMELEN-1) i = MAXKTCNAMELEN-1;
+ 	    memcpy(ktcprinc->instance, get_princ_str(k5context, k5princ, 1), i);
+ 	    /* fall through */
+ 	case 1:
+ 	    i = get_princ_len(k5context, k5princ, 0);
+ 	    if (i > MAXKTCNAMELEN-1) i = MAXKTCNAMELEN-1;
+ 	    memcpy(ktcprinc->name, get_princ_str(k5context, k5princ, 0), i);
+ 	    /* fall through */
+ 	case 0:
+ 	    break;
+ 	}
+ }
+ 
+ /* save and reuse password.  This is necessary to make
+  *  "direct to service" authentication work with most
+  *  flavors of kerberos, when the afs principal has no instance.
+  */
+ struct kp_arg {
+     char **pp, *pstore;
+ };
+ krb5_error_code
+ klog_prompter(krb5_context context,
+     void *a,
+     const char *name,
+     const char *banner,
+     int num_prompts,
+     krb5_prompt prompts[])
+ {
+     krb5_error_code code;
+     int i, type;
+ #ifndef USING_HEIMDAL
+     krb5_prompt_type *types;
+ #endif
+     struct kp_arg *kparg = (struct kp_arg *) a;
+     code = krb5_prompter_posix(context, a, name, banner, num_prompts, prompts);
+     if (code) return code;
+ #ifndef USING_HEIMDAL
+     if ((types = krb5_get_prompt_types(context)))
+ #endif
+     for (i = 0; i < num_prompts; ++i) {
+ #ifdef USING_HEIMDAL
+ 	type = prompts[i].type;
+ #else
+ 	type = types[i];
+ #endif
+ #if 0
+ 	printf ("i%d t%d <%.*s>\n", i,
+ type,
+ prompts[i].reply->length,
+ prompts[i].reply->data);
+ #endif
+ 	switch(type) {
+ 	case KRB5_PROMPT_TYPE_PASSWORD:
+ 	case KRB5_PROMPT_TYPE_NEW_PASSWORD_AGAIN:
+ 	    memcpy(kparg->pstore, prompts[i].reply->data, prompts[i].reply->length);
+ 	    kparg->pstore[prompts[i].reply->length] = 0;
+ 	    *kparg->pp = kparg->pstore;
+ 	}
+     }
+     return 0;
+ }
+ 
+ int
+ CommandProc(struct cmd_syndesc *as, char *arock)
+ {
+     krb5_principal princ = 0;
+     char *cell, *pname, **hrealms, *service;
+     char service_temp[MAXKTCREALMLEN + 20];
+     char realm[MAXKTCREALMLEN];
+     char lrealm[MAXKTCREALMLEN];	/* uppercase copy of local cellname */
+     krb5_creds incred[1], mcred[1], *outcred = 0, *afscred;
+     krb5_ccache cc = 0;
+     krb5_get_init_creds_opt gic_opts[1];
+     char *tofree, *outname;
+     int code;
+     char *what;
+     int i, dosetpag, evil, noprdb, id;
+ #ifdef AFS_RXK5
+     int authtype;
+ #endif
+     krb5_data enc_part[1];
+     time_t lifetime;		/* requested ticket lifetime */
+     krb5_prompter_fct pf = NULL;
+     char *pass = 0;
+     void *pa = 0;
+     struct kp_arg klog_arg[1];
+ 
+     char passwd[BUFSIZ];
+     struct afsconf_cell cellconfig[1];
+ 
+     static char rn[] = "klog";	/*Routine name */
+     static int Pipe = 0;	/* reading from a pipe */
+     static int Silent = 0;	/* Don't want error messages */
+ 
+     int local;			/* explicit cell is same a local one */
+     int writeTicketFile = 0;	/* write ticket file to /tmp */
+ 
+     char *reason;		/* string describing errors */
+ 
+     service = 0;
+     memset(incred, 0, sizeof *incred);
+     /* blow away command line arguments */
+     for (i = 1; i < zero_argc; i++)
+ 	memset(zero_argv[i], 0, strlen(zero_argv[i]));
+     zero_argc = 0;
+     memset(klog_arg, 0, sizeof *klog_arg);
+ 
+     /* first determine quiet flag based on -silent switch */
+     Silent = (as->parms[aSILENT].items ? 1 : 0);
+ 
+     if (Silent) {
+ 	set_com_err_hook(silent_errors);
+     }
+ 
+     if ((code = krb5_init_context(&k5context))) {
+ 	com_err(rn, code, "while initializing Kerberos 5 library");
+ 	KLOGEXIT(code);
+     }
+     if ((code = rx_Init(0))) {
+ 	com_err(rn, code, "while initializing rx");
+ 	KLOGEXIT(code);
+     }
+     initialize_U_error_table();
+     /*initialize_krb5_error_table();*/ 
+     initialize_RXK_error_table();
+     initialize_KTC_error_table();
+     initialize_ACFG_error_table();
+     /* initialize_rx_error_table(); */
+     if (!(tdir = afsconf_Open(AFSDIR_CLIENT_ETC_DIRPATH))) {
+ 	com_err(rn, 0, "can't get afs configuration (afsconf_Open(%s))",
+ 	    rn, AFSDIR_CLIENT_ETC_DIRPATH);
+ 	KLOGEXIT(1);
+     }
+ 
+     /* Parse remaining arguments. */
+ 
+     dosetpag = !! as->parms[aSETPAG].items;
+     Pipe = !! as->parms[aPIPE].items;
+     writeTicketFile = !! as->parms[aTMP].items;
+     noprdb = !! as->parms[aNOPRDB].items;
+     evil = (always_evil&1) || !! as->parms[aUNWRAP].items;
+ 
+ #ifdef AFS_RXK5
+     authtype = 0;
+     if (as->parms[aK5].items)
+ 	authtype |= FORCE_RXK5;
+     if (as->parms[aK4].items)
+ 	authtype |= FORCE_RXKAD;
+     if (!authtype)
+ 	authtype |= env_afs_rxk5_default();
+ #endif
+ 
+     cell = as->parms[aCELL].items ? cell = as->parms[aCELL].items->data : 0;
+     if ((code = afsconf_GetCellInfo(tdir, cell, "afsprot", cellconfig))) {
+ 	if (cell)
+ 	    com_err(rn, code, "Can't get cell information for '%s'", cell);
+ 	else
+ 	    com_err(rn, code, "Can't get determine local cell!");
+ 	KLOGEXIT(code);
+     }
+ 
+     if (as->parms[aKRBREALM].items) {
+ 	code = krb5_set_default_realm(k5context,
+ 		(const char *) as->parms[aKRBREALM].items);
+ 	if (code) {
+ 	    com_err(rn, code, "Can't make <%s> the default realm",
+ 		as->parms[aKRBREALM].items);
+ 	    KLOGEXIT(code);
+ 	}
+     }
+     else if ((code = krb5_get_host_realm(k5context, cellconfig->hostName[0], &hrealms))) {
+ 	com_err(rn, code, "Can't get realm for host <%s> in cell <%s>\n",
+ 		cellconfig->hostName[0], cellconfig->name);
+ 	KLOGEXIT(code);
+     } else {
+ 	if (hrealms && *hrealms) {
+ 	    code = krb5_set_default_realm(k5context,
+ 		    *hrealms);
+ 	    if (code) {
+ 		com_err(rn, code, "Can't make <%s> the default realm",
+ 		    *hrealms);
+ 		KLOGEXIT(code);
+ 	    }
+ 	}
+ 	if (hrealms) krb5_free_host_realm(k5context, hrealms);
+     }
+ 
+     id = getuid();
+     if (as->parms[aPRINCIPAL].items) {
+ 	pname = as->parms[aPRINCIPAL].items->data;
+     } else {
+ 	/* No explicit name provided: use Unix uid. */
+ 	struct passwd *pw;
+ 	pw = getpwuid(id);
+ 	if (pw == 0) {
+ 	    com_err(rn, 0,
+ 		"Can't figure out your name from your user id (%d).", id);
+ 	    if (!Silent)
+ 		fprintf(stderr, "%s: Try providing the user name.\n", rn);
+ 	    KLOGEXIT(1);
+ 	}
+ 	pname = pw->pw_name;
+     }
+     code = krb5_parse_name(k5context, pname, &princ);
+     if (code) {
+ 	com_err(rn, code, "Can't parse principal <%s>", pname);
+ 	KLOGEXIT(code);
+     }
+ 
+     if (as->parms[aPASSWORD].items) {
+ 	/*
+ 	 * Current argument is the desired password string.  Remember it in
+ 	 * our local buffer, and zero out the argument string - anyone can
+ 	 * see it there with ps!
+ 	 */
+ 	strncpy(passwd, as->parms[aPASSWORD].items->data, sizeof(passwd));
+ 	memset(as->parms[aPASSWORD].items->data, 0,
+ 	       strlen(as->parms[aPASSWORD].items->data));
+ 	pass = passwd;
+     }
+ 
+     if (as->parms[aLIFETIME].items) {
+ 	char *life = as->parms[aLIFETIME].items->data;
+ 	char *sp;		/* string ptr to rest of life */
+ 	lifetime = 3600 * strtol(life, &sp, 0);	/* hours */
+ 	if (sp == life) {
+ 	  bad_lifetime:
+ 	    if (!Silent)
+ 		fprintf(stderr, "%s: translating '%s' to lifetime failed\n",
+ 			rn, life);
+ 	    return 1;
+ 	}
+ 	if (*sp == ':') {
+ 	    life = sp + 1;	/* skip the colon */
+ 	    lifetime += 60 * strtol(life, &sp, 0);	/* minutes */
+ 	    if (sp == life)
+ 		goto bad_lifetime;
+ 	    if (*sp == ':') {
+ 		life = sp + 1;
+ 		lifetime += strtol(life, &sp, 0);	/* seconds */
+ 		if (sp == life)
+ 		    goto bad_lifetime;
+ 		if (*sp)
+ 		    goto bad_lifetime;
+ 	    } else if (*sp)
+ 		goto bad_lifetime;
+ 	} else if (*sp)
+ 	    goto bad_lifetime;
+     } else
+ 	lifetime = 0;
+ 
+     /* Get the password if it wasn't provided. */
+     if (!pass) {
+ 	if (Pipe) {
+ 	    strncpy(passwd, getpipepass(), sizeof(passwd));
+ 	    pass = passwd;
+ 	} else {
+ 	    pf = klog_prompter;
+ 	    pa = (char *)klog_arg;
+ 	}
+     }
+ 
+     service = 0;
+ #ifdef AFS_RXK5
+     if (authtype & FORCE_RXK5) {
+ 	tofree = get_afs_krb5_svc_princ(cellconfig);
+ 	snprintf(service_temp, sizeof service_temp, "%s", tofree);
+     } else
+ #endif
+     snprintf (service_temp, sizeof service_temp, "afs/%s", cellconfig->name);
+     if (writeTicketFile)
+ 	service = 0;
+     else 
+ 	service = service_temp;
+ 
+     klog_arg->pp = &pass;
+     klog_arg->pstore = passwd;
+     /* XXX should allow k5 to prompt in most cases -- what about expired pw?*/
+     krb5_get_init_creds_opt_init(gic_opts);
+     for (;;) {
+ 	code = krb5_get_init_creds_password(k5context,
+ 	    incred,
+ 	    princ,
+ 	    pass,
+ 	    pf,	/* prompter */
+ 	    pa,	/* data */
+ 	    0,	/* start_time */
+ 	    service,	/* in_tkt_service */
+ 	    gic_opts);
+ 	if (code != KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN || service != service_temp) break;
+ #ifdef AFS_RXK5
+ 	if (authtype & FORCE_RXK5) break;
+ #endif
+ 	service = "afs";
+     }
+     memset(passwd, 0, sizeof(passwd));
+     if (code) {
+ 	char *r = 0;
+ 	if (krb5_get_default_realm(k5context, &r))
+ 	    r = 0;
+ 	if (service)
+ 	    com_err(rn, code, "Unable to authenticate to use %s", service);
+ 	else if (r)
+ 	    com_err(rn, code, "Unable to authenticate in realm %s", r);
+ 	else
+ 	    com_err(rn, code, "Unable to authenticate to use cell %s",
+ 		cellconfig->name);
+ 	if (r) free(r);
+ 	KLOGEXIT(code);
+     }
+ 
+     if (service) {
+ 	afscred = incred;
+     } else {
+ 	for (;;writeTicketFile = 0) {
+ 	    if (writeTicketFile) {
+ 		what = "getting default ccache";
+ 		code = krb5_cc_default(k5context, &cc);
+ 	    } else {
+ 		what = "krb5_cc_register";
+ 		code = krb5_cc_register(k5context, &krb5_mcc_ops, FALSE);
+ 		if (code && code != KRB5_CC_TYPE_EXISTS) goto Failed;
+ 		what = "krb5_cc_resolve";
+ 		code = krb5_cc_resolve(k5context, "MEMORY:core", &cc);
+ 		if (code) goto Failed;
+ 	    }
+ 	    what = "initializing ccache";
+ 	    code = krb5_cc_initialize(k5context, cc, princ);
+ 	    if (code) goto Failed;
+ 	    what = "writing Kerberos ticket file";
+ 	    code = krb5_cc_store_cred(k5context, cc, incred);
+ 	    if (code) goto Failed;
+ 	    if (writeTicketFile)
+ 		fprintf(stderr,
+ 		    "Wrote ticket file to %s\n",
+ 		    krb5_cc_get_name(k5context, cc));
+ 	    break;
+ 	Failed:
+ 	    if (code)
+ 		com_err(rn, code, what);
+ 	    if (writeTicketFile) {
+ 		if (cc) {
+ 		    krb5_cc_close(k5context, cc);
+ 		    cc = 0;
+ 		}
+ 		continue;
+ 	    }
+ 	    KLOGEXIT(code);
+ 	}
+ 
+ 	for (service = service_temp;;service = "afs") {
+ 	    memset(mcred, 0, sizeof *mcred);
+ 	    mcred->client = princ;
+ 	    code = krb5_parse_name(k5context, service, &mcred->server);
+ 	    if (code) {
+ 		com_err(rn, code, "Unable to parse service <%s>\n", service);
+ 		KLOGEXIT(code);
+ 	    }
+ 	    if (tofree) { free(tofree); tofree = 0; }
+ 	    if (!(code = krb5_unparse_name(k5context, mcred->server, &outname)))
+ 		tofree = outname;
+ 	    else outname = service;
+ 	    code = krb5_get_credentials(k5context, 0, cc, mcred, &outcred);
+ 	    krb5_free_principal(k5context, mcred->server);
+ 	    if (code != KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN || service != service_temp) break;
+ #ifdef AFS_RXK5
+ 	    if (authtype & FORCE_RXK5) break;
+ #endif
+ 	}
+ 	afscred = outcred;
+     }
+     if (code) {
+ 	com_err(rn, code, "Unable to get credentials to use %s", outname);
+ 	KLOGEXIT(code);
+     }
+ 
+ #ifdef AFS_RXK5
+     if (authtype & FORCE_RXK5) {
+ 	struct ktc_principal aserver[1];
+ 	int viceid = 555;
+ 
+ 	memset(aserver, 0, sizeof *aserver);
+ 	strncpy(aserver->cell, cellconfig->name, MAXKTCREALMLEN-1);
+ 	code = ktc_SetK5Token(k5context, aserver, afscred, viceid, dosetpag);
+ 	if (code) {
+ 	    com_err(rn, code, "Unable to store tokens for cell %s\n",
+ 		cellconfig->name);
+ 	    KLOGEXIT(1);
+ 	}
+     } else
+ #endif
+     {
+ 	struct ktc_principal aserver[1], aclient[1];
+ 	struct ktc_token atoken[1];
+ 
+ 	memset(atoken, 0, sizeof *atoken);
+ 	if (evil) {
+ 	    atoken->kvno = RXKAD_TKT_TYPE_KERBEROS_V5_ENCPART_ONLY;
+ 	    if (afs_krb5_skip_ticket_wrapper(afscred->ticket.data,
+ 			afscred->ticket.length, &enc_part->data,
+ 			&enc_part->length)) {
+ 		com_err(rn, 0, "Can't unwrap %s AFS credential",
+ 		    cellconfig->name);
+ 		KLOGEXIT(1);
+ 	    }
+ 	} else {
+ 	    atoken->kvno = RXKAD_TKT_TYPE_KERBEROS_V5;
+ 	    *enc_part = afscred->ticket;
+ 	}
+ 	atoken->startTime = afscred->times.starttime;
+ 	atoken->endTime = afscred->times.endtime;
+ 	memcpy(&atoken->sessionKey, get_cred_keydata(afscred),
+ 	    get_cred_keylen(afscred));
+ 	memcpy(atoken->ticket, enc_part->data,
+ 	    atoken->ticketLen = enc_part->length);
+ 	memset(aserver, 0, sizeof *aserver);
+ 	strncpy(aserver->name, "afs", 4);
+ 	strncpy(aserver->cell, cellconfig->name, MAXKTCREALMLEN-1);
+ 	memset(aclient, 0, sizeof *aclient);
+ 	i = realm_len(k5context, afscred->client);
+ 	if (i > MAXKTCREALMLEN-1) i = MAXKTCREALMLEN-1;
+ 	memcpy(aclient->cell, realm_data(k5context, afscred->client), i);
+ 	if (!noprdb) {
+ 	    int viceid;
+ 	    k5_to_k4_name(k5context, afscred->client, aclient);
+ 	    code = whoami(atoken, cellconfig, aclient, &viceid);
+ 	    if (code) {
+ 		com_err(rn, code, "Can't get your viceid", cellconfig->name);
+ 		*aclient->name = 0;
+ 	    } else
+ 		snprintf(aclient->name, MAXKTCNAMELEN-1, "AFS ID %d", viceid);
+ 	}
+ 	if (!*aclient->name)
+ 	    k5_to_k4_name(k5context, afscred->client, aclient);
+ 	code = ktc_SetToken(aserver, atoken, aclient, dosetpag);
+ 	if (code) {
+ 	    com_err(rn, code, "Unable to store tokens for cell %s\n",
+ 		cellconfig->name);
+ 	    KLOGEXIT(1);
+ 	}
+     }
+ 
+     krb5_free_principal(k5context, princ);
+     krb5_free_cred_contents(k5context, incred);
+     if (outcred) krb5_free_creds(k5context, outcred);
+     if (cc)
+ 	krb5_cc_close(k5context, cc);
+     if (tofree) free(tofree);
+ 
+     return 0;
+ }
Index: openafs/src/aklog/skipwrap.c
diff -c /dev/null openafs/src/aklog/skipwrap.c:1.1.10.2
*** /dev/null	Wed Nov  7 00:06:18 2007
--- openafs/src/aklog/skipwrap.c	Thu Nov  1 12:51:47 2007
***************
*** 0 ****
--- 1,124 ----
+ 
+ /*
+  * Copyright (c) 2006
+  * The Regents of the University of Michigan
+  * ALL RIGHTS RESERVED
+  *
+  * Permission is granted to use, copy, create derivative works
+  * and redistribute this software and such derivative works
+  * for any purpose, so long as the name of the University of
+  * Michigan is not used in any advertising or publicity
+  * pertaining to the use or distribution of this software
+  * without specific, written prior authorization.  If the
+  * above copyright notice or any other identification of the
+  * University of Michigan is included in any copy of any
+  * portion of this software, then the disclaimer below must
+  * also be included.
+  *
+  * This software is provided as is, without representation
+  * from the University of Michigan as to its fitness for any
+  * purpose, and without warranty by the University of
+  * Michigan of any kind, either express or implied, including
+  * without limitation the implied warranties of
+  * merchantability and fitness for a particular purpose.  The
+  * regents of the University of Michigan shall not be liable
+  * for any damages, including special, indirect, incidental, or
+  * consequential damages, with respect to any claim arising
+  * out of or in connection with the use of the software, even
+  * if it has been or is hereafter advised of the possibility of
+  * such damages.
+  */
+ 
+ #include <afsconfig.h>
+ #include <afs/param.h>
+ #include <stdio.h>
+ #include <aklog.h>
+ #include <krb5.h>
+ 
+ /* evil hack */
+ #define SEQUENCE 16
+ #define CONSTRUCTED 32
+ #define APPLICATION 64
+ #define CONTEXT_SPECIFIC 128
+ static int skip_get_number(char **pp, size_t *lp, int *np)
+ {
+     unsigned l;
+     int r, n, i;
+     char *p;
+ 
+     l = *lp;
+     if (l < 1) {
+ #ifdef DEBUG
+ 	fprintf(stderr, "skip_bad_number: missing number\n");
+ #endif
+ 	return -1;
+     }
+     p = *pp;
+     r = (unsigned char)*p;
+     ++p; --l;
+     if (r & 0x80) {
+ 	n = (r&0x7f);
+ 	if (l < n) {
+ #ifdef DEBUG
+ 	    fprintf(stderr, "skip_bad_number: truncated number\n");
+ #endif
+ 	    return -1;
+ 	}
+ 	r = 0;
+ 	for (i = n; --i >= 0; ) {
+ 	    r <<= 8;
+ 	    r += (unsigned char)*p;
+ 	    ++p; --l;
+ 	}
+     }
+     *np = r;
+     *pp = p;
+     *lp = l;
+     return 0;
+ }
+ 
+ int
+ afs_krb5_skip_ticket_wrapper(char *tix, size_t tixlen, char **enc, size_t *enclen)
+ {
+     char *p = tix;
+     size_t l = tixlen;
+     int code;
+     int num;
+ 
+     if (l < 1) return -1;
+     if (*p != (char) (CONSTRUCTED+APPLICATION+1)) return -1;
+     ++p; --l;
+     if ((code = skip_get_number(&p, &l, &num))) return code;
+     if (l != num) return -1;
+     if (l < 1) return -1;
+     if (*p != (char)(CONSTRUCTED+SEQUENCE)) return -1;
+     ++p; --l;
+     if ((code = skip_get_number(&p, &l, &num))) return code;
+     if (l != num) return -1;
+     if (l < 1) return -1;
+     if (*p != (char)(CONSTRUCTED+CONTEXT_SPECIFIC+0)) return -1;
+     ++p; --l;
+     if ((code = skip_get_number(&p, &l, &num))) return code;
+     if (l < num) return -1;
+     l -= num; p += num;
+     if (l < 1) return -1;
+     if (*p != (char)(CONSTRUCTED+CONTEXT_SPECIFIC+1)) return -1;
+     ++p; --l;
+     if ((code = skip_get_number(&p, &l, &num))) return code;
+     if (l < num) return -1;
+     l -= num; p += num;
+     if (l < 1) return -1;
+     if (*p != (char)(CONSTRUCTED+CONTEXT_SPECIFIC+2)) return -1;
+     ++p; --l;
+     if ((code = skip_get_number(&p, &l, &num))) return code;
+     if (l < num) return -1;
+     l -= num; p += num;
+     if (l < 1) return -1;
+     if (*p != (char)(CONSTRUCTED+CONTEXT_SPECIFIC+3)) return -1;
+     ++p; --l;
+     if ((code = skip_get_number(&p, &l, &num))) return code;
+     if (l != num) return -1;
+     *enc = p;
+     *enclen = l;
+     return 0;
+ }
Index: openafs/src/auth/authcon.c
diff -c openafs/src/auth/authcon.c:1.14 openafs/src/auth/authcon.c:1.14.8.2
*** openafs/src/auth/authcon.c:1.14	Wed Aug 18 21:07:40 2004
--- openafs/src/auth/authcon.c	Thu Nov  1 12:09:32 2007
***************
*** 15,21 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/authcon.c,v 1.14 2004/08/19 01:07:40 kolya Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
--- 15,21 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/authcon.c,v 1.14.8.2 2007/11/01 16:09:32 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
***************
*** 23,28 ****
--- 23,29 ----
  #include "afs/stds.h"
  #include "afs/pthread_glock.h"
  #include "des/des.h"
+ #include "des/des_prototypes.h"
  #include "rx/rxkad.h"
  #include "rx/rx.h"
  #include "afs/cellconfig.h"
***************
*** 41,47 ****
--- 42,51 ----
  #include <netinet/in.h>
  #include <netdb.h>
  #endif
+ #include <string.h>
+ #include <stdio.h>
  #include <des.h>
+ #include <des_prototypes.h>
  #include <rx/rxkad.h>
  #include <rx/rx.h>
  #include "cellconfig.h"
***************
*** 51,59 ****
  
  /* return a null security object if nothing else can be done */
  static afs_int32
! QuickAuth(astr, aindex)
!      struct rx_securityClass **astr;
!      afs_int32 *aindex;
  {
      register struct rx_securityClass *tc;
      tc = rxnull_NewClientSecurityObject();
--- 55,61 ----
  
  /* return a null security object if nothing else can be done */
  static afs_int32
! QuickAuth(struct rx_securityClass **astr, afs_int32 *aindex)
  {
      register struct rx_securityClass *tc;
      tc = rxnull_NewClientSecurityObject();
***************
*** 65,74 ****
  #if !defined(UKERNEL)
  /* Return an appropriate security class and index */
  afs_int32
! afsconf_ServerAuth(adir, astr, aindex)
!      register struct afsconf_dir *adir;
!      struct rx_securityClass **astr;
!      afs_int32 *aindex;
  {
      register struct rx_securityClass *tclass;
  
--- 67,75 ----
  #if !defined(UKERNEL)
  /* Return an appropriate security class and index */
  afs_int32
! afsconf_ServerAuth(register struct afsconf_dir *adir, 
! 		   struct rx_securityClass **astr, 
! 		   afs_int32 *aindex)
  {
      register struct rx_securityClass *tclass;
  
***************
*** 88,98 ****
  #endif /* !defined(UKERNEL) */
  
  static afs_int32
! GenericAuth(adir, astr, aindex, enclevel)
!      struct afsconf_dir *adir;
!      struct rx_securityClass **astr;
!      afs_int32 *aindex;
!      rxkad_level enclevel;
  {
      char tbuffer[256];
      struct ktc_encryptionKey key, session;
--- 89,98 ----
  #endif /* !defined(UKERNEL) */
  
  static afs_int32
! GenericAuth(struct afsconf_dir *adir, 
! 	    struct rx_securityClass **astr, 
! 	    afs_int32 *aindex, 
! 	    rxkad_level enclevel)
  {
      char tbuffer[256];
      struct ktc_encryptionKey key, session;
***************
*** 159,168 ****
   * tells rxkad to encrypt the data, too.
   */
  afs_int32
! afsconf_ClientAuthSecure(adir, astr, aindex)
!      struct afsconf_dir *adir;
!      struct rx_securityClass **astr;
!      afs_int32 *aindex;
  {
      afs_int32 rc;
  
--- 159,167 ----
   * tells rxkad to encrypt the data, too.
   */
  afs_int32
! afsconf_ClientAuthSecure(struct afsconf_dir *adir, 
! 			 struct rx_securityClass **astr, 
! 			 afs_int32 *aindex)
  {
      afs_int32 rc;
  
Index: openafs/src/auth/cellconfig.c
diff -c openafs/src/auth/cellconfig.c:1.47.2.9 openafs/src/auth/cellconfig.c:1.47.2.14
*** openafs/src/auth/cellconfig.c:1.47.2.9	Mon Jul  2 20:35:14 2007
--- openafs/src/auth/cellconfig.c	Fri Nov  2 14:05:07 2007
***************
*** 11,23 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/cellconfig.c,v 1.47.2.9 2007/07/03 00:35:14 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <afs/pthread_glock.h>
  #ifdef UKERNEL
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
  #else /* UKERNEL */
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/cellconfig.c,v 1.47.2.14 2007/11/02 18:05:07 shadow Exp $");
  
  #include <afs/stds.h>
  #include <afs/pthread_glock.h>
  #ifdef UKERNEL
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
+ #include "des/des.h"
+ #include "rx/rxkad.h"
  #else /* UKERNEL */
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 47,62 ****
  #include <stdlib.h>
  #include <sys/stat.h>
  #include <fcntl.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
  #endif /* UKERNEL */
  #include <afs/afsutil.h>
  #include "cellconfig.h"
--- 49,60 ----
  #include <stdlib.h>
  #include <sys/stat.h>
  #include <fcntl.h>
  #include <string.h>
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
+ #include <rx/rxkad.h>
+ #include <rx/rx.h>
  #endif /* UKERNEL */
  #include <afs/afsutil.h>
  #include "cellconfig.h"
***************
*** 311,317 ****
  static int
  afsconf_Check(register struct afsconf_dir *adir)
  {
!     char tbuffer[256], *p;
      struct stat tstat;
      register afs_int32 code;
  
--- 309,318 ----
  static int
  afsconf_Check(register struct afsconf_dir *adir)
  {
!     char tbuffer[256];
! #ifdef AFS_NT40_ENV
!     char *p;
! #endif
      struct stat tstat;
      register afs_int32 code;
  
***************
*** 357,365 ****
  static int
  afsconf_Touch(register struct afsconf_dir *adir)
  {
!     char tbuffer[256], *p;
  #ifndef AFS_NT40_ENV
      struct timeval tvp[2];
  #endif
  
      adir->timeRead = 0;		/* just in case */
--- 358,368 ----
  static int
  afsconf_Touch(register struct afsconf_dir *adir)
  {
!     char tbuffer[256];
  #ifndef AFS_NT40_ENV
      struct timeval tvp[2];
+ #else
+     char *p;
  #endif
  
      adir->timeRead = 0;		/* just in case */
***************
*** 781,788 ****
  /* call aproc(entry, arock, adir) for all cells.  Proc must return 0, or we'll stop early and return the code it returns */
  int
  afsconf_CellApply(struct afsconf_dir *adir,
! 		  int (*aproc) (struct afsconf_cell * cell, char *arock,
! 				struct afsconf_dir * dir), char *arock)
  {
      register struct afsconf_entry *tde;
      register afs_int32 code;
--- 784,791 ----
  /* call aproc(entry, arock, adir) for all cells.  Proc must return 0, or we'll stop early and return the code it returns */
  int
  afsconf_CellApply(struct afsconf_dir *adir,
! 		  int (*aproc) (struct afsconf_cell * cell, void *arock,
! 				struct afsconf_dir * dir), void *arock)
  {
      register struct afsconf_entry *tde;
      register afs_int32 code;
***************
*** 804,811 ****
  int
  afsconf_CellAliasApply(struct afsconf_dir *adir,
  		       int (*aproc) (struct afsconf_cellalias * alias,
! 				     char *arock, struct afsconf_dir * dir),
! 		       char *arock)
  {
      register struct afsconf_aliasentry *tde;
      register afs_int32 code;
--- 807,814 ----
  int
  afsconf_CellAliasApply(struct afsconf_dir *adir,
  		       int (*aproc) (struct afsconf_cellalias * alias,
! 				     void *arock, struct afsconf_dir * dir),
! 		       void *arock)
  {
      register struct afsconf_aliasentry *tde;
      register afs_int32 code;
***************
*** 1282,1288 ****
  
  /* get latest key */
  afs_int32
! afsconf_GetLatestKey(struct afsconf_dir * adir, afs_int32 * avno, char *akey)
  {
      register int i;
      int maxa;
--- 1285,1292 ----
  
  /* get latest key */
  afs_int32
! afsconf_GetLatestKey(struct afsconf_dir * adir, afs_int32 * avno, 
! 		     struct ktc_encryptionKey *akey)
  {
      register int i;
      int maxa;
***************
*** 1323,1330 ****
  
  /* get a particular key */
  int
! afsconf_GetKey(struct afsconf_dir *adir, afs_int32 avno, char *akey)
  {
      register int i, maxa;
      register struct afsconf_key *tk;
      register afs_int32 code;
--- 1327,1335 ----
  
  /* get a particular key */
  int
! afsconf_GetKey(void *rock, afs_int32 avno, struct ktc_encryptionKey *akey)
  {
+     struct afsconf_dir *adir = (struct afsconf_dir *) rock;
      register int i, maxa;
      register struct afsconf_key *tk;
      register afs_int32 code;
Index: openafs/src/auth/cellconfig.p.h
diff -c openafs/src/auth/cellconfig.p.h:1.11 openafs/src/auth/cellconfig.p.h:1.11.14.2
*** openafs/src/auth/cellconfig.p.h:1.11	Tue Jul 15 19:14:41 2003
--- openafs/src/auth/cellconfig.p.h	Fri Nov  2 13:45:14 2007
***************
*** 101,114 ****
  extern struct afsconf_dir *afsconf_Open(register const char *adir);
  extern int afsconf_CellApply(struct afsconf_dir *adir,
  			     int (*aproc) (struct afsconf_cell * cell,
! 					   char *arock,
  					   struct afsconf_dir * dir),
! 			     char *arock);
  extern int afsconf_CellAliasApply(struct afsconf_dir *adir,
  				  int (*aproc) (struct afsconf_cellalias *
! 						alias, char *arock,
  						struct afsconf_dir * dir),
! 				  char *arock);
  extern int afsconf_GetExtendedCellInfo(struct afsconf_dir *adir,
  				       char *acellName, char *aservice,
  				       struct afsconf_cell *acellInfo,
--- 101,114 ----
  extern struct afsconf_dir *afsconf_Open(register const char *adir);
  extern int afsconf_CellApply(struct afsconf_dir *adir,
  			     int (*aproc) (struct afsconf_cell * cell,
! 					   void *arock,
  					   struct afsconf_dir * dir),
! 			     void *arock);
  extern int afsconf_CellAliasApply(struct afsconf_dir *adir,
  				  int (*aproc) (struct afsconf_cellalias *
! 						alias, void *arock,
  						struct afsconf_dir * dir),
! 				  void *arock);
  extern int afsconf_GetExtendedCellInfo(struct afsconf_dir *adir,
  				       char *acellName, char *aservice,
  				       struct afsconf_cell *acellInfo,
***************
*** 125,133 ****
  extern int afsconf_GetKeys(struct afsconf_dir *adir,
  			   struct afsconf_keys *astr);
  extern afs_int32 afsconf_GetLatestKey(struct afsconf_dir *adir,
! 				      afs_int32 * avno, char *akey);
! extern int afsconf_GetKey(struct afsconf_dir *adir, afs_int32 avno,
! 			  char *akey);
  extern int afsconf_AddKey(struct afsconf_dir *adir, afs_int32 akvno,
  			  char akey[8], afs_int32 overwrite);
  extern int afsconf_DeleteKey(struct afsconf_dir *adir, afs_int32 akvno);
--- 125,134 ----
  extern int afsconf_GetKeys(struct afsconf_dir *adir,
  			   struct afsconf_keys *astr);
  extern afs_int32 afsconf_GetLatestKey(struct afsconf_dir *adir,
! 				      afs_int32 * avno, 
! 				      struct ktc_encryptionKey *akey);
! extern int afsconf_GetKey(void *rock, afs_int32 avno,
! 			  struct ktc_encryptionKey *akey);
  extern int afsconf_AddKey(struct afsconf_dir *adir, afs_int32 akvno,
  			  char akey[8], afs_int32 overwrite);
  extern int afsconf_DeleteKey(struct afsconf_dir *adir, afs_int32 akvno);
Index: openafs/src/auth/copyauth.c
diff -c openafs/src/auth/copyauth.c:1.6 openafs/src/auth/copyauth.c:1.6.14.2
*** openafs/src/auth/copyauth.c:1.6	Tue Jul 15 19:14:41 2003
--- openafs/src/auth/copyauth.c	Thu Nov  1 12:09:32 2007
***************
*** 11,26 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/copyauth.c,v 1.6 2003/07/15 23:14:41 shadow Exp $");
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #include <sys/types.h>
  #include "auth.h"
  #ifdef AFS_NT40_ENV
--- 11,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/copyauth.c,v 1.6.14.2 2007/11/01 16:09:32 shadow Exp $");
  
  #include <string.h>
  #include <sys/types.h>
  #include "auth.h"
  #ifdef AFS_NT40_ENV
***************
*** 35,43 ****
  
  char whoami[256];
  
! main(argc, argv)
!      int argc;
!      char **argv;
  {
      char localName[64];
      register afs_int32 code;
--- 28,35 ----
  
  char whoami[256];
  
! int
! main(int argc, char **argv)
  {
      char localName[64];
      register afs_int32 code;
Index: openafs/src/auth/ktc.c
diff -c openafs/src/auth/ktc.c:1.16.8.5 openafs/src/auth/ktc.c:1.16.8.7
*** openafs/src/auth/ktc.c:1.16.8.5	Thu Aug  9 10:58:23 2007
--- openafs/src/auth/ktc.c	Thu Nov  1 12:09:32 2007
***************
*** 17,23 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/ktc.c,v 1.16.8.5 2007/08/09 14:58:23 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
--- 17,23 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/ktc.c,v 1.16.8.7 2007/11/01 16:09:32 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
***************
*** 40,45 ****
--- 40,46 ----
  #include <unistd.h>
  #endif
  #include <stdio.h>
+ #include <stdlib.h>
  #include <afs/stds.h>
  #include <afs/pthread_glock.h>
  #include <sys/types.h>
***************
*** 49,61 ****
  #include <errno.h>
  #include <sys/ioctl.h>
  #include <netinet/in.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <afs/vice.h>
  #ifdef	AFS_AIX_ENV
  #include <sys/lockf.h>
--- 50,56 ----
***************
*** 128,137 ****
  /* the following routines aren't static anymore on behalf of the kerberos IV
   * compatibility library built in subtree krb.
   */
! int afs_tf_init(), afs_tf_get_pname(), afs_tf_get_pinst(), afs_tf_get_cred();
! int afs_tf_save_cred(), afs_tf_close(), afs_tf_create();
! int afs_tf_dest_tkt();
! static void ktc_LocalCell();
  #endif /* AFS_KERBEROS_ENV */
  
  #ifdef AFS_DUX40_ENV
--- 123,138 ----
  /* the following routines aren't static anymore on behalf of the kerberos IV
   * compatibility library built in subtree krb.
   */
! int afs_tf_init(char *, int);
! int afs_tf_get_pname(char *);
! int afs_tf_get_pinst(char *);
! int afs_tf_get_cred(struct ktc_principal *, struct ktc_token *);
! int afs_tf_save_cred(struct ktc_principal *, struct ktc_token *, 
! 		     struct ktc_principal *);
! int afs_tf_close(void);
! int afs_tf_create(char *, char *);
! int afs_tf_dest_tkt(void);
! static void ktc_LocalCell(void);
  #endif /* AFS_KERBEROS_ENV */
  
  #ifdef AFS_DUX40_ENV
***************
*** 251,261 ****
   * now. */
  
  static int
! NewSetToken(aserver, atoken, aclient, flags)
!      struct ktc_principal *aserver;
!      struct ktc_principal *aclient;
!      struct ktc_token *atoken;
!      afs_int32 flags;
  {
      TRY_KERNEL(KTC_SETTOKEN_OP, aserver, aclient, atoken,
  	       sizeof(struct ktc_token));
--- 252,261 ----
   * now. */
  
  static int
! NewSetToken(struct ktc_principal *aserver, 
! 	    struct ktc_token *atoken, 
! 	    struct ktc_principal *aclient, 
!             afs_int32 flags)
  {
      TRY_KERNEL(KTC_SETTOKEN_OP, aserver, aclient, atoken,
  	       sizeof(struct ktc_token));
***************
*** 267,276 ****
  (3*sizeof(afs_int32)+MAXKTCTICKETLEN+sizeof(struct ClearToken)+MAXKTCREALMLEN)
  
  static int
! OldSetToken(aserver, atoken, aclient, flags)
!      struct ktc_principal *aserver, *aclient;
!      struct ktc_token *atoken;
!      afs_int32 flags;
  {
      struct ViceIoctl iob;
      char tbuffer[MAXPIOCTLTOKENLEN];
--- 267,274 ----
  (3*sizeof(afs_int32)+MAXKTCTICKETLEN+sizeof(struct ClearToken)+MAXKTCREALMLEN)
  
  static int
! OldSetToken(struct ktc_principal *aserver, struct ktc_token *atoken, 
! 	    struct ktc_principal *aclient, afs_int32 flags)
  {
      struct ViceIoctl iob;
      char tbuffer[MAXPIOCTLTOKENLEN];
***************
*** 486,495 ****
  /* get token, given server we need and token buffer.  aclient will eventually
   * be set to our identity to the server.
   */
! ktc_GetToken(aserver, atoken, atokenLen, aclient)
!      struct ktc_principal *aserver, *aclient;
!      int atokenLen;
!      struct ktc_token *atoken;
  {
      struct ViceIoctl iob;
      char tbuffer[MAXPIOCTLTOKENLEN];
--- 484,492 ----
  /* get token, given server we need and token buffer.  aclient will eventually
   * be set to our identity to the server.
   */
! int
! ktc_GetToken(struct ktc_principal *aserver, struct ktc_token *atoken, 
! 	     int atokenLen, struct ktc_principal *aclient)
  {
      struct ViceIoctl iob;
      char tbuffer[MAXPIOCTLTOKENLEN];
***************
*** 501,507 ****
--- 498,506 ----
      afs_int32 temp;
      int maxLen;			/* biggest ticket we can copy */
      int tktLen;			/* server ticket length */
+ #ifdef AFS_KERBEROS_ENV
      char found = 0;
+ #endif
  
      LOCK_GLOBAL_MUTEX;
  #ifndef NO_AFS_CLIENT
***************
*** 539,546 ****
  		    found = 1;
  	    } else {
  		char tmpstring[MAXHOSTCHARS];
! 		afs_tf_get_pname(&tmpstring);
! 		afs_tf_get_pinst(&tmpstring);
  		found = 1;
  	    }
  	}
--- 538,545 ----
  		    found = 1;
  	    } else {
  		char tmpstring[MAXHOSTCHARS];
! 		afs_tf_get_pname(tmpstring);
! 		afs_tf_get_pinst(tmpstring);
  		found = 1;
  	    }
  	}
***************
*** 670,677 ****
   * NOT IMPLEMENTED YET!
   */
  #ifndef NO_AFS_CLIENT
! ktc_ForgetToken(aserver)
!      struct ktc_principal *aserver;
  {
      int rc;
  
--- 669,676 ----
   * NOT IMPLEMENTED YET!
   */
  #ifndef NO_AFS_CLIENT
! int
! ktc_ForgetToken(struct ktc_principal *aserver)
  {
      int rc;
  
***************
*** 900,906 ****
  /* ktc_OldPioctl - returns a boolean true if the kernel supports only the old
   * pioctl interface for delivering AFS tickets to the cache manager. */
  
! ktc_OldPioctl()
  {
      int rc;
      LOCK_GLOBAL_MUTEX;
--- 899,906 ----
  /* ktc_OldPioctl - returns a boolean true if the kernel supports only the old
   * pioctl interface for delivering AFS tickets to the cache manager. */
  
! int
! ktc_OldPioctl(void)
  {
      int rc;
      LOCK_GLOBAL_MUTEX;
***************
*** 950,961 ****
   *	c. In tf_close, be sure it gets reinitialized to a negative
   *	   number. 
   */
! static fd = -1;
! static curpos;			/* Position in tfbfr */
! static lastpos;			/* End of tfbfr */
  static char tfbfr[BUFSIZ];	/* Buffer for ticket data */
  
! static tf_gets(), tf_read();
  
  /*
   * This file contains routines for manipulating the ticket cache file.
--- 950,962 ----
   *	c. In tf_close, be sure it gets reinitialized to a negative
   *	   number. 
   */
! static int fd = -1;
! static int curpos;			/* Position in tfbfr */
! static int lastpos;			/* End of tfbfr */
  static char tfbfr[BUFSIZ];	/* Buffer for ticket data */
  
! static int tf_gets(char *, int);
! static int tf_read(char *, int);
  
  /*
   * This file contains routines for manipulating the ticket cache file.
***************
*** 1020,1027 ****
   * TKT_FIL_LCK  - couldn't lock the file, even after a retry
   */
  
! afs_tf_init(tf_name, rw)
!      char *tf_name;
  {
      int wflag;
      int me;
--- 1021,1028 ----
   * TKT_FIL_LCK  - couldn't lock the file, even after a retry
   */
  
! int
! afs_tf_init(char *tf_name, int rw)
  {
      int wflag;
      int me;
***************
*** 1114,1121 ****
   * was longer than MAXKTCNAMELEN, TKT_FIL_FMT is returned. 
   */
  
! afs_tf_get_pname(p)
!      char *p;
  {
      if (fd < 0) {
  	return TKT_FIL_INI;
--- 1115,1122 ----
   * was longer than MAXKTCNAMELEN, TKT_FIL_FMT is returned. 
   */
  
! int
! afs_tf_get_pname(char *p)
  {
      if (fd < 0) {
  	return TKT_FIL_INI;
***************
*** 1135,1142 ****
   * instance may be null. 
   */
  
! afs_tf_get_pinst(inst)
!      char *inst;
  {
      if (fd < 0) {
  	return TKT_FIL_INI;
--- 1136,1143 ----
   * instance may be null. 
   */
  
! int
! afs_tf_get_pinst(char *inst)
  {
      if (fd < 0) {
  	return TKT_FIL_INI;
***************
*** 1157,1165 ****
   * EOF          - end of file encountered
   */
  
! afs_tf_get_cred(principal, token)
!      struct ktc_principal *principal;
!      struct ktc_token *token;
  {
      int k_errno;
      int kvno, lifetime;
--- 1158,1165 ----
   * EOF          - end of file encountered
   */
  
! int
! afs_tf_get_cred(struct ktc_principal *principal, struct ktc_token *token)
  {
      int k_errno;
      int kvno, lifetime;
***************
*** 1217,1223 ****
   * The return value is not defined.
   */
  
! afs_tf_close()
  {
      if (!(fd < 0)) {
  #if defined(AFS_AIX_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV)
--- 1217,1224 ----
   * The return value is not defined.
   */
  
! int
! afs_tf_close(void)
  {
      if (!(fd < 0)) {
  #if defined(AFS_AIX_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV)
***************
*** 1229,1234 ****
--- 1230,1236 ----
  	fd = -1;		/* see declaration of fd above */
      }
      memset(tfbfr, 0, sizeof(tfbfr));
+     return 0;
  }
  
  /*
***************
*** 1249,1259 ****
   *		file is seriously ill.
   */
  
! static
! tf_gets(s, n)
!      register char *s;
  {
!     register count;
  
      if (fd < 0) {
  	return TKT_FIL_INI;
--- 1251,1260 ----
   *		file is seriously ill.
   */
  
! static int
! tf_gets(register char *s, int n)
  {
!     register int count;
  
      if (fd < 0) {
  	return TKT_FIL_INI;
***************
*** 1285,1296 ****
   * 0		on end of file or read error
   */
  
! static
! tf_read(s, n)
!      register char *s;
!      register n;
  {
!     register count;
  
      for (count = n; count > 0; --count) {
  	if (curpos >= sizeof(tfbfr)) {
--- 1286,1295 ----
   * 0		on end of file or read error
   */
  
! static int
! tf_read(register char *s, register int n)
  {
!     register int count;
  
      for (count = n; count > 0; --count) {
  	if (curpos >= sizeof(tfbfr)) {
***************
*** 1305,1312 ****
      return n;
  }
  
- char *tkt_string();
- 
  /*
   * afs_tf_save_cred() appends an incoming ticket to the end of the ticket
   * file.  You must call afs_tf_init() before calling afs_tf_save_cred().
--- 1304,1309 ----
***************
*** 1318,1327 ****
   * called previously, and KFAILURE for anything else that went wrong.
   */
  
! afs_tf_save_cred(aserver, atoken, aclient)
!      struct ktc_principal *aserver;
!      struct ktc_principal *aclient;
!      struct ktc_token *atoken;	/* Token */
  {
      char realm[MAXKTCREALMLEN + 1];
      char junk[MAXKTCNAMELEN];
--- 1315,1324 ----
   * called previously, and KFAILURE for anything else that went wrong.
   */
  
! int
! afs_tf_save_cred(struct ktc_principal *aserver, 
! 		 struct ktc_token *atoken, 
! 		 struct ktc_principal *aclient)
  {
      char realm[MAXKTCREALMLEN + 1];
      char junk[MAXKTCNAMELEN];
***************
*** 1420,1427 ****
   * <mit-copyright.h>.
   */
  
- char *getenv();
- 
  /*
   * This routine is used to generate the name of the file that holds
   * the user's cache of server tickets and associated session keys.
--- 1417,1422 ----
***************
*** 1451,1457 ****
  
      LOCK_GLOBAL_MUTEX;
      if (!*krb_ticket_string) {
! 	if (env = getenv("KRBTKFILE")) {
  	    (void)strncpy(krb_ticket_string, env,
  			  sizeof(krb_ticket_string) - 1);
  	    krb_ticket_string[sizeof(krb_ticket_string) - 1] = '\0';
--- 1446,1452 ----
  
      LOCK_GLOBAL_MUTEX;
      if (!*krb_ticket_string) {
! 	if ((env = getenv("KRBTKFILE"))) {
  	    (void)strncpy(krb_ticket_string, env,
  			  sizeof(krb_ticket_string) - 1);
  	    krb_ticket_string[sizeof(krb_ticket_string) - 1] = '\0';
***************
*** 1494,1502 ****
   * success, or KFAILURE if something goes wrong.
   */
  
! afs_tf_create(pname, pinst)
!      char *pname;
!      char *pinst;
  {
      int tktfile;
      int me, metoo;
--- 1489,1496 ----
   * success, or KFAILURE if something goes wrong.
   */
  
! int
! afs_tf_create(char *pname, char *pinst)
  {
      int tktfile;
      int me, metoo;
***************
*** 1573,1579 ****
   * failure.
   */
  
! afs_tf_dest_tkt()
  {
      char *file = ktc_tkt_string();
      int i, fd;
--- 1567,1574 ----
   * failure.
   */
  
! int
! afs_tf_dest_tkt(void)
  {
      char *file = ktc_tkt_string();
      int i, fd;
***************
*** 1613,1619 ****
  }
  
  static afs_uint32
! curpag()
  {
  #if defined(AFS_AIX51_ENV)
      afs_int32 pag;
--- 1608,1614 ----
  }
  
  static afs_uint32
! curpag(void)
  {
  #if defined(AFS_AIX51_ENV)
      afs_int32 pag;
***************
*** 1648,1655 ****
  #endif
  }
  
! 
! ktc_newpag()
  {
      extern char **environ;
  
--- 1643,1650 ----
  #endif
  }
  
! int
! ktc_newpag(void)
  {
      extern char **environ;
  
***************
*** 1668,1674 ****
      if (pag == -1) {
  	sprintf(fname, "%s%d", prefix, getuid());
      } else {
! 	sprintf(fname, "%sp%ld", prefix, pag);
      }
      ktc_set_tkt_string(fname);
  
--- 1663,1669 ----
      if (pag == -1) {
  	sprintf(fname, "%s%d", prefix, getuid());
      } else {
! 	sprintf(fname, "%sp%ld", prefix, (long int) pag);
      }
      ktc_set_tkt_string(fname);
  
***************
*** 1676,1682 ****
  	numenv++;
      newenv = (char **)malloc((numenv + 2) * sizeof(char *));
  
!     for (senv = environ, denv = newenv; *senv; *senv++) {
  	if (strncmp(*senv, "KRBTKFILE=", 10) != 0)
  	    *denv++ = *senv;
      }
--- 1671,1677 ----
  	numenv++;
      newenv = (char **)malloc((numenv + 2) * sizeof(char *));
  
!     for (senv = environ, denv = newenv; *senv; senv++) {
  	if (strncmp(*senv, "KRBTKFILE=", 10) != 0)
  	    *denv++ = *senv;
      }
***************
*** 1687,1692 ****
--- 1682,1688 ----
      *++denv = 0;
      environ = newenv;
      UNLOCK_GLOBAL_MUTEX;
+     return 0;
  }
  
  /*
***************
*** 1694,1700 ****
   * find out what the local cell is.
   */
  static void
! ktc_LocalCell()
  {
      int code;
      struct afsconf_dir *conf;
--- 1690,1696 ----
   * find out what the local cell is.
   */
  static void
! ktc_LocalCell(void)
  {
      int code;
      struct afsconf_dir *conf;
Index: openafs/src/auth/setkey.c
diff -c openafs/src/auth/setkey.c:1.8 openafs/src/auth/setkey.c:1.8.14.2
*** openafs/src/auth/setkey.c:1.8	Tue Jul 15 19:14:41 2003
--- openafs/src/auth/setkey.c	Thu Nov  1 12:09:32 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/setkey.c,v 1.8 2003/07/15 23:14:41 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/setkey.c,v 1.8.14.2 2007/11/01 16:09:32 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
***************
*** 21,39 ****
  #include <WINNT/afsreg.h>
  #include <WINNT/afsevent.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef HAVE_NETINET_IN_H
  #include <netinet/in.h>
  #endif
  #ifdef HAVE_NETDB_H
  #include <netdb.h>
  #endif
  #include "cellconfig.h"
  #include "keys.h"
  #include <afs/afsutil.h>
--- 21,34 ----
  #include <WINNT/afsreg.h>
  #include <WINNT/afsevent.h>
  #endif
  #include <string.h>
  #ifdef HAVE_NETINET_IN_H
  #include <netinet/in.h>
  #endif
  #ifdef HAVE_NETDB_H
  #include <netdb.h>
  #endif
+ #include <rx/rxkad.h>
  #include "cellconfig.h"
  #include "keys.h"
  #include <afs/afsutil.h>
***************
*** 43,51 ****
  static int hex2char(char c);
  
  int
! main(argc, argv)
!      int argc;
!      char **argv;
  {
      struct afsconf_dir *tdir;
      register afs_int32 code;
--- 38,44 ----
  static int hex2char(char c);
  
  int
! main(int argc, char **argv)
  {
      struct afsconf_dir *tdir;
      register afs_int32 code;
Index: openafs/src/auth/userok.c
diff -c openafs/src/auth/userok.c:1.14.4.1 openafs/src/auth/userok.c:1.14.4.2
*** openafs/src/auth/userok.c:1.14.4.1	Fri Jan  5 18:06:55 2007
--- openafs/src/auth/userok.c	Thu Nov  1 12:09:32 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/userok.c,v 1.14.4.1 2007/01/05 23:06:55 shadow Exp $");
  
  #include <afs/stds.h>
  #include <afs/pthread_glock.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/userok.c,v 1.14.4.2 2007/11/01 16:09:32 shadow Exp $");
  
  #include <afs/stds.h>
  #include <afs/pthread_glock.h>
***************
*** 46,58 ****
  #include "keys.h"
  #include "afs/audit.h"
  
- afs_int32 afsconf_SuperUser();
- 
  #if !defined(UKERNEL)
  int
! afsconf_CheckAuth(adir, acall)
!      register struct rx_call *acall;
!      register struct afsconf_dir *adir;
  {
      LOCK_GLOBAL_MUTEX;
      return ((afsconf_SuperUser(adir, acall, NULL) == 0) ? 10029 : 0);
--- 46,55 ----
  #include "keys.h"
  #include "afs/audit.h"
  
  #if !defined(UKERNEL)
  int
! afsconf_CheckAuth(register struct afsconf_dir *adir, 
! 		  register struct rx_call *acall)
  {
      LOCK_GLOBAL_MUTEX;
      return ((afsconf_SuperUser(adir, acall, NULL) == 0) ? 10029 : 0);
***************
*** 61,68 ****
  #endif /* !defined(UKERNEL) */
  
  static int
! GetNoAuthFlag(adir)
!      struct afsconf_dir *adir;
  {
      if (access(AFSDIR_SERVER_NOAUTH_FILEPATH, 0) == 0) {
  	osi_audit(NoAuthEvent, 0, AUD_END);	/* some random server is running noauth */
--- 58,64 ----
  #endif /* !defined(UKERNEL) */
  
  static int
! GetNoAuthFlag(struct afsconf_dir *adir)
  {
      if (access(AFSDIR_SERVER_NOAUTH_FILEPATH, 0) == 0) {
  	osi_audit(NoAuthEvent, 0, AUD_END);	/* some random server is running noauth */
***************
*** 73,80 ****
  
  
  int
! afsconf_GetNoAuthFlag(adir)
!      struct afsconf_dir *adir;
  {
      int rc;
  
--- 69,75 ----
  
  
  int
! afsconf_GetNoAuthFlag(struct afsconf_dir *adir)
  {
      int rc;
  
***************
*** 85,93 ****
  }
  
  void
! afsconf_SetNoAuthFlag(adir, aflag)
!      struct afsconf_dir *adir;
!      int aflag;
  {
      register afs_int32 code;
  
--- 80,86 ----
  }
  
  void
! afsconf_SetNoAuthFlag(struct afsconf_dir *adir, int aflag)
  {
      register afs_int32 code;
  
***************
*** 112,120 ****
  
  /* deletes a user from the UserList file */
  int
! afsconf_DeleteUser(adir, auser)
!      struct afsconf_dir *adir;
!      register char *auser;
  {
      char tbuffer[1024];
      char nbuffer[1024];
--- 105,111 ----
  
  /* deletes a user from the UserList file */
  int
! afsconf_DeleteUser(struct afsconf_dir *adir, register char *auser)
  {
      char tbuffer[1024];
      char nbuffer[1024];
***************
*** 204,214 ****
  
  /* returns nth super user from the UserList file */
  int
! afsconf_GetNthUser(adir, an, abuffer, abufferLen)
!      struct afsconf_dir *adir;
!      afs_int32 an;
!      char *abuffer;
!      afs_int32 abufferLen;
  {
      char tbuffer[256];
      register FILE *tf;
--- 195,202 ----
  
  /* returns nth super user from the UserList file */
  int
! afsconf_GetNthUser(struct afsconf_dir *adir, afs_int32 an, char *abuffer, 
! 		   afs_int32 abufferLen)
  {
      char tbuffer[256];
      register FILE *tf;
***************
*** 246,254 ****
  
  /* returns true iff user is in the UserList file */
  static int
! FindUser(adir, auser)
!      struct afsconf_dir *adir;
!      register char *auser;
  {
      char tbuffer[256];
      register bufio_p bp;
--- 234,240 ----
  
  /* returns true iff user is in the UserList file */
  static int
! FindUser(struct afsconf_dir *adir, register char *auser)
  {
      char tbuffer[256];
      register bufio_p bp;
***************
*** 280,288 ****
  
  /* add a user to the user list, checking for duplicates */
  int
! afsconf_AddUser(adir, aname)
!      struct afsconf_dir *adir;
!      char *aname;
  {
      FILE *tf;
      register afs_int32 code;
--- 266,272 ----
  
  /* add a user to the user list, checking for duplicates */
  int
! afsconf_AddUser(struct afsconf_dir *adir, char *aname)
  {
      FILE *tf;
      register afs_int32 code;
***************
*** 316,327 ****
  	otherwise returns NULL. The resulting string should be immediately
  	copied to other storage prior to release of mutex. */
  static char *
! CompFindUser(adir, name, sep, inst, realm)
!      struct afsconf_dir *adir;
!      char *name;
!      char *sep;
!      char *inst;
!      char *realm;
  {
      static char fullname[MAXKTCNAMELEN + MAXKTCNAMELEN + MAXKTCREALMLEN + 3];
  
--- 300,307 ----
  	otherwise returns NULL. The resulting string should be immediately
  	copied to other storage prior to release of mutex. */
  static char *
! CompFindUser(struct afsconf_dir *adir, char *name, char *sep, char *inst, 
! 	     char *realm)
  {
      static char fullname[MAXKTCNAMELEN + MAXKTCNAMELEN + MAXKTCREALMLEN + 3];
  
***************
*** 360,369 ****
      if a pointer is passed.
  */
  afs_int32
! afsconf_SuperUser(adir, acall, namep)
!      struct afsconf_dir *adir;
!      struct rx_call *acall;
!      char *namep;
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
--- 340,346 ----
      if a pointer is passed.
  */
  afs_int32
! afsconf_SuperUser(struct afsconf_dir *adir, struct rx_call *acall, char *namep)
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
***************
*** 431,437 ****
  	tmp = tcell_l;
  	while (*tmp) {
  	    *tmp = tolower(*tmp);
! 	    *tmp++;
  	}
  
  	/* determine local cell name. It's static, so will only get
--- 408,414 ----
  	tmp = tcell_l;
  	while (*tmp) {
  	    *tmp = tolower(*tmp);
! 	    tmp++;
  	}
  
  	/* determine local cell name. It's static, so will only get
Index: openafs/src/auth/writeconfig.c
diff -c openafs/src/auth/writeconfig.c:1.12 openafs/src/auth/writeconfig.c:1.12.4.2
*** openafs/src/auth/writeconfig.c:1.12	Sun Nov  6 04:29:41 2005
--- openafs/src/auth/writeconfig.c	Thu Nov  1 12:09:32 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/writeconfig.c,v 1.12 2005/11/06 09:29:41 jaltman Exp $");
  
  #include <afs/pthread_glock.h>
  #include <afs/afsutil.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/writeconfig.c,v 1.12.4.2 2007/11/01 16:09:32 shadow Exp $");
  
  #include <afs/pthread_glock.h>
  #include <afs/afsutil.h>
***************
*** 28,46 ****
  #endif
  #include <stdio.h>
  #include <errno.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef HAVE_FCNTL_H
  #include <fcntl.h>
  #endif
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
  #include "cellconfig.h"
  #include "keys.h"
  
--- 28,41 ----
  #endif
  #include <stdio.h>
  #include <errno.h>
  #include <string.h>
  #ifdef HAVE_FCNTL_H
  #include <fcntl.h>
  #endif
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
+ #include <rx/rxkad.h>
  #include "cellconfig.h"
  #include "keys.h"
  
***************
*** 49,56 ****
  */
  
  static int
! VerifyEntries(aci)
!      register struct afsconf_cell *aci;
  {
      register int i;
      register struct hostent *th;
--- 44,50 ----
  */
  
  static int
! VerifyEntries(register struct afsconf_cell *aci)
  {
      register int i;
      register struct hostent *th;
***************
*** 91,100 ****
     */
  
  int
! afsconf_SetCellInfo(adir, apath, acellInfo)
!      struct afsconf_dir *adir;
!      char *apath;
!      struct afsconf_cell *acellInfo;
  {
      afs_int32 code;
  
--- 85,92 ----
     */
  
  int
! afsconf_SetCellInfo(struct afsconf_dir *adir, const char *apath, 
! 		    struct afsconf_cell *acellInfo)
  {
      afs_int32 code;
  
***************
*** 103,113 ****
  }
  
  int
! afsconf_SetExtendedCellInfo(adir, apath, acellInfo, clones)
!      struct afsconf_dir *adir;
!      char *apath;
!      struct afsconf_cell *acellInfo;
!      char clones[];
  {
      register afs_int32 code;
      register int fd;
--- 95,103 ----
  }
  
  int
! afsconf_SetExtendedCellInfo(struct afsconf_dir *adir, 
! 			    const char *apath, 
! 			    struct afsconf_cell *acellInfo, char clones[])
  {
      register afs_int32 code;
      register int fd;
Index: openafs/src/auth/test/testcellconf.c
diff -c openafs/src/auth/test/testcellconf.c:1.7 openafs/src/auth/test/testcellconf.c:1.7.14.1
*** openafs/src/auth/test/testcellconf.c:1.7	Tue Jul 15 19:14:42 2003
--- openafs/src/auth/test/testcellconf.c	Wed Oct 31 18:31:59 2007
***************
*** 26,32 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/test/testcellconf.c,v 1.7 2003/07/15 23:14:42 shadow Exp $");
  
  #include <sys/types.h>
  #include <stddef.h>
--- 26,32 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/test/testcellconf.c,v 1.7.14.1 2007/10/31 22:31:59 shadow Exp $");
  
  #include <sys/types.h>
  #include <stddef.h>
***************
*** 40,49 ****
  #endif
  #include <afs/cellconfig.h>
  
! PrintOneCell(ainfo, arock, adir)
!      struct afsconf_cell *ainfo;
!      char *arock;
!      struct afsconf_dir *adir;
  {
      register int i;
      long temp;
--- 40,47 ----
  #endif
  #include <afs/cellconfig.h>
  
! int 
! PrintOneCell(struct afsconf_cell *ainfo, void *arock, struct afsconf_dir *adir)
  {
      register int i;
      long temp;
***************
*** 101,107 ****
  	    printf("failed to find afsprot service (%d)\n", code);
  	else {
  	    printf("AFSPROT service:\n");
! 	    PrintOneCell(&theCell, (char *)NULL, theDir);
  	}
  	code = afsconf_GetCellInfo(theDir, 0, "bozotheclown", &theCell);
  	if (code == 0)
--- 99,105 ----
  	    printf("failed to find afsprot service (%d)\n", code);
  	else {
  	    printf("AFSPROT service:\n");
! 	    PrintOneCell(&theCell, NULL, theDir);
  	}
  	code = afsconf_GetCellInfo(theDir, 0, "bozotheclown", &theCell);
  	if (code == 0)
Index: openafs/src/bozo/Makefile.in
diff -c openafs/src/bozo/Makefile.in:1.13 openafs/src/bozo/Makefile.in:1.13.14.1
*** openafs/src/bozo/Makefile.in:1.13	Fri Jun 27 10:12:06 2003
--- openafs/src/bozo/Makefile.in	Thu Nov  1 12:02:26 2007
***************
*** 48,63 ****
  bosint.cs.o: bosint.cs.c ${RPCINCLS}
  
  bosint.cs.c: bosint.xg
! 	${RXGEN} -x -C -o $@ ${srcdir}/bosint.xg
  
  bosint.ss.c: bosint.xg
! 	${RXGEN} -x -S -o $@ ${srcdir}/bosint.xg
  
  bosint.xdr.c: bosint.xg
! 	${RXGEN} -x -c -o $@ ${srcdir}/bosint.xg
  
  bosint.h: bosint.xg
! 	${RXGEN} -x -h -o $@ ${srcdir}/bosint.xg
  
  bosint.cs.c: bosint.h
  bosint.ss.c: bosint.h
--- 48,63 ----
  bosint.cs.o: bosint.cs.c ${RPCINCLS}
  
  bosint.cs.c: bosint.xg
! 	${RXGEN} -x -A -C -o $@ ${srcdir}/bosint.xg
  
  bosint.ss.c: bosint.xg
! 	${RXGEN} -x -A -S -o $@ ${srcdir}/bosint.xg
  
  bosint.xdr.c: bosint.xg
! 	${RXGEN} -x -A -c -o $@ ${srcdir}/bosint.xg
  
  bosint.h: bosint.xg
! 	${RXGEN} -x -A -h -o $@ ${srcdir}/bosint.xg
  
  bosint.cs.c: bosint.h
  bosint.ss.c: bosint.h
Index: openafs/src/bozo/bnode.c
diff -c openafs/src/bozo/bnode.c:1.19.2.3 openafs/src/bozo/bnode.c:1.19.2.5
*** openafs/src/bozo/bnode.c:1.19.2.3	Thu Dec 21 18:14:05 2006
--- openafs/src/bozo/bnode.c	Wed Oct 31 00:21:14 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bnode.c,v 1.19.2.3 2006/12/21 23:14:05 shadow Exp $");
  
  #include <stddef.h>
  #include <stdlib.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bnode.c,v 1.19.2.5 2007/10/31 04:21:14 shadow Exp $");
  
  #include <stddef.h>
  #include <stdlib.h>
***************
*** 28,41 ****
  #include <time.h>
  #endif
  #include <sys/stat.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include <afs/procmgmt.h>	/* signal(), kill(), wait(), etc. */
  #include <lwp.h>
--- 28,34 ----
***************
*** 43,48 ****
--- 36,42 ----
  #include <afs/afsutil.h>
  #include <afs/fileutil.h>
  #include "bnode.h"
+ #include "bosprototypes.h"
  
  #if defined(AFS_AIX_ENV) || defined(AFS_SUN4_ENV)
  /* All known versions of AIX lack WCOREDUMP but this works */
Index: openafs/src/bozo/bos.c
diff -c openafs/src/bozo/bos.c:1.23.2.2 openafs/src/bozo/bos.c:1.23.2.3
*** openafs/src/bozo/bos.c:1.23.2.2	Tue Apr 10 14:39:50 2007
--- openafs/src/bozo/bos.c	Wed Oct 31 00:09:23 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bos.c,v 1.23.2.2 2007/04/10 18:39:50 shadow Exp $");
  
  #include <afs/stds.h>
  #include <stdlib.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bos.c,v 1.23.2.3 2007/10/31 04:09:23 shadow Exp $");
  
  #include <afs/stds.h>
  #include <stdlib.h>
***************
*** 278,286 ****
      return tconn;
  }
  
! static
! SetAuth(as)
!      struct cmd_syndesc *as;
  {
      register afs_int32 code;
      register struct rx_connection *tconn;
--- 278,285 ----
      return tconn;
  }
  
! static int
! SetAuth(struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      register struct rx_connection *tconn;
***************
*** 349,357 ****
      }
  }
  
! static
! Prune(as)
!      register struct cmd_syndesc *as;
  {
      register afs_int32 code;
      register struct rx_connection *tconn;
--- 348,355 ----
      }
  }
  
! static int
! Prune(register struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      register struct rx_connection *tconn;
***************
*** 373,381 ****
      return code;
  }
  
! static
! Exec(as)
!      register struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
--- 371,378 ----
      return code;
  }
  
! static int
! Exec(register struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
***************
*** 387,395 ****
      return code;
  }
  
! static
! GetDate(as)
!      register struct cmd_syndesc *as;
  {
      register afs_int32 code;
      char tbuffer[256];
--- 384,391 ----
      return code;
  }
  
! static int
! GetDate(register struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      char tbuffer[256];
***************
*** 438,446 ****
      return 0;
  }
  
! static
! UnInstall(as)
!      register struct cmd_syndesc *as;
  {
      register afs_int32 code;
      char tbuffer[256];
--- 434,441 ----
      return 0;
  }
  
! static int
! UnInstall(register struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      char tbuffer[256];
***************
*** 497,505 ****
  	return BSTAT_NORMAL;
  }
  
! static
! Install(as)
!      struct cmd_syndesc *as;
  {
      struct rx_connection *tconn;
      register afs_int32 code;
--- 492,499 ----
  	return BSTAT_NORMAL;
  }
  
! static int
! Install(struct cmd_syndesc *as, void *arock)
  {
      struct rx_connection *tconn;
      register afs_int32 code;
***************
*** 555,563 ****
      return 0;
  }
  
! static
! Shutdown(as)
!      struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
--- 549,556 ----
      return 0;
  }
  
! static int
! Shutdown(struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
***************
*** 585,594 ****
      return 0;
  }
  
! static
! BlockScannerCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      register afs_int32 code;
      struct rx_connection *tconn;
--- 578,585 ----
      return 0;
  }
  
! static int
! BlockScannerCmd(struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      struct rx_connection *tconn;
***************
*** 603,612 ****
      return 0;
  }
  
! static
! UnBlockScannerCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      register afs_int32 code;
      struct rx_connection *tconn;
--- 594,601 ----
      return 0;
  }
  
! static int
! UnBlockScannerCmd(struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      struct rx_connection *tconn;
***************
*** 621,630 ****
      return 0;
  }
  
! static
! GetRestartCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      register afs_int32 code;
      struct ktime generalTime, newBinaryTime;
--- 610,617 ----
      return 0;
  }
  
! static int
! GetRestartCmd(struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      struct ktime generalTime, newBinaryTime;
***************
*** 666,675 ****
      return 0;
  }
  
! static
! SetRestartCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      afs_int32 count;
      register afs_int32 code;
--- 653,660 ----
      return 0;
  }
  
! static int
! SetRestartCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 count;
      register afs_int32 code;
***************
*** 708,716 ****
      return 0;
  }
  
! static
! Startup(as)
!      struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
--- 693,700 ----
      return 0;
  }
  
! static int
! Startup(struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
***************
*** 732,740 ****
      return 0;
  }
  
! static
! Restart(as)
!      struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
--- 716,723 ----
      return 0;
  }
  
! static int
! Restart(struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
***************
*** 778,786 ****
      return 0;
  }
  
! static
! SetCellName(as)
!      struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
--- 761,768 ----
      return 0;
  }
  
! static int
! SetCellName(struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
***************
*** 792,800 ****
      return 0;
  }
  
! static
! AddHost(as)
!      register struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
--- 774,781 ----
      return 0;
  }
  
! static int
! AddHost(register struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
***************
*** 820,828 ****
      return 0;
  }
  
! static
! RemoveHost(as)
!      register struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
--- 801,808 ----
      return 0;
  }
  
! static int
! RemoveHost(register struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
***************
*** 838,846 ****
      return 0;
  }
  
! static
! ListHosts(as)
!      register struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
--- 818,825 ----
      return 0;
  }
  
! static int
! ListHosts(register struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
***************
*** 869,877 ****
      return 0;
  }
  
! static
! AddKey(as)
!      register struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
--- 848,855 ----
      return 0;
  }
  
! static int
! AddKey(register struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
***************
*** 939,947 ****
      return 0;
  }
  
! static
! RemoveKey(as)
!      register struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
--- 917,924 ----
      return 0;
  }
  
! static int
! RemoveKey(register struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
***************
*** 960,968 ****
      return 0;
  }
  
! static
! ListKeys(as)
!      IN register struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
--- 937,944 ----
      return 0;
  }
  
! static int
! ListKeys(register struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
***************
*** 1001,1009 ****
      return 0;
  }
  
! static
! AddSUser(as)
!      register struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
--- 977,984 ----
      return 0;
  }
  
! static int
! AddSUser(register struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
***************
*** 1022,1030 ****
      return failed;
  }
  
! static
! RemoveSUser(as)
!      register struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register struct cmd_item *ti;
--- 997,1004 ----
      return failed;
  }
  
! static int
! RemoveSUser(register struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register struct cmd_item *ti;
***************
*** 1048,1056 ****
  }
  
  #define	NPERLINE    10		/* dudes to print per line */
! static
! ListSUsers(as)
!      register struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register int i;
--- 1022,1029 ----
  }
  
  #define	NPERLINE    10		/* dudes to print per line */
! static int
! ListSUsers(register struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register int i;
***************
*** 1088,1096 ****
      return 0;
  }
  
! static
! StatServer(as)
!      register struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
--- 1061,1068 ----
      return 0;
  }
  
! static int
! StatServer(register struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
***************
*** 1123,1131 ****
      return 0;
  }
  
! static
! CreateServer(as)
!      register struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
--- 1095,1102 ----
      return 0;
  }
  
! static int
! CreateServer(register struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
***************
*** 1156,1164 ****
      return code;
  }
  
! static
! DeleteServer(as)
!      register struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
--- 1127,1134 ----
      return code;
  }
  
! static int
! DeleteServer(register struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
***************
*** 1179,1187 ****
      return code;
  }
  
! static
! StartServer(as)
!      register struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
--- 1149,1156 ----
      return code;
  }
  
! static int
! StartServer(register struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
***************
*** 1198,1206 ****
      return code;
  }
  
! static
! StopServer(as)
!      register struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
--- 1167,1174 ----
      return code;
  }
  
! static int
! StopServer(register struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register afs_int32 code;
***************
*** 1458,1466 ****
      return code;
  }
  
! static
! GetLogCmd(as)
!      register struct cmd_syndesc *as;
  {
      struct rx_connection *tconn;
      register struct rx_call *tcall;
--- 1426,1433 ----
      return code;
  }
  
! static int
! GetLogCmd(register struct cmd_syndesc *as, void *arock)
  {
      struct rx_connection *tconn;
      register struct rx_call *tcall;
***************
*** 1497,1505 ****
      return code;
  }
  
! static
! SalvageCmd(as)
!      struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      register afs_int32 code, rc, i;
--- 1464,1471 ----
      return code;
  }
  
! static int
! SalvageCmd(struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      register afs_int32 code, rc, i;
***************
*** 1915,1923 ****
  }
  
  #ifdef BOS_RESTRICTED_MODE
! static
! GetRestrict(as)
!      struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      afs_int32 code, val;
--- 1881,1888 ----
  }
  
  #ifdef BOS_RESTRICTED_MODE
! static int
! GetRestrict(struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      afs_int32 code, val;
***************
*** 1932,1940 ****
      return 0;
  }
  
! static
! SetRestrict(as)
!      struct cmd_syndesc *as;
  {
      register struct rx_connection *tconn;
      afs_int32 code, val;
--- 1897,1904 ----
      return 0;
  }
  
! static int
! SetRestrict(struct cmd_syndesc *as, void *arock)
  {
      register struct rx_connection *tconn;
      afs_int32 code, val;
***************
*** 2007,2018 ****
      initialize_CMD_error_table();
      initialize_BZ_error_table();
  
!     ts = cmd_CreateSyntax("start", StartServer, 0, "start running a server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-instance", CMD_LIST, 0, "server process name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("stop", StopServer, 0, "halt a server instance");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-instance", CMD_LIST, 0, "server process name");
      cmd_Seek(ts, 8);
--- 1971,1982 ----
      initialize_CMD_error_table();
      initialize_BZ_error_table();
  
!     ts = cmd_CreateSyntax("start", StartServer, NULL, "start running a server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-instance", CMD_LIST, 0, "server process name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("stop", StopServer, NULL, "halt a server instance");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-instance", CMD_LIST, 0, "server process name");
      cmd_Seek(ts, 8);
***************
*** 2020,2026 ****
  		"wait for process to stop");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("status", StatServer, 0,
  			  "show server instance status");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-instance", CMD_LIST, CMD_OPTIONAL,
--- 1984,1990 ----
  		"wait for process to stop");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("status", StatServer, NULL,
  			  "show server instance status");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-instance", CMD_LIST, CMD_OPTIONAL,
***************
*** 2028,2034 ****
      cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL, "long status");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("shutdown", Shutdown, 0, "shutdown all processes");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-instance", CMD_LIST, CMD_OPTIONAL, "instances");
      cmd_Seek(ts, 8);
--- 1992,1998 ----
      cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL, "long status");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("shutdown", Shutdown, NULL, "shutdown all processes");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-instance", CMD_LIST, CMD_OPTIONAL, "instances");
      cmd_Seek(ts, 8);
***************
*** 2036,2047 ****
  		"wait for process to stop");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("startup", Startup, 0, "start all processes");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-instance", CMD_LIST, CMD_OPTIONAL, "instances");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("restart", Restart, 0, "restart processes");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-instance", CMD_LIST, CMD_OPTIONAL, "instances");
      cmd_AddParm(ts, "-bosserver", CMD_FLAG, CMD_OPTIONAL,
--- 2000,2011 ----
  		"wait for process to stop");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("startup", Startup, NULL, "start all processes");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-instance", CMD_LIST, CMD_OPTIONAL, "instances");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("restart", Restart, NULL, "restart processes");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-instance", CMD_LIST, CMD_OPTIONAL, "instances");
      cmd_AddParm(ts, "-bosserver", CMD_FLAG, CMD_OPTIONAL,
***************
*** 2051,2057 ****
  
  #ifndef OPBOS
  
!     ts = cmd_CreateSyntax("create", CreateServer, 0,
  			  "create a new server instance");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-instance", CMD_SINGLE, 0, "server process name");
--- 2015,2021 ----
  
  #ifndef OPBOS
  
!     ts = cmd_CreateSyntax("create", CreateServer, NULL,
  			  "create a new server instance");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-instance", CMD_SINGLE, 0, "server process name");
***************
*** 2061,2165 ****
  		"Notifier program");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("delete", DeleteServer, 0,
  			  "delete a server instance");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-instance", CMD_LIST, 0, "server process name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("adduser", AddSUser, 0,
  			  "add users to super-user list");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-user", CMD_LIST, 0, "user names");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("removeuser", RemoveSUser, 0,
  			  "remove users from super-user list");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-user", CMD_LIST, 0, "user names");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("listusers", ListSUsers, 0, "list super-users");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("addkey", AddKey, 0,
  			  "add keys to key dbase (kvno 999 is bcrypt)");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-key", CMD_SINGLE, CMD_OPTIONAL, "key");
      cmd_AddParm(ts, "-kvno", CMD_SINGLE, 0, "key version number");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("removekey", RemoveKey, 0,
  			  "remove keys from key dbase");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-kvno", CMD_LIST, 0, "key version number");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("listkeys", ListKeys, 0, "list keys");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-showkey", CMD_FLAG, CMD_OPTIONAL,
  		"show the actual key rather than the checksum");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("listhosts", ListHosts, 0, "get cell host list");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      add_std_args(ts);
      cmd_CreateAlias(ts, "getcell");
  
!     ts = cmd_CreateSyntax("setcellname", SetCellName, 0, "set cell name");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "cell name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("addhost", AddHost, 0, "add host to cell dbase");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-host", CMD_LIST, 0, "host name");
      cmd_AddParm(ts, "-clone", CMD_FLAG, CMD_OPTIONAL, "vote doesn't count");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("removehost", RemoveHost, 0,
  			  "remove host from cell dbase");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-host", CMD_LIST, 0, "host name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("setauth", SetAuth, 0,
  			  "set authentication required flag");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-authrequired", CMD_SINGLE, 0,
  		"on or off: authentication required for admin requests");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("install", Install, 0, "install program");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-file", CMD_LIST, 0, "files to install");
      cmd_AddParm(ts, "-dir", CMD_SINGLE, CMD_OPTIONAL, "destination dir");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("uninstall", UnInstall, 0, "uninstall program");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-file", CMD_LIST, 0, "files to uninstall");
      cmd_AddParm(ts, "-dir", CMD_SINGLE, CMD_OPTIONAL, "destination dir");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("getlog", GetLogCmd, 0, "examine log file");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-file", CMD_SINGLE, 0, "log file to examine");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("getdate", GetDate, 0, "get dates for programs");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-file", CMD_LIST, 0, "files to check");
      cmd_AddParm(ts, "-dir", CMD_SINGLE, CMD_OPTIONAL, "destination dir");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("exec", Exec, 0, "execute shell command on server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-cmd", CMD_SINGLE, 0, "command to execute");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("prune", Prune, 0, "prune server files");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-bak", CMD_FLAG, CMD_OPTIONAL, "delete .BAK files");
      cmd_AddParm(ts, "-old", CMD_FLAG, CMD_OPTIONAL, "delete .OLD files");
--- 2025,2129 ----
  		"Notifier program");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("delete", DeleteServer, NULL,
  			  "delete a server instance");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-instance", CMD_LIST, 0, "server process name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("adduser", AddSUser, NULL,
  			  "add users to super-user list");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-user", CMD_LIST, 0, "user names");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("removeuser", RemoveSUser, NULL,
  			  "remove users from super-user list");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-user", CMD_LIST, 0, "user names");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("listusers", ListSUsers, NULL, "list super-users");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("addkey", AddKey, NULL,
  			  "add keys to key dbase (kvno 999 is bcrypt)");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-key", CMD_SINGLE, CMD_OPTIONAL, "key");
      cmd_AddParm(ts, "-kvno", CMD_SINGLE, 0, "key version number");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("removekey", RemoveKey, NULL,
  			  "remove keys from key dbase");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-kvno", CMD_LIST, 0, "key version number");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("listkeys", ListKeys, NULL, "list keys");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-showkey", CMD_FLAG, CMD_OPTIONAL,
  		"show the actual key rather than the checksum");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("listhosts", ListHosts, NULL, "get cell host list");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      add_std_args(ts);
      cmd_CreateAlias(ts, "getcell");
  
!     ts = cmd_CreateSyntax("setcellname", SetCellName, NULL, "set cell name");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "cell name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("addhost", AddHost, NULL, "add host to cell dbase");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-host", CMD_LIST, 0, "host name");
      cmd_AddParm(ts, "-clone", CMD_FLAG, CMD_OPTIONAL, "vote doesn't count");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("removehost", RemoveHost, NULL,
  			  "remove host from cell dbase");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-host", CMD_LIST, 0, "host name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("setauth", SetAuth, NULL,
  			  "set authentication required flag");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-authrequired", CMD_SINGLE, 0,
  		"on or off: authentication required for admin requests");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("install", Install, NULL, "install program");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-file", CMD_LIST, 0, "files to install");
      cmd_AddParm(ts, "-dir", CMD_SINGLE, CMD_OPTIONAL, "destination dir");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("uninstall", UnInstall, NULL, "uninstall program");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-file", CMD_LIST, 0, "files to uninstall");
      cmd_AddParm(ts, "-dir", CMD_SINGLE, CMD_OPTIONAL, "destination dir");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("getlog", GetLogCmd, NULL, "examine log file");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-file", CMD_SINGLE, 0, "log file to examine");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("getdate", GetDate, NULL, "get dates for programs");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-file", CMD_LIST, 0, "files to check");
      cmd_AddParm(ts, "-dir", CMD_SINGLE, CMD_OPTIONAL, "destination dir");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("exec", Exec, NULL, "execute shell command on server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-cmd", CMD_SINGLE, 0, "command to execute");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("prune", Prune, NULL, "prune server files");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-bak", CMD_FLAG, CMD_OPTIONAL, "delete .BAK files");
      cmd_AddParm(ts, "-old", CMD_FLAG, CMD_OPTIONAL, "delete .OLD files");
***************
*** 2167,2173 ****
      cmd_AddParm(ts, "-all", CMD_FLAG, CMD_OPTIONAL, "delete all junk files");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("setrestart", SetRestartCmd, 0,
  			  "set restart times");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "machine name");
      cmd_AddParm(ts, "-time", CMD_SINGLE, CMD_REQUIRED,
--- 2131,2137 ----
      cmd_AddParm(ts, "-all", CMD_FLAG, CMD_OPTIONAL, "delete all junk files");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("setrestart", SetRestartCmd, NULL,
  			  "set restart times");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "machine name");
      cmd_AddParm(ts, "-time", CMD_SINGLE, CMD_REQUIRED,
***************
*** 2178,2189 ****
  		"set new binary restart time");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("getrestart", GetRestartCmd, 0,
  			  "get restart times");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "machine name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("salvage", SalvageCmd, 0,
  			  "salvage partition or volumes");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL,
--- 2142,2153 ----
  		"set new binary restart time");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("getrestart", GetRestartCmd, NULL,
  			  "get restart times");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "machine name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("salvage", SalvageCmd, NULL,
  			  "salvage partition or volumes");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL,
***************
*** 2241,2263 ****
  		"(MR-AFS) Numeric mask of residencies to be included in the salvage.  Do not use with -SalvageRemote or -SalvageArchival");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("blockscanner", BlockScannerCmd, 0,
  			  "block scanner daemon from making migration requests");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "machine name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("unblockscanner", UnBlockScannerCmd, 0,
  			  "allow scanner daemon to make migration requests again");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "machine name");
      add_std_args(ts);
  
  #ifdef BOS_RESTRICTED_MODE
!     ts = cmd_CreateSyntax("getrestricted", GetRestrict, 0,
  			  "get restrict mode");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("setrestricted", SetRestrict, 0,
  			  "set restrict mode");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-mode", CMD_SINGLE, 0, "mode to set");
--- 2205,2227 ----
  		"(MR-AFS) Numeric mask of residencies to be included in the salvage.  Do not use with -SalvageRemote or -SalvageArchival");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("blockscanner", BlockScannerCmd, NULL,
  			  "block scanner daemon from making migration requests");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "machine name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("unblockscanner", UnBlockScannerCmd, NULL,
  			  "allow scanner daemon to make migration requests again");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "machine name");
      add_std_args(ts);
  
  #ifdef BOS_RESTRICTED_MODE
!     ts = cmd_CreateSyntax("getrestricted", GetRestrict, NULL,
  			  "get restrict mode");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("setrestricted", SetRestrict, NULL,
  			  "set restrict mode");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-mode", CMD_SINGLE, 0, "mode to set");
Index: openafs/src/bozo/bos_util.c
diff -c openafs/src/bozo/bos_util.c:1.4 openafs/src/bozo/bos_util.c:1.4.14.1
*** openafs/src/bozo/bos_util.c:1.4	Tue Jul 15 19:14:43 2003
--- openafs/src/bozo/bos_util.c	Tue Oct 30 11:16:37 2007
***************
*** 23,41 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bos_util.c,v 1.4 2003/07/15 23:14:43 shadow Exp $");
  
  #include <sys/types.h>
  #include <netinet/in.h>
  #include <netdb.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include <afs/stds.h>
  #include <afs/afsutil.h>
--- 23,34 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bos_util.c,v 1.4.14.1 2007/10/30 15:16:37 shadow Exp $");
  
  #include <sys/types.h>
  #include <netinet/in.h>
  #include <netdb.h>
  #include <string.h>
  
  #include <afs/stds.h>
  #include <afs/afsutil.h>
Index: openafs/src/bozo/bosoprocs.c
diff -c openafs/src/bozo/bosoprocs.c:1.19.14.1 openafs/src/bozo/bosoprocs.c:1.19.14.3
*** openafs/src/bozo/bosoprocs.c:1.19.14.1	Thu Dec 21 18:14:05 2006
--- openafs/src/bozo/bosoprocs.c	Wed Oct 31 00:21:14 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bosoprocs.c,v 1.19.14.1 2006/12/21 23:14:05 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bosoprocs.c,v 1.19.14.3 2007/10/31 04:21:14 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 37,54 ****
  #include <afs/fileutil.h>
  #include <afs/ktime.h>
  #include <afs/audit.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include "bnode.h"
  #include "bosint.h"
! 
  
  extern struct ktime bozo_nextRestartKT, bozo_nextDayKT;
  
--- 37,47 ----
  #include <afs/fileutil.h>
  #include <afs/ktime.h>
  #include <afs/audit.h>
  #include <string.h>
  
  #include "bnode.h"
  #include "bosint.h"
! #include "bosprototypes.h"
  
  extern struct ktime bozo_nextRestartKT, bozo_nextDayKT;
  
Index: openafs/src/bozo/bosprototypes.h
diff -c /dev/null openafs/src/bozo/bosprototypes.h:1.1.2.2
*** /dev/null	Wed Nov  7 00:06:19 2007
--- openafs/src/bozo/bosprototypes.h	Wed Oct 31 00:21:14 2007
***************
*** 0 ****
--- 1,16 ----
+ /*
+  * Copyright 2000, International Business Machines Corporation and others.
+  * All Rights Reserved.
+  *
+  * This software has been released under the terms of the IBM Public
+  * License.  For details, see the LICENSE file in the top-level source
+  * directory or online at http://www.openafs.org/dl/license10.html
+  */
+ 
+ #ifndef _BOSPROTOTYPES_H_
+ #define _BOSPROTOTYPES_H_
+ 
+ /* bosserver.c */
+ void bozo_Log(char *format, ... );
+ 
+ #endif
Index: openafs/src/bozo/bosserver.c
diff -c openafs/src/bozo/bosserver.c:1.32.2.5 openafs/src/bozo/bosserver.c:1.32.2.6
*** openafs/src/bozo/bosserver.c:1.32.2.5	Thu Feb  8 20:00:19 2007
--- openafs/src/bozo/bosserver.c	Wed Oct 31 00:21:14 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bosserver.c,v 1.32.2.5 2007/02/09 01:00:19 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bosserver.c,v 1.32.2.6 2007/10/31 04:21:14 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 21,26 ****
--- 21,27 ----
  #include <string.h>
  #include <stdio.h>
  #include <stdlib.h>
+ #include <stdarg.h>
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #include <direct.h>
***************
*** 37,42 ****
--- 38,44 ----
  #include <rx/rx_globals.h>
  #include "bosint.h"
  #include "bnode.h"
+ #include "bosprototypes.h"
  #include <rx/rxkad.h>
  #include <afs/keys.h>
  #include <afs/ktime.h>
***************
*** 47,60 ****
  #include <afs/afs_args.h>
  #endif
  
- 
  #define BOZO_LWP_STACKSIZE	16000
  extern int BOZO_ExecuteRequest();
  extern int RXSTATS_ExecuteRequest();
  extern struct bnode_ops fsbnode_ops, dafsbnode_ops, ezbnode_ops, cronbnode_ops;
  
- void bozo_Log();
- 
  struct afsconf_dir *bozo_confdir = 0;	/* bozo configuration dir */
  static PROCESS bozo_pid;
  struct rx_securityClass *bozo_rxsc[3];
--- 49,59 ----
***************
*** 1072,1085 ****
  }
  
  void
! bozo_Log(char *a, char *b, char *c, char *d, char *e, char *f)
  {
      char tdate[27];
      time_t myTime;
  
      if (DoSyslog) {
  #ifndef AFS_NT40_ENV
! 	syslog(LOG_INFO, a, b, c, d, e, f);
  #endif
      } else {
  	myTime = time(0);
--- 1071,1087 ----
  }
  
  void
! bozo_Log(char *format, ...)
  {
      char tdate[27];
      time_t myTime;
+     va_list ap;
+ 
+     va_start(ap, format);
  
      if (DoSyslog) {
  #ifndef AFS_NT40_ENV
!         vsyslog(LOG_INFO, format, ap);
  #endif
      } else {
  	myTime = time(0);
***************
*** 1093,1103 ****
  	    printf("bosserver: WARNING: problem with %s\n",
  		   AFSDIR_SERVER_BOZLOG_FILEPATH);
  	    printf("%s ", tdate);
! 	    printf(a, b, c, d, e, f);
  	    fflush(stdout);
  	} else {
  	    fprintf(bozo_logFile, "%s ", tdate);
! 	    fprintf(bozo_logFile, a, b, c, d, e, f);
  
  	    /* close so rm BosLog works */
  	    fclose(bozo_logFile);
--- 1095,1105 ----
  	    printf("bosserver: WARNING: problem with %s\n",
  		   AFSDIR_SERVER_BOZLOG_FILEPATH);
  	    printf("%s ", tdate);
! 	    vprintf(format, ap);
  	    fflush(stdout);
  	} else {
  	    fprintf(bozo_logFile, "%s ", tdate);
! 	    vfprintf(bozo_logFile, format, ap);
  
  	    /* close so rm BosLog works */
  	    fclose(bozo_logFile);
Index: openafs/src/bozo/cronbnodeops.c
diff -c openafs/src/bozo/cronbnodeops.c:1.10 openafs/src/bozo/cronbnodeops.c:1.10.14.2
*** openafs/src/bozo/cronbnodeops.c:1.10	Sun Dec  7 17:49:18 2003
--- openafs/src/bozo/cronbnodeops.c	Wed Oct 31 00:21:14 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/cronbnodeops.c,v 1.10 2003/12/07 22:49:18 jaltman Exp $");
  
  #include <sys/types.h>
  #include <sys/stat.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/cronbnodeops.c,v 1.10.14.2 2007/10/31 04:21:14 shadow Exp $");
  
  #include <sys/types.h>
  #include <sys/stat.h>
***************
*** 23,41 ****
  #include <io.h>
  #endif
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <stdlib.h>
  
  #include <afs/ktime.h>
  #include <afs/afsutil.h>
  #include <afs/procmgmt.h>	/* signal(), kill(), wait(), etc. */
  #include "bnode.h"
  
  static int cron_timeout(), cron_getstat(), cron_setstat(), cron_delete();
  static int cron_procexit(), cron_getstring(), cron_getparm(), cron_restartp();
--- 23,36 ----
  #include <io.h>
  #endif
  
  #include <string.h>
  #include <stdlib.h>
  
  #include <afs/ktime.h>
  #include <afs/afsutil.h>
  #include <afs/procmgmt.h>	/* signal(), kill(), wait(), etc. */
  #include "bnode.h"
+ #include "bosprototypes.h"
  
  static int cron_timeout(), cron_getstat(), cron_setstat(), cron_delete();
  static int cron_procexit(), cron_getstring(), cron_getparm(), cron_restartp();
Index: openafs/src/bozo/ezbnodeops.c
diff -c openafs/src/bozo/ezbnodeops.c:1.8 openafs/src/bozo/ezbnodeops.c:1.8.14.2
*** openafs/src/bozo/ezbnodeops.c:1.8	Tue Jul 15 19:14:43 2003
--- openafs/src/bozo/ezbnodeops.c	Wed Oct 31 00:21:14 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/ezbnodeops.c,v 1.8 2003/07/15 23:14:43 shadow Exp $");
  
  #include <sys/types.h>
  #include <errno.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/ezbnodeops.c,v 1.8.14.2 2007/10/31 04:21:14 shadow Exp $");
  
  #include <sys/types.h>
  #include <errno.h>
***************
*** 21,38 ****
  #include <io.h>
  #endif
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <stdlib.h>
  
  #include <afs/afsutil.h>
  #include <afs/procmgmt.h>	/* signal(), kill(), wait(), etc. */
  #include "bnode.h"
  
  static int ez_timeout(), ez_getstat(), ez_setstat(), ez_delete();
  static int ez_procexit(), ez_getstring(), ez_getparm(), ez_restartp();
--- 21,33 ----
  #include <io.h>
  #endif
  
  #include <string.h>
  #include <stdlib.h>
  
  #include <afs/afsutil.h>
  #include <afs/procmgmt.h>	/* signal(), kill(), wait(), etc. */
  #include "bnode.h"
+ #include "bosprototypes.h"
  
  static int ez_timeout(), ez_getstat(), ez_setstat(), ez_delete();
  static int ez_procexit(), ez_getstring(), ez_getparm(), ez_restartp();
Index: openafs/src/bozo/fsbnodeops.c
diff -c openafs/src/bozo/fsbnodeops.c:1.15 openafs/src/bozo/fsbnodeops.c:1.15.2.2
*** openafs/src/bozo/fsbnodeops.c:1.15	Mon Mar 20 12:29:52 2006
--- openafs/src/bozo/fsbnodeops.c	Wed Oct 31 00:21:14 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/fsbnodeops.c,v 1.15 2006/03/20 17:29:52 jaltman Exp $");
  
  #include <sys/types.h>
  #include <lwp.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/fsbnodeops.c,v 1.15.2.2 2007/10/31 04:21:14 shadow Exp $");
  
  #include <sys/types.h>
  #include <lwp.h>
***************
*** 26,38 ****
  #else
  #include <sys/file.h>
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <stdlib.h>
  
  #endif /* AFS_NT40_ENV */
--- 26,32 ----
***************
*** 40,46 ****
  #include <afs/procmgmt.h>	/* signal(), kill(), wait(), etc. */
  #include <afs/afsutil.h>
  #include "bnode.h"
! 
  
  static int emergency = 0;
  
--- 34,40 ----
  #include <afs/procmgmt.h>	/* signal(), kill(), wait(), etc. */
  #include <afs/afsutil.h>
  #include "bnode.h"
! #include "bosprototypes.h"
  
  static int emergency = 0;
  
Index: openafs/src/bu_utils/fms.c
diff -c openafs/src/bu_utils/fms.c:1.7 openafs/src/bu_utils/fms.c:1.7.14.1
*** openafs/src/bu_utils/fms.c:1.7	Tue Jul 15 19:14:44 2003
--- openafs/src/bu_utils/fms.c	Wed Oct 31 00:09:24 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bu_utils/fms.c,v 1.7 2003/07/15 23:14:44 shadow Exp $");
  
  #undef	IN
  #include <stdio.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bu_utils/fms.c,v 1.7.14.1 2007/10/31 04:09:24 shadow Exp $");
  
  #undef	IN
  #include <stdio.h>
***************
*** 35,41 ****
  /* prototypes */
  int fileMark(usd_handle_t hTape);
  int fileMarkSize(char *tapeDevice);
! void tt_fileMarkSize(struct cmd_syndesc *as, char *arock);
  
  #define ERROR(evalue)                                           \
          {                                                       \
--- 35,41 ----
  /* prototypes */
  int fileMark(usd_handle_t hTape);
  int fileMarkSize(char *tapeDevice);
! static int tt_fileMarkSize(struct cmd_syndesc *as, void *arock);
  
  #define ERROR(evalue)                                           \
          {                                                       \
***************
*** 64,86 ****
      sigaction(SIGINT, &intaction, &oldaction);
  
      cptr =
! 	cmd_CreateSyntax(NULL, tt_fileMarkSize, 0,
  			 "write a tape full of file marks");
      cmd_AddParm(cptr, "-tape", CMD_SINGLE, CMD_REQUIRED, "tape special file");
  
      cmd_Dispatch(argc, argv);
  }
  
! void
! tt_fileMarkSize(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      char *tapeDevice;
  
      tapeDevice = as->parms[0].items->data;
  
      fileMarkSize(tapeDevice);
  }
  
  
--- 64,86 ----
      sigaction(SIGINT, &intaction, &oldaction);
  
      cptr =
! 	cmd_CreateSyntax(NULL, tt_fileMarkSize, NULL,
  			 "write a tape full of file marks");
      cmd_AddParm(cptr, "-tape", CMD_SINGLE, CMD_REQUIRED, "tape special file");
  
      cmd_Dispatch(argc, argv);
  }
  
! static int
! tt_fileMarkSize(struct cmd_syndesc *as, void *arock)
  {
      char *tapeDevice;
  
      tapeDevice = as->parms[0].items->data;
  
      fileMarkSize(tapeDevice);
+ 
+     return 0;
  }
  
  
Index: openafs/src/bubasics/Makefile.in
diff -c openafs/src/bubasics/Makefile.in:1.8 openafs/src/bubasics/Makefile.in:1.8.14.1
*** openafs/src/bubasics/Makefile.in:1.8	Sat Jan 11 02:33:57 2003
--- openafs/src/bubasics/Makefile.in	Thu Nov  1 12:02:28 2007
***************
*** 18,33 ****
  	${RANLIB} libbubasics.a
  
  butc.xdr.c: butc.xg
! 	${RXGEN} -c -o $@ ${srcdir}/butc.xg
  
  butc.ss.c: butc.xg
! 	${RXGEN} -S -o $@ ${srcdir}/butc.xg
  
  butc.cs.c: butc.xg
! 	${RXGEN} -C -o $@ ${srcdir}/butc.xg
  
  butc.h: butc.xg
! 	${RXGEN} -h -o $@ ${srcdir}/butc.xg
  
  butc.xdr.c: butc.h
  butc.cs.c: butc.h
--- 18,33 ----
  	${RANLIB} libbubasics.a
  
  butc.xdr.c: butc.xg
! 	${RXGEN} -A -c -o $@ ${srcdir}/butc.xg
  
  butc.ss.c: butc.xg
! 	${RXGEN} -A -S -o $@ ${srcdir}/butc.xg
  
  butc.cs.c: butc.xg
! 	${RXGEN} -A -C -o $@ ${srcdir}/butc.xg
  
  butc.h: butc.xg
! 	${RXGEN} -A -h -o $@ ${srcdir}/butc.xg
  
  butc.xdr.c: butc.h
  butc.cs.c: butc.h
Index: openafs/src/bucoord/bc.p.h
diff -c openafs/src/bucoord/bc.p.h:1.3.14.3 openafs/src/bucoord/bc.p.h:1.3.14.4
*** openafs/src/bucoord/bc.p.h:1.3.14.3	Fri Jan  5 01:08:02 2007
--- openafs/src/bucoord/bc.p.h	Tue Oct 30 11:16:37 2007
***************
*** 13,23 ****
  #ifdef HAVE_STDIO_H
  #include <stdio.h>
  #endif /* HAVE_STDIO_H */
! #if defined(HAVE_STRING_H)
! # include <string.h>
! #elif defined(HAVE_STRINGS_H)
! # include <strings.h>
! #endif /* HAVE_STRING_H */
  
  /*
   * Represents a host in the config database.
--- 13,20 ----
  #ifdef HAVE_STDIO_H
  #include <stdio.h>
  #endif /* HAVE_STDIO_H */
! 
! #include <string.h>
  
  /*
   * Represents a host in the config database.
Index: openafs/src/bucoord/commands.c
diff -c openafs/src/bucoord/commands.c:1.18.2.4 openafs/src/bucoord/commands.c:1.18.2.5
*** openafs/src/bucoord/commands.c:1.18.2.4	Sat Jun 23 11:14:53 2007
--- openafs/src/bucoord/commands.c	Wed Oct 31 00:09:24 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/commands.c,v 1.18.2.4 2007/06/23 15:14:53 shadow Exp $");
  
  #include <afs/stds.h>
  #if defined(AFS_LINUX24_ENV)
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/commands.c,v 1.18.2.5 2007/10/31 04:09:24 shadow Exp $");
  
  #include <afs/stds.h>
  #if defined(AFS_LINUX24_ENV)
***************
*** 822,831 ****
  /* bc_GetTapeStatusCmd
   *	display status of all tasks on a particular tape coordinator
   */
! 
! bc_GetTapeStatusCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      afs_int32 code;
      struct rx_connection *tconn;
--- 822,829 ----
  /* bc_GetTapeStatusCmd
   *	display status of all tasks on a particular tape coordinator
   */
! int
! bc_GetTapeStatusCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct rx_connection *tconn;
***************
*** 920,929 ****
   * parameters
   *	ignored - a null "as" prints only jobs.
   */
! 
! bc_JobsCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      afs_int32 prevTime;
      dlqlinkP ptr;
--- 918,925 ----
   * parameters
   *	ignored - a null "as" prints only jobs.
   */
! int
! bc_JobsCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 prevTime;
      dlqlinkP ptr;
***************
*** 1037,1045 ****
      return 0;
  }
  
! bc_KillCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      afs_int32 i;
      afs_int32 slot;
--- 1033,1040 ----
      return 0;
  }
  
! int
! bc_KillCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 i;
      afs_int32 slot;
***************
*** 1111,1119 ****
  }
  
  /* restore a volume or volumes */
! bc_VolRestoreCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      /*
       * parm 0 is the new server to restore to
--- 1106,1113 ----
  }
  
  /* restore a volume or volumes */
! int
! bc_VolRestoreCmd(struct cmd_syndesc *as, void *arock)
  {
      /*
       * parm 0 is the new server to restore to
***************
*** 1266,1274 ****
   *	various optional
   */
  
! bc_DiskRestoreCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      struct bc_volumeSet tvolumeSet;	/* temporary volume set for EvalVolumeSet call */
      struct bc_volumeEntry tvolumeEntry;	/* entry within the volume set */
--- 1260,1267 ----
   *	various optional
   */
  
! int
! bc_DiskRestoreCmd(struct cmd_syndesc *as, void *arock)
  {
      struct bc_volumeSet tvolumeSet;	/* temporary volume set for EvalVolumeSet call */
      struct bc_volumeEntry tvolumeEntry;	/* entry within the volume set */
***************
*** 1423,1431 ****
   *	restore a volumeset or list of volumes.
   */
  
! bc_VolsetRestoreCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      int oldFlag;
      long fromDate;
--- 1416,1423 ----
   *	restore a volumeset or list of volumes.
   */
  
! int
! bc_VolsetRestoreCmd(struct cmd_syndesc *as, void *arock)
  {
      int oldFlag;
      long fromDate;
***************
*** 1606,1614 ****
  int dontExecute;
  
  int
! bc_DumpCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {				/*bc_DumpCmd */
      static char rn[] = "bc_DumpCmd";	/*Routine name */
      char *dumpPath, *vsName;	/*Ptrs to various names */
--- 1598,1604 ----
  int dontExecute;
  
  int
! bc_DumpCmd(struct cmd_syndesc *as, void *arock)
  {				/*bc_DumpCmd */
      static char rn[] = "bc_DumpCmd";	/*Routine name */
      char *dumpPath, *vsName;	/*Ptrs to various names */
***************
*** 1986,1995 ****
   * parameters:
   *	ignored
   */
! 
! bc_QuitCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      int i;
      struct bc_dumpTask *td;
--- 1976,1983 ----
   * parameters:
   *	ignored
   */
! int
! bc_QuitCmd(struct cmd_syndesc *as, void *arock)
  {
      int i;
      struct bc_dumpTask *td;
***************
*** 2038,2047 ****
   *	Labels a tape i.e. request the tape coordinator to perform this
   *	operation
   */
! 
! bc_LabelTapeCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      char *tapename = 0, *pname = 0;
      afs_int32 size;
--- 2026,2033 ----
   *	Labels a tape i.e. request the tape coordinator to perform this
   *	operation
   */
! int
! bc_LabelTapeCmd(struct cmd_syndesc *as, void *arock)
  {
      char *tapename = 0, *pname = 0;
      afs_int32 size;
***************
*** 2101,2110 ****
   * params:
   *	optional port number
   */
! 
! bc_ReadLabelCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      afs_int32 code;
      afs_int32 port = 0;
--- 2087,2094 ----
   * params:
   *	optional port number
   */
! int
! bc_ReadLabelCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      afs_int32 port = 0;
***************
*** 2131,2140 ****
   *	read content information from dump tapes, and if user desires,
   *	add it to the database
   */
! 
! bc_ScanDumpsCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      afs_int32 port = 0;
      afs_int32 dbAddFlag = 0;
--- 2115,2122 ----
   *	read content information from dump tapes, and if user desires,
   *	add it to the database
   */
! int
! bc_ScanDumpsCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 port = 0;
      afs_int32 dbAddFlag = 0;
***************
*** 2242,2251 ****
   *	Currently a single option, volumename to search for. Reports
   *	all dumps containing the specified volume
   */
! 
! bc_dblookupCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      struct cmd_item *ciptr;
      afs_int32 code;
--- 2224,2231 ----
   *	Currently a single option, volumename to search for. Reports
   *	all dumps containing the specified volume
   */
! int
! bc_dblookupCmd(struct cmd_syndesc *as, void *arock)
  {
      struct cmd_item *ciptr;
      afs_int32 code;
***************
*** 2261,2270 ****
  
  
  /* for ubik version */
! 
! bc_dbVerifyCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      afs_int32 status;
      afs_int32 orphans;
--- 2241,2248 ----
  
  
  /* for ubik version */
! int
! bc_dbVerifyCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 status;
      afs_int32 orphans;
***************
*** 2420,2429 ****
   * entry:
   *	dump id - single required arg as param 0.
   */
! 
! bc_deleteDumpCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      afs_uint32 dumpid;
      afs_int32 code = 0;
--- 2398,2405 ----
   * entry:
   *	dump id - single required arg as param 0.
   */
! int
! bc_deleteDumpCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_uint32 dumpid;
      afs_int32 code = 0;
***************
*** 2576,2584 ****
      return (rcode);
  }
  
! bc_saveDbCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      struct rx_connection *tconn;
      afs_int32 portOffset = 0;
--- 2552,2559 ----
      return (rcode);
  }
  
! int
! bc_saveDbCmd(struct cmd_syndesc *as, void *arock)
  {
      struct rx_connection *tconn;
      afs_int32 portOffset = 0;
***************
*** 2646,2654 ****
      return (code);
  }
  
! bc_restoreDbCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      struct rx_connection *tconn;
      afs_int32 portOffset = 0;
--- 2621,2628 ----
      return (code);
  }
  
! int
! bc_restoreDbCmd(struct cmd_syndesc *as, void *arock)
  {
      struct rx_connection *tconn;
      afs_int32 portOffset = 0;
***************
*** 3151,3159 ****
   *	as - name of tape
   *	arock -
   */
! bc_dumpInfoCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      afs_int32 dumpid;
      afs_int32 detailFlag;
--- 3125,3132 ----
   *	as - name of tape
   *	arock -
   */
! int
! bc_dumpInfoCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 dumpid;
      afs_int32 detailFlag;
Index: openafs/src/bucoord/dump_sched.c
diff -c openafs/src/bucoord/dump_sched.c:1.9.6.3 openafs/src/bucoord/dump_sched.c:1.9.6.4
*** openafs/src/bucoord/dump_sched.c:1.9.6.3	Tue Apr 10 14:39:50 2007
--- openafs/src/bucoord/dump_sched.c	Wed Oct 31 00:09:24 2007
***************
*** 16,22 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/dump_sched.c,v 1.9.6.3 2007/04/10 18:39:50 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
--- 16,22 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/dump_sched.c,v 1.9.6.4 2007/10/31 04:09:24 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
***************
*** 56,68 ****
   *	parm 1: expiration date (list)
   */
  
! afs_int32
! bc_AddDumpCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      register char *dname;	/* dump schedule name */
!     register afs_int32 code;
      afs_int32 expType, expDate;
      register struct cmd_item *ti;
      udbClientTextP ctPtr;
--- 56,66 ----
   *	parm 1: expiration date (list)
   */
  
! int
! bc_AddDumpCmd(struct cmd_syndesc *as, void *arock)
  {
      register char *dname;	/* dump schedule name */
!     register int code;
      afs_int32 expType, expDate;
      register struct cmd_item *ti;
      udbClientTextP ctPtr;
***************
*** 146,161 ****
   *	delete a dump schedule
   */
  
! afs_int32
! bc_DeleteDumpCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      /* parm 0 is vol set name
       * parm 1 is dump schedule name
       */
      register char *dname;
!     register afs_int32 code;
      udbClientTextP ctPtr;
  
      /* lock schedules and check validity */
--- 144,157 ----
   *	delete a dump schedule
   */
  
! int
! bc_DeleteDumpCmd(struct cmd_syndesc *as, void *arock)
  {
      /* parm 0 is vol set name
       * parm 1 is dump schedule name
       */
      register char *dname;
!     register int code;
      udbClientTextP ctPtr;
  
      /* lock schedules and check validity */
***************
*** 265,275 ****
   *      ignored
   */
  
! afs_int32
! bc_ListDumpScheduleCmd(struct cmd_syndesc *as, char *arock)
  {
      /* no parms */
!     afs_int32 code;
      register struct bc_dumpSchedule *tdump;
  
      /* first check to see if schedules must be updated */
--- 261,271 ----
   *      ignored
   */
  
! int
! bc_ListDumpScheduleCmd(struct cmd_syndesc *as, void *arock)
  {
      /* no parms */
!     int code;
      register struct bc_dumpSchedule *tdump;
  
      /* first check to see if schedules must be updated */
***************
*** 298,314 ****
   *	parm 1: expiration date (list)
   */
  
! afs_int32
! bc_SetExpCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      register char *dname;	/* dump schedule name */
      register struct cmd_item *ti;
      struct bc_dumpSchedule *node, *parent;
      afs_int32 expType, expDate;
      udbClientTextP ctPtr;
!     register afs_int32 code;
  
      afs_int32 bc_ParseExpiration();
  
--- 294,308 ----
   *	parm 1: expiration date (list)
   */
  
! int
! bc_SetExpCmd(struct cmd_syndesc *as, void *arock)
  {
      register char *dname;	/* dump schedule name */
      register struct cmd_item *ti;
      struct bc_dumpSchedule *node, *parent;
      afs_int32 expType, expDate;
      udbClientTextP ctPtr;
!     register int code;
  
      afs_int32 bc_ParseExpiration();
  
Index: openafs/src/bucoord/main.c
diff -c openafs/src/bucoord/main.c:1.16.14.3 openafs/src/bucoord/main.c:1.16.14.4
*** openafs/src/bucoord/main.c:1.16.14.3	Sat Jun 23 11:14:53 2007
--- openafs/src/bucoord/main.c	Wed Oct 31 00:09:24 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/main.c,v 1.16.14.3 2007/06/23 15:14:53 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/main.c,v 1.16.14.4 2007/10/31 04:09:24 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 326,333 ****
   */
  
  static int
! MyBeforeProc(as)
!      register struct cmd_syndesc *as;
  {
      afs_int32 code;
  
--- 326,332 ----
   */
  
  static int
! MyBeforeProc(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
  
***************
*** 462,470 ****
  }
  
  int
! bc_interactCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      interact = 1;
      return 0;
--- 461,467 ----
  }
  
  int
! bc_interactCmd(struct cmd_syndesc *as, void *arock)
  {
      interact = 1;
      return 0;
***************
*** 516,522 ****
  
      cmd_SetBeforeProc(MyBeforeProc, NULL);
  
!     ts = cmd_CreateSyntax("dump", bc_DumpCmd, 0, "start dump");
      cmd_AddParm(ts, "-volumeset", CMD_SINGLE, CMD_OPTIONAL,
  		"volume set name");
      cmd_AddParm(ts, "-dump", CMD_SINGLE, CMD_OPTIONAL, "dump level name");
--- 513,519 ----
  
      cmd_SetBeforeProc(MyBeforeProc, NULL);
  
!     ts = cmd_CreateSyntax("dump", bc_DumpCmd, NULL, "start dump");
      cmd_AddParm(ts, "-volumeset", CMD_SINGLE, CMD_OPTIONAL,
  		"volume set name");
      cmd_AddParm(ts, "-dump", CMD_SINGLE, CMD_OPTIONAL, "dump level name");
***************
*** 530,536 ****
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("volrestore", bc_VolRestoreCmd, 0,
  			  "restore volume");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"destination machine");
--- 527,533 ----
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("volrestore", bc_VolRestoreCmd, NULL,
  			  "restore volume");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"destination machine");
***************
*** 549,555 ****
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("diskrestore", bc_DiskRestoreCmd, 0,
  			  "restore partition");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"machine to restore");
--- 546,552 ----
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("diskrestore", bc_DiskRestoreCmd, NULL,
  			  "restore partition");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"machine to restore");
***************
*** 567,575 ****
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("quit", bc_QuitCmd, 0, "leave the program");
  
!     ts = cmd_CreateSyntax("volsetrestore", bc_VolsetRestoreCmd, 0,
  			  "restore a set of volumes");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_OPTIONAL, "volume set name");
      cmd_AddParm(ts, "-file", CMD_SINGLE, CMD_OPTIONAL, "file name");
--- 564,572 ----
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("quit", bc_QuitCmd, NULL, "leave the program");
  
!     ts = cmd_CreateSyntax("volsetrestore", bc_VolsetRestoreCmd, NULL,
  			  "restore a set of volumes");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_OPTIONAL, "volume set name");
      cmd_AddParm(ts, "-file", CMD_SINGLE, CMD_OPTIONAL, "file name");
***************
*** 580,586 ****
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("addhost", bc_AddHostCmd, 0, "add host to config");
      cmd_AddParm(ts, "-tapehost", CMD_SINGLE, CMD_REQUIRED,
  		"tape machine name");
      cmd_AddParm(ts, "-portoffset", CMD_SINGLE, CMD_OPTIONAL,
--- 577,583 ----
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("addhost", bc_AddHostCmd, NULL, "add host to config");
      cmd_AddParm(ts, "-tapehost", CMD_SINGLE, CMD_REQUIRED,
  		"tape machine name");
      cmd_AddParm(ts, "-portoffset", CMD_SINGLE, CMD_OPTIONAL,
***************
*** 588,594 ****
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("delhost", bc_DeleteHostCmd, 0,
  			  "delete host to config");
      cmd_AddParm(ts, "-tapehost", CMD_SINGLE, CMD_REQUIRED,
  		"tape machine name");
--- 585,591 ----
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("delhost", bc_DeleteHostCmd, NULL,
  			  "delete host to config");
      cmd_AddParm(ts, "-tapehost", CMD_SINGLE, CMD_REQUIRED,
  		"tape machine name");
***************
*** 597,625 ****
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("listhosts", bc_ListHostsCmd, 0,
  			  "list config hosts");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("jobs", bc_JobsCmd, 0, "list running jobs");
  
!     ts = cmd_CreateSyntax("kill", bc_KillCmd, 0, "kill running job");
      cmd_AddParm(ts, "-id", CMD_SINGLE, CMD_REQUIRED,
  		"job ID or dump set name");
  
!     ts = cmd_CreateSyntax("listvolsets", bc_ListVolSetCmd, 0,
  			  "list volume sets");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_OPTIONAL, "volume set name");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("listdumps", bc_ListDumpScheduleCmd, 0,
  			  "list dump schedules");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("addvolset", bc_AddVolSetCmd, 0,
  			  "create a new volume set");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_REQUIRED, "volume set name");
      cmd_AddParm(ts, "-temporary", CMD_FLAG, CMD_OPTIONAL,
--- 594,622 ----
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("listhosts", bc_ListHostsCmd, NULL,
  			  "list config hosts");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("jobs", bc_JobsCmd, NULL, "list running jobs");
  
!     ts = cmd_CreateSyntax("kill", bc_KillCmd, NULL, "kill running job");
      cmd_AddParm(ts, "-id", CMD_SINGLE, CMD_REQUIRED,
  		"job ID or dump set name");
  
!     ts = cmd_CreateSyntax("listvolsets", bc_ListVolSetCmd, NULL,
  			  "list volume sets");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_OPTIONAL, "volume set name");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("listdumps", bc_ListDumpScheduleCmd, NULL,
  			  "list dump schedules");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("addvolset", bc_AddVolSetCmd, NULL,
  			  "create a new volume set");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_REQUIRED, "volume set name");
      cmd_AddParm(ts, "-temporary", CMD_FLAG, CMD_OPTIONAL,
***************
*** 627,646 ****
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("status", bc_GetTapeStatusCmd, 0,
  			  "get tape coordinator status");
      cmd_AddParm(ts, "-portoffset", CMD_SINGLE, CMD_OPTIONAL,
  		"TC port offset");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("delvolset", bc_DeleteVolSetCmd, 0,
  			  "delete a volume set");
      cmd_AddParm(ts, "-name", CMD_LIST, CMD_REQUIRED, "volume set name");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("addvolentry", bc_AddVolEntryCmd, 0,
  			  "add a new volume entry");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_REQUIRED, "volume set name");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "machine name");
--- 624,643 ----
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("status", bc_GetTapeStatusCmd, NULL,
  			  "get tape coordinator status");
      cmd_AddParm(ts, "-portoffset", CMD_SINGLE, CMD_OPTIONAL,
  		"TC port offset");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("delvolset", bc_DeleteVolSetCmd, NULL,
  			  "delete a volume set");
      cmd_AddParm(ts, "-name", CMD_LIST, CMD_REQUIRED, "volume set name");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("addvolentry", bc_AddVolEntryCmd, NULL,
  			  "add a new volume entry");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_REQUIRED, "volume set name");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "machine name");
***************
*** 650,675 ****
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("delvolentry", bc_DeleteVolEntryCmd, 0,
  			  "delete a volume set sub-entry");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_REQUIRED, "volume set name");
      cmd_AddParm(ts, "-entry", CMD_SINGLE, CMD_REQUIRED, "volume set index");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("adddump", bc_AddDumpCmd, 0, "add dump schedule");
      cmd_AddParm(ts, "-dump", CMD_LIST, CMD_REQUIRED, "dump level name");
      cmd_AddParm(ts, "-expires", CMD_LIST, CMD_OPTIONAL, "expiration date");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("deldump", bc_DeleteDumpCmd, 0,
  			  "delete dump schedule");
      cmd_AddParm(ts, "-dump", CMD_SINGLE, CMD_REQUIRED, "dump level name");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("labeltape", bc_LabelTapeCmd, 0, "label a tape");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_OPTIONAL,
  		"AFS tape name, defaults to NULL");
      cmd_AddParm(ts, "-size", CMD_SINGLE, CMD_OPTIONAL,
--- 647,672 ----
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("delvolentry", bc_DeleteVolEntryCmd, NULL,
  			  "delete a volume set sub-entry");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_REQUIRED, "volume set name");
      cmd_AddParm(ts, "-entry", CMD_SINGLE, CMD_REQUIRED, "volume set index");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("adddump", bc_AddDumpCmd, NULL, "add dump schedule");
      cmd_AddParm(ts, "-dump", CMD_LIST, CMD_REQUIRED, "dump level name");
      cmd_AddParm(ts, "-expires", CMD_LIST, CMD_OPTIONAL, "expiration date");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("deldump", bc_DeleteDumpCmd, NULL,
  			  "delete dump schedule");
      cmd_AddParm(ts, "-dump", CMD_SINGLE, CMD_REQUIRED, "dump level name");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("labeltape", bc_LabelTapeCmd, NULL, "label a tape");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_OPTIONAL,
  		"AFS tape name, defaults to NULL");
      cmd_AddParm(ts, "-size", CMD_SINGLE, CMD_OPTIONAL,
***************
*** 681,694 ****
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("readlabel", bc_ReadLabelCmd, 0,
  			  "read the label on tape");
      cmd_AddParm(ts, "-portoffset", CMD_SINGLE, CMD_OPTIONAL,
  		"TC port offset");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("scantape", bc_ScanDumpsCmd, 0,
  			  "dump information recovery from tape");
      cmd_AddParm(ts, "-dbadd", CMD_FLAG, CMD_OPTIONAL,
  		"add information to the database");
--- 678,691 ----
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("readlabel", bc_ReadLabelCmd, NULL,
  			  "read the label on tape");
      cmd_AddParm(ts, "-portoffset", CMD_SINGLE, CMD_OPTIONAL,
  		"TC port offset");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("scantape", bc_ScanDumpsCmd, NULL,
  			  "dump information recovery from tape");
      cmd_AddParm(ts, "-dbadd", CMD_FLAG, CMD_OPTIONAL,
  		"add information to the database");
***************
*** 697,730 ****
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("volinfo", bc_dblookupCmd, 0,
  			  "query the backup database");
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED, "volume name");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("setexp", bc_SetExpCmd, 0,
  			  "set/clear dump expiration dates");
      cmd_AddParm(ts, "-dump", CMD_LIST, CMD_REQUIRED, "dump level name");
      cmd_AddParm(ts, "-expires", CMD_LIST, CMD_OPTIONAL, "expiration date");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("savedb", bc_saveDbCmd, 0, "save backup database");
      cmd_AddParm(ts, "-portoffset", CMD_SINGLE, CMD_OPTIONAL,
  		"TC port offset");
      cmd_AddParm(ts, "-archive", CMD_LIST, CMD_OPTIONAL, "date time");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("restoredb", bc_restoreDbCmd, 0,
  			  "restore backup database");
      cmd_AddParm(ts, "-portoffset", CMD_SINGLE, CMD_OPTIONAL,
  		"TC port offset");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("dumpinfo", bc_dumpInfoCmd, 0,
  			  "provide information about a dump in the database");
      cmd_AddParm(ts, "-ndumps", CMD_SINGLE, CMD_OPTIONAL, "no. of dumps");
      cmd_AddParm(ts, "-id", CMD_SINGLE, CMD_OPTIONAL, "dump id");
--- 694,727 ----
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("volinfo", bc_dblookupCmd, NULL,
  			  "query the backup database");
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED, "volume name");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("setexp", bc_SetExpCmd, NULL,
  			  "set/clear dump expiration dates");
      cmd_AddParm(ts, "-dump", CMD_LIST, CMD_REQUIRED, "dump level name");
      cmd_AddParm(ts, "-expires", CMD_LIST, CMD_OPTIONAL, "expiration date");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("savedb", bc_saveDbCmd, NULL, "save backup database");
      cmd_AddParm(ts, "-portoffset", CMD_SINGLE, CMD_OPTIONAL,
  		"TC port offset");
      cmd_AddParm(ts, "-archive", CMD_LIST, CMD_OPTIONAL, "date time");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("restoredb", bc_restoreDbCmd, NULL,
  			  "restore backup database");
      cmd_AddParm(ts, "-portoffset", CMD_SINGLE, CMD_OPTIONAL,
  		"TC port offset");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("dumpinfo", bc_dumpInfoCmd, NULL,
  			  "provide information about a dump in the database");
      cmd_AddParm(ts, "-ndumps", CMD_SINGLE, CMD_OPTIONAL, "no. of dumps");
      cmd_AddParm(ts, "-id", CMD_SINGLE, CMD_OPTIONAL, "dump id");
***************
*** 733,745 ****
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("dbverify", bc_dbVerifyCmd, 0,
  			  "check ubik database integrity");
      cmd_AddParm(ts, "-detail", CMD_FLAG, CMD_OPTIONAL, "additional details");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("deletedump", bc_deleteDumpCmd, 0,
  			  "delete dumps from the database");
      cmd_AddParm(ts, "-dumpid", CMD_LIST, CMD_OPTIONAL, "dump id");
      cmd_AddParm(ts, "-from", CMD_LIST, CMD_OPTIONAL, "date time");
--- 730,742 ----
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("dbverify", bc_dbVerifyCmd, NULL,
  			  "check ubik database integrity");
      cmd_AddParm(ts, "-detail", CMD_FLAG, CMD_OPTIONAL, "additional details");
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("deletedump", bc_deleteDumpCmd, NULL,
  			  "delete dumps from the database");
      cmd_AddParm(ts, "-dumpid", CMD_LIST, CMD_OPTIONAL, "dump id");
      cmd_AddParm(ts, "-from", CMD_LIST, CMD_OPTIONAL, "date time");
***************
*** 756,762 ****
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("interactive", bc_interactCmd, 0,
  			  "enter interactive mode");
      add_std_args(ts);
  
--- 753,759 ----
      if (!interact)
  	add_std_args(ts);
  
!     ts = cmd_CreateSyntax("interactive", bc_interactCmd, NULL,
  			  "enter interactive mode");
      add_std_args(ts);
  
Index: openafs/src/bucoord/tape_hosts.c
diff -c openafs/src/bucoord/tape_hosts.c:1.7.14.3 openafs/src/bucoord/tape_hosts.c:1.7.14.4
*** openafs/src/bucoord/tape_hosts.c:1.7.14.3	Tue Apr 10 14:39:50 2007
--- openafs/src/bucoord/tape_hosts.c	Wed Oct 31 00:09:24 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/tape_hosts.c,v 1.7.14.3 2007/04/10 18:39:50 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/tape_hosts.c,v 1.7.14.4 2007/10/31 04:09:24 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 49,58 ****
   *	Add a host to the tape hosts
   */
  
! afs_int32
! bc_AddHostCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      struct cmd_item *ti;
      udbClientTextP ctPtr;
--- 49,56 ----
   *	Add a host to the tape hosts
   */
  
! int
! bc_AddHostCmd(struct cmd_syndesc *as, void *arock)
  {
      struct cmd_item *ti;
      udbClientTextP ctPtr;
***************
*** 107,116 ****
      return (code);
  }
  
! afs_int32
! bc_DeleteHostCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      struct cmd_item *ti;
      afs_int32 port = 0;
--- 105,112 ----
      return (code);
  }
  
! int
! bc_DeleteHostCmd(struct cmd_syndesc *as, void *arock)
  {
      struct cmd_item *ti;
      afs_int32 port = 0;
***************
*** 174,183 ****
   *	ignored
   */
  
! afs_int32
! bc_ListHostsCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      afs_int32 code;
      register struct bc_hostEntry *tentry;
--- 170,177 ----
   *	ignored
   */
  
! int
! bc_ListHostsCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      register struct bc_hostEntry *tentry;
Index: openafs/src/bucoord/vol_sets.c
diff -c openafs/src/bucoord/vol_sets.c:1.11.6.3 openafs/src/bucoord/vol_sets.c:1.11.6.4
*** openafs/src/bucoord/vol_sets.c:1.11.6.3	Tue Apr 10 14:39:50 2007
--- openafs/src/bucoord/vol_sets.c	Wed Oct 31 00:09:24 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/vol_sets.c,v 1.11.6.3 2007/04/10 18:39:50 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/vol_sets.c,v 1.11.6.4 2007/10/31 04:09:24 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 57,67 ****
   *	parm 3 is volume regexp
   */
  
! bc_AddVolEntryCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
!     register afs_int32 code;
      char *volSetName, *serverName, *partitionName, *volRegExp;
      udbClientTextP ctPtr;
      struct bc_volumeSet *tset;
--- 57,66 ----
   *	parm 3 is volume regexp
   */
  
! int
! bc_AddVolEntryCmd(struct cmd_syndesc *as, void *arock)
  {
!     register int code;
      char *volSetName, *serverName, *partitionName, *volRegExp;
      udbClientTextP ctPtr;
      struct bc_volumeSet *tset;
***************
*** 129,141 ****
   *	name of new volume set
   */
  
! afs_int32
! bc_AddVolSetCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      /* parm 0 is vol set name */
!     register afs_int32 code;
      register struct cmd_item *ti;
      udbClientTextP ctPtr;
      afs_int32 flags;
--- 128,138 ----
   *	name of new volume set
   */
  
! int
! bc_AddVolSetCmd(struct cmd_syndesc *as, void *arock)
  {
      /* parm 0 is vol set name */
!     register int code;
      register struct cmd_item *ti;
      udbClientTextP ctPtr;
      afs_int32 flags;
***************
*** 190,201 ****
   *	parm 1 is entry # (integer, 1 based)
   */
  
! afs_int32
! bc_DeleteVolEntryCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
!     register afs_int32 code;
      afs_int32 entry;
      char *vsname;
      udbClientTextP ctPtr;
--- 187,196 ----
   *	parm 1 is entry # (integer, 1 based)
   */
  
! int
! bc_DeleteVolEntryCmd(struct cmd_syndesc *as, void *arock)
  {
!     register int code;
      afs_int32 entry;
      char *vsname;
      udbClientTextP ctPtr;
***************
*** 279,291 ****
   *	name of volumeset to delete
   */
  
! afs_int32
! bc_DeleteVolSetCmd(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      /* parm 0 is vol set name */
!     register afs_int32 code;
      register struct cmd_item *ti;
      udbClientTextP ctPtr;
      afs_int32 c;
--- 274,284 ----
   *	name of volumeset to delete
   */
  
! int
! bc_DeleteVolSetCmd(struct cmd_syndesc *as, void *arock)
  {
      /* parm 0 is vol set name */
!     register int code;
      register struct cmd_item *ti;
      udbClientTextP ctPtr;
      afs_int32 c;
***************
*** 364,376 ****
    *     optional parameter specifies a volumeset name
    */
  
! afs_int32
! bc_ListVolSetCmd(struct cmd_syndesc *as, char *arock)
  {
      /* parm 0 is optional volume set to display */
      register struct bc_volumeSet *tset;
      register struct cmd_item *ti;
!     afs_int32 code = 0;
  
      code = bc_UpdateVolumeSet();
      if (code) {
--- 357,369 ----
    *     optional parameter specifies a volumeset name
    */
  
! int
! bc_ListVolSetCmd(struct cmd_syndesc *as, void *arock)
  {
      /* parm 0 is optional volume set to display */
      register struct bc_volumeSet *tset;
      register struct cmd_item *ti;
!     int code = 0;
  
      code = bc_UpdateVolumeSet();
      if (code) {
Index: openafs/src/budb/Makefile.in
diff -c openafs/src/budb/Makefile.in:1.10.14.1 openafs/src/budb/Makefile.in:1.10.14.2
*** openafs/src/budb/Makefile.in:1.10.14.1	Mon Jul  3 15:07:14 2006
--- openafs/src/budb/Makefile.in	Thu Nov  1 12:02:28 2007
***************
*** 74,89 ****
  	${CC} ${LDFLAGS} -o budb_server $(SERVER_OBJS) ${LIBS} ${XLIBS}
  
  budb.cs.c: budb.rg
! 	${RXGEN} -u -C -o $@ ${srcdir}/budb.rg
  
  budb.ss.c: budb.rg
! 	${RXGEN} -S -o $@ ${srcdir}/budb.rg
  
  budb.xdr.c: budb.rg
! 	${RXGEN} -c -o $@ ${srcdir}/budb.rg
  
  budb.h: budb.rg
! 	${RXGEN} -u -h -o $@ ${srcdir}/budb.rg
  
  budb.cs.c: budb.h
  budb.xdr.c: budb.h
--- 74,89 ----
  	${CC} ${LDFLAGS} -o budb_server $(SERVER_OBJS) ${LIBS} ${XLIBS}
  
  budb.cs.c: budb.rg
! 	${RXGEN} -A -u -C -o $@ ${srcdir}/budb.rg
  
  budb.ss.c: budb.rg
! 	${RXGEN} -A -S -o $@ ${srcdir}/budb.rg
  
  budb.xdr.c: budb.rg
! 	${RXGEN} -A -c -o $@ ${srcdir}/budb.rg
  
  budb.h: budb.rg
! 	${RXGEN} -A -u -h -o $@ ${srcdir}/budb.rg
  
  budb.cs.c: budb.h
  budb.xdr.c: budb.h
Index: openafs/src/budb/database.c
diff -c openafs/src/budb/database.c:1.7.14.2 openafs/src/budb/database.c:1.7.14.3
*** openafs/src/budb/database.c:1.7.14.2	Fri Jul  6 07:35:24 2007
--- openafs/src/budb/database.c	Tue Oct 30 11:16:37 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/database.c,v 1.7.14.2 2007/07/06 11:35:24 jaltman Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/database.c,v 1.7.14.3 2007/10/30 15:16:37 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
***************
*** 26,40 ****
  #include "database.h"
  #include "error_macros.h"
  #include "afs/audit.h"
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  
  int pollCount;
  struct memoryDB db;		/* really allocate it here */
--- 26,32 ----
Index: openafs/src/budb/db_alloc.c
diff -c openafs/src/budb/db_alloc.c:1.7.14.1 openafs/src/budb/db_alloc.c:1.7.14.2
*** openafs/src/budb/db_alloc.c:1.7.14.1	Thu Feb  8 20:00:19 2007
--- openafs/src/budb/db_alloc.c	Tue Oct 30 11:16:37 2007
***************
*** 11,30 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/db_alloc.c,v 1.7.14.1 2007/02/09 01:00:19 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #else
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <sys/types.h>
  #include <afs/stds.h>
  #include <ubik.h>
--- 11,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/db_alloc.c,v 1.7.14.2 2007/10/30 15:16:37 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #else
  #include <netinet/in.h>
  #endif
  #include <string.h>
  #include <sys/types.h>
  #include <afs/stds.h>
  #include <ubik.h>
Index: openafs/src/budb/db_dump.c
diff -c openafs/src/budb/db_dump.c:1.7 openafs/src/budb/db_dump.c:1.7.14.1
*** openafs/src/budb/db_dump.c:1.7	Tue Jul 15 19:14:48 2003
--- openafs/src/budb/db_dump.c	Tue Oct 30 11:16:37 2007
***************
*** 16,22 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/db_dump.c,v 1.7 2003/07/15 23:14:48 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
--- 16,22 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/db_dump.c,v 1.7.14.1 2007/10/30 15:16:37 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
***************
*** 28,41 ****
  #include <sys/types.h>
  #include <ubik.h>
  #include <lock.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include "database.h"
  #include "budb.h"
--- 28,34 ----
Index: openafs/src/budb/db_hash.c
diff -c openafs/src/budb/db_hash.c:1.8.14.1 openafs/src/budb/db_hash.c:1.8.14.2
*** openafs/src/budb/db_hash.c:1.8.14.1	Thu Feb  8 20:00:19 2007
--- openafs/src/budb/db_hash.c	Tue Oct 30 11:16:37 2007
***************
*** 11,30 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/db_hash.c,v 1.8.14.1 2007/02/09 01:00:19 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #else
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <sys/types.h>
  #include <afs/stds.h>
  #include <ubik.h>
--- 11,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/db_hash.c,v 1.8.14.2 2007/10/30 15:16:37 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #else
  #include <netinet/in.h>
  #endif
  #include <string.h>
  #include <sys/types.h>
  #include <afs/stds.h>
  #include <ubik.h>
Index: openafs/src/budb/db_text.c
diff -c openafs/src/budb/db_text.c:1.12.4.1 openafs/src/budb/db_text.c:1.12.4.2
*** openafs/src/budb/db_text.c:1.12.4.1	Thu Feb  8 20:00:19 2007
--- openafs/src/budb/db_text.c	Tue Oct 30 11:16:37 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/db_text.c,v 1.12.4.1 2007/02/09 01:00:19 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/db_text.c,v 1.12.4.2 2007/10/30 15:16:37 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
***************
*** 22,34 ****
  #include <sys/file.h>
  #include <sys/param.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <sys/types.h>
  #include <ubik.h>
  #include <afs/bubasics.h>
--- 22,28 ----
Index: openafs/src/budb/ol_verify.c
diff -c openafs/src/budb/ol_verify.c:1.13.14.1 openafs/src/budb/ol_verify.c:1.13.14.2
*** openafs/src/budb/ol_verify.c:1.13.14.1	Fri Jul  6 07:40:40 2007
--- openafs/src/budb/ol_verify.c	Tue Oct 30 11:16:38 2007
***************
*** 13,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/ol_verify.c,v 1.13.14.1 2007/07/06 11:40:40 jaltman Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
--- 13,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/ol_verify.c,v 1.13.14.2 2007/10/30 15:16:38 shadow Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
***************
*** 22,34 ****
  #include <netinet/in.h>
  #include <netdb.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <afs/stds.h>
  #include <sys/types.h>
  #include <lock.h>
--- 22,28 ----
Index: openafs/src/budb/procs.c
diff -c openafs/src/budb/procs.c:1.14 openafs/src/budb/procs.c:1.14.14.1
*** openafs/src/budb/procs.c:1.14	Sun Dec  7 17:49:19 2003
--- openafs/src/budb/procs.c	Tue Oct 30 11:16:38 2007
***************
*** 17,23 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/procs.c,v 1.14 2003/12/07 22:49:19 jaltman Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
--- 17,23 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/procs.c,v 1.14.14.1 2007/10/30 15:16:38 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
***************
*** 29,42 ****
  #include <sys/resource.h>
  #endif
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #include <sys/types.h>
  #include <afs/stds.h>
  #include <afs/bubasics.h>
--- 29,35 ----
Index: openafs/src/budb/server.c
diff -c openafs/src/budb/server.c:1.16.2.4 openafs/src/budb/server.c:1.16.2.6
*** openafs/src/budb/server.c:1.16.2.4	Tue Apr 10 14:39:50 2007
--- openafs/src/budb/server.c	Wed Oct 31 00:09:25 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/server.c,v 1.16.2.4 2007/04/10 18:39:50 shadow Exp $");
  
  #include <fcntl.h>
  #include <sys/stat.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/server.c,v 1.16.2.6 2007/10/31 04:09:25 shadow Exp $");
  
  #include <fcntl.h>
  #include <sys/stat.h>
***************
*** 24,38 ****
  #include <sys/time.h>
  #include <netdb.h>
  #endif
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #include <afs/stds.h>
  #include <sys/types.h>
  #include <time.h>
--- 24,30 ----
***************
*** 61,66 ****
--- 53,60 ----
  struct ubik_dbase *BU_dbase;
  struct afsconf_dir *BU_conf;	/* for getting cell info */
  
+ int argHandler(struct cmd_syndesc *, void *);
+ 
  char lcell[MAXKTCREALMLEN];
  afs_int32 myHost = 0;
  int helpOption;
***************
*** 130,137 ****
   *      If it were, this routine would never have been called.
   */
  static int
! MyBeforeProc(as)
!      register struct cmd_syndesc *as;
  {
      helpOption = 0;
      return 0;
--- 124,130 ----
   *      If it were, this routine would never have been called.
   */
  static int
! MyBeforeProc(register struct cmd_syndesc *as, void *arock)
  {
      helpOption = 0;
      return 0;
***************
*** 145,152 ****
  {
      struct cmd_syndesc *cptr;
  
-     int argHandler();
- 
      cmd_SetBeforeProc(MyBeforeProc, NULL);
  
      cptr = cmd_CreateSyntax(NULL, argHandler, NULL, "Backup database server");
--- 138,143 ----
***************
*** 178,186 ****
  }
  
  int
! argHandler(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
  
      /* globalConfPtr provides the handle for the configuration information */
--- 169,175 ----
  }
  
  int
! argHandler(struct cmd_syndesc *as, void *arock)
  {
  
      /* globalConfPtr provides the handle for the configuration information */
Index: openafs/src/butc/dbentries.c
diff -c openafs/src/butc/dbentries.c:1.8.14.1 openafs/src/butc/dbentries.c:1.8.14.2
*** openafs/src/butc/dbentries.c:1.8.14.1	Sat Jul  1 01:02:49 2006
--- openafs/src/butc/dbentries.c	Tue Oct 30 11:16:38 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/dbentries.c,v 1.8.14.1 2006/07/01 05:02:49 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/dbentries.c,v 1.8.14.2 2007/10/30 15:16:38 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 24,29 ****
--- 24,30 ----
  #include <netdb.h>
  #endif
  #include <stdlib.h>
+ #include <string.h>
  #include <rx/xdr.h>
  #include <rx/rx.h>
  #include <lwp.h>
Index: openafs/src/butc/dump.c
diff -c openafs/src/butc/dump.c:1.18 openafs/src/butc/dump.c:1.18.6.1
*** openafs/src/butc/dump.c:1.18	Sun Apr  3 14:09:26 2005
--- openafs/src/butc/dump.c	Tue Oct 30 11:16:38 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/dump.c,v 1.18 2005/04/03 18:09:26 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/dump.c,v 1.18.6.1 2007/10/30 15:16:38 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 24,29 ****
--- 24,30 ----
  #include <netdb.h>
  #endif
  #include <stdlib.h>
+ #include <string.h>
  #include <rx/xdr.h>
  #include <rx/rx.h>
  #include <lwp.h>
Index: openafs/src/butc/lwps.c
diff -c openafs/src/butc/lwps.c:1.14.4.1 openafs/src/butc/lwps.c:1.14.4.2
*** openafs/src/butc/lwps.c:1.14.4.1	Tue Apr 10 14:39:51 2007
--- openafs/src/butc/lwps.c	Tue Oct 30 11:16:38 2007
***************
*** 11,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/lwps.c,v 1.14.4.1 2007/04/10 18:39:51 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #include <conio.h>
--- 11,20 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/lwps.c,v 1.14.4.2 2007/10/30 15:16:38 shadow Exp $");
  
  #include <sys/types.h>
+ #include <string.h>
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #include <conio.h>
Index: openafs/src/butc/read_tape.c
diff -c openafs/src/butc/read_tape.c:1.7 openafs/src/butc/read_tape.c:1.7.14.2
*** openafs/src/butc/read_tape.c:1.7	Tue Jul 15 19:14:49 2003
--- openafs/src/butc/read_tape.c	Wed Oct 31 00:09:25 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/read_tape.c,v 1.7 2003/07/15 23:14:49 shadow Exp $");
  
  #include <afs/cmd.h>
  #include <lock.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/read_tape.c,v 1.7.14.2 2007/10/31 04:09:25 shadow Exp $");
  
  #include <afs/cmd.h>
  #include <lock.h>
***************
*** 21,26 ****
--- 21,27 ----
  #include <netinet/in.h>
  #include <fcntl.h>
  #include <stdio.h>
+ #include <string.h>
  #include <errno.h>
  
  #include <afs/usd.h>
***************
*** 381,389 ****
      return 0;
  }
  
! WorkerBee(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      char *tapedev;
      struct tapeLabel *label;
--- 382,389 ----
      return 0;
  }
  
! static int
! WorkerBee(struct cmd_syndesc *as, void *arock)
  {
      char *tapedev;
      struct tapeLabel *label;
Index: openafs/src/butc/recoverDb.c
diff -c openafs/src/butc/recoverDb.c:1.13.4.1 openafs/src/butc/recoverDb.c:1.13.4.2
*** openafs/src/butc/recoverDb.c:1.13.4.1	Sat Jul  1 01:02:49 2006
--- openafs/src/butc/recoverDb.c	Tue Oct 30 11:16:38 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/recoverDb.c,v 1.13.4.1 2006/07/01 05:02:49 shadow Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/recoverDb.c,v 1.13.4.2 2007/10/30 15:16:38 shadow Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
***************
*** 24,29 ****
--- 24,30 ----
  #include <strings.h>
  #endif
  #include <sys/types.h>
+ #include <string.h>
  #include <rx/xdr.h>
  #include <rx/rx.h>
  #include <lwp.h>
Index: openafs/src/butc/tcmain.c
diff -c openafs/src/butc/tcmain.c:1.16.8.5 openafs/src/butc/tcmain.c:1.16.8.6
*** openafs/src/butc/tcmain.c:1.16.8.5	Thu Feb  8 20:00:19 2007
--- openafs/src/butc/tcmain.c	Wed Oct 31 00:09:25 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/tcmain.c,v 1.16.8.5 2007/02/09 01:00:19 shadow Exp $");
  
  #include <sys/types.h>
  #include <sys/stat.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/tcmain.c,v 1.16.8.6 2007/10/31 04:09:25 shadow Exp $");
  
  #include <sys/types.h>
  #include <sys/stat.h>
***************
*** 829,835 ****
  }
  
  static int
! WorkerBee(struct cmd_syndesc *as, char *arock)
  {
      register afs_int32 code;
      struct rx_securityClass *(securityObjects[3]);
--- 829,835 ----
  }
  
  static int
! WorkerBee(struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      struct rx_securityClass *(securityObjects[3]);
Index: openafs/src/butc/tcprocs.c
diff -c openafs/src/butc/tcprocs.c:1.14.6.2 openafs/src/butc/tcprocs.c:1.14.6.3
*** openafs/src/butc/tcprocs.c:1.14.6.2	Thu Feb  8 20:00:20 2007
--- openafs/src/butc/tcprocs.c	Tue Oct 30 11:16:38 2007
***************
*** 13,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/tcprocs.c,v 1.14.6.2 2007/02/09 01:00:20 shadow Exp $");
  
  #include <sys/types.h>
  #include <errno.h>
--- 13,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/tcprocs.c,v 1.14.6.3 2007/10/30 15:16:38 shadow Exp $");
  
  #include <sys/types.h>
  #include <errno.h>
***************
*** 27,32 ****
--- 27,33 ----
  #include <rx/rx.h>
  #include <afs/afsint.h>
  #include <stdio.h>
+ #include <string.h>
  #include <afs/procmgmt.h>
  #include <afs/assert.h>
  #include <afs/prs_fs.h>
Index: openafs/src/butc/tcstatus.c
diff -c openafs/src/butc/tcstatus.c:1.6 openafs/src/butc/tcstatus.c:1.6.14.1
*** openafs/src/butc/tcstatus.c:1.6	Tue Jul 15 19:14:49 2003
--- openafs/src/butc/tcstatus.c	Tue Oct 30 11:16:38 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/tcstatus.c,v 1.6 2003/07/15 23:14:49 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/tcstatus.c,v 1.6.14.1 2007/10/30 15:16:38 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 24,29 ****
--- 24,30 ----
  #include <strings.h>
  #endif
  #include <stdio.h>
+ #include <string.h>
  #include <afs/com_err.h>
  #include <lock.h>
  #include <afs/bubasics.h>
Index: openafs/src/butc/tcudbprocs.c
diff -c openafs/src/butc/tcudbprocs.c:1.15.6.2 openafs/src/butc/tcudbprocs.c:1.15.6.3
*** openafs/src/butc/tcudbprocs.c:1.15.6.2	Thu Feb  8 20:00:20 2007
--- openafs/src/butc/tcudbprocs.c	Tue Oct 30 11:16:38 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/tcudbprocs.c,v 1.15.6.2 2007/02/09 01:00:20 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/tcudbprocs.c,v 1.15.6.3 2007/10/30 15:16:38 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 28,33 ****
--- 28,34 ----
  #include <rx/rx.h>
  #include <afs/afsint.h>
  #include <stdio.h>
+ #include <string.h>
  #include <afs/procmgmt.h>
  #include <afs/assert.h>
  #include <afs/prs_fs.h>
Index: openafs/src/butc/test.c
diff -c openafs/src/butc/test.c:1.5.14.1 openafs/src/butc/test.c:1.5.14.2
*** openafs/src/butc/test.c:1.5.14.1	Thu Feb  8 20:00:20 2007
--- openafs/src/butc/test.c	Wed Oct 31 00:09:25 2007
***************
*** 80,88 ****
  }
  
  
! static
! PerformDump(as)
!      register struct cmd_syndesc *as;
  {
      struct rx_connection *aconn;
      afs_int32 server;
--- 80,87 ----
  }
  
  
! static int
! PerformDump(register struct cmd_syndesc *as, void *arock)
  {
      struct rx_connection *aconn;
      afs_int32 server;
***************
*** 127,137 ****
  	exit(1);
      }
      printf("dumpid returned %u\n", tdumpID);
  }
  
! static
! PerformRestore(as)
!      register struct cmd_syndesc *as;
  {
      struct rx_connection *aconn;
      afs_int32 server;
--- 126,137 ----
  	exit(1);
      }
      printf("dumpid returned %u\n", tdumpID);
+ 
+     return 0;
  }
  
! static int
! PerformRestore(register struct cmd_syndesc *as, void *arock)
  {
      struct rx_connection *aconn;
      afs_int32 server;
***************
*** 169,179 ****
  	exit(1);
      }
      printf("dumpid returned %u\n", tdumpID);
  }
  
! static
! CheckDump(as)
!      register struct cmd_syndesc *as;
  {
      struct rx_connection *aconn;
      afs_int32 server;
--- 169,179 ----
  	exit(1);
      }
      printf("dumpid returned %u\n", tdumpID);
+     return 0;
  }
  
! static int
! CheckDump(register struct cmd_syndesc *as, void *arock)
  {
      struct rx_connection *aconn;
      afs_int32 server;
***************
*** 189,199 ****
  	printf("call to TC_CheckDump failed %u\n", code);
  	exit(1);
      }
  }
  
! static
! AbortDump(as)
!      register struct cmd_syndesc *as;
  {
      struct rx_connection *aconn;
      afs_int32 server;
--- 189,199 ----
  	printf("call to TC_CheckDump failed %u\n", code);
  	exit(1);
      }
+     return 0;
  }
  
! static int
! AbortDump(register struct cmd_syndesc *as, void *arock)
  {
      struct rx_connection *aconn;
      afs_int32 server;
***************
*** 209,219 ****
  	printf("call to TC_AbortDump failed %u\n", code);
  	exit(1);
      }
  }
  
! static
! WaitForDump(as)
!      register struct cmd_syndesc *as;
  {
      struct rx_connection *aconn;
      afs_int32 server;
--- 209,219 ----
  	printf("call to TC_AbortDump failed %u\n", code);
  	exit(1);
      }
+     return 0;
  }
  
! static int
! WaitForDump(register struct cmd_syndesc *as, void *arock)
  {
      struct rx_connection *aconn;
      afs_int32 server;
***************
*** 229,239 ****
  	printf("call to TC_WaitForDump failed %u\n", code);
  	exit(1);
      }
  }
  
! static
! EndDump(as)
!      register struct cmd_syndesc *as;
  {
      struct rx_connection *aconn;
      afs_int32 server;
--- 229,239 ----
  	printf("call to TC_WaitForDump failed %u\n", code);
  	exit(1);
      }
+     return 0;
  }
  
! static int
! EndDump(register struct cmd_syndesc *as, void *arock)
  {
      struct rx_connection *aconn;
      afs_int32 server;
***************
*** 249,260 ****
  	printf("call to TC_EndDump failed %u\n", code);
  	exit(1);
      }
  }
  
! static
! MyBeforeProc(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      afs_int32 code;
  
--- 249,259 ----
  	printf("call to TC_EndDump failed %u\n", code);
  	exit(1);
      }
+     return 0;
  }
  
! static int
! MyBeforeProc(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
  
***************
*** 295,314 ****
  #endif
      cmd_SetBeforeProc(MyBeforeProc, NULL);
  
!     ts = cmd_CreateSyntax("dump", PerformDump, 0, "perform a dump");
  
!     ts = cmd_CreateSyntax("restore", PerformRestore, 0, "perform a restore");
  
!     ts = cmd_CreateSyntax("check", CheckDump, 0, "check a dump");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "dump id");
  
!     ts = cmd_CreateSyntax("abort", AbortDump, 0, "abort a dump");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "dump id");
  
!     ts = cmd_CreateSyntax("wait", WaitForDump, 0, "wait for a dump");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "dump id");
  
!     ts = cmd_CreateSyntax("end", EndDump, 0, "end a dump");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "dump id");
  
      code = cmd_Dispatch(argc, argv);
--- 294,313 ----
  #endif
      cmd_SetBeforeProc(MyBeforeProc, NULL);
  
!     ts = cmd_CreateSyntax("dump", PerformDump, NULL, "perform a dump");
  
!     ts = cmd_CreateSyntax("restore", PerformRestore, NULL, "perform a restore");
  
!     ts = cmd_CreateSyntax("check", CheckDump, NULL, "check a dump");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "dump id");
  
!     ts = cmd_CreateSyntax("abort", AbortDump, NULL, "abort a dump");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "dump id");
  
!     ts = cmd_CreateSyntax("wait", WaitForDump, NULL, "wait for a dump");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "dump id");
  
!     ts = cmd_CreateSyntax("end", EndDump, NULL, "end a dump");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "dump id");
  
      code = cmd_Dispatch(argc, argv);
Index: openafs/src/butm/file_tm.c
diff -c openafs/src/butm/file_tm.c:1.12.6.1 openafs/src/butm/file_tm.c:1.12.6.2
*** openafs/src/butm/file_tm.c:1.12.6.1	Tue Apr 10 14:39:51 2007
--- openafs/src/butm/file_tm.c	Tue Oct 30 11:16:38 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butm/file_tm.c,v 1.12.6.1 2007/04/10 18:39:51 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butm/file_tm.c,v 1.12.6.2 2007/10/30 15:16:38 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
***************
*** 24,29 ****
--- 24,30 ----
  #include <limits.h>
  #include <sys/stat.h>
  #include <stdio.h>
+ #include <string.h>
  #include <ctype.h>
  #include <lwp.h>
  #include <afs/com_err.h>
Index: openafs/src/cf/kerberos.m4
diff -c openafs/src/cf/kerberos.m4:1.7.2.3 openafs/src/cf/kerberos.m4:1.7.2.4
*** openafs/src/cf/kerberos.m4:1.7.2.3	Thu Sep 20 00:53:31 2007
--- openafs/src/cf/kerberos.m4	Mon Nov  5 17:10:49 2007
***************
*** 1,5 ****
  dnl
! dnl $Id: kerberos.m4,v 1.7.2.3 2007/09/20 04:53:31 shadow Exp $
  dnl
  dnl Kerberos autoconf glue
  dnl
--- 1,5 ----
  dnl
! dnl $Id: kerberos.m4,v 1.7.2.4 2007/11/05 22:10:49 shadow Exp $
  dnl
  dnl Kerberos autoconf glue
  dnl
***************
*** 58,64 ****
  	CPPFLAGS="$CPPFLAGS $KRB5CFLAGS"
  	save_LIBS="$LIBS"
  	LIBS="$LIBS $KRB5LIBS"
! 	AC_CHECK_FUNCS([add_to_error_table add_error_table krb5_princ_size krb5_principal_get_comp_string encode_krb5_enc_tkt_part encode_krb5_ticket])
  	AC_CHECK_FUNCS([krb5_524_convert_creds], ,
  	    [AC_CHECK_FUNCS([krb524_convert_creds_kdc], ,
  		[AC_CHECK_LIB([krb524], [krb524_convert_creds_kdc],
--- 58,64 ----
  	CPPFLAGS="$CPPFLAGS $KRB5CFLAGS"
  	save_LIBS="$LIBS"
  	LIBS="$LIBS $KRB5LIBS"
! 	AC_CHECK_FUNCS([add_to_error_table add_error_table krb5_princ_size krb5_principal_get_comp_string encode_krb5_enc_tkt_part encode_krb5_ticket krb5_c_encrypt krb5_c_encrypt_length])
  	AC_CHECK_FUNCS([krb5_524_convert_creds], ,
  	    [AC_CHECK_FUNCS([krb524_convert_creds_kdc], ,
  		[AC_CHECK_LIB([krb524], [krb524_convert_creds_kdc],
Index: openafs/src/cf/linux-test4.m4
diff -c openafs/src/cf/linux-test4.m4:1.29.2.27 openafs/src/cf/linux-test4.m4:1.29.2.29
*** openafs/src/cf/linux-test4.m4:1.29.2.27	Thu Oct  4 23:10:01 2007
--- openafs/src/cf/linux-test4.m4	Tue Nov  6 13:32:40 2007
***************
*** 41,46 ****
--- 41,55 ----
        ac_cv_linux_completion_h_exists=no)])
    AC_MSG_RESULT($ac_cv_linux_completion_h_exists)])
  
+ AC_DEFUN([LINUX_EXPORTFS_H_EXISTS], [
+   AC_MSG_CHECKING([for linux/exportfs.h existence])
+   AC_CACHE_VAL([ac_cv_linux_exportfs_h_exists], [
+     AC_TRY_KBUILD(
+ [#include <linux/exportfs.h>],
+ [return;],
+       ac_cv_linux_exportfs_h_exists=yes,
+       ac_cv_linux_exportfs_h_exists=no)])
+   AC_MSG_RESULT($ac_cv_linux_exportfs_h_exists)])
  
  AC_DEFUN([LINUX_DEFINES_FOR_EACH_PROCESS], [
    AC_MSG_CHECKING([for defined for_each_process])
***************
*** 902,904 ****
--- 911,935 ----
        ac_cv_linux_fs_struct_fop_has_sendfile=no)])
    AC_MSG_RESULT($ac_cv_linux_fs_struct_fop_has_sendfile)])
  
+ AC_DEFUN([LINUX_HAVE_SVC_ADDR_IN], [
+   AC_MSG_CHECKING([whether svc_addr_in exists])
+   AC_CACHE_VAL([ac_cv_linux_have_svc_addr_in], [
+     AC_TRY_KBUILD(
+ [#include <linux/sunrpc/svc.h>],
+ [svc_addr_in(NULL);],
+       ac_cv_linux_have_svc_addr_in=yes,
+       ac_cv_linux_have_svc_addr_in=no)])
+   AC_MSG_RESULT($ac_cv_linux_have_svc_addr_in)])
+ 
+ AC_DEFUN([LINUX_FS_STRUCT_FOP_HAS_SPLICE], [
+   AC_MSG_CHECKING([for splice_write and splice_read in struct file_operations])
+   AC_CACHE_VAL([ac_cv_linux_fs_struct_fop_has_splice], [
+     AC_TRY_KBUILD(
+ [#include <linux/fs.h>],
+ [struct file_operations _fop;
+ _fop.splice_write(NULL, NULL, NULL, 0, 0);
+ _fop.splice_read(NULL, NULL, NULL, 0, 0);],
+       ac_cv_linux_fs_struct_fop_has_splice=yes,
+       ac_cv_linux_fs_struct_fop_has_splice=no)])
+   AC_MSG_RESULT($ac_cv_linux_fs_struct_fop_has_splice)])
+ 
Index: openafs/src/cf/osconf.m4
diff -c openafs/src/cf/osconf.m4:1.83.2.4 openafs/src/cf/osconf.m4:1.83.2.5
*** openafs/src/cf/osconf.m4:1.83.2.4	Thu Sep 20 00:53:31 2007
--- openafs/src/cf/osconf.m4	Thu Nov  1 13:07:31 2007
***************
*** 855,861 ****
  		SHLIB_CFLAGS="-KPIC"
  		SHLIB_LDFLAGS="-G -Bsymbolic"
  		TXLIBS="-lcurses"
! 		XCFLAGS64='${XCFLAGS} -xarch=v9'
  		XCFLAGS="-dy -Bdynamic"
  		XLIBELFA="-lelf"
  		XLIBKVM="-lkvm"
--- 855,861 ----
  		SHLIB_CFLAGS="-KPIC"
  		SHLIB_LDFLAGS="-G -Bsymbolic"
  		TXLIBS="-lcurses"
! 		XCFLAGS64='${XCFLAGS} -m64'
  		XCFLAGS="-dy -Bdynamic"
  		XLIBELFA="-lelf"
  		XLIBKVM="-lkvm"
***************
*** 962,968 ****
  		SHLIB_CFLAGS="-KPIC"
  		SHLIB_LDFLAGS="-G -Bsymbolic"
  		TXLIBS="-lcurses"
! 		XCFLAGS64='${XCFLAGS} -xarch=amd64'
  		XCFLAGS="-dy -Bdynamic"
  		XLIBELFA="-lelf"
  		XLIBKVM="-lkvm"
--- 962,968 ----
  		SHLIB_CFLAGS="-KPIC"
  		SHLIB_LDFLAGS="-G -Bsymbolic"
  		TXLIBS="-lcurses"
! 		XCFLAGS64='${XCFLAGS} -m64'
  		XCFLAGS="-dy -Bdynamic"
  		XLIBELFA="-lelf"
  		XLIBKVM="-lkvm"
Index: openafs/src/cmd/cmd.c
diff -c openafs/src/cmd/cmd.c:1.12.4.1 openafs/src/cmd/cmd.c:1.12.4.2
*** openafs/src/cmd/cmd.c:1.12.4.1	Fri Jun 30 15:47:08 2006
--- openafs/src/cmd/cmd.c	Wed Oct 31 00:09:25 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/cmd/cmd.c,v 1.12.4.1 2006/06/30 19:47:08 shadow Exp $");
  
  #include <sys/types.h>
  #include <ctype.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/cmd/cmd.c,v 1.12.4.2 2007/10/31 04:09:25 shadow Exp $");
  
  #include <sys/types.h>
  #include <ctype.h>
***************
*** 30,38 ****
  static int dummy;		/* non-null ptr used for flag existence */
  static struct cmd_syndesc *allSyntax = 0;
  static int noOpcodes = 0;
! static int (*beforeProc) (struct cmd_syndesc * ts, char *beforeRock) =
!     0, (*afterProc) (struct cmd_syndesc * ts, char *afterRock) = 0;
! static char *beforeRock, *afterRock;
  static char initcmd_opcode[] = "initcmd";	/*Name of initcmd opcode */
  
  /* take name and string, and return null string if name is empty, otherwise return
--- 30,38 ----
  static int dummy;		/* non-null ptr used for flag existence */
  static struct cmd_syndesc *allSyntax = 0;
  static int noOpcodes = 0;
! static int (*beforeProc) (struct cmd_syndesc * ts, void *beforeRock) = NULL;
! static int (*afterProc) (struct cmd_syndesc * ts, void *afterRock) = NULL;
! static void *beforeRock, *afterRock;
  static char initcmd_opcode[] = "initcmd";	/*Name of initcmd opcode */
  
  /* take name and string, and return null string if name is empty, otherwise return
***************
*** 168,174 ****
  extern char *AFSVersion;
  
  static int
! VersionProc(register struct cmd_syndesc *as, char *arock)
  {
      printf("%s\n", AFSVersion);
      return 0;
--- 168,174 ----
  extern char *AFSVersion;
  
  static int
! VersionProc(register struct cmd_syndesc *as, void *arock)
  {
      printf("%s\n", AFSVersion);
      return 0;
***************
*** 272,278 ****
  }
  
  static int
! AproposProc(register struct cmd_syndesc *as, char *arock)
  {
      register struct cmd_syndesc *ts;
      char *tsub;
--- 272,278 ----
  }
  
  static int
! AproposProc(register struct cmd_syndesc *as, void *arock)
  {
      register struct cmd_syndesc *ts;
      char *tsub;
***************
*** 297,303 ****
  }
  
  static int
! HelpProc(register struct cmd_syndesc *as, char *arock)
  {
      register struct cmd_syndesc *ts;
      register struct cmd_item *ti;
--- 297,303 ----
  }
  
  static int
! HelpProc(register struct cmd_syndesc *as, void *arock)
  {
      register struct cmd_syndesc *ts;
      register struct cmd_item *ti;
***************
*** 344,351 ****
  }
  
  int
! cmd_SetBeforeProc(int (*aproc) (struct cmd_syndesc * ts, char *beforeRock),
! 		  char *arock)
  {
      beforeProc = aproc;
      beforeRock = arock;
--- 344,351 ----
  }
  
  int
! cmd_SetBeforeProc(int (*aproc) (struct cmd_syndesc * ts, void *beforeRock),
! 		  void *arock)
  {
      beforeProc = aproc;
      beforeRock = arock;
***************
*** 353,360 ****
  }
  
  int
! cmd_SetAfterProc(int (*aproc) (struct cmd_syndesc * ts, char *afterRock),
! 		 char *arock)
  {
      afterProc = aproc;
      afterRock = arock;
--- 353,360 ----
  }
  
  int
! cmd_SetAfterProc(int (*aproc) (struct cmd_syndesc * ts, void *afterRock),
! 		 void *arock)
  {
      afterProc = aproc;
      afterRock = arock;
***************
*** 380,387 ****
  
  struct cmd_syndesc *
  cmd_CreateSyntax(char *aname,
! 		 int (*aproc) (struct cmd_syndesc * ts, char *arock),
! 		 char *arock, char *ahelp)
  {
      register struct cmd_syndesc *td;
  
--- 380,387 ----
  
  struct cmd_syndesc *
  cmd_CreateSyntax(char *aname,
! 		 int (*aproc) (struct cmd_syndesc * ts, void *arock),
! 		 void *arock, char *ahelp)
  {
      register struct cmd_syndesc *td;
  
***************
*** 481,487 ****
      strcpy(tp->name, aname);
      tp->type = atype;
      tp->flags = aflags;
!     tp->items = (struct cmd_item *)0;
      if (ahelp) {
  	tp->help = (char *)malloc(strlen(ahelp) + 1);
  	assert(tp->help);
--- 481,487 ----
      strcpy(tp->name, aname);
      tp->type = atype;
      tp->flags = aflags;
!     tp->items = NULL;
      if (ahelp) {
  	tp->help = (char *)malloc(strlen(ahelp) + 1);
  	assert(tp->help);
***************
*** 556,562 ****
  	default:
  	    break;
  	}
! 	tp->items = (struct cmd_item *)0;
      }
  }
  
--- 556,562 ----
  	default:
  	    break;
  	}
! 	tp->items = NULL;
      }
  }
  
Index: openafs/src/cmd/cmd.p.h
diff -c openafs/src/cmd/cmd.p.h:1.7 openafs/src/cmd/cmd.p.h:1.7.14.1
*** openafs/src/cmd/cmd.p.h:1.7	Tue Jul 15 19:14:50 2003
--- openafs/src/cmd/cmd.p.h	Wed Oct 31 00:09:25 2007
***************
*** 51,58 ****
      char *name;			/* subcommand name */
      char *a0name;		/* command name from argv[0] */
      char *help;			/* help description */
!     int (*proc) (struct cmd_syndesc * ts, char *arock);
!     char *rock;
      int nParms;			/* number of parms */
      afs_int32 flags;		/* random flags */
      struct cmd_parmdesc parms[CMD_MAXPARMS];	/* parms themselves */
--- 51,58 ----
      char *name;			/* subcommand name */
      char *a0name;		/* command name from argv[0] */
      char *help;			/* help description */
!     int (*proc) (struct cmd_syndesc * ts, void *arock);
!     void *rock;
      int nParms;			/* number of parms */
      afs_int32 flags;		/* random flags */
      struct cmd_parmdesc parms[CMD_MAXPARMS];	/* parms themselves */
***************
*** 60,73 ****
  
  extern struct cmd_syndesc *cmd_CreateSyntax(char *namep,
  					    int (*aprocp) (struct cmd_syndesc
! 							   * ts, char *arock),
! 					    char *rockp, char *helpp);
  extern int
!   cmd_SetBeforeProc(int (*aproc) (struct cmd_syndesc * ts, char *beforeRock),
! 		    char *arock);
  extern int
!   cmd_SetAfterProc(int (*aproc) (struct cmd_syndesc * ts, char *afterRock),
! 		   char *arock);
  extern int cmd_CreateAlias(struct cmd_syndesc *as, char *aname);
  extern int cmd_Seek(struct cmd_syndesc *as, int apos);
  extern int cmd_AddParm(struct cmd_syndesc *as, char *aname, int atype,
--- 60,73 ----
  
  extern struct cmd_syndesc *cmd_CreateSyntax(char *namep,
  					    int (*aprocp) (struct cmd_syndesc
! 							   * ts, void *arock),
! 					    void *rockp, char *helpp);
  extern int
!   cmd_SetBeforeProc(int (*aproc) (struct cmd_syndesc * ts, void *beforeRock),
! 		    void *arock);
  extern int
!   cmd_SetAfterProc(int (*aproc) (struct cmd_syndesc * ts, void *afterRock),
! 		   void *arock);
  extern int cmd_CreateAlias(struct cmd_syndesc *as, char *aname);
  extern int cmd_Seek(struct cmd_syndesc *as, int apos);
  extern int cmd_AddParm(struct cmd_syndesc *as, char *aname, int atype,
Index: openafs/src/cmd/test/ctest.c
diff -c openafs/src/cmd/test/ctest.c:1.6 openafs/src/cmd/test/ctest.c:1.6.14.1
*** openafs/src/cmd/test/ctest.c:1.6	Tue Jul 15 19:14:52 2003
--- openafs/src/cmd/test/ctest.c	Wed Oct 31 00:09:26 2007
***************
*** 11,34 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/cmd/test/ctest.c,v 1.6 2003/07/15 23:14:52 shadow Exp $");
  
  #include "cmd.h"
  #include <stdio.h>
  
! static
! cproc1(as, arock)
!      char *arock;
!      struct cmd_syndesc *as;
  {
      printf("in the apple command\n");
      return 0;
  }
  
! static
! cproc2(as, arock)
!      char *arock;
!      struct cmd_syndesc *as;
  {
      register struct cmd_item *ti;
      printf("in the pear command\n");
--- 11,30 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/cmd/test/ctest.c,v 1.6.14.1 2007/10/31 04:09:26 shadow Exp $");
  
  #include "cmd.h"
  #include <stdio.h>
  
! static int
! cproc1(struct cmd_syndesc *as, void *arock)
  {
      printf("in the apple command\n");
      return 0;
  }
  
! static int
! cproc2(struct cmd_syndesc *as, void *arock)
  {
      register struct cmd_item *ti;
      printf("in the pear command\n");
***************
*** 43,51 ****
      return 0;
  }
  
! main(argc, argv)
!      int argc;
!      char **argv;
  {
      register struct cmd_syndesc *ts;
  
--- 39,46 ----
      return 0;
  }
  
! int
! main(int argc, char **argv)
  {
      register struct cmd_syndesc *ts;
  
Index: openafs/src/cmd/test/dtest.c
diff -c openafs/src/cmd/test/dtest.c:1.6 openafs/src/cmd/test/dtest.c:1.6.14.1
*** openafs/src/cmd/test/dtest.c:1.6	Tue Jul 15 19:14:52 2003
--- openafs/src/cmd/test/dtest.c	Wed Oct 31 00:09:26 2007
***************
*** 11,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/cmd/test/dtest.c,v 1.6 2003/07/15 23:14:52 shadow Exp $");
  
  #include "cmd.h"
  #include <stdio.h>
  
! static
! cproc(as, arock)
!      char *arock;
!      struct cmd_syndesc *as;
  {
      register struct cmd_item *ti;
      printf("in the pear command\n");
--- 11,23 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/cmd/test/dtest.c,v 1.6.14.1 2007/10/31 04:09:26 shadow Exp $");
  
  #include "cmd.h"
  #include <stdio.h>
  
! static int
! cproc(struct cmd_syndesc *as, void *arock)
  {
      register struct cmd_item *ti;
      printf("in the pear command\n");
***************
*** 32,40 ****
      return 0;
  }
  
! main(argc, argv)
!      int argc;
!      char **argv;
  {
      register struct cmd_syndesc *ts;
  
--- 30,37 ----
      return 0;
  }
  
! int
! main(int argc, char **argv)
  {
      register struct cmd_syndesc *ts;
  
Index: openafs/src/cmd/test/itest.c
diff -c openafs/src/cmd/test/itest.c:1.7.14.1 openafs/src/cmd/test/itest.c:1.7.14.2
*** openafs/src/cmd/test/itest.c:1.7.14.1	Tue Apr 10 14:39:51 2007
--- openafs/src/cmd/test/itest.c	Wed Oct 31 00:09:26 2007
***************
*** 11,35 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/cmd/test/itest.c,v 1.7.14.1 2007/04/10 18:39:51 shadow Exp $");
  
  #include "cmd.h"
  #include <stdio.h>
  #include <com_err.h>
  
! static
! cproc1(as, arock)
!      char *arock;
!      struct cmd_syndesc *as;
  {
      printf("in the apple command\n");
      return 0;
  }
  
! static
! cproc2(as, arock)
!      char *arock;
!      struct cmd_syndesc *as;
  {
      register struct cmd_item *ti;
      printf("in the pear command\n");
--- 11,31 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/cmd/test/itest.c,v 1.7.14.2 2007/10/31 04:09:26 shadow Exp $");
  
  #include "cmd.h"
  #include <stdio.h>
  #include <com_err.h>
  
! static int
! cproc1(struct cmd_syndesc *as, void *arock)
  {
      printf("in the apple command\n");
      return 0;
  }
  
! static int
! cproc2(struct cmd_syndesc *as, void *arock)
  {
      register struct cmd_item *ti;
      printf("in the pear command\n");
***************
*** 44,60 ****
      return 0;
  }
  
! static void
! cproc3(as, arock)
!      char *arock;
!      struct cmd_syndesc *as;
  {
      exit(0);
  }
  
! main(argc, argv)
!      int argc;
!      char **argv;
  {
      register struct cmd_syndesc *ts;
      char tline[1000];
--- 40,53 ----
      return 0;
  }
  
! static int
! cproc3(struct cmd_syndesc *as, void *arock)
  {
      exit(0);
  }
  
! int
! main(int argc, char **argv)
  {
      register struct cmd_syndesc *ts;
      char tline[1000];
Index: openafs/src/config/NTMakefile.amd64_w2k
diff -c openafs/src/config/NTMakefile.amd64_w2k:1.24.2.31 openafs/src/config/NTMakefile.amd64_w2k:1.24.2.32
*** openafs/src/config/NTMakefile.amd64_w2k:1.24.2.31	Mon Oct 22 19:28:14 2007
--- openafs/src/config/NTMakefile.amd64_w2k	Tue Nov  6 21:55:33 2007
***************
*** 84,90 ****
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=5
! AFSPRODUCT_VER_PATCH=2600
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
--- 84,90 ----
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=5
! AFSPRODUCT_VER_PATCH=2700
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
Index: openafs/src/config/NTMakefile.i386_nt40
diff -c openafs/src/config/NTMakefile.i386_nt40:1.84.2.30 openafs/src/config/NTMakefile.i386_nt40:1.84.2.31
*** openafs/src/config/NTMakefile.i386_nt40:1.84.2.30	Mon Oct 22 19:28:14 2007
--- openafs/src/config/NTMakefile.i386_nt40	Tue Nov  6 21:55:33 2007
***************
*** 84,90 ****
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=5
! AFSPRODUCT_VER_PATCH=2600
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
--- 84,90 ----
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=5
! AFSPRODUCT_VER_PATCH=2700
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
Index: openafs/src/config/NTMakefile.i386_w2k
diff -c openafs/src/config/NTMakefile.i386_w2k:1.23.2.31 openafs/src/config/NTMakefile.i386_w2k:1.23.2.32
*** openafs/src/config/NTMakefile.i386_w2k:1.23.2.31	Mon Oct 22 19:28:14 2007
--- openafs/src/config/NTMakefile.i386_w2k	Tue Nov  6 21:55:33 2007
***************
*** 84,90 ****
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=5
! AFSPRODUCT_VER_PATCH=2600
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
--- 84,90 ----
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=5
! AFSPRODUCT_VER_PATCH=2700
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
Index: openafs/src/config/mc.c
diff -c openafs/src/config/mc.c:1.5 openafs/src/config/mc.c:1.5.14.1
*** openafs/src/config/mc.c:1.5	Tue Jul 15 19:14:55 2003
--- openafs/src/config/mc.c	Tue Oct 30 11:16:38 2007
***************
*** 16,24 ****
  #include <stdlib.h>
  
  #include <afsconfig.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #endif
  
  #define TOK_DONTUSE 1		/* Don't copy if match and this flag is set. */
  struct token {
--- 16,22 ----
Index: openafs/src/des/NTMakefile
diff -c openafs/src/des/NTMakefile:1.8.4.1 openafs/src/des/NTMakefile:1.8.4.2
*** openafs/src/des/NTMakefile:1.8.4.1	Thu Jun  1 11:35:46 2006
--- openafs/src/des/NTMakefile	Fri Nov  2 21:07:29 2007
***************
*** 32,37 ****
--- 32,38 ----
  INCFILES =\
  	$(INCFILEDIR)\des.h \
  	$(INCFILEDIR)\des_conf.h \
+         $(INCFILEDIR)\des_prototypes.h \
  	$(INCFILEDIR)\mit-cpyright.h \
  	$(INCFILEDIR)\des_odd.h \
  	$(INCFILEDIR)\crypt.h \
Index: openafs/src/dir/dir.c
diff -c openafs/src/dir/dir.c:1.24.4.3 openafs/src/dir/dir.c:1.24.4.4
*** openafs/src/dir/dir.c:1.24.4.3	Thu Oct 11 13:46:37 2007
--- openafs/src/dir/dir.c	Tue Oct 30 11:16:39 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/dir/dir.c,v 1.24.4.3 2007/10/11 17:46:37 shadow Exp $");
  
  #ifdef KERNEL
  #if !defined(UKERNEL)
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/dir/dir.c,v 1.24.4.4 2007/10/30 15:16:39 shadow Exp $");
  
  #ifdef KERNEL
  #if !defined(UKERNEL)
***************
*** 100,112 ****
  #include <netinet/in.h>
  #endif
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #endif /* KERNEL */
  
  afs_int32 DErrno;
--- 100,106 ----
Index: openafs/src/dir/salvage.c
diff -c openafs/src/dir/salvage.c:1.10 openafs/src/dir/salvage.c:1.10.14.1
*** openafs/src/dir/salvage.c:1.10	Sun Dec  7 17:49:26 2003
--- openafs/src/dir/salvage.c	Tue Oct 30 11:16:39 2007
***************
*** 13,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/dir/salvage.c,v 1.10 2003/12/07 22:49:26 jaltman Exp $");
  
  #include <sys/types.h>
  #include <errno.h>
--- 13,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/dir/salvage.c,v 1.10.14.1 2007/10/30 15:16:39 shadow Exp $");
  
  #include <sys/types.h>
  #include <errno.h>
***************
*** 23,35 ****
  #include <netinet/in.h>
  #endif
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include "dir.h"
  #define printf	Log		/* To make it work with volume salvager */
--- 23,29 ----
Index: openafs/src/fsint/Makefile.in
diff -c openafs/src/fsint/Makefile.in:1.9.14.3 openafs/src/fsint/Makefile.in:1.9.14.4
*** openafs/src/fsint/Makefile.in:1.9.14.3	Mon Jul 31 17:27:40 2006
--- openafs/src/fsint/Makefile.in	Thu Nov  1 12:02:28 2007
***************
*** 29,95 ****
  afsaux.o: afsaux.c afsint.h
  
  Kcallback.cs.c: common.xg afscbint.xg Kvice.h Kcallback.h
! 	${RXGEN} -x -k -C -o Kcallback.cs.c ${srcdir}/afscbint.xg
  
  Kcallback.ss.c: common.xg afscbint.xg Kvice.h Kcallback.h
! 	${RXGEN} -x -k -S -o Kcallback.ss.c ${srcdir}/afscbint.xg
  
  Kcallback.xdr.c: common.xg afscbint.xg Kvice.h Kcallback.h
! 	${RXGEN} -x -k -y -c -o Kcallback.xdr.c ${srcdir}/afscbint.xg
  
  Kvice.cs.c: common.xg afsint.xg Kvice.h
! 	${RXGEN} -x -k -C -o Kvice.cs.c ${srcdir}/afsint.xg
  
  Kvice.ss.c: common.xg afsint.xg Kvice.h
! 	${RXGEN} -x -k -S -o Kvice.ss.c ${srcdir}/afsint.xg
  
  Kvice.xdr.c: common.xg afsint.xg
! 	${RXGEN} -x -k -c -o Kvice.xdr.c ${srcdir}/afsint.xg
  
  Kvice.h: common.xg afsint.xg
! 	${RXGEN} -x -k -h -o Kvice.h ${srcdir}/afsint.xg
  
  Kpagcb.cs.c: pagcb.xg Kpagcb.h
! 	${RXGEN} -x -k -C -o Kpagcb.cs.c ${srcdir}/pagcb.xg
  
  Kpagcb.ss.c: pagcb.xg Kpagcb.h
! 	${RXGEN} -x -k -S -o Kpagcb.ss.c ${srcdir}/pagcb.xg
  
  Kpagcb.xdr.c: pagcb.xg
! 	${RXGEN} -x -k -c -o Kpagcb.xdr.c ${srcdir}/pagcb.xg
  
  Kpagcb.h: pagcb.xg
! 	${RXGEN} -x -k -h -o Kpagcb.h ${srcdir}/pagcb.xg
  
  pagcb.h: pagcb.xg
! 	${RXGEN} -x -h -o pagcb.h ${srcdir}/pagcb.xg
  
  Kcallback.h: common.xg afscbint.xg
! 	${RXGEN} -x -k -h -o Kcallback.h ${srcdir}/afscbint.xg
  
  afscbint.cs.c: common.xg afscbint.xg afsint.h afscbint.h 
! 	${RXGEN} -x -C -o afscbint.cs.c ${srcdir}/afscbint.xg
  
  afscbint.ss.c: common.xg afscbint.xg afsint.h afscbint.h
! 	${RXGEN} -x -S -o afscbint.ss.c ${srcdir}/afscbint.xg
  
  afscbint.xdr.c: common.xg afscbint.xg afsint.h afscbint.h
! 	${RXGEN} -x -y -c -o afscbint.xdr.c ${srcdir}/afscbint.xg
  
  afsint.cs.c: common.xg afsint.xg afsint.h
! 	${RXGEN} -x -C -o afsint.cs.c ${srcdir}/afsint.xg
  
  afsint.ss.c: common.xg afsint.xg afsint.h
! 	${RXGEN} -x -S -o afsint.ss.c ${srcdir}/afsint.xg
  
  afsint.xdr.c: common.xg afsint.xg
! 	${RXGEN} -x -c -o afsint.xdr.c ${srcdir}/afsint.xg
  
  afsint.h: common.xg afsint.xg
! 	${RXGEN} -x -h -o afsint.h ${srcdir}/afsint.xg
  
  afscbint.h: common.xg afscbint.xg
! 	${RXGEN} -x -h -o afscbint.h ${srcdir}/afscbint.xg
  
  #
  # Installation targets
--- 29,95 ----
  afsaux.o: afsaux.c afsint.h
  
  Kcallback.cs.c: common.xg afscbint.xg Kvice.h Kcallback.h
! 	${RXGEN} -A -x -k -C -o Kcallback.cs.c ${srcdir}/afscbint.xg
  
  Kcallback.ss.c: common.xg afscbint.xg Kvice.h Kcallback.h
! 	${RXGEN} -A -x -k -S -o Kcallback.ss.c ${srcdir}/afscbint.xg
  
  Kcallback.xdr.c: common.xg afscbint.xg Kvice.h Kcallback.h
! 	${RXGEN} -A -x -k -y -c -o Kcallback.xdr.c ${srcdir}/afscbint.xg
  
  Kvice.cs.c: common.xg afsint.xg Kvice.h
! 	${RXGEN} -A -x -k -C -o Kvice.cs.c ${srcdir}/afsint.xg
  
  Kvice.ss.c: common.xg afsint.xg Kvice.h
! 	${RXGEN} -A -x -k -S -o Kvice.ss.c ${srcdir}/afsint.xg
  
  Kvice.xdr.c: common.xg afsint.xg
! 	${RXGEN} -A -x -k -c -o Kvice.xdr.c ${srcdir}/afsint.xg
  
  Kvice.h: common.xg afsint.xg
! 	${RXGEN} -A -x -k -h -o Kvice.h ${srcdir}/afsint.xg
  
  Kpagcb.cs.c: pagcb.xg Kpagcb.h
! 	${RXGEN} -A -x -k -C -o Kpagcb.cs.c ${srcdir}/pagcb.xg
  
  Kpagcb.ss.c: pagcb.xg Kpagcb.h
! 	${RXGEN} -A -x -k -S -o Kpagcb.ss.c ${srcdir}/pagcb.xg
  
  Kpagcb.xdr.c: pagcb.xg
! 	${RXGEN} -A -x -k -c -o Kpagcb.xdr.c ${srcdir}/pagcb.xg
  
  Kpagcb.h: pagcb.xg
! 	${RXGEN} -A -x -k -h -o Kpagcb.h ${srcdir}/pagcb.xg
  
  pagcb.h: pagcb.xg
! 	${RXGEN} -A -x -h -o pagcb.h ${srcdir}/pagcb.xg
  
  Kcallback.h: common.xg afscbint.xg
! 	${RXGEN} -A -x -k -h -o Kcallback.h ${srcdir}/afscbint.xg
  
  afscbint.cs.c: common.xg afscbint.xg afsint.h afscbint.h 
! 	${RXGEN} -A -x -C -o afscbint.cs.c ${srcdir}/afscbint.xg
  
  afscbint.ss.c: common.xg afscbint.xg afsint.h afscbint.h
! 	${RXGEN} -A -x -S -o afscbint.ss.c ${srcdir}/afscbint.xg
  
  afscbint.xdr.c: common.xg afscbint.xg afsint.h afscbint.h
! 	${RXGEN} -A -x -y -c -o afscbint.xdr.c ${srcdir}/afscbint.xg
  
  afsint.cs.c: common.xg afsint.xg afsint.h
! 	${RXGEN} -A -x -C -o afsint.cs.c ${srcdir}/afsint.xg
  
  afsint.ss.c: common.xg afsint.xg afsint.h
! 	${RXGEN} -A -x -S -o afsint.ss.c ${srcdir}/afsint.xg
  
  afsint.xdr.c: common.xg afsint.xg
! 	${RXGEN} -A -x -c -o afsint.xdr.c ${srcdir}/afsint.xg
  
  afsint.h: common.xg afsint.xg
! 	${RXGEN} -A -x -h -o afsint.h ${srcdir}/afsint.xg
  
  afscbint.h: common.xg afscbint.xg
! 	${RXGEN} -A -x -h -o afscbint.h ${srcdir}/afscbint.xg
  
  #
  # Installation targets
Index: openafs/src/fsprobe/fsprobe.c
diff -c openafs/src/fsprobe/fsprobe.c:1.9 openafs/src/fsprobe/fsprobe.c:1.9.14.1
*** openafs/src/fsprobe/fsprobe.c:1.9	Tue Jul 15 19:15:08 2003
--- openafs/src/fsprobe/fsprobe.c	Tue Oct 30 11:16:39 2007
***************
*** 17,32 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/fsprobe/fsprobe.c,v 1.9 2003/07/15 23:15:08 shadow Exp $");
  
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include <fsprobe.h>		/*Interface for this module */
  #include <lwp.h>		/*Lightweight process package */
--- 17,26 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/fsprobe/fsprobe.c,v 1.9.14.1 2007/10/30 15:16:39 shadow Exp $");
  
  
  #include <string.h>
  
  #include <fsprobe.h>		/*Interface for this module */
  #include <lwp.h>		/*Lightweight process package */
Index: openafs/src/fsprobe/fsprobe_test.c
diff -c openafs/src/fsprobe/fsprobe_test.c:1.9 openafs/src/fsprobe/fsprobe_test.c:1.9.2.1
*** openafs/src/fsprobe/fsprobe_test.c:1.9	Thu Mar  9 01:34:38 2006
--- openafs/src/fsprobe/fsprobe_test.c	Tue Oct 30 11:16:39 2007
***************
*** 17,32 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/fsprobe/fsprobe_test.c,v 1.9 2006/03/09 06:34:38 shadow Exp $");
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #include <fsprobe.h>		/*Interface for fsprobe module */
  
  /*
--- 17,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/fsprobe/fsprobe_test.c,v 1.9.2.1 2007/10/30 15:16:39 shadow Exp $");
  
  #include <string.h>
  #include <fsprobe.h>		/*Interface for fsprobe module */
  
  /*
Index: openafs/src/gtx/curseswindows.c
diff -c openafs/src/gtx/curseswindows.c:1.10 openafs/src/gtx/curseswindows.c:1.10.14.1
*** openafs/src/gtx/curseswindows.c:1.10	Tue Jul 15 19:15:12 2003
--- openafs/src/gtx/curseswindows.c	Tue Oct 30 11:16:39 2007
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/curseswindows.c,v 1.10 2003/07/15 23:15:12 shadow Exp $");
  
  
  #if defined(AFS_HPUX110_ENV) && !defined(__HP_CURSES)
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/curseswindows.c,v 1.10.14.1 2007/10/30 15:16:39 shadow Exp $");
  
  
  #if defined(AFS_HPUX110_ENV) && !defined(__HP_CURSES)
***************
*** 37,50 ****
  #include <stdio.h>
  #include <sys/time.h>
  #include <errno.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <stdlib.h>
  
  #include "gtxcurseswin.h"	/*Interface definition */
--- 37,43 ----
Index: openafs/src/gtx/frame.c
diff -c openafs/src/gtx/frame.c:1.7 openafs/src/gtx/frame.c:1.7.14.1
*** openafs/src/gtx/frame.c:1.7	Tue Jul 15 19:15:12 2003
--- openafs/src/gtx/frame.c	Tue Oct 30 11:16:39 2007
***************
*** 12,31 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/frame.c,v 1.7 2003/07/15 23:15:12 shadow Exp $");
  
  #ifdef AFS_HPUX_ENV
  #include <sys/types.h>
  #endif
  #include <lwp.h>
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <stdlib.h>
  
  #include "gtxobjects.h"
--- 12,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/frame.c,v 1.7.14.1 2007/10/30 15:16:39 shadow Exp $");
  
  #ifdef AFS_HPUX_ENV
  #include <sys/types.h>
  #endif
  #include <lwp.h>
  
  #include <string.h>
  #include <stdlib.h>
  
  #include "gtxobjects.h"
Index: openafs/src/gtx/gtxtest.c
diff -c openafs/src/gtx/gtxtest.c:1.7 openafs/src/gtx/gtxtest.c:1.7.4.1
*** openafs/src/gtx/gtxtest.c:1.7	Sun Jul 10 23:22:21 2005
--- openafs/src/gtx/gtxtest.c	Tue Oct 30 11:16:39 2007
***************
*** 11,26 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/gtxtest.c,v 1.7 2005/07/11 03:22:21 shadow Exp $");
  
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include "gtxwindows.h"
  #include "gtxobjects.h"
--- 11,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/gtxtest.c,v 1.7.4.1 2007/10/30 15:16:39 shadow Exp $");
  
  #include <string.h>
  
  #include "gtxwindows.h"
  #include "gtxobjects.h"
Index: openafs/src/gtx/keymap.c
diff -c openafs/src/gtx/keymap.c:1.7 openafs/src/gtx/keymap.c:1.7.14.1
*** openafs/src/gtx/keymap.c:1.7	Tue Jul 15 19:15:13 2003
--- openafs/src/gtx/keymap.c	Tue Oct 30 11:16:39 2007
***************
*** 11,26 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/keymap.c,v 1.7 2003/07/15 23:15:13 shadow Exp $");
  
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <stdlib.h>
  
  #include "gtxkeymap.h"
--- 11,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/keymap.c,v 1.7.14.1 2007/10/30 15:16:39 shadow Exp $");
  
  #include <string.h>
  #include <stdlib.h>
  
  #include "gtxkeymap.h"
Index: openafs/src/gtx/lightobject.c
diff -c openafs/src/gtx/lightobject.c:1.6 openafs/src/gtx/lightobject.c:1.6.14.1
*** openafs/src/gtx/lightobject.c:1.6	Tue Jul 15 19:15:13 2003
--- openafs/src/gtx/lightobject.c	Tue Oct 30 11:16:39 2007
***************
*** 17,38 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/lightobject.c,v 1.6 2003/07/15 23:15:13 shadow Exp $");
  
  #include "gtxlightobj.h"	/*Interface for this module */
  #include <stdio.h>		/*Standard I/O stuff */
  #include <errno.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <stdlib.h>
  
- 
  /*Externally-advertised array of light onode operations*/
  struct onodeops gator_light_ops = {
      gator_light_destroy,
--- 17,30 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/lightobject.c,v 1.6.14.1 2007/10/30 15:16:39 shadow Exp $");
  
  #include "gtxlightobj.h"	/*Interface for this module */
  #include <stdio.h>		/*Standard I/O stuff */
  #include <errno.h>
  #include <string.h>
  #include <stdlib.h>
  
  /*Externally-advertised array of light onode operations*/
  struct onodeops gator_light_ops = {
      gator_light_destroy,
Index: openafs/src/gtx/object_test.c
diff -c openafs/src/gtx/object_test.c:1.7 openafs/src/gtx/object_test.c:1.7.14.1
*** openafs/src/gtx/object_test.c:1.7	Tue Jul 15 19:15:13 2003
--- openafs/src/gtx/object_test.c	Wed Oct 31 00:09:27 2007
***************
*** 15,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/object_test.c,v 1.7 2003/07/15 23:15:13 shadow Exp $");
  
  #include "gtxscreenobj.h"	/*Gator screen object interface */
  #include "gtxtextobj.h"		/*Gator text object interface */
--- 15,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/object_test.c,v 1.7.14.1 2007/10/31 04:09:27 shadow Exp $");
  
  #include "gtxscreenobj.h"	/*Gator screen object interface */
  #include "gtxtextobj.h"		/*Gator text object interface */
***************
*** 386,395 ****
   *------------------------------------------------------------------------*/
  
  static int
! object_testInit(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
! 
  {				/*object_testInit */
  
      static char rn[] = "object_testInit";	/*Routine name */
--- 386,392 ----
   *------------------------------------------------------------------------*/
  
  static int
! object_testInit(struct cmd_syndesc *as, void *arock)
  {				/*object_testInit */
  
      static char rn[] = "object_testInit";	/*Routine name */
***************
*** 442,448 ****
      /*
       * Set up the commands we understand.
       */
!     ts = cmd_CreateSyntax("initcmd", object_testInit, 0,
  			  "Initialize the program");
      cmd_AddParm(ts, "-package", CMD_SINGLE, CMD_REQUIRED,
  		"Graphics package to use");
--- 439,445 ----
      /*
       * Set up the commands we understand.
       */
!     ts = cmd_CreateSyntax("initcmd", object_testInit, NULL,
  			  "Initialize the program");
      cmd_AddParm(ts, "-package", CMD_SINGLE, CMD_REQUIRED,
  		"Graphics package to use");
Index: openafs/src/gtx/objects.c
diff -c openafs/src/gtx/objects.c:1.6 openafs/src/gtx/objects.c:1.6.14.1
*** openafs/src/gtx/objects.c:1.6	Tue Jul 15 19:15:13 2003
--- openafs/src/gtx/objects.c	Tue Oct 30 11:16:39 2007
***************
*** 17,23 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/objects.c,v 1.6 2003/07/15 23:15:13 shadow Exp $");
  
  #include "gtxobjects.h"		/*Interface for this module */
  #include "gtxtextobj.h"		/*Text object interface */
--- 17,23 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/objects.c,v 1.6.14.1 2007/10/30 15:16:39 shadow Exp $");
  
  #include "gtxobjects.h"		/*Interface for this module */
  #include "gtxtextobj.h"		/*Text object interface */
***************
*** 26,39 ****
  #include <stdio.h>		/*Standard I/O stuff */
  #include <errno.h>
  
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <stdlib.h>
  
  /*
--- 26,32 ----
Index: openafs/src/gtx/screen_test.c
diff -c openafs/src/gtx/screen_test.c:1.7 openafs/src/gtx/screen_test.c:1.7.14.1
*** openafs/src/gtx/screen_test.c:1.7	Tue Jul 15 19:15:13 2003
--- openafs/src/gtx/screen_test.c	Wed Oct 31 00:09:27 2007
***************
*** 15,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/screen_test.c,v 1.7 2003/07/15 23:15:13 shadow Exp $");
  
  #include "gtxwindows.h"		/*Generalized window interface */
  #include "gtxcurseswin.h"	/*Curses window interface */
--- 15,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/screen_test.c,v 1.7.14.1 2007/10/31 04:09:27 shadow Exp $");
  
  #include "gtxwindows.h"		/*Generalized window interface */
  #include "gtxcurseswin.h"	/*Curses window interface */
***************
*** 224,233 ****
   *--------------------------------------------------------------------------------*/
  
  static int
! screen_testInit(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
! 
  {				/*screen_testInit */
  
      static char rn[] = "screen_testInit";	/*Routine name */
--- 224,230 ----
   *--------------------------------------------------------------------------------*/
  
  static int
! screen_testInit(struct cmd_syndesc *as, void *arock)
  {				/*screen_testInit */
  
      static char rn[] = "screen_testInit";	/*Routine name */
***************
*** 280,286 ****
       * There really aren't any opcodes here, but we do want to interpret switches
       * from the command line.  So, all we need do is set up the initcmd ``opcode''.
       */
!     ts = cmd_CreateSyntax("initcmd", screen_testInit, 0,
  			  "Initialize, interpret command line");
      cmd_AddParm(ts, "-package", CMD_SINGLE, CMD_REQUIRED,
  		"Graphics package to use");
--- 277,283 ----
       * There really aren't any opcodes here, but we do want to interpret switches
       * from the command line.  So, all we need do is set up the initcmd ``opcode''.
       */
!     ts = cmd_CreateSyntax("initcmd", screen_testInit, NULL,
  			  "Initialize, interpret command line");
      cmd_AddParm(ts, "-package", CMD_SINGLE, CMD_REQUIRED,
  		"Graphics package to use");
Index: openafs/src/gtx/textcb.c
diff -c openafs/src/gtx/textcb.c:1.7 openafs/src/gtx/textcb.c:1.7.14.1
*** openafs/src/gtx/textcb.c:1.7	Tue Jul 15 19:15:13 2003
--- openafs/src/gtx/textcb.c	Tue Oct 30 11:16:39 2007
***************
*** 17,35 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/textcb.c,v 1.7 2003/07/15 23:15:13 shadow Exp $");
  
  #include "gtxtextcb.h"		/*Module interface */
  #include <stdio.h>		/*Standard I/O stuff */
  #include <errno.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <stdlib.h>
  
  static int gator_textcb_debug;	/*Is debugging output turned on? */
--- 17,28 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/textcb.c,v 1.7.14.1 2007/10/30 15:16:39 shadow Exp $");
  
  #include "gtxtextcb.h"		/*Module interface */
  #include <stdio.h>		/*Standard I/O stuff */
  #include <errno.h>
  #include <string.h>
  #include <stdlib.h>
  
  static int gator_textcb_debug;	/*Is debugging output turned on? */
Index: openafs/src/gtx/textobject.c
diff -c openafs/src/gtx/textobject.c:1.6 openafs/src/gtx/textobject.c:1.6.14.1
*** openafs/src/gtx/textobject.c:1.6	Tue Jul 15 19:15:13 2003
--- openafs/src/gtx/textobject.c	Tue Oct 30 11:16:39 2007
***************
*** 16,22 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/textobject.c,v 1.6 2003/07/15 23:15:13 shadow Exp $");
  
  #include "gtxtextobj.h"		/*Interface for this module */
  #include "gtxwindows.h"		/*Gator window interface */
--- 16,22 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/gtx/textobject.c,v 1.6.14.1 2007/10/30 15:16:39 shadow Exp $");
  
  #include "gtxtextobj.h"		/*Interface for this module */
  #include "gtxwindows.h"		/*Gator window interface */
***************
*** 25,38 ****
  #include "gtxX11win.h"		/*Gator X11 window interface */
  #include <stdio.h>		/*Standard I/O stuff */
  #include <errno.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <stdlib.h>
  
  /*Externally-advertised array of text onode operations*/
--- 25,31 ----
Index: openafs/src/kauth/Makefile.in
diff -c openafs/src/kauth/Makefile.in:1.12.8.2 openafs/src/kauth/Makefile.in:1.12.8.3
*** openafs/src/kauth/Makefile.in:1.12.8.2	Sun Aug 19 18:15:29 2007
--- openafs/src/kauth/Makefile.in	Thu Nov  1 12:02:29 2007
***************
*** 96,124 ****
  $(UKSRCS): kauth.h
  
  kauth.cs.c: kauth.rg
! 	${RXGEN} -u -x -C -o $@ ${srcdir}/kauth.rg
  
  kauth.ss.c: kauth.rg
! 	${RXGEN} -x -S -o $@ ${srcdir}/kauth.rg
  
  kauth.xdr.c: kauth.rg
! 	${RXGEN} -x -c -o $@ ${srcdir}/kauth.rg
  
  kauth.h: kauth.rg
! 	${RXGEN} -u -x -h -o $@ ${srcdir}/kauth.rg
  
  kauth.xdr.c: kauth.h
  kauth.cs.c: kauth.h
  kauth.ss.c: kauth.h
  
  Kkauth.cs.c: kauth.rg Kkauth.h
! 	${RXGEN} -x -k -C -o Kkauth.cs.c ${srcdir}/kauth.rg
  
  Kkauth.xdr.c: kauth.rg
! 	${RXGEN} -x -k -c -o Kkauth.xdr.c ${srcdir}/kauth.rg
  
  Kkauth.h: kauth.rg
! 	${RXGEN} -x -k -h -o Kkauth.h ${srcdir}/kauth.rg
  
  libkauth.a: $(OBJS) AFS_component_version_number.o
  	-$(RM) -f $@
--- 96,124 ----
  $(UKSRCS): kauth.h
  
  kauth.cs.c: kauth.rg
! 	${RXGEN} -A -u -x -C -o $@ ${srcdir}/kauth.rg
  
  kauth.ss.c: kauth.rg
! 	${RXGEN} -A -x -S -o $@ ${srcdir}/kauth.rg
  
  kauth.xdr.c: kauth.rg
! 	${RXGEN} -A -x -c -o $@ ${srcdir}/kauth.rg
  
  kauth.h: kauth.rg
! 	${RXGEN} -A -u -x -h -o $@ ${srcdir}/kauth.rg
  
  kauth.xdr.c: kauth.h
  kauth.cs.c: kauth.h
  kauth.ss.c: kauth.h
  
  Kkauth.cs.c: kauth.rg Kkauth.h
! 	${RXGEN} -A -x -k -C -o Kkauth.cs.c ${srcdir}/kauth.rg
  
  Kkauth.xdr.c: kauth.rg
! 	${RXGEN} -A -x -k -c -o Kkauth.xdr.c ${srcdir}/kauth.rg
  
  Kkauth.h: kauth.rg
! 	${RXGEN} -A -x -k -h -o Kkauth.h ${srcdir}/kauth.rg
  
  libkauth.a: $(OBJS) AFS_component_version_number.o
  	-$(RM) -f $@
Index: openafs/src/kauth/admin_tools.c
diff -c openafs/src/kauth/admin_tools.c:1.19.8.1 openafs/src/kauth/admin_tools.c:1.19.8.2
*** openafs/src/kauth/admin_tools.c:1.19.8.1	Tue Apr 10 14:39:52 2007
--- openafs/src/kauth/admin_tools.c	Wed Oct 31 00:09:30 2007
***************
*** 16,22 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/admin_tools.c,v 1.19.8.1 2007/04/10 18:39:52 shadow Exp $");
  
  #include <afs/stds.h>
  #include <afs/debug.h>
--- 16,22 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/admin_tools.c,v 1.19.8.2 2007/10/31 04:09:30 shadow Exp $");
  
  #include <afs/stds.h>
  #include <afs/debug.h>
***************
*** 234,240 ****
  }
  
  int
! ListUsers(struct cmd_syndesc *as, char *arock)
  {
      struct kaident name;
      afs_int32 index;
--- 234,240 ----
  }
  
  int
! ListUsers(struct cmd_syndesc *as, void *arock)
  {
      struct kaident name;
      afs_int32 index;
***************
*** 273,279 ****
  
  
  int
! ExamineUser(struct cmd_syndesc *as, char *arock)
  {
      int showkey = (as->parms[1].items != NULL);
      return DumpUser(as->parms[0].items->data, arock, 0, showkey, NULL);
--- 273,279 ----
  
  
  int
! ExamineUser(struct cmd_syndesc *as, void *arock)
  {
      int showkey = (as->parms[1].items != NULL);
      return DumpUser(as->parms[0].items->data, arock, 0, showkey, NULL);
***************
*** 318,324 ****
  }
  
  int
! CreateUser(struct cmd_syndesc *as, char *arock)
  {
      int code;
      char name[MAXKTCNAMELEN];
--- 318,324 ----
  }
  
  int
! CreateUser(struct cmd_syndesc *as, void *arock)
  {
      int code;
      char name[MAXKTCNAMELEN];
***************
*** 348,354 ****
  }
  
  int
! DeleteUser(struct cmd_syndesc *as, char *arock)
  {
      int code;
      char name[MAXKTCNAMELEN];
--- 348,354 ----
  }
  
  int
! DeleteUser(struct cmd_syndesc *as, void *arock)
  {
      int code;
      char name[MAXKTCNAMELEN];
***************
*** 532,538 ****
  }
  
  int
! Unlock(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code, rcode = 0;
      afs_int32 count;
--- 532,538 ----
  }
  
  int
! Unlock(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code, rcode = 0;
      afs_int32 count;
***************
*** 573,579 ****
  }
  
  int
! SetFields(struct cmd_syndesc *as, char *arock)
  {
      int code;
      char name[MAXKTCNAMELEN];
--- 573,579 ----
  }
  
  int
! SetFields(struct cmd_syndesc *as, void *arock)
  {
      int code;
      char name[MAXKTCNAMELEN];
***************
*** 735,741 ****
  }
  
  int
! StringToKey(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      char realm[MAXKTCREALMLEN];
--- 735,741 ----
  }
  
  int
! StringToKey(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      char realm[MAXKTCREALMLEN];
***************
*** 772,778 ****
  }
  
  int
! SetPassword(struct cmd_syndesc *as, char *arock)
  {
      int code;
      char name[MAXKTCNAMELEN];
--- 772,778 ----
  }
  
  int
! SetPassword(struct cmd_syndesc *as, void *arock)
  {
      int code;
      char name[MAXKTCNAMELEN];
***************
*** 964,970 ****
  }
  
  static
! GetTicket(struct cmd_syndesc *as, char *arock)
  {
      int code;
      struct ktc_principal server;
--- 964,970 ----
  }
  
  static
! GetTicket(struct cmd_syndesc *as, void *arock)
  {
      int code;
      struct ktc_principal server;
***************
*** 1010,1016 ****
  }
  
  static
! GetPassword(struct cmd_syndesc *as, char *arock)
  {
      int code;
      char name[MAXKTCNAMELEN];
--- 1010,1016 ----
  }
  
  static
! GetPassword(struct cmd_syndesc *as, void *arock)
  {
      int code;
      char name[MAXKTCNAMELEN];
***************
*** 1062,1068 ****
  }
  
  int
! GetRandomKey(struct cmd_syndesc *as, char *arock)
  {
      int code;
      struct ktc_encryptionKey key;
--- 1062,1068 ----
  }
  
  int
! GetRandomKey(struct cmd_syndesc *as, void *arock)
  {
      int code;
      struct ktc_encryptionKey key;
***************
*** 1088,1094 ****
  }
  
  int
! Statistics(struct cmd_syndesc *as, char *arock)
  {
      int code;
      kasstats statics;
--- 1088,1094 ----
  }
  
  int
! Statistics(struct cmd_syndesc *as, void *arock)
  {
      int code;
      kasstats statics;
***************
*** 1141,1147 ****
  }
  
  int
! DebugInfo(struct cmd_syndesc *as, char *arock)
  {
      int code;
      struct ka_debugInfo info;
--- 1141,1147 ----
  }
  
  int
! DebugInfo(struct cmd_syndesc *as, void *arock)
  {
      int code;
      struct ka_debugInfo info;
***************
*** 1237,1257 ****
  }
  
  int
! Interactive(struct cmd_syndesc *as, char *arock)
  {
      finished = 0;
      return 0;
  }
  
  int
! Quit(struct cmd_syndesc *as, char *arock)
  {
      finished = 1;
      return 0;
  }
  
  int
! MyAfterProc(struct cmd_syndesc *as)
  {
      if (!strcmp(as->name, "help"))
  	return 0;
--- 1237,1257 ----
  }
  
  int
! Interactive(struct cmd_syndesc *as, void *arock)
  {
      finished = 0;
      return 0;
  }
  
  int
! Quit(struct cmd_syndesc *as, void *arock)
  {
      finished = 1;
      return 0;
  }
  
  int
! MyAfterProc(struct cmd_syndesc *as, void *arock)
  {
      if (!strcmp(as->name, "help"))
  	return 0;
***************
*** 1274,1287 ****
  afs_int32 serverList[MAXSERVERS];
  
  int
! NoAuth(struct cmd_syndesc *as, char *arock)
  {
      noauth = 1;
      return 0;
  }
  
  static int
! MyBeforeProc(struct cmd_syndesc *as, char *arock)
  {
      extern struct passwd *getpwuid();
      struct ktc_encryptionKey key;
--- 1274,1287 ----
  afs_int32 serverList[MAXSERVERS];
  
  int
! NoAuth(struct cmd_syndesc *as, void *arock)
  {
      noauth = 1;
      return 0;
  }
  
  static int
! MyBeforeProc(struct cmd_syndesc *as, void *arock)
  {
      extern struct passwd *getpwuid();
      struct ktc_encryptionKey key;
***************
*** 1539,1545 ****
  /* These are some helpful command that deal with the cache managers tokens. */
  
  static
! ForgetTicket(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
  
--- 1539,1545 ----
  /* These are some helpful command that deal with the cache managers tokens. */
  
  static
! ForgetTicket(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
  
***************
*** 1593,1599 ****
  }
  
  static
! ListTickets(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code = 0;
      int index, newIndex;
--- 1593,1599 ----
  }
  
  static
! ListTickets(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code = 0;
      int index, newIndex;
***************
*** 1666,1679 ****
      cmd_SetBeforeProc(MyBeforeProc, NULL);
      cmd_SetAfterProc(MyAfterProc, NULL);
  
!     ts = cmd_CreateSyntax("interactive", Interactive, 0,
  			  "enter interactive mode");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("noauthentication", NoAuth, 0,
  			  "connect to AuthServer w/o using token");
  
!     ts = cmd_CreateSyntax("list", ListUsers, 0, "list all users in database");
      cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL,
  		"show detailed info about each user");
      cmd_AddParm(ts, "-showadmin", CMD_FLAG, CMD_OPTIONAL,
--- 1666,1680 ----
      cmd_SetBeforeProc(MyBeforeProc, NULL);
      cmd_SetAfterProc(MyAfterProc, NULL);
  
!     ts = cmd_CreateSyntax("interactive", Interactive, NULL,
  			  "enter interactive mode");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("noauthentication", NoAuth, NULL,
  			  "connect to AuthServer w/o using token");
  
!     ts = cmd_CreateSyntax("list", ListUsers, NULL, 
! 			  "list all users in database");
      cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL,
  		"show detailed info about each user");
      cmd_AddParm(ts, "-showadmin", CMD_FLAG, CMD_OPTIONAL,
***************
*** 1683,1708 ****
      add_std_args(ts);
      cmd_CreateAlias(ts, "ls");
  
!     ts = cmd_CreateSyntax("examine", ExamineUser, 0,
  			  "examine the entry for a user");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of user");
      cmd_AddParm(ts, "-showkey", CMD_FLAG, CMD_OPTIONAL,
  		"show the user's actual key rather than the checksum");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("create", CreateUser, 0,
  			  "create an entry for a user");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of user");
      cmd_AddParm(ts, "-initial_password", CMD_SINGLE, CMD_OPTIONAL,
  		"initial password");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("delete", DeleteUser, 0, "delete a user");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of user");
      add_std_args(ts);
      cmd_CreateAlias(ts, "rm");
  
!     ts = cmd_CreateSyntax("setfields", SetFields, 0,
  			  "set various fields in a user's entry");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of user");
      cmd_AddParm(ts, "-flags", CMD_SINGLE, CMD_OPTIONAL,
--- 1684,1709 ----
      add_std_args(ts);
      cmd_CreateAlias(ts, "ls");
  
!     ts = cmd_CreateSyntax("examine", ExamineUser, NULL,
  			  "examine the entry for a user");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of user");
      cmd_AddParm(ts, "-showkey", CMD_FLAG, CMD_OPTIONAL,
  		"show the user's actual key rather than the checksum");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("create", CreateUser, NULL,
  			  "create an entry for a user");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of user");
      cmd_AddParm(ts, "-initial_password", CMD_SINGLE, CMD_OPTIONAL,
  		"initial password");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("delete", DeleteUser, NULL, "delete a user");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of user");
      add_std_args(ts);
      cmd_CreateAlias(ts, "rm");
  
!     ts = cmd_CreateSyntax("setfields", SetFields, NULL,
  			  "set various fields in a user's entry");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of user");
      cmd_AddParm(ts, "-flags", CMD_SINGLE, CMD_OPTIONAL,
***************
*** 1727,1744 ****
      cmd_CreateAlias(ts, "sf");
  
  
!     ts = cmd_CreateSyntax("unlock", Unlock, 0,
  			  "Enable authentication ID after max failed attempts exceeded");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "authentication ID");
      add_std_args(ts);
  
  
!     ts = cmd_CreateSyntax("stringtokey", StringToKey, 0,
  			  "convert a string to a key");
      cmd_AddParm(ts, "-string", CMD_SINGLE, 0, "password string");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell name");
  
!     ts = cmd_CreateSyntax("setpassword", SetPassword, 0,
  			  "set a user's password");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of user");
      cmd_AddParm(ts, "-new_password", CMD_SINGLE, CMD_OPTIONAL,
--- 1728,1745 ----
      cmd_CreateAlias(ts, "sf");
  
  
!     ts = cmd_CreateSyntax("unlock", Unlock, NULL,
  			  "Enable authentication ID after max failed attempts exceeded");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "authentication ID");
      add_std_args(ts);
  
  
!     ts = cmd_CreateSyntax("stringtokey", StringToKey, NULL,
  			  "convert a string to a key");
      cmd_AddParm(ts, "-string", CMD_SINGLE, 0, "password string");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell name");
  
!     ts = cmd_CreateSyntax("setpassword", SetPassword, NULL,
  			  "set a user's password");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of user");
      cmd_AddParm(ts, "-new_password", CMD_SINGLE, CMD_OPTIONAL,
***************
*** 1752,1758 ****
  #endif
  
      /* set a user's key */
!     ts = cmd_CreateSyntax("setkey", SetPassword, 0, (char *)CMD_HIDDEN);
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of user");
      cmd_Seek(ts, 2);
      cmd_AddParm(ts, "-new_key", CMD_SINGLE, 0, "eight byte new key");
--- 1753,1759 ----
  #endif
  
      /* set a user's key */
!     ts = cmd_CreateSyntax("setkey", SetPassword, NULL, (char *)CMD_HIDDEN);
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of user");
      cmd_Seek(ts, 2);
      cmd_AddParm(ts, "-new_key", CMD_SINGLE, 0, "eight byte new key");
***************
*** 1761,1767 ****
      add_std_args(ts);
  
      /* get a user's password */
!     ts = cmd_CreateSyntax("getpassword", GetPassword, 0, (char *)CMD_HIDDEN);
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of user");
      /* don't take standard args */
      /* add_std_args (ts); */
--- 1762,1768 ----
      add_std_args(ts);
  
      /* get a user's password */
!     ts = cmd_CreateSyntax("getpassword", GetPassword, NULL, (char *)CMD_HIDDEN);
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of user");
      /* don't take standard args */
      /* add_std_args (ts); */
***************
*** 1770,1796 ****
  #endif
  
      /* get a random key */
!     ts = cmd_CreateSyntax("getrandomkey", GetRandomKey, 0,
  			  (char *)CMD_HIDDEN);
      add_std_args(ts);
  
      /* get a ticket for a specific server */
!     ts = cmd_CreateSyntax("getticket", GetTicket, 0, (char *)CMD_HIDDEN);
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of server");
      cmd_AddParm(ts, "-lifetime", CMD_SINGLE, CMD_OPTIONAL, "ticket lifetime");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("statistics", Statistics, 0,
  			  "show statistics for AuthServer");
      add_std_args(ts);
  
      /* show debugging info from AuthServer */
!     ts = cmd_CreateSyntax("debuginfo", DebugInfo, 0, (char *)CMD_HIDDEN);
      cmd_AddParm(ts, "-hostname", CMD_SINGLE, CMD_OPTIONAL,
  		"authentication server host name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("forgetticket", ForgetTicket, 0,
  			  "delete user's tickets");
  #ifdef notdef
      cmd_AddParm(ts, "-name", CMD_SINGLE, (CMD_OPTIONAL | CMD_HIDE),
--- 1771,1797 ----
  #endif
  
      /* get a random key */
!     ts = cmd_CreateSyntax("getrandomkey", GetRandomKey, NULL,
  			  (char *)CMD_HIDDEN);
      add_std_args(ts);
  
      /* get a ticket for a specific server */
!     ts = cmd_CreateSyntax("getticket", GetTicket, NULL, (char *)CMD_HIDDEN);
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of server");
      cmd_AddParm(ts, "-lifetime", CMD_SINGLE, CMD_OPTIONAL, "ticket lifetime");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("statistics", Statistics, NULL,
  			  "show statistics for AuthServer");
      add_std_args(ts);
  
      /* show debugging info from AuthServer */
!     ts = cmd_CreateSyntax("debuginfo", DebugInfo, NULL, (char *)CMD_HIDDEN);
      cmd_AddParm(ts, "-hostname", CMD_SINGLE, CMD_OPTIONAL,
  		"authentication server host name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("forgetticket", ForgetTicket, NULL,
  			  "delete user's tickets");
  #ifdef notdef
      cmd_AddParm(ts, "-name", CMD_SINGLE, (CMD_OPTIONAL | CMD_HIDE),
***************
*** 1798,1810 ****
  #endif
      cmd_AddParm(ts, "-all", CMD_FLAG, CMD_OPTIONAL, "delete all tickets");
  
!     ts = cmd_CreateSyntax("listtickets", ListTickets, 0,
  			  "show all cache manager tickets");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_OPTIONAL, "name of server");
      cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL,
  		"show session key and ticket");
  
!     ts = cmd_CreateSyntax("quit", Quit, 0, "exit program");
  
      finished = 1;
      conn = 0;			/* no connection yet */
--- 1799,1811 ----
  #endif
      cmd_AddParm(ts, "-all", CMD_FLAG, CMD_OPTIONAL, "delete all tickets");
  
!     ts = cmd_CreateSyntax("listtickets", ListTickets, NULL,
  			  "show all cache manager tickets");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_OPTIONAL, "name of server");
      cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL,
  		"show session key and ticket");
  
!     ts = cmd_CreateSyntax("quit", Quit, NULL, "exit program");
  
      finished = 1;
      conn = 0;			/* no connection yet */
Index: openafs/src/kauth/authclient.c
diff -c openafs/src/kauth/authclient.c:1.18.8.2 openafs/src/kauth/authclient.c:1.18.8.3
*** openafs/src/kauth/authclient.c:1.18.8.2	Thu Sep 21 07:41:45 2006
--- openafs/src/kauth/authclient.c	Tue Oct 30 11:16:39 2007
***************
*** 17,23 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/authclient.c,v 1.18.8.2 2006/09/21 11:41:45 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
--- 17,23 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/authclient.c,v 1.18.8.3 2007/10/30 15:16:39 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
***************
*** 46,58 ****
  #include <sys/socket.h>
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <rx/rxkad.h>
  #include <afs/cellconfig.h>
  #include <ubik.h>
--- 46,52 ----
Index: openafs/src/kauth/client.c
diff -c openafs/src/kauth/client.c:1.14 openafs/src/kauth/client.c:1.14.4.1
*** openafs/src/kauth/client.c:1.14	Sun Jul 10 23:22:22 2005
--- openafs/src/kauth/client.c	Tue Oct 30 11:16:39 2007
***************
*** 15,21 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/client.c,v 1.14 2005/07/11 03:22:22 shadow Exp $");
  
  #if defined(UKERNEL)
  #ifdef HAVE_UNISTD_H
--- 15,21 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/client.c,v 1.14.4.1 2007/10/30 15:16:39 shadow Exp $");
  
  #if defined(UKERNEL)
  #ifdef HAVE_UNISTD_H
***************
*** 41,53 ****
  #include <winsock2.h>
  #include <crypt.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef HAVE_UNISTD_H
  #define __USE_XOPEN
  #include <unistd.h>
--- 41,47 ----
Index: openafs/src/kauth/kaauxdb.c
diff -c openafs/src/kauth/kaauxdb.c:1.9 openafs/src/kauth/kaauxdb.c:1.9.14.1
*** openafs/src/kauth/kaauxdb.c:1.9	Sat Nov 22 23:53:35 2003
--- openafs/src/kauth/kaauxdb.c	Tue Oct 30 11:16:39 2007
***************
*** 15,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kaauxdb.c,v 1.9 2003/11/23 04:53:35 jaltman Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <io.h>
--- 15,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kaauxdb.c,v 1.9.14.1 2007/10/30 15:16:39 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <io.h>
***************
*** 25,37 ****
  #ifdef HAVE_FCNTL_H
  #include <fcntl.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <rx/rxkad.h>
  #include "ubik_int.h"
  #include "kauth.h"
--- 25,31 ----
Index: openafs/src/kauth/kadatabase.c
diff -c openafs/src/kauth/kadatabase.c:1.11 openafs/src/kauth/kadatabase.c:1.11.8.1
*** openafs/src/kauth/kadatabase.c:1.11	Wed Aug 18 21:07:47 2004
--- openafs/src/kauth/kadatabase.c	Tue Oct 30 11:16:39 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kadatabase.c,v 1.11 2004/08/19 01:07:47 kolya Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kadatabase.c,v 1.11.8.1 2007/10/30 15:16:39 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 19,32 ****
  #else
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- #include <lock.h>
  #include <ubik.h>
  #include <rx/xdr.h>
  #include <rx/rx.h>
--- 19,25 ----
Index: openafs/src/kauth/kalocalcell.c
diff -c openafs/src/kauth/kalocalcell.c:1.9 openafs/src/kauth/kalocalcell.c:1.9.8.1
*** openafs/src/kauth/kalocalcell.c:1.9	Wed Aug 18 21:07:47 2004
--- openafs/src/kauth/kalocalcell.c	Tue Oct 30 11:16:39 2007
***************
*** 15,21 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kalocalcell.c,v 1.9 2004/08/19 01:07:47 kolya Exp $");
  
  #if defined(UKERNEL)
  #include "afs/pthread_glock.h"
--- 15,21 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kalocalcell.c,v 1.9.8.1 2007/10/30 15:16:39 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/pthread_glock.h"
***************
*** 37,49 ****
  #else
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <afs/cellconfig.h>
  #include <rx/xdr.h>
  #include <rx/rx.h>
--- 37,43 ----
Index: openafs/src/kauth/kalog.c
diff -c openafs/src/kauth/kalog.c:1.6 openafs/src/kauth/kalog.c:1.6.14.1
*** openafs/src/kauth/kalog.c:1.6	Tue Jul 15 19:15:16 2003
--- openafs/src/kauth/kalog.c	Tue Oct 30 11:16:39 2007
***************
*** 20,36 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kalog.c,v 1.6 2003/07/15 23:15:16 shadow Exp $");
  
  #include <stdio.h>
  #include <afs/afsutil.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef HAVE_FCNTL_H
  #include <fcntl.h>
  #endif
--- 20,30 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kalog.c,v 1.6.14.1 2007/10/30 15:16:39 shadow Exp $");
  
  #include <stdio.h>
  #include <afs/afsutil.h>
  #include <string.h>
  #ifdef HAVE_FCNTL_H
  #include <fcntl.h>
  #endif
Index: openafs/src/kauth/kas.c
diff -c openafs/src/kauth/kas.c:1.7.14.1 openafs/src/kauth/kas.c:1.7.14.2
*** openafs/src/kauth/kas.c:1.7.14.1	Tue Apr 10 14:39:52 2007
--- openafs/src/kauth/kas.c	Tue Oct 30 11:16:39 2007
***************
*** 12,18 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kas.c,v 1.7.14.1 2007/04/10 18:39:52 shadow Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
--- 12,18 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kas.c,v 1.7.14.2 2007/10/30 15:16:39 shadow Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
***************
*** 29,41 ****
  #else
  #include <WINNT/afsevent.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <afs/cellconfig.h>
  #include <afs/com_err.h>
  
--- 29,35 ----
Index: openafs/src/kauth/kaserver.c
diff -c openafs/src/kauth/kaserver.c:1.19.2.4 openafs/src/kauth/kaserver.c:1.19.2.5
*** openafs/src/kauth/kaserver.c:1.19.2.4	Tue Apr 10 14:39:52 2007
--- openafs/src/kauth/kaserver.c	Tue Oct 30 11:16:39 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kaserver.c,v 1.19.2.4 2007/04/10 18:39:52 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kaserver.c,v 1.19.2.5 2007/10/30 15:16:39 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 26,38 ****
  #include "kalog.h"		/* for OpenLog() */
  #include <time.h>
  #include <stdio.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef HAVE_FCNTL_H
  #include <fcntl.h>
  #endif
--- 26,32 ----
Index: openafs/src/kauth/kautils.c
diff -c openafs/src/kauth/kautils.c:1.9 openafs/src/kauth/kautils.c:1.9.14.1
*** openafs/src/kauth/kautils.c:1.9	Tue Jul 15 19:15:16 2003
--- openafs/src/kauth/kautils.c	Tue Oct 30 11:16:39 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kautils.c,v 1.9 2003/07/15 23:15:16 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kautils.c,v 1.9.14.1 2007/10/30 15:16:39 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 22,34 ****
  #include <netinet/in.h>
  #include <sys/file.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <time.h>
  #include <stdio.h>
  #include <ctype.h>
--- 22,28 ----
Index: openafs/src/kauth/kdb.c
diff -c openafs/src/kauth/kdb.c:1.8 openafs/src/kauth/kdb.c:1.8.8.1
*** openafs/src/kauth/kdb.c:1.8	Fri Aug 20 00:05:14 2004
--- openafs/src/kauth/kdb.c	Wed Oct 31 00:09:30 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kdb.c,v 1.8 2004/08/20 04:05:14 shadow Exp $");
  
  #include <fcntl.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kdb.c,v 1.8.8.1 2007/10/31 04:09:30 shadow Exp $");
  
  #include <fcntl.h>
  #include <sys/types.h>
***************
*** 29,36 ****
  
  char *dbmfile;
  
! static
! cmdproc(register struct cmd_syndesc *as, afs_int32 arock)
  {
      DBM *kdb;
      datum key, data;
--- 29,36 ----
  
  char *dbmfile;
  
! static int
! cmdproc(register struct cmd_syndesc *as, void * arock)
  {
      DBM *kdb;
      datum key, data;
***************
*** 96,101 ****
--- 96,102 ----
  	}
      }
      dbm_close(kdb);
+     return 0;
  }
  
  
***************
*** 111,117 ****
      sprintf(dbmfile_help, "dbmfile to use (default %s)",
  	    AFSDIR_SERVER_KALOGDB_FILEPATH);
      dbmfile = AFSDIR_SERVER_KALOGDB_FILEPATH;
!     ts = cmd_CreateSyntax(NULL, cmdproc, 0, "Dump contents of dbm database");
      cmd_AddParm(ts, "-dbmfile", CMD_SINGLE, CMD_OPTIONAL, dbmfile_help);
      cmd_AddParm(ts, "-key", CMD_SINGLE, CMD_OPTIONAL,
  		"extract entries that match specified key");
--- 112,118 ----
      sprintf(dbmfile_help, "dbmfile to use (default %s)",
  	    AFSDIR_SERVER_KALOGDB_FILEPATH);
      dbmfile = AFSDIR_SERVER_KALOGDB_FILEPATH;
!     ts = cmd_CreateSyntax(NULL, cmdproc, NULL, "Dump contents of dbm database");
      cmd_AddParm(ts, "-dbmfile", CMD_SINGLE, CMD_OPTIONAL, dbmfile_help);
      cmd_AddParm(ts, "-key", CMD_SINGLE, CMD_OPTIONAL,
  		"extract entries that match specified key");
Index: openafs/src/kauth/klog.c
diff -c openafs/src/kauth/klog.c:1.8.14.2 openafs/src/kauth/klog.c:1.8.14.4
*** openafs/src/kauth/klog.c:1.8.14.2	Tue Apr 10 14:39:52 2007
--- openafs/src/kauth/klog.c	Wed Oct 31 00:09:30 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/klog.c,v 1.8.14.2 2007/04/10 18:39:52 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/klog.c,v 1.8.14.4 2007/10/31 04:09:30 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 19,32 ****
  #ifdef	AFS_AIX32_ENV
  #include <signal.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #include <lock.h>
  #include <ubik.h>
  
--- 19,25 ----
***************
*** 70,76 ****
  #define KLOGEXIT(code) assert(!code || code >= KAMINERROR); \
                         rx_Finalize(); \
                         (!code ? exit(0) : exit((code)-KAMINERROR+1))
! extern int CommandProc(struct cmd_syndesc *as, char *arock);
  
  static int zero_argc;
  static char **zero_argv;
--- 63,69 ----
  #define KLOGEXIT(code) assert(!code || code >= KAMINERROR); \
                         rx_Finalize(); \
                         (!code ? exit(0) : exit((code)-KAMINERROR+1))
! int CommandProc(struct cmd_syndesc *as, void *arock);
  
  static int zero_argc;
  static char **zero_argv;
***************
*** 104,110 ****
      zero_argc = argc;
      zero_argv = argv;
  
!     ts = cmd_CreateSyntax(NULL, CommandProc, 0,
  			  "obtain Kerberos authentication");
  
  #define aXFLAG 0
--- 97,103 ----
      zero_argc = argc;
      zero_argv = argv;
  
!     ts = cmd_CreateSyntax(NULL, CommandProc, NULL,
  			  "obtain Kerberos authentication");
  
  #define aXFLAG 0
***************
*** 157,163 ****
  }
  
  int
! CommandProc(struct cmd_syndesc *as, char *arock)
  {
      char name[MAXKTCNAMELEN];
      char instance[MAXKTCNAMELEN];
--- 150,156 ----
  }
  
  int
! CommandProc(struct cmd_syndesc *as, void *arock)
  {
      char name[MAXKTCNAMELEN];
      char instance[MAXKTCNAMELEN];
Index: openafs/src/kauth/knfs.c
diff -c openafs/src/kauth/knfs.c:1.8 openafs/src/kauth/knfs.c:1.8.14.2
*** openafs/src/kauth/knfs.c:1.8	Tue Jul 15 19:15:16 2003
--- openafs/src/kauth/knfs.c	Wed Oct 31 00:09:30 2007
***************
*** 15,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/knfs.c,v 1.8 2003/07/15 23:15:16 shadow Exp $");
  
  #include <stdio.h>
  #include <afs/stds.h>
--- 15,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/knfs.c,v 1.8.14.2 2007/10/31 04:09:30 shadow Exp $");
  
  #include <stdio.h>
  #include <afs/stds.h>
***************
*** 27,47 ****
  #include <netdb.h>
  #include <errno.h>
  #include <sys/ioctl.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <afs/vice.h>
  #include <afs/cmd.h>
  #include <afs/auth.h>
  #include <afs/afsutil.h>
  
- 
- extern struct cmd_syndesc *cmd_CreateSyntax();
- 
  /*
  Modifications:
  
--- 27,38 ----
***************
*** 358,367 ****
      return code;
  }
  
! static
! cmdproc(as, arock)
!      register struct cmd_syndesc *as;
!      afs_int32 arock;
  {
      register struct hostent *the;
      char *tp, *sysname = 0;
--- 349,356 ----
      return code;
  }
  
! static int
! cmdproc(register struct cmd_syndesc *as, void *arock)
  {
      register struct hostent *the;
      char *tp, *sysname = 0;
***************
*** 469,475 ****
      sigaction(SIGSEGV, &nsa, NULL);
  #endif
  
!     ts = cmd_CreateSyntax(NULL, cmdproc, 0, "copy tickets for NFS");
      cmd_AddParm(ts, "-host", CMD_SINGLE, CMD_REQUIRED, "host name");
      cmd_AddParm(ts, "-id", CMD_SINGLE, CMD_OPTIONAL, "user ID (decimal)");
      cmd_AddParm(ts, "-sysname", CMD_SINGLE, CMD_OPTIONAL,
--- 458,464 ----
      sigaction(SIGSEGV, &nsa, NULL);
  #endif
  
!     ts = cmd_CreateSyntax(NULL, cmdproc, NULL, "copy tickets for NFS");
      cmd_AddParm(ts, "-host", CMD_SINGLE, CMD_REQUIRED, "host name");
      cmd_AddParm(ts, "-id", CMD_SINGLE, CMD_OPTIONAL, "user ID (decimal)");
      cmd_AddParm(ts, "-sysname", CMD_SINGLE, CMD_OPTIONAL,
Index: openafs/src/kauth/kpasswd.c
diff -c openafs/src/kauth/kpasswd.c:1.15.8.1 openafs/src/kauth/kpasswd.c:1.15.8.3
*** openafs/src/kauth/kpasswd.c:1.15.8.1	Tue Apr 10 14:39:52 2007
--- openafs/src/kauth/kpasswd.c	Wed Oct 31 00:09:30 2007
***************
*** 12,18 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kpasswd.c,v 1.15.8.1 2007/04/10 18:39:52 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 12,18 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kpasswd.c,v 1.15.8.3 2007/10/31 04:09:30 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 29,41 ****
  #ifndef AFS_NT40_ENV
  #include <pwd.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <signal.h>
  #include <afs/com_err.h>
  #include <afs/auth.h>
--- 29,35 ----
***************
*** 79,85 ****
  
  /* The following code to make use of libcmd.a also stolen from klog.c. */
  
! int CommandProc();
  
  static int zero_argc;
  static char **zero_argv;
--- 73,79 ----
  
  /* The following code to make use of libcmd.a also stolen from klog.c. */
  
! int CommandProc(struct cmd_syndesc *, void *);
  
  static int zero_argc;
  static char **zero_argv;
***************
*** 207,215 ****
  #endif
  
  char passwd[BUFSIZ], npasswd[BUFSIZ], verify[BUFSIZ];
! CommandProc(as, arock)
!      char *arock;
!      struct cmd_syndesc *as;
  {
      char name[MAXKTCNAMELEN] = "";
      char instance[MAXKTCNAMELEN] = "";
--- 201,207 ----
  #endif
  
  char passwd[BUFSIZ], npasswd[BUFSIZ], verify[BUFSIZ];
! CommandProc(struct cmd_syndesc *as, void *arock)
  {
      char name[MAXKTCNAMELEN] = "";
      char instance[MAXKTCNAMELEN] = "";
Index: openafs/src/kauth/kpwvalid.c
diff -c openafs/src/kauth/kpwvalid.c:1.6 openafs/src/kauth/kpwvalid.c:1.6.14.1
*** openafs/src/kauth/kpwvalid.c:1.6	Tue Jul 15 19:15:17 2003
--- openafs/src/kauth/kpwvalid.c	Tue Oct 30 11:16:39 2007
***************
*** 11,26 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kpwvalid.c,v 1.6 2003/07/15 23:15:17 shadow Exp $");
  
  #include <stdio.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef AFS_NT40_ENV
  #include <WINNT/afsevent.h>
  #endif
--- 11,20 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kpwvalid.c,v 1.6.14.1 2007/10/30 15:16:39 shadow Exp $");
  
  #include <stdio.h>
  #include <string.h>
  #ifdef AFS_NT40_ENV
  #include <WINNT/afsevent.h>
  #endif
Index: openafs/src/kauth/krb_tf.c
diff -c openafs/src/kauth/krb_tf.c:1.6.14.2 openafs/src/kauth/krb_tf.c:1.6.14.3
*** openafs/src/kauth/krb_tf.c:1.6.14.2	Mon Aug 20 13:27:51 2007
--- openafs/src/kauth/krb_tf.c	Tue Oct 30 11:16:39 2007
***************
*** 48,54 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/krb_tf.c,v 1.6.14.2 2007/08/20 17:27:51 shadow Exp $");
  
  #ifdef HAVE_FCNTL_H
  #include <fcntl.h>
--- 48,54 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/krb_tf.c,v 1.6.14.3 2007/10/30 15:16:39 shadow Exp $");
  
  #ifdef HAVE_FCNTL_H
  #include <fcntl.h>
***************
*** 58,70 ****
  #else
  #include <sys/file.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <sys/types.h>
  #include <rx/xdr.h>
  #include <errno.h>
--- 58,64 ----
Index: openafs/src/kauth/krb_udp.c
diff -c openafs/src/kauth/krb_udp.c:1.23.14.1 openafs/src/kauth/krb_udp.c:1.23.14.2
*** openafs/src/kauth/krb_udp.c:1.23.14.1	Tue Apr 10 14:39:52 2007
--- openafs/src/kauth/krb_udp.c	Tue Oct 30 11:16:39 2007
***************
*** 16,22 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/krb_udp.c,v 1.23.14.1 2007/04/10 18:39:52 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 16,22 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/krb_udp.c,v 1.23.14.2 2007/10/30 15:16:39 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 30,42 ****
  #include <netdb.h>
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <afs/afsutil.h>
  #include <time.h>
  #include <afs/com_err.h>
--- 30,36 ----
Index: openafs/src/kauth/manyklog.c
diff -c openafs/src/kauth/manyklog.c:1.7.14.2 openafs/src/kauth/manyklog.c:1.7.14.3
*** openafs/src/kauth/manyklog.c:1.7.14.2	Tue Apr 10 14:39:52 2007
--- openafs/src/kauth/manyklog.c	Wed Oct 31 00:09:30 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/manyklog.c,v 1.7.14.2 2007/04/10 18:39:52 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/manyklog.c,v 1.7.14.3 2007/10/31 04:09:30 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 62,68 ****
  #define KLOGEXIT(code) assert(!code || code >= KAMINERROR); \
                         rx_Finalize(); \
                         (!code ? exit(0) : exit((code)-KAMINERROR+1))
! int CommandProc();
  
  static int zero_argc;
  static char **zero_argv;
--- 62,68 ----
  #define KLOGEXIT(code) assert(!code || code >= KAMINERROR); \
                         rx_Finalize(); \
                         (!code ? exit(0) : exit((code)-KAMINERROR+1))
! static int CommandProc(struct cmd_syndesc *, void *);
  
  static int zero_argc;
  static char **zero_argv;
***************
*** 96,102 ****
      zero_argc = argc;
      zero_argv = argv;
  
!     ts = cmd_CreateSyntax(NULL, CommandProc, 0,
  			  "obtain Kerberos authentication");
  
  #define aXFLAG 0
--- 96,102 ----
      zero_argc = argc;
      zero_argv = argv;
  
!     ts = cmd_CreateSyntax(NULL, CommandProc, NULL,
  			  "obtain Kerberos authentication");
  
  #define aXFLAG 0
***************
*** 151,159 ****
      return gpbuf;
  }
  
! CommandProc(as, arock)
!      char *arock;
!      struct cmd_syndesc *as;
  {
      char name[MAXKTCNAMELEN];
      char instance[MAXKTCNAMELEN];
--- 151,158 ----
      return gpbuf;
  }
  
! static int
! CommandProc(struct cmd_syndesc *as, void *arock)
  {
      char name[MAXKTCNAMELEN];
      char instance[MAXKTCNAMELEN];
Index: openafs/src/kauth/read_passwd.c
diff -c openafs/src/kauth/read_passwd.c:1.6 openafs/src/kauth/read_passwd.c:1.6.14.1
*** openafs/src/kauth/read_passwd.c:1.6	Tue Jul 15 19:15:17 2003
--- openafs/src/kauth/read_passwd.c	Tue Oct 30 11:16:39 2007
***************
*** 14,20 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/read_passwd.c,v 1.6 2003/07/15 23:15:17 shadow Exp $");
  
  #include <mit-cpyright.h>
  #include <des.h>
--- 14,20 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/read_passwd.c,v 1.6.14.1 2007/10/30 15:16:39 shadow Exp $");
  
  #include <mit-cpyright.h>
  #include <des.h>
***************
*** 35,48 ****
  #if defined(AFS_SGI_ENV)
  #include <signal.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  
  #if	defined	(AFS_AIX_ENV) || defined(AFS_SGI_ENV)
  /* Just temp till we figure out the aix stuff */
--- 35,41 ----
Index: openafs/src/kauth/rebuild.c
diff -c openafs/src/kauth/rebuild.c:1.13.2.1 openafs/src/kauth/rebuild.c:1.13.2.3
*** openafs/src/kauth/rebuild.c:1.13.2.1	Tue Apr 10 14:39:52 2007
--- openafs/src/kauth/rebuild.c	Wed Oct 31 00:09:30 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/rebuild.c,v 1.13.2.1 2007/04/10 18:39:52 shadow Exp $");
  
  #include <sys/types.h>
  #include <sys/stat.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/rebuild.c,v 1.13.2.3 2007/10/31 04:09:30 shadow Exp $");
  
  #include <sys/types.h>
  #include <sys/stat.h>
***************
*** 23,35 ****
  #include <sys/file.h>
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <stdio.h>
  #include <errno.h>
  #include <time.h>
--- 23,29 ----
***************
*** 406,414 ****
  
  #include "AFS_component_version_number.c"
  
! WorkerBee(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      afs_int32 code;
      char *dbFile;
--- 400,407 ----
  
  #include "AFS_component_version_number.c"
  
! static int
! WorkerBee(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      char *dbFile;
Index: openafs/src/kauth/token.c
diff -c openafs/src/kauth/token.c:1.10 openafs/src/kauth/token.c:1.10.8.1
*** openafs/src/kauth/token.c:1.10	Wed Aug 18 21:07:47 2004
--- openafs/src/kauth/token.c	Tue Oct 30 11:16:39 2007
***************
*** 19,25 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/token.c,v 1.10 2004/08/19 01:07:47 kolya Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
--- 19,25 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/token.c,v 1.10.8.1 2007/10/30 15:16:39 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
***************
*** 44,56 ****
  #include <sys/socket.h>
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  /* netinet/in.h and cellconfig.h  are needed together */
  #include <afs/cellconfig.h>
      /* these are needed together */
--- 44,50 ----
Index: openafs/src/kauth/user.c
diff -c openafs/src/kauth/user.c:1.12.8.1 openafs/src/kauth/user.c:1.12.8.2
*** openafs/src/kauth/user.c:1.12.8.1	Tue Apr 10 14:39:52 2007
--- openafs/src/kauth/user.c	Tue Oct 30 11:16:39 2007
***************
*** 18,24 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/user.c,v 1.12.8.1 2007/04/10 18:39:52 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
--- 18,24 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/user.c,v 1.12.8.2 2007/10/30 15:16:39 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
***************
*** 45,57 ****
  #else
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <afs/cellconfig.h>
  #include <afs/auth.h>
  #include <afs/ptint.h>
--- 45,51 ----
Index: openafs/src/kauth/test/multiklog.c
diff -c openafs/src/kauth/test/multiklog.c:1.7.14.2 openafs/src/kauth/test/multiklog.c:1.7.14.3
*** openafs/src/kauth/test/multiklog.c:1.7.14.2	Tue Apr 10 14:39:52 2007
--- openafs/src/kauth/test/multiklog.c	Wed Oct 31 00:09:31 2007
***************
*** 18,24 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/test/multiklog.c,v 1.7.14.2 2007/04/10 18:39:52 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 18,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/test/multiklog.c,v 1.7.14.3 2007/10/31 04:09:31 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 52,58 ****
         -repeat is the number of times to iterate over the authentication
   */
  
! int CommandProc();
  
  static int zero_argc;
  static char **zero_argv;
--- 52,58 ----
         -repeat is the number of times to iterate over the authentication
   */
  
! static int CommandProc(struct cmd_syndesc *, void *);
  
  static int zero_argc;
  static char **zero_argv;
***************
*** 75,81 ****
      zero_argc = argc;
      zero_argv = argv;
  
!     ts = cmd_CreateSyntax(NULL, CommandProc, 0,
  			  "obtain Kerberos authentication");
  
  #define aXFLAG 0
--- 75,81 ----
      zero_argc = argc;
      zero_argv = argv;
  
!     ts = cmd_CreateSyntax(NULL, CommandProc, NULL,
  			  "obtain Kerberos authentication");
  
  #define aXFLAG 0
***************
*** 128,136 ****
      return gpbuf;
  }
  
! CommandProc(as, arock)
!      char *arock;
!      struct cmd_syndesc *as;
  {
      char name[MAXKTCNAMELEN];
      char instance[MAXKTCNAMELEN];
--- 128,135 ----
      return gpbuf;
  }
  
! static int
! CommandProc(struct cmd_syndesc *as, void *arock)
  {
      char name[MAXKTCNAMELEN];
      char instance[MAXKTCNAMELEN];
Index: openafs/src/kauth/test/test_getticket.c
diff -c openafs/src/kauth/test/test_getticket.c:1.8.4.1 openafs/src/kauth/test/test_getticket.c:1.8.4.2
*** openafs/src/kauth/test/test_getticket.c:1.8.4.1	Tue Apr 10 14:39:52 2007
--- openafs/src/kauth/test/test_getticket.c	Wed Oct 31 00:09:31 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/test/test_getticket.c,v 1.8.4.1 2007/04/10 18:39:52 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/test/test_getticket.c,v 1.8.4.2 2007/10/31 04:09:31 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 207,218 ****
      CheckLife(t.endTime, t.startTime, expectedLife, match);
  }
  
! static long
! Main(as, arock)
!      IN struct cmd_syndesc *as;
!      IN char *arock;
  {
!     long code;
      char name[MAXKTCNAMELEN];
      char instance[MAXKTCNAMELEN];
      char newCell[MAXKTCREALMLEN];
--- 207,216 ----
      CheckLife(t.endTime, t.startTime, expectedLife, match);
  }
  
! static int
! Main(struct cmd_syndesc *as, void *arock)
  {
!     int code;
      char name[MAXKTCNAMELEN];
      char instance[MAXKTCNAMELEN];
      char newCell[MAXKTCREALMLEN];
***************
*** 510,516 ****
      initialize_ACFG_error_table();
      initialize_KA_error_table();
  
!     ts = cmd_CreateSyntax(0, Main, 0, "Main program");
      /* 0 */ cmd_AddParm(ts, "-patient", CMD_FLAG, CMD_OPTIONAL,
  			"wait for TGS ticket to age");
      cmd_Seek(ts, 12);
--- 508,514 ----
      initialize_ACFG_error_table();
      initialize_KA_error_table();
  
!     ts = cmd_CreateSyntax(NULL, Main, NULL, "Main program");
      /* 0 */ cmd_AddParm(ts, "-patient", CMD_FLAG, CMD_OPTIONAL,
  			"wait for TGS ticket to age");
      cmd_Seek(ts, 12);
Index: openafs/src/kauth/test/test_rxkad_free.c
diff -c openafs/src/kauth/test/test_rxkad_free.c:1.8.4.1 openafs/src/kauth/test/test_rxkad_free.c:1.8.4.2
*** openafs/src/kauth/test/test_rxkad_free.c:1.8.4.1	Tue Apr 10 14:39:52 2007
--- openafs/src/kauth/test/test_rxkad_free.c	Wed Oct 31 00:09:31 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/test/test_rxkad_free.c,v 1.8.4.1 2007/04/10 18:39:52 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/test/test_rxkad_free.c,v 1.8.4.2 2007/10/31 04:09:31 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 52,63 ****
  	   rxkad_stats.destroyUnauth);
  }
  
! static long
! Main(as, arock)
!      IN struct cmd_syndesc *as;
!      IN char *arock;
  {
!     long code;
      char name[MAXKTCNAMELEN];
      char instance[MAXKTCNAMELEN];
      char newCell[MAXKTCREALMLEN];
--- 52,61 ----
  	   rxkad_stats.destroyUnauth);
  }
  
! static int
! Main(struct cmd_syndesc *as, void *arock)
  {
!     int code;
      char name[MAXKTCNAMELEN];
      char instance[MAXKTCNAMELEN];
      char newCell[MAXKTCREALMLEN];
***************
*** 373,379 ****
      initialize_ACFG_error_table();
      initialize_KA_error_table();
  
!     ts = cmd_CreateSyntax(0, Main, 0, "Main program");
      /* 0 */ cmd_AddParm(ts, "-number", CMD_SINGLE, CMD_OPTIONAL,
  			"number of iterations");
      /* 1 */ cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL,
--- 371,377 ----
      initialize_ACFG_error_table();
      initialize_KA_error_table();
  
!     ts = cmd_CreateSyntax(NULL, Main, NULL, "Main program");
      /* 0 */ cmd_AddParm(ts, "-number", CMD_SINGLE, CMD_OPTIONAL,
  			"number of iterations");
      /* 1 */ cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL,
Index: openafs/src/libacl/aclprocs.c
diff -c openafs/src/libacl/aclprocs.c:1.14 openafs/src/libacl/aclprocs.c:1.14.2.1
*** openafs/src/libacl/aclprocs.c:1.14	Thu Feb 23 10:52:23 2006
--- openafs/src/libacl/aclprocs.c	Tue Oct 30 11:16:40 2007
***************
*** 17,23 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libacl/aclprocs.c,v 1.14 2006/02/23 15:52:23 rees Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 17,23 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libacl/aclprocs.c,v 1.14.2.1 2007/10/30 15:16:40 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 25,33 ****
  #else
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #endif
  #include <rx/xdr.h>
  #include <rx/rx.h>
  #include <afs/ptclient.h>
--- 25,31 ----
Index: openafs/src/libadmin/bos/afs_bosAdmin.c
diff -c openafs/src/libadmin/bos/afs_bosAdmin.c:1.11 openafs/src/libadmin/bos/afs_bosAdmin.c:1.11.14.1
*** openafs/src/libadmin/bos/afs_bosAdmin.c:1.11	Sun Dec  7 17:49:29 2003
--- openafs/src/libadmin/bos/afs_bosAdmin.c	Tue Oct 30 11:16:40 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/bos/afs_bosAdmin.c,v 1.11 2003/12/07 22:49:29 jaltman Exp $");
  
  #include <stdio.h>
  #include <afs/stds.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/bos/afs_bosAdmin.c,v 1.11.14.1 2007/10/30 15:16:40 shadow Exp $");
  
  #include <stdio.h>
  #include <afs/stds.h>
***************
*** 32,45 ****
  #else
  #include <unistd.h>
  #endif
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  typedef struct bos_server {
      int begin_magic;
--- 32,38 ----
Index: openafs/src/libadmin/cfg/cfgclient.c
diff -c openafs/src/libadmin/cfg/cfgclient.c:1.6 openafs/src/libadmin/cfg/cfgclient.c:1.6.14.1
*** openafs/src/libadmin/cfg/cfgclient.c:1.6	Tue Jul 15 19:15:25 2003
--- openafs/src/libadmin/cfg/cfgclient.c	Tue Oct 30 11:16:40 2007
***************
*** 15,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/cfg/cfgclient.c,v 1.6 2003/07/15 23:15:25 shadow Exp $");
  
  #include <afs/stds.h>
  
--- 15,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/cfg/cfgclient.c,v 1.6.14.1 2007/10/30 15:16:40 shadow Exp $");
  
  #include <afs/stds.h>
  
***************
*** 23,37 ****
  #include <stdlib.h>
  #include <stdio.h>
  #include <errno.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #include <pthread.h>
  
  #include <afs/afs_Admin.h>
--- 23,29 ----
Index: openafs/src/libadmin/cfg/test/cfgtest.c
diff -c openafs/src/libadmin/cfg/test/cfgtest.c:1.5 openafs/src/libadmin/cfg/test/cfgtest.c:1.5.14.1
*** openafs/src/libadmin/cfg/test/cfgtest.c:1.5	Tue Jul 15 19:15:28 2003
--- openafs/src/libadmin/cfg/test/cfgtest.c	Wed Oct 31 00:09:31 2007
***************
*** 13,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/cfg/test/cfgtest.c,v 1.5 2003/07/15 23:15:28 shadow Exp $");
  
  #include <afs/stds.h>
  
--- 13,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/cfg/test/cfgtest.c,v 1.5.14.1 2007/10/31 04:09:31 shadow Exp $");
  
  #include <afs/stds.h>
  
***************
*** 90,96 ****
  
  
  static int
! DoCellServDbAddHost(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      int maxUpdates;
--- 90,96 ----
  
  
  static int
! DoCellServDbAddHost(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      int maxUpdates;
***************
*** 135,141 ****
  
  
  static int
! DoCellServDbRemoveHost(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      int maxUpdates;
--- 135,141 ----
  
  
  static int
! DoCellServDbRemoveHost(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      int maxUpdates;
***************
*** 181,187 ****
  
  
  static int
! DoCellServDbEnumerate(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      char *fsDbHost = as->parms[0].items->data;
--- 181,187 ----
  
  
  static int
! DoCellServDbEnumerate(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      char *fsDbHost = as->parms[0].items->data;
***************
*** 216,236 ****
  {
      struct cmd_syndesc *ts;
  
!     ts = cmd_CreateSyntax("CellServDbAddHost", DoCellServDbAddHost, 0,
  			  "add configuration target to server CellServDB");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
      cmd_AddParm(ts, "-syshost", CMD_SINGLE, CMD_OPTIONAL,
  		"system control host");
  
!     ts = cmd_CreateSyntax("CellServDbRemoveHost", DoCellServDbRemoveHost, 0,
  			  "remove configuration target from server CellServDB");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
      cmd_AddParm(ts, "-syshost", CMD_SINGLE, CMD_OPTIONAL,
  		"system control host");
  
!     ts = cmd_CreateSyntax("CellServDbEnumerate", DoCellServDbEnumerate, 0,
  			  "enumerate server CellServDB from specified host");
      cmd_AddParm(ts, "-host", CMD_SINGLE, CMD_REQUIRED, "host name");
  
--- 216,236 ----
  {
      struct cmd_syndesc *ts;
  
!     ts = cmd_CreateSyntax("CellServDbAddHost", DoCellServDbAddHost, NULL,
  			  "add configuration target to server CellServDB");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
      cmd_AddParm(ts, "-syshost", CMD_SINGLE, CMD_OPTIONAL,
  		"system control host");
  
!     ts = cmd_CreateSyntax("CellServDbRemoveHost", DoCellServDbRemoveHost, NULL,
  			  "remove configuration target from server CellServDB");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
      cmd_AddParm(ts, "-syshost", CMD_SINGLE, CMD_OPTIONAL,
  		"system control host");
  
!     ts = cmd_CreateSyntax("CellServDbEnumerate", DoCellServDbEnumerate, NULL,
  			  "enumerate server CellServDB from specified host");
      cmd_AddParm(ts, "-host", CMD_SINGLE, CMD_REQUIRED, "host name");
  
***************
*** 245,251 ****
  
  
  static int
! DoDbServersWaitForQuorum(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      void *hostHandle;
--- 245,251 ----
  
  
  static int
! DoDbServersWaitForQuorum(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      void *hostHandle;
***************
*** 273,279 ****
  
  
  static int
! DoFileServerStop(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      void *hostHandle;
--- 273,279 ----
  
  
  static int
! DoFileServerStop(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      void *hostHandle;
***************
*** 294,300 ****
  }
  
  static int
! DoFileServerStart(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      void *hostHandle;
--- 294,300 ----
  }
  
  static int
! DoFileServerStart(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      void *hostHandle;
***************
*** 321,338 ****
      struct cmd_syndesc *ts;
  
      ts = cmd_CreateSyntax("DbServersWaitForQuorum", DoDbServersWaitForQuorum,
! 			  0, "wait for database servers to achieve quorum");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
      cmd_AddParm(ts, "-timeout", CMD_SINGLE, CMD_OPTIONAL,
  		"timeout in seconds");
  
!     ts = cmd_CreateSyntax("FileServerStop", DoFileServerStop, 0,
  			  "stop and unconfigure fileserver on specified host");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
  
!     ts = cmd_CreateSyntax("FileServerStart", DoFileServerStart, 0,
  			  "start the fileserver on specified host");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
--- 321,338 ----
      struct cmd_syndesc *ts;
  
      ts = cmd_CreateSyntax("DbServersWaitForQuorum", DoDbServersWaitForQuorum,
! 			  NULL, "wait for database servers to achieve quorum");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
      cmd_AddParm(ts, "-timeout", CMD_SINGLE, CMD_OPTIONAL,
  		"timeout in seconds");
  
!     ts = cmd_CreateSyntax("FileServerStop", DoFileServerStop, NULL,
  			  "stop and unconfigure fileserver on specified host");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
  
!     ts = cmd_CreateSyntax("FileServerStart", DoFileServerStart, NULL,
  			  "start the fileserver on specified host");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
***************
*** 344,350 ****
  
  
  static int
! DoHostPartitionTableEnumerate(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      cfg_partitionEntry_t *vptable;
--- 344,350 ----
  
  
  static int
! DoHostPartitionTableEnumerate(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      cfg_partitionEntry_t *vptable;
***************
*** 385,391 ****
      struct cmd_syndesc *ts;
  
      ts = cmd_CreateSyntax("HostPartitionTableEnumerate",
! 			  DoHostPartitionTableEnumerate, 0,
  			  "enumerate vice partition table");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
--- 385,391 ----
      struct cmd_syndesc *ts;
  
      ts = cmd_CreateSyntax("HostPartitionTableEnumerate",
! 			  DoHostPartitionTableEnumerate, NULL,
  			  "enumerate vice partition table");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
***************
*** 398,404 ****
  
  
  static int
! DoClientCellServDbAdd(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      void *hostHandle;
--- 398,404 ----
  
  
  static int
! DoClientCellServDbAdd(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      void *hostHandle;
***************
*** 422,428 ****
  
  
  static int
! DoClientCellServDbRemove(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      void *hostHandle;
--- 422,428 ----
  
  
  static int
! DoClientCellServDbRemove(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      void *hostHandle;
***************
*** 447,453 ****
  
  
  static int
! DoClientStart(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      void *hostHandle;
--- 447,453 ----
  
  
  static int
! DoClientStart(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      void *hostHandle;
***************
*** 474,480 ****
  
  
  static int
! DoClientStop(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      void *hostHandle;
--- 474,480 ----
  
  
  static int
! DoClientStop(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      void *hostHandle;
***************
*** 501,507 ****
  
  
  static int
! DoClientSetCell(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      void *hostHandle;
--- 501,507 ----
  
  
  static int
! DoClientSetCell(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      void *hostHandle;
***************
*** 544,550 ****
  
  
  static int
! DoClientQueryStatus(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      char *cfgHost = as->parms[0].items->data;
--- 544,550 ----
  
  
  static int
! DoClientQueryStatus(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      char *cfgHost = as->parms[0].items->data;
***************
*** 578,584 ****
  
  
  static int
! DoHostQueryStatus(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      char *cfgHost = as->parms[0].items->data;
--- 578,584 ----
  
  
  static int
! DoHostQueryStatus(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      char *cfgHost = as->parms[0].items->data;
***************
*** 610,616 ****
  {
      struct cmd_syndesc *ts;
  
!     ts = cmd_CreateSyntax("ClientCellServDbAdd", DoClientCellServDbAdd, 0,
  			  "add host entry to client CellServDB");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
--- 610,616 ----
  {
      struct cmd_syndesc *ts;
  
!     ts = cmd_CreateSyntax("ClientCellServDbAdd", DoClientCellServDbAdd, NULL,
  			  "add host entry to client CellServDB");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
***************
*** 618,655 ****
      cmd_AddParm(ts, "-dbhost", CMD_SINGLE, CMD_REQUIRED, "host to add");
  
      ts = cmd_CreateSyntax("ClientCellServDbRemove", DoClientCellServDbRemove,
! 			  0, "remove host entry from client CellServDB");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_REQUIRED, "cell name");
      cmd_AddParm(ts, "-dbhost", CMD_SINGLE, CMD_REQUIRED, "host to remove");
  
!     ts = cmd_CreateSyntax("ClientSetCell", DoClientSetCell, 0,
  			  "set default client cell");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_REQUIRED, "cell name");
      cmd_AddParm(ts, "-dbhosts", CMD_LIST, CMD_REQUIRED, "database hosts");
  
!     ts = cmd_CreateSyntax("ClientQueryStatus", DoClientQueryStatus, 0,
  			  "query status of client on host");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
  
!     ts = cmd_CreateSyntax("HostQueryStatus", DoHostQueryStatus, 0,
  			  "query status of server on host");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
  
  
!     ts = cmd_CreateSyntax("ClientStart", DoClientStart, 0,
  			  "start the client");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
      cmd_AddParm(ts, "-timeout", CMD_SINGLE, CMD_REQUIRED, "wait timeout");
  
  
!     ts = cmd_CreateSyntax("ClientStop", DoClientStop, 0, "stop the client");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
      cmd_AddParm(ts, "-timeout", CMD_SINGLE, CMD_REQUIRED, "wait timeout");
--- 618,655 ----
      cmd_AddParm(ts, "-dbhost", CMD_SINGLE, CMD_REQUIRED, "host to add");
  
      ts = cmd_CreateSyntax("ClientCellServDbRemove", DoClientCellServDbRemove,
! 			  NULL, "remove host entry from client CellServDB");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_REQUIRED, "cell name");
      cmd_AddParm(ts, "-dbhost", CMD_SINGLE, CMD_REQUIRED, "host to remove");
  
!     ts = cmd_CreateSyntax("ClientSetCell", DoClientSetCell, NULL,
  			  "set default client cell");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_REQUIRED, "cell name");
      cmd_AddParm(ts, "-dbhosts", CMD_LIST, CMD_REQUIRED, "database hosts");
  
!     ts = cmd_CreateSyntax("ClientQueryStatus", DoClientQueryStatus, NULL,
  			  "query status of client on host");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
  
!     ts = cmd_CreateSyntax("HostQueryStatus", DoHostQueryStatus, NULL,
  			  "query status of server on host");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
  
  
!     ts = cmd_CreateSyntax("ClientStart", DoClientStart, NULL,
  			  "start the client");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
      cmd_AddParm(ts, "-timeout", CMD_SINGLE, CMD_REQUIRED, "wait timeout");
  
  
!     ts = cmd_CreateSyntax("ClientStop", DoClientStop, NULL, "stop the client");
      cmd_AddParm(ts, "-cfghost", CMD_SINGLE, CMD_REQUIRED,
  		"configuration host");
      cmd_AddParm(ts, "-timeout", CMD_SINGLE, CMD_REQUIRED, "wait timeout");
Index: openafs/src/libadmin/kas/afs_kasAdmin.c
diff -c openafs/src/libadmin/kas/afs_kasAdmin.c:1.13.4.1 openafs/src/libadmin/kas/afs_kasAdmin.c:1.13.4.2
*** openafs/src/libadmin/kas/afs_kasAdmin.c:1.13.4.1	Sun Jul 15 20:02:17 2007
--- openafs/src/libadmin/kas/afs_kasAdmin.c	Tue Oct 30 11:16:40 2007
***************
*** 11,27 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/kas/afs_kasAdmin.c,v 1.13.4.1 2007/07/16 00:02:17 jaltman Exp $");
  
  #include <stdio.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include <afs/stds.h>
  #include "afs_kasAdmin.h"
--- 11,20 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/kas/afs_kasAdmin.c,v 1.13.4.2 2007/10/30 15:16:40 shadow Exp $");
  
  #include <stdio.h>
  #include <string.h>
  
  #include <afs/stds.h>
  #include "afs_kasAdmin.h"
Index: openafs/src/libadmin/pts/afs_ptsAdmin.c
diff -c openafs/src/libadmin/pts/afs_ptsAdmin.c:1.11.14.1 openafs/src/libadmin/pts/afs_ptsAdmin.c:1.11.14.2
*** openafs/src/libadmin/pts/afs_ptsAdmin.c:1.11.14.1	Sun Jul 15 20:02:17 2007
--- openafs/src/libadmin/pts/afs_ptsAdmin.c	Tue Oct 30 11:16:40 2007
***************
*** 11,28 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/pts/afs_ptsAdmin.c,v 1.11.14.1 2007/07/16 00:02:17 jaltman Exp $");
  
  #include <stdio.h>
- 
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #include <afs/stds.h>
  #include "afs_ptsAdmin.h"
  #include "../adminutil/afs_AdminInternal.h"
--- 11,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/pts/afs_ptsAdmin.c,v 1.11.14.2 2007/10/30 15:16:40 shadow Exp $");
  
  #include <stdio.h>
  #include <afs/stds.h>
  #include "afs_ptsAdmin.h"
  #include "../adminutil/afs_AdminInternal.h"
Index: openafs/src/libadmin/samples/rxdebug_rx_stats.c
diff -c openafs/src/libadmin/samples/rxdebug_rx_stats.c:1.7 openafs/src/libadmin/samples/rxdebug_rx_stats.c:1.7.14.1
*** openafs/src/libadmin/samples/rxdebug_rx_stats.c:1.7	Fri Oct 24 02:26:10 2003
--- openafs/src/libadmin/samples/rxdebug_rx_stats.c	Tue Oct 30 11:16:41 2007
***************
*** 17,37 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/samples/rxdebug_rx_stats.c,v 1.7 2003/10/24 06:26:10 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #include <pthread.h>
  #endif
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #include <afs/afs_Admin.h>
  #include <afs/afs_clientAdmin.h>
  #include <afs/afs_utilAdmin.h>
--- 17,29 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/samples/rxdebug_rx_stats.c,v 1.7.14.1 2007/10/30 15:16:41 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #include <pthread.h>
  #endif
  #include <string.h>
  #include <afs/afs_Admin.h>
  #include <afs/afs_clientAdmin.h>
  #include <afs/afs_utilAdmin.h>
Index: openafs/src/libadmin/samples/rxstat_get_peer.c
diff -c openafs/src/libadmin/samples/rxstat_get_peer.c:1.7 openafs/src/libadmin/samples/rxstat_get_peer.c:1.7.14.1
*** openafs/src/libadmin/samples/rxstat_get_peer.c:1.7	Fri Oct 24 02:26:10 2003
--- openafs/src/libadmin/samples/rxstat_get_peer.c	Tue Oct 30 11:16:41 2007
***************
*** 17,36 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/samples/rxstat_get_peer.c,v 1.7 2003/10/24 06:26:10 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #include <pthread.h>
  #endif
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include <afs/afs_Admin.h>
  #include <afs/afs_AdminErrors.h>
--- 17,30 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/samples/rxstat_get_peer.c,v 1.7.14.1 2007/10/30 15:16:41 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #include <pthread.h>
  #endif
  
  #include <string.h>
  
  #include <afs/afs_Admin.h>
  #include <afs/afs_AdminErrors.h>
Index: openafs/src/libadmin/samples/rxstat_get_process.c
diff -c openafs/src/libadmin/samples/rxstat_get_process.c:1.7 openafs/src/libadmin/samples/rxstat_get_process.c:1.7.14.1
*** openafs/src/libadmin/samples/rxstat_get_process.c:1.7	Fri Oct 24 02:26:10 2003
--- openafs/src/libadmin/samples/rxstat_get_process.c	Tue Oct 30 11:16:41 2007
***************
*** 17,36 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/samples/rxstat_get_process.c,v 1.7 2003/10/24 06:26:10 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #include <pthread.h>
  #endif
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include <afs/afs_Admin.h>
  #include <afs/afs_AdminErrors.h>
--- 17,29 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/samples/rxstat_get_process.c,v 1.7.14.1 2007/10/30 15:16:41 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #include <pthread.h>
  #endif
  #include <string.h>
  
  #include <afs/afs_Admin.h>
  #include <afs/afs_AdminErrors.h>
Index: openafs/src/libadmin/test/afscp.c
diff -c openafs/src/libadmin/test/afscp.c:1.7 openafs/src/libadmin/test/afscp.c:1.7.14.1
*** openafs/src/libadmin/test/afscp.c:1.7	Fri Oct 24 02:26:10 2003
--- openafs/src/libadmin/test/afscp.c	Wed Oct 31 00:09:31 2007
***************
*** 15,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/test/afscp.c,v 1.7 2003/10/24 06:26:10 shadow Exp $");
  
  #include <afs/stds.h>
  
--- 15,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/test/afscp.c,v 1.7.14.1 2007/10/31 04:09:31 shadow Exp $");
  
  #include <afs/stds.h>
  
***************
*** 59,65 ****
   */
  
  static int
! MyBeforeProc(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      int no_auth = 0;
--- 59,65 ----
   */
  
  static int
! MyBeforeProc(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      int no_auth = 0;
***************
*** 149,155 ****
  }
  
  static int
! MyAfterProc(struct cmd_syndesc *as)
  {
  
      afsclient_CellClose(cellHandle, (afs_status_p) 0);
--- 149,155 ----
  }
  
  static int
! MyAfterProc(struct cmd_syndesc *as,void *arock)
  {
  
      afsclient_CellClose(cellHandle, (afs_status_p) 0);
Index: openafs/src/libadmin/test/bos.c
diff -c openafs/src/libadmin/test/bos.c:1.10 openafs/src/libadmin/test/bos.c:1.10.14.1
*** openafs/src/libadmin/test/bos.c:1.10	Sat Nov 29 17:08:13 2003
--- openafs/src/libadmin/test/bos.c	Wed Oct 31 00:09:31 2007
***************
*** 15,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/test/bos.c,v 1.10 2003/11/29 22:08:13 jaltman Exp $");
  
  #include "bos.h"
  
--- 15,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/test/bos.c,v 1.10.14.1 2007/10/31 04:09:31 shadow Exp $");
  
  #include "bos.h"
  
***************
*** 268,274 ****
  }
  
  int
! DoBosProcessCreate(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PROCESS, BINARY, CRON, CRONTIME,
  	NOTIFIER
--- 268,274 ----
  }
  
  int
! DoBosProcessCreate(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PROCESS, BINARY, CRON, CRONTIME,
  	NOTIFIER
***************
*** 334,340 ****
  }
  
  int
! DoBosFSProcessCreate(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PROCESS, FILESERVER, VOLSERVER, SALVAGER,
  	NOTIFIER
--- 334,340 ----
  }
  
  int
! DoBosFSProcessCreate(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PROCESS, FILESERVER, VOLSERVER, SALVAGER,
  	NOTIFIER
***************
*** 386,392 ****
  }
  
  int
! DoBosProcessDelete(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PROCESS } DoBosProcessDelete_parm_t;
      afs_status_t st = 0;
--- 386,392 ----
  }
  
  int
! DoBosProcessDelete(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PROCESS } DoBosProcessDelete_parm_t;
      afs_status_t st = 0;
***************
*** 435,441 ****
  }
  
  int
! DoBosProcessExecutionStateGet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PROCESS } DoBosProcessExecutionStateGet_parm_t;
      afs_status_t st = 0;
--- 435,441 ----
  }
  
  int
! DoBosProcessExecutionStateGet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PROCESS } DoBosProcessExecutionStateGet_parm_t;
      afs_status_t st = 0;
***************
*** 471,477 ****
  }
  
  int
! DoBosProcessExecutionStateSet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PROCESS, STOPPED,
  	RUNNING
--- 471,477 ----
  }
  
  int
! DoBosProcessExecutionStateSet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PROCESS, STOPPED,
  	RUNNING
***************
*** 522,528 ****
  }
  
  int
! DoBosProcessExecutionStateSetTemporary(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PROCESS, STOPPED,
  	RUNNING
--- 522,528 ----
  }
  
  int
! DoBosProcessExecutionStateSetTemporary(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PROCESS, STOPPED,
  	RUNNING
***************
*** 574,580 ****
  }
  
  int
! DoBosProcessNameList(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER } DoBosProcessNameList_parm_t;
      afs_status_t st = 0;
--- 574,580 ----
  }
  
  int
! DoBosProcessNameList(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER } DoBosProcessNameList_parm_t;
      afs_status_t st = 0;
***************
*** 663,669 ****
  }
  
  int
! DoBosProcessInfoGet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PROCESS } DoBosProcessInfoGet_parm_t;
      afs_status_t st = 0;
--- 663,669 ----
  }
  
  int
! DoBosProcessInfoGet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PROCESS } DoBosProcessInfoGet_parm_t;
      afs_status_t st = 0;
***************
*** 694,700 ****
  }
  
  int
! DoBosProcessParameterList(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PROCESS } DoBosProcessParameterList_parm_t;
      afs_status_t st = 0;
--- 694,700 ----
  }
  
  int
! DoBosProcessParameterList(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PROCESS } DoBosProcessParameterList_parm_t;
      afs_status_t st = 0;
***************
*** 738,744 ****
  }
  
  int
! DoBosProcessNotifierGet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PROCESS } DoBosProcessNotifierGet_parm_t;
      afs_status_t st = 0;
--- 738,744 ----
  }
  
  int
! DoBosProcessNotifierGet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PROCESS } DoBosProcessNotifierGet_parm_t;
      afs_status_t st = 0;
***************
*** 773,779 ****
  }
  
  int
! DoBosProcessRestart(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PROCESS } DoBosProcessRestart_parm_t;
      afs_status_t st = 0;
--- 773,779 ----
  }
  
  int
! DoBosProcessRestart(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PROCESS } DoBosProcessRestart_parm_t;
      afs_status_t st = 0;
***************
*** 801,807 ****
  }
  
  int
! DoBosProcessAllStop(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER } DoBosProcessAllStop_parm_t;
      afs_status_t st = 0;
--- 801,807 ----
  }
  
  int
! DoBosProcessAllStop(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER } DoBosProcessAllStop_parm_t;
      afs_status_t st = 0;
***************
*** 824,830 ****
  }
  
  int
! DoBosProcessAllStart(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER } DoBosProcessAllStart_parm_t;
      afs_status_t st = 0;
--- 824,830 ----
  }
  
  int
! DoBosProcessAllStart(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER } DoBosProcessAllStart_parm_t;
      afs_status_t st = 0;
***************
*** 847,853 ****
  }
  
  int
! DoBosProcessAllWaitStop(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER } DoBosProcessAllWaitStop_parm_t;
      afs_status_t st = 0;
--- 847,853 ----
  }
  
  int
! DoBosProcessAllWaitStop(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER } DoBosProcessAllWaitStop_parm_t;
      afs_status_t st = 0;
***************
*** 870,876 ****
  }
  
  int
! DoBosProcessAllWaitTransition(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER } DoBosProcessAllWaitTransition_parm_t;
      afs_status_t st = 0;
--- 870,876 ----
  }
  
  int
! DoBosProcessAllWaitTransition(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER } DoBosProcessAllWaitTransition_parm_t;
      afs_status_t st = 0;
***************
*** 893,899 ****
  }
  
  int
! DoBosProcessAllStopAndRestart(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, INCLUDEBOS } DoBosProcessAllStopAndRestart_parm_t;
      afs_status_t st = 0;
--- 893,899 ----
  }
  
  int
! DoBosProcessAllStopAndRestart(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, INCLUDEBOS } DoBosProcessAllStopAndRestart_parm_t;
      afs_status_t st = 0;
***************
*** 921,927 ****
  }
  
  int
! DoBosAdminCreate(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, ADMIN } DoBosAdminCreate_parm_t;
      afs_status_t st = 0;
--- 921,927 ----
  }
  
  int
! DoBosAdminCreate(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, ADMIN } DoBosAdminCreate_parm_t;
      afs_status_t st = 0;
***************
*** 949,955 ****
  }
  
  int
! DoBosAdminDelete(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, ADMIN } DoBosAdminDelete_parm_t;
      afs_status_t st = 0;
--- 949,955 ----
  }
  
  int
! DoBosAdminDelete(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, ADMIN } DoBosAdminDelete_parm_t;
      afs_status_t st = 0;
***************
*** 977,983 ****
  }
  
  int
! DoBosAdminList(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER } DoBosAdminList_parm_t;
      afs_status_t st = 0;
--- 977,983 ----
  }
  
  int
! DoBosAdminList(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER } DoBosAdminList_parm_t;
      afs_status_t st = 0;
***************
*** 1016,1022 ****
  }
  
  int
! DoBosKeyCreate(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, VERSIONNUMBER, KEY } DoBosKeyCreate_parm_t;
      afs_status_t st = 0;
--- 1016,1022 ----
  }
  
  int
! DoBosKeyCreate(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, VERSIONNUMBER, KEY } DoBosKeyCreate_parm_t;
      afs_status_t st = 0;
***************
*** 1058,1064 ****
  }
  
  int
! DoBosKeyDelete(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, VERSIONNUMBER } DoBosKeyDelete_parm_t;
      afs_status_t st = 0;
--- 1058,1064 ----
  }
  
  int
! DoBosKeyDelete(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, VERSIONNUMBER } DoBosKeyDelete_parm_t;
      afs_status_t st = 0;
***************
*** 1106,1112 ****
  }
  
  int
! DoBosKeyList(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER } DoBosKeyList_parm_t;
      afs_status_t st = 0;
--- 1106,1112 ----
  }
  
  int
! DoBosKeyList(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER } DoBosKeyList_parm_t;
      afs_status_t st = 0;
***************
*** 1145,1151 ****
  }
  
  int
! DoBosCellSet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, CELL } DoBosCellSet_parm_t;
      afs_status_t st = 0;
--- 1145,1151 ----
  }
  
  int
! DoBosCellSet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, CELL } DoBosCellSet_parm_t;
      afs_status_t st = 0;
***************
*** 1173,1179 ****
  }
  
  int
! DoBosCellGet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER } DoBosCellGet_parm_t;
      afs_status_t st = 0;
--- 1173,1179 ----
  }
  
  int
! DoBosCellGet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER } DoBosCellGet_parm_t;
      afs_status_t st = 0;
***************
*** 1199,1205 ****
  }
  
  int
! DoBosHostCreate(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, HOST } DoBosHostCreate_parm_t;
      afs_status_t st = 0;
--- 1199,1205 ----
  }
  
  int
! DoBosHostCreate(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, HOST } DoBosHostCreate_parm_t;
      afs_status_t st = 0;
***************
*** 1227,1233 ****
  }
  
  int
! DoBosHostDelete(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, HOST } DoBosHostDelete_parm_t;
      afs_status_t st = 0;
--- 1227,1233 ----
  }
  
  int
! DoBosHostDelete(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, HOST } DoBosHostDelete_parm_t;
      afs_status_t st = 0;
***************
*** 1255,1261 ****
  }
  
  int
! DoBosHostList(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER } DoBosHostList_parm_t;
      afs_status_t st = 0;
--- 1255,1261 ----
  }
  
  int
! DoBosHostList(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER } DoBosHostList_parm_t;
      afs_status_t st = 0;
***************
*** 1294,1300 ****
  }
  
  int
! DoBosExecutableCreate(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, BINARY, DEST } DoBosExecutableCreate_parm_t;
      afs_status_t st = 0;
--- 1294,1300 ----
  }
  
  int
! DoBosExecutableCreate(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, BINARY, DEST } DoBosExecutableCreate_parm_t;
      afs_status_t st = 0;
***************
*** 1327,1333 ****
  }
  
  int
! DoBosExecutableRevert(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, EXECUTABLE } DoBosExecutableRevert_parm_t;
      afs_status_t st = 0;
--- 1327,1333 ----
  }
  
  int
! DoBosExecutableRevert(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, EXECUTABLE } DoBosExecutableRevert_parm_t;
      afs_status_t st = 0;
***************
*** 1355,1361 ****
  }
  
  int
! DoBosExecutableTimestampGet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, EXECUTABLE } DoBosExecutableTimestampGet_parm_t;
      afs_status_t st = 0;
--- 1355,1361 ----
  }
  
  int
! DoBosExecutableTimestampGet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, EXECUTABLE } DoBosExecutableTimestampGet_parm_t;
      afs_status_t st = 0;
***************
*** 1387,1393 ****
  }
  
  int
! DoBosExecutablePrune(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, OLDFILES, BAKFILES,
  	COREFILES
--- 1387,1393 ----
  }
  
  int
! DoBosExecutablePrune(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, OLDFILES, BAKFILES,
  	COREFILES
***************
*** 1428,1434 ****
  }
  
  int
! DoBosExecutableRestartTimeSet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, DAILY, WEEKLY,
  	TIME
--- 1428,1434 ----
  }
  
  int
! DoBosExecutableRestartTimeSet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, DAILY, WEEKLY,
  	TIME
***************
*** 1527,1533 ****
  }
  
  int
! DoBosExecutableRestartTimeGet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, DAILY,
  	WEEKLY
--- 1527,1533 ----
  }
  
  int
! DoBosExecutableRestartTimeGet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, DAILY,
  	WEEKLY
***************
*** 1578,1584 ****
  #define INITIAL_BUF_SIZE 4096
  
  int
! DoBosLogGet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, LOGFILE } DoBosLogGet_parm_t;
      afs_status_t st = 0;
--- 1578,1584 ----
  #define INITIAL_BUF_SIZE 4096
  
  int
! DoBosLogGet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, LOGFILE } DoBosLogGet_parm_t;
      afs_status_t st = 0;
***************
*** 1626,1632 ****
  }
  
  int
! DoBosAuthSet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, REQUIREAUTH, DISABLEAUTH } DoBosAuthSet_parm_t;
      afs_status_t st = 0;
--- 1626,1632 ----
  }
  
  int
! DoBosAuthSet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, REQUIREAUTH, DISABLEAUTH } DoBosAuthSet_parm_t;
      afs_status_t st = 0;
***************
*** 1670,1676 ****
  }
  
  int
! DoBosCommandExecute(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, COMMAND } DoBosCommandExecute_parm_t;
      afs_status_t st = 0;
--- 1670,1676 ----
  }
  
  int
! DoBosCommandExecute(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, COMMAND } DoBosCommandExecute_parm_t;
      afs_status_t st = 0;
***************
*** 1698,1704 ****
  }
  
  int
! DoBosSalvage(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME, NUMSALVAGERS, TMPDIR, LOGFILE,
  	FORCE, NOWRITE, INODES, ROOTINODES, SALVAGEDIRS, BLOCKREADS
--- 1698,1704 ----
  }
  
  int
! DoBosSalvage(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME, NUMSALVAGERS, TMPDIR, LOGFILE,
  	FORCE, NOWRITE, INODES, ROOTINODES, SALVAGEDIRS, BLOCKREADS
***************
*** 1802,1808 ****
  {
      struct cmd_syndesc *ts;
  
!     ts = cmd_CreateSyntax("BosProcessCreate", DoBosProcessCreate, 0,
  			  "create a new bos process");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where process will be created");
--- 1802,1808 ----
  {
      struct cmd_syndesc *ts;
  
!     ts = cmd_CreateSyntax("BosProcessCreate", DoBosProcessCreate, NULL,
  			  "create a new bos process");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where process will be created");
***************
*** 1818,1824 ****
  		"path to notifier binary that is run when process terminates");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosFSProcessCreate", DoBosFSProcessCreate, 0,
  			  "create a fs bos process");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where process will be created");
--- 1818,1824 ----
  		"path to notifier binary that is run when process terminates");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosFSProcessCreate", DoBosFSProcessCreate, NULL,
  			  "create a fs bos process");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where process will be created");
***************
*** 1834,1840 ****
  		"path to notifier binary that is run when process terminates");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosProcessDelete", DoBosProcessDelete, 0,
  			  "delete a bos process");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where process will be deleted");
--- 1834,1840 ----
  		"path to notifier binary that is run when process terminates");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosProcessDelete", DoBosProcessDelete, NULL,
  			  "delete a bos process");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where process will be deleted");
***************
*** 1843,1849 ****
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("BosProcessExecutionStateGet",
! 			  DoBosProcessExecutionStateGet, 0,
  			  "get the process execution state of a process");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where process exists");
--- 1843,1849 ----
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("BosProcessExecutionStateGet",
! 			  DoBosProcessExecutionStateGet, NULL,
  			  "get the process execution state of a process");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where process exists");
***************
*** 1852,1858 ****
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("BosProcessExecutionStateSet",
! 			  DoBosProcessExecutionStateSet, 0,
  			  "set the process execution state of a process");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where process exists");
--- 1852,1858 ----
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("BosProcessExecutionStateSet",
! 			  DoBosProcessExecutionStateSet, NULL,
  			  "set the process execution state of a process");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where process exists");
***************
*** 1865,1871 ****
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("BosProcessExecutionStateSetTemporary",
! 			  DoBosProcessExecutionStateSetTemporary, 0,
  			  "set the process execution state "
  			  "of a process temporarily");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
--- 1865,1871 ----
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("BosProcessExecutionStateSetTemporary",
! 			  DoBosProcessExecutionStateSetTemporary, NULL,
  			  "set the process execution state "
  			  "of a process temporarily");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
***************
*** 1878,1889 ****
  		"set the process state to running");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosProcessNameList", DoBosProcessNameList, 0,
  			  "list the names of all processes at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosProcessInfoGet", DoBosProcessInfoGet, 0,
  			  "get information about a process");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where process exists");
--- 1878,1889 ----
  		"set the process state to running");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosProcessNameList", DoBosProcessNameList, NULL,
  			  "list the names of all processes at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosProcessInfoGet", DoBosProcessInfoGet, NULL,
  			  "get information about a process");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where process exists");
***************
*** 1892,1898 ****
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("BosProcessParameterList",
! 			  DoBosProcessParameterList, 0,
  			  "list the parameters of a process");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where process exists");
--- 1892,1898 ----
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("BosProcessParameterList",
! 			  DoBosProcessParameterList, NULL,
  			  "list the parameters of a process");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where process exists");
***************
*** 1900,1906 ****
  		"the name of the process");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosProcessNotifierGet", DoBosProcessNotifierGet, 0,
  			  "get the notifier for a process");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where process exists");
--- 1900,1906 ----
  		"the name of the process");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosProcessNotifierGet", DoBosProcessNotifierGet, NULL,
  			  "get the notifier for a process");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where process exists");
***************
*** 1908,1914 ****
  		"the name of the process");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosProcessRestart", DoBosProcessRestart, 0,
  			  "restart a process");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where process exists");
--- 1908,1914 ----
  		"the name of the process");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosProcessRestart", DoBosProcessRestart, NULL,
  			  "restart a process");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where process exists");
***************
*** 1916,1928 ****
  		"the name of the process");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosProcessAllStop", DoBosProcessAllStop, 0,
  			  "stop all processes at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where processes exists");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosProcessAllWaitStop", DoBosProcessAllWaitStop, 0,
  			  "stop all processes at a bos server and block "
  			  "until they all exit");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
--- 1916,1928 ----
  		"the name of the process");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosProcessAllStop", DoBosProcessAllStop, NULL,
  			  "stop all processes at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where processes exists");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosProcessAllWaitStop", DoBosProcessAllWaitStop, NULL,
  			  "stop all processes at a bos server and block "
  			  "until they all exit");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
***************
*** 1930,1936 ****
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("BosProcessAllWaitTransition",
! 			  DoBosProcessAllWaitTransition, 0,
  			  "wait until all processes have transitioned to "
  			  "their desired state");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
--- 1930,1936 ----
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("BosProcessAllWaitTransition",
! 			  DoBosProcessAllWaitTransition, NULL,
  			  "wait until all processes have transitioned to "
  			  "their desired state");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
***************
*** 1938,1944 ****
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("BosProcessAllStopAndRestart",
! 			  DoBosProcessAllStopAndRestart, 0,
  			  "stop all processes at a bos server and "
  			  "then restart them");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
--- 1938,1944 ----
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("BosProcessAllStopAndRestart",
! 			  DoBosProcessAllStopAndRestart, NULL,
  			  "stop all processes at a bos server and "
  			  "then restart them");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
***************
*** 1947,1953 ****
  		"include the bos server in the processes to be restarted");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosAdminCreate", DoBosAdminCreate, 0,
  			  "create an admin user at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where admin will be created");
--- 1947,1953 ----
  		"include the bos server in the processes to be restarted");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosAdminCreate", DoBosAdminCreate, NULL,
  			  "create an admin user at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where admin will be created");
***************
*** 1955,1961 ****
  		"the name of the administrator to add");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosAdminDelete", DoBosAdminDelete, 0,
  			  "delete an admin user at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where admin will be deleted");
--- 1955,1961 ----
  		"the name of the administrator to add");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosAdminDelete", DoBosAdminDelete, NULL,
  			  "delete an admin user at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where admin will be deleted");
***************
*** 1963,1975 ****
  		"the name of the administrator to delete");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosAdminList", DoBosAdminList, 0,
  			  "list all admin users at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where admins will be listed");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosKeyCreate", DoBosKeyCreate, 0,
  			  "create a key at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where key will be created");
--- 1963,1975 ----
  		"the name of the administrator to delete");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosAdminList", DoBosAdminList, NULL,
  			  "list all admin users at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where admins will be listed");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosKeyCreate", DoBosKeyCreate, NULL,
  			  "create a key at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where key will be created");
***************
*** 1978,1984 ****
      cmd_AddParm(ts, "-key", CMD_SINGLE, CMD_REQUIRED, "new encryption key");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosKeyDelete", DoBosKeyDelete, 0,
  			  "delete a key at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where key will be deleted");
--- 1978,1984 ----
      cmd_AddParm(ts, "-key", CMD_SINGLE, CMD_REQUIRED, "new encryption key");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosKeyDelete", DoBosKeyDelete, NULL,
  			  "delete a key at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where key will be deleted");
***************
*** 1986,2026 ****
  		"version number of the key");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosKeyList", DoBosKeyList, 0,
  			  "list keys at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where keys exist");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosCellSet", DoBosCellSet, 0,
  			  "set the cell at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to modify");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_REQUIRED, "new cell");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosCellGet", DoBosCellGet, 0,
  			  "get the cell at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosHostCreate", DoBosHostCreate, 0,
  			  "add a host entry to the server CellServDB");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to modify");
      cmd_AddParm(ts, "-host", CMD_SINGLE, CMD_REQUIRED, "host to add");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosHostDelete", DoBosHostDelete, 0,
  			  "delete a host entry from the server CellServDB");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to modify");
      cmd_AddParm(ts, "-host", CMD_SINGLE, CMD_REQUIRED, "host to delete");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosHostList", DoBosHostList, 0,
  			  "list all host entries from the server CellServDB");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosExecutableCreate", DoBosExecutableCreate, 0,
  			  "create a new binary at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to modify");
      cmd_AddParm(ts, "-binary", CMD_SINGLE, CMD_REQUIRED,
--- 1986,2026 ----
  		"version number of the key");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosKeyList", DoBosKeyList, NULL,
  			  "list keys at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where keys exist");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosCellSet", DoBosCellSet, NULL,
  			  "set the cell at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to modify");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_REQUIRED, "new cell");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosCellGet", DoBosCellGet, NULL,
  			  "get the cell at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosHostCreate", DoBosHostCreate, NULL,
  			  "add a host entry to the server CellServDB");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to modify");
      cmd_AddParm(ts, "-host", CMD_SINGLE, CMD_REQUIRED, "host to add");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosHostDelete", DoBosHostDelete, NULL,
  			  "delete a host entry from the server CellServDB");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to modify");
      cmd_AddParm(ts, "-host", CMD_SINGLE, CMD_REQUIRED, "host to delete");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosHostList", DoBosHostList, NULL,
  			  "list all host entries from the server CellServDB");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosExecutableCreate", DoBosExecutableCreate, NULL,
  			  "create a new binary at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to modify");
      cmd_AddParm(ts, "-binary", CMD_SINGLE, CMD_REQUIRED,
***************
*** 2029,2035 ****
  		"path where the binary will be stored");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosExecutableRevert", DoBosExecutableRevert, 0,
  			  "revert a binary at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to modify");
      cmd_AddParm(ts, "-executable", CMD_SINGLE, CMD_REQUIRED,
--- 2029,2035 ----
  		"path where the binary will be stored");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosExecutableRevert", DoBosExecutableRevert, NULL,
  			  "revert a binary at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to modify");
      cmd_AddParm(ts, "-executable", CMD_SINGLE, CMD_REQUIRED,
***************
*** 2037,2050 ****
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("BosExecutableTimestampGet",
! 			  DoBosExecutableTimestampGet, 0,
  			  "get the timestamps for a binary at bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      cmd_AddParm(ts, "-executable", CMD_SINGLE, CMD_REQUIRED,
  		"path to the binary to revert");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosExecutablePrune", DoBosExecutablePrune, 0,
  			  "prune various files at bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to modify");
      cmd_AddParm(ts, "-oldfiles", CMD_FLAG, CMD_OPTIONAL, "prune .old files");
--- 2037,2050 ----
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("BosExecutableTimestampGet",
! 			  DoBosExecutableTimestampGet, NULL,
  			  "get the timestamps for a binary at bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      cmd_AddParm(ts, "-executable", CMD_SINGLE, CMD_REQUIRED,
  		"path to the binary to revert");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosExecutablePrune", DoBosExecutablePrune, NULL,
  			  "prune various files at bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to modify");
      cmd_AddParm(ts, "-oldfiles", CMD_FLAG, CMD_OPTIONAL, "prune .old files");
***************
*** 2053,2059 ****
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("BosExecutableRestartTimeSet",
! 			  DoBosExecutableRestartTimeSet, 0,
  			  "set the restart times at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to modify");
      cmd_AddParm(ts, "-daily", CMD_FLAG, CMD_OPTIONAL,
--- 2053,2059 ----
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("BosExecutableRestartTimeSet",
! 			  DoBosExecutableRestartTimeSet, NULL,
  			  "set the restart times at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to modify");
      cmd_AddParm(ts, "-daily", CMD_FLAG, CMD_OPTIONAL,
***************
*** 2065,2071 ****
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("BosExecutableRestartTimeGet",
! 			  DoBosExecutableRestartTimeGet, 0,
  			  "get the restart times at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      cmd_AddParm(ts, "-daily", CMD_FLAG, CMD_OPTIONAL,
--- 2065,2071 ----
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("BosExecutableRestartTimeGet",
! 			  DoBosExecutableRestartTimeGet, NULL,
  			  "get the restart times at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      cmd_AddParm(ts, "-daily", CMD_FLAG, CMD_OPTIONAL,
***************
*** 2074,2087 ****
  		"get weekly restart time");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosLogGet", DoBosLogGet, 0,
  			  "get a log file from the bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      cmd_AddParm(ts, "-logfile", CMD_SINGLE, CMD_REQUIRED,
  		"path to the log file to retrieve");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosAuthSet", DoBosAuthSet, 0,
  			  "set the authorization level at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to modify");
      cmd_AddParm(ts, "-requireauth", CMD_FLAG, CMD_OPTIONAL,
--- 2074,2087 ----
  		"get weekly restart time");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosLogGet", DoBosLogGet, NULL,
  			  "get a log file from the bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      cmd_AddParm(ts, "-logfile", CMD_SINGLE, CMD_REQUIRED,
  		"path to the log file to retrieve");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosAuthSet", DoBosAuthSet, NULL,
  			  "set the authorization level at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to modify");
      cmd_AddParm(ts, "-requireauth", CMD_FLAG, CMD_OPTIONAL,
***************
*** 2098,2104 ****
  		"command to execute");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosSalvage", DoBosSalvage, 0,
  			  "execute a salvage command at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where salvager will execute");
--- 2098,2104 ----
  		"command to execute");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("BosSalvage", DoBosSalvage, NULL,
  			  "execute a salvage command at a bos server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where salvager will execute");
Index: openafs/src/libadmin/test/client.c
diff -c openafs/src/libadmin/test/client.c:1.8 openafs/src/libadmin/test/client.c:1.8.14.1
*** openafs/src/libadmin/test/client.c:1.8	Fri Dec 12 18:37:37 2003
--- openafs/src/libadmin/test/client.c	Wed Oct 31 00:09:31 2007
***************
*** 15,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/test/client.c,v 1.8 2003/12/12 23:37:37 shadow Exp $");
  
  #include "client.h"
  #include <afs/cellconfig.h>
--- 15,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/test/client.c,v 1.8.14.1 2007/10/31 04:09:31 shadow Exp $");
  
  #include "client.h"
  #include <afs/cellconfig.h>
***************
*** 262,268 ****
   */
  
  int
! DoClientLocalCellGet(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      char cellName[MAXCELLCHARS];
--- 262,268 ----
   */
  
  int
! DoClientLocalCellGet(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      char cellName[MAXCELLCHARS];
***************
*** 277,283 ****
  }
  
  int
! DoClientMountPointCreate(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { DIRECTORY, VOLUME, READWRITE,
  	CHECK
--- 277,283 ----
  }
  
  int
! DoClientMountPointCreate(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { DIRECTORY, VOLUME, READWRITE,
  	CHECK
***************
*** 331,337 ****
  }
  
  int
! DoClientAFSServerGet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER } DoClientAFSServerGet_parm_t;
      afs_status_t st = 0;
--- 331,337 ----
  }
  
  int
! DoClientAFSServerGet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER } DoClientAFSServerGet_parm_t;
      afs_status_t st = 0;
***************
*** 352,358 ****
  }
  
  int
! DoClientAFSServerList(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      afs_serverEntry_t entry;
--- 352,358 ----
  }
  
  int
! DoClientAFSServerList(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      afs_serverEntry_t entry;
***************
*** 476,482 ****
  }
  
  int
! DoClientRPCStatsStateGet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PROCESS,
  	STAT_TYPE
--- 476,482 ----
  }
  
  int
! DoClientRPCStatsStateGet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PROCESS,
  	STAT_TYPE
***************
*** 536,542 ****
  }
  
  int
! DoClientRPCStatsStateEnable(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PROCESS, STAT_TYPE } DoClientRPCStatsEnable_parm_t;
      afs_status_t st = 0;
--- 536,542 ----
  }
  
  int
! DoClientRPCStatsStateEnable(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PROCESS, STAT_TYPE } DoClientRPCStatsEnable_parm_t;
      afs_status_t st = 0;
***************
*** 590,596 ****
  }
  
  int
! DoClientRPCStatsStateDisable(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PROCESS,
  	STAT_TYPE
--- 590,596 ----
  }
  
  int
! DoClientRPCStatsStateDisable(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PROCESS,
  	STAT_TYPE
***************
*** 694,700 ****
  }
  
  int
! DoClientRPCStatsList(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PROCESS, STAT_TYPE } DoClientRPCStatsList_parm_t;
      afs_status_t st = 0;
--- 694,700 ----
  }
  
  int
! DoClientRPCStatsList(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PROCESS, STAT_TYPE } DoClientRPCStatsList_parm_t;
      afs_status_t st = 0;
***************
*** 819,825 ****
  }
  
  int
! DoClientRPCStatsClear(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PROCESS, STAT_TYPE, CLEAR_ALL, CLEAR_INVOCATIONS,
  	CLEAR_BYTES_SENT, CLEAR_BYTES_RCVD,
--- 819,825 ----
  }
  
  int
! DoClientRPCStatsClear(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PROCESS, STAT_TYPE, CLEAR_ALL, CLEAR_INVOCATIONS,
  	CLEAR_BYTES_SENT, CLEAR_BYTES_RCVD,
***************
*** 991,997 ****
  }
  
  int
! DoClientRPCStatsVersionGet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PROCESS } DoClientRPCStatsVersionGet_parm_t;
      afs_status_t st = 0;
--- 991,997 ----
  }
  
  int
! DoClientRPCStatsVersionGet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PROCESS } DoClientRPCStatsVersionGet_parm_t;
      afs_status_t st = 0;
***************
*** 1047,1053 ****
  }
  
  int
! DoClientCMGetServerPrefs(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      typedef enum { SERVER, PORT } DoClientCMGetServerPrefs_parm_t;
--- 1047,1053 ----
  }
  
  int
! DoClientCMGetServerPrefs(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      typedef enum { SERVER, PORT } DoClientCMGetServerPrefs_parm_t;
***************
*** 1117,1123 ****
  }
  
  int
! DoClientCMListCells(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      typedef enum { SERVER, PORT } DoClientCMListCells_parm_t;
--- 1117,1123 ----
  }
  
  int
! DoClientCMListCells(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      typedef enum { SERVER, PORT } DoClientCMListCells_parm_t;
***************
*** 1172,1178 ****
  }
  
  int
! DoClientCMLocalCell(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      typedef enum { SERVER, PORT } DoClientCMLocalCell_parm_t;
--- 1172,1178 ----
  }
  
  int
! DoClientCMLocalCell(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      typedef enum { SERVER, PORT } DoClientCMLocalCell_parm_t;
***************
*** 1231,1237 ****
  }
  
  int
! DoClientCMClientConfig(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      typedef enum { SERVER, PORT } DoClientCMLocalCell_parm_t;
--- 1231,1237 ----
  }
  
  int
! DoClientCMClientConfig(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      typedef enum { SERVER, PORT } DoClientCMLocalCell_parm_t;
***************
*** 1280,1291 ****
  {
      struct cmd_syndesc *ts;
  
!     ts = cmd_CreateSyntax("ClientLocalCellGet", DoClientLocalCellGet, 0,
  			  "get the name of this machine's cell");
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("ClientMountPointCreate", DoClientMountPointCreate,
! 			  0, "create a mount point");
      cmd_AddParm(ts, "-directory", CMD_SINGLE, CMD_REQUIRED,
  		"directory where mount point will be created");
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED,
--- 1280,1291 ----
  {
      struct cmd_syndesc *ts;
  
!     ts = cmd_CreateSyntax("ClientLocalCellGet", DoClientLocalCellGet, NULL,
  			  "get the name of this machine's cell");
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("ClientMountPointCreate", DoClientMountPointCreate,
! 			  NULL, "create a mount point");
      cmd_AddParm(ts, "-directory", CMD_SINGLE, CMD_REQUIRED,
  		"directory where mount point will be created");
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED,
***************
*** 1296,1307 ****
  		"check that the volume exists before mounting");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("ClientAFSServerGet", DoClientAFSServerGet, 0,
  			  "retrieve information about an afs server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("ClientAFSServerList", DoClientAFSServerList, 0,
  			  "retrieve information about all afs "
  			  "servers in a cell");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
--- 1296,1307 ----
  		"check that the volume exists before mounting");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("ClientAFSServerGet", DoClientAFSServerGet, NULL,
  			  "retrieve information about an afs server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("ClientAFSServerList", DoClientAFSServerList, NULL,
  			  "retrieve information about all afs "
  			  "servers in a cell");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
***************
*** 1314,1320 ****
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("ClientRPCStatsStateGet", DoClientRPCStatsStateGet,
! 			  0, "retrieve the rpc stat collection state");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
      cmd_AddParm(ts, "-process", CMD_SINGLE, CMD_REQUIRED,
--- 1314,1320 ----
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("ClientRPCStatsStateGet", DoClientRPCStatsStateGet,
! 			  NULL, "retrieve the rpc stat collection state");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
      cmd_AddParm(ts, "-process", CMD_SINGLE, CMD_REQUIRED,
***************
*** 1325,1331 ****
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("ClientRPCStatsStateEnable",
! 			  DoClientRPCStatsStateEnable, 0,
  			  "set the rpc stat collection state to on");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
--- 1325,1331 ----
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("ClientRPCStatsStateEnable",
! 			  DoClientRPCStatsStateEnable, NULL,
  			  "set the rpc stat collection state to on");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
***************
*** 1337,1343 ****
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("ClientRPCStatsStateDisable",
! 			  DoClientRPCStatsStateDisable, 0,
  			  "set the rpc stat collection state to off");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
--- 1337,1343 ----
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("ClientRPCStatsStateDisable",
! 			  DoClientRPCStatsStateDisable, NULL,
  			  "set the rpc stat collection state to off");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
***************
*** 1348,1354 ****
  		"stats to retrieve <peer or process>");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("ClientRPCStatsList", DoClientRPCStatsList, 0,
  			  "list the rpc stats");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
--- 1348,1354 ----
  		"stats to retrieve <peer or process>");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("ClientRPCStatsList", DoClientRPCStatsList, NULL,
  			  "list the rpc stats");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
***************
*** 1359,1365 ****
  		"stats to retrieve <peer or process>");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("ClientRPCStatsClear", DoClientRPCStatsClear, 0,
  			  "reset rpc stat counters");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
--- 1359,1365 ----
  		"stats to retrieve <peer or process>");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("ClientRPCStatsClear", DoClientRPCStatsClear, NULL,
  			  "reset rpc stat counters");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
***************
*** 1395,1401 ****
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("ClientRPCStatsVersionGet",
! 			  DoClientRPCStatsVersionGet, 0,
  			  "list the server's rpc stats version");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
--- 1395,1401 ----
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("ClientRPCStatsVersionGet",
! 			  DoClientRPCStatsVersionGet, NULL,
  			  "list the server's rpc stats version");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
***************
*** 1405,1431 ****
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("ClientCMGetServerPrefs", DoClientCMGetServerPrefs,
! 			  0, "list a client's server preferences ");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
      cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "UDP port to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("ClientCMListCells", DoClientCMListCells, 0,
  			  "list a client's CellServDB ");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
      cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "UDP port to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("ClientCMLocalCell", DoClientCMLocalCell, 0,
  			  "get the name of the client's local cell");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
      cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "UDP port to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("ClientCMClientConfig", DoClientCMClientConfig, 0,
  			  "get the client's cache configuration");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
--- 1405,1431 ----
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("ClientCMGetServerPrefs", DoClientCMGetServerPrefs,
! 			  NULL, "list a client's server preferences ");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
      cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "UDP port to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("ClientCMListCells", DoClientCMListCells, NULL,
  			  "list a client's CellServDB ");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
      cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "UDP port to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("ClientCMLocalCell", DoClientCMLocalCell, NULL,
  			  "get the name of the client's local cell");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
      cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "UDP port to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("ClientCMClientConfig", DoClientCMClientConfig, NULL,
  			  "get the client's cache configuration");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where command will execute");
Index: openafs/src/libadmin/test/kas.c
diff -c openafs/src/libadmin/test/kas.c:1.8 openafs/src/libadmin/test/kas.c:1.8.14.1
*** openafs/src/libadmin/test/kas.c:1.8	Sat Nov 29 17:08:13 2003
--- openafs/src/libadmin/test/kas.c	Wed Oct 31 00:09:31 2007
***************
*** 15,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/test/kas.c,v 1.8 2003/11/29 22:08:13 jaltman Exp $");
  
  #include "kas.h"
  #include <time.h>
--- 15,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/test/kas.c,v 1.8.14.1 2007/10/31 04:09:31 shadow Exp $");
  
  #include "kas.h"
  #include <time.h>
***************
*** 45,51 ****
  }
  
  int
! DoKasPrincipalCreate(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { PRINCIPAL, INSTANCE,
  	PASSWORD
--- 45,51 ----
  }
  
  int
! DoKasPrincipalCreate(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { PRINCIPAL, INSTANCE,
  	PASSWORD
***************
*** 73,79 ****
  }
  
  int
! DoKasPrincipalDelete(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { PRINCIPAL, INSTANCE } DoKasPrincipalGet_parm_t;
      afs_status_t st = 0;
--- 73,79 ----
  }
  
  int
! DoKasPrincipalDelete(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { PRINCIPAL, INSTANCE } DoKasPrincipalGet_parm_t;
      afs_status_t st = 0;
***************
*** 160,166 ****
  }
  
  int
! DoKasPrincipalGet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { PRINCIPAL, INSTANCE } DoKasPrincipalGet_parm_t;
      afs_status_t st = 0;
--- 160,166 ----
  }
  
  int
! DoKasPrincipalGet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { PRINCIPAL, INSTANCE } DoKasPrincipalGet_parm_t;
      afs_status_t st = 0;
***************
*** 186,192 ****
  }
  
  int
! DoKasPrincipalList(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      void *iter;
--- 186,192 ----
  }
  
  int
! DoKasPrincipalList(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      void *iter;
***************
*** 218,224 ****
  }
  
  int
! DoKasPrincipalKeySet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { PRINCIPAL, INSTANCE, PASSWORD,
  	KEYVERSION
--- 218,224 ----
  }
  
  int
! DoKasPrincipalKeySet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { PRINCIPAL, INSTANCE, PASSWORD,
  	KEYVERSION
***************
*** 258,264 ****
  }
  
  int
! DoKasPrincipalLockStatusGet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { PRINCIPAL, INSTANCE } DoKasPrincipalLockStatusGet_parm_t;
      afs_status_t st = 0;
--- 258,264 ----
  }
  
  int
! DoKasPrincipalLockStatusGet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { PRINCIPAL, INSTANCE } DoKasPrincipalLockStatusGet_parm_t;
      afs_status_t st = 0;
***************
*** 284,290 ****
  }
  
  int
! DoKasPrincipalUnlock(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { PRINCIPAL, INSTANCE } DoKasPrincipalUnlock_parm_t;
      afs_status_t st = 0;
--- 284,290 ----
  }
  
  int
! DoKasPrincipalUnlock(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { PRINCIPAL, INSTANCE } DoKasPrincipalUnlock_parm_t;
      afs_status_t st = 0;
***************
*** 307,313 ****
  }
  
  int
! DoKasPrincipalFieldsSet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { PRINCIPAL, INSTANCE, ADMIN, NOADMIN, GRANTTICKET,
  	NOGRANTTICKET, ENCRYPT2, NOENCRYPT, CHANGEPASSWORD,
--- 307,313 ----
  }
  
  int
! DoKasPrincipalFieldsSet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { PRINCIPAL, INSTANCE, ADMIN, NOADMIN, GRANTTICKET,
  	NOGRANTTICKET, ENCRYPT2, NOENCRYPT, CHANGEPASSWORD,
***************
*** 549,555 ****
  }
  
  int
! DoKasServerStatsGet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER } DoKasServerStatsGet_parm_t;
      afs_status_t st = 0;
--- 549,555 ----
  }
  
  int
! DoKasServerStatsGet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER } DoKasServerStatsGet_parm_t;
      afs_status_t st = 0;
***************
*** 634,640 ****
  }
  
  int
! DoKasServerDebugGet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER } DoKasServerDebugGet_parm_t;
      afs_status_t st = 0;
--- 634,640 ----
  }
  
  int
! DoKasServerDebugGet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER } DoKasServerDebugGet_parm_t;
      afs_status_t st = 0;
***************
*** 662,668 ****
  }
  
  int
! DoKasServerRandomKeyGet(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      kas_encryptionKey_t key;
--- 662,668 ----
  }
  
  int
! DoKasServerRandomKeyGet(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      kas_encryptionKey_t key;
***************
*** 686,692 ****
  {
      struct cmd_syndesc *ts;
  
!     ts = cmd_CreateSyntax("KasPrincipalCreate", DoKasPrincipalCreate, 0,
  			  "create a new principal");
      cmd_AddParm(ts, "-principal", CMD_SINGLE, CMD_REQUIRED,
  		"principal to create");
--- 686,692 ----
  {
      struct cmd_syndesc *ts;
  
!     ts = cmd_CreateSyntax("KasPrincipalCreate", DoKasPrincipalCreate, NULL,
  			  "create a new principal");
      cmd_AddParm(ts, "-principal", CMD_SINGLE, CMD_REQUIRED,
  		"principal to create");
***************
*** 696,702 ****
  		"initial principal password");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("KasPrincipalDelete", DoKasPrincipalDelete, 0,
  			  "delete a principal");
      cmd_AddParm(ts, "-principal", CMD_SINGLE, CMD_REQUIRED,
  		"principal to delete");
--- 696,702 ----
  		"initial principal password");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("KasPrincipalDelete", DoKasPrincipalDelete, NULL,
  			  "delete a principal");
      cmd_AddParm(ts, "-principal", CMD_SINGLE, CMD_REQUIRED,
  		"principal to delete");
***************
*** 704,710 ****
  		"principal instance");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("KasPrincipalGet", DoKasPrincipalGet, 0,
  			  "get information about a principal");
      cmd_AddParm(ts, "-principal", CMD_SINGLE, CMD_REQUIRED,
  		"principal to get");
--- 704,710 ----
  		"principal instance");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("KasPrincipalGet", DoKasPrincipalGet, NULL,
  			  "get information about a principal");
      cmd_AddParm(ts, "-principal", CMD_SINGLE, CMD_REQUIRED,
  		"principal to get");
***************
*** 712,722 ****
  		"principal instance");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("KasPrincipalList", DoKasPrincipalList, 0,
  			  "list all principals");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("KasPrincipalKeySet", DoKasPrincipalKeySet, 0,
  			  "set the password for a principal");
      cmd_AddParm(ts, "-principal", CMD_SINGLE, CMD_REQUIRED,
  		"principal to modify");
--- 712,722 ----
  		"principal instance");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("KasPrincipalList", DoKasPrincipalList, NULL,
  			  "list all principals");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("KasPrincipalKeySet", DoKasPrincipalKeySet, NULL,
  			  "set the password for a principal");
      cmd_AddParm(ts, "-principal", CMD_SINGLE, CMD_REQUIRED,
  		"principal to modify");
***************
*** 729,735 ****
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("KasPrincipalLockStatusGet",
! 			  DoKasPrincipalLockStatusGet, 0,
  			  "get the lock status of a principal");
      cmd_AddParm(ts, "-principal", CMD_SINGLE, CMD_REQUIRED,
  		"principal to query");
--- 729,735 ----
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("KasPrincipalLockStatusGet",
! 			  DoKasPrincipalLockStatusGet, NULL,
  			  "get the lock status of a principal");
      cmd_AddParm(ts, "-principal", CMD_SINGLE, CMD_REQUIRED,
  		"principal to query");
***************
*** 737,743 ****
  		"principal instance");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("KasPrincipalUnlock", DoKasPrincipalUnlock, 0,
  			  "unlock a principal");
      cmd_AddParm(ts, "-principal", CMD_SINGLE, CMD_REQUIRED,
  		"principal to unlock");
--- 737,743 ----
  		"principal instance");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("KasPrincipalUnlock", DoKasPrincipalUnlock, NULL,
  			  "unlock a principal");
      cmd_AddParm(ts, "-principal", CMD_SINGLE, CMD_REQUIRED,
  		"principal to unlock");
***************
*** 745,751 ****
  		"principal instance");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("KasPrincipalFieldsSet", DoKasPrincipalFieldsSet, 0,
  			  "modify a principal");
      cmd_AddParm(ts, "-principal", CMD_SINGLE, CMD_REQUIRED,
  		"principal to modify");
--- 745,751 ----
  		"principal instance");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("KasPrincipalFieldsSet", DoKasPrincipalFieldsSet, NULL,
  			  "modify a principal");
      cmd_AddParm(ts, "-principal", CMD_SINGLE, CMD_REQUIRED,
  		"principal to modify");
***************
*** 785,801 ****
  		"maximum failed password attempts is exceeded");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("KasServerStatsGet", DoKasServerStatsGet, 0,
  			  "get stats on a kaserver");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("KasServerDebugGet", DoKasServerDebugGet, 0,
  			  "get debug info from a kaserver");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("KasServerRandomKeyGet", DoKasServerRandomKeyGet, 0,
  			  "create a random key");
      SetupCommonCmdArgs(ts);
  
--- 785,801 ----
  		"maximum failed password attempts is exceeded");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("KasServerStatsGet", DoKasServerStatsGet, NULL,
  			  "get stats on a kaserver");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("KasServerDebugGet", DoKasServerDebugGet, NULL,
  			  "get debug info from a kaserver");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("KasServerRandomKeyGet", DoKasServerRandomKeyGet, NULL,
  			  "create a random key");
      SetupCommonCmdArgs(ts);
  
Index: openafs/src/libadmin/test/pts.c
diff -c openafs/src/libadmin/test/pts.c:1.5 openafs/src/libadmin/test/pts.c:1.5.14.1
*** openafs/src/libadmin/test/pts.c:1.5	Tue Jul 15 19:15:34 2003
--- openafs/src/libadmin/test/pts.c	Wed Oct 31 00:09:31 2007
***************
*** 15,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/test/pts.c,v 1.5 2003/07/15 23:15:34 shadow Exp $");
  
  #include "pts.h"
  
--- 15,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/test/pts.c,v 1.5.14.1 2007/10/31 04:09:31 shadow Exp $");
  
  #include "pts.h"
  
***************
*** 90,96 ****
  }
  
  int
! DoPtsGroupMemberAdd(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { USER, GROUP } DoPtsGroupMemberAdd_parm_t;
      afs_status_t st = 0;
--- 90,96 ----
  }
  
  int
! DoPtsGroupMemberAdd(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { USER, GROUP } DoPtsGroupMemberAdd_parm_t;
      afs_status_t st = 0;
***************
*** 105,111 ****
  }
  
  int
! DoPtsGroupOwnerChange(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { OWNER, GROUP } DoPtsGroupOwnerChange_parm_t;
      afs_status_t st = 0;
--- 105,111 ----
  }
  
  int
! DoPtsGroupOwnerChange(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { OWNER, GROUP } DoPtsGroupOwnerChange_parm_t;
      afs_status_t st = 0;
***************
*** 120,126 ****
  }
  
  int
! DoPtsGroupCreate(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { OWNER, GROUP } DoPtsGroupCreate_parm_t;
      afs_status_t st = 0;
--- 120,126 ----
  }
  
  int
! DoPtsGroupCreate(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { OWNER, GROUP } DoPtsGroupCreate_parm_t;
      afs_status_t st = 0;
***************
*** 170,176 ****
  }
  
  int
! DoPtsGroupGet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { GROUP } DoPtsGroupGet_parm_t;
      afs_status_t st = 0;
--- 170,176 ----
  }
  
  int
! DoPtsGroupGet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { GROUP } DoPtsGroupGet_parm_t;
      afs_status_t st = 0;
***************
*** 187,193 ****
  }
  
  int
! DoPtsGroupDelete(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { GROUP } DoPtsGroupDelete_parm_t;
      afs_status_t st = 0;
--- 187,193 ----
  }
  
  int
! DoPtsGroupDelete(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { GROUP } DoPtsGroupDelete_parm_t;
      afs_status_t st = 0;
***************
*** 201,207 ****
  }
  
  int
! DoPtsGroupMaxGet(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      int max_group_id;
--- 201,207 ----
  }
  
  int
! DoPtsGroupMaxGet(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      int max_group_id;
***************
*** 214,220 ****
  }
  
  int
! DoPtsGroupMaxSet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { MAX } DoPtsGroupMaxSet_parm_t;
      afs_status_t st = 0;
--- 214,220 ----
  }
  
  int
! DoPtsGroupMaxSet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { MAX } DoPtsGroupMaxSet_parm_t;
      afs_status_t st = 0;
***************
*** 231,237 ****
  }
  
  int
! DoPtsGroupMemberList(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { GROUP } DoPtsGroupMemberList_parm_t;
      afs_status_t st = 0;
--- 231,237 ----
  }
  
  int
! DoPtsGroupMemberList(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { GROUP } DoPtsGroupMemberList_parm_t;
      afs_status_t st = 0;
***************
*** 260,266 ****
  }
  
  int
! DoPtsGroupMemberRemove(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { USER, GROUP } DoPtsGroupMemberRemove_parm_t;
      afs_status_t st = 0;
--- 260,266 ----
  }
  
  int
! DoPtsGroupMemberRemove(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { USER, GROUP } DoPtsGroupMemberRemove_parm_t;
      afs_status_t st = 0;
***************
*** 275,281 ****
  }
  
  int
! DoPtsGroupRename(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { GROUP, NEWNAME } DoPtsGroupRename_parm_t;
      afs_status_t st = 0;
--- 275,281 ----
  }
  
  int
! DoPtsGroupRename(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { GROUP, NEWNAME } DoPtsGroupRename_parm_t;
      afs_status_t st = 0;
***************
*** 290,296 ****
  }
  
  int
! DoPtsGroupModify(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { GROUP, LISTSTATUS, LISTGROUPSOWNED, LISTMEMBERSHIP,
  	LISTADD, LISTDELTE
--- 290,296 ----
  }
  
  int
! DoPtsGroupModify(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { GROUP, LISTSTATUS, LISTGROUPSOWNED, LISTMEMBERSHIP,
  	LISTADD, LISTDELTE
***************
*** 323,329 ****
  }
  
  int
! DoPtsUserCreate(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { USER } DoPtsUserCreate_parm_t;
      afs_status_t st = 0;
--- 323,329 ----
  }
  
  int
! DoPtsUserCreate(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { USER } DoPtsUserCreate_parm_t;
      afs_status_t st = 0;
***************
*** 340,346 ****
  }
  
  int
! DoPtsUserDelete(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { USER } DoPtsUserDelete_parm_t;
      afs_status_t st = 0;
--- 340,346 ----
  }
  
  int
! DoPtsUserDelete(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { USER } DoPtsUserDelete_parm_t;
      afs_status_t st = 0;
***************
*** 383,389 ****
  }
  
  int
! DoPtsUserGet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { USER } DoPtsUserGet_parm_t;
      afs_status_t st = 0;
--- 383,389 ----
  }
  
  int
! DoPtsUserGet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { USER } DoPtsUserGet_parm_t;
      afs_status_t st = 0;
***************
*** 400,406 ****
  }
  
  int
! DoPtsUserRename(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { USER, NEWNAME } DoPtsUserRename_parm_t;
      afs_status_t st = 0;
--- 400,406 ----
  }
  
  int
! DoPtsUserRename(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { USER, NEWNAME } DoPtsUserRename_parm_t;
      afs_status_t st = 0;
***************
*** 415,421 ****
  }
  
  int
! DoPtsUserModify(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { USER, GROUPQUOTA, LISTSTATUS, LISTGROUPSOWNED,
  	LISTMEMBERSHIP
--- 415,421 ----
  }
  
  int
! DoPtsUserModify(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { USER, GROUPQUOTA, LISTSTATUS, LISTGROUPSOWNED,
  	LISTMEMBERSHIP
***************
*** 481,487 ****
  }
  
  int
! DoPtsUserMaxGet(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      int max_user_id;
--- 481,487 ----
  }
  
  int
! DoPtsUserMaxGet(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      int max_user_id;
***************
*** 494,500 ****
  }
  
  int
! DoPtsUserMaxSet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { MAX } DoPtsUserMaxSet_parm_t;
      afs_status_t st = 0;
--- 494,500 ----
  }
  
  int
! DoPtsUserMaxSet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { MAX } DoPtsUserMaxSet_parm_t;
      afs_status_t st = 0;
***************
*** 511,517 ****
  }
  
  int
! DoPtsUserMemberList(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { USER } DoPtsUserMemberList_parm_t;
      afs_status_t st = 0;
--- 511,517 ----
  }
  
  int
! DoPtsUserMemberList(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { USER } DoPtsUserMemberList_parm_t;
      afs_status_t st = 0;
***************
*** 541,547 ****
  }
  
  int
! DoPtsOwnedGroupList(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { USER } DoPtsOwnedGroupList_parm_t;
      afs_status_t st = 0;
--- 541,547 ----
  }
  
  int
! DoPtsOwnedGroupList(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { USER } DoPtsOwnedGroupList_parm_t;
      afs_status_t st = 0;
***************
*** 575,635 ****
  {
      struct cmd_syndesc *ts;
  
!     ts = cmd_CreateSyntax("PtsGroupMemberAdd", DoPtsGroupMemberAdd, 0,
  			  "add a user to a group");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_REQUIRED, "user to add");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_REQUIRED, "group to modify");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupOwnerChange", DoPtsGroupOwnerChange, 0,
  			  "change the owner of a group");
      cmd_AddParm(ts, "-owner", CMD_SINGLE, CMD_REQUIRED, "new owner");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_REQUIRED, "group to modify");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupCreate", DoPtsGroupCreate, 0,
  			  "create a new group");
      cmd_AddParm(ts, "-owner", CMD_SINGLE, CMD_REQUIRED, "owner of group");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_REQUIRED, "group to create");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupGet", DoPtsGroupGet, 0,
  			  "get information about a group");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_REQUIRED, "group to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupDelete", DoPtsGroupDelete, 0,
  			  "delete a group");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_REQUIRED, "group to delete");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupMaxGet", DoPtsGroupMaxGet, 0,
  			  "get the maximum group id");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupMaxSet", DoPtsGroupMaxSet, 0,
  			  "set the maximum group id");
      cmd_AddParm(ts, "-max", CMD_SINGLE, CMD_REQUIRED, "new max group id");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupMemberList", DoPtsGroupMemberList, 0,
  			  "list members of a group");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_REQUIRED, "group to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupMemberRemove", DoPtsGroupMemberRemove, 0,
  			  "remove a member from a group");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_REQUIRED, "user to remove");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_REQUIRED, "group to modify");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupRename", DoPtsGroupRename, 0,
  			  "rename a group");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_REQUIRED, "group to modify");
      cmd_AddParm(ts, "-newname", CMD_SINGLE, CMD_REQUIRED, "new group name");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupModify", DoPtsGroupModify, 0,
  			  "modify a group");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_REQUIRED, "group to modify");
      cmd_AddParm(ts, "-liststatus", CMD_SINGLE, CMD_REQUIRED,
--- 575,635 ----
  {
      struct cmd_syndesc *ts;
  
!     ts = cmd_CreateSyntax("PtsGroupMemberAdd", DoPtsGroupMemberAdd, NULL,
  			  "add a user to a group");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_REQUIRED, "user to add");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_REQUIRED, "group to modify");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupOwnerChange", DoPtsGroupOwnerChange, NULL,
  			  "change the owner of a group");
      cmd_AddParm(ts, "-owner", CMD_SINGLE, CMD_REQUIRED, "new owner");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_REQUIRED, "group to modify");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupCreate", DoPtsGroupCreate, NULL,
  			  "create a new group");
      cmd_AddParm(ts, "-owner", CMD_SINGLE, CMD_REQUIRED, "owner of group");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_REQUIRED, "group to create");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupGet", DoPtsGroupGet, NULL,
  			  "get information about a group");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_REQUIRED, "group to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupDelete", DoPtsGroupDelete, NULL,
  			  "delete a group");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_REQUIRED, "group to delete");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupMaxGet", DoPtsGroupMaxGet, NULL,
  			  "get the maximum group id");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupMaxSet", DoPtsGroupMaxSet, NULL,
  			  "set the maximum group id");
      cmd_AddParm(ts, "-max", CMD_SINGLE, CMD_REQUIRED, "new max group id");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupMemberList", DoPtsGroupMemberList, NULL,
  			  "list members of a group");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_REQUIRED, "group to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupMemberRemove", DoPtsGroupMemberRemove, NULL,
  			  "remove a member from a group");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_REQUIRED, "user to remove");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_REQUIRED, "group to modify");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupRename", DoPtsGroupRename, NULL,
  			  "rename a group");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_REQUIRED, "group to modify");
      cmd_AddParm(ts, "-newname", CMD_SINGLE, CMD_REQUIRED, "new group name");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsGroupModify", DoPtsGroupModify, NULL,
  			  "modify a group");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_REQUIRED, "group to modify");
      cmd_AddParm(ts, "-liststatus", CMD_SINGLE, CMD_REQUIRED,
***************
*** 644,671 ****
  		"list delete permission <owner | group>");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsUserCreate", DoPtsUserCreate, 0,
  			  "create a new user");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_REQUIRED, "user to create");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsUserDelete", DoPtsUserDelete, 0,
  			  "delete a user");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_REQUIRED, "user to delete");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsUserGet", DoPtsUserGet, 0,
  			  "get information about a user");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_REQUIRED, "user to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsUserRename", DoPtsUserRename, 0,
  			  "rename a user");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_REQUIRED, "user to modify");
      cmd_AddParm(ts, "-newname", CMD_SINGLE, CMD_REQUIRED, "new user name");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsUserModify", DoPtsUserModify, 0,
  			  "change a user");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_REQUIRED, "user to modify");
      cmd_AddParm(ts, "-groupquota", CMD_SINGLE, CMD_OPTIONAL,
--- 644,671 ----
  		"list delete permission <owner | group>");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsUserCreate", DoPtsUserCreate, NULL,
  			  "create a new user");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_REQUIRED, "user to create");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsUserDelete", DoPtsUserDelete, NULL,
  			  "delete a user");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_REQUIRED, "user to delete");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsUserGet", DoPtsUserGet, NULL,
  			  "get information about a user");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_REQUIRED, "user to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsUserRename", DoPtsUserRename, NULL,
  			  "rename a user");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_REQUIRED, "user to modify");
      cmd_AddParm(ts, "-newname", CMD_SINGLE, CMD_REQUIRED, "new user name");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsUserModify", DoPtsUserModify, NULL,
  			  "change a user");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_REQUIRED, "user to modify");
      cmd_AddParm(ts, "-groupquota", CMD_SINGLE, CMD_OPTIONAL,
***************
*** 678,698 ****
  		"list membership permission <owner | any>");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsUserMaxGet", DoPtsUserMaxGet, 0,
  			  "get the max user id");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsUserMaxSet", DoPtsUserMaxSet, 0,
  			  "set the max user id");
      cmd_AddParm(ts, "-max", CMD_SINGLE, CMD_REQUIRED, "max user id");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsUserMemberList", DoPtsUserMemberList, 0,
  			  "list group membership for a user");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_REQUIRED, "user to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsOwnedGroupList", DoPtsOwnedGroupList, 0,
  			  "list groups owned by a user");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_REQUIRED, "user to query");
      SetupCommonCmdArgs(ts);
--- 678,698 ----
  		"list membership permission <owner | any>");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsUserMaxGet", DoPtsUserMaxGet, NULL,
  			  "get the max user id");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsUserMaxSet", DoPtsUserMaxSet, NULL,
  			  "set the max user id");
      cmd_AddParm(ts, "-max", CMD_SINGLE, CMD_REQUIRED, "max user id");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsUserMemberList", DoPtsUserMemberList, NULL,
  			  "list group membership for a user");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_REQUIRED, "user to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("PtsOwnedGroupList", DoPtsOwnedGroupList, NULL,
  			  "list groups owned by a user");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_REQUIRED, "user to query");
      SetupCommonCmdArgs(ts);
Index: openafs/src/libadmin/test/util.c
diff -c openafs/src/libadmin/test/util.c:1.5 openafs/src/libadmin/test/util.c:1.5.14.1
*** openafs/src/libadmin/test/util.c:1.5	Tue Jul 15 19:15:34 2003
--- openafs/src/libadmin/test/util.c	Wed Oct 31 00:09:31 2007
***************
*** 15,26 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/test/util.c,v 1.5 2003/07/15 23:15:34 shadow Exp $");
  
  #include "util.h"
  
  int
! DoUtilErrorTranslate(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { ERROR_CODE } DoUtilErrorTranslate_parm_t;
      afs_status_t st = 0;
--- 15,26 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/test/util.c,v 1.5.14.1 2007/10/31 04:09:31 shadow Exp $");
  
  #include "util.h"
  
  int
! DoUtilErrorTranslate(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { ERROR_CODE } DoUtilErrorTranslate_parm_t;
      afs_status_t st = 0;
***************
*** 37,43 ****
  }
  
  int
! DoUtilDatabaseServerList(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { CELL_NAME } DoUtilDatabaseServerList_parm_t;
      afs_status_t st = 0;
--- 37,43 ----
  }
  
  int
! DoUtilDatabaseServerList(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { CELL_NAME } DoUtilDatabaseServerList_parm_t;
      afs_status_t st = 0;
***************
*** 66,72 ****
  }
  
  int
! DoUtilNameToAddress(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER_NAME } DoUtilNameToAddress_parm_t;
      afs_status_t st = 0;
--- 66,72 ----
  }
  
  int
! DoUtilNameToAddress(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER_NAME } DoUtilNameToAddress_parm_t;
      afs_status_t st = 0;
***************
*** 88,104 ****
  {
      struct cmd_syndesc *ts;
  
!     ts = cmd_CreateSyntax("UtilErrorTranslate", DoUtilErrorTranslate, 0,
  			  "translate an error code");
      cmd_AddParm(ts, "-error", CMD_SINGLE, CMD_REQUIRED, "error code");
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("UtilDatabaseServerList", DoUtilDatabaseServerList,
! 			  0, "list the database servers in a cell");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_REQUIRED, "cell to list");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("UtilNameToAddress", DoUtilNameToAddress, 0,
  			  "translate a host name to an address");
      cmd_AddParm(ts, "-host", CMD_SINGLE, CMD_REQUIRED, "host name");
      SetupCommonCmdArgs(ts);
--- 88,104 ----
  {
      struct cmd_syndesc *ts;
  
!     ts = cmd_CreateSyntax("UtilErrorTranslate", DoUtilErrorTranslate, NULL,
  			  "translate an error code");
      cmd_AddParm(ts, "-error", CMD_SINGLE, CMD_REQUIRED, "error code");
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("UtilDatabaseServerList", DoUtilDatabaseServerList,
! 			  NULL, "list the database servers in a cell");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_REQUIRED, "cell to list");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("UtilNameToAddress", DoUtilNameToAddress, NULL,
  			  "translate a host name to an address");
      cmd_AddParm(ts, "-host", CMD_SINGLE, CMD_REQUIRED, "host name");
      SetupCommonCmdArgs(ts);
Index: openafs/src/libadmin/test/util.h
diff -c openafs/src/libadmin/test/util.h:1.4 openafs/src/libadmin/test/util.h:1.4.14.1
*** openafs/src/libadmin/test/util.h:1.4	Tue Jul 15 19:15:34 2003
--- openafs/src/libadmin/test/util.h	Wed Oct 31 00:09:31 2007
***************
*** 29,41 ****
  #include "common.h"
  
  int
!   DoUtilErrorTranslate(struct cmd_syndesc *as, char *arock);
  
  int
!   DoUtilDatabaseServerList(struct cmd_syndesc *as, char *arock);
  
  int
!   DoUtilNameToAddress(struct cmd_syndesc *as, char *arock);
  
  void
    SetupUtilAdminCmd(void);
--- 29,41 ----
  #include "common.h"
  
  int
!   DoUtilErrorTranslate(struct cmd_syndesc *as, void *arock);
  
  int
!   DoUtilDatabaseServerList(struct cmd_syndesc *as, void *arock);
  
  int
!   DoUtilNameToAddress(struct cmd_syndesc *as, void *arock);
  
  void
    SetupUtilAdminCmd(void);
Index: openafs/src/libadmin/test/vos.c
diff -c openafs/src/libadmin/test/vos.c:1.9 openafs/src/libadmin/test/vos.c:1.9.4.1
*** openafs/src/libadmin/test/vos.c:1.9	Sun Oct 23 15:05:40 2005
--- openafs/src/libadmin/test/vos.c	Wed Oct 31 00:09:31 2007
***************
*** 18,24 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/test/vos.c,v 1.9 2005/10/23 19:05:40 jaltman Exp $");
  
  #include "vos.h"
  
--- 18,24 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/test/vos.c,v 1.9.4.1 2007/10/31 04:09:31 shadow Exp $");
  
  #include "vos.h"
  
***************
*** 144,150 ****
  }
  
  int
! DoVosBackupVolumeCreate(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { VOLUME } DoVosBackupVolumeCreate_parm_t;
      afs_status_t st = 0;
--- 144,150 ----
  }
  
  int
! DoVosBackupVolumeCreate(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { VOLUME } DoVosBackupVolumeCreate_parm_t;
      afs_status_t st = 0;
***************
*** 162,168 ****
  }
  
  int
! DoVosBackupVolumeCreateMultiple(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION, PREFIX,
  	EXCLUDE
--- 162,168 ----
  }
  
  int
! DoVosBackupVolumeCreateMultiple(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION, PREFIX,
  	EXCLUDE
***************
*** 214,220 ****
  }
  
  int
! DoVosPartitionGet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION } DoVosPartitionGet_parm_t;
      afs_status_t st = 0;
--- 214,220 ----
  }
  
  int
! DoVosPartitionGet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION } DoVosPartitionGet_parm_t;
      afs_status_t st = 0;
***************
*** 245,251 ****
  }
  
  int
! DoVosPartitionList(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER } DoVosPartitionGet_parm_t;
      afs_status_t st = 0;
--- 245,251 ----
  }
  
  int
! DoVosPartitionList(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER } DoVosPartitionGet_parm_t;
      afs_status_t st = 0;
***************
*** 281,287 ****
  }
  
  int
! DoVosServerSync(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION } DoVosServerSync_parm_t;
      afs_status_t st = 0;
--- 281,287 ----
  }
  
  int
! DoVosServerSync(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION } DoVosServerSync_parm_t;
      afs_status_t st = 0;
***************
*** 309,315 ****
  }
  
  int
! DoVosFileServerAddressChange(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { OLDADDRESS,
  	NEWADDRESS
--- 309,315 ----
  }
  
  int
! DoVosFileServerAddressChange(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { OLDADDRESS,
  	NEWADDRESS
***************
*** 334,340 ****
  }
  
  int
! DoVosFileServerAddressRemove(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { ADDRESS } DoVosFileServerAddressRemove_parm_t;
      afs_status_t st = 0;
--- 334,340 ----
  }
  
  int
! DoVosFileServerAddressRemove(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { ADDRESS } DoVosFileServerAddressRemove_parm_t;
      afs_status_t st = 0;
***************
*** 363,369 ****
  }
  
  int
! DoVosFileServerList(struct cmd_syndesc *as, char *arock)
  {
      afs_status_t st = 0;
      void *iter;
--- 363,369 ----
  }
  
  int
! DoVosFileServerList(struct cmd_syndesc *as, void *arock)
  {
      afs_status_t st = 0;
      void *iter;
***************
*** 414,420 ****
  }
  
  int
! DoVosServerTransactionStatusList(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER } DoVosServerTransactionStatusList_parm_t;
      afs_status_t st = 0;
--- 414,420 ----
  }
  
  int
! DoVosServerTransactionStatusList(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER } DoVosServerTransactionStatusList_parm_t;
      afs_status_t st = 0;
***************
*** 522,528 ****
  }
  
  int
! DoVosVLDBGet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { VOLUME } DoVosVLDBGet_parm_t;
      afs_status_t st = 0;
--- 522,528 ----
  }
  
  int
! DoVosVLDBGet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { VOLUME } DoVosVLDBGet_parm_t;
      afs_status_t st = 0;
***************
*** 546,552 ****
  }
  
  int
! DoVosVLDBList(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION } DoVosVLDBList_parm_t;
      afs_status_t st = 0;
--- 546,552 ----
  }
  
  int
! DoVosVLDBList(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION } DoVosVLDBList_parm_t;
      afs_status_t st = 0;
***************
*** 594,600 ****
  }
  
  int
! DoVosVLDBEntryRemove(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME } DoVosVLDBEntryRemove_parm_t;
      afs_status_t st = 0;
--- 594,600 ----
  }
  
  int
! DoVosVLDBEntryRemove(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME } DoVosVLDBEntryRemove_parm_t;
      afs_status_t st = 0;
***************
*** 637,643 ****
  }
  
  int
! DoVosVLDBUnlock(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION } DoVosVLDBUnlock_parm_t;
      afs_status_t st = 0;
--- 637,643 ----
  }
  
  int
! DoVosVLDBUnlock(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION } DoVosVLDBUnlock_parm_t;
      afs_status_t st = 0;
***************
*** 671,677 ****
  }
  
  int
! DoVosVLDBEntryLock(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { VOLUME } DoVosVLDBEntryLoc_parm_tk;
      afs_status_t st = 0;
--- 671,677 ----
  }
  
  int
! DoVosVLDBEntryLock(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { VOLUME } DoVosVLDBEntryLoc_parm_tk;
      afs_status_t st = 0;
***************
*** 690,696 ****
  }
  
  int
! DoVosVLDBEntryUnlock(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { VOLUME } DoVosVLDBEntryUnlock_parm_t;
      afs_status_t st = 0;
--- 690,696 ----
  }
  
  int
! DoVosVLDBEntryUnlock(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { VOLUME } DoVosVLDBEntryUnlock_parm_t;
      afs_status_t st = 0;
***************
*** 709,715 ****
  }
  
  int
! DoVosVLDBReadOnlySiteCreate(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION,
  	VOLUME
--- 709,715 ----
  }
  
  int
! DoVosVLDBReadOnlySiteCreate(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION,
  	VOLUME
***************
*** 744,750 ****
  }
  
  int
! DoVosVLDBReadOnlySiteDelete(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION,
  	VOLUME
--- 744,750 ----
  }
  
  int
! DoVosVLDBReadOnlySiteDelete(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION,
  	VOLUME
***************
*** 780,786 ****
  }
  
  int
! DoVosVLDBSync(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION, FORCE } DoVosVLDBSync_parm_t;
      afs_status_t st = 0;
--- 780,786 ----
  }
  
  int
! DoVosVLDBSync(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION, FORCE } DoVosVLDBSync_parm_t;
      afs_status_t st = 0;
***************
*** 819,825 ****
  }
  
  int
! DoVosVolumeCreate(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME,
  	QUOTA
--- 819,825 ----
  }
  
  int
! DoVosVolumeCreate(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME,
  	QUOTA
***************
*** 864,870 ****
  }
  
  int
! DoVosVolumeDelete(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeDelete_parm_t;
      afs_status_t st = 0;
--- 864,870 ----
  }
  
  int
! DoVosVolumeDelete(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeDelete_parm_t;
      afs_status_t st = 0;
***************
*** 898,904 ****
  }
  
  int
! DoVosVolumeRename(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { OLDVOLUME, NEWVOLUME } DoVosVolumeRename_parm_t;
      afs_status_t st = 0;
--- 898,904 ----
  }
  
  int
! DoVosVolumeRename(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { OLDVOLUME, NEWVOLUME } DoVosVolumeRename_parm_t;
      afs_status_t st = 0;
***************
*** 922,928 ****
  }
  
  int
! DoVosVolumeDump(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME, STARTTIME,
  	DUMPFILE
--- 922,928 ----
  }
  
  int
! DoVosVolumeDump(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME, STARTTIME,
  	DUMPFILE
***************
*** 978,984 ****
  }
  
  int
! DoVosVolumeRestore(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION, ID, VOLUME, DUMPFILE,
  	FULL
--- 978,984 ----
  }
  
  int
! DoVosVolumeRestore(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION, ID, VOLUME, DUMPFILE,
  	FULL
***************
*** 1032,1038 ****
  }
  
  int
! DoVosVolumeOnline(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME, SLEEP,
  	BUSY
--- 1032,1038 ----
  }
  
  int
! DoVosVolumeOnline(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME, SLEEP,
  	BUSY
***************
*** 1080,1086 ****
  }
  
  int
! DoVosVolumeOffline(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeOffline_parm_t;
      afs_status_t st = 0;
--- 1080,1086 ----
  }
  
  int
! DoVosVolumeOffline(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeOffline_parm_t;
      afs_status_t st = 0;
***************
*** 1337,1343 ****
  }
  
  int
! DoVosVolumeGet(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeGet_parm_t;
      afs_status_t st = 0;
--- 1337,1343 ----
  }
  
  int
! DoVosVolumeGet(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeGet_parm_t;
      afs_status_t st = 0;
***************
*** 1374,1380 ****
  }
  
  int
! DoVosVolumeList(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION } DoVosVolumeList_parm_t;
      afs_status_t st = 0;
--- 1374,1380 ----
  }
  
  int
! DoVosVolumeList(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION } DoVosVolumeList_parm_t;
      afs_status_t st = 0;
***************
*** 1420,1426 ****
  }
  
  int
! DoVosVolumeMove(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { VOLUME, FROMSERVER, FROMPARTITION, TOSERVER,
  	TOPARTITION
--- 1420,1426 ----
  }
  
  int
! DoVosVolumeMove(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { VOLUME, FROMSERVER, FROMPARTITION, TOSERVER,
  	TOPARTITION
***************
*** 1472,1478 ****
  }
  
  int
! DoVosVolumeRelease(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { VOLUME, FORCE } DoVosVolumeRelease_parm_t;
      afs_status_t st = 0;
--- 1472,1478 ----
  }
  
  int
! DoVosVolumeRelease(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { VOLUME, FORCE } DoVosVolumeRelease_parm_t;
      afs_status_t st = 0;
***************
*** 1495,1501 ****
  }
  
  int
! DoVosVolumeZap(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME, FORCE } DoVosVolumeZap_parm_t;
      afs_status_t st = 0;
--- 1495,1501 ----
  }
  
  int
! DoVosVolumeZap(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME, FORCE } DoVosVolumeZap_parm_t;
      afs_status_t st = 0;
***************
*** 1534,1540 ****
  }
  
  int
! DoVosPartitionNameToId(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { PARTITION } DoVosPartitionNameToId_parm_t;
      afs_status_t st = 0;
--- 1534,1540 ----
  }
  
  int
! DoVosPartitionNameToId(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { PARTITION } DoVosPartitionNameToId_parm_t;
      afs_status_t st = 0;
***************
*** 1552,1558 ****
  }
  
  int
! DoVosPartitionIdToName(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { PARTITIONID } DoVosPartitionIdToName_parm_t;
      afs_status_t st = 0;
--- 1552,1558 ----
  }
  
  int
! DoVosPartitionIdToName(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { PARTITIONID } DoVosPartitionIdToName_parm_t;
      afs_status_t st = 0;
***************
*** 1575,1581 ****
  }
  
  int
! DoVosVolumeQuotaChange(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME,
  	QUOTA
--- 1575,1581 ----
  }
  
  int
! DoVosVolumeQuotaChange(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME,
  	QUOTA
***************
*** 1725,1731 ****
  }
  
  int
! DoVosVolumeGet2(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeGet_parm_t;
      afs_status_t st = 0;
--- 1725,1731 ----
  }
  
  int
! DoVosVolumeGet2(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeGet_parm_t;
      afs_status_t st = 0;
***************
*** 1767,1773 ****
  
  
  int
! DoVos_ClearVolUpdateCounter(struct cmd_syndesc *as, char *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeGet_parm_t;
      afs_status_t st = 0;
--- 1767,1773 ----
  
  
  int
! DoVos_ClearVolUpdateCounter(struct cmd_syndesc *as, void *arock)
  {
      typedef enum { SERVER, PARTITION, VOLUME } DoVosVolumeGet_parm_t;
      afs_status_t st = 0;
***************
*** 1805,1817 ****
  {
      struct cmd_syndesc *ts;
  
!     ts = cmd_CreateSyntax("VosBackupVolumeCreate", DoVosBackupVolumeCreate, 0,
  			  "create a backup volume");
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED, "volume to back up");
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("VosBackupVolumeCreateMultiple",
! 			  DoVosBackupVolumeCreateMultiple, 0,
  			  "create a backup volume");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL,
  		"server housing volumes to back up");
--- 1805,1817 ----
  {
      struct cmd_syndesc *ts;
  
!     ts = cmd_CreateSyntax("VosBackupVolumeCreate", DoVosBackupVolumeCreate, NULL,
  			  "create a backup volume");
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED, "volume to back up");
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("VosBackupVolumeCreateMultiple",
! 			  DoVosBackupVolumeCreateMultiple, NULL,
  			  "create a backup volume");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL,
  		"server housing volumes to back up");
***************
*** 1823,1829 ****
  		"exclude volumes from backup that match prefix");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosPartitionGet", DoVosPartitionGet, 0,
  			  "get information about a partition");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server housing partition of interest");
--- 1823,1829 ----
  		"exclude volumes from backup that match prefix");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosPartitionGet", DoVosPartitionGet, NULL,
  			  "get information about a partition");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server housing partition of interest");
***************
*** 1831,1843 ****
  		"partition to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosPartitionList", DoVosPartitionList, 0,
  			  "list information about all partitions at a server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server housing partitions of interest");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosServerSync", DoVosServerSync, 0,
  			  "sync server with vldb");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to sync");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL,
--- 1831,1843 ----
  		"partition to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosPartitionList", DoVosPartitionList, NULL,
  			  "list information about all partitions at a server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server housing partitions of interest");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosServerSync", DoVosServerSync, NULL,
  			  "sync server with vldb");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to sync");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL,
***************
*** 1845,1851 ****
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("VosFileServerAddressChange",
! 			  DoVosFileServerAddressChange, 0,
  			  "change a server's address in the vldb");
      cmd_AddParm(ts, "-oldaddress", CMD_SINGLE, CMD_REQUIRED,
  		"old address to change");
--- 1845,1851 ----
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("VosFileServerAddressChange",
! 			  DoVosFileServerAddressChange, NULL,
  			  "change a server's address in the vldb");
      cmd_AddParm(ts, "-oldaddress", CMD_SINGLE, CMD_REQUIRED,
  		"old address to change");
***************
*** 1853,1881 ****
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("VosFileServerAddressRemove",
! 			  DoVosFileServerAddressRemove, 0,
  			  "remove a server's address from the vldb");
      cmd_AddParm(ts, "-address", CMD_SINGLE, CMD_REQUIRED,
  		"address to remove");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosFileServerList", DoVosFileServerList, 0,
  			  "list the file servers in a cell");
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("VosServerTransactionStatusList",
! 			  DoVosServerTransactionStatusList, 0,
  			  "list the active transactions at a server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVLDBGet", DoVosVLDBGet, 0,
  			  "get a vldb entry for a volume");
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED,
  		"volume to retrieve");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVLDBList", DoVosVLDBList, 0,
  			  "list a group of vldb entries");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL,
  		"limit entries to a particular server");
--- 1853,1881 ----
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("VosFileServerAddressRemove",
! 			  DoVosFileServerAddressRemove, NULL,
  			  "remove a server's address from the vldb");
      cmd_AddParm(ts, "-address", CMD_SINGLE, CMD_REQUIRED,
  		"address to remove");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosFileServerList", DoVosFileServerList, NULL,
  			  "list the file servers in a cell");
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("VosServerTransactionStatusList",
! 			  DoVosServerTransactionStatusList, NULL,
  			  "list the active transactions at a server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to query");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVLDBGet", DoVosVLDBGet, NULL,
  			  "get a vldb entry for a volume");
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED,
  		"volume to retrieve");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVLDBList", DoVosVLDBList, NULL,
  			  "list a group of vldb entries");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL,
  		"limit entries to a particular server");
***************
*** 1883,1889 ****
  		"limit entries to a particular partition");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVLDBEntryRemove", DoVosVLDBEntryRemove, 0,
  			  "remove vldb entries");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL,
  		"limit entries to a particular server");
--- 1883,1889 ----
  		"limit entries to a particular partition");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVLDBEntryRemove", DoVosVLDBEntryRemove, NULL,
  			  "remove vldb entries");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL,
  		"limit entries to a particular server");
***************
*** 1892,1898 ****
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_OPTIONAL, "volume to remove");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVLDBUnlock", DoVosVLDBUnlock, 0,
  			  "unlock a group of vldb entries");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL,
  		"limit entries to a particular server");
--- 1892,1898 ----
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_OPTIONAL, "volume to remove");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVLDBUnlock", DoVosVLDBUnlock, NULL,
  			  "unlock a group of vldb entries");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL,
  		"limit entries to a particular server");
***************
*** 1900,1917 ****
  		"limit entries to a particular partition");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVLDBEntryLock", DoVosVLDBList, 0,
  			  "lock a single vldb entry");
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED, "volume to lock");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVLDBEntryUnlock", DoVosVLDBEntryUnlock, 0,
  			  "unlock a single vldb entry");
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED, "volume to unlock");
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("VosVLDBReadOnlySiteCreate",
! 			  DoVosVLDBReadOnlySiteCreate, 0,
  			  "create a read only site");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where read only will be created");
--- 1900,1917 ----
  		"limit entries to a particular partition");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVLDBEntryLock", DoVosVLDBList, NULL,
  			  "lock a single vldb entry");
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED, "volume to lock");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVLDBEntryUnlock", DoVosVLDBEntryUnlock, NULL,
  			  "unlock a single vldb entry");
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED, "volume to unlock");
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("VosVLDBReadOnlySiteCreate",
! 			  DoVosVLDBReadOnlySiteCreate, NULL,
  			  "create a read only site");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where read only will be created");
***************
*** 1922,1928 ****
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("VosVLDBReadOnlySiteDelete",
! 			  DoVosVLDBReadOnlySiteDelete, 0,
  			  "delete a read only site before initial replication");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL,
  		"server where read only will be deleted");
--- 1922,1928 ----
      SetupCommonCmdArgs(ts);
  
      ts = cmd_CreateSyntax("VosVLDBReadOnlySiteDelete",
! 			  DoVosVLDBReadOnlySiteDelete, NULL,
  			  "delete a read only site before initial replication");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL,
  		"server where read only will be deleted");
***************
*** 1931,1937 ****
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED, "volume to delete");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVLDBSync", DoVosVLDBSync, 0,
  			  "sync vldb with server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to sync");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL,
--- 1931,1937 ----
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED, "volume to delete");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVLDBSync", DoVosVLDBSync, NULL,
  			  "sync vldb with server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server to sync");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL,
***************
*** 1939,1945 ****
      cmd_AddParm(ts, "-force", CMD_FLAG, CMD_OPTIONAL, "force sync to occur");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeCreate", DoVosVolumeCreate, 0,
  			  "create a read write volume");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where volume will be created");
--- 1939,1945 ----
      cmd_AddParm(ts, "-force", CMD_FLAG, CMD_OPTIONAL, "force sync to occur");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeCreate", DoVosVolumeCreate, NULL,
  			  "create a read write volume");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where volume will be created");
***************
*** 1951,1957 ****
  		"size quota of new volume in 1kb units");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeDelete", DoVosVolumeDelete, 0,
  			  "delete a volume");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where volume exists");
--- 1951,1957 ----
  		"size quota of new volume in 1kb units");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeDelete", DoVosVolumeDelete, NULL,
  			  "delete a volume");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server where volume exists");
***************
*** 1960,1972 ****
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED, "volume to delete");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeRename", DoVosVolumeRename, 0,
  			  "rename a volume");
      cmd_AddParm(ts, "-oldname", CMD_SINGLE, CMD_REQUIRED, "old volume name");
      cmd_AddParm(ts, "-newname", CMD_SINGLE, CMD_REQUIRED, "new volume name");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeDump", DoVosVolumeDump, 0,
  			  "dump a volume to a file");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL,
  		"dump volume at a particular server");
--- 1960,1972 ----
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED, "volume to delete");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeRename", DoVosVolumeRename, NULL,
  			  "rename a volume");
      cmd_AddParm(ts, "-oldname", CMD_SINGLE, CMD_REQUIRED, "old volume name");
      cmd_AddParm(ts, "-newname", CMD_SINGLE, CMD_REQUIRED, "new volume name");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeDump", DoVosVolumeDump, NULL,
  			  "dump a volume to a file");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL,
  		"dump volume at a particular server");
***************
*** 1979,1985 ****
  		"file to contain dump results");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeRestore", DoVosVolumeRestore, 0,
  			  "restore a volume from a dumpfile");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server that houses volume to restore");
--- 1979,1985 ----
  		"file to contain dump results");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeRestore", DoVosVolumeRestore, NULL,
  			  "restore a volume from a dumpfile");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server that houses volume to restore");
***************
*** 1994,2000 ****
  		"does a full restore of volume");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeOnline", DoVosVolumeOnline, 0,
  			  "bring a volume online");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server that houses volume");
--- 1994,2000 ----
  		"does a full restore of volume");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeOnline", DoVosVolumeOnline, NULL,
  			  "bring a volume online");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server that houses volume");
***************
*** 2006,2012 ****
      cmd_AddParm(ts, "-busy", CMD_FLAG, CMD_OPTIONAL, "mark volume busy");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeOffline", DoVosVolumeOffline, 0,
  			  "take a volume offline");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server that houses volume");
--- 2006,2012 ----
      cmd_AddParm(ts, "-busy", CMD_FLAG, CMD_OPTIONAL, "mark volume busy");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeOffline", DoVosVolumeOffline, NULL,
  			  "take a volume offline");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server that houses volume");
***************
*** 2016,2022 ****
  		"volume to bring offline");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeGet", DoVosVolumeGet, 0,
  			  "get a volume entry");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server that houses volume");
--- 2016,2022 ----
  		"volume to bring offline");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeGet", DoVosVolumeGet, NULL,
  			  "get a volume entry");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server that houses volume");
***************
*** 2026,2032 ****
  		"volume to retrieve");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeList", DoVosVolumeList, 0,
  			  "list a group of volumes");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"limit volumes to a particular server");
--- 2026,2032 ----
  		"volume to retrieve");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeList", DoVosVolumeList, NULL,
  			  "list a group of volumes");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"limit volumes to a particular server");
***************
*** 2034,2040 ****
  		"limit volumes to a particular partition");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeMove", DoVosVolumeMove, 0,
  			  "move a volume");
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED, "volume to move");
      cmd_AddParm(ts, "-fromserver", CMD_SINGLE, CMD_REQUIRED, "source server");
--- 2034,2040 ----
  		"limit volumes to a particular partition");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeMove", DoVosVolumeMove, NULL,
  			  "move a volume");
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED, "volume to move");
      cmd_AddParm(ts, "-fromserver", CMD_SINGLE, CMD_REQUIRED, "source server");
***************
*** 2046,2052 ****
  		"destination partition");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeRelease", DoVosVolumeRelease, 0,
  			  "release updates to read only");
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED,
  		"volume to replicate");
--- 2046,2052 ----
  		"destination partition");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeRelease", DoVosVolumeRelease, NULL,
  			  "release updates to read only");
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_REQUIRED,
  		"volume to replicate");
***************
*** 2054,2060 ****
  		"force release to occur");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeZap", DoVosVolumeZap, 0, "zap a volume");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server that houses the volume to zap");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_REQUIRED,
--- 2054,2060 ----
  		"force release to occur");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeZap", DoVosVolumeZap, NULL, "zap a volume");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server that houses the volume to zap");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_REQUIRED,
***************
*** 2063,2080 ****
      cmd_AddParm(ts, "-force", CMD_FLAG, CMD_OPTIONAL, "force zap");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosPartitionNameToId", DoVosPartitionNameToId, 0,
  			  "convert a partition name to a number");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_REQUIRED,
  		"partition to convert");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosPartitionIdToName", DoVosPartitionIdToName, 0,
  			  "convert a number to a partition");
      cmd_AddParm(ts, "-id", CMD_SINGLE, CMD_REQUIRED, "number to convert");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeQuotaChange", DoVosVolumeQuotaChange, 0,
  			  "change the quota for a partition");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server that houses the volume");
--- 2063,2080 ----
      cmd_AddParm(ts, "-force", CMD_FLAG, CMD_OPTIONAL, "force zap");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosPartitionNameToId", DoVosPartitionNameToId, NULL,
  			  "convert a partition name to a number");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_REQUIRED,
  		"partition to convert");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosPartitionIdToName", DoVosPartitionIdToName, NULL,
  			  "convert a number to a partition");
      cmd_AddParm(ts, "-id", CMD_SINGLE, CMD_REQUIRED, "number to convert");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeQuotaChange", DoVosVolumeQuotaChange, NULL,
  			  "change the quota for a partition");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server that houses the volume");
***************
*** 2085,2091 ****
  		"new quota in 1kb units");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeGet2", DoVosVolumeGet2, 0,
  			  "get a volume entry");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server that houses volume");
--- 2085,2091 ----
  		"new quota in 1kb units");
      SetupCommonCmdArgs(ts);
  
!     ts = cmd_CreateSyntax("VosVolumeGet2", DoVosVolumeGet2, NULL,
  			  "get a volume entry");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server that houses volume");
***************
*** 2095,2101 ****
  		"volume to retrieve");
      SetupCommonCmdArgs(ts);
      
!     ts = cmd_CreateSyntax("ClearVolUpdateCounter", DoVos_ClearVolUpdateCounter, 0,
  			  "clear volUpdateCounter");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server that houses volume");
--- 2095,2101 ----
  		"volume to retrieve");
      SetupCommonCmdArgs(ts);
      
!     ts = cmd_CreateSyntax("ClearVolUpdateCounter", DoVos_ClearVolUpdateCounter, NULL,
  			  "clear volUpdateCounter");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED,
  		"server that houses volume");
Index: openafs/src/libadmin/vos/afs_vosAdmin.c
diff -c openafs/src/libadmin/vos/afs_vosAdmin.c:1.11.4.1 openafs/src/libadmin/vos/afs_vosAdmin.c:1.11.4.2
*** openafs/src/libadmin/vos/afs_vosAdmin.c:1.11.4.1	Sun Jul 15 20:02:18 2007
--- openafs/src/libadmin/vos/afs_vosAdmin.c	Tue Oct 30 11:16:41 2007
***************
*** 11,27 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/vos/afs_vosAdmin.c,v 1.11.4.1 2007/07/16 00:02:18 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <stdio.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <ctype.h>
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
--- 11,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/vos/afs_vosAdmin.c,v 1.11.4.2 2007/10/30 15:16:41 shadow Exp $");
  
  #include <afs/stds.h>
  #include <stdio.h>
  #include <string.h>
  #include <ctype.h>
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
Index: openafs/src/libadmin/vos/lockprocs.c
diff -c openafs/src/libadmin/vos/lockprocs.c:1.9 openafs/src/libadmin/vos/lockprocs.c:1.9.14.1
*** openafs/src/libadmin/vos/lockprocs.c:1.9	Tue Jul 15 19:15:36 2003
--- openafs/src/libadmin/vos/lockprocs.c	Tue Oct 30 11:16:41 2007
***************
*** 11,26 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/vos/lockprocs.c,v 1.9 2003/07/15 23:15:36 shadow Exp $");
  
  #include "lockprocs.h"
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  /* Finds an index in VLDB entry that matches the volume type, server, and partition.
   * If type is zero, will match first index of ANY type (RW, BK, or RO).
--- 11,20 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/vos/lockprocs.c,v 1.9.14.1 2007/10/30 15:16:41 shadow Exp $");
  
  #include "lockprocs.h"
  #include <string.h>
  
  /* Finds an index in VLDB entry that matches the volume type, server, and partition.
   * If type is zero, will match first index of ANY type (RW, BK, or RO).
Index: openafs/src/libadmin/vos/vosutils.c
diff -c openafs/src/libadmin/vos/vosutils.c:1.12.4.2 openafs/src/libadmin/vos/vosutils.c:1.12.4.3
*** openafs/src/libadmin/vos/vosutils.c:1.12.4.2	Sun Jul 15 20:02:18 2007
--- openafs/src/libadmin/vos/vosutils.c	Tue Oct 30 11:16:41 2007
***************
*** 11,29 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/vos/vosutils.c,v 1.12.4.2 2007/07/16 00:02:18 jaltman Exp $");
  
  #include "vosutils.h"
  #include "vsprocs.h"
  #include "lockprocs.h"
  #include <afs/afs_AdminErrors.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  /*
   * VLDB entry conversion routines.
--- 11,23 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/vos/vosutils.c,v 1.12.4.3 2007/10/30 15:16:41 shadow Exp $");
  
  #include "vosutils.h"
  #include "vsprocs.h"
  #include "lockprocs.h"
  #include <afs/afs_AdminErrors.h>
  #include <string.h>
  
  /*
   * VLDB entry conversion routines.
Index: openafs/src/libadmin/vos/vsprocs.c
diff -c openafs/src/libadmin/vos/vsprocs.c:1.13.4.2 openafs/src/libadmin/vos/vsprocs.c:1.13.4.3
*** openafs/src/libadmin/vos/vsprocs.c:1.13.4.2	Wed Jul 18 10:22:43 2007
--- openafs/src/libadmin/vos/vsprocs.c	Tue Oct 30 11:16:41 2007
***************
*** 22,28 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/vos/vsprocs.c,v 1.13.4.2 2007/07/18 14:22:43 shadow Exp $");
  
  #include "vsprocs.h"
  #include "vosutils.h"
--- 22,28 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/vos/vsprocs.c,v 1.13.4.3 2007/10/30 15:16:41 shadow Exp $");
  
  #include "vsprocs.h"
  #include "vosutils.h"
***************
*** 30,42 ****
  #include "../adminutil/afs_AdminInternal.h"
  #include <afs/afs_AdminErrors.h>
  #include "afs_vosAdmin.h"
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
--- 30,36 ----
Index: openafs/src/log/kseal.c
diff -c openafs/src/log/kseal.c:1.8 openafs/src/log/kseal.c:1.8.4.1
*** openafs/src/log/kseal.c:1.8	Sat Jun 18 19:20:35 2005
--- openafs/src/log/kseal.c	Tue Oct 30 11:16:42 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/log/kseal.c,v 1.8 2005/06/18 23:20:35 shadow Exp $");
  
  #include <sys/types.h>
  #include <netinet/in.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/log/kseal.c,v 1.8.4.1 2007/10/30 15:16:42 shadow Exp $");
  
  #include <sys/types.h>
  #include <netinet/in.h>
***************
*** 19,31 ****
  #include <signal.h>
  #endif
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include <afs/cellconfig.h>
  #include <afs/afsutil.h>
--- 19,25 ----
Index: openafs/src/log/tokens.c
diff -c openafs/src/log/tokens.c:1.8 openafs/src/log/tokens.c:1.8.2.1
*** openafs/src/log/tokens.c:1.8	Wed Mar 15 13:27:43 2006
--- openafs/src/log/tokens.c	Tue Oct 30 11:16:42 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/log/tokens.c,v 1.8 2006/03/15 18:27:43 shadow Exp $");
  
  #include <stdio.h>
  #ifdef	AFS_AIX32_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/log/tokens.c,v 1.8.2.1 2007/10/30 15:16:42 shadow Exp $");
  
  #include <stdio.h>
  #ifdef	AFS_AIX32_ENV
***************
*** 25,38 ****
  #include <time.h>		/*time(), ctime() */
  #include <pwd.h>
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  
  #define VIRTUE
  #define VICE
--- 25,31 ----
Index: openafs/src/log/unlog.c
diff -c openafs/src/log/unlog.c:1.7 openafs/src/log/unlog.c:1.7.4.2
*** openafs/src/log/unlog.c:1.7	Sat Jun 18 19:20:35 2005
--- openafs/src/log/unlog.c	Wed Oct 31 00:09:32 2007
***************
*** 30,36 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/log/unlog.c,v 1.7 2005/06/18 23:20:35 shadow Exp $");
  
  #include <stdio.h>
  #include <potpourri.h>
--- 30,36 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/log/unlog.c,v 1.7.4.2 2007/10/31 04:09:32 shadow Exp $");
  
  #include <stdio.h>
  #include <potpourri.h>
***************
*** 38,51 ****
  #include <signal.h>
  #endif
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <errno.h>
--- 38,44 ----
***************
*** 71,77 ****
  
  
  int 
! CommandProc(struct cmd_syndesc *as, char *arock)
  {
  #define	MAXCELLS 20		/* XXX */
      struct cmd_item *itp;
--- 64,70 ----
  
  
  int 
! CommandProc(struct cmd_syndesc *as, void *arock)
  {
  #define	MAXCELLS 20		/* XXX */
      struct cmd_item *itp;
***************
*** 122,128 ****
      sigaction(SIGSEGV, &nsa, NULL);
  #endif
  
!     ts = cmd_CreateSyntax(NULL, CommandProc, 0,
  			  "Release Kerberos authentication");
      cmd_AddParm(ts, "-cell", CMD_LIST, CMD_OPTIONAL, "cell name");
  
--- 115,121 ----
      sigaction(SIGSEGV, &nsa, NULL);
  #endif
  
!     ts = cmd_CreateSyntax(NULL, CommandProc, NULL,
  			  "Release Kerberos authentication");
      cmd_AddParm(ts, "-cell", CMD_LIST, CMD_OPTIONAL, "cell name");
  
Index: openafs/src/lwp/lwp.c
diff -c openafs/src/lwp/lwp.c:1.34.2.1 openafs/src/lwp/lwp.c:1.34.2.2
*** openafs/src/lwp/lwp.c:1.34.2.1	Wed Jun  6 13:22:05 2007
--- openafs/src/lwp/lwp.c	Tue Oct 30 11:16:42 2007
***************
*** 17,23 ****
  #include <afsconfig.h>
  #include <afs/param.h>
  
! RCSID("$Header: /cvs/openafs/src/lwp/lwp.c,v 1.34.2.1 2007/06/06 17:22:05 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
--- 17,23 ----
  #include <afsconfig.h>
  #include <afs/param.h>
  
! RCSID("$Header: /cvs/openafs/src/lwp/lwp.c,v 1.34.2.2 2007/10/30 15:16:42 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
***************
*** 39,51 ****
  extern char *getenv();
  #include <time.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #if	!defined(USE_PTHREADS) && !defined(USE_SOLARIS_THREADS)
  
--- 39,45 ----
Index: openafs/src/lwp/threadname.c
diff -c openafs/src/lwp/threadname.c:1.10 openafs/src/lwp/threadname.c:1.10.14.1
*** openafs/src/lwp/threadname.c:1.10	Sat Nov 29 17:08:14 2003
--- openafs/src/lwp/threadname.c	Tue Oct 30 11:16:42 2007
***************
*** 23,37 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/lwp/threadname.c,v 1.10 2003/11/29 22:08:14 jaltman Exp $");
  
- #ifdef HAVE_STRING_H
  #include <string.h>
! #else
! #ifdef HAVE_STRINGS_H
! #include <strings.h>
! #endif
! #endif
  #if defined(AFS_PTHREAD_ENV)
  #include <pthread.h>
  #else /* defined(AFS_PTHREAD_ENV) */
--- 23,32 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/lwp/threadname.c,v 1.10.14.1 2007/10/30 15:16:42 shadow Exp $");
  
  #include <string.h>
! 
  #if defined(AFS_PTHREAD_ENV)
  #include <pthread.h>
  #else /* defined(AFS_PTHREAD_ENV) */
Index: openafs/src/lwp/waitkey.c
diff -c openafs/src/lwp/waitkey.c:1.13 openafs/src/lwp/waitkey.c:1.13.14.1
*** openafs/src/lwp/waitkey.c:1.13	Sat Nov 29 17:08:14 2003
--- openafs/src/lwp/waitkey.c	Tue Oct 30 11:16:42 2007
***************
*** 23,29 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/lwp/waitkey.c,v 1.13 2003/11/29 22:08:14 jaltman Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
--- 23,29 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/lwp/waitkey.c,v 1.13.14.1 2007/10/30 15:16:42 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
***************
*** 35,47 ****
  #include <sys/time.h>
  #include <unistd.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include "lwp.h"
  
  #define LWP_KEYSTROKE_DELAY   250	/* 250ms. Must be < 1000 */
--- 35,41 ----
Index: openafs/src/packaging/MacOS/OpenAFS.Info.plist.in
diff -c openafs/src/packaging/MacOS/OpenAFS.Info.plist.in:1.1.2.2 openafs/src/packaging/MacOS/OpenAFS.Info.plist.in:1.1.2.3
*** openafs/src/packaging/MacOS/OpenAFS.Info.plist.in:1.1.2.2	Thu Oct 11 13:27:39 2007
--- openafs/src/packaging/MacOS/OpenAFS.Info.plist.in	Wed Oct 24 23:43:39 2007
***************
*** 31,37 ****
  	<key>IFPkgFlagRelocatable</key>
  	<false/>
  	<key>IFPkgFlagRestartAction</key>
! 	<string>NoRestart</string>
  	<key>IFPkgFlagRootVolumeOnly</key>
  	<true/>
  	<key>IFPkgFlagUpdateInstalledLanguages</key>
--- 31,37 ----
  	<key>IFPkgFlagRelocatable</key>
  	<false/>
  	<key>IFPkgFlagRestartAction</key>
! 	<string>RecommendedRestart</string>
  	<key>IFPkgFlagRootVolumeOnly</key>
  	<true/>
  	<key>IFPkgFlagUpdateInstalledLanguages</key>
Index: openafs/src/packaging/MacOS/OpenAFS.info.in
diff -c openafs/src/packaging/MacOS/OpenAFS.info.in:1.1.2.2 openafs/src/packaging/MacOS/OpenAFS.info.in:1.1.2.3
*** openafs/src/packaging/MacOS/OpenAFS.info.in:1.1.2.2	Thu Oct 11 13:27:39 2007
--- openafs/src/packaging/MacOS/OpenAFS.info.in	Wed Oct 24 23:43:39 2007
***************
*** 11,16 ****
  Relocatable NO
  Required NO
  InstallOnly NO
! RequiresReboot NO
  InstallFat NO
  rootVolumeOnly YES
--- 11,16 ----
  Relocatable NO
  Required NO
  InstallOnly NO
! RequiresReboot YES
  InstallFat NO
  rootVolumeOnly YES
Index: openafs/src/packaging/MacOS/OpenAFS.post_install
diff -c openafs/src/packaging/MacOS/OpenAFS.post_install:1.7.2.2 openafs/src/packaging/MacOS/OpenAFS.post_install:1.7.2.3
*** openafs/src/packaging/MacOS/OpenAFS.post_install:1.7.2.2	Tue Aug  1 23:38:44 2006
--- openafs/src/packaging/MacOS/OpenAFS.post_install	Wed Oct 24 23:43:39 2007
***************
*** 36,41 ****
--- 36,49 ----
     cp ThisCell.sample ThisCell
  fi
  
+ # force reversion of 10.4 memcache mistake
+ rm -f config/afsd.options.broken
+ echo '-memcache -afsdb -stat 2000 -dcache 800 -daemons 3 -volumes 70 -dynroot -fakestat-all' > config/afsd.options.broken
+ if cmp -s config/afsd.options.broken config/afsd.options ; then
+    rm -f config/afsd.options
+ fi
+ rm -f config/afsd.options.broken
+ 
  if [ ! -f config/afsd.options -a -f config/afsd.options.sample ]; then
     cp config/afsd.options.sample config/afsd.options
  fi
***************
*** 91,97 ****
    # turn off execution of afssettings
    chmod a-x config/afssettings
  fi
- 
- #here we should run tools which configure the client, and then if it's enabled:
- /Library/StartupItems/OpenAFS/OpenAFS start
- 
--- 99,101 ----
Index: openafs/src/packaging/MacOS/OpenAFS.pre_upgrade
diff -c openafs/src/packaging/MacOS/OpenAFS.pre_upgrade:1.2.2.1 openafs/src/packaging/MacOS/OpenAFS.pre_upgrade:1.2.2.2
*** openafs/src/packaging/MacOS/OpenAFS.pre_upgrade:1.2.2.1	Thu Nov  9 23:11:33 2006
--- openafs/src/packaging/MacOS/OpenAFS.pre_upgrade	Wed Oct 24 23:43:39 2007
***************
*** 23,28 ****
    fi
  fi
  
- if [ -f /Library/StartupItems/OpenAFS/OpenAFS ]; then
-   /Library/StartupItems/OpenAFS/OpenAFS stop
- fi
--- 23,25 ----
Index: openafs/src/packaging/MacOS/buildpkg.sh
diff -c openafs/src/packaging/MacOS/buildpkg.sh:1.13.2.11 openafs/src/packaging/MacOS/buildpkg.sh:1.13.2.12
*** openafs/src/packaging/MacOS/buildpkg.sh:1.13.2.11	Wed Oct 10 13:40:30 2007
--- openafs/src/packaging/MacOS/buildpkg.sh	Wed Oct 24 23:43:39 2007
***************
*** 133,139 ****
      chmod -R og-w $PKGROOT/private
      chmod  og-rx $PKGROOT/private/var/db/openafs/cache
  
!     mkdir -p $PKGROOT/usr/bin $PKGROOT/usr/sbin
  
      BINLIST="fs klog klog.krb pagsh pagsh.krb pts sys tokens tokens.krb unlog unlog.krb aklog"
      ETCLIST="vos"
--- 133,139 ----
      chmod -R og-w $PKGROOT/private
      chmod  og-rx $PKGROOT/private/var/db/openafs/cache
  
!     mkdir -p $PKGROOT/usr/bin $PKGROOT/usr/sbin $PKGROOT/usr/share/man/man1 $PKGROOT/usr/share/man/man5 $PKGROOT/usr/share/man/man8
  
      BINLIST="fs klog klog.krb pagsh pagsh.krb pts sys tokens tokens.krb unlog unlog.krb aklog"
      ETCLIST="vos"
***************
*** 148,153 ****
--- 148,165 ----
      for f in $ETCLIST; do
         ln -s ../../Library/OpenAFS/Tools/etc/$f $PKGROOT/usr/sbin/$f
      done
+     for f in `ls $PKGROOT/Library/OpenAFS/Tools/man/man1`; do
+ 	gzip -9 $PKGROOT/Library/OpenAFS/Tools/man/man1/$f
+ 	ln -s ../../../../Library/OpenAFS/Tools/man/man1/$f.gz $PKGROOT/usr/share/man/man1/$f.gz
+     done
+     for f in `ls $PKGROOT/Library/OpenAFS/Tools/man/man5`; do
+ 	gzip -9 $PKGROOT/Library/OpenAFS/Tools/man/man5/$f
+ 	ln -s ../../../../Library/OpenAFS/Tools/man/man5/$f.gz $PKGROOT/usr/share/man/man5/$f.gz
+     done
+     for f in `ls $PKGROOT/Library/OpenAFS/Tools/man/man8`; do
+ 	gzip -9 $PKGROOT/Library/OpenAFS/Tools/man/man8/$f
+ 	ln -s ../../../../Library/OpenAFS/Tools/man/man8/$f.gz $PKGROOT/usr/share/man/man8/$f.gz
+     done
  
      ln -s ../../Library/OpenAFS/Tools/bin/kpasswd $PKGROOT/usr/bin/kpasswd.afs
  
***************
*** 188,193 ****
--- 200,213 ----
      cp CellServDB.list $PKGRES
      chown -R root${SEP}wheel $PKGRES
      rm -rf $CURDIR/OpenAFS.pkg
+ 
+     # once we have cm cleanup in 10.4 this can go
+     if [ $majorvers -le 8 ]; then
+ 	cat $RESSRC/OpenAFS.info|sed 's/RequiresReboot NO/RequiresReboot YES/'>$RESSRC/OpenAFS.info.new
+ 	rm -f $RESSRC/OpenAFS.info
+ 	mv $RESSRC/OpenAFS.info.new $RESSRC/OpenAFS.info
+     fi
+ 
      if [ $majorvers -ge 7 ]; then
  	echo $package -build -p $CURDIR/OpenAFS.pkg -f $PKGROOT -r $PKGRES \
  	    -i OpenAFS.Info.plist -d OpenAFS.Description.plist
Index: openafs/src/packaging/RedHat/openafs-buildfedora.pl
diff -c /dev/null openafs/src/packaging/RedHat/openafs-buildfedora.pl:1.1.2.3
*** /dev/null	Wed Nov  7 00:06:21 2007
--- openafs/src/packaging/RedHat/openafs-buildfedora.pl	Mon Oct 29 23:56:53 2007
***************
*** 0 ****
--- 1,49 ----
+ #!/usr/bin/perl
+ 
+ use strict;
+ use warnings;
+ 
+ my $specdir="/usr/src/redhat/SPECS";
+ 
+ my $fedoraversion=`rpm -q fedora-release --queryformat %{VERSION}`;
+ die "Unable to determine fedora version" if !$fedoraversion;
+ 
+ my %list;
+ foreach my $variant ('', 'PAE', 'kdump', 'xen') {
+   print "Working out variants - currently processing $variant\n";
+   my $append = "";
+   $append="-$variant" if $variant;
+   my @results=split(' ', `rpm -q --queryformat "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH} " kernel$append-devel`);
+   if ($?) {
+     print "RPM lookup for variant $variant failed. Skipping\n";
+     next;
+   }
+   print join(' ', @results)."\n";
+   foreach my $package (@results) {
+     print "Got $package\n";
+     $package=~/([^\-]*\-[^\-]*)\.([^\.]*)$/;
+     my ($version, $arch) = ($1,$2);
+     die "Couldn't extract version and architecture" if !$version or !$arch;
+     my @archs=map {/^.*\-([^\-]*)/;$1;} split(' ',`ls -d /usr/src/kernels/$version$append-*`);
+     foreach my $arch (@archs) {
+       print "Adding $variant, version $version for $arch\n";
+       $list{$arch} = {} if !$list{$arch};
+       $list{$arch}{$version} =[] if !$list{$arch}{$version};
+       push @{$list{$arch}{$version}}, $variant;
+     }
+   } 
+ }
+ # Build the base package
+ print "Building the base system\n";
+ system("rpmbuild -ba --define \"fedorakmod 1\" --define \"osvers fc$fedoraversion\" $specdir/openafs.spec") == 0 or exit 1;
+ 
+ print "Building kernel modules\n";
+ 
+ foreach my $arch (keys(%list)) {
+   foreach my $version (keys(%{$list{$arch}})) {
+     my $variants = join(" ", map {$_ or "''"} @{$list{$arch}{$version}});
+     print "Building with $version for $arch with variants $variants\n";
+     system("rpmbuild -bb --define \"fedorakmod 1\" --define \"osvers fc$fedoraversion\" --target $arch --define \"build_modules 1\" --define \"kernvers $version\" --define \"kvariants $variants\" $specdir/openafs.spec") == 0 or exit 1;
+   }
+ }
+ 
Index: openafs/src/packaging/RedHat/openafs.spec.in
diff -c openafs/src/packaging/RedHat/openafs.spec.in:1.2.2.7 openafs/src/packaging/RedHat/openafs.spec.in:1.2.2.9
*** openafs/src/packaging/RedHat/openafs.spec.in:1.2.2.7	Thu Oct 18 00:12:44 2007
--- openafs/src/packaging/RedHat/openafs.spec.in	Mon Oct 29 23:56:53 2007
***************
*** 1,7 ****
! # Openafs Spec $Revision: 1.2.2.7 $
  
! %define afsvers 1.4.5pre1
! %define pkgvers 1.4.5pre1
  # for beta/rc releases make pkgrel 0.X.<tag>
  # for real releases make pkgrel 1 (or more for extra releases)
  #%define pkgrel 0.1.rc1
--- 1,7 ----
! # Openafs Spec $Revision: 1.2.2.9 $
  
! %define afsvers @VERSION@
! %define pkgvers @VERSION@
  # for beta/rc releases make pkgrel 0.X.<tag>
  # for real releases make pkgrel 1 (or more for extra releases)
  #%define pkgrel 0.1.rc1
***************
*** 243,249 ****
--- 243,253 ----
  Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
  Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
  
+ Source20: http://dl.central.org/dl/cellservdb/CellServDB.2007-10-25 
+ 
  Source30: openafs-kernel-version.sh
+ Source996: openafs-kvers-is.sh
+ Source997: openafs-buildfedora.pl
  Source998: openafs-buildall.sh
  Source999: kmodtool
  
***************
*** 832,840 ****
  
  %if %{fedorakmod} && %{build_modules}
  for kvariant in %{kvariants} ; do
!   cp -R libafs_tree _kmod_build_${kvariant}
!   pushd _kmod_build_${kvariant}
!   ./configure --with-afs-sysname=${sysname} \
    	--prefix=%{_prefix} \
  	--libdir=%{_libdir} \
  	--bindir=%{_bindir} \
--- 836,845 ----
  
  %if %{fedorakmod} && %{build_modules}
  for kvariant in %{kvariants} ; do
!   if [ -n "${kvariant}" ] ; then
!     cp -R libafs_tree _kmod_build_${kvariant}
!     pushd _kmod_build_${kvariant}
!     ./configure --with-afs-sysname=${sysname} \
    	--prefix=%{_prefix} \
  	--libdir=%{_libdir} \
  	--bindir=%{_bindir} \
***************
*** 845,851 ****
  %endif
  	$config_opts \
  	|| exit 1
!   popd
  done
  %endif
  
--- 850,857 ----
  %endif
  	$config_opts \
  	|| exit 1
!     popd
!   fi
  done
  %endif
  
***************
*** 872,880 ****
  %if %{fedorakmod}
  for kvariant in %{kvariants}
  do
!   pushd _kmod_build_$kvariant;
!   make all MPS=SP
!   popd
  done
  
  %else
--- 878,890 ----
  %if %{fedorakmod}
  for kvariant in %{kvariants}
  do
!   if [ -n "${kvariant}" ] ; then
!     pushd _kmod_build_$kvariant;
!     make all MPS=SP
!     popd
!   else
!     make dest_only_libafs MPS=SP
!   fi
  done
  
  %else
***************
*** 987,993 ****
  # Populate /usr/vice/etc
  uve=$RPM_BUILD_ROOT%{_prefix}/vice/etc
  install -p -m 644 src/packaging/RedHat/openafs-ThisCell $uve/ThisCell
! install -p -m 644 src/afsd/CellServDB $uve/CellServDB.dist
  install -p -m 644 src/packaging/RedHat/openafs-cacheinfo $uve/cacheinfo
  
  #
--- 997,1003 ----
  # Populate /usr/vice/etc
  uve=$RPM_BUILD_ROOT%{_prefix}/vice/etc
  install -p -m 644 src/packaging/RedHat/openafs-ThisCell $uve/ThisCell
! install -p -m 644 %{SOURCE20} $uve/CellServDB.dist
  install -p -m 644 src/packaging/RedHat/openafs-cacheinfo $uve/cacheinfo
  
  #
***************
*** 1162,1174 ****
  %if %{fedorakmod}
  for kvariant in %{kvariants}
  do
!     pushd _kmod_build_$kvariant
!     srcdir=src/libafs/MODLOAD-%{kverrel}${kvariant}-SP
!     dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
  
!     mkdir -p ${dstdir}
!     install -m 744 ${srcdir}/libafs-%{kverrel}${kvariant}.ko $dstdir/openafs.ko
!     popd
  done
  %else
  # Install the kernel modules
--- 1172,1186 ----
  %if %{fedorakmod}
  for kvariant in %{kvariants}
  do
!   if [ -n "$kvariant" ] ; then
!     srcdir=_kmod_build_$kvariant/src/libafs/MODLOAD-%{kverrel}${kvariant}-SP
!   else
!     srcdir=${sysname}/dest/root.client%{_prefix}/vice/etc/modload
!   fi
  
!   dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
!   mkdir -p ${dstdir}
!   install -m 744 ${srcdir}/libafs-%{kverrel}${kvariant}.ko $dstdir/openafs.ko
  done
  %else
  # Install the kernel modules
***************
*** 1532,1538 ****
  %if %{hugemem_package}
  %files kernel-hugemem
  %defattr(-,root,root)
! %{kxmoddir}%{?hugemem_ext:%{hugemem_ext}}/kernel/fs/openafs/openafs.*
  %endif
  %endif
  
--- 1544,1550 ----
  %if %{hugemem_package}
  %files kernel-hugemem
  %defattr(-,root,root)
! %{kxmoddir}%{?hugemem_ext:%{hugemem_ext}}/fs/openafs/openafs.*
  %endif
  %endif
  
***************
*** 1544,1549 ****
--- 1556,1566 ----
  ###
  ##############################################################################
  %changelog
+ * Tue Oct 29 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.5
+ - Update to match the shipped 1.4.5 RPMS
+ - Fix the kvariant stuff to only configure the 'standard' case once
+ - Add openafs-kvers.sh back in
+ 
  * Wed Oct 10 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.5pre1-1
  - Use Fedora style kmods, which allows us to install multiple kernel types
  
Index: openafs/src/pam/afs_pam_msg.c
diff -c openafs/src/pam/afs_pam_msg.c:1.6 openafs/src/pam/afs_pam_msg.c:1.6.14.1
*** openafs/src/pam/afs_pam_msg.c:1.6	Tue Jul 15 19:15:56 2003
--- openafs/src/pam/afs_pam_msg.c	Tue Oct 30 11:16:42 2007
***************
*** 11,26 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/pam/afs_pam_msg.c,v 1.6 2003/07/15 23:15:56 shadow Exp $");
  
  #include <stdio.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <stdlib.h>
  #include <security/pam_appl.h>
  #include "afs_pam_msg.h"
--- 11,20 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/pam/afs_pam_msg.c,v 1.6.14.1 2007/10/30 15:16:42 shadow Exp $");
  
  #include <stdio.h>
  #include <string.h>
  #include <stdlib.h>
  #include <security/pam_appl.h>
  #include "afs_pam_msg.h"
Index: openafs/src/pam/afs_util.c
diff -c openafs/src/pam/afs_util.c:1.12.14.1 openafs/src/pam/afs_util.c:1.12.14.2
*** openafs/src/pam/afs_util.c:1.12.14.1	Wed Jul 19 17:17:18 2006
--- openafs/src/pam/afs_util.c	Tue Oct 30 11:16:42 2007
***************
*** 17,33 ****
  #include <afs/param.h>
  #include <sys/wait.h>
  #include <limits.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <stdlib.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/pam/afs_util.c,v 1.12.14.1 2006/07/19 21:17:18 shadow Exp $");
  
  #include "afs_util.h"
  
--- 17,27 ----
  #include <afs/param.h>
  #include <sys/wait.h>
  #include <limits.h>
  #include <string.h>
  #include <stdlib.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/pam/afs_util.c,v 1.12.14.2 2007/10/30 15:16:42 shadow Exp $");
  
  #include "afs_util.h"
  
Index: openafs/src/ptserver/Makefile.in
diff -c openafs/src/ptserver/Makefile.in:1.16.6.1 openafs/src/ptserver/Makefile.in:1.16.6.2
*** openafs/src/ptserver/Makefile.in:1.16.6.1	Mon Jul  3 15:07:15 2006
--- openafs/src/ptserver/Makefile.in	Thu Nov  1 12:02:29 2007
***************
*** 75,103 ****
  ptint.xdr.o: ptint.xdr.c ptint.h ptint.xg
  
  ptint.cs.c: ptint.xg
! 	${RXGEN} -x -C -u -o $@ ${srcdir}/ptint.xg
  
  ptint.ss.c: ptint.xg
! 	${RXGEN} -x -S -o $@ ${srcdir}/ptint.xg
  
  ptint.xdr.c: ptint.xg
! 	${RXGEN} -x -c -o $@ ${srcdir}/ptint.xg
  
  ptint.h: ptint.xg
! 	${RXGEN} -x -h -u -o $@ ${srcdir}/ptint.xg
  
  ptint.cs.c: ptint.h
  ptint.ss.c: ptint.h
  ptint.xdr.c: ptint.h
  
  Kptint.cs.c: ptint.xg Kptint.h
! 	${RXGEN} -x -k -C -o Kptint.cs.c ${srcdir}/ptint.xg
   
  Kptint.xdr.c: ptint.xg
! 	${RXGEN} -x -k -c -o Kptint.xdr.c ${srcdir}/ptint.xg
   
  Kptint.h: ptint.xg
! 	${RXGEN} -x -k -h -o Kptint.h ${srcdir}/ptint.xg
  
  display.o: display.c ${INCLS}
  
--- 75,103 ----
  ptint.xdr.o: ptint.xdr.c ptint.h ptint.xg
  
  ptint.cs.c: ptint.xg
! 	${RXGEN} -x -C -A -u -o $@ ${srcdir}/ptint.xg
  
  ptint.ss.c: ptint.xg
! 	${RXGEN} -x -S -A -o $@ ${srcdir}/ptint.xg
  
  ptint.xdr.c: ptint.xg
! 	${RXGEN} -x -c -A -o $@ ${srcdir}/ptint.xg
  
  ptint.h: ptint.xg
! 	${RXGEN} -x -h -A -u -o $@ ${srcdir}/ptint.xg
  
  ptint.cs.c: ptint.h
  ptint.ss.c: ptint.h
  ptint.xdr.c: ptint.h
  
  Kptint.cs.c: ptint.xg Kptint.h
! 	${RXGEN} -x -k -A -C -o Kptint.cs.c ${srcdir}/ptint.xg
   
  Kptint.xdr.c: ptint.xg
! 	${RXGEN} -x -k -A -c -o Kptint.xdr.c ${srcdir}/ptint.xg
   
  Kptint.h: ptint.xg
! 	${RXGEN} -x -k -A -h -o Kptint.h ${srcdir}/ptint.xg
  
  display.o: display.c ${INCLS}
  
Index: openafs/src/ptserver/db_verify.c
diff -c openafs/src/ptserver/db_verify.c:1.16.14.3 openafs/src/ptserver/db_verify.c:1.16.14.5
*** openafs/src/ptserver/db_verify.c:1.16.14.3	Sat Aug 11 19:41:37 2007
--- openafs/src/ptserver/db_verify.c	Wed Oct 31 00:09:32 2007
***************
*** 12,18 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/db_verify.c,v 1.16.14.3 2007/08/11 23:41:37 jaltman Exp $");
  
  /*
   *                      (3) Define a structure, idused, instead of an
--- 12,18 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/db_verify.c,v 1.16.14.5 2007/10/31 04:09:32 shadow Exp $");
  
  /*
   *                      (3) Define a structure, idused, instead of an
***************
*** 44,56 ****
  #include <sys/file.h>
  #endif
  #include <stdio.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <errno.h>
  #include <fcntl.h>
  #include <afs/cellconfig.h>
--- 44,50 ----
***************
*** 1433,1439 ****
  #include "AFS_component_version_number.c"
  
  int
! WorkerBee(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      char *recreateFile;
--- 1427,1433 ----
  #include "AFS_component_version_number.c"
  
  int
! WorkerBee(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      char *recreateFile;
Index: openafs/src/ptserver/display.c
diff -c openafs/src/ptserver/display.c:1.9 openafs/src/ptserver/display.c:1.9.14.1
*** openafs/src/ptserver/display.c:1.9	Wed Jun 23 10:27:41 2004
--- openafs/src/ptserver/display.c	Tue Oct 30 11:16:43 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/display.c,v 1.9 2004/06/23 14:27:41 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/display.c,v 1.9.14.1 2007/10/30 15:16:43 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 20,32 ****
  #else
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <stdio.h>
  #include "ptserver.h"
  
--- 20,26 ----
Index: openafs/src/ptserver/pt_util.c
diff -c openafs/src/ptserver/pt_util.c:1.11.4.1 openafs/src/ptserver/pt_util.c:1.11.4.2
*** openafs/src/ptserver/pt_util.c:1.11.4.1	Tue Apr 10 14:39:54 2007
--- openafs/src/ptserver/pt_util.c	Wed Oct 31 00:09:32 2007
***************
*** 1,4 ****
! /* $Id: pt_util.c,v 1.11.4.1 2007/04/10 18:39:54 shadow Exp $ */
  
  /*
   *
--- 1,4 ----
! /* $Id: pt_util.c,v 1.11.4.2 2007/10/31 04:09:32 shadow Exp $ */
  
  /*
   *
***************
*** 23,29 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/pt_util.c,v 1.11.4.1 2007/04/10 18:39:54 shadow Exp $");
  
  #include <afs/cmd.h>		/*Command line parsing */
  #include <errno.h>
--- 23,29 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/pt_util.c,v 1.11.4.2 2007/10/31 04:09:32 shadow Exp $");
  
  #include <afs/cmd.h>		/*Command line parsing */
  #include <errno.h>
***************
*** 53,59 ****
  char *checkin();
  char *check_core();
  char *id_to_name();
! int CommandProc(struct cmd_syndesc *);
  
  struct hash_entry {
      char h_name[PR_MAXNAMELEN];
--- 53,59 ----
  char *checkin();
  char *check_core();
  char *id_to_name();
! int CommandProc(struct cmd_syndesc *, void *);
  
  struct hash_entry {
      char h_name[PR_MAXNAMELEN];
***************
*** 105,111 ****
      register struct cmd_syndesc *cs;	/*Command line syntax descriptor */
      register afs_int32 code;	/*Return code */
  
!     cs = cmd_CreateSyntax((char *)0, CommandProc, 0,
  			  "access protection database");
      cmd_AddParm(cs, "-w", CMD_FLAG, CMD_OPTIONAL,
  		"update prdb with contents of data file");
--- 105,111 ----
      register struct cmd_syndesc *cs;	/*Command line syntax descriptor */
      register afs_int32 code;	/*Return code */
  
!     cs = cmd_CreateSyntax(NULL, CommandProc, NULL,
  			  "access protection database");
      cmd_AddParm(cs, "-w", CMD_FLAG, CMD_OPTIONAL,
  		"update prdb with contents of data file");
***************
*** 128,134 ****
  }
  
  int
! CommandProc(register struct cmd_syndesc *a_as)
  {
      register int i;
      register long code;
--- 128,134 ----
  }
  
  int
! CommandProc(register struct cmd_syndesc *a_as, void *arock)
  {
      register int i;
      register long code;
Index: openafs/src/ptserver/ptprocs.c
diff -c openafs/src/ptserver/ptprocs.c:1.29.2.2 openafs/src/ptserver/ptprocs.c:1.29.2.3
*** openafs/src/ptserver/ptprocs.c:1.29.2.2	Tue Feb  6 23:53:18 2007
--- openafs/src/ptserver/ptprocs.c	Tue Oct 30 11:16:43 2007
***************
*** 51,57 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptprocs.c,v 1.29.2.2 2007/02/07 04:53:18 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <ctype.h>
--- 51,57 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptprocs.c,v 1.29.2.3 2007/10/30 15:16:43 shadow Exp $");
  
  #include <afs/stds.h>
  #include <ctype.h>
***************
*** 69,81 ****
  #include <netinet/in.h>
  #include <arpa/inet.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include "ptserver.h"
  #include "pterror.h"
  #include "ptprototypes.h"
--- 69,75 ----
Index: openafs/src/ptserver/pts.c
diff -c openafs/src/ptserver/pts.c:1.15.2.2 openafs/src/ptserver/pts.c:1.15.2.3
*** openafs/src/ptserver/pts.c:1.15.2.2	Sat Aug 11 19:41:37 2007
--- openafs/src/ptserver/pts.c	Wed Oct 31 00:09:32 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/pts.c,v 1.15.2.2 2007/08/11 23:41:37 jaltman Exp $");
  
  #include <stdio.h>
  #include <string.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/pts.c,v 1.15.2.3 2007/10/31 04:09:32 shadow Exp $");
  
  #include <stdio.h>
  #include <string.h>
***************
*** 51,71 ****
  } *shead;
  
  int
! pts_Interactive(struct cmd_syndesc *as, char *arock)
  {
      finished = 0;
      return 0;
  }
  
  int
! pts_Quit(struct cmd_syndesc *as, char *arock)
  {
      finished = 1;
      return 0;
  }
  
  int
! pts_Source(struct cmd_syndesc *as, char *arock)
  {
      FILE *fd;
      struct sourcestack *sp;
--- 51,71 ----
  } *shead;
  
  int
! pts_Interactive(struct cmd_syndesc *as, void *arock)
  {
      finished = 0;
      return 0;
  }
  
  int
! pts_Quit(struct cmd_syndesc *as, void *arock)
  {
      finished = 1;
      return 0;
  }
  
  int
! pts_Source(struct cmd_syndesc *as, void *arock)
  {
      FILE *fd;
      struct sourcestack *sp;
***************
*** 93,99 ****
  }
  
  int
! pts_Sleep(struct cmd_syndesc *as, char *arock)
  {
      int delay;
      if (!as->parms[0].items) {
--- 93,99 ----
  }
  
  int
! pts_Sleep(struct cmd_syndesc *as, void *arock)
  {
      int delay;
      if (!as->parms[0].items) {
***************
*** 130,136 ****
  }
  
  int
! GetGlobals(struct cmd_syndesc *as, char *arock)
  {
      register afs_int32 code;
      char *cell;
--- 130,136 ----
  }
  
  int
! GetGlobals(struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      char *cell;
***************
*** 162,168 ****
  }
  
  int
! CleanUp(struct cmd_syndesc *as, char *arock)
  {
      if (as && !strcmp(as->name, "help"))
  	return 0;
--- 162,168 ----
  }
  
  int
! CleanUp(struct cmd_syndesc *as, void *arock)
  {
      if (as && !strcmp(as->name, "help"))
  	return 0;
***************
*** 175,181 ****
  }
  
  int
! CreateGroup(struct cmd_syndesc *as, char *arock)
  {
      register afs_int32 code;
      afs_int32 id;
--- 175,181 ----
  }
  
  int
! CreateGroup(struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      afs_int32 id;
***************
*** 235,241 ****
  }
  
  int
! CreateUser(struct cmd_syndesc *as, char *arock)
  {
      register afs_int32 code;
      afs_int32 id;
--- 235,241 ----
  }
  
  int
! CreateUser(struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      afs_int32 id;
***************
*** 460,466 ****
  
  
  int
! AddToGroup(struct cmd_syndesc *as, char *arock)
  {
      register afs_int32 code;
      struct cmd_item *u, *g;
--- 460,466 ----
  
  
  int
! AddToGroup(struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      struct cmd_item *u, *g;
***************
*** 481,487 ****
  }
  
  int
! RemoveFromGroup(struct cmd_syndesc *as, char *arock)
  {
      register afs_int32 code;
      struct cmd_item *u, *g;
--- 481,487 ----
  }
  
  int
! RemoveFromGroup(struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      struct cmd_item *u, *g;
***************
*** 502,508 ****
  }
  
  int
! ListMembership(struct cmd_syndesc *as, char *arock)
  {
      register afs_int32 code;
      idlist ids;
--- 502,508 ----
  }
  
  int
! ListMembership(struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      idlist ids;
***************
*** 547,553 ****
  }
  
  int
! Delete(struct cmd_syndesc *as, char *arock)
  {
      register afs_int32 code;
      idlist ids;
--- 547,553 ----
  }
  
  int
! Delete(struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      idlist ids;
***************
*** 586,592 ****
  int flags_shift[5] = { 2, 1, 2, 2, 1 };	/* bits for each */
  
  int
! CheckEntry(struct cmd_syndesc *as, char *arock)
  {
      register afs_int32 code;
      afs_int32 rcode = 1;
--- 586,592 ----
  int flags_shift[5] = { 2, 1, 2, 2, 1 };	/* bits for each */
  
  int
! CheckEntry(struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      afs_int32 rcode = 1;
***************
*** 685,691 ****
  }
  
  int
! ListEntries(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code = 0;
      afs_int32 flag, startindex, nentries, nextstartindex;
--- 685,691 ----
  }
  
  int
! ListEntries(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code = 0;
      afs_int32 flag, startindex, nentries, nextstartindex;
***************
*** 722,728 ****
  }
  
  int
! ChownGroup(struct cmd_syndesc *as, char *arock)
  {
      register afs_int32 code;
      char *name;
--- 722,728 ----
  }
  
  int
! ChownGroup(struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      char *name;
***************
*** 738,744 ****
  }
  
  int
! ChangeName(struct cmd_syndesc *as, char *arock)
  {
      register afs_int32 code;
      char *oldname;
--- 738,744 ----
  }
  
  int
! ChangeName(struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      char *oldname;
***************
*** 754,760 ****
  }
  
  int
! ListMax(struct cmd_syndesc *as, char *arock)
  {
      register afs_int32 code;
      afs_int32 maxUser, maxGroup;
--- 754,760 ----
  }
  
  int
! ListMax(struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      afs_int32 maxUser, maxGroup;
***************
*** 775,781 ****
  }
  
  int
! SetMax(struct cmd_syndesc *as, char *arock)
  {
      register afs_int32 code;
      afs_int32 maxid;
--- 775,781 ----
  }
  
  int
! SetMax(struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      afs_int32 maxid;
***************
*** 815,821 ****
  }
  
  int
! SetFields(struct cmd_syndesc *as, char *arock)
  {
      register afs_int32 code;
      idlist ids;
--- 815,821 ----
  }
  
  int
! SetFields(struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      idlist ids;
***************
*** 910,916 ****
  }
  
  int
! ListOwned(struct cmd_syndesc *as, char *arock)
  {
      register afs_int32 code;
      idlist ids;
--- 910,916 ----
  }
  
  int
! ListOwned(struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      idlist ids;
***************
*** 1020,1026 ****
      sigaction(SIGSEGV, &nsa, NULL);
  #endif
  
!     ts = cmd_CreateSyntax("creategroup", CreateGroup, 0,
  			  "create a new group");
      cmd_AddParm(ts, "-name", CMD_LIST, 0, "group name");
      cmd_AddParm(ts, "-owner", CMD_SINGLE, CMD_OPTIONAL, "owner of the group");
--- 1020,1026 ----
      sigaction(SIGSEGV, &nsa, NULL);
  #endif
  
!     ts = cmd_CreateSyntax("creategroup", CreateGroup, NULL,
  			  "create a new group");
      cmd_AddParm(ts, "-name", CMD_LIST, 0, "group name");
      cmd_AddParm(ts, "-owner", CMD_SINGLE, CMD_OPTIONAL, "owner of the group");
***************
*** 1029,1088 ****
      add_std_args(ts);
      cmd_CreateAlias(ts, "cg");
  
!     ts = cmd_CreateSyntax("createuser", CreateUser, 0, "create a new user");
      cmd_AddParm(ts, "-name", CMD_LIST, 0, "user name");
      cmd_AddParm(ts, "-id", CMD_LIST, CMD_OPTIONAL, "user id");
      add_std_args(ts);
      cmd_CreateAlias(ts, "cu");
  
!     ts = cmd_CreateSyntax("adduser", AddToGroup, 0, "add a user to a group");
      cmd_AddParm(ts, "-user", CMD_LIST, 0, "user name");
      cmd_AddParm(ts, "-group", CMD_LIST, 0, "group name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("removeuser", RemoveFromGroup, 0,
  			  "remove a user from a group");
      cmd_AddParm(ts, "-user", CMD_LIST, 0, "user name");
      cmd_AddParm(ts, "-group", CMD_LIST, 0, "group name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("membership", ListMembership, 0,
  			  "list membership of a user or group");
      cmd_AddParm(ts, "-nameorid", CMD_LIST, 0, "user or group name or id");
      add_std_args(ts);
      cmd_CreateAlias(ts, "groups");
  
!     ts = cmd_CreateSyntax("delete", Delete, 0,
  			  "delete a user or group from database");
      cmd_AddParm(ts, "-nameorid", CMD_LIST, 0, "user or group name or id");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("examine", CheckEntry, 0, "examine an entry");
      cmd_AddParm(ts, "-nameorid", CMD_LIST, 0, "user or group name or id");
      add_std_args(ts);
      cmd_CreateAlias(ts, "check");
  
!     ts = cmd_CreateSyntax("chown", ChownGroup, 0,
  			  "change ownership of a group");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "group name");
      cmd_AddParm(ts, "-owner", CMD_SINGLE, 0, "new owner");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("rename", ChangeName, 0, "rename user or group");
      cmd_AddParm(ts, "-oldname", CMD_SINGLE, 0, "old name");
      cmd_AddParm(ts, "-newname", CMD_SINGLE, 0, "new name");
      add_std_args(ts);
      cmd_CreateAlias(ts, "chname");
  
!     ts = cmd_CreateSyntax("listmax", ListMax, 0, "list max id");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("setmax", SetMax, 0, "set max id");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_OPTIONAL, "group max");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_OPTIONAL, "user max");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("setfields", SetFields, 0,
  			  "set fields for an entry");
      cmd_AddParm(ts, "-nameorid", CMD_LIST, 0, "user or group name or id");
      cmd_AddParm(ts, "-access", CMD_SINGLE, CMD_OPTIONAL, "set privacy flags");
--- 1029,1088 ----
      add_std_args(ts);
      cmd_CreateAlias(ts, "cg");
  
!     ts = cmd_CreateSyntax("createuser", CreateUser, NULL, "create a new user");
      cmd_AddParm(ts, "-name", CMD_LIST, 0, "user name");
      cmd_AddParm(ts, "-id", CMD_LIST, CMD_OPTIONAL, "user id");
      add_std_args(ts);
      cmd_CreateAlias(ts, "cu");
  
!     ts = cmd_CreateSyntax("adduser", AddToGroup, NULL, "add a user to a group");
      cmd_AddParm(ts, "-user", CMD_LIST, 0, "user name");
      cmd_AddParm(ts, "-group", CMD_LIST, 0, "group name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("removeuser", RemoveFromGroup, NULL,
  			  "remove a user from a group");
      cmd_AddParm(ts, "-user", CMD_LIST, 0, "user name");
      cmd_AddParm(ts, "-group", CMD_LIST, 0, "group name");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("membership", ListMembership, NULL,
  			  "list membership of a user or group");
      cmd_AddParm(ts, "-nameorid", CMD_LIST, 0, "user or group name or id");
      add_std_args(ts);
      cmd_CreateAlias(ts, "groups");
  
!     ts = cmd_CreateSyntax("delete", Delete, NULL,
  			  "delete a user or group from database");
      cmd_AddParm(ts, "-nameorid", CMD_LIST, 0, "user or group name or id");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("examine", CheckEntry, NULL, "examine an entry");
      cmd_AddParm(ts, "-nameorid", CMD_LIST, 0, "user or group name or id");
      add_std_args(ts);
      cmd_CreateAlias(ts, "check");
  
!     ts = cmd_CreateSyntax("chown", ChownGroup, NULL,
  			  "change ownership of a group");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "group name");
      cmd_AddParm(ts, "-owner", CMD_SINGLE, 0, "new owner");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("rename", ChangeName, NULL, "rename user or group");
      cmd_AddParm(ts, "-oldname", CMD_SINGLE, 0, "old name");
      cmd_AddParm(ts, "-newname", CMD_SINGLE, 0, "new name");
      add_std_args(ts);
      cmd_CreateAlias(ts, "chname");
  
!     ts = cmd_CreateSyntax("listmax", ListMax, NULL, "list max id");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("setmax", SetMax, NULL, "set max id");
      cmd_AddParm(ts, "-group", CMD_SINGLE, CMD_OPTIONAL, "group max");
      cmd_AddParm(ts, "-user", CMD_SINGLE, CMD_OPTIONAL, "user max");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("setfields", SetFields, NULL,
  			  "set fields for an entry");
      cmd_AddParm(ts, "-nameorid", CMD_LIST, 0, "user or group name or id");
      cmd_AddParm(ts, "-access", CMD_SINGLE, CMD_OPTIONAL, "set privacy flags");
***************
*** 1094,1123 ****
  #endif
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("listowned", ListOwned, 0,
  			  "list groups owned by an entry or zero id gets orphaned groups");
      cmd_AddParm(ts, "-nameorid", CMD_LIST, 0, "user or group name or id");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("listentries", ListEntries, 0,
  			  "list users/groups in the protection database");
      cmd_AddParm(ts, "-users", CMD_FLAG, CMD_OPTIONAL, "list user entries");
      cmd_AddParm(ts, "-groups", CMD_FLAG, CMD_OPTIONAL, "list group entries");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("interactive", pts_Interactive, 0,
  			  "enter interactive mode");
      add_std_args(ts);
      cmd_CreateAlias(ts, "in");
  
!     ts = cmd_CreateSyntax("quit", pts_Quit, 0, "exit program");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("source", pts_Source, 0, "read commands from file");
      cmd_AddParm(ts, "-file", CMD_SINGLE, 0, "filename");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("sleep", pts_Sleep, 0, "pause for a bit");
      cmd_AddParm(ts, "-delay", CMD_SINGLE, 0, "seconds");
      add_std_args(ts);
  
--- 1094,1123 ----
  #endif
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("listowned", ListOwned, NULL,
  			  "list groups owned by an entry or zero id gets orphaned groups");
      cmd_AddParm(ts, "-nameorid", CMD_LIST, 0, "user or group name or id");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("listentries", ListEntries, NULL,
  			  "list users/groups in the protection database");
      cmd_AddParm(ts, "-users", CMD_FLAG, CMD_OPTIONAL, "list user entries");
      cmd_AddParm(ts, "-groups", CMD_FLAG, CMD_OPTIONAL, "list group entries");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("interactive", pts_Interactive, NULL,
  			  "enter interactive mode");
      add_std_args(ts);
      cmd_CreateAlias(ts, "in");
  
!     ts = cmd_CreateSyntax("quit", pts_Quit, NULL, "exit program");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("source", pts_Source, NULL, "read commands from file");
      cmd_AddParm(ts, "-file", CMD_SINGLE, 0, "filename");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("sleep", pts_Sleep, NULL, "pause for a bit");
      cmd_AddParm(ts, "-delay", CMD_SINGLE, 0, "seconds");
      add_std_args(ts);
  
Index: openafs/src/ptserver/ptserver.c
diff -c openafs/src/ptserver/ptserver.c:1.25.2.4 openafs/src/ptserver/ptserver.c:1.25.2.5
*** openafs/src/ptserver/ptserver.c:1.25.2.4	Tue Apr 10 14:39:54 2007
--- openafs/src/ptserver/ptserver.c	Tue Oct 30 11:16:43 2007
***************
*** 112,118 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptserver.c,v 1.25.2.4 2007/04/10 18:39:54 shadow Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
--- 112,118 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptserver.c,v 1.25.2.5 2007/10/30 15:16:43 shadow Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
***************
*** 129,141 ****
  #include <netdb.h>
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <rx/xdr.h>
  #include <rx/rx.h>
  #include <rx/rx_globals.h>
--- 129,135 ----
Index: openafs/src/ptserver/ptuser.c
diff -c openafs/src/ptserver/ptuser.c:1.25.2.10 openafs/src/ptserver/ptuser.c:1.25.2.11
*** openafs/src/ptserver/ptuser.c:1.25.2.10	Tue Apr 10 14:39:54 2007
--- openafs/src/ptserver/ptuser.c	Tue Oct 30 11:16:43 2007
***************
*** 15,21 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptuser.c,v 1.25.2.10 2007/04/10 18:39:54 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
--- 15,21 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptuser.c,v 1.25.2.11 2007/10/30 15:16:43 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
***************
*** 40,52 ****
  #include <netinet/in.h>
  #endif
  #include <stdio.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <rx/rx.h>
  #include <rx/xdr.h>
  #include <afs/auth.h>
--- 40,46 ----
Index: openafs/src/ptserver/ptutils.c
diff -c openafs/src/ptserver/ptutils.c:1.19.6.3 openafs/src/ptserver/ptutils.c:1.19.6.4
*** openafs/src/ptserver/ptutils.c:1.19.6.3	Sat Aug 11 19:41:37 2007
--- openafs/src/ptserver/ptutils.c	Tue Oct 30 11:16:43 2007
***************
*** 24,30 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptutils.c,v 1.19.6.3 2007/08/11 23:41:37 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 24,30 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptutils.c,v 1.19.6.4 2007/10/30 15:16:43 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 34,46 ****
  #else
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <lock.h>
  #include <ubik.h>
  #include <rx/xdr.h>
--- 34,40 ----
Index: openafs/src/ptserver/readgroup.c
diff -c openafs/src/ptserver/readgroup.c:1.10.14.1 openafs/src/ptserver/readgroup.c:1.10.14.2
*** openafs/src/ptserver/readgroup.c:1.10.14.1	Tue Apr 10 14:39:54 2007
--- openafs/src/ptserver/readgroup.c	Tue Oct 30 11:16:43 2007
***************
*** 11,30 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/readgroup.c,v 1.10.14.1 2007/04/10 18:39:54 shadow Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
  #include <WINNT/afsevent.h>
  #endif
  #include <ctype.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <rx/rx.h>
  #include <rx/xdr.h>
  #include <afs/cellconfig.h>
--- 11,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/readgroup.c,v 1.10.14.2 2007/10/30 15:16:43 shadow Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
  #include <WINNT/afsevent.h>
  #endif
  #include <ctype.h>
  #include <string.h>
  #include <rx/rx.h>
  #include <rx/xdr.h>
  #include <afs/cellconfig.h>
Index: openafs/src/ptserver/readpwd.c
diff -c openafs/src/ptserver/readpwd.c:1.9.14.1 openafs/src/ptserver/readpwd.c:1.9.14.2
*** openafs/src/ptserver/readpwd.c:1.9.14.1	Tue Apr 10 14:39:54 2007
--- openafs/src/ptserver/readpwd.c	Tue Oct 30 11:16:43 2007
***************
*** 11,29 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/readpwd.c,v 1.9.14.1 2007/04/10 18:39:54 shadow Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
  #include <WINNT/afsevent.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <rx/rx.h>
  #include <rx/xdr.h>
  #include <afs/cellconfig.h>
--- 11,23 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/readpwd.c,v 1.9.14.2 2007/10/30 15:16:43 shadow Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
  #include <WINNT/afsevent.h>
  #endif
  #include <string.h>
  #include <rx/rx.h>
  #include <rx/xdr.h>
  #include <afs/cellconfig.h>
Index: openafs/src/ptserver/testpt.c
diff -c openafs/src/ptserver/testpt.c:1.14.14.2 openafs/src/ptserver/testpt.c:1.14.14.4
*** openafs/src/ptserver/testpt.c:1.14.14.2	Sat Aug 11 19:41:37 2007
--- openafs/src/ptserver/testpt.c	Wed Oct 31 00:09:32 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/testpt.c,v 1.14.14.2 2007/08/11 23:41:37 jaltman Exp $");
  
  #include <ctype.h>
  #include <errno.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/testpt.c,v 1.14.14.4 2007/10/31 04:09:32 shadow Exp $");
  
  #include <ctype.h>
  #include <errno.h>
***************
*** 24,36 ****
  #include <netdb.h>
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef HAVE_FCNTL_H
  #include <fcntl.h>
  #endif
--- 24,30 ----
***************
*** 57,63 ****
  static char lcell[MAXCELLCHARS];
  
  int
! ListUsedIds(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      namelist lnames;
--- 51,57 ----
  static char lcell[MAXCELLCHARS];
  
  int
! ListUsedIds(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      namelist lnames;
***************
*** 410,416 ****
  }
  
  int
! TestManyMembers(struct cmd_syndesc *as, char *arock)
  {
      char *filled;		/* users filled up */
      char *cleaned;		/* users cleaned up */
--- 404,410 ----
  }
  
  int
! TestManyMembers(struct cmd_syndesc *as, void *arock)
  {
      char *filled;		/* users filled up */
      char *cleaned;		/* users cleaned up */
***************
*** 767,773 ****
   */
  
  int
! TestPrServ(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 id;
      char name[PR_MAXNAMELEN + 1];
--- 761,767 ----
   */
  
  int
! TestPrServ(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 id;
      char name[PR_MAXNAMELEN + 1];
***************
*** 913,919 ****
  static char tmp_noauth_file[128] = "";
  
  static int
! MyAfterProc(struct cmd_syndesc *as, char *arock)
  {
      if (strlen(tmp_conf_file))
  	unlink(tmp_conf_file);
--- 907,913 ----
  static char tmp_noauth_file[128] = "";
  
  static int
! MyAfterProc(struct cmd_syndesc *as, void *arock)
  {
      if (strlen(tmp_conf_file))
  	unlink(tmp_conf_file);
***************
*** 927,933 ****
  }
  
  static int
! MyBeforeProc(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      int i;
--- 921,927 ----
  }
  
  static int
! MyBeforeProc(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      int i;
***************
*** 1109,1115 ****
      cmd_SetBeforeProc(MyBeforeProc, NULL);
      cmd_SetAfterProc(MyAfterProc, NULL);
  
!     ts = cmd_CreateSyntax("usedIds", ListUsedIds, 0,
  			  "Find used (or unused) user (or group) ids");
      cmd_AddParm(ts, "-startId", CMD_SINGLE, CMD_OPTIONAL,
  		"id to start checking");
--- 1103,1109 ----
      cmd_SetBeforeProc(MyBeforeProc, NULL);
      cmd_SetAfterProc(MyAfterProc, NULL);
  
!     ts = cmd_CreateSyntax("usedIds", ListUsedIds, NULL,
  			  "Find used (or unused) user (or group) ids");
      cmd_AddParm(ts, "-startId", CMD_SINGLE, CMD_OPTIONAL,
  		"id to start checking");
***************
*** 1118,1127 ****
      cmd_AddParm(ts, "-unused", CMD_FLAG, CMD_OPTIONAL, "print unused ids");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("initcmd", TestPrServ, 0, "test the prserver");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("testmanymembers", TestManyMembers, 0,
  			  "test creating users and groups w/ many members");
      cmd_AddParm(ts, "-number", CMD_SINGLE, 0,
  		"number of users/groups to create");
--- 1112,1121 ----
      cmd_AddParm(ts, "-unused", CMD_FLAG, CMD_OPTIONAL, "print unused ids");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("initcmd", TestPrServ, NULL, "test the prserver");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("testmanymembers", TestManyMembers, NULL,
  			  "test creating users and groups w/ many members");
      cmd_AddParm(ts, "-number", CMD_SINGLE, 0,
  		"number of users/groups to create");
Index: openafs/src/ptserver/ubik.c
diff -c openafs/src/ptserver/ubik.c:1.8 openafs/src/ptserver/ubik.c:1.8.2.1
*** openafs/src/ptserver/ubik.c:1.8	Thu Mar  9 01:34:47 2006
--- openafs/src/ptserver/ubik.c	Tue Oct 30 11:16:43 2007
***************
*** 1,21 ****
! /* $Id: ubik.c,v 1.8 2006/03/09 06:34:47 shadow Exp $ */
  
  #include <afsconfig.h>
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ubik.c,v 1.8 2006/03/09 06:34:47 shadow Exp $");
  
  #include <sys/types.h>
  #include <netinet/in.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include <lock.h>
  #define UBIK_INTERNALS
--- 1,14 ----
! /* $Id: ubik.c,v 1.8.2.1 2007/10/30 15:16:43 shadow Exp $ */
  
  #include <afsconfig.h>
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ubik.c,v 1.8.2.1 2007/10/30 15:16:43 shadow Exp $");
  
  #include <sys/types.h>
  #include <netinet/in.h>
  #include <string.h>
  
  #include <lock.h>
  #define UBIK_INTERNALS
Index: openafs/src/ptserver/utils.c
diff -c openafs/src/ptserver/utils.c:1.15 openafs/src/ptserver/utils.c:1.15.14.1
*** openafs/src/ptserver/utils.c:1.15	Wed Jun 23 10:27:42 2004
--- openafs/src/ptserver/utils.c	Tue Oct 30 11:16:43 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/utils.c,v 1.15 2004/06/23 14:27:42 shadow Exp $");
  
  #include <sys/types.h>
  #include <lock.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/utils.c,v 1.15.14.1 2007/10/30 15:16:43 shadow Exp $");
  
  #include <sys/types.h>
  #include <lock.h>
***************
*** 23,35 ****
  #include <netinet/in.h>
  #include <netdb.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include "ptserver.h"
  #include "pterror.h"
  
--- 23,29 ----
Index: openafs/src/rx/rx.c
diff -c openafs/src/rx/rx.c:1.97.2.10 openafs/src/rx/rx.c:1.97.2.11
*** openafs/src/rx/rx.c:1.97.2.10	Wed May 16 16:45:25 2007
--- openafs/src/rx/rx.c	Tue Oct 30 11:16:44 2007
***************
*** 17,23 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx.c,v 1.97.2.10 2007/05/16 20:45:25 shadow Exp $");
  
  #ifdef KERNEL
  #include "afs/sysincludes.h"
--- 17,23 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx.c,v 1.97.2.11 2007/10/30 15:16:44 shadow Exp $");
  
  #ifdef KERNEL
  #include "afs/sysincludes.h"
***************
*** 79,84 ****
--- 79,85 ----
  # include "rxgen_consts.h"
  #else /* KERNEL */
  # include <sys/types.h>
+ # include <string.h>
  # include <errno.h>
  #ifdef AFS_NT40_ENV
  # include <stdlib.h>
***************
*** 93,105 ****
  # include <netinet/in.h>
  # include <sys/time.h>
  #endif
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  # include "rx.h"
  # include "rx_user.h"
  # include "rx_clock.h"
--- 94,99 ----
Index: openafs/src/rx/rx_misc.c
diff -c openafs/src/rx/rx_misc.c:1.13 openafs/src/rx/rx_misc.c:1.13.8.1
*** openafs/src/rx/rx_misc.c:1.13	Wed Aug 18 20:41:54 2004
--- openafs/src/rx/rx_misc.c	Tue Oct 30 11:16:45 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_misc.c,v 1.13 2004/08/19 00:41:54 kolya Exp $");
  
  #ifdef	KERNEL
  #include <afs/sysincludes.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_misc.c,v 1.13.8.1 2007/10/30 15:16:45 shadow Exp $");
  
  #ifdef	KERNEL
  #include <afs/sysincludes.h>
***************
*** 30,42 ****
  #include "rx.h"
  #endif /* AFS_PTHREAD_ENV */
  #include <stdlib.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
--- 30,36 ----
Index: openafs/src/rx/rx_packet.c
diff -c openafs/src/rx/rx_packet.c:1.62.2.9 openafs/src/rx/rx_packet.c:1.62.2.10
*** openafs/src/rx/rx_packet.c:1.62.2.9	Sat Jun 23 02:23:12 2007
--- openafs/src/rx/rx_packet.c	Tue Oct 30 11:16:45 2007
***************
*** 15,21 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_packet.c,v 1.62.2.9 2007/06/23 06:23:12 shadow Exp $");
  
  #ifdef KERNEL
  #if defined(UKERNEL)
--- 15,21 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_packet.c,v 1.62.2.10 2007/10/30 15:16:45 shadow Exp $");
  
  #ifdef KERNEL
  #if defined(UKERNEL)
***************
*** 88,100 ****
  #include "rx_globals.h"
  #include <lwp.h>
  #include <assert.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
--- 88,94 ----
Index: openafs/src/rx/rx_pthread.c
diff -c openafs/src/rx/rx_pthread.c:1.24.4.1 openafs/src/rx/rx_pthread.c:1.24.4.2
*** openafs/src/rx/rx_pthread.c:1.24.4.1	Sun Jul  2 21:06:45 2006
--- openafs/src/rx/rx_pthread.c	Tue Oct 30 11:16:45 2007
***************
*** 19,29 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_pthread.c,v 1.24.4.1 2006/07/03 01:06:45 jaltman Exp $");
  
  #include <sys/types.h>
  #include <errno.h>
  #include <signal.h>
  #ifndef AFS_NT40_ENV
  # include <sys/socket.h>
  # include <sys/file.h>
--- 19,30 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_pthread.c,v 1.24.4.2 2007/10/30 15:16:45 shadow Exp $");
  
  #include <sys/types.h>
  #include <errno.h>
  #include <signal.h>
+ #include <string.h>
  #ifndef AFS_NT40_ENV
  # include <sys/socket.h>
  # include <sys/file.h>
Index: openafs/src/rx/rx_rdwr.c
diff -c openafs/src/rx/rx_rdwr.c:1.29.2.1 openafs/src/rx/rx_rdwr.c:1.29.2.2
*** openafs/src/rx/rx_rdwr.c:1.29.2.1	Thu Jun  1 11:50:21 2006
--- openafs/src/rx/rx_rdwr.c	Tue Oct 30 11:16:45 2007
***************
*** 15,21 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_rdwr.c,v 1.29.2.1 2006/06/01 15:50:21 shadow Exp $");
  
  #ifdef KERNEL
  #ifndef UKERNEL
--- 15,21 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_rdwr.c,v 1.29.2.2 2007/10/30 15:16:45 shadow Exp $");
  
  #ifdef KERNEL
  #ifndef UKERNEL
***************
*** 81,93 ****
  # include <sys/stat.h>
  # include <sys/time.h>
  #endif /* !AFS_NT40_ENV */
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
--- 81,87 ----
Index: openafs/src/rx/rx_trace.c
diff -c openafs/src/rx/rx_trace.c:1.11 openafs/src/rx/rx_trace.c:1.11.14.1
*** openafs/src/rx/rx_trace.c:1.11	Tue Jul 15 19:16:10 2003
--- openafs/src/rx/rx_trace.c	Tue Oct 30 11:16:45 2007
***************
*** 11,26 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_trace.c,v 1.11 2003/07/15 23:16:10 shadow Exp $");
  
  #ifdef RXDEBUG
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
  #include <io.h>
--- 11,20 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_trace.c,v 1.11.14.1 2007/10/30 15:16:45 shadow Exp $");
  
  #ifdef RXDEBUG
  #include <string.h>
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
  #include <io.h>
Index: openafs/src/rx/rx_user.c
diff -c openafs/src/rx/rx_user.c:1.24.4.1 openafs/src/rx/rx_user.c:1.24.4.2
*** openafs/src/rx/rx_user.c:1.24.4.1	Sat Dec 16 20:23:30 2006
--- openafs/src/rx/rx_user.c	Tue Oct 30 11:16:45 2007
***************
*** 13,23 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_user.c,v 1.24.4.1 2006/12/17 01:23:30 jaltman Exp $");
  
  # include <sys/types.h>
  # include <errno.h>
  # include <signal.h>
  #ifdef AFS_NT40_ENV
  # include <WINNT/syscfg.h>
  #else
--- 13,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_user.c,v 1.24.4.2 2007/10/30 15:16:45 shadow Exp $");
  
  # include <sys/types.h>
  # include <errno.h>
  # include <signal.h>
+ # include <string.h>
  #ifdef AFS_NT40_ENV
  # include <WINNT/syscfg.h>
  #else
***************
*** 36,48 ****
  #endif
  #include <afs/afs_args.h>
  #include <afs/afsutil.h>
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #ifndef	IPPORT_USERRESERVED
  /* If in.h doesn't define this, define it anyway.  Unfortunately, defining
--- 37,42 ----
Index: openafs/src/rx/xdr.c
diff -c openafs/src/rx/xdr.c:1.11 openafs/src/rx/xdr.c:1.11.4.1
*** openafs/src/rx/xdr.c:1.11	Thu Oct 13 11:12:17 2005
--- openafs/src/rx/xdr.c	Tue Oct 30 11:16:45 2007
***************
*** 32,41 ****
  #include "afs/param.h"
  #else
  #include <afs/param.h>
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/xdr.c,v 1.11 2005/10/13 15:12:17 shadow Exp $");
  
  /*
   * xdr.c, Generic XDR routines implementation.
--- 32,42 ----
  #include "afs/param.h"
  #else
  #include <afs/param.h>
+ #include <string.h>
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/xdr.c,v 1.11.4.1 2007/10/30 15:16:45 shadow Exp $");
  
  /*
   * xdr.c, Generic XDR routines implementation.
Index: openafs/src/rx/xdr_array.c
diff -c openafs/src/rx/xdr_array.c:1.12.4.1 openafs/src/rx/xdr_array.c:1.12.4.2
*** openafs/src/rx/xdr_array.c:1.12.4.1	Sun Aug 13 16:18:17 2006
--- openafs/src/rx/xdr_array.c	Tue Oct 30 11:16:45 2007
***************
*** 31,37 ****
  #include "rx.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/xdr_array.c,v 1.12.4.1 2006/08/13 20:18:17 shadow Exp $");
  
  #ifndef	NeXT
  
--- 31,37 ----
  #include "rx.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/xdr_array.c,v 1.12.4.2 2007/10/30 15:16:45 shadow Exp $");
  
  #ifndef	NeXT
  
***************
*** 58,63 ****
--- 58,64 ----
  #endif /* AFS_LINUX20_ENV */
  #else
  #include <stdio.h>
+ #include <string.h>
  #endif
  #include "xdr.h"
  
Index: openafs/src/rx/xdr_rec.c
diff -c openafs/src/rx/xdr_rec.c:1.8 openafs/src/rx/xdr_rec.c:1.8.4.1
*** openafs/src/rx/xdr_rec.c:1.8	Sun Nov  6 04:29:43 2005
--- openafs/src/rx/xdr_rec.c	Tue Oct 30 11:16:45 2007
***************
*** 47,53 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/xdr_rec.c,v 1.8 2005/11/06 09:29:43 jaltman Exp $");
  
  #include <stdio.h>
  #ifdef HAVE_STDLIB_H
--- 47,53 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/xdr_rec.c,v 1.8.4.1 2007/10/30 15:16:45 shadow Exp $");
  
  #include <stdio.h>
  #ifdef HAVE_STDLIB_H
***************
*** 59,71 ****
  #include <netinet/in.h>
  #endif
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  
  /*  * A record is composed of one or more record fragments.
--- 59,65 ----
Index: openafs/src/rx/xdr_refernce.c
diff -c openafs/src/rx/xdr_refernce.c:1.7 openafs/src/rx/xdr_refernce.c:1.7.4.1
*** openafs/src/rx/xdr_refernce.c:1.7	Thu Dec 15 00:55:10 2005
--- openafs/src/rx/xdr_refernce.c	Tue Oct 30 11:16:45 2007
***************
*** 31,37 ****
  #include "rx.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/xdr_refernce.c,v 1.7 2005/12/15 05:55:10 jaltman Exp $");
  
  #ifndef	NeXT
  
--- 31,37 ----
  #include "rx.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/xdr_refernce.c,v 1.7.4.1 2007/10/30 15:16:45 shadow Exp $");
  
  #ifndef	NeXT
  
***************
*** 46,51 ****
--- 46,52 ----
  
  #include "xdr.h"
  #include <stdio.h>
+ #include <string.h>
  #define LASTUNSIGNED	((u_int)0-1)
  
  /*
Index: openafs/src/rx/test/generator.c
diff -c openafs/src/rx/test/generator.c:1.8.14.1 openafs/src/rx/test/generator.c:1.8.14.2
*** openafs/src/rx/test/generator.c:1.8.14.1	Tue Apr 10 14:39:54 2007
--- openafs/src/rx/test/generator.c	Wed Oct 31 00:09:33 2007
***************
*** 53,59 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/test/generator.c,v 1.8.14.1 2007/04/10 18:39:54 shadow Exp $");
  
  #include <stdio.h>
  #include <string.h>
--- 53,59 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/test/generator.c,v 1.8.14.2 2007/10/31 04:09:33 shadow Exp $");
  
  #include <stdio.h>
  #include <string.h>
***************
*** 731,737 ****
      fprintf(itl_h, "}\n");
  
      fprintf(itl_h,
! 	    "\n\nstatic void DoRun(struct cmd_syndesc *as, char *arock) {\n");
  
      if (threadModel == PTHREADS) {
  	fprintf(itl_h, "\tpthread_t *tid;\n");
--- 731,737 ----
      fprintf(itl_h, "}\n");
  
      fprintf(itl_h,
! 	    "\n\nstatic void DoRun(struct cmd_syndesc *as, void *arock) {\n");
  
      if (threadModel == PTHREADS) {
  	fprintf(itl_h, "\tpthread_t *tid;\n");
***************
*** 802,808 ****
  
      fprintf(itl_h,
  	    "static void SetupRunCmd(void) {\n" "\tstruct cmd_syndesc *ts;\n"
! 	    "\tts = cmd_CreateSyntax(NULL,DoRun, 0, \"run the test client program\");\n"
  	    "\tcmd_AddParm(ts, \"-threadCount\", CMD_SINGLE, CMD_REQUIRED, \"number of threads to spawn\");\n"
  	    "\tcmd_AddParm(ts, \"-iterationCount\", CMD_SINGLE, CMD_REQUIRED, \"number of iterations to make over entire interface for each thread\");\n"
  	    "\tcmd_AddParm(ts, \"-secType\", CMD_SINGLE, CMD_REQUIRED, \"security level to use (1 -> unauthenticated, 2 -> authenticated)\");\n"
--- 802,808 ----
  
      fprintf(itl_h,
  	    "static void SetupRunCmd(void) {\n" "\tstruct cmd_syndesc *ts;\n"
! 	    "\tts = cmd_CreateSyntax(NULL,DoRun, NULL, \"run the test client program\");\n"
  	    "\tcmd_AddParm(ts, \"-threadCount\", CMD_SINGLE, CMD_REQUIRED, \"number of threads to spawn\");\n"
  	    "\tcmd_AddParm(ts, \"-iterationCount\", CMD_SINGLE, CMD_REQUIRED, \"number of iterations to make over entire interface for each thread\");\n"
  	    "\tcmd_AddParm(ts, \"-secType\", CMD_SINGLE, CMD_REQUIRED, \"security level to use (1 -> unauthenticated, 2 -> authenticated)\");\n"
***************
*** 1187,1193 ****
  	    "\nstatic long GetKey (char *rock, long kvno, struct ktc_encryptionKey *key) {\n"
  	    "\tmemcpy ((void *) key, (void *) &serviceKey, sizeof(*key));\n"
  	    "\treturn 0;\n" "}\n\n"
! 	    "static void DoRun(struct cmd_syndesc *as, char *arock) {\n"
  	    "\tstruct rx_service *serv;\n"
  	    "\tstruct rx_securityClass *sc[3];\n\n"
  	    "\tint port=0, errflg=0;\n" "\tint lowThreads=4, highThreads=8;\n"
--- 1187,1193 ----
  	    "\nstatic long GetKey (char *rock, long kvno, struct ktc_encryptionKey *key) {\n"
  	    "\tmemcpy ((void *) key, (void *) &serviceKey, sizeof(*key));\n"
  	    "\treturn 0;\n" "}\n\n"
! 	    "static void DoRun(struct cmd_syndesc *as, void *arock) {\n"
  	    "\tstruct rx_service *serv;\n"
  	    "\tstruct rx_securityClass *sc[3];\n\n"
  	    "\tint port=0, errflg=0;\n" "\tint lowThreads=4, highThreads=8;\n"
***************
*** 1204,1210 ****
  	    "\t\trx_SetMaxProcs(serv,highThreads);\n"
  	    "\t\trx_StartServer(1);\n" "\t}\n" "\texit(0);\n" "}\n\n"
  	    "static void SetupRunCmd(void) {\n" "\tstruct cmd_syndesc *ts;\n"
! 	    "\tts = cmd_CreateSyntax(NULL,DoRun, 0, \"run the test server program\");\n"
  	    "\tcmd_AddParm(ts, \"-lowThreadCount\", CMD_SINGLE, CMD_REQUIRED, \"minimum number of threads to spawn\");\n"
  	    "\tcmd_AddParm(ts, \"-highThreadCount\", CMD_SINGLE, CMD_REQUIRED, \"maximum number of threads to spawn\");\n"
  	    "\tcmd_AddParm(ts, \"-serverPort\", CMD_SINGLE, CMD_REQUIRED, \"port that server is using\");\n"
--- 1204,1210 ----
  	    "\t\trx_SetMaxProcs(serv,highThreads);\n"
  	    "\t\trx_StartServer(1);\n" "\t}\n" "\texit(0);\n" "}\n\n"
  	    "static void SetupRunCmd(void) {\n" "\tstruct cmd_syndesc *ts;\n"
! 	    "\tts = cmd_CreateSyntax(NULL,DoRun, NULL, \"run the test server program\");\n"
  	    "\tcmd_AddParm(ts, \"-lowThreadCount\", CMD_SINGLE, CMD_REQUIRED, \"minimum number of threads to spawn\");\n"
  	    "\tcmd_AddParm(ts, \"-highThreadCount\", CMD_SINGLE, CMD_REQUIRED, \"maximum number of threads to spawn\");\n"
  	    "\tcmd_AddParm(ts, \"-serverPort\", CMD_SINGLE, CMD_REQUIRED, \"port that server is using\");\n"
Index: openafs/src/rxdebug/rxdebug.c
diff -c openafs/src/rxdebug/rxdebug.c:1.6.8.1 openafs/src/rxdebug/rxdebug.c:1.6.8.3
*** openafs/src/rxdebug/rxdebug.c:1.6.8.1	Thu Feb 15 13:14:09 2007
--- openafs/src/rxdebug/rxdebug.c	Wed Oct 31 00:09:34 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxdebug/rxdebug.c,v 1.6.8.1 2007/02/15 18:14:09 jaltman Exp $");
  
  #include <sys/types.h>
  #include <errno.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxdebug/rxdebug.c,v 1.6.8.3 2007/10/31 04:09:34 shadow Exp $");
  
  #include <sys/types.h>
  #include <errno.h>
***************
*** 32,44 ****
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <sys/stat.h>
  #include <afs/stds.h>
  #include <afs/cmd.h>
--- 32,38 ----
***************
*** 85,93 ****
  }
  
  int
! MainCommand(as, arock)
!      char *arock;
!      struct cmd_syndesc *as;
  {
      register int i;
      osi_socket s;
--- 79,85 ----
  }
  
  int
! MainCommand(struct cmd_syndesc *as, void *arock)
  {
      register int i;
      osi_socket s;
***************
*** 604,610 ****
      }
  #endif
  
!     ts = cmd_CreateSyntax(NULL, MainCommand, 0, "probe RX server");
      cmd_AddParm(ts, "-servers", CMD_SINGLE, CMD_REQUIRED, "server machine");
      cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "IP port");
      cmd_AddParm(ts, "-nodally", CMD_FLAG, CMD_OPTIONAL,
--- 596,602 ----
      }
  #endif
  
!     ts = cmd_CreateSyntax(NULL, MainCommand, NULL, "probe RX server");
      cmd_AddParm(ts, "-servers", CMD_SINGLE, CMD_REQUIRED, "server machine");
      cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "IP port");
      cmd_AddParm(ts, "-nodally", CMD_FLAG, CMD_OPTIONAL,
Index: openafs/src/rxgen/rpc_cout.c
diff -c openafs/src/rxgen/rpc_cout.c:1.9 openafs/src/rxgen/rpc_cout.c:1.9.14.1
*** openafs/src/rxgen/rpc_cout.c:1.9	Tue Jul 15 19:16:39 2003
--- openafs/src/rxgen/rpc_cout.c	Tue Oct 30 11:16:45 2007
***************
*** 36,52 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxgen/rpc_cout.c,v 1.9 2003/07/15 23:16:39 shadow Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include "rpc_scan.h"
  #include "rpc_parse.h"
  #include "rpc_util.h"
--- 36,46 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxgen/rpc_cout.c,v 1.9.14.1 2007/10/30 15:16:45 shadow Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
  #include "rpc_scan.h"
  #include "rpc_parse.h"
  #include "rpc_util.h"
Index: openafs/src/rxgen/rpc_main.c
diff -c openafs/src/rxgen/rpc_main.c:1.23.4.3 openafs/src/rxgen/rpc_main.c:1.23.4.5
*** openafs/src/rxgen/rpc_main.c:1.23.4.3	Fri Oct 19 20:23:46 2007
--- openafs/src/rxgen/rpc_main.c	Thu Nov  1 12:02:29 2007
***************
*** 37,55 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxgen/rpc_main.c,v 1.23.4.3 2007/10/20 00:23:46 shadow Exp $");
  
  #include <limits.h>
  #include <stdio.h>
  #include <stdlib.h>
  #include <ctype.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef HAVE_SIGNAL_H
  #include <signal.h>
  #endif
--- 37,49 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxgen/rpc_main.c,v 1.23.4.5 2007/11/01 16:02:29 shadow Exp $");
  
  #include <limits.h>
  #include <stdio.h>
  #include <stdlib.h>
  #include <ctype.h>
  #include <string.h>
  #ifdef HAVE_SIGNAL_H
  #include <signal.h>
  #endif
***************
*** 66,71 ****
--- 60,66 ----
  #define EXTEND	1		/* alias for TRUE */
  
  struct commandline {
+     int ansic_flag;
      int cflag;
      int hflag;
      int lflag;
***************
*** 93,98 ****
--- 88,94 ----
  char *OutFileFlag = "";
  char OutFile[256];
  char Sflag = 0, Cflag = 0, hflag = 0, cflag = 0, kflag = 0, uflag = 0;
+ char ansic_flag = 0;		/* If set, build ANSI C style prototypes */
  char zflag = 0;			/* If set, abort server stub if rpc call returns non-zero */
  char xflag = 0;			/* if set, add stats code to stubs */
  char yflag = 0;			/* if set, only emit function name arrays to xdr file */
***************
*** 802,807 ****
--- 798,804 ----
  	    for (j = 1; argv[i][j] != 0; j++) {
  		c = argv[i][j];
  		switch (c) {
+ 		case 'A':
  		case 'c':
  		case 'h':
  		case 'l':
***************
*** 860,865 ****
--- 857,863 ----
  	    ;
  	}
      }
+     cmd->ansic_flag = ansic_flag = flag['A'];
      cmd->cflag = cflag = flag['c'];
      cmd->hflag = hflag = flag['h'];
      cmd->sflag = flag['s'];
Index: openafs/src/rxgen/rpc_parse.c
diff -c openafs/src/rxgen/rpc_parse.c:1.20.4.2 openafs/src/rxgen/rpc_parse.c:1.20.4.4
*** openafs/src/rxgen/rpc_parse.c:1.20.4.2	Tue Jul  4 02:28:26 2006
--- openafs/src/rxgen/rpc_parse.c	Thu Nov  1 12:02:29 2007
***************
*** 36,53 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxgen/rpc_parse.c,v 1.20.4.2 2006/07/04 06:28:26 jaltman Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
  #include <ctype.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include "rpc_scan.h"
  #include "rpc_parse.h"
  #include "rpc_util.h"
--- 36,47 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxgen/rpc_parse.c,v 1.20.4.4 2007/11/01 16:02:29 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
  #include <ctype.h>
  #include <string.h>
  #include "rpc_scan.h"
  #include "rpc_parse.h"
  #include "rpc_util.h"
***************
*** 1116,1136 ****
      }
  }
  
- 
  static void
  cs_ProcName_setup(definition * defp, char *procheader, int split_flag)
  {
      proc1_list *plist;
  
!     if (!cflag) {
  	if (split_flag) {
! 	    f_print(fout, "int %s%s%s%s(z_call", procheader, prefix,
! 		    PackagePrefix[PackageIndex], defp->pc.proc_name);
  	} else {
! 	    f_print(fout, "int %s%s%s%s(z_conn", procheader, prefix,
! 		    PackagePrefix[PackageIndex], defp->pc.proc_name);
  	}
      }
      if ((strlen(procheader) + strlen(prefix) +
  	 strlen(PackagePrefix[PackageIndex]) + strlen(defp->pc.proc_name)) >=
  	MAX_FUNCTION_NAME_LEN) {
--- 1110,1139 ----
      }
  }
  
  static void
  cs_ProcName_setup(definition * defp, char *procheader, int split_flag)
  {
      proc1_list *plist;
+     char *first_arg;
  
!     if (ansic_flag) {
! 	if (split_flag) {
! 	    first_arg = "register struct rx_call *z_call";
! 	} else {
! 	    first_arg = "register struct rx_connection *z_conn";
! 	}
!     } else {
  	if (split_flag) {
! 	    first_arg = "z_call";
  	} else {
! 	    first_arg = "z_conn";
  	}
      }
+ 
+     if (!cflag) {
+ 	f_print(fout, "int %s%s%s%s(%s", procheader, prefix,
+ 		PackagePrefix[PackageIndex], defp->pc.proc_name, first_arg);
+     }
      if ((strlen(procheader) + strlen(prefix) +
  	 strlen(PackagePrefix[PackageIndex]) + strlen(defp->pc.proc_name)) >=
  	MAX_FUNCTION_NAME_LEN) {
***************
*** 1139,1158 ****
      if (!cflag) {
  	for (plist = defp->pc.plists; plist; plist = plist->next) {
  	    if (plist->component_kind == DEF_PARAM) {
! 		plist->pl.param_flag &= ~PROCESSED_PARAM;
! 		f_print(fout, ", %s", plist->pl.param_name);
  	    }
  	}
  	f_print(fout, ")\n");
      }
  }
  
- 
  static void
  cs_ProcParams_setup(definition * defp, int split_flag)
  {
      proc1_list *plist, *plist1;
  
      if (!split_flag)
  	f_print(fout, "\tregister struct rx_connection *z_conn;\n");
      if (split_flag) {
--- 1142,1173 ----
      if (!cflag) {
  	for (plist = defp->pc.plists; plist; plist = plist->next) {
  	    if (plist->component_kind == DEF_PARAM) {
! 		if (ansic_flag) {
! 		    if (plist->pl.param_flag & OUT_STRING) {
! 			f_print(fout, ",%s *%s", plist->pl.param_type,
! 				plist->pl.param_name);
! 		    } else {
! 			f_print(fout, ",%s %s", plist->pl.param_type,
! 				plist->pl.param_name);
! 		    }
! 		} else {
! 		    f_print(fout, ", %s", plist->pl.param_name);    
! 		    plist->pl.param_flag &= ~PROCESSED_PARAM;
! 		}
  	    }
  	}
  	f_print(fout, ")\n");
      }
  }
  
  static void
  cs_ProcParams_setup(definition * defp, int split_flag)
  {
      proc1_list *plist, *plist1;
  
+     if (ansic_flag)
+ 	return;
+ 
      if (!split_flag)
  	f_print(fout, "\tregister struct rx_connection *z_conn;\n");
      if (split_flag) {
***************
*** 1748,1755 ****
      proc1_list *plist;
  
      if (!cflag) {
!       f_print(fout, "int %s%s%s%s(aclient, aflags", procheader, prefix,
! 	      PackagePrefix[PackageIndex], defp->pc.proc_name);
      }
      if ((strlen(procheader) + strlen(prefix) +
  	 strlen(PackagePrefix[PackageIndex]) + strlen(defp->pc.proc_name)) >=
--- 1763,1776 ----
      proc1_list *plist;
  
      if (!cflag) {
!      	if (ansic_flag) {
! 	    f_print(fout, "int %s%s%s%s(register struct ubik_client *aclient, afs_int32 aflags",
! 			  procheader, prefix, PackagePrefix[PackageIndex],
! 			  defp->pc.proc_name);
! 	} else {
! 	    f_print(fout, "int %s%s%s%s(aclient, aflags", procheader, prefix,
! 			  PackagePrefix[PackageIndex], defp->pc.proc_name);
! 	}
      }
      if ((strlen(procheader) + strlen(prefix) +
  	 strlen(PackagePrefix[PackageIndex]) + strlen(defp->pc.proc_name)) >=
***************
*** 1759,1766 ****
      if (!cflag) {
  	for (plist = defp->pc.plists; plist; plist = plist->next) {
  	    if (plist->component_kind == DEF_PARAM) {
! 		plist->pl.param_flag &= ~PROCESSED_PARAM;
! 		f_print(fout, ", %s", plist->pl.param_name);
  	    }
  	}
  	f_print(fout, ")\n");
--- 1780,1797 ----
      if (!cflag) {
  	for (plist = defp->pc.plists; plist; plist = plist->next) {
  	    if (plist->component_kind == DEF_PARAM) {
! 		if (ansic_flag) {
! 		    if (plist->pl.param_flag & OUT_STRING) {
! 			f_print(fout, ",%s *%s", plist->pl.param_type,
! 				plist->pl.param_name);
! 		    } else {
! 			f_print(fout, ",%s %s", plist->pl.param_type,
! 				plist->pl.param_name);
! 		    }
! 		} else {
! 		    plist->pl.param_flag &= ~PROCESSED_PARAM;
! 		    f_print(fout, ", %s", plist->pl.param_name);
! 		}
  	    }
  	}
  	f_print(fout, ")\n");
***************
*** 1773,1778 ****
--- 1804,1812 ----
  {
      proc1_list *plist, *plist1;
  
+     if (ansic_flag)
+ 	return;
+ 
      f_print(fout, "\tregister struct ubik_client *aclient;\n\tafs_int32 aflags;\n");
      for (plist = defp->pc.plists; plist; plist = plist->next) {
  	if (plist->component_kind == DEF_PARAM
Index: openafs/src/rxgen/rpc_scan.c
diff -c openafs/src/rxgen/rpc_scan.c:1.10 openafs/src/rxgen/rpc_scan.c:1.10.4.1
*** openafs/src/rxgen/rpc_scan.c:1.10	Sat Nov  5 01:48:21 2005
--- openafs/src/rxgen/rpc_scan.c	Tue Oct 30 11:16:45 2007
***************
*** 38,55 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxgen/rpc_scan.c,v 1.10 2005/11/05 06:48:21 jaltman Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
  #include <ctype.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
! #else
! #ifdef HAVE_STRINGS_H
! #include <strings.h>
! #endif
! #endif
  #include "rpc_scan.h"
  #include "rpc_parse.h"
  #include "rpc_util.h"
--- 38,50 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxgen/rpc_scan.c,v 1.10.4.1 2007/10/30 15:16:45 shadow Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
  #include <ctype.h>
  #include <string.h>
! 
  #include "rpc_scan.h"
  #include "rpc_parse.h"
  #include "rpc_util.h"
Index: openafs/src/rxgen/rpc_svcout.c
diff -c openafs/src/rxgen/rpc_svcout.c:1.9 openafs/src/rxgen/rpc_svcout.c:1.9.14.1
*** openafs/src/rxgen/rpc_svcout.c:1.9	Tue Jul 15 19:16:41 2003
--- openafs/src/rxgen/rpc_svcout.c	Tue Oct 30 11:16:45 2007
***************
*** 36,51 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxgen/rpc_svcout.c,v 1.9 2003/07/15 23:16:41 shadow Exp $");
  
  #include <stdio.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include "rpc_scan.h"
  #include "rpc_parse.h"
  #include "rpc_util.h"
--- 36,45 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxgen/rpc_svcout.c,v 1.9.14.1 2007/10/30 15:16:45 shadow Exp $");
  
  #include <stdio.h>
  #include <string.h>
  #include "rpc_scan.h"
  #include "rpc_parse.h"
  #include "rpc_util.h"
Index: openafs/src/rxgen/rpc_util.c
diff -c openafs/src/rxgen/rpc_util.c:1.9 openafs/src/rxgen/rpc_util.c:1.9.14.1
*** openafs/src/rxgen/rpc_util.c:1.9	Tue Jul 15 19:16:41 2003
--- openafs/src/rxgen/rpc_util.c	Tue Oct 30 11:16:45 2007
***************
*** 36,51 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxgen/rpc_util.c,v 1.9 2003/07/15 23:16:41 shadow Exp $");
  
  #include <stdio.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
--- 36,45 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxgen/rpc_util.c,v 1.9.14.1 2007/10/30 15:16:45 shadow Exp $");
  
  #include <stdio.h>
  #include <string.h>
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
Index: openafs/src/rxgen/rpc_util.h
diff -c openafs/src/rxgen/rpc_util.h:1.4.14.1 openafs/src/rxgen/rpc_util.h:1.4.14.2
*** openafs/src/rxgen/rpc_util.h:1.4.14.1	Mon Jul  3 15:07:15 2006
--- openafs/src/rxgen/rpc_util.h	Thu Nov  1 12:02:29 2007
***************
*** 57,62 ****
--- 57,63 ----
  extern char *OutFileFlag;
  extern char OutFile[];
  extern char Sflag, Cflag, hflag, cflag, kflag, uflag;
+ extern char ansic_flag;
  extern char zflag;
  extern char xflag;
  extern char yflag;
Index: openafs/src/rxkad/crc.c
diff -c openafs/src/rxkad/crc.c:1.3 openafs/src/rxkad/crc.c:1.3.14.1
*** openafs/src/rxkad/crc.c:1.3	Tue Jul 15 19:16:42 2003
--- openafs/src/rxkad/crc.c	Tue Oct 30 11:16:46 2007
***************
*** 41,47 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/crc.c,v 1.3 2003/07/15 23:16:42 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "../afs/sysincludes.h"
--- 41,47 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/crc.c,v 1.3.14.1 2007/10/30 15:16:46 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "../afs/sysincludes.h"
***************
*** 60,72 ****
  #else
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <rx/xdr.h>
  #include <rx/rx.h>
  #include <des.h>
--- 60,66 ----
Index: openafs/src/rxkad/md4.c
diff -c openafs/src/rxkad/md4.c:1.2.8.1 openafs/src/rxkad/md4.c:1.2.8.2
*** openafs/src/rxkad/md4.c:1.2.8.1	Wed Aug  2 15:01:22 2006
--- openafs/src/rxkad/md4.c	Tue Oct 30 11:16:46 2007
***************
*** 55,67 ****
  #else
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <rx/xdr.h>
  #include <rx/rx.h>
  #include <des.h>
--- 55,61 ----
***************
*** 69,75 ****
  #include "rxkad.h"
  #endif /* defined(UKERNEL) */
  
! RCSID("$Id: md4.c,v 1.2.8.1 2006/08/02 19:01:22 shadow Exp $");
  
  
  
--- 63,69 ----
  #include "rxkad.h"
  #endif /* defined(UKERNEL) */
  
! RCSID("$Id: md4.c,v 1.2.8.2 2007/10/30 15:16:46 shadow Exp $");
  
  
  
Index: openafs/src/rxkad/md5.c
diff -c openafs/src/rxkad/md5.c:1.2.8.1 openafs/src/rxkad/md5.c:1.2.8.2
*** openafs/src/rxkad/md5.c:1.2.8.1	Wed Aug  2 15:01:22 2006
--- openafs/src/rxkad/md5.c	Tue Oct 30 11:16:46 2007
***************
*** 55,75 ****
  #else
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- #include <rx/xdr.h>
  #include <rx/rx.h>
  #include <des.h>
  #include "lifetimes.h"
  #include "rxkad.h"
  #endif /* defined(UKERNEL) */
  
! RCSID("$Id: md5.c,v 1.2.8.1 2006/08/02 19:01:22 shadow Exp $");
  
  
  
--- 55,68 ----
  #else
  #include <netinet/in.h>
  #endif
  #include <string.h>
  #include <rx/rx.h>
  #include <des.h>
  #include "lifetimes.h"
  #include "rxkad.h"
  #endif /* defined(UKERNEL) */
  
! RCSID("$Id: md5.c,v 1.2.8.2 2007/10/30 15:16:46 shadow Exp $");
  
  
  
Index: openafs/src/rxkad/rxkad_client.c
diff -c openafs/src/rxkad/rxkad_client.c:1.22.2.1 openafs/src/rxkad/rxkad_client.c:1.22.2.2
*** openafs/src/rxkad/rxkad_client.c:1.22.2.1	Thu Jun  1 11:38:59 2006
--- openafs/src/rxkad/rxkad_client.c	Tue Oct 30 11:16:46 2007
***************
*** 19,25 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/rxkad_client.c,v 1.22.2.1 2006/06/01 15:38:59 shadow Exp $");
  
  #ifdef KERNEL
  #include "afs/stds.h"
--- 19,25 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/rxkad_client.c,v 1.22.2.2 2007/10/30 15:16:46 shadow Exp $");
  
  #ifdef KERNEL
  #include "afs/stds.h"
***************
*** 47,59 ****
  #include <afs/stds.h>
  #include <sys/types.h>
  #include <time.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #else
--- 47,53 ----
Index: openafs/src/rxkad/rxkad_common.c
diff -c openafs/src/rxkad/rxkad_common.c:1.29.2.1 openafs/src/rxkad/rxkad_common.c:1.29.2.2
*** openafs/src/rxkad/rxkad_common.c:1.29.2.1	Thu Jun  1 11:38:59 2006
--- openafs/src/rxkad/rxkad_common.c	Tue Oct 30 11:16:46 2007
***************
*** 23,29 ****
  #define INCLUDE_RXKAD_PRIVATE_DECLS
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/rxkad_common.c,v 1.29.2.1 2006/06/01 15:38:59 shadow Exp $");
  
  #ifdef KERNEL
  #ifndef UKERNEL
--- 23,29 ----
  #define INCLUDE_RXKAD_PRIVATE_DECLS
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/rxkad_common.c,v 1.29.2.2 2007/10/30 15:16:46 shadow Exp $");
  
  #ifdef KERNEL
  #ifndef UKERNEL
***************
*** 50,55 ****
--- 50,56 ----
  #else /* KERNEL */
  #include <afs/stds.h>
  #include <sys/types.h>
+ #include <string.h>
  #include <time.h>
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
***************
*** 61,73 ****
  #endif
  #include <rx/rx.h>
  #include <rx/xdr.h>
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <afs/afsutil.h>
  #endif /* KERNEL */
  
--- 62,67 ----
Index: openafs/src/rxkad/rxkad_server.c
diff -c openafs/src/rxkad/rxkad_server.c:1.21.2.3 openafs/src/rxkad/rxkad_server.c:1.21.2.4
*** openafs/src/rxkad/rxkad_server.c:1.21.2.3	Sun Jun 10 10:25:29 2007
--- openafs/src/rxkad/rxkad_server.c	Tue Oct 30 11:16:46 2007
***************
*** 15,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/rxkad_server.c,v 1.21.2.3 2007/06/10 14:25:29 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 15,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/rxkad_server.c,v 1.21.2.4 2007/10/30 15:16:46 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 28,40 ****
  #else
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <rx/rx.h>
  #include <rx/xdr.h>
  #include <des.h>
--- 28,34 ----
Index: openafs/src/rxkad/ticket.c
diff -c openafs/src/rxkad/ticket.c:1.13.14.1 openafs/src/rxkad/ticket.c:1.13.14.2
*** openafs/src/rxkad/ticket.c:1.13.14.1	Sat Nov  4 18:55:22 2006
--- openafs/src/rxkad/ticket.c	Tue Oct 30 11:16:46 2007
***************
*** 15,21 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/ticket.c,v 1.13.14.1 2006/11/04 23:55:22 jaltman Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
--- 15,21 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/ticket.c,v 1.13.14.2 2007/10/30 15:16:46 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
***************
*** 34,46 ****
  #else
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <rx/xdr.h>
  #include <rx/rx.h>
  #include <des.h>
--- 34,40 ----
Index: openafs/src/rxkad/ticket5.c
diff -c openafs/src/rxkad/ticket5.c:1.10.2.1 openafs/src/rxkad/ticket5.c:1.10.2.2
*** openafs/src/rxkad/ticket5.c:1.10.2.1	Thu Jun 29 19:27:16 2006
--- openafs/src/rxkad/ticket5.c	Tue Oct 30 11:16:46 2007
***************
*** 62,68 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/ticket5.c,v 1.10.2.1 2006/06/29 23:27:16 jaltman Exp $");
  
  #if defined(UKERNEL)
  #include "../afs/sysincludes.h"
--- 62,68 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/ticket5.c,v 1.10.2.2 2007/10/30 15:16:46 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "../afs/sysincludes.h"
***************
*** 81,93 ****
  #else
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <rx/xdr.h>
  #include <rx/rx.h>
  #include <des.h>
--- 81,87 ----
Index: openafs/src/rxkad/domestic/crypt_conn.c
diff -c openafs/src/rxkad/domestic/crypt_conn.c:1.15 openafs/src/rxkad/domestic/crypt_conn.c:1.15.2.1
*** openafs/src/rxkad/domestic/crypt_conn.c:1.15	Mon Feb 27 19:17:55 2006
--- openafs/src/rxkad/domestic/crypt_conn.c	Tue Oct 30 11:16:46 2007
***************
*** 19,25 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/domestic/crypt_conn.c,v 1.15 2006/02/28 00:17:55 shadow Exp $");
  
  #ifdef KERNEL
  #include "afs/stds.h"
--- 19,25 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/domestic/crypt_conn.c,v 1.15.2.1 2007/10/30 15:16:46 shadow Exp $");
  
  #ifdef KERNEL
  #include "afs/stds.h"
***************
*** 37,42 ****
--- 37,43 ----
  #else /* !KERNEL */
  #include <afs/stds.h>
  #include <sys/types.h>
+ #include <string.h>
  #include <rx/rx.h>
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
Index: openafs/src/rxkad/domestic/fcrypt.c
diff -c openafs/src/rxkad/domestic/fcrypt.c:1.18.2.1 openafs/src/rxkad/domestic/fcrypt.c:1.18.2.2
*** openafs/src/rxkad/domestic/fcrypt.c:1.18.2.1	Wed Aug  2 15:01:23 2006
--- openafs/src/rxkad/domestic/fcrypt.c	Tue Oct 30 11:16:46 2007
***************
*** 20,26 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/domestic/fcrypt.c,v 1.18.2.1 2006/08/02 19:01:23 shadow Exp $");
  
  #define DEBUG 0
  #ifdef KERNEL
--- 20,26 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/domestic/fcrypt.c,v 1.18.2.2 2007/10/30 15:16:46 shadow Exp $");
  
  #define DEBUG 0
  #ifdef KERNEL
***************
*** 47,52 ****
--- 47,53 ----
  
  #include <afs/stds.h>
  #include <sys/types.h>
+ #include <string.h>
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #else
Index: openafs/src/rxkad/test/stress.c
diff -c openafs/src/rxkad/test/stress.c:1.9.14.1 openafs/src/rxkad/test/stress.c:1.9.14.2
*** openafs/src/rxkad/test/stress.c:1.9.14.1	Tue Apr 10 14:39:55 2007
--- openafs/src/rxkad/test/stress.c	Wed Oct 31 00:09:35 2007
***************
*** 13,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/test/stress.c,v 1.9.14.1 2007/04/10 18:39:55 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 13,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/test/stress.c,v 1.9.14.2 2007/10/31 04:09:35 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 104,112 ****
  #define aKEYFILE 26
  
  static int
! CommandProc(as, arock)
!      char *arock;
!      struct cmd_syndesc *as;
  {
      long code;
      int startServer = (as->parms[aSERVER].items != 0);
--- 104,110 ----
  #define aKEYFILE 26
  
  static int
! CommandProc(struct cmd_syndesc *as, void *arock)
  {
      long code;
      int startServer = (as->parms[aSERVER].items != 0);
***************
*** 310,316 ****
  	exit(1);
      }
  #endif
!     ts = cmd_CreateSyntax(NULL, CommandProc, 0,
  			  "run Rx authentication stress test");
      cmd_AddParm(ts, "-server", CMD_FLAG, CMD_OPTIONAL, "start server");
      cmd_AddParm(ts, "-client", CMD_SINGLE, CMD_OPTIONAL, "start client");
--- 308,314 ----
  	exit(1);
      }
  #endif
!     ts = cmd_CreateSyntax(NULL, CommandProc, NULL,
  			  "run Rx authentication stress test");
      cmd_AddParm(ts, "-server", CMD_FLAG, CMD_OPTIONAL, "start server");
      cmd_AddParm(ts, "-client", CMD_SINGLE, CMD_OPTIONAL, "start client");
Index: openafs/src/rxstat/Makefile.in
diff -c openafs/src/rxstat/Makefile.in:1.9 openafs/src/rxstat/Makefile.in:1.9.14.1
*** openafs/src/rxstat/Makefile.in:1.9	Sat Jan 11 02:34:53 2003
--- openafs/src/rxstat/Makefile.in	Thu Nov  1 12:02:29 2007
***************
*** 19,34 ****
  # Build targets
  #
  rxstat.cs.c: rxstat.xg
! 	${RXGEN} -x -C -o $@ ${srcdir}/rxstat.xg
  
  rxstat.ss.c: rxstat.xg
! 	${RXGEN} -x -S -o $@ ${srcdir}/rxstat.xg
  
  rxstat.xdr.c: rxstat.xg
! 	${RXGEN} -x -c -o $@ ${srcdir}/rxstat.xg
  
  rxstat.h: rxstat.xg
! 	${RXGEN} -x -h -o $@ ${srcdir}/rxstat.xg
  
  rxstat.xdr.c: rxstat.h
  rxstat.cs.c: rxstat.h
--- 19,34 ----
  # Build targets
  #
  rxstat.cs.c: rxstat.xg
! 	${RXGEN} -A -x -C -o $@ ${srcdir}/rxstat.xg
  
  rxstat.ss.c: rxstat.xg
! 	${RXGEN} -A -x -S -o $@ ${srcdir}/rxstat.xg
  
  rxstat.xdr.c: rxstat.xg
! 	${RXGEN} -A -x -c -o $@ ${srcdir}/rxstat.xg
  
  rxstat.h: rxstat.xg
! 	${RXGEN} -A -x -h -o $@ ${srcdir}/rxstat.xg
  
  rxstat.xdr.c: rxstat.h
  rxstat.cs.c: rxstat.h
Index: openafs/src/scout/scout.c
diff -c openafs/src/scout/scout.c:1.10 openafs/src/scout/scout.c:1.10.2.2
*** openafs/src/scout/scout.c:1.10	Thu Mar  9 01:34:55 2006
--- openafs/src/scout/scout.c	Wed Oct 31 00:09:37 2007
***************
*** 15,33 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/scout/scout.c,v 1.10 2006/03/09 06:34:55 shadow Exp $");
  
  #undef	IN
  #ifdef	AFS_AIX32_ENV
  #include <signal.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #undef IN
  #include <gtxwindows.h>		/*Generic window package */
  #include <gtxobjects.h>		/*Object definitions */
--- 15,27 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/scout/scout.c,v 1.10.2.2 2007/10/31 04:09:37 shadow Exp $");
  
  #undef	IN
  #ifdef	AFS_AIX32_ENV
  #include <signal.h>
  #endif
  #include <string.h>
  #undef IN
  #include <gtxwindows.h>		/*Generic window package */
  #include <gtxobjects.h>		/*Object definitions */
***************
*** 2216,2225 ****
   *	Initializes this program.
   *------------------------------------------------------------------------*/
  
! static int scoutInit(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
! 
  {				/*scoutInit */
  
      static char rn[] = "scoutInit";	/*Routine name */
--- 2210,2216 ----
   *	Initializes this program.
   *------------------------------------------------------------------------*/
  
! static int scoutInit(struct cmd_syndesc *as, void *arock)
  {				/*scoutInit */
  
      static char rn[] = "scoutInit";	/*Routine name */
***************
*** 2355,2361 ****
      /*
       * Set up the commands we understand.
       */
!     ts = cmd_CreateSyntax("initcmd", scoutInit, 0, "initialize the program");
      cmd_AddParm(ts, "-server", CMD_LIST, CMD_REQUIRED,
  		"FileServer name(s) to monitor");
      cmd_AddParm(ts, "-basename", CMD_SINGLE, CMD_OPTIONAL,
--- 2346,2352 ----
      /*
       * Set up the commands we understand.
       */
!     ts = cmd_CreateSyntax("initcmd", scoutInit, NULL, "initialize the program");
      cmd_AddParm(ts, "-server", CMD_LIST, CMD_REQUIRED,
  		"FileServer name(s) to monitor");
      cmd_AddParm(ts, "-basename", CMD_SINGLE, CMD_OPTIONAL,
Index: openafs/src/sys/Makefile.in
diff -c openafs/src/sys/Makefile.in:1.36.2.4 openafs/src/sys/Makefile.in:1.36.2.5
*** openafs/src/sys/Makefile.in:1.36.2.4	Fri Oct 19 20:23:46 2007
--- openafs/src/sys/Makefile.in	Thu Nov  1 12:02:30 2007
***************
*** 128,152 ****
  rmtsysd: AFS_component_version_number.o afs.exp afsl.exp
  
  rmtsys.cs.c: rmtsys.xg
! 	${RXGEN} -C -o $@ ${srcdir}/rmtsys.xg
  
  rmtsys.ss.c: rmtsys.xg
! 	${RXGEN} -S -o $@ ${srcdir}/rmtsys.xg
  
  rmtsys.xdr.c: rmtsys.xg
! 	${RXGEN} -c -o $@ ${srcdir}/rmtsys.xg
  
  rmtsys.h: rmtsys.xg
! 	${RXGEN} -h -o $@ ${srcdir}/rmtsys.xg
  
  Krmtsys.cs.c: rmtsys.xg Krmtsys.h
! 	${RXGEN} -k -C -o Krmtsys.cs.c ${srcdir}/rmtsys.xg
  
  Krmtsys.xdr.c: rmtsys.xg
! 	${RXGEN} -k -c -o Krmtsys.xdr.c ${srcdir}/rmtsys.xg
  
  Krmtsys.h: rmtsys.xg
! 	${RXGEN} -k -h -o Krmtsys.h ${srcdir}/rmtsys.xg
  
  rmtsysd: rmtsysd.o libsys.a
  	${CC} ${CFLAGS} -o rmtsysd rmtsysd.o ${LIBS}
--- 128,152 ----
  rmtsysd: AFS_component_version_number.o afs.exp afsl.exp
  
  rmtsys.cs.c: rmtsys.xg
! 	${RXGEN} -A -C -o $@ ${srcdir}/rmtsys.xg
  
  rmtsys.ss.c: rmtsys.xg
! 	${RXGEN} -A -S -o $@ ${srcdir}/rmtsys.xg
  
  rmtsys.xdr.c: rmtsys.xg
! 	${RXGEN} -A -c -o $@ ${srcdir}/rmtsys.xg
  
  rmtsys.h: rmtsys.xg
! 	${RXGEN} -A -h -o $@ ${srcdir}/rmtsys.xg
  
  Krmtsys.cs.c: rmtsys.xg Krmtsys.h
! 	${RXGEN} -A -k -C -o Krmtsys.cs.c ${srcdir}/rmtsys.xg
  
  Krmtsys.xdr.c: rmtsys.xg
! 	${RXGEN} -A -k -c -o Krmtsys.xdr.c ${srcdir}/rmtsys.xg
  
  Krmtsys.h: rmtsys.xg
! 	${RXGEN} -A -k -h -o Krmtsys.h ${srcdir}/rmtsys.xg
  
  rmtsysd: rmtsysd.o libsys.a
  	${CC} ${CFLAGS} -o rmtsysd rmtsysd.o ${LIBS}
Index: openafs/src/sys/pagsh.c
diff -c openafs/src/sys/pagsh.c:1.9.14.2 openafs/src/sys/pagsh.c:1.9.14.3
*** openafs/src/sys/pagsh.c:1.9.14.2	Tue Jul 10 16:29:34 2007
--- openafs/src/sys/pagsh.c	Tue Oct 30 11:16:46 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/sys/pagsh.c,v 1.9.14.2 2007/07/10 20:29:34 shadow Exp $");
  
  #ifdef	AFS_AIX32_ENV
  #include <signal.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/sys/pagsh.c,v 1.9.14.3 2007/10/30 15:16:46 shadow Exp $");
  
  #ifdef	AFS_AIX32_ENV
  #include <signal.h>
***************
*** 22,30 ****
  #ifndef AFS_NT40_ENV
  #include <unistd.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #endif
  #include <pwd.h>
  #ifdef AFS_KERBEROS_ENV
  #include <sys/types.h>
--- 22,28 ----
Index: openafs/src/sys/rmtsysc.c
diff -c openafs/src/sys/rmtsysc.c:1.11.14.1 openafs/src/sys/rmtsysc.c:1.11.14.2
*** openafs/src/sys/rmtsysc.c:1.11.14.1	Mon Jul 31 11:34:27 2006
--- openafs/src/sys/rmtsysc.c	Tue Oct 30 11:16:46 2007
***************
*** 16,22 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/sys/rmtsysc.c,v 1.11.14.1 2006/07/31 15:34:27 shadow Exp $");
  
  #include <errno.h>
  #include <limits.h>
--- 16,22 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/sys/rmtsysc.c,v 1.11.14.2 2007/10/30 15:16:46 shadow Exp $");
  
  #include <errno.h>
  #include <limits.h>
***************
*** 31,39 ****
  #endif
  #include <sys/stat.h>
  #include <stdio.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #endif
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
--- 31,37 ----
Index: openafs/src/sys/rmtsysnet.c
diff -c openafs/src/sys/rmtsysnet.c:1.8 openafs/src/sys/rmtsysnet.c:1.8.14.1
*** openafs/src/sys/rmtsysnet.c:1.8	Mon Nov 10 17:25:28 2003
--- openafs/src/sys/rmtsysnet.c	Tue Oct 30 11:16:46 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/sys/rmtsysnet.c,v 1.8 2003/11/10 22:25:28 rees Exp $");
  
  #include <errno.h>
  #include <sys/param.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/sys/rmtsysnet.c,v 1.8.14.1 2007/10/30 15:16:46 shadow Exp $");
  
  #include <errno.h>
  #include <sys/param.h>
***************
*** 26,38 ****
  #endif
  #include <sys/stat.h>
  #include <stdio.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <afs/afsint.h>
  #include <afs/venus.h>
  #include <rx/xdr.h>
--- 26,32 ----
Index: openafs/src/sys/rmtsyss.c
diff -c openafs/src/sys/rmtsyss.c:1.10 openafs/src/sys/rmtsyss.c:1.10.14.1
*** openafs/src/sys/rmtsyss.c:1.10	Tue Jul 15 19:16:54 2003
--- openafs/src/sys/rmtsyss.c	Tue Oct 30 11:16:46 2007
***************
*** 16,22 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/sys/rmtsyss.c,v 1.10 2003/07/15 23:16:54 shadow Exp $");
  
  #include <sys/types.h>
  #include <sys/ioctl.h>
--- 16,22 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/sys/rmtsyss.c,v 1.10.14.1 2007/10/30 15:16:46 shadow Exp $");
  
  #include <sys/types.h>
  #include <sys/ioctl.h>
***************
*** 30,38 ****
  #include <rx/xdr.h>
  #include <errno.h>
  #include <signal.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #endif
  /*#include <afs/cellconfig.h>*/
  #include "rmtsys.h"
  
--- 30,36 ----
Index: openafs/src/tsalvaged/salvsync-debug.c
diff -c openafs/src/tsalvaged/salvsync-debug.c:1.1 openafs/src/tsalvaged/salvsync-debug.c:1.1.4.1
*** openafs/src/tsalvaged/salvsync-debug.c:1.1	Fri Mar 17 23:20:11 2006
--- openafs/src/tsalvaged/salvsync-debug.c	Wed Oct 31 00:09:38 2007
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/tsalvaged/salvsync-debug.c,v 1.1 2006/03/18 04:20:11 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/tsalvaged/salvsync-debug.c,v 1.1.4.1 2007/10/31 04:09:38 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
***************
*** 101,112 ****
  static char * state_code_to_string(afs_int32);
  
  
! static int OpStats(struct cmd_syndesc * as, char * rock);
! static int OpSalvage(struct cmd_syndesc * as, char * rock);
! static int OpCancel(struct cmd_syndesc * as, char * rock);
! static int OpCancelAll(struct cmd_syndesc * as, char * rock);
! static int OpRaisePrio(struct cmd_syndesc * as, char * rock);
! static int OpQuery(struct cmd_syndesc * as, char * rock);
  
  
  #ifndef AFS_NT40_ENV
--- 101,112 ----
  static char * state_code_to_string(afs_int32);
  
  
! static int OpStats(struct cmd_syndesc * as, void * rock);
! static int OpSalvage(struct cmd_syndesc * as, void * rock);
! static int OpCancel(struct cmd_syndesc * as, void * rock);
! static int OpCancelAll(struct cmd_syndesc * as, void * rock);
! static int OpRaisePrio(struct cmd_syndesc * as, void * rock);
! static int OpQuery(struct cmd_syndesc * as, void * rock);
  
  
  #ifndef AFS_NT40_ENV
***************
*** 153,177 ****
      }
  
  
!     ts = cmd_CreateSyntax("stats", OpStats, 0, "get salvageserver statistics (SALVSYNC_NOP opcode)");
      COMMON_PARMS_DECL(ts);
      cmd_CreateAlias(ts, "nop");
  
!     ts = cmd_CreateSyntax("salvage", OpSalvage, 0, "schedule a salvage (SALVSYNC_SALVAGE opcode)");
      SALV_PARMS_DECL(ts);
  
!     ts = cmd_CreateSyntax("cancel", OpCancel, 0, "cancel a salvage (SALVSYNC_CANCEL opcode)");
      SALV_PARMS_DECL(ts);
  
!     ts = cmd_CreateSyntax("raiseprio", OpRaisePrio, 0, "raise a salvage priority (SALVSYNC_RAISEPRIO opcode)");
      SALV_PARMS_DECL(ts);
      cmd_CreateAlias(ts, "rp");
  
!     ts = cmd_CreateSyntax("query", OpQuery, 0, "query salvage status (SALVSYNC_QUERY opcode)");
      SALV_PARMS_DECL(ts);
      cmd_CreateAlias(ts, "qry");
  
!     ts = cmd_CreateSyntax("kill", OpCancelAll, 0, "cancel all scheduled salvages (SALVSYNC_CANCELALL opcode)");
      COMMON_PARMS_DECL(ts);
  
      err = cmd_Dispatch(argc, argv);
--- 153,177 ----
      }
  
  
!     ts = cmd_CreateSyntax("stats", OpStats, NULL, "get salvageserver statistics (SALVSYNC_NOP opcode)");
      COMMON_PARMS_DECL(ts);
      cmd_CreateAlias(ts, "nop");
  
!     ts = cmd_CreateSyntax("salvage", OpSalvage, NULL, "schedule a salvage (SALVSYNC_SALVAGE opcode)");
      SALV_PARMS_DECL(ts);
  
!     ts = cmd_CreateSyntax("cancel", OpCancel, NULL, "cancel a salvage (SALVSYNC_CANCEL opcode)");
      SALV_PARMS_DECL(ts);
  
!     ts = cmd_CreateSyntax("raiseprio", OpRaisePrio, NULL, "raise a salvage priority (SALVSYNC_RAISEPRIO opcode)");
      SALV_PARMS_DECL(ts);
      cmd_CreateAlias(ts, "rp");
  
!     ts = cmd_CreateSyntax("query", OpQuery, NULL, "query salvage status (SALVSYNC_QUERY opcode)");
      SALV_PARMS_DECL(ts);
      cmd_CreateAlias(ts, "qry");
  
!     ts = cmd_CreateSyntax("kill", OpCancelAll, NULL, "cancel all scheduled salvages (SALVSYNC_CANCELALL opcode)");
      COMMON_PARMS_DECL(ts);
  
      err = cmd_Dispatch(argc, argv);
***************
*** 395,401 ****
  }
  
  static int
! OpStats(struct cmd_syndesc * as, char * rock)
  {
      struct state state;
  
--- 395,401 ----
  }
  
  static int
! OpStats(struct cmd_syndesc * as, void * rock)
  {
      struct state state;
  
***************
*** 408,414 ****
  }
  
  static int
! OpSalvage(struct cmd_syndesc * as, char * rock)
  {
      struct state state;
  
--- 408,414 ----
  }
  
  static int
! OpSalvage(struct cmd_syndesc * as, void * rock)
  {
      struct state state;
  
***************
*** 421,427 ****
  }
  
  static int
! OpCancel(struct cmd_syndesc * as, char * rock)
  {
      struct state state;
  
--- 421,427 ----
  }
  
  static int
! OpCancel(struct cmd_syndesc * as, void * rock)
  {
      struct state state;
  
***************
*** 434,440 ****
  }
  
  static int
! OpCancelAll(struct cmd_syndesc * as, char * rock)
  {
      struct state state;
  
--- 434,440 ----
  }
  
  static int
! OpCancelAll(struct cmd_syndesc * as, void * rock)
  {
      struct state state;
  
***************
*** 447,453 ****
  }
  
  static int
! OpRaisePrio(struct cmd_syndesc * as, char * rock)
  {
      struct state state;
  
--- 447,453 ----
  }
  
  static int
! OpRaisePrio(struct cmd_syndesc * as, void * rock)
  {
      struct state state;
  
***************
*** 460,466 ****
  }
  
  static int
! OpQuery(struct cmd_syndesc * as, char * rock)
  {
      struct state state;
  
--- 460,466 ----
  }
  
  static int
! OpQuery(struct cmd_syndesc * as, void * rock)
  {
      struct state state;
  
Index: openafs/src/tviced/serialize_state.c
diff -c openafs/src/tviced/serialize_state.c:1.1.4.3 openafs/src/tviced/serialize_state.c:1.1.4.4
*** openafs/src/tviced/serialize_state.c:1.1.4.3	Mon Aug 20 13:39:08 2007
--- openafs/src/tviced/serialize_state.c	Tue Oct 30 11:16:47 2007
***************
*** 16,26 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/tviced/serialize_state.c,v 1.1.4.3 2007/08/20 17:39:08 jaltman Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>		/* for malloc() */
  #include <time.h>		/* ANSI standard location for time stuff */
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
  #include <io.h>
--- 16,27 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/tviced/serialize_state.c,v 1.1.4.4 2007/10/30 15:16:47 shadow Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>		/* for malloc() */
  #include <time.h>		/* ANSI standard location for time stuff */
+ #include <string.h>
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
  #include <io.h>
***************
*** 28,40 ****
  #include <sys/time.h>
  #include <sys/file.h>
  #endif
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <afs/assert.h>
  #include <sys/stat.h>
  
--- 29,34 ----
Index: openafs/src/tviced/state_analyzer.c
diff -c openafs/src/tviced/state_analyzer.c:1.1.4.1 openafs/src/tviced/state_analyzer.c:1.1.4.2
*** openafs/src/tviced/state_analyzer.c:1.1.4.1	Thu Feb  8 20:00:21 2007
--- openafs/src/tviced/state_analyzer.c	Tue Oct 30 11:16:47 2007
***************
*** 18,24 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/tviced/state_analyzer.c,v 1.1.4.1 2007/02/09 01:00:21 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
--- 18,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/tviced/state_analyzer.c,v 1.1.4.2 2007/10/30 15:16:47 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
***************
*** 26,39 ****
  #include <netdb.h>
  #include <netinet/in.h>
  #include <time.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include <afs/stds.h>
  #include <rx/xdr.h>
--- 26,32 ----
Index: openafs/src/ubik/Makefile.in
diff -c openafs/src/ubik/Makefile.in:1.12 openafs/src/ubik/Makefile.in:1.12.8.1
*** openafs/src/ubik/Makefile.in:1.12	Sat Oct  9 20:25:23 2004
--- openafs/src/ubik/Makefile.in	Thu Nov  1 12:02:30 2007
***************
*** 37,81 ****
  	${CC} ${CFLAGS} -o udebug udebug.o libubik.a $(LIBS)
  
  ubik_int.cs.c: ubik_int.xg
! 	${RXGEN} -x -C -o $@ ${srcdir}/ubik_int.xg
  
  ubik_int.ss.c: ubik_int.xg
! 	${RXGEN} -x -S -o $@ ${srcdir}/ubik_int.xg
  
  ubik_int.xdr.c: ubik_int.xg
! 	${RXGEN} -x -c -o $@ ${srcdir}/ubik_int.xg
  
  ubik_int.h: ubik_int.xg
! 	${RXGEN} -x -h -o $@ ${srcdir}/ubik_int.xg
  
  ubik_int.cs.c: ubik_int.h
  ubik_int.ss.c: ubik_int.h
  ubik_int.xdr.c: ubik_int.h
  
  Kubik_int.cs.c: ubik_int.xg Kubik_int.h
! 	${RXGEN} -x -k -C -o Kubik_int.cs.c ${srcdir}/ubik_int.xg
   
  Kubik_int.xdr.c: ubik_int.xg
! 	${RXGEN} -x -k -c -o Kubik_int.xdr.c ${srcdir}/ubik_int.xg
   
  Kubik_int.h: ubik_int.xg
! 	${RXGEN} -x -k -h -o Kubik_int.h ${srcdir}/ubik_int.xg
  
  utst_int.ss.o: utst_int.ss.c utst_int.xdr.c
  utst_int.cs.o: utst_int.cs.c utst_int.xdr.c
  utst_int.xdr.o: utst_int.xdr.c utst_int.h
  
  utst_int.cs.c: utst_int.xg
! 	${RXGEN} -C -o $@ ${srcdir}/utst_int.xg
  
  utst_int.ss.c: utst_int.xg
! 	${RXGEN} -S -o $@ ${srcdir}/utst_int.xg
  
  utst_int.xdr.c: utst_int.xg
! 	${RXGEN} -c -o $@ ${srcdir}/utst_int.xg
  
  utst_int.h: utst_int.xg
! 	${RXGEN} -h -o $@ ${srcdir}/utst_int.xg
  
  utst_int.cs.c: utst_int.h
  utst_int.ss.c: utst_int.h
--- 37,81 ----
  	${CC} ${CFLAGS} -o udebug udebug.o libubik.a $(LIBS)
  
  ubik_int.cs.c: ubik_int.xg
! 	${RXGEN} -x -A -C -o $@ ${srcdir}/ubik_int.xg
  
  ubik_int.ss.c: ubik_int.xg
! 	${RXGEN} -x -A -S -o $@ ${srcdir}/ubik_int.xg
  
  ubik_int.xdr.c: ubik_int.xg
! 	${RXGEN} -x -A -c -o $@ ${srcdir}/ubik_int.xg
  
  ubik_int.h: ubik_int.xg
! 	${RXGEN} -x -A -h -o $@ ${srcdir}/ubik_int.xg
  
  ubik_int.cs.c: ubik_int.h
  ubik_int.ss.c: ubik_int.h
  ubik_int.xdr.c: ubik_int.h
  
  Kubik_int.cs.c: ubik_int.xg Kubik_int.h
! 	${RXGEN} -x -k -A -C -o Kubik_int.cs.c ${srcdir}/ubik_int.xg
   
  Kubik_int.xdr.c: ubik_int.xg
! 	${RXGEN} -x -k -A -c -o Kubik_int.xdr.c ${srcdir}/ubik_int.xg
   
  Kubik_int.h: ubik_int.xg
! 	${RXGEN} -x -k -A -h -o Kubik_int.h ${srcdir}/ubik_int.xg
  
  utst_int.ss.o: utst_int.ss.c utst_int.xdr.c
  utst_int.cs.o: utst_int.cs.c utst_int.xdr.c
  utst_int.xdr.o: utst_int.xdr.c utst_int.h
  
  utst_int.cs.c: utst_int.xg
! 	${RXGEN} -A -C -o $@ ${srcdir}/utst_int.xg
  
  utst_int.ss.c: utst_int.xg
! 	${RXGEN} -A -S -o $@ ${srcdir}/utst_int.xg
  
  utst_int.xdr.c: utst_int.xg
! 	${RXGEN} -A -c -o $@ ${srcdir}/utst_int.xg
  
  utst_int.h: utst_int.xg
! 	${RXGEN} -A -h -o $@ ${srcdir}/utst_int.xg
  
  utst_int.cs.c: utst_int.h
  utst_int.ss.c: utst_int.h
Index: openafs/src/ubik/beacon.c
diff -c openafs/src/ubik/beacon.c:1.21 openafs/src/ubik/beacon.c:1.21.8.1
*** openafs/src/ubik/beacon.c:1.21	Wed Aug 18 21:07:51 2004
--- openafs/src/ubik/beacon.c	Tue Oct 30 11:16:47 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/beacon.c,v 1.21 2004/08/19 01:07:51 kolya Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/beacon.c,v 1.21.8.1 2007/10/30 15:16:47 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 26,38 ****
  #endif
  #include <errno.h>
  #include <lock.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <rx/xdr.h>
  #include <rx/rx.h>
  #include <rx/rx_multi.h>
--- 26,32 ----
Index: openafs/src/ubik/disk.c
diff -c openafs/src/ubik/disk.c:1.15 openafs/src/ubik/disk.c:1.15.4.1
*** openafs/src/ubik/disk.c:1.15	Sun Nov  6 04:29:46 2005
--- openafs/src/ubik/disk.c	Tue Oct 30 11:16:47 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/disk.c,v 1.15 2005/11/06 09:29:46 jaltman Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/disk.c,v 1.15.4.1 2007/10/30 15:16:47 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 21,33 ****
  #include <netinet/in.h>
  #endif
  #include <errno.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <lock.h>
  #include <rx/xdr.h>
  
--- 21,27 ----
Index: openafs/src/ubik/phys.c
diff -c openafs/src/ubik/phys.c:1.9 openafs/src/ubik/phys.c:1.9.2.1
*** openafs/src/ubik/phys.c:1.9	Thu Mar  9 01:35:00 2006
--- openafs/src/ubik/phys.c	Tue Oct 30 11:16:47 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/phys.c,v 1.9 2006/03/09 06:35:00 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/phys.c,v 1.9.2.1 2007/10/30 15:16:47 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 26,38 ****
  #include <lwp.h>
  #include <lock.h>
  #include <errno.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #define	UBIK_INTERNALS 1
  #include "ubik.h"
--- 26,32 ----
Index: openafs/src/ubik/recovery.c
diff -c openafs/src/ubik/recovery.c:1.14 openafs/src/ubik/recovery.c:1.14.4.1
*** openafs/src/ubik/recovery.c:1.14	Sun Nov  6 04:29:46 2005
--- openafs/src/ubik/recovery.c	Tue Oct 30 11:16:47 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/recovery.c,v 1.14 2005/11/06 09:29:46 jaltman Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/recovery.c,v 1.14.4.1 2007/10/30 15:16:47 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 24,36 ****
  #endif
  #include <assert.h>
  #include <lock.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <rx/xdr.h>
  #include <rx/rx.h>
  #include <errno.h>
--- 24,30 ----
Index: openafs/src/ubik/remote.c
diff -c openafs/src/ubik/remote.c:1.15.4.1 openafs/src/ubik/remote.c:1.15.4.2
*** openafs/src/ubik/remote.c:1.15.4.1	Fri Dec 15 11:39:46 2006
--- openafs/src/ubik/remote.c	Tue Oct 30 11:16:47 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/remote.c,v 1.15.4.1 2006/12/15 16:39:46 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/remote.c,v 1.15.4.2 2007/10/30 15:16:47 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 20,32 ****
  #include <sys/file.h>
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <lock.h>
  #include <rx/xdr.h>
  #include <rx/rx.h>
--- 20,26 ----
Index: openafs/src/ubik/ubik.c
diff -c openafs/src/ubik/ubik.c:1.15.14.1 openafs/src/ubik/ubik.c:1.15.14.2
*** openafs/src/ubik/ubik.c:1.15.14.1	Mon Jun 12 17:56:24 2006
--- openafs/src/ubik/ubik.c	Tue Oct 30 11:16:47 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/ubik.c,v 1.15.14.1 2006/06/12 21:56:24 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/ubik.c,v 1.15.14.2 2007/10/30 15:16:47 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 23,35 ****
  #endif
  #include <time.h>
  #include <lock.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <rx/xdr.h>
  #include <rx/rx.h>
  #include <afs/cellconfig.h>
--- 23,29 ----
Index: openafs/src/ubik/ubikcmd.c
diff -c openafs/src/ubik/ubikcmd.c:1.7 openafs/src/ubik/ubikcmd.c:1.7.14.1
*** openafs/src/ubik/ubikcmd.c:1.7	Tue Jul 15 19:17:05 2003
--- openafs/src/ubik/ubikcmd.c	Tue Oct 30 11:16:47 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/ubikcmd.c,v 1.7 2003/07/15 23:17:05 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/ubikcmd.c,v 1.7.14.1 2007/10/30 15:16:47 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 24,36 ****
  #endif
  #include <time.h>
  #include <lock.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <rx/xdr.h>
  #include <rx/rx.h>
  
--- 24,30 ----
Index: openafs/src/ubik/udebug.c
diff -c openafs/src/ubik/udebug.c:1.18 openafs/src/ubik/udebug.c:1.18.4.2
*** openafs/src/ubik/udebug.c:1.18	Tue Jun 21 18:19:09 2005
--- openafs/src/ubik/udebug.c	Wed Oct 31 00:09:38 2007
***************
*** 11,27 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/udebug.c,v 1.18 2005/06/21 22:19:09 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdlib.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #else
--- 11,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/udebug.c,v 1.18.4.2 2007/10/31 04:09:38 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdlib.h>
  #include <string.h>
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #else
***************
*** 90,96 ****
  }
  
  static int
! CommandProc(struct cmd_syndesc *as, char *arock)
  {
      char *hostName, *portName, *times;
      afs_int32 hostAddr;
--- 84,90 ----
  }
  
  static int
! CommandProc(struct cmd_syndesc *as, void *arock)
  {
      char *hostName, *portName, *times;
      afs_int32 hostAddr;
***************
*** 355,361 ****
      nsa.sa_flags = SA_FULLDUMP;
      sigaction(SIGSEGV, &nsa, NULL);
  #endif
!     ts = cmd_CreateSyntax(NULL, CommandProc, 0, "probe ubik server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server machine");
      cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "IP port");
      cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL, "print all info");
--- 349,355 ----
      nsa.sa_flags = SA_FULLDUMP;
      sigaction(SIGSEGV, &nsa, NULL);
  #endif
!     ts = cmd_CreateSyntax(NULL, CommandProc, NULL, "probe ubik server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "server machine");
      cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "IP port");
      cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL, "print all info");
Index: openafs/src/ubik/uinit.c
diff -c openafs/src/ubik/uinit.c:1.7.8.2 openafs/src/ubik/uinit.c:1.7.8.3
*** openafs/src/ubik/uinit.c:1.7.8.2	Thu Feb  8 20:00:22 2007
--- openafs/src/ubik/uinit.c	Tue Oct 30 11:16:47 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/uinit.c,v 1.7.8.2 2007/02/09 01:00:22 shadow Exp $");
  
  #include <afs/stds.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/uinit.c,v 1.7.8.3 2007/10/30 15:16:47 shadow Exp $");
  
  #include <afs/stds.h>
  #ifdef AFS_NT40_ENV
***************
*** 28,40 ****
  #include <sys/statfs.h>
  #endif
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include <afs/dirpath.h>
  #include <errno.h>
--- 28,34 ----
Index: openafs/src/ubik/utst_client.c
diff -c openafs/src/ubik/utst_client.c:1.7 openafs/src/ubik/utst_client.c:1.7.14.1
*** openafs/src/ubik/utst_client.c:1.7	Tue Jul 15 19:17:06 2003
--- openafs/src/ubik/utst_client.c	Tue Oct 30 11:16:47 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/utst_client.c,v 1.7 2003/07/15 23:17:06 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/utst_client.c,v 1.7.14.1 2007/10/30 15:16:47 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 24,36 ****
  #endif
  #include <time.h>
  #include <stdio.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <rx/xdr.h>
  #include <rx/rx.h>
  #include <lock.h>
--- 24,30 ----
Index: openafs/src/ubik/utst_server.c
diff -c openafs/src/ubik/utst_server.c:1.8 openafs/src/ubik/utst_server.c:1.8.14.1
*** openafs/src/ubik/utst_server.c:1.8	Tue Jul 15 19:17:06 2003
--- openafs/src/ubik/utst_server.c	Tue Oct 30 11:16:47 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/utst_server.c,v 1.8 2003/07/15 23:17:06 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/utst_server.c,v 1.8.14.1 2007/10/30 15:16:47 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 25,37 ****
  #endif
  #include <time.h>
  #include <stdio.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <rx/xdr.h>
  #include <rx/rx.h>
  #include <lock.h>
--- 25,31 ----
Index: openafs/src/ubik/vote.c
diff -c openafs/src/ubik/vote.c:1.14 openafs/src/ubik/vote.c:1.14.14.1
*** openafs/src/ubik/vote.c:1.14	Sun Dec  7 20:45:31 2003
--- openafs/src/ubik/vote.c	Tue Oct 30 11:16:47 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/vote.c,v 1.14 2003/12/08 01:45:31 jaltman Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/vote.c,v 1.14.14.1 2007/10/30 15:16:47 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 22,34 ****
  #endif
  #include <afs/afsutil.h>
  #include <lock.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <rx/xdr.h>
  #include <rx/rx.h>
  #include <afs/afsutil.h>
--- 22,28 ----
Index: openafs/src/update/Makefile.in
diff -c openafs/src/update/Makefile.in:1.8.14.1 openafs/src/update/Makefile.in:1.8.14.2
*** openafs/src/update/Makefile.in:1.8.14.1	Mon Jul  3 15:07:15 2006
--- openafs/src/update/Makefile.in	Thu Nov  1 12:02:30 2007
***************
*** 33,48 ****
  client.o server.o: update.h global.h AFS_component_version_number.c
  
  update.cs.c: update.xg
! 	${RXGEN} -u -C -o $@ ${srcdir}/update.xg
  
  update.ss.c: update.xg
! 	${RXGEN} -S -o $@ ${srcdir}/update.xg
  
  update.xdr.c: update.xg
! 	${RXGEN} -c -o $@ ${srcdir}/update.xg
  
  update.h: update.xg
! 	${RXGEN} -u -h -o $@ ${srcdir}/update.xg
  
  update.cs.c: update.h
  upcate.ss.c: update.h
--- 33,48 ----
  client.o server.o: update.h global.h AFS_component_version_number.c
  
  update.cs.c: update.xg
! 	${RXGEN} -A -u -C -o $@ ${srcdir}/update.xg
  
  update.ss.c: update.xg
! 	${RXGEN} -A -S -o $@ ${srcdir}/update.xg
  
  update.xdr.c: update.xg
! 	${RXGEN} -A -c -o $@ ${srcdir}/update.xg
  
  update.h: update.xg
! 	${RXGEN} -A -u -h -o $@ ${srcdir}/update.xg
  
  update.cs.c: update.h
  upcate.ss.c: update.h
Index: openafs/src/update/client.c
diff -c openafs/src/update/client.c:1.12.14.1 openafs/src/update/client.c:1.12.14.2
*** openafs/src/update/client.c:1.12.14.1	Tue Apr 10 14:39:55 2007
--- openafs/src/update/client.c	Tue Oct 30 11:16:47 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/update/client.c,v 1.12.14.1 2007/04/10 18:39:55 shadow Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/update/client.c,v 1.12.14.2 2007/10/30 15:16:47 shadow Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
***************
*** 36,48 ****
  #include <sys/time.h>
  #include <dirent.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
--- 36,42 ----
Index: openafs/src/update/server.c
diff -c openafs/src/update/server.c:1.13.14.3 openafs/src/update/server.c:1.13.14.4
*** openafs/src/update/server.c:1.13.14.3	Tue Apr 10 14:39:55 2007
--- openafs/src/update/server.c	Tue Oct 30 11:16:47 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/update/server.c,v 1.13.14.3 2007/04/10 18:39:55 shadow Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/update/server.c,v 1.13.14.4 2007/10/30 15:16:47 shadow Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
***************
*** 31,43 ****
  #include <sys/file.h>
  #include <dirent.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
--- 31,37 ----
Index: openafs/src/update/utils.c
diff -c openafs/src/update/utils.c:1.10 openafs/src/update/utils.c:1.10.14.1
*** openafs/src/update/utils.c:1.10	Wed Jun 23 10:27:46 2004
--- openafs/src/update/utils.c	Tue Oct 30 11:16:47 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/update/utils.c,v 1.10 2004/06/23 14:27:46 shadow Exp $");
  
  #include <afs/stds.h>
  #include <rx/rxkad.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/update/utils.c,v 1.10.14.1 2007/10/30 15:16:47 shadow Exp $");
  
  #include <afs/stds.h>
  #include <rx/rxkad.h>
***************
*** 22,34 ****
  #include <WINNT/afssw.h>
  #endif
  #include <stdio.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
--- 22,28 ----
Index: openafs/src/usd/usd_file.c
diff -c openafs/src/usd/usd_file.c:1.14 openafs/src/usd/usd_file.c:1.14.14.1
*** openafs/src/usd/usd_file.c:1.14	Wed Mar  3 17:41:05 2004
--- openafs/src/usd/usd_file.c	Tue Oct 30 11:16:47 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/usd/usd_file.c,v 1.14 2004/03/03 22:41:05 rees Exp $");
  
  #include <errno.h>
  #include <fcntl.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/usd/usd_file.c,v 1.14.14.1 2007/10/30 15:16:47 shadow Exp $");
  
  #include <errno.h>
  #include <fcntl.h>
***************
*** 31,43 ****
  #include <sys/mtio.h>
  #endif /* AFS_AIX_ENV */
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <stdlib.h>
  
  #include <afs/debug.h>
--- 31,37 ----
Index: openafs/src/uss/grammar.y
diff -c openafs/src/uss/grammar.y:1.4 openafs/src/uss/grammar.y:1.4.14.1
*** openafs/src/uss/grammar.y:1.4	Sat Oct 26 11:40:07 2002
--- openafs/src/uss/grammar.y	Tue Oct 30 11:16:48 2007
***************
*** 11,24 ****
  #include <afsconfig.h>
  #include <afs/param.h>
  #include <stdio.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  extern int line;
  extern int uss_perr;
--- 11,17 ----
Index: openafs/src/uss/lex.l
diff -c openafs/src/uss/lex.l:1.1 openafs/src/uss/lex.l:1.1.14.1
*** openafs/src/uss/lex.l:1.1	Thu Jun 19 12:55:10 2003
--- openafs/src/uss/lex.l	Tue Oct 30 11:16:48 2007
***************
*** 11,26 ****
  #include <afsconfig.h>
  #include <afs/param.h>
  
! RCSID("$Header: /cvs/openafs/src/uss/lex.l,v 1.1 2003/06/19 16:55:10 shadow Exp $");
  
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include "y.tab.h"
  #include "uss_common.h"
--- 11,20 ----
  #include <afsconfig.h>
  #include <afs/param.h>
  
! RCSID("$Header: /cvs/openafs/src/uss/lex.l,v 1.1.14.1 2007/10/30 15:16:48 shadow Exp $");
  
  
  #include <string.h>
  
  #include "y.tab.h"
  #include "uss_common.h"
Index: openafs/src/uss/uss.c
diff -c openafs/src/uss/uss.c:1.8 openafs/src/uss/uss.c:1.8.14.2
*** openafs/src/uss/uss.c:1.8	Mon Mar 15 13:51:03 2004
--- openafs/src/uss/uss.c	Wed Oct 31 00:09:39 2007
***************
*** 19,37 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss.c,v 1.8 2004/03/15 18:51:03 shadow Exp $");
  
  #ifdef	AFS_AIX32_ENV
  #include <signal.h>
  #endif
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include "uss_common.h"		/*Common uss definitions, globals */
  #include "uss_procs.h"		/*Main uss operations */
--- 19,31 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss.c,v 1.8.14.2 2007/10/31 04:09:39 shadow Exp $");
  
  #ifdef	AFS_AIX32_ENV
  #include <signal.h>
  #endif
  
  #include <string.h>
  
  #include "uss_common.h"		/*Common uss definitions, globals */
  #include "uss_procs.h"		/*Main uss operations */
***************
*** 129,138 ****
   *	As advertised.
   *------------------------------------------------------------------------*/
  
! static afs_int32
! GetCommon(a_as)
!      register struct cmd_syndesc *a_as;
! 
  {				/*GetCommon */
  
      int code;			/*Result of ka_LocalCell */
--- 123,130 ----
   *	As advertised.
   *------------------------------------------------------------------------*/
  
! static int
! GetCommon(register struct cmd_syndesc *a_as, void *arock)
  {				/*GetCommon */
  
      int code;			/*Result of ka_LocalCell */
***************
*** 376,385 ****
   *------------------------------------------------------------------------*/
  
  static int
! DelUser(a_as, a_rock)
!      struct cmd_syndesc *a_as;
!      char *a_rock;
! 
  {				/*DelUser */
  
      int code;
--- 368,374 ----
   *------------------------------------------------------------------------*/
  
  static int
! DelUser(struct cmd_syndesc *a_as, void *a_rock)
  {				/*DelUser */
  
      int code;
***************
*** 473,482 ****
   *------------------------------------------------------------------------*/
  
  static int
! PurgeVolumes(a_as, a_rock)
!      struct cmd_syndesc *a_as;
!      char *a_rock;
! 
  {				/*PurgeVolumes */
  
      fprintf(stderr, "Sorry, purgevolumes has not yet been implemented.\n");
--- 462,468 ----
   *------------------------------------------------------------------------*/
  
  static int
! PurgeVolumes(struct cmd_syndesc *a_as, void *a_rock)
  {				/*PurgeVolumes */
  
      fprintf(stderr, "Sorry, purgevolumes has not yet been implemented.\n");
***************
*** 508,517 ****
   *------------------------------------------------------------------------*/
  
  static int
! RestoreUser(a_as, a_rock)
!      struct cmd_syndesc *a_as;
!      char *a_rock;
! 
  {				/*RestoreUser */
  
      fprintf(stderr, "Sorry, restoreuser has not yet been implemented.\n");
--- 494,500 ----
   *------------------------------------------------------------------------*/
  
  static int
! RestoreUser(struct cmd_syndesc *a_as, void *a_rock)
  {				/*RestoreUser */
  
      fprintf(stderr, "Sorry, restoreuser has not yet been implemented.\n");
***************
*** 1323,1332 ****
   *------------------------------------------------------------------------*/
  extern int Pipe;
  static int
! HandleBulk(a_as, a_rock)
!      register struct cmd_syndesc *a_as;
!      char *a_rock;
! 
  {				/*HandleBulk */
  
  #define USS_BULK_CMD_CHARS	 128
--- 1306,1312 ----
   *------------------------------------------------------------------------*/
  extern int Pipe;
  static int
! HandleBulk(register struct cmd_syndesc *a_as, void *a_rock)
  {				/*HandleBulk */
  
  #define USS_BULK_CMD_CHARS	 128
***************
*** 1535,1544 ****
   *------------------------------------------------------------------------*/
  
  static int
! AddUser(a_as, a_rock)
!      register struct cmd_syndesc *a_as;
!      char *a_rock;
! 
  {				/*AddUser */
  
      int i;
--- 1515,1521 ----
   *------------------------------------------------------------------------*/
  
  static int
! AddUser(register struct cmd_syndesc *a_as, void *a_rock)
  {				/*AddUser */
  
      int i;
***************
*** 1849,1855 ****
  
      /* ----------------------------- add ----------------------------- */
  
!     cs = cmd_CreateSyntax("add", AddUser, 0, "create a new user account");
      cmd_AddParm(cs, "-user", CMD_SINGLE, 0, "login name");
      cmd_AddParm(cs, "-realname", CMD_SINGLE, CMD_OPTIONAL,
  		"full name in quotes");
--- 1826,1832 ----
  
      /* ----------------------------- add ----------------------------- */
  
!     cs = cmd_CreateSyntax("add", AddUser, NULL, "create a new user account");
      cmd_AddParm(cs, "-user", CMD_SINGLE, 0, "login name");
      cmd_AddParm(cs, "-realname", CMD_SINGLE, CMD_OPTIONAL,
  		"full name in quotes");
***************
*** 1884,1890 ****
  
      /* ---------------------------- bulk ----------------------------- */
  
!     cs = cmd_CreateSyntax("bulk", HandleBulk, 0, "bulk input mode");
      cmd_AddParm(cs, "-file", CMD_SINGLE, 0, "bulk input file");
      cmd_Seek(cs, AUSS_TEMPLATE);
      cmd_AddParm(cs, "-template", CMD_SINGLE, CMD_OPTIONAL,
--- 1861,1867 ----
  
      /* ---------------------------- bulk ----------------------------- */
  
!     cs = cmd_CreateSyntax("bulk", HandleBulk, NULL, "bulk input mode");
      cmd_AddParm(cs, "-file", CMD_SINGLE, 0, "bulk input file");
      cmd_Seek(cs, AUSS_TEMPLATE);
      cmd_AddParm(cs, "-template", CMD_SINGLE, CMD_OPTIONAL,
***************
*** 1909,1915 ****
  
      /* ---------------------------- delete --------------------------- */
  
!     cs = cmd_CreateSyntax("delete", DelUser, 0, "delete a user account");
      cmd_AddParm(cs, "-user", CMD_SINGLE, 0, "login name");
      cmd_AddParm(cs, "-mountpoint", CMD_SINGLE, CMD_OPTIONAL,
  		"mountpoint for user's volume");
--- 1886,1892 ----
  
      /* ---------------------------- delete --------------------------- */
  
!     cs = cmd_CreateSyntax("delete", DelUser, NULL, "delete a user account");
      cmd_AddParm(cs, "-user", CMD_SINGLE, 0, "login name");
      cmd_AddParm(cs, "-mountpoint", CMD_SINGLE, CMD_OPTIONAL,
  		"mountpoint for user's volume");
***************
*** 1943,1949 ****
  #if USS_DONT_HIDE_SOME_FEATURES
      /* ------------------------- purgevolumes ------------------------ */
  
!     cs = cmd_CreateSyntax("purgevolumes", PurgeVolumes, 0,
  			  "destroy a deleted user's volume");
      cmd_AddParm(cs, "-volname", CMD_LIST, CMD_OPTIONAL | CMD_EXPANDS,
  		"Name(s) of volume(s) to destroy");
--- 1920,1926 ----
  #if USS_DONT_HIDE_SOME_FEATURES
      /* ------------------------- purgevolumes ------------------------ */
  
!     cs = cmd_CreateSyntax("purgevolumes", PurgeVolumes, NULL,
  			  "destroy a deleted user's volume");
      cmd_AddParm(cs, "-volname", CMD_LIST, CMD_OPTIONAL | CMD_EXPANDS,
  		"Name(s) of volume(s) to destroy");
***************
*** 1966,1972 ****
  #if USS_DONT_HIDE_SOME_FEATURES
      /* ---------------------------- restore -------------------------- */
  
!     cs = cmd_CreateSyntax("restore", RestoreUser, 0,
  			  "restore a deleted user account");
      cmd_AddParm(cs, "-user", CMD_SINGLE, 0, "login name to restore");
      cmd_AddParm(cs, "-uid", CMD_SINGLE, 0, "user id number");
--- 1943,1949 ----
  #if USS_DONT_HIDE_SOME_FEATURES
      /* ---------------------------- restore -------------------------- */
  
!     cs = cmd_CreateSyntax("restore", RestoreUser, NULL,
  			  "restore a deleted user account");
      cmd_AddParm(cs, "-user", CMD_SINGLE, 0, "login name to restore");
      cmd_AddParm(cs, "-uid", CMD_SINGLE, 0, "user id number");
Index: openafs/src/uss/uss_acl.c
diff -c openafs/src/uss/uss_acl.c:1.6.14.1 openafs/src/uss/uss_acl.c:1.6.14.2
*** openafs/src/uss/uss_acl.c:1.6.14.1	Tue Apr 10 14:39:55 2007
--- openafs/src/uss/uss_acl.c	Tue Oct 30 11:16:48 2007
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_acl.c,v 1.6.14.1 2007/04/10 18:39:55 shadow Exp $");
  
  #include "uss_acl.h"
  #include "uss_common.h"
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_acl.c,v 1.6.14.2 2007/10/30 15:16:48 shadow Exp $");
  
  #include "uss_acl.h"
  #include "uss_common.h"
***************
*** 30,42 ****
  #include <netdb.h>
  #include <errno.h>
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #undef VIRTUE
  #undef VICE
--- 30,36 ----
Index: openafs/src/uss/uss_common.c
diff -c openafs/src/uss/uss_common.c:1.6 openafs/src/uss/uss_common.c:1.6.14.1
*** openafs/src/uss/uss_common.c:1.6	Tue Jul 15 19:17:12 2003
--- openafs/src/uss/uss_common.c	Tue Oct 30 11:16:48 2007
***************
*** 19,37 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_common.c,v 1.6 2003/07/15 23:17:12 shadow Exp $");
  
  #include "uss_common.h"		/*Interface definitions */
  #include <afs/kautils.h>	/*MAXKTCREALMLEN & MAXKTCNAMELEN */
  
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  
  /*
--- 19,30 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_common.c,v 1.6.14.1 2007/10/30 15:16:48 shadow Exp $");
  
  #include "uss_common.h"		/*Interface definitions */
  #include <afs/kautils.h>	/*MAXKTCREALMLEN & MAXKTCNAMELEN */
  
  #include <string.h>
  
  
  /*
Index: openafs/src/uss/uss_common.h
diff -c openafs/src/uss/uss_common.h:1.8 openafs/src/uss/uss_common.h:1.8.14.1
*** openafs/src/uss/uss_common.h:1.8	Tue Jul 15 19:17:12 2003
--- openafs/src/uss/uss_common.h	Tue Oct 30 11:16:48 2007
***************
*** 23,35 ****
  #include <stdio.h>		/*I/O stuff */
  #include <afs/afsutil.h>
  #include <errno.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  /*
   * --------------------- Exported definitions ---------------------
--- 23,29 ----
Index: openafs/src/uss/uss_fs.c
diff -c openafs/src/uss/uss_fs.c:1.8 openafs/src/uss/uss_fs.c:1.8.14.1
*** openafs/src/uss/uss_fs.c:1.8	Tue Jul 15 19:17:12 2003
--- openafs/src/uss/uss_fs.c	Tue Oct 30 11:16:48 2007
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_fs.c,v 1.8 2003/07/15 23:17:12 shadow Exp $");
  
  #include "uss_fs.h"		/*Interface to this module */
  #include <sys/types.h>
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_fs.c,v 1.8.14.1 2007/10/30 15:16:48 shadow Exp $");
  
  #include "uss_fs.h"		/*Interface to this module */
  #include <sys/types.h>
***************
*** 30,42 ****
  #endif
  #include <netinet/in.h>
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include <afs/venus.h>
  #include "uss_common.h"
--- 30,36 ----
Index: openafs/src/uss/uss_kauth.c
diff -c openafs/src/uss/uss_kauth.c:1.10.14.1 openafs/src/uss/uss_kauth.c:1.10.14.2
*** openafs/src/uss/uss_kauth.c:1.10.14.1	Tue Apr 10 14:39:55 2007
--- openafs/src/uss/uss_kauth.c	Tue Oct 30 11:16:48 2007
***************
*** 19,38 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_kauth.c,v 1.10.14.1 2007/04/10 18:39:55 shadow Exp $");
  
  #include "uss_kauth.h"		/*Module interface */
  #include "uss_common.h"		/*Common defs & operations */
  #include <errno.h>
  #include <pwd.h>
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include <afs/com_err.h>
  #include <afs/kautils.h> /*MAXKTCREALMLEN*/
--- 19,32 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_kauth.c,v 1.10.14.2 2007/10/30 15:16:48 shadow Exp $");
  
  #include "uss_kauth.h"		/*Module interface */
  #include "uss_common.h"		/*Common defs & operations */
  #include <errno.h>
  #include <pwd.h>
  
  #include <string.h>
  
  #include <afs/com_err.h>
  #include <afs/kautils.h> /*MAXKTCREALMLEN*/
Index: openafs/src/uss/uss_procs.c
diff -c openafs/src/uss/uss_procs.c:1.9 openafs/src/uss/uss_procs.c:1.9.14.1
*** openafs/src/uss/uss_procs.c:1.9	Tue Jul 15 19:17:12 2003
--- openafs/src/uss/uss_procs.c	Tue Oct 30 11:16:48 2007
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_procs.c,v 1.9 2003/07/15 23:17:12 shadow Exp $");
  
  #include "uss_procs.h"		/*Module interface */
  #include "uss_common.h"		/*Common defs & operations */
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_procs.c,v 1.9.14.1 2007/10/30 15:16:48 shadow Exp $");
  
  #include "uss_procs.h"		/*Module interface */
  #include "uss_common.h"		/*Common defs & operations */
***************
*** 33,45 ****
  #include <fcntl.h>
  #endif
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include <afs/kautils.h> /*MAXKTCREALMLEN*/
  #undef USS_PROCS_DB
--- 33,39 ----
Index: openafs/src/uss/uss_vol.c
diff -c openafs/src/uss/uss_vol.c:1.10.14.2 openafs/src/uss/uss_vol.c:1.10.14.3
*** openafs/src/uss/uss_vol.c:1.10.14.2	Tue Apr 10 14:39:55 2007
--- openafs/src/uss/uss_vol.c	Tue Oct 30 11:16:48 2007
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_vol.c,v 1.10.14.2 2007/04/10 18:39:55 shadow Exp $");
  
  #include "uss_vol.h"		/*Interface to this module */
  #include "uss_common.h"		/*Common definitions */
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_vol.c,v 1.10.14.3 2007/10/30 15:16:48 shadow Exp $");
  
  #include "uss_vol.h"		/*Interface to this module */
  #include "uss_common.h"		/*Common definitions */
***************
*** 30,42 ****
  #include <netdb.h>
  #include <errno.h>
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include <afs/vlserver.h>
  #include <afs/auth.h>
--- 30,36 ----
Index: openafs/src/util/afsutil.h
diff -c openafs/src/util/afsutil.h:1.21.2.1 openafs/src/util/afsutil.h:1.21.2.2
*** openafs/src/util/afsutil.h:1.21.2.1	Sun Jul  2 21:06:45 2006
--- openafs/src/util/afsutil.h	Wed Oct 31 00:26:18 2007
***************
*** 40,46 ****
  extern char *serverLogSyslogTag;
  #endif
  extern void vFSLog(const char *format, va_list args);
! extern void SetLogThreadNumProgram(int (*func) () );
  
  /*@printflike@*/ extern void FSLog(const char *format, ...);
  #define ViceLog(level, str)  if ((level) <= LogLevel) (FSLog str)
--- 40,46 ----
  extern char *serverLogSyslogTag;
  #endif
  extern void vFSLog(const char *format, va_list args);
! extern void SetLogThreadNumProgram(int (*func) (void) );
  
  /*@printflike@*/ extern void FSLog(const char *format, ...);
  #define ViceLog(level, str)  if ((level) <= LogLevel) (FSLog str)
Index: openafs/src/util/afsutil_prototypes.h
diff -c openafs/src/util/afsutil_prototypes.h:1.16 openafs/src/util/afsutil_prototypes.h:1.16.2.1
*** openafs/src/util/afsutil_prototypes.h:1.16	Fri Mar 17 14:54:46 2006
--- openafs/src/util/afsutil_prototypes.h	Wed Oct 31 00:26:18 2007
***************
*** 160,166 ****
  extern void SetupLogSignals(void);
  extern int OpenLog(const char *fileName);
  extern int ReOpenLog(const char *fileName);
! extern int LogThreadNum();
  
  /* snprintf.c */
  
--- 160,166 ----
  extern void SetupLogSignals(void);
  extern int OpenLog(const char *fileName);
  extern int ReOpenLog(const char *fileName);
! extern int LogThreadNum(void);
  
  /* snprintf.c */
  
Index: openafs/src/util/assert.c
diff -c openafs/src/util/assert.c:1.13 openafs/src/util/assert.c:1.13.4.2
*** openafs/src/util/assert.c:1.13	Sun Nov 13 09:16:25 2005
--- openafs/src/util/assert.c	Wed Oct 31 00:26:18 2007
***************
*** 14,29 ****
  #ifdef HAVE_SYS_TIME_H
  #include <sys/time.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/assert.c,v 1.13 2005/11/13 14:16:25 jaltman Exp $");
  
  #include <stdio.h>
  #include "afsutil.h"
--- 14,23 ----
  #ifdef HAVE_SYS_TIME_H
  #include <sys/time.h>
  #endif
  #include <string.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/assert.c,v 1.13.4.2 2007/10/31 04:26:18 shadow Exp $");
  
  #include <stdio.h>
  #include "afsutil.h"
***************
*** 44,50 ****
      time_t when;
  
      time(&when);
!     afs_ctime(&when, tdate, 25);
      fprintf(stderr, "%s: Assertion failed! file %s, line %d.\n", tdate, file,
  	    line);
      fflush(stderr);
--- 38,44 ----
      time_t when;
  
      time(&when);
!     (void)afs_ctime(&when, tdate, 25);
      fprintf(stderr, "%s: Assertion failed! file %s, line %d.\n", tdate, file,
  	    line);
      fflush(stderr);
Index: openafs/src/util/casestrcpy.c
diff -c openafs/src/util/casestrcpy.c:1.6.14.1 openafs/src/util/casestrcpy.c:1.6.14.2
*** openafs/src/util/casestrcpy.c:1.6.14.1	Mon Jul  3 23:57:25 2006
--- openafs/src/util/casestrcpy.c	Tue Oct 30 11:16:48 2007
***************
*** 11,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/casestrcpy.c,v 1.6.14.1 2006/07/04 03:57:25 shadow Exp $");
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <ctype.h>
  #include <stddef.h>
  #include <stdarg.h>
--- 11,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/casestrcpy.c,v 1.6.14.2 2007/10/30 15:16:48 shadow Exp $");
  
  #include <string.h>
  #include <ctype.h>
  #include <stddef.h>
  #include <stdarg.h>
Index: openafs/src/util/fileutil.c
diff -c openafs/src/util/fileutil.c:1.7 openafs/src/util/fileutil.c:1.7.14.1
*** openafs/src/util/fileutil.c:1.7	Tue Jul 15 19:17:16 2003
--- openafs/src/util/fileutil.c	Tue Oct 30 11:16:48 2007
***************
*** 13,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/fileutil.c,v 1.7 2003/07/15 23:17:16 shadow Exp $");
  
  #include <afs/stds.h>
  #include <stddef.h>
  #include <stdlib.h>
  #include <stdio.h>
  #include <errno.h>
  
  #ifdef AFS_NT40_ENV
  #include <windows.h>
--- 13,26 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/fileutil.c,v 1.7.14.1 2007/10/30 15:16:48 shadow Exp $");
  
  #include <afs/stds.h>
  #include <stddef.h>
  #include <stdlib.h>
  #include <stdio.h>
  #include <errno.h>
+ #include <string.h>
  
  #ifdef AFS_NT40_ENV
  #include <windows.h>
***************
*** 30,42 ****
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <sys/types.h>
  #include <dirent.h>
  #include <sys/stat.h>
--- 31,36 ----
Index: openafs/src/util/get_krbrlm.c
diff -c openafs/src/util/get_krbrlm.c:1.9.2.1 openafs/src/util/get_krbrlm.c:1.9.2.2
*** openafs/src/util/get_krbrlm.c:1.9.2.1	Tue Feb  6 23:53:18 2007
--- openafs/src/util/get_krbrlm.c	Tue Oct 30 11:16:48 2007
***************
*** 7,15 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/get_krbrlm.c,v 1.9.2.1 2007/02/07 04:53:18 jaltman Exp $");
  
  #include <stdio.h>
  #include "afsutil.h"
  
  /*
--- 7,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/get_krbrlm.c,v 1.9.2.2 2007/10/30 15:16:48 shadow Exp $");
  
  #include <stdio.h>
+ #include <string.h>
+ #include <ctype.h>
  #include "afsutil.h"
  
  /*
Index: openafs/src/util/hostparse.c
diff -c openafs/src/util/hostparse.c:1.15 openafs/src/util/hostparse.c:1.15.4.1
*** openafs/src/util/hostparse.c:1.15	Mon Nov 14 00:46:29 2005
--- openafs/src/util/hostparse.c	Tue Oct 30 11:16:48 2007
***************
*** 15,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/hostparse.c,v 1.15 2005/11/14 05:46:29 jaltman Exp $");
  
  #ifdef UKERNEL
  #include "afs/sysincludes.h"
--- 15,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/hostparse.c,v 1.15.4.1 2007/10/30 15:16:48 shadow Exp $");
  
  #ifdef UKERNEL
  #include "afs/sysincludes.h"
***************
*** 34,46 ****
  #include <netdb.h>
  #include <ctype.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <errno.h>
  #include "afsutil.h"
  #endif /* UKERNEL */
--- 34,40 ----
Index: openafs/src/util/kreltime.c
diff -c openafs/src/util/kreltime.c:1.9.2.5 openafs/src/util/kreltime.c:1.9.2.6
*** openafs/src/util/kreltime.c:1.9.2.5	Sat Oct 21 21:53:46 2006
--- openafs/src/util/kreltime.c	Tue Oct 30 11:16:48 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/kreltime.c,v 1.9.2.5 2006/10/22 01:53:46 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/kreltime.c,v 1.9.2.6 2007/10/30 15:16:48 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 19,31 ****
  #include "ktime.h"
  #include <time.h>
  #include <ctype.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include "afsutil.h"
  
  
--- 19,25 ----
Index: openafs/src/util/ktime.c
diff -c openafs/src/util/ktime.c:1.12 openafs/src/util/ktime.c:1.12.2.1
*** openafs/src/util/ktime.c:1.12	Mon Apr  3 12:22:30 2006
--- openafs/src/util/ktime.c	Tue Oct 30 11:16:48 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/ktime.c,v 1.12 2006/04/03 16:22:30 rees Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/ktime.c,v 1.12.2.1 2007/10/30 15:16:48 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
***************
*** 20,32 ****
  #ifdef AFS_NT40_ENV
  #include <malloc.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <stdlib.h>
  #include "afsutil.h"
  
--- 20,26 ----
Index: openafs/src/util/netutils.c
diff -c openafs/src/util/netutils.c:1.14.8.1 openafs/src/util/netutils.c:1.14.8.4
*** openafs/src/util/netutils.c:1.14.8.1	Fri Jan 12 00:20:33 2007
--- openafs/src/util/netutils.c	Wed Oct 31 08:36:18 2007
***************
*** 20,36 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/netutils.c,v 1.14.8.1 2007/01/12 05:20:33 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <ctype.h>
  #ifdef KERNEL
  #include "afs/sysincludes.h"
--- 20,30 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/netutils.c,v 1.14.8.4 2007/10/31 12:36:18 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
  #include <string.h>
  #include <ctype.h>
  #ifdef KERNEL
  #include "afs/sysincludes.h"
***************
*** 57,62 ****
--- 51,59 ----
  #define INADDR_LOOPBACK (afs_uint32)0x7f000001
  #endif
  
+ int ParseNetInfoFile_int(afs_uint32 *, afs_uint32 *, afs_uint32 *,
+                          int, char reason[], const char *,
+                          int);
  /* 
   * The line parameter is a pointer to a buffer containing a string of 
   * bytes of the form 
Index: openafs/src/util/serverLog.c
diff -c openafs/src/util/serverLog.c:1.33.4.1 openafs/src/util/serverLog.c:1.33.4.3
*** openafs/src/util/serverLog.c:1.33.4.1	Wed Jun  7 00:29:01 2006
--- openafs/src/util/serverLog.c	Wed Oct 31 00:26:18 2007
***************
*** 20,26 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/serverLog.c,v 1.33.4.1 2006/06/07 04:29:01 shadow Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
--- 20,26 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/serverLog.c,v 1.33.4.3 2007/10/31 04:26:18 shadow Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
***************
*** 37,49 ****
  #include <afs/procmgmt.h>	/* signal(), kill(), wait(), etc. */
  #include <fcntl.h>
  #include <afs/stds.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <sys/stat.h>
  #include "afsutil.h"
  #include "fileutil.h"
--- 37,43 ----
***************
*** 75,81 ****
  {
      return -1;
  }
! static int (*threadNumProgram) () = dummyThreadNum;
  
  static int serverLogFD = -1;
  
--- 69,75 ----
  {
      return -1;
  }
! static int (*threadNumProgram) (void) = dummyThreadNum;
  
  static int serverLogFD = -1;
  
***************
*** 93,99 ****
  static char ourName[MAXPATHLEN];
  
  void
! SetLogThreadNumProgram(int (*func) () )
  {
      threadNumProgram = func;
  }
--- 87,93 ----
  static char ourName[MAXPATHLEN];
  
  void
! SetLogThreadNumProgram(int (*func) (void) )
  {
      threadNumProgram = func;
  }
***************
*** 339,347 ****
  ReOpenLog(const char *fileName)
  {
      int isfifo = 0;
- #if !defined(AFS_PTHREAD_ENV)
-     int tempfd;
- #endif
  #if !defined(AFS_NT40_ENV)
      struct stat statbuf;
  #endif
--- 333,338 ----
Index: openafs/src/util/snprintf.c
diff -c openafs/src/util/snprintf.c:1.24 openafs/src/util/snprintf.c:1.24.4.1
*** openafs/src/util/snprintf.c:1.24	Sat Nov  5 01:48:27 2005
--- openafs/src/util/snprintf.c	Tue Oct 30 11:16:48 2007
***************
*** 4,15 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/snprintf.c,v 1.24 2005/11/05 06:48:27 jaltman Exp $");
  
  #include <sys/types.h>
  #include <stdarg.h>
  #include <stdio.h>
  #include <ctype.h>
  #ifndef AFS_NT40_ENV
  #include <netinet/in.h>
  #include <netdb.h>
--- 4,16 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/snprintf.c,v 1.24.4.1 2007/10/30 15:16:48 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdarg.h>
  #include <stdio.h>
  #include <ctype.h>
+ #include <string.h>
  #ifndef AFS_NT40_ENV
  #include <netinet/in.h>
  #include <netdb.h>
***************
*** 19,31 ****
  #if defined(AFS_AIX32_ENV) || defined(AFS_SUN_ENV) || defined(AFS_XBSD_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SGI65_ENV)
  #include <sys/socket.h>
  #endif
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #define MAXPREC 100
  
--- 20,25 ----
Index: openafs/src/util/softsig.c
diff -c openafs/src/util/softsig.c:1.10 openafs/src/util/softsig.c:1.10.2.1
*** openafs/src/util/softsig.c:1.10	Thu Feb 23 07:32:25 2006
--- openafs/src/util/softsig.c	Wed Oct 31 00:26:18 2007
***************
*** 15,20 ****
--- 15,21 ----
  #define _POSIX_PTHREAD_SEMANTICS
  #include <afs/param.h>
  #include <assert.h>
+ #include <stdlib.h>
  #include <stdio.h>
  #ifndef  AFS_NT40_ENV
  #include <signal.h>
Index: openafs/src/util/strlcat.c
diff -c openafs/src/util/strlcat.c:1.2 openafs/src/util/strlcat.c:1.2.14.1
*** openafs/src/util/strlcat.c:1.2	Tue Jul 15 19:17:16 2003
--- openafs/src/util/strlcat.c	Wed Oct 31 00:26:18 2007
***************
*** 18,28 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/strlcat.c,v 1.2 2003/07/15 23:17:16 shadow Exp $");
  
  #ifndef HAVE_STRLCAT
  
  #include <sys/types.h>
  
  /*
   * Appends src to string dst of size siz (unlike strncat, siz is the
--- 18,29 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/strlcat.c,v 1.2.14.1 2007/10/31 04:26:18 shadow Exp $");
  
  #ifndef HAVE_STRLCAT
  
  #include <sys/types.h>
+ #include <string.h>
  
  /*
   * Appends src to string dst of size siz (unlike strncat, siz is the
Index: openafs/src/util/sys.c
diff -c openafs/src/util/sys.c:1.6 openafs/src/util/sys.c:1.6.14.1
*** openafs/src/util/sys.c:1.6	Tue Jul 15 19:17:16 2003
--- openafs/src/util/sys.c	Wed Oct 31 00:26:18 2007
***************
*** 11,24 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/sys.c,v 1.6 2003/07/15 23:17:16 shadow Exp $");
  
  #include <stdio.h>
  
  #include "AFS_component_version_number.c"
  
  int
! main()
  {
      printf("%s\n", SYS_NAME);
      return 0;
--- 11,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/sys.c,v 1.6.14.1 2007/10/31 04:26:18 shadow Exp $");
  
  #include <stdio.h>
  
  #include "AFS_component_version_number.c"
  
  int
! main(int argc, char **argv)
  {
      printf("%s\n", SYS_NAME);
      return 0;
Index: openafs/src/util/uuid.c
diff -c openafs/src/util/uuid.c:1.17 openafs/src/util/uuid.c:1.17.4.1
*** openafs/src/util/uuid.c:1.17	Fri Dec 23 20:07:51 2005
--- openafs/src/util/uuid.c	Tue Oct 30 11:16:48 2007
***************
*** 50,56 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/uuid.c,v 1.17 2005/12/24 01:07:51 shadow Exp $");
  
  #ifdef KERNEL
  #include "afs/sysincludes.h"
--- 50,56 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/uuid.c,v 1.17.4.1 2007/10/30 15:16:48 shadow Exp $");
  
  #ifdef KERNEL
  #include "afs/sysincludes.h"
***************
*** 60,65 ****
--- 60,66 ----
  #else /* KERNEL */
  #include <stdio.h>
  #include <errno.h>
+ #include <string.h>
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #include <process.h>
***************
*** 73,85 ****
  #include <sys/time.h>
  #endif /* ITIMER_REAL */
  #include <net/if.h>
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
--- 74,79 ----
Index: openafs/src/util/volparse.c
diff -c openafs/src/util/volparse.c:1.11 openafs/src/util/volparse.c:1.11.14.1
*** openafs/src/util/volparse.c:1.11	Tue Jul 15 19:17:17 2003
--- openafs/src/util/volparse.c	Tue Oct 30 11:16:48 2007
***************
*** 11,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/volparse.c,v 1.11 2003/07/15 23:17:17 shadow Exp $");
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef HAVE_STDLIB_H
  #include <stdlib.h>
  #endif
--- 11,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/volparse.c,v 1.11.14.1 2007/10/30 15:16:48 shadow Exp $");
  
  #include <string.h>
  #ifdef HAVE_STDLIB_H
  #include <stdlib.h>
  #endif
Index: openafs/src/venus/cacheout.c
diff -c openafs/src/venus/cacheout.c:1.8 openafs/src/venus/cacheout.c:1.8.14.1
*** openafs/src/venus/cacheout.c:1.8	Tue Jul 15 19:17:19 2003
--- openafs/src/venus/cacheout.c	Wed Oct 31 00:09:39 2007
***************
*** 13,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/cacheout.c,v 1.8 2003/07/15 23:17:19 shadow Exp $");
  
  #include <stdio.h>
  #include <string.h>
--- 13,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/cacheout.c,v 1.8.14.1 2007/10/31 04:09:39 shadow Exp $");
  
  #include <stdio.h>
  #include <string.h>
***************
*** 63,71 ****
  
  extern int VL_GetAddrs();
  
! afs_int32
! InvalidateCache(as)
!      struct cmd_syndesc *as;
  {
      afs_int32 code = 0;
      struct cmd_item *u;
--- 63,70 ----
  
  extern int VL_GetAddrs();
  
! static int
! InvalidateCache(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code = 0;
      struct cmd_item *u;
***************
*** 212,221 ****
      return code;
  }
  
! afs_int32
! GetServerList()
  {
!     afs_int32 code;
      int i;
  
      code = ListServers();
--- 211,220 ----
      return code;
  }
  
! static int
! GetServerList(struct cmd_syndesc *as, void *arock)
  {
!     int code;
      int i;
  
      code = ListServers();
***************
*** 240,249 ****
  Command is executed in user's cell.
  */
  
! static
! MyBeforeProc(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      register char *tcell = NULL;
      char confdir[200];
--- 239,246 ----
  Command is executed in user's cell.
  */
  
! static int
! MyBeforeProc(struct cmd_syndesc *as, void *arock)
  {
      register char *tcell = NULL;
      char confdir[200];
***************
*** 308,320 ****
      cmd_SetBeforeProc(MyBeforeProc, NULL);
  
      ts = cmd_CreateSyntax("initcmd" /*"invalidatecache" */ , InvalidateCache,
! 			  0, "invalidate server ACL cache");
      cmd_AddParm(ts, "-id", CMD_LIST, CMD_OPTIONAL, "user identifier");
      cmd_AddParm(ts, "-ip", CMD_LIST, CMD_OPTIONAL, "IP address");
      cmd_CreateAlias(ts, "ic");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell name");
  
!     ts = cmd_CreateSyntax("listservers", GetServerList, 0,
  			  "list servers in the cell");
      cmd_CreateAlias(ts, "ls");
  
--- 305,317 ----
      cmd_SetBeforeProc(MyBeforeProc, NULL);
  
      ts = cmd_CreateSyntax("initcmd" /*"invalidatecache" */ , InvalidateCache,
! 			  NULL, "invalidate server ACL cache");
      cmd_AddParm(ts, "-id", CMD_LIST, CMD_OPTIONAL, "user identifier");
      cmd_AddParm(ts, "-ip", CMD_LIST, CMD_OPTIONAL, "IP address");
      cmd_CreateAlias(ts, "ic");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell name");
  
!     ts = cmd_CreateSyntax("listservers", GetServerList, NULL,
  			  "list servers in the cell");
      cmd_CreateAlias(ts, "ls");
  
Index: openafs/src/venus/cmdebug.c
diff -c openafs/src/venus/cmdebug.c:1.19.4.3 openafs/src/venus/cmdebug.c:1.19.4.5
*** openafs/src/venus/cmdebug.c:1.19.4.3	Tue Apr 10 14:39:56 2007
--- openafs/src/venus/cmdebug.c	Wed Oct 31 00:09:39 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/cmdebug.c,v 1.19.4.3 2007/04/10 18:39:56 shadow Exp $");
  
  
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/cmdebug.c,v 1.19.4.5 2007/10/31 04:09:39 shadow Exp $");
  
  
  #include <sys/types.h>
***************
*** 26,38 ****
  #include <netdb.h>
  #endif
  #include <stdio.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef	AFS_AIX32_ENV
  #include <signal.h>
  #endif
--- 26,32 ----
***************
*** 468,474 ****
  }
  
  int
! CommandProc(struct cmd_syndesc *as, char *arock)
  {
      struct rx_connection *conn;
      register char *hostName;
--- 462,468 ----
  }
  
  int
! CommandProc(struct cmd_syndesc *as, void *arock)
  {
      struct rx_connection *conn;
      register char *hostName;
***************
*** 558,564 ****
  
      rx_Init(0);
  
!     ts = cmd_CreateSyntax(NULL, CommandProc, 0, "probe unik server");
      cmd_AddParm(ts, "-servers", CMD_SINGLE, CMD_REQUIRED, "server machine");
      cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "IP port");
      cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL, "print all info");
--- 552,558 ----
  
      rx_Init(0);
  
!     ts = cmd_CreateSyntax(NULL, CommandProc, NULL, "probe unik server");
      cmd_AddParm(ts, "-servers", CMD_SINGLE, CMD_REQUIRED, "server machine");
      cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "IP port");
      cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL, "print all info");
Index: openafs/src/venus/dedebug.c
diff -c openafs/src/venus/dedebug.c:1.1.4.2 openafs/src/venus/dedebug.c:1.1.4.3
*** openafs/src/venus/dedebug.c:1.1.4.2	Tue Apr 10 14:39:56 2007
--- openafs/src/venus/dedebug.c	Wed Oct 31 00:09:39 2007
***************
*** 10,16 ****
  #include <afsconfig.h>
  #include <afs/param.h>
  
! RCSID("$Header: /cvs/openafs/src/venus/dedebug.c,v 1.1.4.2 2007/04/10 18:39:56 shadow Exp $");
  
  
  #include <sys/types.h>
--- 10,16 ----
  #include <afsconfig.h>
  #include <afs/param.h>
  
! RCSID("$Header: /cvs/openafs/src/venus/dedebug.c,v 1.1.4.3 2007/10/31 04:09:39 shadow Exp $");
  
  
  #include <sys/types.h>
***************
*** 55,62 ****
      return 0;
  }
  
! static CommandProc(as)
! struct cmd_syndesc *as; {
      struct rx_connection *conn;
      register char *hostName;
      register struct hostent *thp;
--- 55,63 ----
      return 0;
  }
  
! static int
! CommandProc(struct cmd_syndesc *as, void *arock)
! {
      struct rx_connection *conn;
      register char *hostName;
      register struct hostent *thp;
***************
*** 111,117 ****
  #endif
      rx_Init(0);
  
!     ts = cmd_CreateSyntax((char *) 0, CommandProc, 0, "probe unik server");
      cmd_AddParm(ts, "-servers", CMD_SINGLE, CMD_REQUIRED, "server machine");
      cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "IP port");
      cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL, "print all info");
--- 112,118 ----
  #endif
      rx_Init(0);
  
!     ts = cmd_CreateSyntax(NULL, CommandProc, NULL, "probe unik server");
      cmd_AddParm(ts, "-servers", CMD_SINGLE, CMD_REQUIRED, "server machine");
      cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "IP port");
      cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL, "print all info");
Index: openafs/src/venus/fs.c
diff -c openafs/src/venus/fs.c:1.30.2.10 openafs/src/venus/fs.c:1.30.2.12
*** openafs/src/venus/fs.c:1.30.2.10	Tue Oct 16 13:21:55 2007
--- openafs/src/venus/fs.c	Wed Oct 31 00:09:39 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/fs.c,v 1.30.2.10 2007/10/16 17:21:55 jaltman Exp $");
  
  #include <afs/afs_args.h>
  #include <rx/xdr.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/fs.c,v 1.30.2.12 2007/10/31 04:09:39 shadow Exp $");
  
  #include <afs/afs_args.h>
  #include <rx/xdr.h>
***************
*** 30,42 ****
  #include <signal.h>
  #endif
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #undef VIRTUE
  #undef VICE
--- 30,36 ----
***************
*** 75,88 ****
  extern struct hostent *hostutil_GetHostByName();
  
  
- extern struct cmd_syndesc *cmd_CreateSyntax();
  static char pn[] = "fs";
  static int rxInitDone = 0;
  
  static void ZapList();
  static int PruneList();
  static CleanAcl();
! static SetVolCmd();
  static GetCellName();
  static VLDBInit();
  static void Die();
--- 69,81 ----
  extern struct hostent *hostutil_GetHostByName();
  
  
  static char pn[] = "fs";
  static int rxInitDone = 0;
  
  static void ZapList();
  static int PruneList();
  static CleanAcl();
! static int SetVolCmd(struct cmd_syndesc *as, void *arock);
  static GetCellName();
  static VLDBInit();
  static void Die();
***************
*** 731,737 ****
  }
  
  static int
! SetACLCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 724,730 ----
  }
  
  static int
! SetACLCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 865,871 ****
  
  
  static int
! CopyACLCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 858,864 ----
  
  
  static int
! CopyACLCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1045,1051 ****
  
  /* clean up an acl to not have bogus entries */
  static int
! CleanACLCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct Acl *ta = 0;
--- 1038,1044 ----
  
  /* clean up an acl to not have bogus entries */
  static int
! CleanACLCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct Acl *ta = 0;
***************
*** 1132,1138 ****
  }
  
  static int
! ListACLCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct Acl *ta;
--- 1125,1131 ----
  }
  
  static int
! ListACLCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct Acl *ta;
***************
*** 1196,1202 ****
  }
  
  static int
! GetCallerAccess(struct cmd_syndesc *as, char *arock)
  {
      struct cmd_item *ti;
      int error = 0;
--- 1189,1195 ----
  }
  
  static int
! GetCallerAccess(struct cmd_syndesc *as, void *arock)
  {
      struct cmd_item *ti;
      int error = 0;
***************
*** 1223,1229 ****
  }
  
  static int
! FlushVolumeCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1216,1222 ----
  }
  
  static int
! FlushVolumeCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1251,1257 ****
   * CMD_OPTIONAL in the cmd_AddParam(-generate) call 
   */
  static int
! UuidCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1244,1250 ----
   * CMD_OPTIONAL in the cmd_AddParam(-generate) call 
   */
  static int
! UuidCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1282,1288 ****
  }
  
  static int
! FlushCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1275,1281 ----
  }
  
  static int
! FlushCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1309,1325 ****
  
  /* all this command does is repackage its args and call SetVolCmd */
  static int
! SetQuotaCmd(struct cmd_syndesc *as, char *arock)
  {
      struct cmd_syndesc ts;
  
      /* copy useful stuff from our command slot; we may later have to reorder */
      memcpy(&ts, as, sizeof(ts));	/* copy whole thing */
!     return SetVolCmd(&ts);
  }
  
  static int
! SetVolCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1302,1318 ----
  
  /* all this command does is repackage its args and call SetVolCmd */
  static int
! SetQuotaCmd(struct cmd_syndesc *as, void *arock)
  {
      struct cmd_syndesc ts;
  
      /* copy useful stuff from our command slot; we may later have to reorder */
      memcpy(&ts, as, sizeof(ts));	/* copy whole thing */
!     return SetVolCmd(&ts, arock);
  }
  
  static int
! SetVolCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1383,1389 ****
  };
  
  static int
! ExamineCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1376,1382 ----
  };
  
  static int
! ExamineCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1424,1430 ****
  }
  
  static int
! ListQuotaCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1417,1423 ----
  }
  
  static int
! ListQuotaCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1455,1461 ****
  }
  
  static int
! WhereIsCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1448,1454 ----
  }
  
  static int
! WhereIsCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1494,1500 ****
  
  
  static int
! DiskFreeCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1487,1493 ----
  
  
  static int
! DiskFreeCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1525,1531 ****
  }
  
  static int
! QuotaCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1518,1524 ----
  }
  
  static int
! QuotaCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1558,1564 ****
  }
  
  static int
! ListMountCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1551,1557 ----
  }
  
  static int
! ListMountCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1678,1685 ****
      return error;
  }
  
! static
! MakeMountCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      char *cellName, *volName, *tmpName;
--- 1671,1678 ----
      return error;
  }
  
! static int
! MakeMountCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      char *cellName, *volName, *tmpName;
***************
*** 1787,1793 ****
   *      tp: Set to point to the actual name of the mount point to nuke.
   */
  static int
! RemoveMountCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code = 0;
      struct ViceIoctl blob;
--- 1780,1786 ----
   *      tp: Set to point to the actual name of the mount point to nuke.
   */
  static int
! RemoveMountCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code = 0;
      struct ViceIoctl blob;
***************
*** 1839,1845 ****
  */
  
  static int
! CheckServersCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1832,1838 ----
  */
  
  static int
! CheckServersCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 1938,1944 ****
  }
  
  static int
! MessagesCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code = 0;
      struct ViceIoctl blob;
--- 1931,1937 ----
  }
  
  static int
! MessagesCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code = 0;
      struct ViceIoctl blob;
***************
*** 1984,1990 ****
  }
  
  static int
! CheckVolumesCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1977,1983 ----
  }
  
  static int
! CheckVolumesCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2002,2008 ****
  }
  
  static int
! SetCacheSizeCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 1995,2001 ----
  }
  
  static int
! SetCacheSizeCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2041,2047 ****
  
  #define MAXGCSIZE	16
  static int
! GetCacheParmsCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code, filesUsed;
      struct ViceIoctl blob;
--- 2034,2040 ----
  
  #define MAXGCSIZE	16
  static int
! GetCacheParmsCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code, filesUsed;
      struct ViceIoctl blob;
***************
*** 2115,2121 ****
  }
  
  static int
! ListCellsCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      afs_int32 i, j;
--- 2108,2114 ----
  }
  
  static int
! ListCellsCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      afs_int32 i, j;
***************
*** 2166,2172 ****
  }
  
  static int
! ListAliasesCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code, i;
      char *tp, *aliasName, *realName;
--- 2159,2165 ----
  }
  
  static int
! ListAliasesCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code, i;
      char *tp, *aliasName, *realName;
***************
*** 2196,2202 ****
  }
  
  static int
! CallBackRxConnCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2189,2195 ----
  }
  
  static int
! CallBackRxConnCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2235,2241 ****
  }
  
  static int
! NukeNFSCredsCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2228,2234 ----
  }
  
  static int
! NukeNFSCredsCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2266,2272 ****
  }
  
  static int
! NewCellCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code, linkedstate = 0, size = 0, *lp;
      struct ViceIoctl blob;
--- 2259,2265 ----
  }
  
  static int
! NewCellCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code, linkedstate = 0, size = 0, *lp;
      struct ViceIoctl blob;
***************
*** 2378,2384 ****
  }
  
  static int
! NewAliasCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2371,2377 ----
  }
  
  static int
! NewAliasCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2413,2419 ****
  }
  
  static int
! WhichCellCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct cmd_item *ti;
--- 2406,2412 ----
  }
  
  static int
! WhichCellCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct cmd_item *ti;
***************
*** 2438,2444 ****
  }
  
  static int
! WSCellCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2431,2437 ----
  }
  
  static int
! WSCellCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2468,2474 ****
  */
  
  static int
! MonitorCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2461,2467 ----
  */
  
  static int
! MonitorCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2529,2535 ****
  }
  
  static int
! SysNameCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2522,2528 ----
  }
  
  static int
! SysNameCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2583,2589 ****
  
  static char *exported_types[] = { "null", "nfs", "" };
  static int
! ExportAfsCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2576,2582 ----
  
  static char *exported_types[] = { "null", "nfs", "" };
  static int
! ExportAfsCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2710,2716 ****
  
  
  static int
! GetCellCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2703,2709 ----
  
  
  static int
! GetCellCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2761,2767 ****
  }
  
  static int
! SetCellCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 2754,2760 ----
  }
  
  static int
! SetCellCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 2945,2951 ****
  
  
  static int
! SetPrefCmd(struct cmd_syndesc *as, char *arock)
  {
      FILE *infd;
      afs_int32 code;
--- 2938,2944 ----
  
  
  static int
! SetPrefCmd(struct cmd_syndesc *as, void *arock)
  {
      FILE *infd;
      afs_int32 code;
***************
*** 3051,3057 ****
  
  
  static int
! GetPrefCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct cmd_item *ti;
--- 3044,3050 ----
  
  
  static int
! GetPrefCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct cmd_item *ti;
***************
*** 3121,3127 ****
  }
  
  static int
! StoreBehindCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code = 0;
      struct ViceIoctl blob;
--- 3114,3120 ----
  }
  
  static int
! StoreBehindCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code = 0;
      struct ViceIoctl blob;
***************
*** 3221,3228 ****
  }
  
  
! static afs_int32
! SetCryptCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code = 0, flag;
      struct ViceIoctl blob;
--- 3214,3221 ----
  }
  
  
! static int
! SetCryptCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code = 0, flag;
      struct ViceIoctl blob;
***************
*** 3248,3255 ****
  }
  
  
! static afs_int32
! GetCryptCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code = 0, flag;
      struct ViceIoctl blob;
--- 3241,3248 ----
  }
  
  
! static int
! GetCryptCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code = 0, flag;
      struct ViceIoctl blob;
***************
*** 3286,3293 ****
      NULL
  };
  
! static afs_int32
! DisconCmd(struct cmd_syndesc *as, char *arock)
  {
      struct cmd_item *ti;
      char *modename;
--- 3279,3286 ----
      NULL
  };
  
! static int
! DisconCmd(struct cmd_syndesc *as, void *arock)
  {
      struct cmd_item *ti;
      char *modename;
***************
*** 3355,3371 ****
  #endif
  
      /* try to find volume location information */
!     ts = cmd_CreateSyntax("getclientaddrs", GetClientAddrsCmd, 0,
  			  "get client network interface addresses");
      cmd_CreateAlias(ts, "gc");
  
!     ts = cmd_CreateSyntax("setclientaddrs", SetClientAddrsCmd, 0,
  			  "set client network interface addresses");
      cmd_AddParm(ts, "-address", CMD_LIST, CMD_OPTIONAL | CMD_EXPANDS,
  		"client network interfaces");
      cmd_CreateAlias(ts, "sc");
  
!     ts = cmd_CreateSyntax("setserverprefs", SetPrefCmd, 0,
  			  "set server ranks");
      cmd_AddParm(ts, "-servers", CMD_LIST, CMD_OPTIONAL | CMD_EXPANDS,
  		"fileserver names and ranks");
--- 3348,3364 ----
  #endif
  
      /* try to find volume location information */
!     ts = cmd_CreateSyntax("getclientaddrs", GetClientAddrsCmd, NULL,
  			  "get client network interface addresses");
      cmd_CreateAlias(ts, "gc");
  
!     ts = cmd_CreateSyntax("setclientaddrs", SetClientAddrsCmd, NULL,
  			  "set client network interface addresses");
      cmd_AddParm(ts, "-address", CMD_LIST, CMD_OPTIONAL | CMD_EXPANDS,
  		"client network interfaces");
      cmd_CreateAlias(ts, "sc");
  
!     ts = cmd_CreateSyntax("setserverprefs", SetPrefCmd, NULL,
  			  "set server ranks");
      cmd_AddParm(ts, "-servers", CMD_LIST, CMD_OPTIONAL | CMD_EXPANDS,
  		"fileserver names and ranks");
***************
*** 3376,3382 ****
      cmd_AddParm(ts, "-stdin", CMD_FLAG, CMD_OPTIONAL, "input from stdin");
      cmd_CreateAlias(ts, "sp");
  
!     ts = cmd_CreateSyntax("getserverprefs", GetPrefCmd, 0,
  			  "get server ranks");
      cmd_AddParm(ts, "-file", CMD_SINGLE, CMD_OPTIONAL,
  		"output to named file");
--- 3369,3375 ----
      cmd_AddParm(ts, "-stdin", CMD_FLAG, CMD_OPTIONAL, "input from stdin");
      cmd_CreateAlias(ts, "sp");
  
!     ts = cmd_CreateSyntax("getserverprefs", GetPrefCmd, NULL,
  			  "get server ranks");
      cmd_AddParm(ts, "-file", CMD_SINGLE, CMD_OPTIONAL,
  		"output to named file");
***************
*** 3385,3391 ****
  /*    cmd_AddParm(ts, "-cell", CMD_FLAG, CMD_OPTIONAL, "cellname"); */
      cmd_CreateAlias(ts, "gp");
  
!     ts = cmd_CreateSyntax("setacl", SetACLCmd, 0, "set access control list");
      cmd_AddParm(ts, "-dir", CMD_LIST, 0, "directory");
      cmd_AddParm(ts, "-acl", CMD_LIST, 0, "access list entries");
      cmd_AddParm(ts, "-clear", CMD_FLAG, CMD_OPTIONAL, "clear access list");
--- 3378,3384 ----
  /*    cmd_AddParm(ts, "-cell", CMD_FLAG, CMD_OPTIONAL, "cellname"); */
      cmd_CreateAlias(ts, "gp");
  
!     ts = cmd_CreateSyntax("setacl", SetACLCmd, NULL, "set access control list");
      cmd_AddParm(ts, "-dir", CMD_LIST, 0, "directory");
      cmd_AddParm(ts, "-acl", CMD_LIST, 0, "access list entries");
      cmd_AddParm(ts, "-clear", CMD_FLAG, CMD_OPTIONAL, "clear access list");
***************
*** 3398,3404 ****
  		"initial file acl (DFS only)");
      cmd_CreateAlias(ts, "sa");
  
!     ts = cmd_CreateSyntax("listacl", ListACLCmd, 0,
  			  "list access control list");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      parm_listacl_id = ts->nParms;
--- 3391,3397 ----
  		"initial file acl (DFS only)");
      cmd_CreateAlias(ts, "sa");
  
!     ts = cmd_CreateSyntax("listacl", ListACLCmd, NULL,
  			  "list access control list");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      parm_listacl_id = ts->nParms;
***************
*** 3406,3421 ****
      cmd_AddParm(ts, "-if", CMD_FLAG, CMD_OPTIONAL, "initial file acl");
      cmd_CreateAlias(ts, "la");
  
!     ts = cmd_CreateSyntax("getcalleraccess", GetCallerAccess, 0,
              "list callers access");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      cmd_CreateAlias(ts, "gca");
  
!     ts = cmd_CreateSyntax("cleanacl", CleanACLCmd, 0,
  			  "clean up access control list");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
!     ts = cmd_CreateSyntax("copyacl", CopyACLCmd, 0,
  			  "copy access control list");
      cmd_AddParm(ts, "-fromdir", CMD_SINGLE, 0,
  		"source directory (or DFS file)");
--- 3399,3414 ----
      cmd_AddParm(ts, "-if", CMD_FLAG, CMD_OPTIONAL, "initial file acl");
      cmd_CreateAlias(ts, "la");
  
!     ts = cmd_CreateSyntax("getcalleraccess", GetCallerAccess, NULL,
              "list callers access");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      cmd_CreateAlias(ts, "gca");
  
!     ts = cmd_CreateSyntax("cleanacl", CleanACLCmd, NULL,
  			  "clean up access control list");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
!     ts = cmd_CreateSyntax("copyacl", CopyACLCmd, NULL,
  			  "copy access control list");
      cmd_AddParm(ts, "-fromdir", CMD_SINGLE, 0,
  		"source directory (or DFS file)");
***************
*** 3429,3441 ****
  
      cmd_CreateAlias(ts, "ca");
  
!     ts = cmd_CreateSyntax("flush", FlushCmd, 0, "flush file from cache");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
!     ts = cmd_CreateSyntax("flushmount", FlushMountCmd, 0,
  			  "flush mount symlink from cache");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
!     ts = cmd_CreateSyntax("setvol", SetVolCmd, 0, "set volume status");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      cmd_AddParm(ts, "-max", CMD_SINGLE, CMD_OPTIONAL,
  		"disk space quota in 1K units");
--- 3422,3434 ----
  
      cmd_CreateAlias(ts, "ca");
  
!     ts = cmd_CreateSyntax("flush", FlushCmd, NULL, "flush file from cache");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
!     ts = cmd_CreateSyntax("flushmount", FlushMountCmd, NULL,
  			  "flush mount symlink from cache");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
!     ts = cmd_CreateSyntax("setvol", SetVolCmd, NULL, "set volume status");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      cmd_AddParm(ts, "-max", CMD_SINGLE, CMD_OPTIONAL,
  		"disk space quota in 1K units");
***************
*** 3448,3479 ****
  		"offline message");
      cmd_CreateAlias(ts, "sv");
  
!     ts = cmd_CreateSyntax("messages", MessagesCmd, 0,
  			  "control Cache Manager messages");
      cmd_AddParm(ts, "-show", CMD_SINGLE, CMD_OPTIONAL,
  		"[user|console|all|none]");
  
!     ts = cmd_CreateSyntax("examine", ExamineCmd, 0, "display file/volume status");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      cmd_CreateAlias(ts, "lv");
      cmd_CreateAlias(ts, "listvol");
  
!     ts = cmd_CreateSyntax("listquota", ListQuotaCmd, 0, "list volume quota");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      cmd_CreateAlias(ts, "lq");
  
!     ts = cmd_CreateSyntax("diskfree", DiskFreeCmd, 0,
  			  "show server disk space usage");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      cmd_CreateAlias(ts, "df");
  
!     ts = cmd_CreateSyntax("quota", QuotaCmd, 0, "show volume quota usage");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
!     ts = cmd_CreateSyntax("lsmount", ListMountCmd, 0, "list mount point");
      cmd_AddParm(ts, "-dir", CMD_LIST, 0, "directory");
  
!     ts = cmd_CreateSyntax("mkmount", MakeMountCmd, 0, "make mount point");
      cmd_AddParm(ts, "-dir", CMD_SINGLE, 0, "directory");
      cmd_AddParm(ts, "-vol", CMD_SINGLE, 0, "volume name");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell name");
--- 3441,3472 ----
  		"offline message");
      cmd_CreateAlias(ts, "sv");
  
!     ts = cmd_CreateSyntax("messages", MessagesCmd, NULL,
  			  "control Cache Manager messages");
      cmd_AddParm(ts, "-show", CMD_SINGLE, CMD_OPTIONAL,
  		"[user|console|all|none]");
  
!     ts = cmd_CreateSyntax("examine", ExamineCmd, NULL, "display file/volume status");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      cmd_CreateAlias(ts, "lv");
      cmd_CreateAlias(ts, "listvol");
  
!     ts = cmd_CreateSyntax("listquota", ListQuotaCmd, NULL, "list volume quota");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      cmd_CreateAlias(ts, "lq");
  
!     ts = cmd_CreateSyntax("diskfree", DiskFreeCmd, NULL,
  			  "show server disk space usage");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
      cmd_CreateAlias(ts, "df");
  
!     ts = cmd_CreateSyntax("quota", QuotaCmd, NULL, "show volume quota usage");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
!     ts = cmd_CreateSyntax("lsmount", ListMountCmd, NULL, "list mount point");
      cmd_AddParm(ts, "-dir", CMD_LIST, 0, "directory");
  
!     ts = cmd_CreateSyntax("mkmount", MakeMountCmd, NULL, "make mount point");
      cmd_AddParm(ts, "-dir", CMD_SINGLE, 0, "directory");
      cmd_AddParm(ts, "-vol", CMD_SINGLE, 0, "volume name");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell name");
***************
*** 3489,3498 ****
  */
  
  
!     ts = cmd_CreateSyntax("rmmount", RemoveMountCmd, 0, "remove mount point");
      cmd_AddParm(ts, "-dir", CMD_LIST, 0, "directory");
  
!     ts = cmd_CreateSyntax("checkservers", CheckServersCmd, 0,
  			  "check local cell's servers");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell to check");
      cmd_AddParm(ts, "-all", CMD_FLAG, CMD_OPTIONAL, "check all cells");
--- 3482,3491 ----
  */
  
  
!     ts = cmd_CreateSyntax("rmmount", RemoveMountCmd, NULL, "remove mount point");
      cmd_AddParm(ts, "-dir", CMD_LIST, 0, "directory");
  
!     ts = cmd_CreateSyntax("checkservers", CheckServersCmd, NULL,
  			  "check local cell's servers");
      cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell to check");
      cmd_AddParm(ts, "-all", CMD_FLAG, CMD_OPTIONAL, "check all cells");
***************
*** 3501,3512 ****
      cmd_AddParm(ts, "-interval", CMD_SINGLE, CMD_OPTIONAL,
  		"seconds between probes");
  
!     ts = cmd_CreateSyntax("checkvolumes", CheckVolumesCmd, 0,
  			  "check volumeID/name mappings");
      cmd_CreateAlias(ts, "checkbackups");
  
  
!     ts = cmd_CreateSyntax("setcachesize", SetCacheSizeCmd, 0,
  			  "set cache size");
      cmd_AddParm(ts, "-blocks", CMD_SINGLE, CMD_OPTIONAL,
  		"size in 1K byte blocks (0 => reset)");
--- 3494,3505 ----
      cmd_AddParm(ts, "-interval", CMD_SINGLE, CMD_OPTIONAL,
  		"seconds between probes");
  
!     ts = cmd_CreateSyntax("checkvolumes", CheckVolumesCmd, NULL,
  			  "check volumeID/name mappings");
      cmd_CreateAlias(ts, "checkbackups");
  
  
!     ts = cmd_CreateSyntax("setcachesize", SetCacheSizeCmd, NULL,
  			  "set cache size");
      cmd_AddParm(ts, "-blocks", CMD_SINGLE, CMD_OPTIONAL,
  		"size in 1K byte blocks (0 => reset)");
***************
*** 3515,3533 ****
      cmd_AddParm(ts, "-reset", CMD_FLAG, CMD_OPTIONAL,
  		"reset size back to boot value");
  
!     ts = cmd_CreateSyntax("getcacheparms", GetCacheParmsCmd, 0,
  			  "get cache usage info");
      cmd_AddParm(ts, "-files", CMD_FLAG, CMD_OPTIONAL, "Show cach files used as well");
      cmd_AddParm(ts, "-excessive", CMD_FLAG, CMD_OPTIONAL, "excessively verbose cache stats");
  
!     ts = cmd_CreateSyntax("listcells", ListCellsCmd, 0,
  			  "list configured cells");
      cmd_AddParm(ts, "-numeric", CMD_FLAG, CMD_OPTIONAL, "addresses only");
  
!     ts = cmd_CreateSyntax("listaliases", ListAliasesCmd, 0,
  			  "list configured cell aliases");
  
!     ts = cmd_CreateSyntax("setquota", SetQuotaCmd, 0, "set volume quota");
      cmd_AddParm(ts, "-path", CMD_SINGLE, CMD_OPTIONAL, "dir/file path");
      cmd_AddParm(ts, "-max", CMD_SINGLE, 0, "max quota in kbytes");
  #ifdef notdef
--- 3508,3526 ----
      cmd_AddParm(ts, "-reset", CMD_FLAG, CMD_OPTIONAL,
  		"reset size back to boot value");
  
!     ts = cmd_CreateSyntax("getcacheparms", GetCacheParmsCmd, NULL,
  			  "get cache usage info");
      cmd_AddParm(ts, "-files", CMD_FLAG, CMD_OPTIONAL, "Show cach files used as well");
      cmd_AddParm(ts, "-excessive", CMD_FLAG, CMD_OPTIONAL, "excessively verbose cache stats");
  
!     ts = cmd_CreateSyntax("listcells", ListCellsCmd, NULL,
  			  "list configured cells");
      cmd_AddParm(ts, "-numeric", CMD_FLAG, CMD_OPTIONAL, "addresses only");
  
!     ts = cmd_CreateSyntax("listaliases", ListAliasesCmd, NULL,
  			  "list configured cell aliases");
  
!     ts = cmd_CreateSyntax("setquota", SetQuotaCmd, NULL, "set volume quota");
      cmd_AddParm(ts, "-path", CMD_SINGLE, CMD_OPTIONAL, "dir/file path");
      cmd_AddParm(ts, "-max", CMD_SINGLE, 0, "max quota in kbytes");
  #ifdef notdef
***************
*** 3535,3547 ****
  #endif
      cmd_CreateAlias(ts, "sq");
  
!     ts = cmd_CreateSyntax("newcell", NewCellCmd, 0, "configure new cell");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "cell name");
      cmd_AddParm(ts, "-servers", CMD_LIST, CMD_REQUIRED, "primary servers");
      cmd_AddParm(ts, "-linkedcell", CMD_SINGLE, CMD_OPTIONAL,
  		"linked cell name");
  
!     ts = cmd_CreateSyntax("newalias", NewAliasCmd, 0,
  			  "configure new cell alias");
      cmd_AddParm(ts, "-alias", CMD_SINGLE, 0, "alias name");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "real name of cell");
--- 3528,3540 ----
  #endif
      cmd_CreateAlias(ts, "sq");
  
!     ts = cmd_CreateSyntax("newcell", NewCellCmd, NULL, "configure new cell");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "cell name");
      cmd_AddParm(ts, "-servers", CMD_LIST, CMD_REQUIRED, "primary servers");
      cmd_AddParm(ts, "-linkedcell", CMD_SINGLE, CMD_OPTIONAL,
  		"linked cell name");
  
!     ts = cmd_CreateSyntax("newalias", NewAliasCmd, NULL,
  			  "configure new cell alias");
      cmd_AddParm(ts, "-alias", CMD_SINGLE, 0, "alias name");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "real name of cell");
***************
*** 3559,3600 ****
  		"cell's vldb server port");
  #endif
  
!     ts = cmd_CreateSyntax("whichcell", WhichCellCmd, 0, "list file's cell");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
!     ts = cmd_CreateSyntax("whereis", WhereIsCmd, 0, "list file's location");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
!     ts = cmd_CreateSyntax("wscell", WSCellCmd, 0, "list workstation's cell");
  
  /*
!     ts = cmd_CreateSyntax("primarycell", PrimaryCellCmd, 0, "obsolete (listed primary cell)");
  */
  
      /* set cache monitor host address */
!     ts = cmd_CreateSyntax("monitor", MonitorCmd, 0, (char *)CMD_HIDDEN);
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL,
  		"host name or 'off'");
      cmd_CreateAlias(ts, "mariner");
  
!     ts = cmd_CreateSyntax("getcellstatus", GetCellCmd, 0, "get cell status");
      cmd_AddParm(ts, "-cell", CMD_LIST, 0, "cell name");
  
!     ts = cmd_CreateSyntax("setcell", SetCellCmd, 0, "set cell status");
      cmd_AddParm(ts, "-cell", CMD_LIST, 0, "cell name");
      cmd_AddParm(ts, "-suid", CMD_FLAG, CMD_OPTIONAL, "allow setuid programs");
      cmd_AddParm(ts, "-nosuid", CMD_FLAG, CMD_OPTIONAL,
  		"disallow setuid programs");
  
!     ts = cmd_CreateSyntax("flushvolume", FlushVolumeCmd, 0,
  			  "flush all data in volume");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
!     ts = cmd_CreateSyntax("sysname", SysNameCmd, 0,
  			  "get/set sysname (i.e. @sys) value");
      cmd_AddParm(ts, "-newsys", CMD_LIST, CMD_OPTIONAL, "new sysname");
  
!     ts = cmd_CreateSyntax("exportafs", ExportAfsCmd, 0,
  			  "enable/disable translators to AFS");
      cmd_AddParm(ts, "-type", CMD_SINGLE, 0, "exporter name");
      cmd_AddParm(ts, "-start", CMD_SINGLE, CMD_OPTIONAL,
--- 3552,3593 ----
  		"cell's vldb server port");
  #endif
  
!     ts = cmd_CreateSyntax("whichcell", WhichCellCmd, NULL, "list file's cell");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
!     ts = cmd_CreateSyntax("whereis", WhereIsCmd, NULL, "list file's location");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
!     ts = cmd_CreateSyntax("wscell", WSCellCmd, NULL, "list workstation's cell");
  
  /*
!     ts = cmd_CreateSyntax("primarycell", PrimaryCellCmd, NULL, "obsolete (listed primary cell)");
  */
  
      /* set cache monitor host address */
!     ts = cmd_CreateSyntax("monitor", MonitorCmd, NULL, (char *)CMD_HIDDEN);
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL,
  		"host name or 'off'");
      cmd_CreateAlias(ts, "mariner");
  
!     ts = cmd_CreateSyntax("getcellstatus", GetCellCmd, NULL, "get cell status");
      cmd_AddParm(ts, "-cell", CMD_LIST, 0, "cell name");
  
!     ts = cmd_CreateSyntax("setcell", SetCellCmd, NULL, "set cell status");
      cmd_AddParm(ts, "-cell", CMD_LIST, 0, "cell name");
      cmd_AddParm(ts, "-suid", CMD_FLAG, CMD_OPTIONAL, "allow setuid programs");
      cmd_AddParm(ts, "-nosuid", CMD_FLAG, CMD_OPTIONAL,
  		"disallow setuid programs");
  
!     ts = cmd_CreateSyntax("flushvolume", FlushVolumeCmd, NULL,
  			  "flush all data in volume");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
!     ts = cmd_CreateSyntax("sysname", SysNameCmd, NULL,
  			  "get/set sysname (i.e. @sys) value");
      cmd_AddParm(ts, "-newsys", CMD_LIST, CMD_OPTIONAL, "new sysname");
  
!     ts = cmd_CreateSyntax("exportafs", ExportAfsCmd, NULL,
  			  "enable/disable translators to AFS");
      cmd_AddParm(ts, "-type", CMD_SINGLE, 0, "exporter name");
      cmd_AddParm(ts, "-start", CMD_SINGLE, CMD_OPTIONAL,
***************
*** 3611,3617 ****
  		"enable callbacks to get creds from new clients (on  | off)");
  
  
!     ts = cmd_CreateSyntax("storebehind", StoreBehindCmd, 0,
  			  "store to server after file close");
      cmd_AddParm(ts, "-kbytes", CMD_SINGLE, CMD_OPTIONAL,
  		"asynchrony for specified names");
--- 3604,3610 ----
  		"enable callbacks to get creds from new clients (on  | off)");
  
  
!     ts = cmd_CreateSyntax("storebehind", StoreBehindCmd, NULL,
  			  "store to server after file close");
      cmd_AddParm(ts, "-kbytes", CMD_SINGLE, CMD_OPTIONAL,
  		"asynchrony for specified names");
***************
*** 3621,3663 ****
      cmd_AddParm(ts, "-verbose", CMD_FLAG, CMD_OPTIONAL, "show status");
      cmd_CreateAlias(ts, "sb");
  
!     ts = cmd_CreateSyntax("setcrypt", SetCryptCmd, 0,
  			  "set cache manager encryption flag");
      cmd_AddParm(ts, "-crypt", CMD_SINGLE, 0, "on or off");
  
!     ts = cmd_CreateSyntax("getcrypt", GetCryptCmd, 0,
  			  "get cache manager encryption flag");
  
!     ts = cmd_CreateSyntax("rxstatproc", RxStatProcCmd, 0,
  			  "Manage per process RX statistics");
      cmd_AddParm(ts, "-enable", CMD_FLAG, CMD_OPTIONAL, "Enable RX stats");
      cmd_AddParm(ts, "-disable", CMD_FLAG, CMD_OPTIONAL, "Disable RX stats");
      cmd_AddParm(ts, "-clear", CMD_FLAG, CMD_OPTIONAL, "Clear RX stats");
  
!     ts = cmd_CreateSyntax("rxstatpeer", RxStatPeerCmd, 0,
  			  "Manage per peer RX statistics");
      cmd_AddParm(ts, "-enable", CMD_FLAG, CMD_OPTIONAL, "Enable RX stats");
      cmd_AddParm(ts, "-disable", CMD_FLAG, CMD_OPTIONAL, "Disable RX stats");
      cmd_AddParm(ts, "-clear", CMD_FLAG, CMD_OPTIONAL, "Clear RX stats");
  
!     ts = cmd_CreateSyntax("setcbaddr", CallBackRxConnCmd, 0, "configure callback connection address");
      cmd_AddParm(ts, "-addr", CMD_SINGLE, CMD_OPTIONAL, "host name or address");
  
      /* try to find volume location information */
!     ts = cmd_CreateSyntax("getfid", GetFidCmd, 0,
  			  "get fid for file(s)");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
  #ifdef AFS_DISCON_ENV
!     ts = cmd_CreateSyntax("discon", DisconCmd, 0,
  			  "disconnection mode");
      cmd_AddParm(ts, "-mode", CMD_SINGLE, CMD_OPTIONAL, "nat | full");
  #endif
  
!     ts = cmd_CreateSyntax("nukenfscreds", NukeNFSCredsCmd, 0, "nuke credentials for NFS client");
      cmd_AddParm(ts, "-addr", CMD_SINGLE, 0, "host name or address");
  
!     ts = cmd_CreateSyntax("uuid", UuidCmd, 0, "manage the UUID for the cache manager");
      cmd_AddParm(ts, "-generate", CMD_FLAG, CMD_REQUIRED, "generate a new UUID");
  
      code = cmd_Dispatch(argc, argv);
--- 3614,3656 ----
      cmd_AddParm(ts, "-verbose", CMD_FLAG, CMD_OPTIONAL, "show status");
      cmd_CreateAlias(ts, "sb");
  
!     ts = cmd_CreateSyntax("setcrypt", SetCryptCmd, NULL,
  			  "set cache manager encryption flag");
      cmd_AddParm(ts, "-crypt", CMD_SINGLE, 0, "on or off");
  
!     ts = cmd_CreateSyntax("getcrypt", GetCryptCmd, NULL,
  			  "get cache manager encryption flag");
  
!     ts = cmd_CreateSyntax("rxstatproc", RxStatProcCmd, NULL,
  			  "Manage per process RX statistics");
      cmd_AddParm(ts, "-enable", CMD_FLAG, CMD_OPTIONAL, "Enable RX stats");
      cmd_AddParm(ts, "-disable", CMD_FLAG, CMD_OPTIONAL, "Disable RX stats");
      cmd_AddParm(ts, "-clear", CMD_FLAG, CMD_OPTIONAL, "Clear RX stats");
  
!     ts = cmd_CreateSyntax("rxstatpeer", RxStatPeerCmd, NULL,
  			  "Manage per peer RX statistics");
      cmd_AddParm(ts, "-enable", CMD_FLAG, CMD_OPTIONAL, "Enable RX stats");
      cmd_AddParm(ts, "-disable", CMD_FLAG, CMD_OPTIONAL, "Disable RX stats");
      cmd_AddParm(ts, "-clear", CMD_FLAG, CMD_OPTIONAL, "Clear RX stats");
  
!     ts = cmd_CreateSyntax("setcbaddr", CallBackRxConnCmd, NULL, "configure callback connection address");
      cmd_AddParm(ts, "-addr", CMD_SINGLE, CMD_OPTIONAL, "host name or address");
  
      /* try to find volume location information */
!     ts = cmd_CreateSyntax("getfid", GetFidCmd, NULL,
  			  "get fid for file(s)");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
  #ifdef AFS_DISCON_ENV
!     ts = cmd_CreateSyntax("discon", DisconCmd, NULL,
  			  "disconnection mode");
      cmd_AddParm(ts, "-mode", CMD_SINGLE, CMD_OPTIONAL, "nat | full");
  #endif
  
!     ts = cmd_CreateSyntax("nukenfscreds", NukeNFSCredsCmd, NULL, "nuke credentials for NFS client");
      cmd_AddParm(ts, "-addr", CMD_SINGLE, 0, "host name or address");
  
!     ts = cmd_CreateSyntax("uuid", UuidCmd, NULL, "manage the UUID for the cache manager");
      cmd_AddParm(ts, "-generate", CMD_FLAG, CMD_REQUIRED, "generate a new UUID");
  
      code = cmd_Dispatch(argc, argv);
***************
*** 3712,3718 ****
  
  /* get clients interface addresses */
  static int
! GetClientAddrsCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct cmd_item *ti;
--- 3705,3711 ----
  
  /* get clients interface addresses */
  static int
! GetClientAddrsCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct cmd_item *ti;
***************
*** 3758,3764 ****
  }
  
  static int
! SetClientAddrsCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code, addr;
      struct cmd_item *ti;
--- 3751,3757 ----
  }
  
  static int
! SetClientAddrsCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code, addr;
      struct cmd_item *ti;
***************
*** 3832,3838 ****
  }
  
  static int
! FlushMountCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 3825,3831 ----
  }
  
  static int
! FlushMountCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 3948,3954 ****
  }
  
  static int
! RxStatProcCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      afs_int32 flags = 0;
--- 3941,3947 ----
  }
  
  static int
! RxStatProcCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      afs_int32 flags = 0;
***************
*** 3983,3989 ****
  }
  
  static int
! RxStatPeerCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
      afs_int32 flags = 0;
--- 3976,3982 ----
  }
  
  static int
! RxStatPeerCmd(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      afs_int32 flags = 0;
***************
*** 4018,4024 ****
  }
  
  static int
! GetFidCmd(struct cmd_syndesc *as, char *arock)
  {
      struct ViceIoctl blob;
      struct cmd_item *ti;
--- 4011,4017 ----
  }
  
  static int
! GetFidCmd(struct cmd_syndesc *as, void *arock)
  {
      struct ViceIoctl blob;
      struct cmd_item *ti;
Index: openafs/src/venus/fstrace.c
diff -c openafs/src/venus/fstrace.c:1.23 openafs/src/venus/fstrace.c:1.23.2.2
*** openafs/src/venus/fstrace.c:1.23	Tue Apr  4 16:51:19 2006
--- openafs/src/venus/fstrace.c	Wed Oct 31 00:09:41 2007
***************
*** 14,20 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/fstrace.c,v 1.23 2006/04/04 20:51:19 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
--- 14,20 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/fstrace.c,v 1.23.2.2 2007/10/31 04:09:41 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
***************
*** 27,39 ****
  #undef abs
  #include <stdlib.h>
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include <afs/stds.h>
  #include <afs/cmd.h>
--- 27,33 ----
***************
*** 2713,2722 ****
  }
  
  
! static
! DoDump(as, arock)
!      register struct cmd_syndesc *as;
!      char *arock;
  {
      afs_int32 code = 0;
      afs_int32 tcode;
--- 2707,2714 ----
  }
  
  
! static int
! DoDump(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code = 0;
      afs_int32 tcode;
***************
*** 2792,2798 ****
      struct cmd_syndesc *dumpSyntax;
  
      dumpSyntax =
! 	cmd_CreateSyntax("dump", DoDump, (char *)NULL, "dump AFS trace logs");
      (void)cmd_AddParm(dumpSyntax, "-set", CMD_LIST, CMD_OPTIONAL, "set_name");
      (void)cmd_AddParm(dumpSyntax, "-follow", CMD_SINGLE, CMD_OPTIONAL,
  		      "log_name");
--- 2784,2790 ----
      struct cmd_syndesc *dumpSyntax;
  
      dumpSyntax =
! 	cmd_CreateSyntax("dump", DoDump, NULL, "dump AFS trace logs");
      (void)cmd_AddParm(dumpSyntax, "-set", CMD_LIST, CMD_OPTIONAL, "set_name");
      (void)cmd_AddParm(dumpSyntax, "-follow", CMD_SINGLE, CMD_OPTIONAL,
  		      "log_name");
***************
*** 2802,2811 ****
  		      "seconds_between_reads");
  }
  
! static
! DoShowLog(as, arock)
!      register struct cmd_syndesc *as;
!      char *arock;
  {
      afs_int32 retVal = 0;
      afs_int32 code = 0;
--- 2794,2801 ----
  		      "seconds_between_reads");
  }
  
! static int
! DoShowLog(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 retVal = 0;
      afs_int32 code = 0;
***************
*** 2868,2884 ****
      struct cmd_syndesc *showSyntax;
  
      showSyntax =
! 	cmd_CreateSyntax("lslog", DoShowLog, (char *)NULL,
  			 "list available logs");
      (void)cmd_AddParm(showSyntax, "-set", CMD_LIST, CMD_OPTIONAL, "set_name");
      (void)cmd_AddParm(showSyntax, "-log", CMD_LIST, CMD_OPTIONAL, "log_name");
      (void)cmd_AddParm(showSyntax, "-long", CMD_FLAG, CMD_OPTIONAL, "");
  }
  
! static
! DoShowSet(as, arock)
!      register struct cmd_syndesc *as;
!      char *arock;
  {
      afs_int32 retVal = 0;
      afs_int32 code = 0;
--- 2858,2872 ----
      struct cmd_syndesc *showSyntax;
  
      showSyntax =
! 	cmd_CreateSyntax("lslog", DoShowLog, NULL,
  			 "list available logs");
      (void)cmd_AddParm(showSyntax, "-set", CMD_LIST, CMD_OPTIONAL, "set_name");
      (void)cmd_AddParm(showSyntax, "-log", CMD_LIST, CMD_OPTIONAL, "log_name");
      (void)cmd_AddParm(showSyntax, "-long", CMD_FLAG, CMD_OPTIONAL, "");
  }
  
! static int
! DoShowSet(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 retVal = 0;
      afs_int32 code = 0;
***************
*** 2926,2940 ****
      struct cmd_syndesc *showSyntax;
  
      showSyntax =
! 	cmd_CreateSyntax("lsset", DoShowSet, (char *)NULL,
  			 "list available event sets");
      (void)cmd_AddParm(showSyntax, "-set", CMD_LIST, CMD_OPTIONAL, "set_name");
  }
  
! static
! DoClear(as, arock)
!      register struct cmd_syndesc *as;
!      char *arock;
  {
      afs_int32 retVal = 0;
      afs_int32 code = 0;
--- 2914,2926 ----
      struct cmd_syndesc *showSyntax;
  
      showSyntax =
! 	cmd_CreateSyntax("lsset", DoShowSet, NULL,
  			 "list available event sets");
      (void)cmd_AddParm(showSyntax, "-set", CMD_LIST, CMD_OPTIONAL, "set_name");
  }
  
! static int
! DoClear(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 retVal = 0;
      afs_int32 code = 0;
***************
*** 2985,2991 ****
      struct cmd_syndesc *clearSyntax;
  
      clearSyntax =
! 	cmd_CreateSyntax("clear", DoClear, (char *)NULL,
  			 "clear logs by logname or by event set");
      (void)cmd_AddParm(clearSyntax, "-set", CMD_LIST, CMD_OPTIONAL,
  		      "set_name");
--- 2971,2977 ----
      struct cmd_syndesc *clearSyntax;
  
      clearSyntax =
! 	cmd_CreateSyntax("clear", DoClear, NULL,
  			 "clear logs by logname or by event set");
      (void)cmd_AddParm(clearSyntax, "-set", CMD_LIST, CMD_OPTIONAL,
  		      "set_name");
***************
*** 2993,3002 ****
  		      "log_name");
  }
  
! static
! DoSet(as, arock)
!      register struct cmd_syndesc *as;
!      char *arock;
  {
      afs_int32 retVal = 0;
      afs_int32 code = 0;
--- 2979,2986 ----
  		      "log_name");
  }
  
! static int
! DoSet(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 retVal = 0;
      afs_int32 code = 0;
***************
*** 3074,3080 ****
      struct cmd_syndesc *setSyntax;
  
      setSyntax =
! 	cmd_CreateSyntax("setset", DoSet, (char *)NULL,
  			 "set state of event sets");
      (void)cmd_AddParm(setSyntax, "-set", CMD_LIST, CMD_OPTIONAL, "set_name");
      (void)cmd_AddParm(setSyntax, "-active", CMD_FLAG, CMD_OPTIONAL, "");
--- 3058,3064 ----
      struct cmd_syndesc *setSyntax;
  
      setSyntax =
! 	cmd_CreateSyntax("setset", DoSet, NULL,
  			 "set state of event sets");
      (void)cmd_AddParm(setSyntax, "-set", CMD_LIST, CMD_OPTIONAL, "set_name");
      (void)cmd_AddParm(setSyntax, "-active", CMD_FLAG, CMD_OPTIONAL, "");
***************
*** 3082,3091 ****
      (void)cmd_AddParm(setSyntax, "-dormant", CMD_FLAG, CMD_OPTIONAL, "");
  }
  
! static
! DoResize(as, arock)
!      register struct cmd_syndesc *as;
!      char *arock;
  {
      afs_int32 retVal = 0;
      afs_int32 code = 0;
--- 3066,3073 ----
      (void)cmd_AddParm(setSyntax, "-dormant", CMD_FLAG, CMD_OPTIONAL, "");
  }
  
! static int
! DoResize(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 retVal = 0;
      afs_int32 code = 0;
***************
*** 3133,3139 ****
      struct cmd_syndesc *setsizeSyntax;
  
      setsizeSyntax =
! 	cmd_CreateSyntax("setlog", DoResize, (char *)NULL,
  			 "set the size of a log");
      (void)cmd_AddParm(setsizeSyntax, "-log", CMD_LIST, CMD_OPTIONAL,
  		      "log_name");
--- 3115,3121 ----
      struct cmd_syndesc *setsizeSyntax;
  
      setsizeSyntax =
! 	cmd_CreateSyntax("setlog", DoResize, NULL,
  			 "set the size of a log");
      (void)cmd_AddParm(setsizeSyntax, "-log", CMD_LIST, CMD_OPTIONAL,
  		      "log_name");
Index: openafs/src/venus/kdump.c
diff -c openafs/src/venus/kdump.c:1.38.4.2 openafs/src/venus/kdump.c:1.38.4.3
*** openafs/src/venus/kdump.c:1.38.4.2	Tue Mar 20 15:21:53 2007
--- openafs/src/venus/kdump.c	Wed Oct 31 00:09:41 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/kdump.c,v 1.38.4.2 2007/03/20 19:21:53 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/kdump.c,v 1.38.4.3 2007/10/31 04:09:41 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
***************
*** 556,564 ****
  
  
  
- #ifndef AFS_KDUMP_LIB
- extern struct cmd_syndesc *cmd_CreateSyntax();
- #endif
  int opencore();
  
  #if	defined(AFS_HPUX_ENV) && defined(__LP64__)
--- 556,561 ----
***************
*** 828,837 ****
  
  
  #ifndef AFS_KDUMP_LIB
! static
! cmdproc(as, arock)
!      register struct cmd_syndesc *as;
!      afs_int32 arock;
  {
      register afs_int32 code = 0;
  
--- 825,832 ----
  
  
  #ifndef AFS_KDUMP_LIB
! static int
! cmdproc(register struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code = 0;
  
***************
*** 957,963 ****
      sigaction(SIGSEGV, &nsa, NULL);
  #endif
  
!     ts = cmd_CreateSyntax(NULL, cmdproc, 0,
  			  "Read internal cache manager structs");
      cmd_AddParm(ts, "-kobj", CMD_SINGLE, CMD_OPTIONAL,
  		"kernel object (default /vmunix)");
--- 952,958 ----
      sigaction(SIGSEGV, &nsa, NULL);
  #endif
  
!     ts = cmd_CreateSyntax(NULL, cmdproc, NULL,
  			  "Read internal cache manager structs");
      cmd_AddParm(ts, "-kobj", CMD_SINGLE, CMD_OPTIONAL,
  		"kernel object (default /vmunix)");
Index: openafs/src/venus/livesys.c
diff -c openafs/src/venus/livesys.c:1.4.14.2 openafs/src/venus/livesys.c:1.4.14.3
*** openafs/src/venus/livesys.c:1.4.14.2	Tue Apr 10 14:39:56 2007
--- openafs/src/venus/livesys.c	Tue Oct 30 11:16:48 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/livesys.c,v 1.4.14.2 2007/04/10 18:39:56 shadow Exp $");
  
  #include <afs/afs_args.h>
  #include <rx/xdr.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/livesys.c,v 1.4.14.3 2007/10/30 15:16:48 shadow Exp $");
  
  #include <afs/afs_args.h>
  #include <rx/xdr.h>
***************
*** 22,34 ****
  #include <stdio.h>
  #include <netinet/in.h>
  #include <sys/stat.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <afs/stds.h>
  #include <afs/vice.h>
  #include <afs/venus.h>
--- 22,28 ----
Index: openafs/src/venus/twiddle.c
diff -c openafs/src/venus/twiddle.c:1.7.14.3 openafs/src/venus/twiddle.c:1.7.14.4
*** openafs/src/venus/twiddle.c:1.7.14.3	Tue Apr 10 14:39:56 2007
--- openafs/src/venus/twiddle.c	Wed Oct 31 00:09:41 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/twiddle.c,v 1.7.14.3 2007/04/10 18:39:56 shadow Exp $");
  
  #include <rx/xdr.h>
  #include <sys/ioctl.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/twiddle.c,v 1.7.14.4 2007/10/31 04:09:41 shadow Exp $");
  
  #include <rx/xdr.h>
  #include <sys/ioctl.h>
***************
*** 31,37 ****
  #undef VICE
  #include "afs/prs_fs.h"
  #include <afs/afsint.h>
! #include <errno.h
  #include <afs/cellconfig.h>
  #include <afs/cmd.h>
  #include <strings.h>
--- 31,37 ----
  #undef VICE
  #include "afs/prs_fs.h"
  #include <afs/afsint.h>
! #include <errno.h>
  #include <afs/cellconfig.h>
  #include <afs/cmd.h>
  #include <strings.h>
***************
*** 46,58 ****
  static struct ubik_client *uclient;
  
  
- extern struct cmd_syndesc *cmd_CreateSyntax();
  static char pn[] = "fs";
  static int rxInitDone = 0;
  
! static
! Twiddle(as)
!      struct cmd_syndesc *as;
  {
      afs_int32 code;
      struct ViceIoctl blob;
--- 46,56 ----
  static struct ubik_client *uclient;
  
  
  static char pn[] = "fs";
  static int rxInitDone = 0;
  
! static int
! Twiddle(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code;
      struct ViceIoctl blob;
***************
*** 153,159 ****
      /* try to find volume location information */
  
  
!     ts = cmd_CreateSyntax(NULL, Twiddle, 0, "adjust rx parms");
      cmd_AddParm(ts, "-initReceiveWindow ", CMD_SINGLE, CMD_OPTIONAL, "16");
      cmd_AddParm(ts, "-maxReceiveWindow ", CMD_SINGLE, CMD_OPTIONAL, "16");
      cmd_AddParm(ts, "-initSendWindow ", CMD_SINGLE, CMD_OPTIONAL, "8");
--- 151,157 ----
      /* try to find volume location information */
  
  
!     ts = cmd_CreateSyntax(NULL, Twiddle, NULL, "adjust rx parms");
      cmd_AddParm(ts, "-initReceiveWindow ", CMD_SINGLE, CMD_OPTIONAL, "16");
      cmd_AddParm(ts, "-maxReceiveWindow ", CMD_SINGLE, CMD_OPTIONAL, "16");
      cmd_AddParm(ts, "-initSendWindow ", CMD_SINGLE, CMD_OPTIONAL, "8");
Index: openafs/src/venus/up.c
diff -c openafs/src/venus/up.c:1.17.2.1 openafs/src/venus/up.c:1.17.2.2
*** openafs/src/venus/up.c:1.17.2.1	Mon May  7 13:24:34 2007
--- openafs/src/venus/up.c	Tue Oct 30 11:16:48 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/up.c,v 1.17.2.1 2007/05/07 17:24:34 rra Exp $");
  
  /* missing type from C language */
  
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/up.c,v 1.17.2.2 2007/10/30 15:16:48 shadow Exp $");
  
  /* missing type from C language */
  
***************
*** 42,54 ****
  #include <netinet/in.h>
  #endif
  
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include <afs/venus.h>
  
--- 42,48 ----
Index: openafs/src/venus/whatfid.c
diff -c openafs/src/venus/whatfid.c:1.5.14.2 openafs/src/venus/whatfid.c:1.5.14.3
*** openafs/src/venus/whatfid.c:1.5.14.2	Tue Apr 10 14:39:56 2007
--- openafs/src/venus/whatfid.c	Wed Oct 31 00:09:41 2007
***************
*** 14,20 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/whatfid.c,v 1.5.14.2 2007/04/10 18:39:56 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
--- 14,20 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/whatfid.c,v 1.5.14.3 2007/10/31 04:09:41 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
***************
*** 49,56 ****
  int WhatFidCmd_FileParm;
  int WhatFidCmd_FollowLinkParm;
  int
! WhatFidCmd(as)
!      register struct cmd_syndesc *as;
  {
      register afs_int32 code;
      struct ViceIoctl blob;
--- 49,55 ----
  int WhatFidCmd_FileParm;
  int WhatFidCmd_FollowLinkParm;
  int
! WhatFidCmd(register struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      struct ViceIoctl blob;
***************
*** 104,110 ****
  
      pn = argv[0];
  
!     ts = cmd_CreateSyntax("initcmd", WhatFidCmd, 0, "list fid for file(s)");
      WhatFidCmd_FileParm = cmd_AddParm(ts, "-path", CMD_LIST, 0, "pathnames");
      WhatFidCmd_FollowLinkParm =
  	cmd_AddParm(ts, "-link", CMD_FLAG, CMD_OPTIONAL,
--- 103,109 ----
  
      pn = argv[0];
  
!     ts = cmd_CreateSyntax("initcmd", WhatFidCmd, NULL, "list fid for file(s)");
      WhatFidCmd_FileParm = cmd_AddParm(ts, "-path", CMD_LIST, 0, "pathnames");
      WhatFidCmd_FollowLinkParm =
  	cmd_AddParm(ts, "-link", CMD_FLAG, CMD_OPTIONAL,
Index: openafs/src/venus/test/getinitparams.c
diff -c openafs/src/venus/test/getinitparams.c:1.5 openafs/src/venus/test/getinitparams.c:1.5.14.1
*** openafs/src/venus/test/getinitparams.c:1.5	Tue Jul 15 19:17:24 2003
--- openafs/src/venus/test/getinitparams.c	Wed Oct 31 00:09:42 2007
***************
*** 11,17 ****
  #include <afsconfig.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/test/getinitparams.c,v 1.5 2003/07/15 23:17:24 shadow Exp $");
  
  #include <afs/param.h>
  #include <stdio.h>
--- 11,17 ----
  #include <afsconfig.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/test/getinitparams.c,v 1.5.14.1 2007/10/31 04:09:42 shadow Exp $");
  
  #include <afs/param.h>
  #include <stdio.h>
***************
*** 34,40 ****
  
  
  int
! GetInitParamsCmd(struct cmd_syndesc *as)
  {
      struct cm_initparams cm_initParams;
      struct ViceIoctl blob;
--- 34,40 ----
  
  
  int
! GetInitParamsCmd(struct cmd_syndesc *as, void *arock)
  {
      struct cm_initparams cm_initParams;
      struct ViceIoctl blob;
Index: openafs/src/vfsck/dirutils.c
diff -c openafs/src/vfsck/dirutils.c:1.5 openafs/src/vfsck/dirutils.c:1.5.14.1
*** openafs/src/vfsck/dirutils.c:1.5	Tue Jul 15 19:17:27 2003
--- openafs/src/vfsck/dirutils.c	Tue Oct 30 11:16:48 2007
***************
*** 11,20 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vfsck/dirutils.c,v 1.5 2003/07/15 23:17:27 shadow Exp $");
  
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <dirent.h>
  #include <afs/partition.h>
  
--- 11,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vfsck/dirutils.c,v 1.5.14.1 2007/10/30 15:16:48 shadow Exp $");
  
  #include <sys/types.h>
  #include <sys/stat.h>
+ #include <string.h>
  #include <dirent.h>
  #include <afs/partition.h>
  
Index: openafs/src/vfsck/setup.c
diff -c openafs/src/vfsck/setup.c:1.13 openafs/src/vfsck/setup.c:1.13.6.1
*** openafs/src/vfsck/setup.c:1.13	Sun Apr  3 14:09:32 2005
--- openafs/src/vfsck/setup.c	Tue Oct 30 11:16:48 2007
***************
*** 19,27 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vfsck/setup.c,v 1.13 2005/04/03 18:09:32 shadow Exp $");
  
  #include <stdio.h>
  #define VICE
  
  #if	defined(AFS_SUN_ENV) || defined(AFS_OSF_ENV)
--- 19,28 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vfsck/setup.c,v 1.13.6.1 2007/10/30 15:16:48 shadow Exp $");
  
  #include <stdio.h>
+ #include <string.h>
  #define VICE
  
  #if	defined(AFS_SUN_ENV) || defined(AFS_OSF_ENV)
Index: openafs/src/vfsck/utilities.c
diff -c openafs/src/vfsck/utilities.c:1.8 openafs/src/vfsck/utilities.c:1.8.4.1
*** openafs/src/vfsck/utilities.c:1.8	Sun Oct  2 22:44:56 2005
--- openafs/src/vfsck/utilities.c	Tue Oct 30 11:16:48 2007
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vfsck/utilities.c,v 1.8 2005/10/03 02:44:56 shadow Exp $");
  
  #include <sys/param.h>
  #define VICE			/* allow us to put our changes in at will */
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vfsck/utilities.c,v 1.8.4.1 2007/10/30 15:16:48 shadow Exp $");
  
  #include <sys/param.h>
  #define VICE			/* allow us to put our changes in at will */
***************
*** 75,80 ****
--- 75,81 ----
  #endif /* AFS_OSF_ENV */
  
  #include <stdio.h>
+ #include <string.h>
  #include <ctype.h>
  #include "fsck.h"
  
Index: openafs/src/viced/afsfileprocs.c
diff -c openafs/src/viced/afsfileprocs.c:1.113.2.18 openafs/src/viced/afsfileprocs.c:1.113.2.19
*** openafs/src/viced/afsfileprocs.c:1.113.2.18	Tue Aug 21 04:30:27 2007
--- openafs/src/viced/afsfileprocs.c	Tue Oct 30 11:16:49 2007
***************
*** 29,35 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/afsfileprocs.c,v 1.113.2.18 2007/08/21 08:30:27 jaltman Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
--- 29,35 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/afsfileprocs.c,v 1.113.2.19 2007/10/30 15:16:49 shadow Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
***************
*** 47,60 ****
  #include <netinet/in.h>
  #include <arpa/inet.h>
  #include <netdb.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #ifndef AFS_LINUX20_ENV
  #include <net/if.h>
--- 47,53 ----
Index: openafs/src/viced/callback.c
diff -c openafs/src/viced/callback.c:1.77.2.7 openafs/src/viced/callback.c:1.77.2.10
*** openafs/src/viced/callback.c:1.77.2.7	Mon Oct  1 20:16:00 2007
--- openafs/src/viced/callback.c	Mon Nov  5 15:29:11 2007
***************
*** 85,95 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/callback.c,v 1.77.2.7 2007/10/02 00:16:00 shadow Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>		/* for malloc() */
  #include <time.h>		/* ANSI standard location for time stuff */
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
  #include <io.h>
--- 85,96 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/callback.c,v 1.77.2.10 2007/11/05 20:29:11 shadow Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>		/* for malloc() */
  #include <time.h>		/* ANSI standard location for time stuff */
+ #include <string.h>
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
  #include <io.h>
***************
*** 97,109 ****
  #include <sys/time.h>
  #include <sys/file.h>
  #endif
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <afs/assert.h>
  
  #include <afs/stds.h>
--- 98,103 ----
***************
*** 1079,1085 ****
  
      cbstuff.nbreakers--;
      /* If we succeeded it's always ok to unset HFE_LATER */
!     if (!host->hostFlags & VENUSDOWN)
  	host->hostFlags &= ~HFE_LATER;
      return (host->hostFlags & VENUSDOWN);
  }
--- 1073,1079 ----
  
      cbstuff.nbreakers--;
      /* If we succeeded it's always ok to unset HFE_LATER */
!     if (!(host->hostFlags & VENUSDOWN))
  	host->hostFlags &= ~HFE_LATER;
      return (host->hostFlags & VENUSDOWN);
  }
***************
*** 2707,2713 ****
      read(fd, &tfirst, sizeof(tfirst));
      read(fd, &freelisthead, sizeof(freelisthead));
      CB = ((struct CallBack
! 	   *)(calloc(cbstuff.nblks, sizeof(struct FileEntry)))) - 1;
      FE = ((struct FileEntry
  	   *)(calloc(cbstuff.nblks, sizeof(struct FileEntry)))) - 1;
      CBfree = (struct CallBack *)itocb(freelisthead);
--- 2701,2707 ----
      read(fd, &tfirst, sizeof(tfirst));
      read(fd, &freelisthead, sizeof(freelisthead));
      CB = ((struct CallBack
! 	   *)(calloc(cbstuff.nblks, sizeof(struct CallBack)))) - 1;
      FE = ((struct FileEntry
  	   *)(calloc(cbstuff.nblks, sizeof(struct FileEntry)))) - 1;
      CBfree = (struct CallBack *)itocb(freelisthead);
Index: openafs/src/viced/fsprobe.c
diff -c openafs/src/viced/fsprobe.c:1.12.2.1 openafs/src/viced/fsprobe.c:1.12.2.2
*** openafs/src/viced/fsprobe.c:1.12.2.1	Wed Aug  8 12:31:25 2007
--- openafs/src/viced/fsprobe.c	Tue Oct 30 11:16:49 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/fsprobe.c,v 1.12.2.1 2007/08/08 16:31:25 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <afs/afsint.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/fsprobe.c,v 1.12.2.2 2007/10/30 15:16:49 shadow Exp $");
  
  #include <afs/stds.h>
  #include <afs/afsint.h>
***************
*** 21,35 ****
  #include <arpa/inet.h>
  #include <netdb.h>
  #include <ubik.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  
  struct ubik_client *cstruct;
  struct rx_connection *serverconns[MAXSERVERS];
--- 21,27 ----
Index: openafs/src/viced/host.c
diff -c openafs/src/viced/host.c:1.93.2.20 openafs/src/viced/host.c:1.93.2.22
*** openafs/src/viced/host.c:1.93.2.20	Thu Aug 23 12:30:30 2007
--- openafs/src/viced/host.c	Thu Nov  1 15:13:39 2007
***************
*** 13,22 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/host.c,v 1.93.2.20 2007/08/23 16:30:30 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
  #include <winsock2.h>
--- 13,23 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/host.c,v 1.93.2.22 2007/11/01 19:13:39 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
+ #include <string.h>
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
  #include <winsock2.h>
***************
*** 26,39 ****
  #include <netinet/in.h>
  #endif
  
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #include <afs/stds.h>
  #include <rx/xdr.h>
  #include <afs/assert.h>
--- 27,32 ----
***************
*** 1774,1779 ****
--- 1767,1773 ----
  						   &FS_HostUUID);
  		    rx_PutConnection(cb_conn);
  		    cb_conn=NULL;
+ 		    H_LOCK;
  		    if (code == 0) {
  			ViceLog(25,
  				("InitCallBackState3 success on host %x (%s:%d)\n",
Index: openafs/src/viced/physio.c
diff -c openafs/src/viced/physio.c:1.14 openafs/src/viced/physio.c:1.14.14.1
*** openafs/src/viced/physio.c:1.14	Sun Dec  7 20:45:34 2003
--- openafs/src/viced/physio.c	Tue Oct 30 11:16:50 2007
***************
*** 17,26 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/physio.c,v 1.14 2003/12/08 01:45:34 jaltman Exp $");
  
  #include <stdio.h>
  #include <errno.h>
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
  #else
--- 17,27 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/physio.c,v 1.14.14.1 2007/10/30 15:16:50 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
+ #include <string.h>
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
  #else
***************
*** 28,40 ****
  #include <sys/time.h>
  #include <unistd.h>
  #endif
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <afs/nfs.h>
  #include <afs/assert.h>
  #include <lwp.h>
--- 29,34 ----
Index: openafs/src/viced/viced.c
diff -c openafs/src/viced/viced.c:1.75.2.15 openafs/src/viced/viced.c:1.75.2.16
*** openafs/src/viced/viced.c:1.75.2.15	Thu Oct  4 23:31:51 2007
--- openafs/src/viced/viced.c	Tue Oct 30 11:16:50 2007
***************
*** 22,32 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/viced.c,v 1.75.2.15 2007/10/05 03:31:51 shadow Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
  #include <errno.h>
  #include <sys/types.h>
  #include <afs/procmgmt.h>	/* signal(), kill(), wait(), etc. */
  #include <sys/stat.h>
--- 22,33 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/viced.c,v 1.75.2.16 2007/10/30 15:16:50 shadow Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
  #include <errno.h>
+ #include <string.h>
  #include <sys/types.h>
  #include <afs/procmgmt.h>	/* signal(), kill(), wait(), etc. */
  #include <sys/stat.h>
***************
*** 41,54 ****
  #include <netdb.h>
  #include <unistd.h>		/* sysconf() */
  
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #ifndef ITIMER_REAL
  #include <sys/time.h>
  #endif /* ITIMER_REAL */
--- 42,47 ----
Index: openafs/src/vlserver/Makefile.in
diff -c openafs/src/vlserver/Makefile.in:1.12.14.1 openafs/src/vlserver/Makefile.in:1.12.14.2
*** openafs/src/vlserver/Makefile.in:1.12.14.1	Mon Jul  3 15:07:16 2006
--- openafs/src/vlserver/Makefile.in	Thu Nov  1 12:02:30 2007
***************
*** 72,97 ****
  vldbint.xdr.o: vldbint.xdr.c vldbint.h
  
  vldbint.cs.c: vldbint.xg
! 	${RXGEN} -u -x -C -o $@ ${srcdir}/vldbint.xg
  
  vldbint.ss.c: vldbint.xg
! 	${RXGEN} -x -S -o $@ ${srcdir}/vldbint.xg
  
  vldbint.xdr.c: vldbint.xg
! 	${RXGEN} -x -c -o $@ ${srcdir}/vldbint.xg
  
  vldbint.h: vldbint.xg
! 	${RXGEN} -u -x -h -o $@ ${srcdir}/vldbint.xg
  
  vldbint.cs.c: vldbint.h
  vldbint.ss.c: vldbint.h
  vldbint.xdr.c: vldbint.h
  
  Kvldbint.cs.c: vldbint.xg
! 	${RXGEN} -x -k -C -o $@ ${srcdir}/vldbint.xg
  
  Kvldbint.xdr.c: vldbint.xg
! 	${RXGEN} -x -k -c -o $@ ${srcdir}/vldbint.xg
  
  libvldb.a: $(OBJS) AFS_component_version_number.o
  	$(RM) -f $@
--- 72,97 ----
  vldbint.xdr.o: vldbint.xdr.c vldbint.h
  
  vldbint.cs.c: vldbint.xg
! 	${RXGEN} -A -u -x -C -o $@ ${srcdir}/vldbint.xg
  
  vldbint.ss.c: vldbint.xg
! 	${RXGEN} -A -x -S -o $@ ${srcdir}/vldbint.xg
  
  vldbint.xdr.c: vldbint.xg
! 	${RXGEN} -A -x -c -o $@ ${srcdir}/vldbint.xg
  
  vldbint.h: vldbint.xg
! 	${RXGEN} -A -u -x -h -o $@ ${srcdir}/vldbint.xg
  
  vldbint.cs.c: vldbint.h
  vldbint.ss.c: vldbint.h
  vldbint.xdr.c: vldbint.h
  
  Kvldbint.cs.c: vldbint.xg
! 	${RXGEN} -A -x -k -C -o $@ ${srcdir}/vldbint.xg
  
  Kvldbint.xdr.c: vldbint.xg
! 	${RXGEN} -A -x -k -c -o $@ ${srcdir}/vldbint.xg
  
  libvldb.a: $(OBJS) AFS_component_version_number.o
  	$(RM) -f $@
Index: openafs/src/vlserver/cnvldb.c
diff -c openafs/src/vlserver/cnvldb.c:1.9 openafs/src/vlserver/cnvldb.c:1.9.14.2
*** openafs/src/vlserver/cnvldb.c:1.9	Tue Jul 15 19:17:33 2003
--- openafs/src/vlserver/cnvldb.c	Wed Oct 31 00:09:43 2007
***************
*** 11,31 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vlserver/cnvldb.c,v 1.9 2003/07/15 23:17:33 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
  #include <errno.h>
  #include <stdio.h>
  #include <sys/file.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include "cnvldb.h"		/* CHANGEME! */
  #include <netinet/in.h>
--- 11,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vlserver/cnvldb.c,v 1.9.14.2 2007/10/31 04:09:43 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
  #include <errno.h>
  #include <stdio.h>
  #include <sys/file.h>
  #include <string.h>
  
  #include "cnvldb.h"		/* CHANGEME! */
  #include <netinet/in.h>
***************
*** 40,46 ****
  #define	BADSERVERID	255	/* XXX */
  
  
- extern struct cmd_syndesc *cmd_CreateSyntax();
  static char pn[] = "cnvldb";
  static char tempname[] = "XXnewvldb";
  static char space[MAXSIZE];
--- 33,38 ----
***************
*** 74,82 ****
  char *pathname = NULL;
  const char *dbPath;
  
! static
! handleit(as)
!      struct cmd_syndesc *as;
  {
      register struct cmd_item *ti;
      register afs_int32 code;
--- 66,73 ----
  char *pathname = NULL;
  const char *dbPath;
  
! static int
! handleit(struct cmd_syndesc *as, void *arock)
  {
      register struct cmd_item *ti;
      register afs_int32 code;
***************
*** 997,1003 ****
      register struct cmd_syndesc *ts;
      afs_int32 code;
  
!     ts = cmd_CreateSyntax("initcmd", handleit, 0, "optional");
      cmd_AddParm(ts, "-to", CMD_SINGLE, CMD_OPTIONAL, "goal version");
      cmd_AddParm(ts, "-from", CMD_SINGLE, CMD_OPTIONAL, "current version");
      cmd_AddParm(ts, "-path", CMD_SINGLE, CMD_OPTIONAL, "pathname");
--- 988,994 ----
      register struct cmd_syndesc *ts;
      afs_int32 code;
  
!     ts = cmd_CreateSyntax("initcmd", handleit, NULL, "optional");
      cmd_AddParm(ts, "-to", CMD_SINGLE, CMD_OPTIONAL, "goal version");
      cmd_AddParm(ts, "-from", CMD_SINGLE, CMD_OPTIONAL, "current version");
      cmd_AddParm(ts, "-path", CMD_SINGLE, CMD_OPTIONAL, "pathname");
Index: openafs/src/vlserver/sascnvldb.c
diff -c openafs/src/vlserver/sascnvldb.c:1.7.14.1 openafs/src/vlserver/sascnvldb.c:1.7.14.2
*** openafs/src/vlserver/sascnvldb.c:1.7.14.1	Thu Feb  8 20:00:23 2007
--- openafs/src/vlserver/sascnvldb.c	Wed Oct 31 00:09:43 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vlserver/sascnvldb.c,v 1.7.14.1 2007/02/09 01:00:23 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vlserver/sascnvldb.c,v 1.7.14.2 2007/10/31 04:09:43 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 21,26 ****
--- 21,27 ----
  #include "cnvldb.h"		/* CHANGEME! */
  #include <netinet/in.h>
  #include <afs/venus.h>
+ #include <afs/cmd.h>
  
  #ifdef notdef
  #include <afs/vice.h>
***************
*** 36,42 ****
  #define MAXSIZE 2048		/* most I'll get back from PIOCTL */
  
  
- extern struct cmd_syndesc *cmd_CreateSyntax();
  static char pn[] = "cnvldb";
  static char tempname[] = "XXnewvldb";
  static char space[MAXSIZE];
--- 37,42 ----
***************
*** 148,156 ****
  }
  
  
! static
! ListQuotaCmd(as)
!      register struct cmd_syndesc *as;
  {
      register afs_int32 code;
      struct ViceIoctl blob;
--- 148,155 ----
  }
  
  
! static int
! ListQuotaCmd(register struct cmd_syndesc *as, void *arock)
  {
      register afs_int32 code;
      struct ViceIoctl blob;
Index: openafs/src/vlserver/vlclient.c
diff -c openafs/src/vlserver/vlclient.c:1.16.2.1 openafs/src/vlserver/vlclient.c:1.16.2.3
*** openafs/src/vlserver/vlclient.c:1.16.2.1	Thu Feb  8 20:00:23 2007
--- openafs/src/vlserver/vlclient.c	Wed Oct 31 00:09:43 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vlserver/vlclient.c,v 1.16.2.1 2007/02/09 01:00:23 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vlserver/vlclient.c,v 1.16.2.3 2007/10/31 04:09:43 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 38,51 ****
  #include <netinet/in.h>
  #endif
  #include <stdio.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include <afs/afsutil.h>
  #include <rx/xdr.h>
--- 38,44 ----
***************
*** 191,199 ****
  }
  
  
! static
! handleit(as)
!      struct cmd_syndesc *as;
  {
      register struct cmd_item *ti;
      register afs_int32 code, server = 0, sawserver = 0;
--- 184,191 ----
  }
  
  
! static int
! handleit(struct cmd_syndesc *as, void *arock)
  {
      register struct cmd_item *ti;
      register afs_int32 code, server = 0, sawserver = 0;
***************
*** 1037,1043 ****
      afs_int32 code;
  
      strcpy(confdir, AFSDIR_CLIENT_ETC_DIRPATH);
!     ts = cmd_CreateSyntax("initcmd", handleit, 0, "initialize the program");
      cmd_AddParm(ts, "-cellpath", CMD_LIST, CMD_OPTIONAL,
  		"Cell configuration directory");
      cmd_AddParm(ts, "-server", CMD_LIST, CMD_OPTIONAL,
--- 1029,1035 ----
      afs_int32 code;
  
      strcpy(confdir, AFSDIR_CLIENT_ETC_DIRPATH);
!     ts = cmd_CreateSyntax("initcmd", handleit, NULL, "initialize the program");
      cmd_AddParm(ts, "-cellpath", CMD_LIST, CMD_OPTIONAL,
  		"Cell configuration directory");
      cmd_AddParm(ts, "-server", CMD_LIST, CMD_OPTIONAL,
Index: openafs/src/vlserver/vldb_check.c
diff -c openafs/src/vlserver/vldb_check.c:1.11 openafs/src/vlserver/vldb_check.c:1.11.14.2
*** openafs/src/vlserver/vldb_check.c:1.11	Sat Nov 29 16:38:04 2003
--- openafs/src/vlserver/vldb_check.c	Wed Oct 31 00:09:44 2007
***************
*** 25,36 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vlserver/vldb_check.c,v 1.11 2003/11/29 21:38:04 jaltman Exp $");
  
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <fcntl.h>
  #include <errno.h>
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #include <WINNT/afsevent.h>
--- 25,37 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vlserver/vldb_check.c,v 1.11.14.2 2007/10/31 04:09:44 shadow Exp $");
  
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <fcntl.h>
  #include <errno.h>
+ #include <string.h>
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #include <WINNT/afsevent.h>
***************
*** 41,54 ****
  #include <netinet/in.h>
  #endif
  
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #include "vlserver.h"
  #include "vldbint.h"
  #include <ubik.h>
--- 42,47 ----
***************
*** 902,908 ****
  int
  WorkerBee(as, arock)
       struct cmd_syndesc *as;
!      char *arock;
  {
      char *dbfile;
      afs_int32 maxentries, type;
--- 895,901 ----
  int
  WorkerBee(as, arock)
       struct cmd_syndesc *as;
!      void *arock;
  {
      char *dbfile;
      afs_int32 maxentries, type;
Index: openafs/src/vlserver/vlprocs.c
diff -c openafs/src/vlserver/vlprocs.c:1.15 openafs/src/vlserver/vlprocs.c:1.15.4.1
*** openafs/src/vlserver/vlprocs.c:1.15	Sat Jun 18 19:23:46 2005
--- openafs/src/vlserver/vlprocs.c	Tue Oct 30 11:16:56 2007
***************
*** 11,20 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vlserver/vlprocs.c,v 1.15 2005/06/18 23:23:46 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
  #include <lock.h>
  #include <afs/afsutil.h>
  #include <ubik.h>
--- 11,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vlserver/vlprocs.c,v 1.15.4.1 2007/10/30 15:16:56 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
+ #include <string.h>
  #include <lock.h>
  #include <afs/afsutil.h>
  #include <ubik.h>
***************
*** 25,37 ****
  #else
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <afs/keys.h>
  #include "vlserver.h"
  #include "afs/audit.h"
--- 26,31 ----
Index: openafs/src/vlserver/vlserver.c
diff -c openafs/src/vlserver/vlserver.c:1.22.2.2 openafs/src/vlserver/vlserver.c:1.22.2.3
*** openafs/src/vlserver/vlserver.c:1.22.2.2	Tue Jun 20 16:37:12 2006
--- openafs/src/vlserver/vlserver.c	Tue Oct 30 11:16:56 2007
***************
*** 11,22 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vlserver/vlserver.c,v 1.22.2.2 2006/06/20 20:37:12 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
  #include <signal.h>
  #include <sys/stat.h>
  #ifdef HAVE_FCNTL_H
  #include <fcntl.h>
  #endif
--- 11,23 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vlserver/vlserver.c,v 1.22.2.3 2007/10/30 15:16:56 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
  #include <signal.h>
  #include <sys/stat.h>
+ #include <string.h>
  #ifdef HAVE_FCNTL_H
  #include <fcntl.h>
  #endif
***************
*** 36,49 ****
  #endif
  #include <stdio.h>
  
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #include <rx/xdr.h>
  #include <rx/rx.h>
  #include <rx/rx_globals.h>
--- 37,42 ----
Index: openafs/src/vlserver/vlutils.c
diff -c openafs/src/vlserver/vlutils.c:1.9 openafs/src/vlserver/vlutils.c:1.9.14.1
*** openafs/src/vlserver/vlutils.c:1.9	Sun Dec  7 17:49:42 2003
--- openafs/src/vlserver/vlutils.c	Tue Oct 30 11:16:56 2007
***************
*** 11,33 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vlserver/vlutils.c,v 1.9 2003/12/07 22:49:42 jaltman Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #else
  #include <netinet/in.h>
  #endif
  
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #include <lock.h>
  #include <rx/xdr.h>
  #include <ubik.h>
--- 11,26 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vlserver/vlutils.c,v 1.9.14.1 2007/10/30 15:16:56 shadow Exp $");
  
  #include <sys/types.h>
+ #include <string.h>
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
  #else
  #include <netinet/in.h>
  #endif
  
  #include <lock.h>
  #include <rx/xdr.h>
  #include <ubik.h>
Index: openafs/src/vol/clone.c
diff -c openafs/src/vol/clone.c:1.19.2.6 openafs/src/vol/clone.c:1.19.2.7
*** openafs/src/vol/clone.c:1.19.2.6	Fri May 18 01:53:56 2007
--- openafs/src/vol/clone.c	Tue Oct 30 11:16:57 2007
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/clone.c,v 1.19.2.6 2007/05/18 05:53:56 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/clone.c,v 1.19.2.7 2007/10/30 15:16:57 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
***************
*** 38,50 ****
  #include <sys/file.h>
  #include <sys/time.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <errno.h>
  #include <sys/stat.h>
  
--- 38,44 ----
Index: openafs/src/vol/daemon_com.c
diff -c openafs/src/vol/daemon_com.c:1.3.4.2 openafs/src/vol/daemon_com.c:1.3.4.4
*** openafs/src/vol/daemon_com.c:1.3.4.2	Thu Feb  8 18:59:32 2007
--- openafs/src/vol/daemon_com.c	Thu Nov  1 11:00:03 2007
***************
*** 1,5 ****
  /*
!  * Copyright 2006, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
--- 1,5 ----
  /*
!  * Copyright 2006-2007, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
***************
*** 22,28 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/daemon_com.c,v 1.3.4.2 2007/02/08 23:59:32 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
--- 22,28 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/daemon_com.c,v 1.3.4.4 2007/11/01 15:00:03 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
***************
*** 39,52 ****
  #include <errno.h>
  #include <assert.h>
  #include <signal.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  
  #include <rx/xdr.h>
--- 39,45 ----
***************
*** 116,122 ****
  	if (!*timeout)
  	    break;
  	if (!(*timeout & 1))
! 	    Log("SYNC_connect temporary failure (will retry)\n");
  	SYNC_disconnect(state);
  	sleep(*timeout++);
      }
--- 109,116 ----
  	if (!*timeout)
  	    break;
  	if (!(*timeout & 1))
! 	    Log("SYNC_connect: temporary failure on circuit '%s' (will retry)\n",
! 		state->proto_name);
  	SYNC_disconnect(state);
  	sleep(*timeout++);
      }
***************
*** 155,180 ****
  
      com.hdr.command = SYNC_COM_CHANNEL_CLOSE;
      com.hdr.command_len = sizeof(SYNC_command_hdr);
  
      /* in case the other end dropped, don't do any retries */
      state->retry_limit = 0;
      state->hard_timeout = 0;
  
!     code = SYNC_ask(state, &com, &res);
! 
!     if (code == SYNC_OK) {
! 	if (res.hdr.response != SYNC_OK) {
! 	    Log("SYNC_closeChannel:  channel shutdown request denied; closing socket anyway\n");
! 	} else if (!(res.hdr.flags & SYNC_FLAG_CHANNEL_SHUTDOWN)) {
! 	    Log("SYNC_closeChannel:  channel shutdown request mishandled by server\n");
! 	}
!     } else {
! 	Log("SYNC_closeChannel: channel communications problem");
!     }
! 
      SYNC_disconnect(state);
  
!     return code;
  }
  
  int
--- 149,164 ----
  
      com.hdr.command = SYNC_COM_CHANNEL_CLOSE;
      com.hdr.command_len = sizeof(SYNC_command_hdr);
+     com.hdr.flags |= SYNC_FLAG_CHANNEL_SHUTDOWN;
  
      /* in case the other end dropped, don't do any retries */
      state->retry_limit = 0;
      state->hard_timeout = 0;
  
!     SYNC_ask(state, &com, &res);
      SYNC_disconnect(state);
  
!     return SYNC_OK;
  }
  
  int
***************
*** 249,269 ****
  	if (code == SYNC_OK) {
  	    break;
  	} else if (code == SYNC_BAD_COMMAND) {
! 	    Log("SYNC_ask: protocol mismatch; make sure fileserver, volserver, salvageserver and salvager are same version\n");
  	    break;
! 	} else if (code == SYNC_COM_ERROR) {
! 	    Log("SYNC_ask: protocol communications failure; attempting reconnect to server\n");
  	    SYNC_reconnect(state);
  	    /* try again */
  	} else {
! 	    /* unknown (probably protocol-specific) response code, pass it up to the caller, and let them deal with it */
  	    break;
  	}
      }
  
      if (code == SYNC_COM_ERROR) {
! 	Log("SYNC_ask: fatal protocol error; disabling sync protocol to server running on port %d until next server restart\n", 
! 	    state->port);
  	state->fatal_error = 1;
      }
  
--- 233,260 ----
  	if (code == SYNC_OK) {
  	    break;
  	} else if (code == SYNC_BAD_COMMAND) {
! 	    Log("SYNC_ask: protocol mismatch on circuit '%s'; make sure "
! 		"fileserver, volserver, salvageserver and salvager are same "
! 		"version\n", state->proto_name);
  	    break;
! 	} else if ((code == SYNC_COM_ERROR) && (tries < state->retry_limit)) {
! 	    Log("SYNC_ask: protocol communications failure on circuit '%s'; "
! 		"attempting reconnect to server\n", state->proto_name);
  	    SYNC_reconnect(state);
  	    /* try again */
  	} else {
! 	    /* 
! 	     * unknown (probably protocol-specific) response code, pass it up to 
! 	     * the caller, and let them deal with it 
! 	     */
  	    break;
  	}
      }
  
      if (code == SYNC_COM_ERROR) {
! 	Log("SYNC_ask: fatal protocol error on circuit '%s'; disabling sync "
! 	    "protocol to server running on port %d until next server restart\n", 
! 	    state->proto_name, state->port);
  	state->fatal_error = 1;
      }
  
***************
*** 281,293 ****
  #endif
  
      if (state->fd == -1) {
! 	Log("SYNC_ask:  invalid sync file descriptor\n");
  	res->hdr.response = SYNC_COM_ERROR;
  	goto done;
      }
  
      if (com->hdr.command_len > SYNC_PROTO_MAX_LEN) {
! 	Log("SYNC_ask:  internal SYNC buffer too small; please file a bug\n");
  	res->hdr.response = SYNC_COM_ERROR;
  	goto done;
      }
--- 272,286 ----
  #endif
  
      if (state->fd == -1) {
! 	Log("SYNC_ask:  invalid sync file descriptor on circuit '%s'\n",
! 	    state->proto_name);
  	res->hdr.response = SYNC_COM_ERROR;
  	goto done;
      }
  
      if (com->hdr.command_len > SYNC_PROTO_MAX_LEN) {
! 	Log("SYNC_ask:  internal SYNC buffer too small on circuit '%s'; "
! 	    "please file a bug\n", state->proto_name);
  	res->hdr.response = SYNC_COM_ERROR;
  	goto done;
      }
***************
*** 303,327 ****
  #ifdef AFS_NT40_ENV
      n = send(state->fd, buf, com->hdr.command_len, 0);
      if (n != com->hdr.command_len) {
! 	Log("SYNC_ask:  write failed\n");
  	res->hdr.response = SYNC_COM_ERROR;
  	goto done;
      }
  
      n = recv(state->fd, buf, SYNC_PROTO_MAX_LEN, 0);
      if (n == 0 || (n < 0 && WSAEINTR != WSAGetLastError())) {
! 	Log("SYNC_ask:  No response\n");
  	res->hdr.response = SYNC_COM_ERROR;
  	goto done;
      }
  #else /* !AFS_NT40_ENV */
      n = write(state->fd, buf, com->hdr.command_len);
      if (com->hdr.command_len != n) {
! 	Log("SYNC_ask: write failed\n");
  	res->hdr.response = SYNC_COM_ERROR;
  	goto done;
      }
  
      /* receive the response */
      iov[0].iov_base = (char *)&res->hdr;
      iov[0].iov_len = sizeof(res->hdr);
--- 296,332 ----
  #ifdef AFS_NT40_ENV
      n = send(state->fd, buf, com->hdr.command_len, 0);
      if (n != com->hdr.command_len) {
! 	Log("SYNC_ask:  write failed on circuit '%s'\n", state->proto_name);
  	res->hdr.response = SYNC_COM_ERROR;
  	goto done;
      }
  
+     if (com->hdr.command == SYNC_COM_CHANNEL_CLOSE) {
+ 	/* short circuit close channel requests */
+ 	res->hdr.response = SYNC_OK;
+ 	goto done;
+     }
+ 
      n = recv(state->fd, buf, SYNC_PROTO_MAX_LEN, 0);
      if (n == 0 || (n < 0 && WSAEINTR != WSAGetLastError())) {
! 	Log("SYNC_ask:  No response on circuit '%s'\n", state->proto_name);
  	res->hdr.response = SYNC_COM_ERROR;
  	goto done;
      }
  #else /* !AFS_NT40_ENV */
      n = write(state->fd, buf, com->hdr.command_len);
      if (com->hdr.command_len != n) {
! 	Log("SYNC_ask: write failed on circuit '%s'\n", state->proto_name);
  	res->hdr.response = SYNC_COM_ERROR;
  	goto done;
      }
  
+     if (com->hdr.command == SYNC_COM_CHANNEL_CLOSE) {
+ 	/* short circuit close channel requests */
+ 	res->hdr.response = SYNC_OK;
+ 	goto done;
+     }
+ 
      /* receive the response */
      iov[0].iov_base = (char *)&res->hdr;
      iov[0].iov_len = sizeof(res->hdr);
***************
*** 334,340 ****
      }
      n = readv(state->fd, iov, iovcnt);
      if (n == 0 || (n < 0 && errno != EINTR)) {
! 	Log("SYNC_ask: No response\n");
  	res->hdr.response = SYNC_COM_ERROR;
  	goto done;
      }
--- 339,345 ----
      }
      n = readv(state->fd, iov, iovcnt);
      if (n == 0 || (n < 0 && errno != EINTR)) {
! 	Log("SYNC_ask: No response on circuit '%s'\n", state->proto_name);
  	res->hdr.response = SYNC_COM_ERROR;
  	goto done;
      }
***************
*** 343,349 ****
      res->recv_len = n;
  
      if (n < sizeof(res->hdr)) {
! 	Log("SYNC_ask:  response too short\n");
  	res->hdr.response = SYNC_COM_ERROR;
  	goto done;
      }
--- 348,355 ----
      res->recv_len = n;
  
      if (n < sizeof(res->hdr)) {
! 	Log("SYNC_ask:  response too short on circuit '%s'\n", 
! 	    state->proto_name);
  	res->hdr.response = SYNC_COM_ERROR;
  	goto done;
      }
***************
*** 352,358 ****
  #endif
  
      if ((n - sizeof(res->hdr)) > res->payload.len) {
! 	Log("SYNC_ask:  response too long\n");
  	res->hdr.response = SYNC_COM_ERROR;
  	goto done;
      }
--- 358,365 ----
  #endif
  
      if ((n - sizeof(res->hdr)) > res->payload.len) {
! 	Log("SYNC_ask:  response too long on circuit '%s'\n", 
! 	    state->proto_name);
  	res->hdr.response = SYNC_COM_ERROR;
  	goto done;
      }
***************
*** 361,372 ****
  #endif
  
      if (res->hdr.response_len != n) {
! 	Log("SYNC_ask:  length field in response inconsistent\n");
  	res->hdr.response = SYNC_COM_ERROR;
  	goto done;
      }
      if (res->hdr.response == SYNC_DENIED) {
! 	Log("SYNC_ask: negative response\n");
      }
  
    done:
--- 368,380 ----
  #endif
  
      if (res->hdr.response_len != n) {
! 	Log("SYNC_ask:  length field in response inconsistent "
! 	    "on circuit '%s'\n", state->proto_name);
  	res->hdr.response = SYNC_COM_ERROR;
  	goto done;
      }
      if (res->hdr.response == SYNC_DENIED) {
! 	Log("SYNC_ask: negative response on circuit '%s'\n", state->proto_name);
      }
  
    done:
Index: openafs/src/vol/daemon_com.h
diff -c openafs/src/vol/daemon_com.h:1.1 openafs/src/vol/daemon_com.h:1.1.4.1
*** openafs/src/vol/daemon_com.h:1.1	Fri Mar 17 23:20:18 2006
--- openafs/src/vol/daemon_com.h	Thu Nov  1 11:00:03 2007
***************
*** 1,5 ****
  /*
!  * Copyright 2006, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
--- 1,5 ----
  /*
!  * Copyright 2006-2007, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
***************
*** 53,59 ****
  /* general reason codes */
  #define SYNC_REASON_NONE                 0
  #define SYNC_REASON_MALFORMED_PACKET     1
! 
  
  /* SYNC protocol flags
   *
--- 53,59 ----
  /* general reason codes */
  #define SYNC_REASON_NONE                 0
  #define SYNC_REASON_MALFORMED_PACKET     1
! #define SYNC_REASON_NOMEM                2
  
  /* SYNC protocol flags
   *
***************
*** 84,89 ****
--- 84,90 ----
      afs_uint32 proto_version;
      int retry_limit;            /* max number of times for SYNC_ask to retry */
      afs_int32 hard_timeout;     /* upper limit on time to keep trying */
+     char * proto_name;          /**< sync protocol associated with this conn */
      byte fatal_error;           /* fatal error on this client conn */
  } SYNC_client_state;
  
Index: openafs/src/vol/devname.c
diff -c openafs/src/vol/devname.c:1.13 openafs/src/vol/devname.c:1.13.14.1
*** openafs/src/vol/devname.c:1.13	Mon Dec  8 02:31:57 2003
--- openafs/src/vol/devname.c	Tue Oct 30 11:16:57 2007
***************
*** 11,21 ****
  #include <afsconfig.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/devname.c,v 1.13 2003/12/08 07:31:57 shadow Exp $");
  
  #include <afs/param.h>
  #include <rx/xdr.h>
  #include <afs/afsint.h>
  #include <ctype.h>
  #if !defined(AFS_SGI_ENV)
  #ifdef	AFS_OSF_ENV
--- 11,22 ----
  #include <afsconfig.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/devname.c,v 1.13.14.1 2007/10/30 15:16:57 shadow Exp $");
  
  #include <afs/param.h>
  #include <rx/xdr.h>
  #include <afs/afsint.h>
+ #include <string.h>
  #include <ctype.h>
  #if !defined(AFS_SGI_ENV)
  #ifdef	AFS_OSF_ENV
***************
*** 87,102 ****
  #endif /* ITIMER_REAL */
  #include "partition.h"
  
- 
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
- 
  /* ensure that we don't have a "/" instead of a "/dev/rxd0a" type of device.
   * returns pointer to static storage; copy it out quickly!
   */
--- 88,93 ----
Index: openafs/src/vol/fs_conv_411.c
diff -c openafs/src/vol/fs_conv_411.c:1.9 openafs/src/vol/fs_conv_411.c:1.9.14.1
*** openafs/src/vol/fs_conv_411.c:1.9	Fri Aug  8 17:54:54 2003
--- openafs/src/vol/fs_conv_411.c	Wed Oct 31 00:09:45 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/Attic/fs_conv_411.c,v 1.9 2003/08/08 21:54:54 shadow Exp $");
  
  #if	defined(AFS_DUX40_ENV) || (defined(AFS_SUN_ENV) && !defined(AFS_SUN5_ENV)) || defined(AFS_SUN54_ENV)
  #if defined AFS_DUX40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/Attic/fs_conv_411.c,v 1.9.14.1 2007/10/31 04:09:45 shadow Exp $");
  
  #if	defined(AFS_DUX40_ENV) || (defined(AFS_SUN_ENV) && !defined(AFS_SUN5_ENV)) || defined(AFS_SUN54_ENV)
  #if defined AFS_DUX40_ENV
Index: openafs/src/vol/fssync-client.c
diff -c openafs/src/vol/fssync-client.c:1.1 openafs/src/vol/fssync-client.c:1.1.4.2
*** openafs/src/vol/fssync-client.c:1.1	Fri Mar 17 23:20:18 2006
--- openafs/src/vol/fssync-client.c	Thu Nov  1 11:00:03 2007
***************
*** 44,50 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/fssync-client.c,v 1.1 2006/03/18 04:20:18 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
--- 44,50 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/fssync-client.c,v 1.1.4.2 2007/11/01 15:00:03 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
***************
*** 65,79 ****
  #include <afs/assert.h>
  #endif /* AFS_PTHREAD_ENV */
  #include <signal.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  
  #include <rx/xdr.h>
  #include <afs/afsint.h>
--- 65,71 ----
***************
*** 100,106 ****
  
  extern int LogLevel;
  
! static SYNC_client_state fssync_state = { -1, 2040, FSYNC_PROTO_VERSION, 5, 120 };
  
  #ifdef AFS_PTHREAD_ENV
  static pthread_mutex_t vol_fsync_mutex;
--- 92,105 ----
  
  extern int LogLevel;
  
! static SYNC_client_state fssync_state = 
!     { -1,                    /* file descriptor */
!       2040,                  /* port number */
!       FSYNC_PROTO_VERSION,   /* protocol version */
!       5,                     /* connect retry limit */
!       120,                   /* hard timeout */
!       "FSSYNC",              /* protocol name string */
!     };
  
  #ifdef AFS_PTHREAD_ENV
  static pthread_mutex_t vol_fsync_mutex;
Index: openafs/src/vol/fssync-debug.c
diff -c openafs/src/vol/fssync-debug.c:1.1 openafs/src/vol/fssync-debug.c:1.1.4.1
*** openafs/src/vol/fssync-debug.c:1.1	Fri Mar 17 23:20:19 2006
--- openafs/src/vol/fssync-debug.c	Wed Oct 31 00:09:45 2007
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/fssync-debug.c,v 1.1 2006/03/18 04:20:19 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/fssync-debug.c,v 1.1.4.1 2007/10/31 04:09:45 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
***************
*** 89,105 ****
  static char * reason_code_to_string(afs_int32);
  static char * program_type_to_string(afs_int32);
  
! static int VolOnline(struct cmd_syndesc * as, char * rock);
! static int VolOffline(struct cmd_syndesc * as, char * rock);
! static int VolMode(struct cmd_syndesc * as, char * rock);
! static int VolDetach(struct cmd_syndesc * as, char * rock);
! static int VolBreakCBKs(struct cmd_syndesc * as, char * rock);
! static int VolMove(struct cmd_syndesc * as, char * rock);
! static int VolList(struct cmd_syndesc * as, char * rock);
! static int VolQuery(struct cmd_syndesc * as, char * rock);
! static int VolHdrQuery(struct cmd_syndesc * as, char * rock);
! static int VolOpQuery(struct cmd_syndesc * as, char * rock);
! static int StatsQuery(struct cmd_syndesc * as, char * rock);
  
  
  static void print_vol_stats_general(VolPkgStats * stats);
--- 89,105 ----
  static char * reason_code_to_string(afs_int32);
  static char * program_type_to_string(afs_int32);
  
! static int VolOnline(struct cmd_syndesc * as, void * rock);
! static int VolOffline(struct cmd_syndesc * as, void * rock);
! static int VolMode(struct cmd_syndesc * as, void * rock);
! static int VolDetach(struct cmd_syndesc * as, void * rock);
! static int VolBreakCBKs(struct cmd_syndesc * as, void * rock);
! static int VolMove(struct cmd_syndesc * as, void * rock);
! static int VolList(struct cmd_syndesc * as, void * rock);
! static int VolQuery(struct cmd_syndesc * as, void * rock);
! static int VolHdrQuery(struct cmd_syndesc * as, void * rock);
! static int VolOpQuery(struct cmd_syndesc * as, void * rock);
! static int StatsQuery(struct cmd_syndesc * as, void * rock);
  
  
  static void print_vol_stats_general(VolPkgStats * stats);
***************
*** 154,196 ****
      }
  
      
!     ts = cmd_CreateSyntax("online", VolOnline, 0, "bring a volume online (FSYNC_VOL_ON opcode)");
      VOLOP_PARMS_DECL(ts);
  
!     ts = cmd_CreateSyntax("offline", VolOffline, 0, "take a volume offline (FSYNC_VOL_OFF opcode)");
      VOLOP_PARMS_DECL(ts);
  
!     ts = cmd_CreateSyntax("mode", VolMode, 0, "change volume attach mode (FSYNC_VOL_NEEDVOLUME opcode)");
      VOLOP_PARMS_DECL(ts);
      cmd_CreateAlias(ts, "needvolume");
  
!     ts = cmd_CreateSyntax("detach", VolDetach, 0, "detach a volume (FSYNC_VOL_DONE opcode)");
      VOLOP_PARMS_DECL(ts);
  
!     ts = cmd_CreateSyntax("callback", VolBreakCBKs, 0, "break callbacks for volume (FSYNC_VOL_BREAKCBKS opcode)");
      VOLOP_PARMS_DECL(ts);
      cmd_CreateAlias(ts, "cbk");
  
!     ts = cmd_CreateSyntax("move", VolMove, 0, "set volume moved flag (FSYNC_VOL_MOVE opcode)");
      VOLOP_PARMS_DECL(ts);
  
!     ts = cmd_CreateSyntax("list", VolList, 0, "sync local volume list (FSYNC_VOL_LISTVOLUMES opcode)");
      VOLOP_PARMS_DECL(ts);
      cmd_CreateAlias(ts, "ls");
  
!     ts = cmd_CreateSyntax("query", VolQuery, 0, "get volume structure (FSYNC_VOL_QUERY opcode)");
      VOLOP_PARMS_DECL(ts);
      cmd_CreateAlias(ts, "qry");
  
!     ts = cmd_CreateSyntax("header", VolHdrQuery, 0, "get volume disk data structure (FSYNC_VOL_QUERY_HDR opcode)");
      VOLOP_PARMS_DECL(ts);
      cmd_CreateAlias(ts, "hdr");
  
!     ts = cmd_CreateSyntax("volop", VolOpQuery, 0, "get pending volume operation info (FSYNC_VOL_QUERY_VOP opcode)");
      VOLOP_PARMS_DECL(ts);
      cmd_CreateAlias(ts, "vop");
  
!     ts = cmd_CreateSyntax("stats", StatsQuery, 0, "see 'stats help' for more information");
      cmd_Seek(ts, CUSTOM_PARMS_OFFSET);
      cmd_AddParm(ts, "-cmd", CMD_SINGLE, 0, "subcommand");
      cmd_AddParm(ts, "-arg1", CMD_SINGLE, CMD_OPTIONAL, "arg1");
--- 154,196 ----
      }
  
      
!     ts = cmd_CreateSyntax("online", VolOnline, NULL, "bring a volume online (FSYNC_VOL_ON opcode)");
      VOLOP_PARMS_DECL(ts);
  
!     ts = cmd_CreateSyntax("offline", VolOffline, NULL, "take a volume offline (FSYNC_VOL_OFF opcode)");
      VOLOP_PARMS_DECL(ts);
  
!     ts = cmd_CreateSyntax("mode", VolMode, NULL, "change volume attach mode (FSYNC_VOL_NEEDVOLUME opcode)");
      VOLOP_PARMS_DECL(ts);
      cmd_CreateAlias(ts, "needvolume");
  
!     ts = cmd_CreateSyntax("detach", VolDetach, NULL, "detach a volume (FSYNC_VOL_DONE opcode)");
      VOLOP_PARMS_DECL(ts);
  
!     ts = cmd_CreateSyntax("callback", VolBreakCBKs, NULL, "break callbacks for volume (FSYNC_VOL_BREAKCBKS opcode)");
      VOLOP_PARMS_DECL(ts);
      cmd_CreateAlias(ts, "cbk");
  
!     ts = cmd_CreateSyntax("move", VolMove, NULL, "set volume moved flag (FSYNC_VOL_MOVE opcode)");
      VOLOP_PARMS_DECL(ts);
  
!     ts = cmd_CreateSyntax("list", VolList, NULL, "sync local volume list (FSYNC_VOL_LISTVOLUMES opcode)");
      VOLOP_PARMS_DECL(ts);
      cmd_CreateAlias(ts, "ls");
  
!     ts = cmd_CreateSyntax("query", VolQuery, NULL, "get volume structure (FSYNC_VOL_QUERY opcode)");
      VOLOP_PARMS_DECL(ts);
      cmd_CreateAlias(ts, "qry");
  
!     ts = cmd_CreateSyntax("header", VolHdrQuery, NULL, "get volume disk data structure (FSYNC_VOL_QUERY_HDR opcode)");
      VOLOP_PARMS_DECL(ts);
      cmd_CreateAlias(ts, "hdr");
  
!     ts = cmd_CreateSyntax("volop", VolOpQuery, NULL, "get pending volume operation info (FSYNC_VOL_QUERY_VOP opcode)");
      VOLOP_PARMS_DECL(ts);
      cmd_CreateAlias(ts, "vop");
  
!     ts = cmd_CreateSyntax("stats", StatsQuery, NULL, "see 'stats help' for more information");
      cmd_Seek(ts, CUSTOM_PARMS_OFFSET);
      cmd_AddParm(ts, "-cmd", CMD_SINGLE, 0, "subcommand");
      cmd_AddParm(ts, "-arg1", CMD_SINGLE, CMD_OPTIONAL, "arg1");
***************
*** 412,418 ****
  }
  
  static int 
! VolOnline(struct cmd_syndesc * as, char * rock)
  {
      struct state state;
  
--- 412,418 ----
  }
  
  static int 
! VolOnline(struct cmd_syndesc * as, void * rock)
  {
      struct state state;
  
***************
*** 425,431 ****
  }
  
  static int 
! VolOffline(struct cmd_syndesc * as, char * rock)
  {
      struct state state;
  
--- 425,431 ----
  }
  
  static int 
! VolOffline(struct cmd_syndesc * as, void * rock)
  {
      struct state state;
  
***************
*** 438,444 ****
  }
  
  static int
! VolMode(struct cmd_syndesc * as, char * rock)
  {
      struct state state;
  
--- 438,444 ----
  }
  
  static int
! VolMode(struct cmd_syndesc * as, void * rock)
  {
      struct state state;
  
***************
*** 451,457 ****
  }
  
  static int
! VolDetach(struct cmd_syndesc * as, char * rock)
  {
      struct state state;
  
--- 451,457 ----
  }
  
  static int
! VolDetach(struct cmd_syndesc * as, void * rock)
  {
      struct state state;
  
***************
*** 464,470 ****
  }
  
  static int
! VolBreakCBKs(struct cmd_syndesc * as, char * rock)
  {
      struct state state;
  
--- 464,470 ----
  }
  
  static int
! VolBreakCBKs(struct cmd_syndesc * as, void * rock)
  {
      struct state state;
  
***************
*** 477,483 ****
  }
  
  static int
! VolMove(struct cmd_syndesc * as, char * rock)
  {
      struct state state;
  
--- 477,483 ----
  }
  
  static int
! VolMove(struct cmd_syndesc * as, void * rock)
  {
      struct state state;
  
***************
*** 490,496 ****
  }
  
  static int
! VolList(struct cmd_syndesc * as, char * rock)
  {
      struct state state;
  
--- 490,496 ----
  }
  
  static int
! VolList(struct cmd_syndesc * as, void * rock)
  {
      struct state state;
  
***************
*** 636,642 ****
  #endif
  
  static int
! VolQuery(struct cmd_syndesc * as, char * rock)
  {
      struct state state;
      SYNC_PROTO_BUF_DECL(res_buf);
--- 636,642 ----
  #endif
  
  static int
! VolQuery(struct cmd_syndesc * as, void * rock)
  {
      struct state state;
      SYNC_PROTO_BUF_DECL(res_buf);
***************
*** 765,771 ****
  }
  
  static int
! VolHdrQuery(struct cmd_syndesc * as, char * rock)
  {
      struct state state;
      SYNC_PROTO_BUF_DECL(res_buf);
--- 765,771 ----
  }
  
  static int
! VolHdrQuery(struct cmd_syndesc * as, void * rock)
  {
      struct state state;
      SYNC_PROTO_BUF_DECL(res_buf);
***************
*** 836,842 ****
  }
  
  static int
! VolOpQuery(struct cmd_syndesc * as, char * rock)
  {
      struct state state;
      SYNC_PROTO_BUF_DECL(res_buf);
--- 836,842 ----
  }
  
  static int
! VolOpQuery(struct cmd_syndesc * as, void * rock)
  {
      struct state state;
      SYNC_PROTO_BUF_DECL(res_buf);
***************
*** 892,898 ****
  }
  
  static int
! StatsQuery(struct cmd_syndesc * as, char * rock)
  {
      afs_int32 code;
      int command;
--- 892,898 ----
  }
  
  static int
! StatsQuery(struct cmd_syndesc * as, void * rock)
  {
      afs_int32 code;
      int command;
Index: openafs/src/vol/fssync-server.c
diff -c openafs/src/vol/fssync-server.c:1.1.4.3 openafs/src/vol/fssync-server.c:1.1.4.5
*** openafs/src/vol/fssync-server.c:1.1.4.3	Mon Oct 22 13:29:51 2007
--- openafs/src/vol/fssync-server.c	Thu Nov  1 11:00:03 2007
***************
*** 6,12 ****
   * License.  For details, see the LICENSE file in the top-level source
   * directory or online at http://www.openafs.org/dl/license10.html
   *
!  * Portions Copyright (c) 2006 Sine Nomine Associates
   */
  
  /*
--- 6,12 ----
   * License.  For details, see the LICENSE file in the top-level source
   * directory or online at http://www.openafs.org/dl/license10.html
   *
!  * Portions Copyright (c) 2006-2007 Sine Nomine Associates
   */
  
  /*
***************
*** 53,59 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/fssync-server.c,v 1.1.4.3 2007/10/22 17:29:51 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
--- 53,59 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/fssync-server.c,v 1.1.4.5 2007/11/01 15:00:03 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
***************
*** 74,88 ****
  #include <afs/assert.h>
  #endif /* AFS_PTHREAD_ENV */
  #include <signal.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  
  #include <rx/xdr.h>
  #include <afs/afsint.h>
--- 74,80 ----
***************
*** 388,393 ****
--- 380,393 ----
  	return;
      }
  
+     if (com.recv_len < sizeof(com.hdr)) {
+ 	Log("FSSYNC_com:  invalid protocol message length (%u)\n", com.recv_len);
+ 	res.hdr.response = SYNC_COM_ERROR;
+ 	res.hdr.reason = SYNC_REASON_MALFORMED_PACKET;
+ 	res.hdr.flags |= SYNC_FLAG_CHANNEL_SHUTDOWN;
+ 	goto respond;
+     }
+ 
      if (com.hdr.proto_version != FSYNC_PROTO_VERSION) {
  	Log("FSYNC_com:  invalid protocol version (%u)\n", com.hdr.proto_version);
  	res.hdr.response = SYNC_COM_ERROR;
***************
*** 395,400 ****
--- 395,407 ----
  	goto respond;
      }
  
+     if (com.hdr.command == SYNC_COM_CHANNEL_CLOSE) {
+ 	res.hdr.response = SYNC_OK;
+ 	res.hdr.flags |= SYNC_FLAG_CHANNEL_SHUTDOWN;
+ 	goto respond;
+     }
+ 
+ 
      VOL_LOCK;
      switch (com.hdr.command) {
      case FSYNC_VOL_ON:
***************
*** 416,425 ****
      case FSYNC_VOL_STATS_VLRU:
  	res.hdr.response = FSYNC_com_StatsOp(fd, &com, &res);
  	break;
-     case SYNC_COM_CHANNEL_CLOSE:
- 	res.hdr.response = SYNC_OK;
- 	res.hdr.flags |= SYNC_FLAG_CHANNEL_SHUTDOWN;
- 	break;
      default:
  	res.hdr.response = SYNC_BAD_COMMAND;
  	break;
--- 423,428 ----
Index: openafs/src/vol/ihandle.c
diff -c openafs/src/vol/ihandle.c:1.19.8.2 openafs/src/vol/ihandle.c:1.19.8.3
*** openafs/src/vol/ihandle.c:1.19.8.2	Mon Sep 10 17:59:14 2007
--- openafs/src/vol/ihandle.c	Tue Oct 30 11:16:57 2007
***************
*** 15,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/ihandle.c,v 1.19.8.2 2007/09/10 21:59:14 jaltman Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
  #include <errno.h>
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
  #else
--- 15,26 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/ihandle.c,v 1.19.8.3 2007/10/30 15:16:57 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
  #include <errno.h>
+ #include <string.h>
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
  #else
***************
*** 31,43 ****
  #include <sys/resource.h>
  #endif
  #endif
! #ifdef HAVE_STRING_H
! #include <string.h>
! #else
! #ifdef HAVE_STRINGS_H
! #include <strings.h>
! #endif
! #endif
  #include <rx/xdr.h>
  #include <afs/afsint.h>
  #include <errno.h>
--- 32,38 ----
  #include <sys/resource.h>
  #endif
  #endif
! 
  #include <rx/xdr.h>
  #include <afs/afsint.h>
  #include <errno.h>
Index: openafs/src/vol/listinodes.c
diff -c openafs/src/vol/listinodes.c:1.16.4.1 openafs/src/vol/listinodes.c:1.16.4.2
*** openafs/src/vol/listinodes.c:1.16.4.1	Sun Sep  3 01:53:15 2006
--- openafs/src/vol/listinodes.c	Tue Oct 30 11:16:57 2007
***************
*** 20,27 ****
  #include <afsconfig.h>
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/listinodes.c,v 1.16.4.1 2006/09/03 05:53:15 shadow Exp $");
  
  #ifndef AFS_NAMEI_ENV
  #if defined(AFS_LINUX20_ENV) || defined(AFS_SUN4_ENV)
--- 20,29 ----
  #include <afsconfig.h>
  #include <afs/param.h>
  
+ #include <string.h>
+ 
  RCSID
!     ("$Header: /cvs/openafs/src/vol/listinodes.c,v 1.16.4.2 2007/10/30 15:16:57 shadow Exp $");
  
  #ifndef AFS_NAMEI_ENV
  #if defined(AFS_LINUX20_ENV) || defined(AFS_SUN4_ENV)
Index: openafs/src/vol/partition.c
diff -c openafs/src/vol/partition.c:1.33.2.2 openafs/src/vol/partition.c:1.33.2.3
*** openafs/src/vol/partition.c:1.33.2.2	Thu May 10 18:42:33 2007
--- openafs/src/vol/partition.c	Tue Oct 30 11:16:57 2007
***************
*** 22,30 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/partition.c,v 1.33.2.2 2007/05/10 22:42:33 shadow Exp $");
  
  #include <ctype.h>
  #ifdef AFS_NT40_ENV
  #include <windows.h>
  #include <winbase.h>
--- 22,31 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/partition.c,v 1.33.2.3 2007/10/30 15:16:57 shadow Exp $");
  
  #include <ctype.h>
+ #include <string.h>
  #ifdef AFS_NT40_ENV
  #include <windows.h>
  #include <winbase.h>
***************
*** 107,120 ****
  #include <mntent.h>
  #endif
  
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #include <rx/xdr.h>
  #include <afs/afsint.h>
  #include "nfs.h"
--- 108,113 ----
Index: openafs/src/vol/physio.c
diff -c openafs/src/vol/physio.c:1.12 openafs/src/vol/physio.c:1.12.14.1
*** openafs/src/vol/physio.c:1.12	Fri Aug  8 16:40:45 2003
--- openafs/src/vol/physio.c	Tue Oct 30 11:16:57 2007
***************
*** 18,24 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/physio.c,v 1.12 2003/08/08 20:40:45 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
--- 18,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/physio.c,v 1.12.14.1 2007/10/30 15:16:57 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
***************
*** 28,40 ****
  #else
  #include <sys/file.h>
  #include <unistd.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef	AFS_SUN5_ENV
  #include <sys/fcntl.h>
  #endif
--- 28,34 ----
Index: openafs/src/vol/purge.c
diff -c openafs/src/vol/purge.c:1.12.2.2 openafs/src/vol/purge.c:1.12.2.3
*** openafs/src/vol/purge.c:1.12.2.2	Thu Jan  4 22:40:34 2007
--- openafs/src/vol/purge.c	Tue Oct 30 11:16:57 2007
***************
*** 17,23 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/purge.c,v 1.12.2.2 2007/01/05 03:40:34 shadow Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
--- 17,23 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/purge.c,v 1.12.2.3 2007/10/30 15:16:57 shadow Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
***************
*** 28,40 ****
  #include <sys/file.h>
  #include <sys/time.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <sys/stat.h>
  #include <afs/assert.h>
  
--- 28,34 ----
Index: openafs/src/vol/salvaged.c
diff -c openafs/src/vol/salvaged.c:1.1 openafs/src/vol/salvaged.c:1.1.4.2
*** openafs/src/vol/salvaged.c:1.1	Fri Mar 17 23:20:19 2006
--- openafs/src/vol/salvaged.c	Thu Nov  1 11:00:03 2007
***************
*** 1,5 ****
  /*
!  * Copyright 2006, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
--- 1,5 ----
  /*
!  * Copyright 2006-2007, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/salvaged.c,v 1.1 2006/03/18 04:20:19 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/salvaged.c,v 1.1.4.2 2007/11/01 15:00:03 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
***************
*** 179,185 ****
  #define DEFAULT_PARALLELISM 4 /* allow 4 parallel salvage workers by default */
  
  static int
! handleit(struct cmd_syndesc *as)
  {
      register struct cmd_item *ti;
      char pname[100], *temp;
--- 179,185 ----
  #define DEFAULT_PARALLELISM 4 /* allow 4 parallel salvage workers by default */
  
  static int
! handleit(struct cmd_syndesc *as, void *arock)
  {
      register struct cmd_item *ti;
      char pname[100], *temp;
***************
*** 365,371 ****
      }
  #endif
  
!     ts = cmd_CreateSyntax("initcmd", handleit, 0, "initialize the program");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL,
  		"Name of partition to salvage");
      cmd_AddParm(ts, "-volumeid", CMD_SINGLE, CMD_OPTIONAL,
--- 365,371 ----
      }
  #endif
  
!     ts = cmd_CreateSyntax("initcmd", handleit, NULL, "initialize the program");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL,
  		"Name of partition to salvage");
      cmd_AddParm(ts, "-volumeid", CMD_SINGLE, CMD_OPTIONAL,
***************
*** 529,534 ****
--- 529,537 ----
  	node = SALVSYNC_getWork();
  	assert(node != NULL);
  
+ 	Log("dispatching child to salvage volume %u...\n",
+ 	    node->command.sop.parent);
+ 
  	VOL_LOCK;
  	/* find a slot */
  	for (slot = 0; slot < Parallel; slot++) {
***************
*** 572,578 ****
      int ret;
      struct DiskPartition * partP;
  
!     VChildProcReconnectFS();
  
      /* do not attempt to close parent's logFile handle as
       * another thread may have held the lock on the FILE
--- 575,582 ----
      int ret;
      struct DiskPartition * partP;
  
!     /* do not allow further forking inside salvager */
!     canfork = 0;
  
      /* do not attempt to close parent's logFile handle as
       * another thread may have held the lock on the FILE
***************
*** 587,593 ****
  	ShowLog = 0;
      }
  
!     if (node->command.sop.volume <= 0) {
  	Log("salvageServer: invalid volume id specified; salvage aborted\n");
  	return 1;
      }
--- 591,597 ----
  	ShowLog = 0;
      }
  
!     if (node->command.sop.parent <= 0) {
  	Log("salvageServer: invalid volume id specified; salvage aborted\n");
  	return 1;
      }
***************
*** 600,608 ****
      }
  
      /* Salvage individual volume; don't notify fs */
!     SalvageFileSys1(partP, node->command.sop.volume);
! 
!     VDisconnectFS();
  
      fclose(logFile);
      return 0;
--- 604,610 ----
      }
  
      /* Salvage individual volume; don't notify fs */
!     SalvageFileSys1(partP, node->command.sop.parent);
  
      fclose(logFile);
      return 0;
***************
*** 654,660 ****
  
  	/* ok, we've reaped a child */
  	current_workers--;
! 	SALVSYNC_doneWorkByPid(pid, 0);
  	assert(pthread_cond_broadcast(&worker_cv) == 0);
      }
  
--- 656,662 ----
  
  	/* ok, we've reaped a child */
  	current_workers--;
! 	SALVSYNC_doneWorkByPid(pid, WEXITSTATUS(status));
  	assert(pthread_cond_broadcast(&worker_cv) == 0);
      }
  
***************
*** 671,677 ****
  	*pid = ret;
          if (WCOREDUMP(*status))
  	    Log("\"%s\" core dumped!\n", prog);
! 	if (WIFSIGNALED(*status) != 0 || WEXITSTATUS(*status) != 0)
  	    Log("\"%s\" (pid=%d) terminated abnormally!\n", prog, ret);
      } else {
  	Log("wait returned -1\n");
--- 673,681 ----
  	*pid = ret;
          if (WCOREDUMP(*status))
  	    Log("\"%s\" core dumped!\n", prog);
! 	if ((WIFSIGNALED(*status) != 0) ||
! 	    ((WEXITSTATUS(*status) != 0) &&
! 	     (WEXITSTATUS(*status) != SALSRV_EXIT_VOLGROUP_LINK)))
  	    Log("\"%s\" (pid=%d) terminated abnormally!\n", prog, ret);
      } else {
  	Log("wait returned -1\n");
Index: openafs/src/vol/salvager.c
diff -c openafs/src/vol/salvager.c:1.1.4.1 openafs/src/vol/salvager.c:1.1.4.2
*** openafs/src/vol/salvager.c:1.1.4.1	Tue Jan 30 07:17:28 2007
--- openafs/src/vol/salvager.c	Wed Oct 31 00:09:45 2007
***************
*** 21,27 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/salvager.c,v 1.1.4.1 2007/01/30 12:17:28 jaltman Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
--- 21,27 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/salvager.c,v 1.1.4.2 2007/10/31 04:09:45 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
***************
*** 137,143 ****
  
  
  static int
! handleit(struct cmd_syndesc *as)
  {
      register struct cmd_item *ti;
      char pname[100], *temp;
--- 137,143 ----
  
  
  static int
! handleit(struct cmd_syndesc *as, void *arock)
  {
      register struct cmd_item *ti;
      char pname[100], *temp;
***************
*** 440,446 ****
      }
  #endif
  
!     ts = cmd_CreateSyntax("initcmd", handleit, 0, "initialize the program");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL,
  		"Name of partition to salvage");
      cmd_AddParm(ts, "-volumeid", CMD_SINGLE, CMD_OPTIONAL,
--- 440,446 ----
      }
  #endif
  
!     ts = cmd_CreateSyntax("initcmd", handleit, NULL, "initialize the program");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL,
  		"Name of partition to salvage");
      cmd_AddParm(ts, "-volumeid", CMD_SINGLE, CMD_OPTIONAL,
Index: openafs/src/vol/salvsync-client.c
diff -c openafs/src/vol/salvsync-client.c:1.1 openafs/src/vol/salvsync-client.c:1.1.4.2
*** openafs/src/vol/salvsync-client.c:1.1	Fri Mar 17 23:20:19 2006
--- openafs/src/vol/salvsync-client.c	Thu Nov  1 11:00:03 2007
***************
*** 1,5 ****
  /*
!  * Copyright 2006, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
--- 1,5 ----
  /*
!  * Copyright 2006-2007, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
***************
*** 18,24 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/salvsync-client.c,v 1.1 2006/03/18 04:20:19 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
--- 18,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/salvsync-client.c,v 1.1.4.2 2007/11/01 15:00:03 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
***************
*** 35,49 ****
  #include <errno.h>
  #include <assert.h>
  #include <signal.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  
  #include <rx/xdr.h>
  #include <afs/afsint.h>
--- 35,41 ----
***************
*** 76,82 ****
  extern int VInit;
  extern pthread_mutex_t vol_salvsync_mutex;
  
! static SYNC_client_state salvsync_client_state = { -1, 2041, SALVSYNC_PROTO_VERSION, 5, 120 };
  
  /*
   * client-side routines
--- 68,81 ----
  extern int VInit;
  extern pthread_mutex_t vol_salvsync_mutex;
  
! static SYNC_client_state salvsync_client_state = 
!     { -1,                     /* file descriptor */
!       2041,                   /* port */
!       SALVSYNC_PROTO_VERSION, /* protocol version */
!       5,                      /* connect retry limit */
!       120,                    /* hard timeout */
!       "SALVSYNC",             /* protocol name string */
!     };
  
  /*
   * client-side routines
***************
*** 105,110 ****
--- 104,112 ----
  SALVSYNC_askSalv(SYNC_command * com, SYNC_response * res)
  {
      afs_int32 code;
+     SALVSYNC_command_hdr * scom = com->payload.buf;
+ 
+     scom->hdr_version = SALVSYNC_PROTO_VERSION;
  
      VSALVSYNC_LOCK;
      code = SYNC_ask(&salvsync_client_state, com, res);
***************
*** 158,163 ****
--- 160,166 ----
      com.hdr.reason = reason;
      com.hdr.command_len = sizeof(com.hdr) + sizeof(scom);
      scom.volume = volume;
+     scom.parent = volume;
      scom.prio = prio;
  
      if (partName) {
***************
*** 169,172 ****
--- 172,217 ----
      return SALVSYNC_askSalv(&com, res);
  }
  
+ afs_int32
+ SALVSYNC_LinkVolume(VolumeId parent, 
+ 		    VolumeId clone,
+ 		    char * partName,
+ 		    SYNC_response * res_in)
+ {
+     SYNC_command com;
+     SYNC_response res_l, *res;
+     SALVSYNC_command_hdr scom;
+     SALVSYNC_response_hdr sres;
+     int n, tot;
+ 
+     memset(&com, 0, sizeof(com));
+     memset(&scom, 0, sizeof(scom));
+ 
+     if (res_in) {
+ 	res = res_in;
+     } else {
+ 	memset(&res_l, 0, sizeof(res_l));
+ 	memset(&sres, 0, sizeof(sres));
+ 	res_l.payload.buf = (void *) &sres;
+ 	res_l.payload.len = sizeof(sres);
+ 	res = &res_l;
+     }
+ 
+     com.payload.buf = (void *) &scom;
+     com.payload.len = sizeof(scom);
+     com.hdr.command = SALVSYNC_OP_LINK;
+     com.hdr.reason = SALVSYNC_REASON_WHATEVER;
+     com.hdr.command_len = sizeof(com.hdr) + sizeof(scom);
+     scom.volume = clone;
+     scom.parent = parent;
+ 
+     if (partName) {
+ 	strlcpy(scom.partName, partName, sizeof(scom.partName));
+     } else {
+ 	scom.partName[0] = '\0';
+     }
+ 
+     return SALVSYNC_askSalv(&com, res);
+ }
+ 
  #endif /* AFS_DEMAND_ATTACH_FS */
Index: openafs/src/vol/salvsync-server.c
diff -c openafs/src/vol/salvsync-server.c:1.1.4.2 openafs/src/vol/salvsync-server.c:1.1.4.4
*** openafs/src/vol/salvsync-server.c:1.1.4.2	Thu Feb  8 18:59:32 2007
--- openafs/src/vol/salvsync-server.c	Thu Nov  1 11:00:03 2007
***************
*** 1,5 ****
  /*
!  * Copyright 2006, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
--- 1,5 ----
  /*
!  * Copyright 2006-2007, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
***************
*** 27,33 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/salvsync-server.c,v 1.1.4.2 2007/02/08 23:59:32 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
--- 27,33 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/salvsync-server.c,v 1.1.4.4 2007/11/01 15:00:03 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
***************
*** 44,57 ****
  #include <errno.h>
  #include <assert.h>
  #include <signal.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  
  #include <rx/xdr.h>
--- 44,50 ----
***************
*** 119,142 ****
   * SALVSYNC is a feature specific to the demand attach fileserver
   */
  
  static int AddToSalvageQueue(struct SalvageQueueNode * node);
  static void DeleteFromSalvageQueue(struct SalvageQueueNode * node);
  static void AddToPendingQueue(struct SalvageQueueNode * node);
  static void DeleteFromPendingQueue(struct SalvageQueueNode * node);
  static struct SalvageQueueNode * LookupPendingCommand(SALVSYNC_command_hdr * qry);
  static struct SalvageQueueNode * LookupPendingCommandByPid(int pid);
! static void RaiseCommandPrio(struct SalvageQueueNode * node, SALVSYNC_command_hdr * com);
! 
! static struct SalvageQueueNode * LookupNode(VolumeId vid, char * partName);
! static struct SalvageQueueNode * LookupNodeByCommand(SALVSYNC_command_hdr * qry);
  static void AddNodeToHash(struct SalvageQueueNode * node);
  static void DeleteNodeFromHash(struct SalvageQueueNode * node);
  
  static afs_int32 SALVSYNC_com_Salvage(SALVSYNC_command * com, SALVSYNC_response * res);
  static afs_int32 SALVSYNC_com_Cancel(SALVSYNC_command * com, SALVSYNC_response * res);
- static afs_int32 SALVSYNC_com_RaisePrio(SALVSYNC_command * com, SALVSYNC_response * res);
  static afs_int32 SALVSYNC_com_Query(SALVSYNC_command * com, SALVSYNC_response * res);
  static afs_int32 SALVSYNC_com_CancelAll(SALVSYNC_command * com, SALVSYNC_response * res);
  
  
  extern int LogLevel;
--- 112,145 ----
   * SALVSYNC is a feature specific to the demand attach fileserver
   */
  
+ static int AllocNode(struct SalvageQueueNode ** node);
+ 
  static int AddToSalvageQueue(struct SalvageQueueNode * node);
  static void DeleteFromSalvageQueue(struct SalvageQueueNode * node);
  static void AddToPendingQueue(struct SalvageQueueNode * node);
  static void DeleteFromPendingQueue(struct SalvageQueueNode * node);
  static struct SalvageQueueNode * LookupPendingCommand(SALVSYNC_command_hdr * qry);
  static struct SalvageQueueNode * LookupPendingCommandByPid(int pid);
! static void UpdateCommandPrio(struct SalvageQueueNode * node);
! static void HandlePrio(struct SalvageQueueNode * clone, 
! 		       struct SalvageQueueNode * parent,
! 		       afs_uint32 new_prio);
! 
! static int LinkNode(struct SalvageQueueNode * parent,
! 		    struct SalvageQueueNode * clone);
! 
! static struct SalvageQueueNode * LookupNode(VolumeId vid, char * partName, 
! 					    struct SalvageQueueNode ** parent);
! static struct SalvageQueueNode * LookupNodeByCommand(SALVSYNC_command_hdr * qry,
! 						     struct SalvageQueueNode ** parent);
  static void AddNodeToHash(struct SalvageQueueNode * node);
  static void DeleteNodeFromHash(struct SalvageQueueNode * node);
  
  static afs_int32 SALVSYNC_com_Salvage(SALVSYNC_command * com, SALVSYNC_response * res);
  static afs_int32 SALVSYNC_com_Cancel(SALVSYNC_command * com, SALVSYNC_response * res);
  static afs_int32 SALVSYNC_com_Query(SALVSYNC_command * com, SALVSYNC_response * res);
  static afs_int32 SALVSYNC_com_CancelAll(SALVSYNC_command * com, SALVSYNC_response * res);
+ static afs_int32 SALVSYNC_com_Link(SALVSYNC_command * com, SALVSYNC_response * res);
  
  
  extern int LogLevel;
***************
*** 146,166 ****
  static int AcceptSd = -1;		/* Socket used by server for accepting connections */
  
  
! /* be careful about rearranging elements in this structure.
!  * element placement has been optimized for locality of reference
!  * in SALVSYNC_getWork() */
  struct SalvageQueue {
      volatile int total_len;
!     volatile afs_int32 last_insert;    /* id of last partition to have a salvage node insert */
      volatile int len[VOLMAXPARTS+1];
!     volatile struct rx_queue part[VOLMAXPARTS+1];
      pthread_cond_t cv;
  };
  static struct SalvageQueue salvageQueue;  /* volumes waiting to be salvaged */
  
  struct QueueHead {
!     volatile struct rx_queue q;
!     volatile int len;
      pthread_cond_t queue_change_cv;
  };
  static struct QueueHead pendingQueue;  /* volumes being salvaged */
--- 149,172 ----
  static int AcceptSd = -1;		/* Socket used by server for accepting connections */
  
  
! /**
!  * queue of all volumes waiting to be salvaged.
!  */
  struct SalvageQueue {
      volatile int total_len;
!     volatile afs_int32 last_insert;    /**< id of last partition to have a salvage node inserted */
      volatile int len[VOLMAXPARTS+1];
!     volatile struct rx_queue part[VOLMAXPARTS+1]; /**< per-partition queues of pending salvages */
      pthread_cond_t cv;
  };
  static struct SalvageQueue salvageQueue;  /* volumes waiting to be salvaged */
  
+ /**
+  * queue of all volumes currently being salvaged.
+  */
  struct QueueHead {
!     volatile struct rx_queue q;  /**< queue of salvages in progress */
!     volatile int len;            /**< length of in-progress queue */
      pthread_cond_t queue_change_cv;
  };
  static struct QueueHead pendingQueue;  /* volumes being salvaged */
***************
*** 190,196 ****
  static struct QueueHead  SalvageHashTable[VSHASH_SIZE];
  
  static struct SalvageQueueNode *
! LookupNode(afs_uint32 vid, char * partName)
  {
      struct rx_queue *qp, *nqp;
      struct SalvageQueueNode *vsp;
--- 196,203 ----
  static struct QueueHead  SalvageHashTable[VSHASH_SIZE];
  
  static struct SalvageQueueNode *
! LookupNode(afs_uint32 vid, char * partName,
! 	   struct SalvageQueueNode ** parent)
  {
      struct rx_queue *qp, *nqp;
      struct SalvageQueueNode *vsp;
***************
*** 207,219 ****
      if (queue_IsEnd(&SalvageHashTable[idx], qp)) {
  	vsp = NULL;
      }
      return vsp;
  }
  
  static struct SalvageQueueNode *
! LookupNodeByCommand(SALVSYNC_command_hdr * qry)
  {
!     return LookupNode(qry->volume, qry->partName);
  }
  
  static void
--- 214,237 ----
      if (queue_IsEnd(&SalvageHashTable[idx], qp)) {
  	vsp = NULL;
      }
+ 
+     if (parent) {
+ 	if (vsp) {
+ 	    *parent = (vsp->type == SALVSYNC_VOLGROUP_CLONE) ?
+ 		vsp->volgroup.parent : vsp;
+ 	} else {
+ 	    *parent = NULL;
+ 	}
+     }
+ 
      return vsp;
  }
  
  static struct SalvageQueueNode *
! LookupNodeByCommand(SALVSYNC_command_hdr * qry,
! 		    struct SalvageQueueNode ** parent)
  {
!     return LookupNode(qry->volume, qry->partName, parent);
  }
  
  static void
***************
*** 427,432 ****
--- 445,458 ----
  	return;
      }
  
+     if (com.recv_len < sizeof(com.hdr)) {
+ 	Log("SALVSYNC_com:  invalid protocol message length (%u)\n", com.recv_len);
+ 	res.hdr.response = SYNC_COM_ERROR;
+ 	res.hdr.reason = SYNC_REASON_MALFORMED_PACKET;
+ 	res.hdr.flags |= SYNC_FLAG_CHANNEL_SHUTDOWN;
+ 	goto respond;
+     }
+ 
      if (com.hdr.proto_version != SALVSYNC_PROTO_VERSION) {
  	Log("SALVSYNC_com:  invalid protocol version (%u)\n", com.hdr.proto_version);
  	res.hdr.response = SYNC_COM_ERROR;
***************
*** 434,439 ****
--- 460,471 ----
  	goto respond;
      }
  
+     if (com.hdr.command == SYNC_COM_CHANNEL_CLOSE) {
+ 	res.hdr.response = SYNC_OK;
+ 	res.hdr.flags |= SYNC_FLAG_CHANNEL_SHUTDOWN;
+ 	goto respond;
+     }
+ 
      if (com.recv_len != (sizeof(com.hdr) + sizeof(SALVSYNC_command_hdr))) {
  	Log("SALVSYNC_com:  invalid protocol message length (%u)\n", com.recv_len);
  	res.hdr.response = SYNC_COM_ERROR;
***************
*** 447,452 ****
--- 479,485 ----
      case SALVSYNC_NOP:
  	break;
      case SALVSYNC_SALVAGE:
+     case SALVSYNC_RAISEPRIO:
  	res.hdr.response = SALVSYNC_com_Salvage(&scom, &sres);
  	break;
      case SALVSYNC_CANCEL:
***************
*** 457,473 ****
  	/* cancel all queued salvages */
  	res.hdr.response = SALVSYNC_com_CancelAll(&scom, &sres);
  	break;
-     case SALVSYNC_RAISEPRIO:
- 	/* raise the priority of a salvage */
- 	res.hdr.response = SALVSYNC_com_RaisePrio(&scom, &sres);
- 	break;
      case SALVSYNC_QUERY:
  	/* query whether a volume is done salvaging */
  	res.hdr.response = SALVSYNC_com_Query(&scom, &sres);
  	break;
!     case SYNC_COM_CHANNEL_CLOSE:
! 	res.hdr.response = SYNC_OK;
! 	res.hdr.flags |= SYNC_FLAG_CHANNEL_SHUTDOWN;
  	break;
      default:
  	res.hdr.response = SYNC_BAD_COMMAND;
--- 490,502 ----
  	/* cancel all queued salvages */
  	res.hdr.response = SALVSYNC_com_CancelAll(&scom, &sres);
  	break;
      case SALVSYNC_QUERY:
  	/* query whether a volume is done salvaging */
  	res.hdr.response = SALVSYNC_com_Query(&scom, &sres);
  	break;
!     case SALVSYNC_OP_LINK:
! 	/* link a clone to its parent in the scheduler */
! 	res.hdr.response = SALVSYNC_com_Link(&scom, &sres);
  	break;
      default:
  	res.hdr.response = SYNC_BAD_COMMAND;
***************
*** 489,495 ****
  SALVSYNC_com_Salvage(SALVSYNC_command * com, SALVSYNC_response * res)
  {
      afs_int32 code = SYNC_OK;
!     struct SalvageQueueNode * node;
  
      if (SYNC_verifyProtocolString(com->sop->partName, sizeof(com->sop->partName))) {
  	code = SYNC_FAILED;
--- 518,525 ----
  SALVSYNC_com_Salvage(SALVSYNC_command * com, SALVSYNC_response * res)
  {
      afs_int32 code = SYNC_OK;
!     struct SalvageQueueNode * node, * clone;
!     int hash = 0;
  
      if (SYNC_verifyProtocolString(com->sop->partName, sizeof(com->sop->partName))) {
  	code = SYNC_FAILED;
***************
*** 497,537 ****
  	goto done;
      }
  
!     node = LookupNodeByCommand(com->sop);
  
!     /* schedule a salvage for this volume */
!     if (node != NULL) {
! 	switch (node->state) {
! 	case SALVSYNC_STATE_ERROR:
! 	case SALVSYNC_STATE_DONE:
! 	    memcpy(&node->command.com, com->hdr, sizeof(SYNC_command_hdr));
! 	    memcpy(&node->command.sop, com->sop, sizeof(SALVSYNC_command_hdr));
! 	    node->command.sop.prio = 0;
! 	    if (AddToSalvageQueue(node)) {
! 		code = SYNC_DENIED;
! 	    }
! 	    break;
! 	default:
! 	    break;
! 	}
!     } else {
! 	node = (struct SalvageQueueNode *) malloc(sizeof(struct SalvageQueueNode));
! 	if (node == NULL) {
  	    code = SYNC_DENIED;
  	    goto done;
  	}
! 	memset(node, 0, sizeof(struct SalvageQueueNode));
! 	memcpy(&node->command.com, com->hdr, sizeof(SYNC_command_hdr));
! 	memcpy(&node->command.sop, com->sop, sizeof(SALVSYNC_command_hdr));
! 	AddNodeToHash(node);
  	if (AddToSalvageQueue(node)) {
- 	    /* roll back */
- 	    DeleteNodeFromHash(node);
- 	    free(node);
- 	    node = NULL;
  	    code = SYNC_DENIED;
- 	    goto done;
  	}
      }
  
      res->hdr->flags |= SALVSYNC_FLAG_VOL_STATS_VALID;
--- 527,567 ----
  	goto done;
      }
  
!     clone = LookupNodeByCommand(com->sop, &node);
  
!     if (node == NULL) {
! 	if (AllocNode(&node)) {
  	    code = SYNC_DENIED;
+ 	    res->hdr->reason = SYNC_REASON_NOMEM;
  	    goto done;
  	}
! 	clone = node;
! 	hash = 1;
!     }
! 
!     HandlePrio(clone, node, com->sop->prio);
! 
!     switch (node->state) {
!     case SALVSYNC_STATE_QUEUED:
! 	UpdateCommandPrio(node);
! 	break;
! 
!     case SALVSYNC_STATE_ERROR:
!     case SALVSYNC_STATE_DONE:
!     case SALVSYNC_STATE_UNKNOWN:
! 	memcpy(&clone->command.com, com->hdr, sizeof(SYNC_command_hdr));
! 	memcpy(&clone->command.sop, com->sop, sizeof(SALVSYNC_command_hdr));
  	if (AddToSalvageQueue(node)) {
  	    code = SYNC_DENIED;
  	}
+ 	break;
+ 
+     default:
+ 	break;
+     }
+ 
+     if (hash) {
+ 	AddNodeToHash(node);
      }
  
      res->hdr->flags |= SALVSYNC_FLAG_VOL_STATS_VALID;
***************
*** 554,560 ****
  	goto done;
      }
  
!     node = LookupNodeByCommand(com->sop);
  
      if (node == NULL) {
  	res->sop->state = SALVSYNC_STATE_UNKNOWN;
--- 584,590 ----
  	goto done;
      }
  
!     node = LookupNodeByCommand(com->sop, NULL);
  
      if (node == NULL) {
  	res->sop->state = SALVSYNC_STATE_UNKNOWN;
***************
*** 563,569 ****
  	res->hdr->flags |= SALVSYNC_FLAG_VOL_STATS_VALID;
  	res->sop->prio = node->command.sop.prio;
  	res->sop->state = node->state;
! 	if (node->state == SALVSYNC_STATE_QUEUED) {
  	    DeleteFromSalvageQueue(node);
  	}
      }
--- 593,600 ----
  	res->hdr->flags |= SALVSYNC_FLAG_VOL_STATS_VALID;
  	res->sop->prio = node->command.sop.prio;
  	res->sop->state = node->state;
! 	if ((node->type == SALVSYNC_VOLGROUP_PARENT) && 
! 	    (node->state == SALVSYNC_STATE_QUEUED)) {
  	    DeleteFromSalvageQueue(node);
  	}
      }
***************
*** 587,597 ****
      return SYNC_OK;
  }
  
  static afs_int32
! SALVSYNC_com_RaisePrio(SALVSYNC_command * com, SALVSYNC_response * res)
  {
      afs_int32 code = SYNC_OK;
!     struct SalvageQueueNode * node;
  
      if (SYNC_verifyProtocolString(com->sop->partName, sizeof(com->sop->partName))) {
  	code = SYNC_FAILED;
--- 618,631 ----
      return SYNC_OK;
  }
  
+ /**
+  * link a queue node for a clone to its parent volume.
+  */
  static afs_int32
! SALVSYNC_com_Link(SALVSYNC_command * com, SALVSYNC_response * res)
  {
      afs_int32 code = SYNC_OK;
!     struct SalvageQueueNode * clone, * parent;
  
      if (SYNC_verifyProtocolString(com->sop->partName, sizeof(com->sop->partName))) {
  	code = SYNC_FAILED;
***************
*** 599,633 ****
  	goto done;
      }
  
!     node = LookupNodeByCommand(com->sop);
  
!     /* raise the priority of a salvage */
!     if (node == NULL) {
! 	code = SALVSYNC_com_Salvage(com, res);
! 	node = LookupNodeByCommand(com->sop);
!     } else {
! 	switch (node->state) {
! 	case SALVSYNC_STATE_QUEUED:
! 	    RaiseCommandPrio(node, com->sop);
! 	    break;
! 	case SALVSYNC_STATE_SALVAGING:
! 	    break;
! 	case SALVSYNC_STATE_ERROR:
! 	case SALVSYNC_STATE_DONE:
! 	    code = SALVSYNC_com_Salvage(com, res);
! 	    break;
! 	default:
! 	    break;
  	}
      }
  
!     if (node == NULL) {
! 	res->sop->prio = 0;
! 	res->sop->state = SALVSYNC_STATE_UNKNOWN;
!     } else {
! 	res->hdr->flags |= SALVSYNC_FLAG_VOL_STATS_VALID;
! 	res->sop->prio = node->command.sop.prio;
! 	res->sop->state = node->state;
      }
  
   done:
--- 633,663 ----
  	goto done;
      }
  
!     /* lookup clone's salvage scheduling node */
!     clone = LookupNodeByCommand(com->sop, NULL);
!     if (clone == NULL) {
! 	code = SYNC_DENIED;
! 	res->hdr->reason = SALVSYNC_REASON_ERROR;
! 	goto done;
!     }
  
!     /* lookup parent's salvage scheduling node */
!     parent = LookupNode(com->sop->parent, com->sop->partName, NULL);
!     if (parent == NULL) {
! 	if (AllocNode(&parent)) {
! 	    code = SYNC_DENIED;
! 	    res->hdr->reason = SYNC_REASON_NOMEM;
! 	    goto done;
  	}
+ 	memcpy(&parent->command.com, com->hdr, sizeof(SYNC_command_hdr));
+ 	memcpy(&parent->command.sop, com->sop, sizeof(SALVSYNC_command_hdr));
+ 	parent->command.sop.volume = parent->command.sop.parent = com->sop->parent;
+ 	AddNodeToHash(parent);
      }
  
!     if (LinkNode(parent, clone)) {
! 	code = SYNC_DENIED;
! 	goto done;
      }
  
   done:
***************
*** 646,652 ****
  	goto done;
      }
  
!     node = LookupNodeByCommand(com->sop);
  
      /* query whether a volume is done salvaging */
      if (node == NULL) {
--- 676,682 ----
  	goto done;
      }
  
!     LookupNodeByCommand(com->sop, &node);
  
      /* query whether a volume is done salvaging */
      if (node == NULL) {
***************
*** 798,806 ****
--- 828,954 ----
  }
  
  static int
+ AllocNode(struct SalvageQueueNode ** node_out)
+ {
+     int code = 0;
+     struct SalvageQueueNode * node;
+ 
+     *node_out = node = (struct SalvageQueueNode *) 
+ 	malloc(sizeof(struct SalvageQueueNode));
+     if (node == NULL) {
+ 	code = 1;
+ 	goto done;
+     }
+ 
+     memset(node, 0, sizeof(struct SalvageQueueNode));
+     node->type = SALVSYNC_VOLGROUP_PARENT;
+     node->state = SALVSYNC_STATE_UNKNOWN;
+ 
+  done:
+     return code;
+ }
+ 
+ static int
+ LinkNode(struct SalvageQueueNode * parent,
+ 	 struct SalvageQueueNode * clone)
+ {
+     int code = 0;
+     int idx;
+ 
+     /* check for attaching a clone to a clone */
+     if (parent->type != SALVSYNC_VOLGROUP_PARENT) {
+ 	code = 1;
+ 	goto done;
+     }
+ 
+     /* check for pre-existing registration and openings */
+     for (idx = 0; idx < VOLMAXTYPES; idx++) {
+ 	if (parent->volgroup.children[idx] == clone) {
+ 	    goto linked;
+ 	}
+ 	if (parent->volgroup.children[idx] == NULL) {
+ 	    break;
+ 	}
+     }
+     if (idx == VOLMAXTYPES) {
+ 	code = 1;
+ 	goto done;
+     }
+ 
+     /* link parent and child */
+     parent->volgroup.children[idx] = clone;
+     clone->type = SALVSYNC_VOLGROUP_CLONE;
+     clone->volgroup.parent = parent;
+ 
+ 
+  linked:
+     switch (clone->state) {
+     case SALVSYNC_STATE_QUEUED:
+ 	DeleteFromSalvageQueue(clone);
+ 
+     case SALVSYNC_STATE_SALVAGING:
+ 	switch (parent->state) {
+ 	case SALVSYNC_STATE_UNKNOWN:
+ 	case SALVSYNC_STATE_ERROR:
+ 	case SALVSYNC_STATE_DONE:
+ 	    parent->command.sop.prio = clone->command.sop.prio;
+ 	    AddToSalvageQueue(parent);
+ 	    break;
+ 
+ 	case SALVSYNC_STATE_QUEUED:
+ 	    if (clone->command.sop.prio) {
+ 		parent->command.sop.prio += clone->command.sop.prio;
+ 		UpdateCommandPrio(parent);
+ 	    }
+ 	    break;
+ 
+ 	default:
+ 	    break;
+ 	}
+ 	break;
+ 
+     default:
+ 	break;
+     }
+ 
+  done:
+     return code;
+ }
+ 
+ static void
+ HandlePrio(struct SalvageQueueNode * clone, 
+ 	   struct SalvageQueueNode * node,
+ 	   afs_uint32 new_prio)
+ {
+     afs_uint32 delta;
+ 
+     switch (node->state) {
+     case SALVSYNC_STATE_ERROR:
+     case SALVSYNC_STATE_DONE:
+     case SALVSYNC_STATE_UNKNOWN:
+ 	node->command.sop.prio = 0;
+ 	break;
+     }
+ 
+     if (new_prio < clone->command.sop.prio) {
+ 	/* strange. let's just set our delta to 1 */
+ 	delta = 1;
+     } else {
+ 	delta = new_prio - clone->command.sop.prio;
+     }
+ 
+     if (clone->type == SALVSYNC_VOLGROUP_CLONE) {
+ 	clone->command.sop.prio = new_prio;
+     }
+ 
+     node->command.sop.prio += delta;
+ }
+ 
+ static int
  AddToSalvageQueue(struct SalvageQueueNode * node)
  {
      afs_int32 id;
+     struct SalvageQueueNode * last = NULL;
  
      id = volutil_GetPartitionID(node->command.sop.partName);
      if (id < 0 || id > VOLMAXPARTS) {
***************
*** 810,821 ****
--- 958,982 ----
  	/* don't enqueue salvage requests for unmounted partitions */
  	return 1;
      }
+     if (queue_IsOnQueue(node)) {
+ 	return 0;
+     }
+ 
+     if (queue_IsNotEmpty(&salvageQueue.part[id])) {
+ 	last = queue_Last(&salvageQueue.part[id], SalvageQueueNode);
+     }
      queue_Append(&salvageQueue.part[id], node);
      salvageQueue.len[id]++;
      salvageQueue.total_len++;
      salvageQueue.last_insert = id;
      node->partition_id = id;
      node->state = SALVSYNC_STATE_QUEUED;
+ 
+     /* reorder, if necessary */
+     if (last && last->command.sop.prio < node->command.sop.prio) {
+ 	UpdateCommandPrio(node);
+     }
+ 
      assert(pthread_cond_broadcast(&salvageQueue.cv) == 0);
      return 0;
  }
***************
*** 887,907 ****
  
  /* raise the priority of a previously scheduled salvage */
  static void
! RaiseCommandPrio(struct SalvageQueueNode * node, SALVSYNC_command_hdr * com)
  {
      struct SalvageQueueNode *np, *nnp;
      afs_int32 id;
  
      assert(queue_IsOnQueue(node));
  
!     node->command.sop.prio = com->prio;
      id = node->partition_id;
!     if (queue_First(&salvageQueue.part[id], SalvageQueueNode)->command.sop.prio < com->prio) {
  	queue_Remove(node);
  	queue_Prepend(&salvageQueue.part[id], node);
      } else {
  	for (queue_ScanBackwardsFrom(&salvageQueue.part[id], node, np, nnp, SalvageQueueNode)) {
! 	    if (np->command.sop.prio > com->prio)
  		break;
  	}
  	if (queue_IsEnd(&salvageQueue.part[id], np)) {
--- 1048,1069 ----
  
  /* raise the priority of a previously scheduled salvage */
  static void
! UpdateCommandPrio(struct SalvageQueueNode * node)
  {
      struct SalvageQueueNode *np, *nnp;
      afs_int32 id;
+     afs_uint32 prio;
  
      assert(queue_IsOnQueue(node));
  
!     prio = node->command.sop.prio;
      id = node->partition_id;
!     if (queue_First(&salvageQueue.part[id], SalvageQueueNode)->command.sop.prio < prio) {
  	queue_Remove(node);
  	queue_Prepend(&salvageQueue.part[id], node);
      } else {
  	for (queue_ScanBackwardsFrom(&salvageQueue.part[id], node, np, nnp, SalvageQueueNode)) {
! 	    if (np->command.sop.prio > prio)
  		break;
  	}
  	if (queue_IsEnd(&salvageQueue.part[id], np)) {
***************
*** 934,940 ****
        assert(pthread_cond_wait(&salvageQueue.cv, &vol_glock_mutex) == 0);
      }
  
- 
      /* 
       * short circuit for simple case where only one partition has
       * scheduled salvages
--- 1096,1101 ----
***************
*** 1011,1016 ****
--- 1172,1179 ----
  SALVSYNC_doneWork_r(struct SalvageQueueNode * node, int result)
  {
      afs_int32 partid;
+     int idx;
+ 
      DeleteFromPendingQueue(node);
      partid = node->partition_id;
      if (partid >=0 && partid <= VOLMAXPARTS) {
***************
*** 1018,1026 ****
      }
      if (result == 0) {
  	node->state = SALVSYNC_STATE_DONE;
!     } else {
  	node->state = SALVSYNC_STATE_ERROR;
      }
  }
  
  void 
--- 1181,1197 ----
      }
      if (result == 0) {
  	node->state = SALVSYNC_STATE_DONE;
!     } else if (result != SALSRV_EXIT_VOLGROUP_LINK) {
  	node->state = SALVSYNC_STATE_ERROR;
      }
+ 
+     if (node->type == SALVSYNC_VOLGROUP_PARENT) {
+ 	for (idx = 0; idx < VOLMAXTYPES; idx++) {
+ 	    if (node->volgroup.children[idx]) {
+ 		node->volgroup.children[idx]->state = node->state;
+ 	    }
+ 	}
+     }
  }
  
  void 
Index: openafs/src/vol/salvsync.h
diff -c openafs/src/vol/salvsync.h:1.1 openafs/src/vol/salvsync.h:1.1.4.1
*** openafs/src/vol/salvsync.h:1.1	Fri Mar 17 23:20:19 2006
--- openafs/src/vol/salvsync.h	Thu Nov  1 11:00:03 2007
***************
*** 1,5 ****
  /*
!  * Copyright 2006, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
--- 1,5 ----
  /*
!  * Copyright 2006-2007, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
***************
*** 14,59 ****
  #ifndef _AFS_VOL_SALVSYNC_H
  #define _AFS_VOL_SALVSYNC_H
  
  #ifdef AFS_DEMAND_ATTACH_FS
  #include "daemon_com.h"
  
  
! #define SALVSYNC_PROTO_VERSION        1
  
  
! /* SALVSYNC command codes */
! #define SALVSYNC_NOP            SYNC_COM_CODE_DECL(0)   /* just return stats */
! #define SALVSYNC_SALVAGE	SYNC_COM_CODE_DECL(1)	/* schedule a salvage */
! #define SALVSYNC_CANCEL         SYNC_COM_CODE_DECL(2)   /* Cancel a salvage */
! #define SALVSYNC_RAISEPRIO      SYNC_COM_CODE_DECL(3)   /* move a salvage operation to
! 							 * the head of the work queue */
! #define SALVSYNC_QUERY          SYNC_COM_CODE_DECL(4)   /* query the status of a salvage */
! #define SALVSYNC_CANCELALL      SYNC_COM_CODE_DECL(5)   /* cancel all pending salvages */
! 
! /* SALVSYNC reason codes */
! #define SALVSYNC_WHATEVER	SYNC_REASON_CODE_DECL(0)  /* XXXX */
! #define SALVSYNC_ERROR		SYNC_REASON_CODE_DECL(1)  /* volume is in error state */
! #define SALVSYNC_OPERATOR	SYNC_REASON_CODE_DECL(2)  /* operator forced salvage */
! #define SALVSYNC_SHUTDOWN       SYNC_REASON_CODE_DECL(3)  /* cancel due to shutdown */
! #define SALVSYNC_NEEDED         SYNC_REASON_CODE_DECL(4)  /* needsSalvaged flag set */
  
  /* SALVSYNC response codes */
  
  /* SALVSYNC flags */
  #define SALVSYNC_FLAG_VOL_STATS_VALID SYNC_FLAG_CODE_DECL(0) /* volume stats in response are valid */
  
! /* SALVSYNC command state fields */
! #define SALVSYNC_STATE_UNKNOWN        0         /* unknown state */
! #define SALVSYNC_STATE_QUEUED         1         /* salvage request on queue */
! #define SALVSYNC_STATE_SALVAGING      2         /* salvage is happening now */
! #define SALVSYNC_STATE_ERROR          3         /* salvage ended in an error */
! #define SALVSYNC_STATE_DONE           4         /* last salvage ended successfully */
  
  
  typedef struct SALVSYNC_command_hdr {
!     afs_uint32 prio;
!     afs_uint32 volume;
!     char partName[16];		/* partition name, e.g. /vicepa */
  } SALVSYNC_command_hdr;
  
  typedef struct SALVSYNC_response_hdr {
--- 14,99 ----
  #ifndef _AFS_VOL_SALVSYNC_H
  #define _AFS_VOL_SALVSYNC_H
  
+ #define SALSRV_EXIT_VOLGROUP_LINK 10
+ 
+ 
  #ifdef AFS_DEMAND_ATTACH_FS
  #include "daemon_com.h"
+ #include "voldefs.h"
  
  
! #define SALVSYNC_PROTO_VERSION_V1     1
! #define SALVSYNC_PROTO_VERSION_V2     2
! #define SALVSYNC_PROTO_VERSION        SALVSYNC_PROTO_VERSION_V2
  
  
! /** 
!  * SALVSYNC protocol command codes.
!  */
! typedef enum {
!     SALVSYNC_OP_NOP           = SYNC_COM_CODE_DECL(0),     /**< just return stats */
!     SALVSYNC_OP_SALVAGE       = SYNC_COM_CODE_DECL(1),     /**< schedule a salvage */
!     SALVSYNC_OP_CANCEL        = SYNC_COM_CODE_DECL(2),     /**< cancel a salvage */
!     SALVSYNC_OP_RAISEPRIO     = SYNC_COM_CODE_DECL(3),     /**< raise salvage priority */
!     SALVSYNC_OP_QUERY         = SYNC_COM_CODE_DECL(4),     /**< query status of a salvage */
!     SALVSYNC_OP_CANCELALL     = SYNC_COM_CODE_DECL(5),     /**< cancel all pending salvages */
!     SALVSYNC_OP_LINK          = SYNC_COM_CODE_DECL(6),     /**< link a clone to its parent */
!     SALVSYNC_OP_MAX_ID /* must be at end of enum */
! } SALVSYNC_op_code_t;
! 
! #define SALVSYNC_NOP         SALVSYNC_OP_NOP
! #define SALVSYNC_SALVAGE     SALVSYNC_OP_SALVAGE
! #define SALVSYNC_CANCEL      SALVSYNC_OP_CANCEL
! #define SALVSYNC_RAISEPRIO   SALVSYNC_OP_RAISEPRIO
! #define SALVSYNC_QUERY       SALVSYNC_OP_QUERY
! #define SALVSYNC_CANCELALL   SALVSYNC_OP_CANCELALL
! #define SALVSYNC_LINK        SALVSYNC_OP_LINK
! 
! /**
!  * SALVSYNC protocol reason codes.
!  */
! typedef enum {
!     SALVSYNC_REASON_WHATEVER   = SYNC_REASON_CODE_DECL(0), /**< XXX */
!     SALVSYNC_REASON_ERROR      = SYNC_REASON_CODE_DECL(1), /**< volume is in error state */
!     SALVSYNC_REASON_OPERATOR   = SYNC_REASON_CODE_DECL(2), /**< operator forced salvage */
!     SALVSYNC_REASON_SHUTDOWN   = SYNC_REASON_CODE_DECL(3), /**< cancel due to shutdown */
!     SALVSYNC_REASON_NEEDED     = SYNC_REASON_CODE_DECL(4), /**< needsSalvaged flag set */
!     SALVSYNC_REASON_MAX_ID /* must be at end of enum */
! } SALVSYNC_reason_code_t;
! 
! #define SALVSYNC_WHATEVER    SALVSYNC_REASON_WHATEVER
! #define SALVSYNC_ERROR       SALVSYNC_REASON_ERROR
! #define SALVSYNC_OPERATOR    SALVSYNC_REASON_OPERATOR
! #define SALVSYNC_SHUTDOWN    SALVSYNC_REASON_SHUTDOWN
! #define SALVSYNC_NEEDED      SALVSYNC_REASON_NEEDED
  
  /* SALVSYNC response codes */
  
  /* SALVSYNC flags */
  #define SALVSYNC_FLAG_VOL_STATS_VALID SYNC_FLAG_CODE_DECL(0) /* volume stats in response are valid */
  
! /** 
!  * SALVSYNC command state.
!  */
! typedef enum {
!     SALVSYNC_STATE_UNKNOWN = 0,       /**< unknown state */
!     SALVSYNC_STATE_QUEUED  = 1,       /**< salvage request is queued */
!     SALVSYNC_STATE_SALVAGING = 2,     /**< salvage is happening now */
!     SALVSYNC_STATE_ERROR = 3,         /**< salvage ended in an error */
!     SALVSYNC_STATE_DONE = 4           /**< last salvage ended successfully */
! } SALVSYNC_command_state_t;
  
  
+ /**
+  * on-wire salvsync protocol payload.
+  */
  typedef struct SALVSYNC_command_hdr {
!     afs_uint32 hdr_version;     /**< salvsync protocol header version */
!     afs_uint32 prio;            /**< salvage priority */
!     afs_uint32 volume;          /**< volume on which to operate */
!     afs_uint32 parent;          /**< parent volume (for vol group linking command) */
!     char partName[16];		/**< partition name, e.g. /vicepa */
!     afs_uint32 reserved[6];
  } SALVSYNC_command_hdr;
  
  typedef struct SALVSYNC_response_hdr {
***************
*** 61,66 ****
--- 101,107 ----
      afs_int32 prio;
      afs_int32 sq_len;
      afs_int32 pq_len;
+     afs_uint32 reserved[4];
  } SALVSYNC_response_hdr;
  
  typedef struct SALVSYNC_command {
***************
*** 80,89 ****
      SALVSYNC_command_hdr sop;
  } SALVSYNC_command_info;
  
  struct SalvageQueueNode {
      struct rx_queue q;
      struct rx_queue hash_chain;
!     afs_uint32 state;
      struct SALVSYNC_command_info command;
      afs_int32 partition_id;
      int pid;
--- 121,140 ----
      SALVSYNC_command_hdr sop;
  } SALVSYNC_command_info;
  
+ typedef enum {
+     SALVSYNC_VOLGROUP_PARENT,
+     SALVSYNC_VOLGROUP_CLONE
+ } SalvageQueueNodeType_t;
+ 
  struct SalvageQueueNode {
      struct rx_queue q;
      struct rx_queue hash_chain;
!     SalvageQueueNodeType_t type;
!     union {
! 	struct SalvageQueueNode * parent;
! 	struct SalvageQueueNode * children[VOLMAXTYPES];
!     } volgroup;
!     SALVSYNC_command_state_t state;
      struct SALVSYNC_command_info command;
      afs_int32 partition_id;
      int pid;
***************
*** 99,104 ****
--- 150,157 ----
  extern afs_int32 SALVSYNC_askSalv(SYNC_command * com, SYNC_response * res);
  extern afs_int32 SALVSYNC_SalvageVolume(VolumeId volume, char *partName, int com, int reason,
  					afs_uint32 prio, SYNC_response * res);
+ extern afs_int32 SALVSYNC_LinkVolume(VolumeId parent, VolumeId clone,
+ 				     char * partName, SYNC_response * res_in);
  
  /* salvage server interfaces */
  extern void SALVSYNC_salvInit(void);
Index: openafs/src/vol/vnode.c
diff -c openafs/src/vol/vnode.c:1.27 openafs/src/vol/vnode.c:1.27.2.1
*** openafs/src/vol/vnode.c:1.27	Fri Mar 17 14:54:51 2006
--- openafs/src/vol/vnode.c	Tue Oct 30 11:16:58 2007
***************
*** 20,36 ****
  #define MAXINT     (~(1<<((sizeof(int)*8)-1)))
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/vnode.c,v 1.27 2006/03/17 19:54:51 shadow Exp $");
  
  #include <errno.h>
  #include <stdio.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef AFS_PTHREAD_ENV
  #include <assert.h>
  #else /* AFS_PTHREAD_ENV */
--- 20,30 ----
  #define MAXINT     (~(1<<((sizeof(int)*8)-1)))
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/vnode.c,v 1.27.2.1 2007/10/30 15:16:58 shadow Exp $");
  
  #include <errno.h>
  #include <stdio.h>
  #include <string.h>
  #ifdef AFS_PTHREAD_ENV
  #include <assert.h>
  #else /* AFS_PTHREAD_ENV */
Index: openafs/src/vol/vol-bless.c
diff -c openafs/src/vol/vol-bless.c:1.1 openafs/src/vol/vol-bless.c:1.1.10.1
*** openafs/src/vol/vol-bless.c:1.1	Wed Dec  1 17:53:30 2004
--- openafs/src/vol/vol-bless.c	Wed Oct 31 00:09:45 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/vol-bless.c,v 1.1 2004/12/01 22:53:30 shadow Exp $");
  
  #include <stdio.h>
  
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/vol-bless.c,v 1.1.10.1 2007/10/31 04:09:45 shadow Exp $");
  
  #include <stdio.h>
  
***************
*** 28,34 ****
  int VolumeChanged; /* to keep physio happy */
  
  static int
! handleit(struct cmd_syndesc *as, char *arock)
  {
      Volume *vp;
      Error ec;
--- 28,34 ----
  int VolumeChanged; /* to keep physio happy */
  
  static int
! handleit(struct cmd_syndesc *as, void *arock)
  {
      Volume *vp;
      Error ec;
***************
*** 73,79 ****
      register struct cmd_syndesc *ts;
      afs_int32 code;
  
!     ts = cmd_CreateSyntax(NULL, handleit, 0, "Manipulate volume blessed bit");
      cmd_AddParm(ts, "-id", CMD_SINGLE, CMD_REQUIRED, "Volume id");
      cmd_AddParm(ts, "-bless", CMD_FLAG, CMD_OPTIONAL, "Set blessed bit");
      cmd_AddParm(ts, "-unbless", CMD_FLAG, CMD_OPTIONAL, "Clear blessed bit");
--- 73,79 ----
      register struct cmd_syndesc *ts;
      afs_int32 code;
  
!     ts = cmd_CreateSyntax(NULL, handleit, NULL, "Manipulate volume blessed bit");
      cmd_AddParm(ts, "-id", CMD_SINGLE, CMD_REQUIRED, "Volume id");
      cmd_AddParm(ts, "-bless", CMD_FLAG, CMD_OPTIONAL, "Set blessed bit");
      cmd_AddParm(ts, "-unbless", CMD_FLAG, CMD_OPTIONAL, "Clear blessed bit");
Index: openafs/src/vol/vol-info.c
diff -c openafs/src/vol/vol-info.c:1.22 openafs/src/vol/vol-info.c:1.22.4.1
*** openafs/src/vol/vol-info.c:1.22	Sat Oct 15 11:36:56 2005
--- openafs/src/vol/vol-info.c	Wed Oct 31 00:09:45 2007
***************
*** 18,24 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/vol-info.c,v 1.22 2005/10/15 15:36:56 shadow Exp $");
  
  #include <ctype.h>
  #include <errno.h>
--- 18,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/vol-info.c,v 1.22.4.1 2007/10/31 04:09:45 shadow Exp $");
  
  #include <ctype.h>
  #include <errno.h>
***************
*** 217,223 ****
  
  
  static int
! handleit(struct cmd_syndesc *as)
  {
      register struct cmd_item *ti;
      int err = 0;
--- 217,223 ----
  
  
  static int
! handleit(struct cmd_syndesc *as, void *arock)
  {
      register struct cmd_item *ti;
      int err = 0;
***************
*** 622,628 ****
      register struct cmd_syndesc *ts;
      afs_int32 code;
  
!     ts = cmd_CreateSyntax(NULL, handleit, 0, "Dump volume's internal state");
      cmd_AddParm(ts, "-online", CMD_FLAG, CMD_OPTIONAL,
  		"Get info from running fileserver");
      cmd_AddParm(ts, "-vnode", CMD_FLAG, CMD_OPTIONAL, "Dump vnode info");
--- 622,628 ----
      register struct cmd_syndesc *ts;
      afs_int32 code;
  
!     ts = cmd_CreateSyntax(NULL, handleit, NULL, "Dump volume's internal state");
      cmd_AddParm(ts, "-online", CMD_FLAG, CMD_OPTIONAL,
  		"Get info from running fileserver");
      cmd_AddParm(ts, "-vnode", CMD_FLAG, CMD_OPTIONAL, "Dump vnode info");
Index: openafs/src/vol/vol-salvage.c
diff -c openafs/src/vol/vol-salvage.c:1.51.2.9 openafs/src/vol/vol-salvage.c:1.51.2.10
*** openafs/src/vol/vol-salvage.c:1.51.2.9	Thu Oct  4 23:23:52 2007
--- openafs/src/vol/vol-salvage.c	Thu Nov  1 11:00:03 2007
***************
*** 87,93 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/vol-salvage.c,v 1.51.2.9 2007/10/05 03:23:52 shadow Exp $");
  
  #ifndef AFS_NT40_ENV
  #include <sys/param.h>
--- 87,93 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/vol-salvage.c,v 1.51.2.10 2007/11/01 15:00:03 shadow Exp $");
  
  #ifndef AFS_NT40_ENV
  #include <sys/param.h>
***************
*** 235,245 ****
--- 235,252 ----
  int orphans = ORPH_IGNORE;	/* -orphans option */
  int Showmode = 0;
  
+ 
  #ifndef AFS_NT40_ENV
  int useSyslog = 0;		/* -syslog flag */
  int useSyslogFacility = LOG_DAEMON;	/* -syslogfacility option */
  #endif
  
+ #ifdef AFS_NT40_ENV
+ int canfork = 0;
+ #else
+ int canfork = 1;
+ #endif
+ 
  #define	MAXPARALLEL	32
  
  int OKToZap;			/* -o flag */
***************
*** 1258,1266 ****
  		DiskToVolumeHeader(&vsp->header, &diskHeader);
  		if (singleVolumeNumber && vsp->header.id == singleVolumeNumber
  		    && vsp->header.parent != singleVolumeNumber) {
! 		    Log("%u is a read-only volume; not salvaged\n",
! 			singleVolumeNumber);
! 		    Exit(1);
  		}
  		if (!singleVolumeNumber
  		    || (vsp->header.id == singleVolumeNumber
--- 1265,1287 ----
  		DiskToVolumeHeader(&vsp->header, &diskHeader);
  		if (singleVolumeNumber && vsp->header.id == singleVolumeNumber
  		    && vsp->header.parent != singleVolumeNumber) {
! 		    if (programType == salvageServer) {
! #ifdef SALVSYNC_BUILD_CLIENT
! 			Log("fileserver requested salvage of clone %u; scheduling salvage of volume group %u...\n",
! 			    vsp->header.id, vsp->header.parent);
! 			if (SALVSYNC_LinkVolume(vsp->header.parent,
! 						vsp->header.id,
! 						fileSysPartition->name,
! 						NULL) != SYNC_OK) {
! 			    Log("schedule request failed\n");
! 			}
! #endif
! 			Exit(SALSRV_EXIT_VOLGROUP_LINK);
! 		    } else {
! 			Log("%u is a read-only volume; not salvaged\n",
! 			    singleVolumeNumber);
! 			Exit(1);
! 		    }
  		}
  		if (!singleVolumeNumber
  		    || (vsp->header.id == singleVolumeNumber
***************
*** 3287,3293 ****
--- 3308,3325 ----
  #else
      f = fork();
      assert(f >= 0);
+ #ifdef AFS_DEMAND_ATTACH_FS
+     if ((f == 0) && (programType == salvageServer)) {
+ 	/* we are a salvageserver child */
+ #ifdef FSSYNC_BUILD_CLIENT
+ 	VChildProcReconnectFS_r();
+ #endif
+ #ifdef SALVSYNC_BUILD_CLIENT
+ 	VReconnectSALV_r();
  #endif
+     }
+ #endif /* AFS_DEMAND_ATTACH_FS */
+ #endif /* !AFS_NT40_ENV */
      return f;
  }
  
***************
*** 3297,3302 ****
--- 3329,3346 ----
  {
      if (ShowLog)
  	showlog();
+ 
+ #ifdef AFS_DEMAND_ATTACH_FS
+     if (programType == salvageServer) {
+ #ifdef SALVSYNC_BUILD_CLIENT
+ 	VDisconnectSALV();
+ #endif
+ #ifdef FSSYNC_BUILD_CLIENT
+ 	VDisconnectFS();
+ #endif
+     }
+ #endif /* AFS_DEMAND_ATTACH_FS */
+ 
  #ifdef AFS_NT40_ENV
      if (main_thread != pthread_self())
  	pthread_exit((void *)code);
Index: openafs/src/vol/vol-salvage.h
diff -c openafs/src/vol/vol-salvage.h:1.1.4.1 openafs/src/vol/vol-salvage.h:1.1.4.2
*** openafs/src/vol/vol-salvage.h:1.1.4.1	Tue Jan 30 07:17:28 2007
--- openafs/src/vol/vol-salvage.h	Thu Nov  1 11:00:03 2007
***************
*** 211,221 ****
      struct InodeSummary *svgp_inodeSummaryp;
      int svgp_count;
  } SVGParms_t;
- #define canfork 0
- #else /* AFS_NT40_ENV */
- #define canfork 1
  #endif /* AFS_NT40_ENV */
  
  
  /* prototypes */
  extern void Exit(int code);
--- 211,220 ----
      struct InodeSummary *svgp_inodeSummaryp;
      int svgp_count;
  } SVGParms_t;
  #endif /* AFS_NT40_ENV */
  
+ extern int canfork;
+ 
  
  /* prototypes */
  extern void Exit(int code);
Index: openafs/src/vol/voldefs.h
diff -c openafs/src/vol/voldefs.h:1.5 openafs/src/vol/voldefs.h:1.5.2.1
*** openafs/src/vol/voldefs.h:1.5	Fri Mar 17 14:54:52 2006
--- openafs/src/vol/voldefs.h	Thu Nov  1 11:00:03 2007
***************
*** 25,30 ****
--- 25,32 ----
  #define ROVOL			1
  #define BACKVOL			2
  
+ #define VOLMAXTYPES             3   /* _current_ max number of types */
+ 
  /* maximum numbe of Vice partitions */
  #define	VOLMAXPARTS	255
  
Index: openafs/src/vol/volume.c
diff -c openafs/src/vol/volume.c:1.43.2.10 openafs/src/vol/volume.c:1.43.2.11
*** openafs/src/vol/volume.c:1.43.2.10	Thu Sep 27 12:32:12 2007
--- openafs/src/vol/volume.c	Thu Nov  1 11:00:03 2007
***************
*** 22,28 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/volume.c,v 1.43.2.10 2007/09/27 16:32:12 shadow Exp $");
  
  #include <rx/xdr.h>
  #include <afs/afsint.h>
--- 22,28 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/volume.c,v 1.43.2.11 2007/11/01 15:00:03 shadow Exp $");
  
  #include <rx/xdr.h>
  #include <afs/afsint.h>
***************
*** 3737,3744 ****
  int
  VConnectSALV_r(void)
  {
-     assert((programType != salvageServer) &&
- 	   (programType != volumeUtility));
      return SALVSYNC_clientInit();
  }
  
--- 3737,3742 ----
***************
*** 3755,3762 ****
  int
  VDisconnectSALV_r(void)
  { 
-     assert((programType != salvageServer) &&
- 	   (programType != volumeUtility));
      return SALVSYNC_clientFinis();
  }
  
--- 3753,3758 ----
***************
*** 3773,3780 ****
  int
  VReconnectSALV_r(void)
  {
-     assert((programType != salvageServer) &&
- 	   (programType != volumeUtility));
      return SALVSYNC_clientReconnect();
  }
  #endif /* SALVSYNC_BUILD_CLIENT */
--- 3769,3774 ----
***************
*** 3830,3836 ****
      VOL_UNLOCK;
  }
  
! static int
  VChildProcReconnectFS_r(void)
  {
      return FSYNC_clientChildProcReconnect();
--- 3824,3830 ----
      VOL_UNLOCK;
  }
  
! int
  VChildProcReconnectFS_r(void)
  {
      return FSYNC_clientChildProcReconnect();
Index: openafs/src/volser/Makefile.in
diff -c openafs/src/volser/Makefile.in:1.15 openafs/src/volser/Makefile.in:1.15.14.1
*** openafs/src/volser/Makefile.in:1.15	Mon Aug  9 00:35:54 2004
--- openafs/src/volser/Makefile.in	Thu Nov  1 12:02:31 2007
***************
*** 83,98 ****
  	${COMPILE_ET} -p ${srcdir} volerr -h volser
  
  volint.cs.c: volint.xg
! 	${RXGEN} -x -C -o $@ ${srcdir}/volint.xg
  
  volint.ss.c: volint.xg
! 	${RXGEN} -x -S -o $@ ${srcdir}/volint.xg
  
  volint.xdr.c: volint.xg
! 	${RXGEN} -x -c -o $@ ${srcdir}/volint.xg
  
  volint.h: volint.xg
! 	${RXGEN} -x -h -o $@ ${srcdir}/volint.xg
  
  volint.cs.c: volint.h
  volint.ss.c: volint.h
--- 83,98 ----
  	${COMPILE_ET} -p ${srcdir} volerr -h volser
  
  volint.cs.c: volint.xg
! 	${RXGEN} -A -x -C -o $@ ${srcdir}/volint.xg
  
  volint.ss.c: volint.xg
! 	${RXGEN} -A -x -S -o $@ ${srcdir}/volint.xg
  
  volint.xdr.c: volint.xg
! 	${RXGEN} -A -x -c -o $@ ${srcdir}/volint.xg
  
  volint.h: volint.xg
! 	${RXGEN} -A -x -h -o $@ ${srcdir}/volint.xg
  
  volint.cs.c: volint.h
  volint.ss.c: volint.h
Index: openafs/src/volser/dumpstuff.c
diff -c openafs/src/volser/dumpstuff.c:1.29.2.7 openafs/src/volser/dumpstuff.c:1.29.2.8
*** openafs/src/volser/dumpstuff.c:1.29.2.7	Thu Jan  4 22:40:35 2007
--- openafs/src/volser/dumpstuff.c	Tue Oct 30 11:16:59 2007
***************
*** 11,22 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/dumpstuff.c,v 1.29.2.7 2007/01/05 03:40:35 shadow Exp $");
  
  #include <sys/types.h>
  #include <ctype.h>
  #include <stdio.h>
  #include <errno.h>
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
  #else
--- 11,23 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/dumpstuff.c,v 1.29.2.8 2007/10/30 15:16:59 shadow Exp $");
  
  #include <sys/types.h>
  #include <ctype.h>
  #include <stdio.h>
  #include <errno.h>
+ #include <string.h>
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
  #else
***************
*** 26,38 ****
  #include <netinet/in.h>
  #include <unistd.h>
  #endif
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <sys/stat.h>
  #ifdef AFS_PTHREAD_ENV
  #include <assert.h>
--- 27,32 ----
Index: openafs/src/volser/lockprocs.c
diff -c openafs/src/volser/lockprocs.c:1.8 openafs/src/volser/lockprocs.c:1.8.14.1
*** openafs/src/volser/lockprocs.c:1.8	Tue Jul 15 19:17:48 2003
--- openafs/src/volser/lockprocs.c	Tue Oct 30 11:16:59 2007
***************
*** 18,24 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/lockprocs.c,v 1.8 2003/07/15 23:17:48 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 18,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/lockprocs.c,v 1.8.14.1 2007/10/30 15:16:59 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 26,38 ****
  #else
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <afs/voldefs.h>
  #include <rx/xdr.h>
  #include <rx/rx.h>
--- 26,32 ----
Index: openafs/src/volser/physio.c
diff -c openafs/src/volser/physio.c:1.11 openafs/src/volser/physio.c:1.11.14.1
*** openafs/src/volser/physio.c:1.11	Tue Dec  9 18:07:57 2003
--- openafs/src/volser/physio.c	Tue Oct 30 11:16:59 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/physio.c,v 1.11 2003/12/09 23:07:57 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/physio.c,v 1.11.14.1 2007/10/30 15:16:59 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 21,33 ****
  #include <netinet/in.h>
  #include <unistd.h>
  #endif
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #ifdef	AFS_SUN5_ENV
  #include <sys/fcntl.h>
  #endif
--- 21,27 ----
Index: openafs/src/volser/restorevol.c
diff -c openafs/src/volser/restorevol.c:1.14 openafs/src/volser/restorevol.c:1.14.4.2
*** openafs/src/volser/restorevol.c:1.14	Sat Oct 15 11:36:57 2005
--- openafs/src/volser/restorevol.c	Wed Oct 31 00:09:46 2007
***************
*** 43,49 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/restorevol.c,v 1.14 2005/10/15 15:36:57 shadow Exp $");
  
  #include <afs/afsint.h>
  #include <afs/nfs.h>
--- 43,49 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/restorevol.c,v 1.14.4.2 2007/10/31 04:09:46 shadow Exp $");
  
  #include <afs/afsint.h>
  #include <afs/nfs.h>
***************
*** 64,77 ****
  #include <sys/stat.h>
  #include <fcntl.h>
  #include <dirent.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  
  char rootdir[MAXPATHLEN];
--- 64,70 ----
***************
*** 799,807 ****
      return ((afs_int32) tag);
  }
  
! WorkerBee(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      int code = 0, c, len;
      afs_int32 type, count, vcount;
--- 792,799 ----
      return ((afs_int32) tag);
  }
  
! static int
! WorkerBee(struct cmd_syndesc *as, void *arock)
  {
      int code = 0, c, len;
      afs_int32 type, count, vcount;
Index: openafs/src/volser/vol-dump.c
diff -c openafs/src/volser/vol-dump.c:1.2 openafs/src/volser/vol-dump.c:1.2.4.1
*** openafs/src/volser/vol-dump.c:1.2	Sat Oct 15 11:36:57 2005
--- openafs/src/volser/vol-dump.c	Wed Oct 31 00:09:46 2007
***************
*** 18,24 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/vol-dump.c,v 1.2 2005/10/15 15:36:57 shadow Exp $");
  
  #include <ctype.h>
  #include <errno.h>
--- 18,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/vol-dump.c,v 1.2.4.1 2007/10/31 04:09:46 shadow Exp $");
  
  #include <ctype.h>
  #include <errno.h>
***************
*** 166,172 ****
  
  
  static int
! handleit(struct cmd_syndesc *as, char *arock)
  {
      register struct cmd_item *ti;
      int err = 0;
--- 166,172 ----
  
  
  static int
! handleit(struct cmd_syndesc *as, void *arock)
  {
      register struct cmd_item *ti;
      int err = 0;
***************
*** 291,297 ****
  
      VInitVolumePackage(volumeUtility, 5, 5, DONT_CONNECT_FS, 0);
  
!     ts = cmd_CreateSyntax(NULL, handleit, 0,
  			  "Dump a volume to a 'vos dump' format file without using volserver");
      cmd_AddParm(ts, "-part", CMD_LIST, CMD_OPTIONAL, "AFS partition name");
      cmd_AddParm(ts, "-volumeid", CMD_LIST, CMD_OPTIONAL, "Volume id");
--- 291,297 ----
  
      VInitVolumePackage(volumeUtility, 5, 5, DONT_CONNECT_FS, 0);
  
!     ts = cmd_CreateSyntax(NULL, handleit, NULL,
  			  "Dump a volume to a 'vos dump' format file without using volserver");
      cmd_AddParm(ts, "-part", CMD_LIST, CMD_OPTIONAL, "AFS partition name");
      cmd_AddParm(ts, "-volumeid", CMD_LIST, CMD_OPTIONAL, "Volume id");
Index: openafs/src/volser/volmain.c
diff -c openafs/src/volser/volmain.c:1.22.2.6 openafs/src/volser/volmain.c:1.22.2.7
*** openafs/src/volser/volmain.c:1.22.2.6	Wed Jun 27 22:12:24 2007
--- openafs/src/volser/volmain.c	Tue Oct 30 11:16:59 2007
***************
*** 11,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/volmain.c,v 1.22.2.6 2007/06/28 02:12:24 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
  #include <time.h>
  #include <fcntl.h>
--- 11,20 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/volmain.c,v 1.22.2.7 2007/10/30 15:16:59 shadow Exp $");
  
  #include <sys/types.h>
+ #include <string.h>
  #ifdef AFS_NT40_ENV
  #include <time.h>
  #include <fcntl.h>
***************
*** 24,36 ****
  #include <sys/file.h>
  #include <netinet/in.h>
  #endif
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  #include <rx/xdr.h>
  #include <afs/afsint.h>
  #include <stdio.h>
--- 25,30 ----
Index: openafs/src/volser/volprocs.c
diff -c openafs/src/volser/volprocs.c:1.42.2.6 openafs/src/volser/volprocs.c:1.42.2.7
*** openafs/src/volser/volprocs.c:1.42.2.6	Mon Oct 15 10:15:56 2007
--- openafs/src/volser/volprocs.c	Tue Oct 30 11:16:59 2007
***************
*** 11,20 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/volprocs.c,v 1.42.2.6 2007/10/15 14:15:56 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
  #include <errno.h>
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
--- 11,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/volprocs.c,v 1.42.2.7 2007/10/30 15:16:59 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
+ #include <string.h>
  #include <errno.h>
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
***************
*** 25,38 ****
  #include <unistd.h>
  #endif
  
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #include <dirent.h>
  #include <sys/stat.h>
  #include <rx/xdr.h>
--- 26,31 ----
Index: openafs/src/volser/voltrans.c
diff -c openafs/src/volser/voltrans.c:1.11.8.2 openafs/src/volser/voltrans.c:1.11.8.3
*** openafs/src/volser/voltrans.c:1.11.8.2	Thu Mar 22 11:59:52 2007
--- openafs/src/volser/voltrans.c	Tue Oct 30 11:16:59 2007
***************
*** 18,24 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/voltrans.c,v 1.11.8.2 2007/03/22 15:59:52 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <afs/afsutil.h>
--- 18,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/voltrans.c,v 1.11.8.3 2007/10/30 15:16:59 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <afs/afsutil.h>
***************
*** 29,34 ****
--- 29,35 ----
  #include <stdio.h>
  #include <sys/types.h>
  #include <errno.h>
+ #include <string.h>
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
  #include <winsock2.h>
***************
*** 61,74 ****
  #include <afs/vnode.h>
  #include <afs/volume.h>
  
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #include "volser.h"
  
  /*@printflike@*/ extern void Log(const char *format, ...);
--- 62,67 ----
Index: openafs/src/volser/vos.c
diff -c openafs/src/volser/vos.c:1.55.2.6 openafs/src/volser/vos.c:1.55.2.9
*** openafs/src/volser/vos.c:1.55.2.6	Thu Jul 19 14:52:14 2007
--- openafs/src/volser/vos.c	Wed Oct 31 00:09:46 2007
***************
*** 11,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/vos.c,v 1.55.2.6 2007/07/19 18:52:14 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
  #include <io.h>
--- 11,20 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/vos.c,v 1.55.2.9 2007/10/31 04:09:46 shadow Exp $");
  
  #include <sys/types.h>
+ #include <string.h>
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
  #include <io.h>
***************
*** 31,44 ****
  #endif
  #include <errno.h>
  
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #include <lock.h>
  #include <afs/stds.h>
  #include <rx/xdr.h>
--- 32,37 ----
***************
*** 340,360 ****
  	    error = VOLSERBADOP;
  	    goto wfail;
  	}
      }
-     /* test if we have a valid dump */
-     hset64(filesize, 0, 0);
-     USD_SEEK(ufd, filesize, SEEK_END, &currOffset);
-     hset64(filesize, hgethi(currOffset), hgetlo(currOffset)-sizeof(afs_uint32));
-     USD_SEEK(ufd, filesize, SEEK_SET, &currOffset);
-     USD_READ(ufd, &buffer, sizeof(afs_uint32), &got);
-     if ((got != sizeof(afs_uint32)) || (ntohl(buffer) != DUMPENDMAGIC)) {
- 	fprintf(STDERR, "Signature missing from end of file '%s'\n", filename);
-         error = VOLSERBADOP;
-         goto wfail;
-     }
-     hset64(filesize, 0, 0);
-     USD_SEEK(ufd, filesize, SEEK_SET, &currOffset);
-     /* rewind, we are done */
      code = SendFile(ufd, call, blksize);
      if (code) {
  	error = code;
--- 333,353 ----
  	    error = VOLSERBADOP;
  	    goto wfail;
  	}
+ 	/* test if we have a valid dump */
+ 	hset64(filesize, 0, 0);
+ 	USD_SEEK(ufd, filesize, SEEK_END, &currOffset);
+ 	hset64(filesize, hgethi(currOffset), hgetlo(currOffset)-sizeof(afs_uint32));
+ 	USD_SEEK(ufd, filesize, SEEK_SET, &currOffset);
+ 	USD_READ(ufd, &buffer, sizeof(afs_uint32), &got);
+ 	if ((got != sizeof(afs_uint32)) || (ntohl(buffer) != DUMPENDMAGIC)) {
+ 	    fprintf(STDERR, "Signature missing from end of file '%s'\n", filename);
+ 	    error = VOLSERBADOP;
+ 	    goto wfail;
+ 	}
+ 	/* rewind, we are done */
+ 	hset64(filesize, 0, 0);
+ 	USD_SEEK(ufd, filesize, SEEK_SET, &currOffset);
      }
      code = SendFile(ufd, call, blksize);
      if (code) {
  	error = code;
***************
*** 1462,1470 ****
  }
  
  /* command to forcibly remove a volume */
! static
! NukeVolume(as)
!      register struct cmd_syndesc *as;
  {
      register afs_int32 code;
      afs_int32 volID, err;
--- 1455,1462 ----
  }
  
  /* command to forcibly remove a volume */
! static int
! NukeVolume(register struct cmd_syndesc *as)
  {
      register afs_int32 code;
      afs_int32 volID, err;
***************
*** 1528,1536 ****
   *	As advertised.
   *------------------------------------------------------------------------
   */
! static
! ExamineVolume(as)
!      register struct cmd_syndesc *as;
  {
      struct nvldbentry entry;
      afs_int32 vcode = 0;
--- 1520,1527 ----
   *	As advertised.
   *------------------------------------------------------------------------
   */
! static int
! ExamineVolume(register struct cmd_syndesc *as, void *arock)
  {
      struct nvldbentry entry;
      afs_int32 vcode = 0;
***************
*** 1681,1689 ****
   *	As advertised.
   *------------------------------------------------------------------------
   */
! static
! SetFields(as)
!      register struct cmd_syndesc *as;
  {
      struct nvldbentry entry;
      afs_int32 vcode = 0;
--- 1672,1679 ----
   *	As advertised.
   *------------------------------------------------------------------------
   */
! static int
! SetFields(register struct cmd_syndesc *as, void *arock)
  {
      struct nvldbentry entry;
      afs_int32 vcode = 0;
***************
*** 1766,1774 ****
   *	As advertised.
   *------------------------------------------------------------------------
   */
! static
! volOnline(as)
!      register struct cmd_syndesc *as;
  {
      afs_int32 server, partition, volid;
      afs_int32 code, err = 0;
--- 1756,1763 ----
   *	As advertised.
   *------------------------------------------------------------------------
   */
! static int
! volOnline(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 server, partition, volid;
      afs_int32 code, err = 0;
***************
*** 1827,1833 ****
   *------------------------------------------------------------------------
   */
  static int
! volOffline(register struct cmd_syndesc *as)
  {
      afs_int32 server, partition, volid;
      afs_int32 code, err = 0;
--- 1816,1822 ----
   *------------------------------------------------------------------------
   */
  static int
! volOffline(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 server, partition, volid;
      afs_int32 code, err = 0;
***************
*** 1877,1883 ****
  }
  
  static int
! CreateVolume(register struct cmd_syndesc *as)
  {
      afs_int32 pnum;
      char part[10];
--- 1866,1872 ----
  }
  
  static int
! CreateVolume(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 pnum;
      char part[10];
***************
*** 1985,1993 ****
      return error;
  }
  
! static
! DeleteVolume(as)
!      struct cmd_syndesc *as;
  {
      afs_int32 err, code = 0;
      afs_int32 server = 0, partition = -1, volid;
--- 1974,1981 ----
      return error;
  }
  
! static int
! DeleteVolume(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 err, code = 0;
      afs_int32 server = 0, partition = -1, volid;
***************
*** 2107,2114 ****
  
  #define TESTM	0		/* set for move space tests, clear for production */
  static
! MoveVolume(as)
!      register struct cmd_syndesc *as;
  {
  
      afs_int32 volid, fromserver, toserver, frompart, topart;
--- 2095,2101 ----
  
  #define TESTM	0		/* set for move space tests, clear for production */
  static
! MoveVolume(register struct cmd_syndesc *as, void *arock)
  {
  
      afs_int32 volid, fromserver, toserver, frompart, topart;
***************
*** 2234,2242 ****
      return 0;
  }
  
! static
! CopyVolume(as)
!      register struct cmd_syndesc *as;
  {
      afs_int32 volid, fromserver, toserver, frompart, topart, code, err, flags;
      char fromPartName[10], toPartName[10], *tovolume;
--- 2221,2228 ----
      return 0;
  }
  
! static int
! CopyVolume(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 volid, fromserver, toserver, frompart, topart, code, err, flags;
      char fromPartName[10], toPartName[10], *tovolume;
***************
*** 2381,2389 ****
  }
  
  
! static
! ShadowVolume(as)
!      register struct cmd_syndesc *as;
  {
      afs_int32 volid, fromserver, toserver, frompart, topart, tovolid;
      afs_int32 code, err, flags;
--- 2367,2374 ----
  }
  
  
! static int
! ShadowVolume(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 volid, fromserver, toserver, frompart, topart, tovolid;
      afs_int32 code, err, flags;
***************
*** 2578,2586 ****
  }
  
  
! static
! CloneVolume(as)
!      register struct cmd_syndesc *as;
  {
      afs_int32 server, part, volid, cloneid, voltype;
      char partName[10], *volname;
--- 2563,2570 ----
  }
  
  
! static int
! CloneVolume(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 server, part, volid, cloneid, voltype;
      char partName[10], *volname;
***************
*** 2686,2694 ****
  }
  
  
! static
! BackupVolume(as)
!      register struct cmd_syndesc *as;
  {
      afs_int32 avolid, aserver, apart, vtype, code, err;
      struct nvldbentry entry;
--- 2670,2677 ----
  }
  
  
! static int
! BackupVolume(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 avolid, aserver, apart, vtype, code, err;
      struct nvldbentry entry;
***************
*** 2755,2763 ****
      return 0;
  }
  
! static
! ReleaseVolume(as)
!      register struct cmd_syndesc *as;
  {
  
      struct nvldbentry entry;
--- 2738,2745 ----
      return 0;
  }
  
! static int
! ReleaseVolume(register struct cmd_syndesc *as, void *arock)
  {
  
      struct nvldbentry entry;
***************
*** 2802,2810 ****
  }
  
  static
! DumpVolume(as)
!      register struct cmd_syndesc *as;
! 
  {
      afs_int32 avolid, aserver, apart, voltype, fromdate = 0, code, err, i, flags;
      char filename[MAXPATHLEN];
--- 2784,2790 ----
  }
  
  static
! DumpVolume(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 avolid, aserver, apart, voltype, fromdate = 0, code, err, i, flags;
      char filename[MAXPATHLEN];
***************
*** 2903,2912 ****
  #define TS_KEEP	2
  #define TS_NEW	3
  
! static
! RestoreVolume(as)
!      register struct cmd_syndesc *as;
! 
  {
      afs_int32 avolid, aparentid, aserver, apart, code, vcode, err;
      afs_int32 aoverwrite = ASK;
--- 2883,2890 ----
  #define TS_KEEP	2
  #define TS_NEW	3
  
! static int
! RestoreVolume(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 avolid, aparentid, aserver, apart, code, vcode, err;
      afs_int32 aoverwrite = ASK;
***************
*** 3195,3204 ****
      return 0;
  }
  
! static
! LockReleaseCmd(as)
!      register struct cmd_syndesc *as;
! 
  {
      afs_int32 avolid, code, err;
  
--- 3173,3180 ----
      return 0;
  }
  
! static int
! LockReleaseCmd(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 avolid, code, err;
  
***************
*** 3222,3230 ****
      return 0;
  }
  
! static
! AddSite(as)
!      register struct cmd_syndesc *as;
  {
      afs_int32 avolid, aserver, apart, code, err;
      char apartName[10], avolname[VOLSER_MAXVOLNAME + 1];
--- 3198,3205 ----
      return 0;
  }
  
! static int
! AddSite(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 avolid, aserver, apart, code, err;
      char apartName[10], avolname[VOLSER_MAXVOLNAME + 1];
***************
*** 3271,3279 ****
      return 0;
  }
  
! static
! RemoveSite(as)
!      register struct cmd_syndesc *as;
  {
  
      afs_int32 avolid, aserver, apart, code, err;
--- 3246,3253 ----
      return 0;
  }
  
! static int
! RemoveSite(register struct cmd_syndesc *as, void *arock)
  {
  
      afs_int32 avolid, aserver, apart, code, err;
***************
*** 3323,3331 ****
      return 0;
  }
  
! static
! ChangeLocation(as)
!      register struct cmd_syndesc *as;
  {
      afs_int32 avolid, aserver, apart, code, err;
      char apartName[10];
--- 3297,3304 ----
      return 0;
  }
  
! static int
! ChangeLocation(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 avolid, aserver, apart, code, err;
      char apartName[10];
***************
*** 3371,3379 ****
      return 0;
  }
  
! static
! ListPartitions(as)
!      register struct cmd_syndesc *as;
  {
      afs_int32 aserver, code;
      struct partList dummyPartList;
--- 3344,3351 ----
      return 0;
  }
  
! static int
! ListPartitions(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 aserver, code;
      struct partList dummyPartList;
***************
*** 3537,3544 ****
   *------------------------------------------------------------------------*/
  
  static
! ListVolumes(as)
!      register struct cmd_syndesc *as;
  {
      afs_int32 apart, int32list, fast;
      afs_int32 aserver, code;
--- 3509,3515 ----
   *------------------------------------------------------------------------*/
  
  static
! ListVolumes(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 apart, int32list, fast;
      afs_int32 aserver, code;
***************
*** 3693,3701 ****
      return 0;
  }
  
! static
! SyncVldb(as)
!      register struct cmd_syndesc *as;
  {
      afs_int32 pnum = 0, code;	/* part name */
      char part[10];
--- 3664,3671 ----
      return 0;
  }
  
! static int
! SyncVldb(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 pnum = 0, code;	/* part name */
      char part[10];
***************
*** 3772,3781 ****
      return 0;
  }
  
! static
! SyncServer(as)
!      register struct cmd_syndesc *as;
! 
  {
      afs_int32 pnum, code;	/* part name */
      char part[10];
--- 3742,3749 ----
      return 0;
  }
  
! static int
! SyncServer(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 pnum, code;	/* part name */
      char part[10];
***************
*** 3853,3862 ****
      return 0;
  }
  
! static
! VolumeZap(as)
!      register struct cmd_syndesc *as;
! 
  {
      struct nvldbentry entry;
      afs_int32 volid, code, server, part, zapbackupid = 0, backupid = 0, err;
--- 3821,3828 ----
      return 0;
  }
  
! static int
! VolumeZap(register struct cmd_syndesc *as, void *arock)
  {
      struct nvldbentry entry;
      afs_int32 volid, code, server, part, zapbackupid = 0, backupid = 0, err;
***************
*** 3940,3949 ****
      return 0;
  }
  
! static
! VolserStatus(as)
!      register struct cmd_syndesc *as;
! 
  {
      afs_int32 server, code;
      transDebugInfo *pntr, *oldpntr;
--- 3906,3913 ----
      return 0;
  }
  
! static int
! VolserStatus(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 server, code;
      transDebugInfo *pntr, *oldpntr;
***************
*** 4033,4041 ****
      return 0;
  }
  
! static
! RenameVolume(as)
!      register struct cmd_syndesc *as;
  {
      afs_int32 code1, code2, code;
      struct nvldbentry entry;
--- 3997,4004 ----
      return 0;
  }
  
! static int
! RenameVolume(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 code1, code2, code;
      struct nvldbentry entry;
***************
*** 4154,4163 ****
      return -1;
  }
  
! static
! DeleteEntry(as)
!      register struct cmd_syndesc *as;
! 
  {
      afs_int32 apart;
      afs_int32 avolid;
--- 4117,4124 ----
      return -1;
  }
  
! static int
! DeleteEntry(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 apart;
      afs_int32 avolid;
***************
*** 4379,4387 ****
  }
  
  */
! static
! ListVLDB(as)
!      struct cmd_syndesc *as;
  {
      afs_int32 apart;
      afs_int32 aserver, code;
--- 4340,4347 ----
  }
  
  */
! static int
! ListVLDB(struct cmd_syndesc *as, void *arock)
  {
      afs_int32 apart;
      afs_int32 aserver, code;
***************
*** 4550,4558 ****
      return 0;
  }
  
! static
! BackSys(as)
!      register struct cmd_syndesc *as;
  {
      afs_int32 apart = 0, avolid;
      afs_int32 aserver = 0, code, aserver1, apart1;
--- 4510,4517 ----
      return 0;
  }
  
! static int
! BackSys(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 apart = 0, avolid;
      afs_int32 aserver = 0, code, aserver1, apart1;
***************
*** 4880,4888 ****
      return 0;
  }
  
! static
! UnlockVLDB(as)
!      register struct cmd_syndesc *as;
  {
      afs_int32 apart;
      afs_int32 aserver, code;
--- 4839,4846 ----
      return 0;
  }
  
! static int
! UnlockVLDB(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 apart;
      afs_int32 aserver, code;
***************
*** 5010,5018 ****
      return output;
  }
  
! static
! PartitionInfo(as)
!      register struct cmd_syndesc *as;
  {
      afs_int32 apart;
      afs_int32 aserver, code;
--- 4968,4975 ----
      return output;
  }
  
! static int
! PartitionInfo(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 apart;
      afs_int32 aserver, code;
***************
*** 5095,5104 ****
      return 0;
  }
  
! static
! ChangeAddr(as)
!      register struct cmd_syndesc *as;
! 
  {
      afs_int32 ip1, ip2, vcode;
      int remove = 0;
--- 5052,5059 ----
      return 0;
  }
  
! static int
! ChangeAddr(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 ip1, ip2, vcode;
      int remove = 0;
***************
*** 5245,5253 ****
      return;
  }
  
! static
! ListAddrs(as)
!      register struct cmd_syndesc *as;
  {
      afs_int32 vcode;
      afs_int32 i, noresolve = 0, printuuid = 0;
--- 5200,5207 ----
      return;
  }
  
! static int
! ListAddrs(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 vcode;
      afs_int32 i, noresolve = 0, printuuid = 0;
***************
*** 5353,5362 ****
      return 0;
  }
  
! static
! LockEntry(as)
!      register struct cmd_syndesc *as;
! 
  {
      afs_int32 avolid, vcode, err;
  
--- 5307,5314 ----
      return 0;
  }
  
! static int
! LockEntry(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 avolid, vcode, err;
  
***************
*** 5381,5390 ****
      return 0;
  }
  
! static
! ConvertRO(as)
!      register struct cmd_syndesc *as;
! 
  {
      afs_int32 partition = -1;
      afs_int32 server, volid, code, i, same;
--- 5333,5340 ----
      return 0;
  }
  
! static int
! ConvertRO(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 partition = -1;
      afs_int32 server, volid, code, i, same;
***************
*** 5547,5555 ****
      return code;
  }
  
! static
! Sizes(as)
!      register struct cmd_syndesc *as;
  {
      afs_int32 avolid, aserver, apart, voltype, fromdate = 0, code, err, i;
      struct nvldbentry entry;
--- 5497,5504 ----
      return code;
  }
  
! static int
! Sizes(register struct cmd_syndesc *as, void *arock)
  {
      afs_int32 avolid, aserver, apart, voltype, fromdate = 0, code, err, i;
      struct nvldbentry entry;
***************
*** 5648,5657 ****
  }
  
  
! static
! MyBeforeProc(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      register char *tcell;
      register afs_int32 code;
--- 5597,5604 ----
  }
  
  
! static int
! MyBeforeProc(struct cmd_syndesc *as, void *arock)
  {
      register char *tcell;
      register afs_int32 code;
***************
*** 5721,5727 ****
  
      cmd_SetBeforeProc(MyBeforeProc, NULL);
  
!     ts = cmd_CreateSyntax("create", CreateVolume, 0, "create a new volume");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "volume name");
--- 5668,5674 ----
  
      cmd_SetBeforeProc(MyBeforeProc, NULL);
  
!     ts = cmd_CreateSyntax("create", CreateVolume, NULL, "create a new volume");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "volume name");
***************
*** 5732,5745 ****
  #endif
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("remove", DeleteVolume, 0, "delete a volume");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
  
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("move", MoveVolume, 0, "move a volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      cmd_AddParm(ts, "-fromserver", CMD_SINGLE, 0, "machine name on source");
      cmd_AddParm(ts, "-frompartition", CMD_SINGLE, 0,
--- 5679,5692 ----
  #endif
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("remove", DeleteVolume, NULL, "delete a volume");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
  
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("move", MoveVolume, NULL, "move a volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      cmd_AddParm(ts, "-fromserver", CMD_SINGLE, 0, "machine name on source");
      cmd_AddParm(ts, "-frompartition", CMD_SINGLE, 0,
***************
*** 5752,5758 ****
  		"copy live volume without cloning");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("copy", CopyVolume, 0, "copy a volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID on source");
      cmd_AddParm(ts, "-fromserver", CMD_SINGLE, 0, "machine name on source");
      cmd_AddParm(ts, "-frompartition", CMD_SINGLE, 0,
--- 5699,5705 ----
  		"copy live volume without cloning");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("copy", CopyVolume, NULL, "copy a volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID on source");
      cmd_AddParm(ts, "-fromserver", CMD_SINGLE, 0, "machine name on source");
      cmd_AddParm(ts, "-frompartition", CMD_SINGLE, 0,
***************
*** 5770,5776 ****
  		"copy live volume without cloning");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("shadow", ShadowVolume, 0,
  			  "make or update a shadow volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID on source");
      cmd_AddParm(ts, "-fromserver", CMD_SINGLE, 0, "machine name on source");
--- 5717,5723 ----
  		"copy live volume without cloning");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("shadow", ShadowVolume, NULL,
  			  "make or update a shadow volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID on source");
      cmd_AddParm(ts, "-fromserver", CMD_SINGLE, 0, "machine name on source");
***************
*** 5794,5805 ****
  		"do incremental update if target exists");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("backup", BackupVolume, 0,
  			  "make backup of a volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("clone", CloneVolume, 0,
  			  "make clone of a volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "server");
--- 5741,5752 ----
  		"do incremental update if target exists");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("backup", BackupVolume, NULL,
  			  "make backup of a volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("clone", CloneVolume, NULL,
  			  "make clone of a volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "server");
***************
*** 5814,5826 ****
  		"make clone volume read-only, not readwrite");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("release", ReleaseVolume, 0, "release a volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      cmd_AddParm(ts, "-force", CMD_FLAG, CMD_OPTIONAL,
  		"force a complete release");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("dump", DumpVolume, 0, "dump a volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      cmd_AddParm(ts, "-time", CMD_SINGLE, CMD_OPTIONAL, "dump from time");
      cmd_AddParm(ts, "-file", CMD_SINGLE, CMD_OPTIONAL, "dump file");
--- 5761,5773 ----
  		"make clone volume read-only, not readwrite");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("release", ReleaseVolume, NULL, "release a volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      cmd_AddParm(ts, "-force", CMD_FLAG, CMD_OPTIONAL,
  		"force a complete release");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("dump", DumpVolume, NULL, "dump a volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      cmd_AddParm(ts, "-time", CMD_SINGLE, CMD_OPTIONAL, "dump from time");
      cmd_AddParm(ts, "-file", CMD_SINGLE, CMD_OPTIONAL, "dump file");
***************
*** 5832,5838 ****
  		"omit unchanged directories from an incremental dump");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("restore", RestoreVolume, 0, "restore a volume");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of volume to be restored");
--- 5779,5785 ----
  		"omit unchanged directories from an incremental dump");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("restore", RestoreVolume, NULL, "restore a volume");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
      cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of volume to be restored");
***************
*** 5850,5861 ****
  		"dump | keep | new");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("unlock", LockReleaseCmd, 0,
  			  "release lock on VLDB entry for a volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("changeloc", ChangeLocation, 0,
  			  "change an RW volume's location in the VLDB");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0,
  		"machine name for new location");
--- 5797,5808 ----
  		"dump | keep | new");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("unlock", LockReleaseCmd, NULL,
  			  "release lock on VLDB entry for a volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("changeloc", ChangeLocation, NULL,
  			  "change an RW volume's location in the VLDB");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0,
  		"machine name for new location");
***************
*** 5864,5888 ****
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("addsite", AddSite, 0, "add a replication site");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name for new site");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, 0,
  		"partition name for new site");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("remsite", RemoveSite, 0,
  			  "remove a replication site");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("listpart", ListPartitions, 0, "list partitions");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("listvol", ListVolumes, 0,
  			  "list volumes on server (bypass VLDB)");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
--- 5811,5835 ----
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("addsite", AddSite, NULL, "add a replication site");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name for new site");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, 0,
  		"partition name for new site");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("remsite", RemoveSite, NULL,
  			  "remove a replication site");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("listpart", ListPartitions, NULL, "list partitions");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("listvol", ListVolumes, NULL,
  			  "list volumes on server (bypass VLDB)");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
***************
*** 5899,5918 ****
  #endif /* FULL_LISTVOL_SWITCH */
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("syncvldb", SyncVldb, 0,
  			  "synchronize VLDB with server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_OPTIONAL, "volume name or ID");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("syncserv", SyncServer, 0,
  			  "synchronize server with VLDB");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("examine", ExamineVolume, 0,
  			  "everything about the volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      cmd_AddParm(ts, "-extended", CMD_FLAG, CMD_OPTIONAL,
--- 5846,5865 ----
  #endif /* FULL_LISTVOL_SWITCH */
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("syncvldb", SyncVldb, NULL,
  			  "synchronize VLDB with server");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_OPTIONAL, "volume name or ID");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("syncserv", SyncServer, NULL,
  			  "synchronize server with VLDB");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("examine", ExamineVolume, NULL,
  			  "everything about the volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      cmd_AddParm(ts, "-extended", CMD_FLAG, CMD_OPTIONAL,
***************
*** 5924,5930 ****
      COMMONPARMS;
      cmd_CreateAlias(ts, "volinfo");
  
!     ts = cmd_CreateSyntax("setfields", SetFields, 0,
  			  "change volume info fields");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      cmd_AddParm(ts, "-maxquota", CMD_SINGLE, CMD_OPTIONAL, "quota (KB)");
--- 5871,5877 ----
      COMMONPARMS;
      cmd_CreateAlias(ts, "volinfo");
  
!     ts = cmd_CreateSyntax("setfields", SetFields, NULL,
  			  "change volume info fields");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      cmd_AddParm(ts, "-maxquota", CMD_SINGLE, CMD_OPTIONAL, "quota (KB)");
***************
*** 5932,5938 ****
      cmd_AddParm(ts, "-clearVolUpCounter", CMD_FLAG, CMD_OPTIONAL, "clear volUpdateCounter");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("offline", volOffline, 0, (char *)CMD_HIDDEN);
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "server name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
--- 5879,5885 ----
      cmd_AddParm(ts, "-clearVolUpCounter", CMD_FLAG, CMD_OPTIONAL, "clear volUpdateCounter");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("offline", volOffline, NULL, (char *)CMD_HIDDEN);
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "server name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
***************
*** 5940,5952 ****
      cmd_AddParm(ts, "-busy", CMD_FLAG, CMD_OPTIONAL, "busy volume");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("online", volOnline, 0, (char *)CMD_HIDDEN);
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "server name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("zap", VolumeZap, 0,
  			  "delete the volume, don't bother with VLDB");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
--- 5887,5899 ----
      cmd_AddParm(ts, "-busy", CMD_FLAG, CMD_OPTIONAL, "busy volume");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("online", volOnline, NULL, (char *)CMD_HIDDEN);
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "server name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("zap", VolumeZap, NULL,
  			  "delete the volume, don't bother with VLDB");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
***************
*** 5957,5973 ****
  		"also delete backup volume if one is found");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("status", VolserStatus, 0,
  			  "report on volser status");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("rename", RenameVolume, 0, "rename a volume");
      cmd_AddParm(ts, "-oldname", CMD_SINGLE, 0, "old volume name ");
      cmd_AddParm(ts, "-newname", CMD_SINGLE, 0, "new volume name ");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("listvldb", ListVLDB, 0,
  			  "list volumes in the VLDB");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_OPTIONAL, "volume name or ID");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "machine name");
--- 5904,5920 ----
  		"also delete backup volume if one is found");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("status", VolserStatus, NULL,
  			  "report on volser status");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("rename", RenameVolume, NULL, "rename a volume");
      cmd_AddParm(ts, "-oldname", CMD_SINGLE, 0, "old volume name ");
      cmd_AddParm(ts, "-newname", CMD_SINGLE, 0, "new volume name ");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("listvldb", ListVLDB, NULL,
  			  "list volumes in the VLDB");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_OPTIONAL, "volume name or ID");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "machine name");
***************
*** 5979,5985 ****
  		"do not alphabetically sort the volume names");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("backupsys", BackSys, 0, "en masse backups");
      cmd_AddParm(ts, "-prefix", CMD_LIST, CMD_OPTIONAL,
  		"common prefix on volume(s)");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "machine name");
--- 5926,5932 ----
  		"do not alphabetically sort the volume names");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("backupsys", BackSys, NULL, "en masse backups");
      cmd_AddParm(ts, "-prefix", CMD_LIST, CMD_OPTIONAL,
  		"common prefix on volume(s)");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "machine name");
***************
*** 5991,5997 ****
      cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL, "no action");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("delentry", DeleteEntry, 0,
  			  "delete VLDB entry for a volume");
      cmd_AddParm(ts, "-id", CMD_LIST, CMD_OPTIONAL, "volume name or ID");
      cmd_AddParm(ts, "-prefix", CMD_SINGLE, CMD_OPTIONAL,
--- 5938,5944 ----
      cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL, "no action");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("delentry", DeleteEntry, NULL,
  			  "delete VLDB entry for a volume");
      cmd_AddParm(ts, "-id", CMD_LIST, CMD_OPTIONAL, "volume name or ID");
      cmd_AddParm(ts, "-prefix", CMD_SINGLE, CMD_OPTIONAL,
***************
*** 6002,6008 ****
  		"no execute");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("partinfo", PartitionInfo, 0,
  			  "list partition information");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
--- 5949,5955 ----
  		"no execute");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("partinfo", PartitionInfo, NULL,
  			  "list partition information");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
***************
*** 6010,6027 ****
  		"print storage summary");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("unlockvldb", UnlockVLDB, 0,
  			  "unlock all the locked entries in the VLDB");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("lock", LockEntry, 0,
  			  "lock VLDB entry for a volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("changeaddr", ChangeAddr, 0,
  			  "change the IP address of a file server");
      cmd_AddParm(ts, "-oldaddr", CMD_SINGLE, 0, "original IP address");
      cmd_AddParm(ts, "-newaddr", CMD_SINGLE, CMD_OPTIONAL, "new IP address");
--- 5957,5974 ----
  		"print storage summary");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("unlockvldb", UnlockVLDB, NULL,
  			  "unlock all the locked entries in the VLDB");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("lock", LockEntry, NULL,
  			  "lock VLDB entry for a volume");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("changeaddr", ChangeAddr, NULL,
  			  "change the IP address of a file server");
      cmd_AddParm(ts, "-oldaddr", CMD_SINGLE, 0, "original IP address");
      cmd_AddParm(ts, "-newaddr", CMD_SINGLE, CMD_OPTIONAL, "new IP address");
***************
*** 6029,6035 ****
  		"remove the IP address from the VLDB");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("listaddrs", ListAddrs, 0,
  			  "list the IP address of all file servers registered in the VLDB");
      cmd_AddParm(ts, "-uuid", CMD_SINGLE, CMD_OPTIONAL, "uuid of server");
      cmd_AddParm(ts, "-host", CMD_SINGLE, CMD_OPTIONAL, "address of host");
--- 5976,5982 ----
  		"remove the IP address from the VLDB");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("listaddrs", ListAddrs, NULL,
  			  "list the IP address of all file servers registered in the VLDB");
      cmd_AddParm(ts, "-uuid", CMD_SINGLE, CMD_OPTIONAL, "uuid of server");
      cmd_AddParm(ts, "-host", CMD_SINGLE, CMD_OPTIONAL, "address of host");
***************
*** 6039,6045 ****
  		"print uuid of hosts");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("convertROtoRW", ConvertRO, 0,
  			  "convert a RO volume into a RW volume (after loss of old RW volume)");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
--- 5986,5992 ----
  		"print uuid of hosts");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("convertROtoRW", ConvertRO, NULL,
  			  "convert a RO volume into a RW volume (after loss of old RW volume)");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
***************
*** 6047,6053 ****
      cmd_AddParm(ts, "-force", CMD_FLAG, CMD_OPTIONAL, "don't ask");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("size", Sizes, 0,
  			  "obtain various sizes of the volume.");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
--- 5994,6000 ----
      cmd_AddParm(ts, "-force", CMD_FLAG, CMD_OPTIONAL, "don't ask");
      COMMONPARMS;
  
!     ts = cmd_CreateSyntax("size", Sizes, NULL,
  			  "obtain various sizes of the volume.");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
Index: openafs/src/volser/vsprocs.c
diff -c openafs/src/volser/vsprocs.c:1.38.2.6 openafs/src/volser/vsprocs.c:1.38.2.7
*** openafs/src/volser/vsprocs.c:1.38.2.6	Thu Jul 19 14:52:14 2007
--- openafs/src/volser/vsprocs.c	Tue Oct 30 11:16:59 2007
***************
*** 11,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/vsprocs.c,v 1.38.2.6 2007/07/19 18:52:14 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
  #include <sys/stat.h>
  #ifdef	AFS_AIX_ENV
  #include <sys/statfs.h>
  #endif
--- 11,22 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/vsprocs.c,v 1.38.2.7 2007/10/30 15:16:59 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
  #include <sys/stat.h>
+ #include <string.h>
  #ifdef	AFS_AIX_ENV
  #include <sys/statfs.h>
  #endif
***************
*** 27,40 ****
  #include <netinet/in.h>
  #endif
  
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #include <lock.h>
  #include <afs/voldefs.h>
  #include <rx/xdr.h>
--- 28,33 ----
Index: openafs/src/volser/vsutils.c
diff -c openafs/src/volser/vsutils.c:1.18.8.2 openafs/src/volser/vsutils.c:1.18.8.3
*** openafs/src/volser/vsutils.c:1.18.8.2	Thu Feb  8 20:00:23 2007
--- openafs/src/volser/vsutils.c	Tue Oct 30 11:16:59 2007
***************
*** 11,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/vsutils.c,v 1.18.8.2 2007/02/09 01:00:23 shadow Exp $");
  
  #include <afs/stds.h>
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
  #include <winsock2.h>
--- 11,20 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/vsutils.c,v 1.18.8.3 2007/10/30 15:16:59 shadow Exp $");
  
  #include <afs/stds.h>
+ #include <string.h>
  #ifdef AFS_NT40_ENV
  #include <fcntl.h>
  #include <winsock2.h>
***************
*** 28,41 ****
  #include <sys/statfs.h>
  #endif
  
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- 
  #include <errno.h>
  #include <lock.h>
  #include <rx/xdr.h>
--- 29,34 ----
Index: openafs/src/xstat/xstat_cm.c
diff -c openafs/src/xstat/xstat_cm.c:1.10.2.1 openafs/src/xstat/xstat_cm.c:1.10.2.2
*** openafs/src/xstat/xstat_cm.c:1.10.2.1	Mon Jun 26 12:20:50 2006
--- openafs/src/xstat/xstat_cm.c	Tue Oct 30 11:16:59 2007
***************
*** 18,37 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_cm.c,v 1.10.2.1 2006/06/26 16:20:50 rra Exp $");
  
  #include "xstat_cm.h"		/*Interface for this module */
  #include <lwp.h>		/*Lightweight process package */
  
  #include <afs/afsutil.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #define LWP_STACK_SIZE	(16 * 1024)
  
--- 18,30 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_cm.c,v 1.10.2.2 2007/10/30 15:16:59 shadow Exp $");
  
  #include "xstat_cm.h"		/*Interface for this module */
  #include <lwp.h>		/*Lightweight process package */
  
  #include <afs/afsutil.h>
  #include <string.h>
  
  #define LWP_STACK_SIZE	(16 * 1024)
  
Index: openafs/src/xstat/xstat_cm_test.c
diff -c openafs/src/xstat/xstat_cm_test.c:1.11 openafs/src/xstat/xstat_cm_test.c:1.11.2.2
*** openafs/src/xstat/xstat_cm_test.c:1.11	Tue Apr  4 16:51:24 2006
--- openafs/src/xstat/xstat_cm_test.c	Wed Oct 31 00:09:48 2007
***************
*** 17,34 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_cm_test.c,v 1.11 2006/04/04 20:51:24 shadow Exp $");
  
  #include "xstat_cm.h"		/*Interface for xstat_cm module */
  #include <cmd.h>		/*Command line interpreter */
  #include <time.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  /*
   * External routines that don't have explicit include file definitions.
--- 17,28 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_cm_test.c,v 1.11.2.2 2007/10/31 04:09:48 shadow Exp $");
  
  #include "xstat_cm.h"		/*Interface for xstat_cm module */
  #include <cmd.h>		/*Command line interpreter */
  #include <time.h>
  #include <string.h>
  
  /*
   * External routines that don't have explicit include file definitions.
***************
*** 1238,1246 ****
   *------------------------------------------------------------------------*/
  
  int
! RunTheTest(a_s)
!      struct cmd_syndesc *a_s;
! 
  {				/*RunTheTest */
  
      static char rn[] = "RunTheTest";	/*Routine name */
--- 1232,1238 ----
   *------------------------------------------------------------------------*/
  
  int
! RunTheTest(struct cmd_syndesc *a_s, void *arock)
  {				/*RunTheTest */
  
      static char rn[] = "RunTheTest";	/*Routine name */
***************
*** 1448,1454 ****
      /*
       * Set up the commands we understand.
       */
!     ts = cmd_CreateSyntax("initcmd", RunTheTest, 0, "initialize the program");
      cmd_AddParm(ts, "-cmname", CMD_LIST, CMD_REQUIRED,
  		"Cache Manager name(s) to monitor");
      cmd_AddParm(ts, "-collID", CMD_LIST, CMD_REQUIRED,
--- 1440,1446 ----
      /*
       * Set up the commands we understand.
       */
!     ts = cmd_CreateSyntax("initcmd", RunTheTest, NULL, "initialize the program");
      cmd_AddParm(ts, "-cmname", CMD_LIST, CMD_REQUIRED,
  		"Cache Manager name(s) to monitor");
      cmd_AddParm(ts, "-collID", CMD_LIST, CMD_REQUIRED,
Index: openafs/src/xstat/xstat_fs.c
diff -c openafs/src/xstat/xstat_fs.c:1.10.2.1 openafs/src/xstat/xstat_fs.c:1.10.2.2
*** openafs/src/xstat/xstat_fs.c:1.10.2.1	Mon Jun 26 12:20:50 2006
--- openafs/src/xstat/xstat_fs.c	Tue Oct 30 11:16:59 2007
***************
*** 18,37 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs.c,v 1.10.2.1 2006/06/26 16:20:50 rra Exp $");
  
  #include "xstat_fs.h"		/*Interface for this module */
  #include <lwp.h>		/*Lightweight process package */
  
  #include <afs/afsutil.h>
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #define LWP_STACK_SIZE	(16 * 1024)
  
--- 18,30 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs.c,v 1.10.2.2 2007/10/30 15:16:59 shadow Exp $");
  
  #include "xstat_fs.h"		/*Interface for this module */
  #include <lwp.h>		/*Lightweight process package */
  
  #include <afs/afsutil.h>
  #include <string.h>
  
  #define LWP_STACK_SIZE	(16 * 1024)
  
Index: openafs/src/xstat/xstat_fs_callback.c
diff -c openafs/src/xstat/xstat_fs_callback.c:1.15 openafs/src/xstat/xstat_fs_callback.c:1.15.2.1
*** openafs/src/xstat/xstat_fs_callback.c:1.15	Sun Mar  5 22:11:31 2006
--- openafs/src/xstat/xstat_fs_callback.c	Tue Oct 30 11:16:59 2007
***************
*** 30,47 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs_callback.c,v 1.15 2006/03/06 03:11:31 jaltman Exp $");
  
  #include <errno.h>
  #include <stdio.h>		/*Standard I/O stuff */
- 
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  #include <afs/afscbint.h>	/*Callback interface defs */
  
--- 30,40 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs_callback.c,v 1.15.2.1 2007/10/30 15:16:59 shadow Exp $");
  
  #include <errno.h>
  #include <stdio.h>		/*Standard I/O stuff */
  #include <string.h>
  
  #include <afs/afscbint.h>	/*Callback interface defs */
  
Index: openafs/src/xstat/xstat_fs_test.c
diff -c openafs/src/xstat/xstat_fs_test.c:1.15 openafs/src/xstat/xstat_fs_test.c:1.15.2.1
*** openafs/src/xstat/xstat_fs_test.c:1.15	Mon Apr 10 11:42:34 2006
--- openafs/src/xstat/xstat_fs_test.c	Tue Oct 30 11:16:59 2007
***************
*** 17,34 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs_test.c,v 1.15 2006/04/10 15:42:34 shadow Exp $");
  
  #include "xstat_fs.h"		/*Interface for xstat_fs module */
  #include <cmd.h>		/*Command line interpreter */
  #include <time.h>
- #ifdef HAVE_STRING_H
  #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
  
  /*
   * External routines that don't have explicit include file definitions.
--- 17,28 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs_test.c,v 1.15.2.1 2007/10/30 15:16:59 shadow Exp $");
  
  #include "xstat_fs.h"		/*Interface for xstat_fs module */
  #include <cmd.h>		/*Command line interpreter */
  #include <time.h>
  #include <string.h>
  
  /*
   * External routines that don't have explicit include file definitions.
