Index: openafs/src/NTMakefile
diff -c openafs/src/NTMakefile:1.27.2.1 openafs/src/NTMakefile:1.27.2.2
*** openafs/src/NTMakefile:1.27.2.1	Tue Jul  4 02:28:22 2006
--- openafs/src/NTMakefile	Thu Oct 12 17:19:35 2006
***************
*** 570,576 ****
  	$(NTMAKE)
  	$(CD) ..\..\..
  
! extra: aklog
  !	IF EXIST($(SRC)\WINNT\extra) && EXIST($(SRC)\WINNT\extra\NTMakefile)
       echo ***** $@
      $(DOCD) $(SRC)\WINNT\$@
--- 570,583 ----
  	$(NTMAKE)
  	$(CD) ..\..\..
  
! netidmgr_plugin: aklog
!      echo ***** $@
! 	$(DOCD) $(SRC)\WINNT\$@
! 	$(CD) $(SRC)\WINNT\$@
! 	$(NTMAKE)
! 	$(CD) ..\..\..
! 
! extra: netidmgr_plugin
  !	IF EXIST($(SRC)\WINNT\extra) && EXIST($(SRC)\WINNT\extra\NTMakefile)
       echo ***** $@
      $(DOCD) $(SRC)\WINNT\$@
Index: openafs/src/WINNT/afsd/afsd_init.c
diff -c openafs/src/WINNT/afsd/afsd_init.c:1.79.2.5 openafs/src/WINNT/afsd/afsd_init.c:1.79.2.7
*** openafs/src/WINNT/afsd/afsd_init.c:1.79.2.5	Wed Aug 30 16:12:03 2006
--- openafs/src/WINNT/afsd/afsd_init.c	Sun Oct  8 21:52:20 2006
***************
*** 1238,1243 ****
--- 1238,1250 ----
      return 0;
  }
  
+ int afsd_ShutdownCM(void)
+ {
+     cm_ReleaseSCache(cm_data.rootSCachep);
+ 
+     return 0;
+ }
+ 
  int afsd_InitDaemons(char **reasonP)
  {
      long code;
Index: openafs/src/WINNT/afsd/afsd_init.h
diff -c openafs/src/WINNT/afsd/afsd_init.h:1.6 openafs/src/WINNT/afsd/afsd_init.h:1.6.6.1
*** openafs/src/WINNT/afsd/afsd_init.h:1.6	Mon May  9 23:34:03 2005
--- openafs/src/WINNT/afsd/afsd_init.h	Sun Oct  8 16:31:36 2006
***************
*** 19,24 ****
--- 19,25 ----
  int afsd_InitSMB(char **reasonP);
  #endif /* !DJGPP */
  int afsd_InitDaemons(char **reasonP);
+ int afsd_ShutdownCM(void);
  void afsd_ForceTrace(BOOL flush);
  void afsd_SetUnhandledExceptionFilter();
  
Index: openafs/src/WINNT/afsd/afsd_service.c
diff -c openafs/src/WINNT/afsd/afsd_service.c:1.52.4.4 openafs/src/WINNT/afsd/afsd_service.c:1.52.4.6
*** openafs/src/WINNT/afsd/afsd_service.c:1.52.4.4	Mon Aug  7 17:19:05 2006
--- openafs/src/WINNT/afsd/afsd_service.c	Sun Oct  8 16:31:36 2006
***************
*** 360,366 ****
          {
              afsi_log("SERVICE_CONTROL_CUSTOM_DUMP"); 
              GenerateMiniDump(NULL);
! 			dwRet = NO_ERROR;
          }
          break;
      }		/* end switch(ctrlCode) */                                                        
--- 360,366 ----
          {
              afsi_log("SERVICE_CONTROL_CUSTOM_DUMP"); 
              GenerateMiniDump(NULL);
! 	    dwRet = NO_ERROR;
          }
          break;
      }		/* end switch(ctrlCode) */                                                        
***************
*** 1069,1078 ****
--- 1069,1081 ----
  #endif
  
  #ifdef _DEBUG
+     afsd_DbgBreakAllocInit();
      _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF /*| _CRTDBG_CHECK_ALWAYS_DF*/ | 
                     _CRTDBG_CHECK_CRT_DF /* | _CRTDBG_DELAY_FREE_MEM_DF */ );
  #endif 
  
+     afsd_SetUnhandledExceptionFilter();
+        
      osi_InitPanic(afsd_notifier);
      osi_InitTraceOption();
  
***************
*** 1398,1404 ****
                                           
      cm_DaemonShutdown();                 
      afsi_log("Daemon shutdown complete");
!                                          
      buf_Shutdown();                      
      afsi_log("Buffer shutdown complete");
                                           
--- 1401,1409 ----
                                           
      cm_DaemonShutdown();                 
      afsi_log("Daemon shutdown complete");
!     
!     afsd_ShutdownCM();
! 
      buf_Shutdown();                      
      afsi_log("Buffer shutdown complete");
                                           
***************
*** 1406,1412 ****
      afsi_log("rx finalization complete");
                                           
  #ifndef AFSIFS
! 	smb_Shutdown();                      
      afsi_log("smb shutdown complete");   
  #endif
                                           
--- 1411,1417 ----
      afsi_log("rx finalization complete");
                                           
  #ifndef AFSIFS
!     smb_Shutdown();                      
      afsi_log("smb shutdown complete");   
  #endif
                                           
Index: openafs/src/WINNT/afsd/cm_access.c
diff -c openafs/src/WINNT/afsd/cm_access.c:1.7.2.3 openafs/src/WINNT/afsd/cm_access.c:1.7.2.7
*** openafs/src/WINNT/afsd/cm_access.c:1.7.2.3	Wed Jun 28 01:34:50 2006
--- openafs/src/WINNT/afsd/cm_access.c	Fri Oct  6 01:15:22 2006
***************
*** 118,143 ****
  {
      long code;
      cm_fid_t tfid;
!     cm_scache_t *aclScp;
      int got_cb = 0;
  
      /* pretty easy: just force a pass through the fetch status code */
          
!     osi_Log2(afsd_logp, "GetAccess scp %x user %x", scp, userp);
  
      /* first, start by finding out whether we have a directory or something
       * else, so we can find what object's ACL we need.
       */
!     if (!cm_HaveCallback(scp)) {
  	code = cm_SyncOp(scp, NULL, userp, reqp, 0,
! 		      CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
! 	if (code) 
! 	    return code;
! 
! 	got_cb = 1;
!     }
!         
!     if (scp->fileType != CM_SCACHETYPE_DIRECTORY) {
          /* not a dir, use parent dir's acl */
          tfid.cell = scp->fid.cell;
          tfid.volume = scp->fid.volume;
--- 118,139 ----
  {
      long code;
      cm_fid_t tfid;
!     cm_scache_t *aclScp = NULL;
      int got_cb = 0;
  
      /* pretty easy: just force a pass through the fetch status code */
          
!     osi_Log2(afsd_logp, "GetAccess scp 0x%p user 0x%p", scp, userp);
  
      /* first, start by finding out whether we have a directory or something
       * else, so we can find what object's ACL we need.
       */
!     if (scp->fileType == CM_SCACHETYPE_DIRECTORY ) {
  	code = cm_SyncOp(scp, NULL, userp, reqp, 0,
! 			 CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS | CM_SCACHESYNC_FORCECB);
! 	if (!code) 
! 	    cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
!     } else {
          /* not a dir, use parent dir's acl */
          tfid.cell = scp->fid.cell;
          tfid.volume = scp->fid.volume;
***************
*** 147,165 ****
          code = cm_GetSCache(&tfid, &aclScp, userp, reqp);
          if (code) {
              lock_ObtainMutex(&scp->mx);
!             return code;
          }       
                  
          osi_Log2(afsd_logp, "GetAccess parent scp %x user %x", aclScp, userp);
!         lock_ObtainMutex(&aclScp->mx);
! 
! 	code = cm_GetCallback(aclScp, userp, reqp, 1);
!         lock_ReleaseMutex(&aclScp->mx);
          cm_ReleaseSCache(aclScp);
          lock_ObtainMutex(&scp->mx);
-     } else if (!got_cb) {
- 	code = cm_GetCallback(scp, userp, reqp, 1);
      }
  
      return code;
  }
--- 143,163 ----
          code = cm_GetSCache(&tfid, &aclScp, userp, reqp);
          if (code) {
              lock_ObtainMutex(&scp->mx);
! 	    goto _done;
          }       
                  
          osi_Log2(afsd_logp, "GetAccess parent scp %x user %x", aclScp, userp);
! 	lock_ObtainMutex(&aclScp->mx);
! 	code = cm_SyncOp(aclScp, NULL, userp, reqp, 0,
! 			 CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS | CM_SCACHESYNC_FORCECB);
! 	if (!code)
! 	    cm_SyncOpDone(aclScp, NULL, 
! 			  CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
! 	lock_ReleaseMutex(&aclScp->mx);
          cm_ReleaseSCache(aclScp);
          lock_ObtainMutex(&scp->mx);
      }
  
+   _done:
      return code;
  }
Index: openafs/src/WINNT/afsd/cm_buf.c
diff -c openafs/src/WINNT/afsd/cm_buf.c:1.31.2.2 openafs/src/WINNT/afsd/cm_buf.c:1.31.2.7
*** openafs/src/WINNT/afsd/cm_buf.c:1.31.2.2	Thu Aug  3 23:46:39 2006
--- openafs/src/WINNT/afsd/cm_buf.c	Tue Oct 10 11:57:44 2006
***************
*** 108,114 ****
--- 108,119 ----
  {
      /* 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)) {
              osi_QAdd((osi_queue_t **) &cm_data.buf_freeListp, &bp->q);
***************
*** 134,160 ****
  {
      cm_buf_t *bp;			/* buffer we're hacking on; held */
      long i;				/* counter */
!     long nAtOnce;			/* how many to do at once */
      cm_req_t req;
  
      lock_ObtainWrite(&buf_globalLock);
      bp = cm_data.buf_allp;
      buf_HoldLocked(bp);
      lock_ReleaseWrite(&buf_globalLock);
!     nAtOnce = (long)sqrt((double)cm_data.buf_nbuffers);
      while (buf_ShutdownFlag == 0) {
  #ifndef DJGPP
!         i = SleepEx(5000, 1);
!         if (i != 0) continue;
  #else
!         thrd_Sleep(5000);
  #endif /* DJGPP */
!             
          if (buf_ShutdownFlag == 1)
              return;
  
          /* now go through our percentage of the buffers */
!         for (i=0; i<nAtOnce; i++) {
              /* don't want its identity changing while we're
               * messing with it, so must do all of this with
               * bp held.
--- 139,170 ----
  {
      cm_buf_t *bp;			/* buffer we're hacking on; held */
      long i;				/* counter */
!     long wasDirty;
      cm_req_t req;
  
      lock_ObtainWrite(&buf_globalLock);
      bp = cm_data.buf_allp;
      buf_HoldLocked(bp);
      lock_ReleaseWrite(&buf_globalLock);
!     wasDirty = 0;
! 
      while (buf_ShutdownFlag == 0) {
+ 	if (!wasDirty) {
  #ifndef DJGPP
! 	    i = SleepEx(5000, 1);
! 	    if (i != 0) continue;
  #else
! 	    thrd_Sleep(5000);
  #endif /* DJGPP */
! 	}
! 
          if (buf_ShutdownFlag == 1)
              return;
  
+ 	wasDirty = 0;
+ 
          /* now go through our percentage of the buffers */
!         for (i=0; i<cm_data.buf_nbuffers; i++) {
              /* don't want its identity changing while we're
               * messing with it, so must do all of this with
               * bp held.
***************
*** 165,172 ****
               * a log page at any given instant.
               */
              cm_InitReq(&req);
              req.flags |= CM_REQ_NORETRY;
!             buf_CleanAsync(bp, &req);
  
              /* now advance to the next buffer; the allp chain never changes,
               * and so can be followed even when holding no locks.
--- 175,184 ----
               * a log page at any given instant.
               */
              cm_InitReq(&req);
+ #ifdef NO_BKG_RETRIES
              req.flags |= CM_REQ_NORETRY;
! #endif
! 	    wasDirty |= buf_CleanAsync(bp, &req);
  
              /* now advance to the next buffer; the allp chain never changes,
               * and so can be followed even when holding no locks.
***************
*** 462,467 ****
--- 474,481 ----
   */
  void buf_WaitIO(cm_scache_t * scp, cm_buf_t *bp)
  {
+     int release = 0;
+ 
      if (scp)
          osi_assert(scp->magic == CM_SCACHE_MAGIC);
      osi_assert(bp->magic == CM_BUF_MAGIC);
***************
*** 478,486 ****
          if ( bp->flags & CM_BUF_WAITING ) {
              bp->waitCount++;
              bp->waitRequests++;
!             osi_Log1(afsd_logp, "buf_WaitIO CM_BUF_WAITING already set for 0x%p", bp);
          } else {
!             osi_Log1(afsd_logp, "buf_WaitIO CM_BUF_WAITING set for 0x%p", bp);
              bp->flags |= CM_BUF_WAITING;
              bp->waitCount = bp->waitRequests = 1;
          }
--- 492,500 ----
          if ( bp->flags & CM_BUF_WAITING ) {
              bp->waitCount++;
              bp->waitRequests++;
!             osi_Log1(buf_logp, "buf_WaitIO CM_BUF_WAITING already set for 0x%p", bp);
          } else {
!             osi_Log1(buf_logp, "buf_WaitIO CM_BUF_WAITING set for 0x%p", bp);
              bp->flags |= CM_BUF_WAITING;
              bp->waitCount = bp->waitRequests = 1;
          }
***************
*** 489,509 ****
  	smb_UpdateServerPriority();
  
          lock_ObtainMutex(&bp->mx);
!         osi_Log1(afsd_logp, "buf_WaitIO conflict wait done for 0x%p", bp);
          bp->waitCount--;
          if (bp->waitCount == 0) {
!             osi_Log1(afsd_logp, "buf_WaitIO CM_BUF_WAITING reset for 0x%p", bp);
              bp->flags &= ~CM_BUF_WAITING;
              bp->waitRequests = 0;
          }
  
          if ( !scp ) {
!             scp = cm_FindSCache(&bp->fid);
          }
          if ( scp ) {
              lock_ObtainMutex(&scp->mx);
              if (scp->flags & CM_SCACHEFLAG_WAITING) {
!                 osi_Log1(afsd_logp, "buf_WaitIO waking scp 0x%p", scp);
                  osi_Wakeup((LONG_PTR)&scp->flags);
              }
  	    lock_ReleaseMutex(&scp->mx);
--- 503,524 ----
  	smb_UpdateServerPriority();
  
          lock_ObtainMutex(&bp->mx);
!         osi_Log1(buf_logp, "buf_WaitIO conflict wait done for 0x%p", bp);
          bp->waitCount--;
          if (bp->waitCount == 0) {
!             osi_Log1(buf_logp, "buf_WaitIO CM_BUF_WAITING reset for 0x%p", bp);
              bp->flags &= ~CM_BUF_WAITING;
              bp->waitRequests = 0;
          }
  
          if ( !scp ) {
!             if (scp = cm_FindSCache(&bp->fid))
! 		 release = 1;
          }
          if ( scp ) {
              lock_ObtainMutex(&scp->mx);
              if (scp->flags & CM_SCACHEFLAG_WAITING) {
!                 osi_Log1(buf_logp, "buf_WaitIO waking scp 0x%p", scp);
                  osi_Wakeup((LONG_PTR)&scp->flags);
              }
  	    lock_ReleaseMutex(&scp->mx);
***************
*** 514,523 ****
       * the I/O to complete.  Do so.
       */
      if (bp->flags & CM_BUF_WAITING) {
!         osi_Log1(afsd_logp, "buf_WaitIO Waking bp 0x%p", bp);
          osi_Wakeup((LONG_PTR) bp);
      }
!     osi_Log1(afsd_logp, "WaitIO finished wait for bp 0x%p", bp);
  }
  
  /* find a buffer, if any, for a particular file ID and offset.  Assumes
--- 529,541 ----
       * the I/O to complete.  Do so.
       */
      if (bp->flags & CM_BUF_WAITING) {
!         osi_Log1(buf_logp, "buf_WaitIO Waking bp 0x%p", bp);
          osi_Wakeup((LONG_PTR) bp);
      }
!     osi_Log1(buf_logp, "WaitIO finished wait for bp 0x%p", bp);
! 
!     if (scp && release)
! 	cm_ReleaseSCache(scp);
  }
  
  /* find a buffer, if any, for a particular file ID and offset.  Assumes
***************
*** 562,586 ****
   * Makes sure that there's only one person writing this block
   * at any given time, and also ensures that the log is forced sufficiently far,
   * if this buffer contains logged data.
   */
! void buf_CleanAsyncLocked(cm_buf_t *bp, cm_req_t *reqp)
  {
      long code = 0;
  
      osi_assert(bp->magic == CM_BUF_MAGIC);
  
      while ((bp->flags & CM_BUF_DIRTY) == CM_BUF_DIRTY) {
          lock_ReleaseMutex(&bp->mx);
  
! 	osi_Log1(afsd_logp, "buf_CleanAsyncLocked starts I/O on 0x%p", bp);
!         code = (*cm_buf_opsp->Writep)(&bp->fid, &bp->offset,
!                                        cm_data.buf_blockSize, 0, bp->userp,
!                                        reqp);
! 	osi_Log2(afsd_logp, "buf_CleanAsyncLocked I/O on 0x%p, done=%d", bp, code);
!                 
!         lock_ObtainMutex(&bp->mx);
!         if (code) 
!             break;
  
  #ifdef DISKCACHE95
          /* Disk cache support */
--- 580,627 ----
   * Makes sure that there's only one person writing this block
   * at any given time, and also ensures that the log is forced sufficiently far,
   * if this buffer contains logged data.
+  *
+  * Returns one if the buffer was dirty.
   */
! long buf_CleanAsyncLocked(cm_buf_t *bp, cm_req_t *reqp)
  {
      long code = 0;
+     long isdirty = 0;
+     cm_scache_t * scp = NULL;
  
      osi_assert(bp->magic == CM_BUF_MAGIC);
  
      while ((bp->flags & CM_BUF_DIRTY) == CM_BUF_DIRTY) {
+ 	isdirty = 1;
          lock_ReleaseMutex(&bp->mx);
  
! 	scp = cm_FindSCache(&bp->fid);
! 	if (scp) {
! 	    osi_Log2(buf_logp, "buf_CleanAsyncLocked starts I/O on scp 0x%p buf 0x%p", scp, bp);
! 	    code = (*cm_buf_opsp->Writep)(scp, &bp->offset,
! 					   cm_data.buf_blockSize, 0, bp->userp,
! 					   reqp);
! 	    osi_Log3(buf_logp, "buf_CleanAsyncLocked I/O on scp 0x%p buf 0x%p, done=%d", scp, bp, code);
! 
! 	    cm_ReleaseSCache(scp);
! 	    scp = NULL;
! 	} else {
! 	    osi_Log1(buf_logp, "buf_CleanAsyncLocked unable to start I/O - scp not found buf 0x%p", bp);
! 	    code = CM_ERROR_NOSUCHFILE;
! 	}    
!         
! 	lock_ObtainMutex(&bp->mx);
! 	/* if the Write routine returns No Such File, clear the dirty flag
! 	 * because we aren't going to be able to write this data to the file
! 	 * server.
! 	 */
! 	if (code == CM_ERROR_NOSUCHFILE){
! 	    bp->flags &= ~CM_BUF_DIRTY;
! 	    bp->flags |= CM_BUF_ERROR;
! 	    bp->error = CM_ERROR_NOSUCHFILE;
! 	    bp->dataVersion = -1; /* bad */
! 	    bp->dirtyCounter++;
! 	}
  
  #ifdef DISKCACHE95
          /* Disk cache support */
***************
*** 599,604 ****
--- 640,646 ----
          osi_Log1(buf_logp, "buf_WaitIO Waking bp 0x%p", bp);
          osi_Wakeup((LONG_PTR) bp);
      }
+     return isdirty;
  }
  
  /* Called with a zero-ref count buffer and with the buf_globalLock write locked.
***************
*** 799,804 ****
--- 841,849 ----
              if (scp) {
                  bp->flags |= CM_BUF_INHASH;
                  bp->fid = scp->fid;
+ #ifdef DEBUG
+ 		bp->scp = scp;
+ #endif
                  bp->offset = *offsetp;
                  i = BUF_HASH(&scp->fid, offsetp);
                  bp->hashp = cm_data.buf_hashTablepp[i];
***************
*** 930,945 ****
          if (bp) {
              /* lock it and break out */
              lock_ObtainMutex(&bp->mx);
-             break;
  
  #ifdef DISKCACHE95
              /* touch disk chunk to update LRU info */
              diskcache_Touch(bp->dcp);
  #endif /* DISKCACHE95 */
          }
  
          /* otherwise, we have to create a page */
          code = buf_GetNewLocked(scp, &pageOffset, &bp);
  
          /* check if the buffer was created in a race condition branch.
           * If so, go around so we can hold a reference to it. 
--- 975,991 ----
          if (bp) {
              /* lock it and break out */
              lock_ObtainMutex(&bp->mx);
  
  #ifdef DISKCACHE95
              /* touch disk chunk to update LRU info */
              diskcache_Touch(bp->dcp);
  #endif /* DISKCACHE95 */
+             break;
          }
  
          /* otherwise, we have to create a page */
          code = buf_GetNewLocked(scp, &pageOffset, &bp);
+ 	/* bp->mx is now held */
  
          /* check if the buffer was created in a race condition branch.
           * If so, go around so we can hold a reference to it. 
***************
*** 1078,1090 ****
  }
  
  /* clean a buffer synchronously */
! void buf_CleanAsync(cm_buf_t *bp, cm_req_t *reqp)
  {
      osi_assert(bp->magic == CM_BUF_MAGIC);
  
      lock_ObtainMutex(&bp->mx);
!     buf_CleanAsyncLocked(bp, reqp);
      lock_ReleaseMutex(&bp->mx);
  }       
  
  /* wait for a buffer's cleaning to finish */
--- 1124,1139 ----
  }
  
  /* clean a buffer synchronously */
! 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);
      lock_ReleaseMutex(&bp->mx);
+ 
+     return code;
  }       
  
  /* wait for a buffer's cleaning to finish */
***************
*** 1153,1160 ****
  
                  /* now no locks are held; clean buffer and go on */
                  cm_InitReq(&req);
!                 buf_CleanAsync(bp, &req);
!                 buf_CleanWait(NULL, bp);
  
                  /* relock and release buffer */
                  lock_ObtainWrite(&buf_globalLock);
--- 1202,1209 ----
  
                  /* now no locks are held; clean buffer and go on */
                  cm_InitReq(&req);
! 		buf_CleanAsync(bp, &req);
! 		buf_CleanWait(NULL, bp);
  
                  /* relock and release buffer */
                  lock_ObtainWrite(&buf_globalLock);
***************
*** 1313,1318 ****
--- 1362,1371 ----
              }
          }
  		
+ 	cm_SyncOpDone( scp, bufp, 
+ 		       CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS
+ 		       | CM_SCACHESYNC_SETSIZE | CM_SCACHESYNC_BUFLOCKED);
+ 
          lock_ReleaseMutex(&scp->mx);
          lock_ReleaseMutex(&bufp->mx);
      
***************
*** 1434,1441 ****
                  bp->userp = userp;
                  lock_ReleaseMutex(&bp->mx);
              }   
!             buf_CleanAsync(bp, reqp);
!             buf_CleanWait(scp, bp);
              lock_ObtainMutex(&bp->mx);
              if (bp->flags & CM_BUF_ERROR) {
                  if (code == 0 || code == -1) 
--- 1487,1494 ----
                  bp->userp = userp;
                  lock_ReleaseMutex(&bp->mx);
              }   
!             code = buf_CleanAsync(bp, reqp);
! 	    buf_CleanWait(scp, bp);
              lock_ObtainMutex(&bp->mx);
              if (bp->flags & CM_BUF_ERROR) {
                  if (code == 0 || code == -1) 
***************
*** 1472,1502 ****
      lock_ObtainRead(&buf_globalLock);
      for (bp = cm_data.buf_freeListEndp; bp; bp=(cm_buf_t *) osi_QPrev(&bp->q)) {
          if (bp->magic != CM_BUF_MAGIC)
!             DebugBreak();
          countb++;
          bpb = bp;
      }
  
      for (bp = cm_data.buf_freeListp; bp; bp=(cm_buf_t *) osi_QNext(&bp->q)) {
          if (bp->magic != CM_BUF_MAGIC)
!             DebugBreak();
          countf++;
          bpf = bp;
      }
  
      for (bp = cm_data.buf_allp; bp; bp=bp->allp) {
          if (bp->magic != CM_BUF_MAGIC)
!             DebugBreak();
          counta++;
          bpa = bp;
      }
      lock_ReleaseRead(&buf_globalLock);
  
      if (countb != countf)
!         DebugBreak();
  
      if (counta != cm_data.buf_nbuffers)
!         DebugBreak();	
  }
  #endif /* TESTING */
  
--- 1525,1555 ----
      lock_ObtainRead(&buf_globalLock);
      for (bp = cm_data.buf_freeListEndp; bp; bp=(cm_buf_t *) osi_QPrev(&bp->q)) {
          if (bp->magic != CM_BUF_MAGIC)
!             osi_panic("buf magic error",__FILE__,__LINE__);
          countb++;
          bpb = bp;
      }
  
      for (bp = cm_data.buf_freeListp; bp; bp=(cm_buf_t *) osi_QNext(&bp->q)) {
          if (bp->magic != CM_BUF_MAGIC)
!             osi_panic("buf magic error",__FILE__,__LINE__);
          countf++;
          bpf = bp;
      }
  
      for (bp = cm_data.buf_allp; bp; bp=bp->allp) {
          if (bp->magic != CM_BUF_MAGIC)
!             osi_panic("buf magic error",__FILE__,__LINE__);
          counta++;
          bpa = bp;
      }
      lock_ReleaseRead(&buf_globalLock);
  
      if (countb != countf)
! 	osi_panic("buf magic error",__FILE__,__LINE__);
  
      if (counta != cm_data.buf_nbuffers)
! 	osi_panic("buf magic error",__FILE__,__LINE__);
  }
  #endif /* TESTING */
  
***************
*** 1561,1563 ****
--- 1614,1657 ----
          FlushFileBuffers(handle);
      CloseHandle(handle);
  }
+ 
+ long buf_DirtyBuffersExist(cm_fid_t *fidp)
+ {
+     cm_buf_t *bp;
+     afs_uint32 bcount = 0;
+ 
+     for (bp = cm_data.buf_allp; bp; bp=bp->allp, bcount++) {
+ 	if (!cm_FidCmp(fidp, &bp->fid) && (bp->flags & CM_BUF_DIRTY))
+ 	    return 1;
+     }
+     return 0;
+ }
+ 
+ #if 0
+ long buf_CleanDirtyBuffers(cm_scache_t *scp)
+ {
+     cm_buf_t *bp;
+     afs_uint32 bcount = 0;
+     cm_fid_t * fidp = &scp->fid;
+ 
+     for (bp = cm_data.buf_allp; bp; bp=bp->allp, bcount++) {
+ 	if (!cm_FidCmp(fidp, &bp->fid) && (bp->flags & CM_BUF_DIRTY)) {
+ 		buf_Hold(bp);
+ 	    lock_ObtainMutex(&bp->mx);
+ 	    bp->cmFlags &= ~CM_BUF_CMSTORING;
+ 	    bp->flags &= ~CM_BUF_DIRTY;
+ 	    bp->flags |= CM_BUF_ERROR;
+ 	    bp->error = VNOVNODE;
+ 	    bp->dataVersion = -1; /* bad */
+ 	    bp->dirtyCounter++;
+ 	    if (bp->flags & CM_BUF_WAITING) {
+ 		osi_Log2(buf_logp, "BUF CleanDirtyBuffers Waking [scp 0x%x] bp 0x%x", scp, bp);
+ 		osi_Wakeup((long) &bp);
+ 	    }
+ 	    lock_ReleaseMutex(&bp->mx);
+ 	    buf_Release(bp);
+ 	}
+     }
+     return 0;
+ }
+ #endif
Index: openafs/src/WINNT/afsd/cm_buf.h
diff -c openafs/src/WINNT/afsd/cm_buf.h:1.12.4.1 openafs/src/WINNT/afsd/cm_buf.h:1.12.4.2
*** openafs/src/WINNT/afsd/cm_buf.h:1.12.4.1	Thu Aug  3 23:46:39 2006
--- openafs/src/WINNT/afsd/cm_buf.h	Mon Oct  2 23:23:21 2006
***************
*** 80,85 ****
--- 80,89 ----
  #endif /* notdef */
      osi_hyper_t offset;	        /* offset */
      cm_fid_t fid;		/* file ID */
+ #ifdef DEBUG
+     cm_scache_t *scp;		/* for debugging, the scache object belonging to */
+                                 /* the fid at the time of fid assignment. */
+ #endif
      long flags;		        /* flags we're using */
      long size;		        /* size in bytes of this buffer */
      char *datap;		/* data in this buffer */
***************
*** 113,119 ****
      long counter;		/* counter of changes to identity */
  } cm_softRef_t;
  
! #define CM_BUF_READING	1	/* now reading buffer to the disk */
  #define CM_BUF_WRITING	2	/* now writing buffer to the disk */
  #define CM_BUF_INHASH	4	/* in the hash table */
  #define CM_BUF_DIRTY		8	/* buffer is dirty */
--- 117,123 ----
      long counter;		/* counter of changes to identity */
  } cm_softRef_t;
  
! #define CM_BUF_READING	1	/* now reading buffer from the disk */
  #define CM_BUF_WRITING	2	/* now writing buffer to the disk */
  #define CM_BUF_INHASH	4	/* in the hash table */
  #define CM_BUF_DIRTY		8	/* buffer is dirty */
***************
*** 164,172 ****
  
  extern long buf_GetNew(struct cm_scache *, osi_hyper_t *, cm_buf_t **);
  
! extern void buf_CleanAsyncLocked(cm_buf_t *, cm_req_t *);
  
! extern void buf_CleanAsync(cm_buf_t *, cm_req_t *);
  
  extern void buf_CleanWait(cm_scache_t *, cm_buf_t *);
  
--- 168,176 ----
  
  extern long buf_GetNew(struct cm_scache *, osi_hyper_t *, cm_buf_t **);
  
! extern long buf_CleanAsyncLocked(cm_buf_t *, cm_req_t *);
  
! extern long buf_CleanAsync(cm_buf_t *, cm_req_t *);
  
  extern void buf_CleanWait(cm_scache_t *, cm_buf_t *);
  
***************
*** 201,206 ****
--- 205,214 ----
  
  extern void buf_ForceTrace(BOOL flush);
  
+ extern long buf_DirtyBuffersExist(cm_fid_t * fidp);
+ 
+ extern long buf_CleanDirtyBuffers(cm_scache_t *scp);
+ 
  /* error codes */
  #define CM_BUF_EXISTS	1	/* buffer exists, and shouldn't */
  #endif /*  _BUF_H__ENV_ */
Index: openafs/src/WINNT/afsd/cm_callback.c
diff -c openafs/src/WINNT/afsd/cm_callback.c:1.41.4.6 openafs/src/WINNT/afsd/cm_callback.c:1.41.4.9
*** openafs/src/WINNT/afsd/cm_callback.c:1.41.4.6	Fri Aug 25 13:08:23 2006
--- openafs/src/WINNT/afsd/cm_callback.c	Thu Oct  5 16:30:38 2006
***************
*** 1618,1624 ****
  long cm_GetCallback(cm_scache_t *scp, struct cm_user *userp,
                      struct cm_req *reqp, long flags)
  {
!     long code;
      cm_conn_t *connp = NULL;
      AFSFetchStatus afsStatus;
      AFSVolSync volSync;
--- 1618,1624 ----
  long cm_GetCallback(cm_scache_t *scp, struct cm_user *userp,
                      struct cm_req *reqp, long flags)
  {
!     long code = 0;
      cm_conn_t *connp = NULL;
      AFSFetchStatus afsStatus;
      AFSVolSync volSync;
***************
*** 1626,1634 ****
      AFSFid tfid;
      cm_callbackRequest_t cbr;
      int mustCall;
-     long sflags;
      cm_fid_t sfid;
      struct rx_connection * callp = NULL;
  
      osi_Log4(afsd_logp, "GetCallback scp 0x%p cell %d vol %d flags %lX", 
               scp, scp->fid.cell, scp->fid.volume, flags);
--- 1626,1634 ----
      AFSFid tfid;
      cm_callbackRequest_t cbr;
      int mustCall;
      cm_fid_t sfid;
      struct rx_connection * callp = NULL;
+     int syncop_done = 0;
  
      osi_Log4(afsd_logp, "GetCallback scp 0x%p cell %d vol %d flags %lX", 
               scp, scp->fid.cell, scp->fid.volume, flags);
***************
*** 1675,1692 ****
      mustCall = (flags & 1);
      cm_AFSFidFromFid(&tfid, &scp->fid);
      while (1) {
!         if (!mustCall && cm_HaveCallback(scp)) {
!             osi_Log3(afsd_logp, "GetCallback Complete scp 0x%p cell %d vol %d", 
!                       scp, scp->fid.cell, scp->fid.volume);
!             return 0;
!         }
  
          /* turn off mustCall, since it has now forced us past the check above */
          mustCall = 0;
  
          /* otherwise, we have to make an RPC to get the status */
!         sflags = CM_SCACHESYNC_FETCHSTATUS | CM_SCACHESYNC_GETCALLBACK;
!         cm_SyncOp(scp, NULL, userp, reqp, 0, sflags);
          cm_StartCallbackGrantingCall(scp, &cbr);
          sfid = scp->fid;
          lock_ReleaseMutex(&scp->mx);
--- 1675,1694 ----
      mustCall = (flags & 1);
      cm_AFSFidFromFid(&tfid, &scp->fid);
      while (1) {
!         if (!mustCall && cm_HaveCallback(scp))
! 	    break;
  
          /* turn off mustCall, since it has now forced us past the check above */
          mustCall = 0;
  
          /* otherwise, we have to make an RPC to get the status */
! 	if (!syncop_done) {
! 	    code = cm_SyncOp(scp, NULL, userp, reqp, 0, 
! 			     CM_SCACHESYNC_FETCHSTATUS | CM_SCACHESYNC_GETCALLBACK);
! 	    if (code)
! 		break;
! 	    syncop_done = 1;
! 	}
          cm_StartCallbackGrantingCall(scp, &cbr);
          sfid = scp->fid;
          lock_ReleaseMutex(&scp->mx);
***************
*** 1721,1736 ****
          } else {
              cm_EndCallbackGrantingCall(NULL, &cbr, NULL, 0);
          }
-         cm_SyncOpDone(scp, NULL, sflags);
  
!         /* now check to see if we got an error */
!         if (code) {
!             osi_Log2(afsd_logp, "GetCallback Failed code 0x%x scp 0x%p -->",code, scp);
!             osi_Log4(afsd_logp, "            cell %u vol %u vn %u uniq %u",
!                      scp->fid.cell, scp->fid.volume, scp->fid.vnode, scp->fid.unique);
!             return code;
!         }
      }
  }
  
  /* called periodically by cm_daemon to shut down use of expired callbacks */
--- 1723,1747 ----
          } else {
              cm_EndCallbackGrantingCall(NULL, &cbr, NULL, 0);
          }
  
!         /* if we got an error, return to caller */
!         if (code)
! 	    break;
      }
+ 
+     if (syncop_done)
+ 	cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_FETCHSTATUS | CM_SCACHESYNC_GETCALLBACK);
+     
+     if (code) {
+ 	osi_Log2(afsd_logp, "GetCallback Failed code 0x%x scp 0x%p -->",code, scp);
+ 	osi_Log4(afsd_logp, "            cell %u vol %u vn %u uniq %u",
+ 		 scp->fid.cell, scp->fid.volume, scp->fid.vnode, scp->fid.unique);
+     } else {
+ 	osi_Log3(afsd_logp, "GetCallback Complete scp 0x%p cell %d vol %d", 
+ 		  scp, scp->fid.cell, scp->fid.volume);
+     }
+ 
+     return code;
  }
  
  /* called periodically by cm_daemon to shut down use of expired callbacks */
Index: openafs/src/WINNT/afsd/cm_conn.c
diff -c openafs/src/WINNT/afsd/cm_conn.c:1.49.2.5 openafs/src/WINNT/afsd/cm_conn.c:1.49.2.8
*** openafs/src/WINNT/afsd/cm_conn.c:1.49.2.5	Tue Aug  8 12:39:17 2006
--- openafs/src/WINNT/afsd/cm_conn.c	Fri Oct  6 01:15:22 2006
***************
*** 77,99 ****
  	    code = RegQueryValueEx(parmKey, "ConnDeadTimeout", NULL, NULL,
  				    (BYTE *) &dwValue, &dummyLen);
  	    if (code == ERROR_SUCCESS)
!                 ConnDeadtimeout = dwValue;
  
  	    dummyLen = sizeof(DWORD);
  	    code = RegQueryValueEx(parmKey, "HardDeadTimeout", NULL, NULL,
  				    (BYTE *) &dwValue, &dummyLen);
  	    if (code == ERROR_SUCCESS)
!                 HardDeadtimeout = dwValue;
  	    afsi_log("HardDeadTimeout is %d", HardDeadtimeout);
  	    RegCloseKey(parmKey);
  	}
  
  	afsi_log("lanmanworkstation : SessTimeout %d", RDRtimeout);
  	if (ConnDeadtimeout == 0)
! 	    ConnDeadtimeout = RDRtimeout / 2;
  	afsi_log("ConnDeadTimeout is %d", ConnDeadtimeout);
  	if (HardDeadtimeout == 0)
! 	    HardDeadtimeout = RDRtimeout;
  	afsi_log("HardDeadTimeout is %d", HardDeadtimeout);
  
  	osi_EndOnce(&once);
--- 77,99 ----
  	    code = RegQueryValueEx(parmKey, "ConnDeadTimeout", NULL, NULL,
  				    (BYTE *) &dwValue, &dummyLen);
  	    if (code == ERROR_SUCCESS)
!                 ConnDeadtimeout = (unsigned short)dwValue;
  
  	    dummyLen = sizeof(DWORD);
  	    code = RegQueryValueEx(parmKey, "HardDeadTimeout", NULL, NULL,
  				    (BYTE *) &dwValue, &dummyLen);
  	    if (code == ERROR_SUCCESS)
!                 HardDeadtimeout = (unsigned short)dwValue;
  	    afsi_log("HardDeadTimeout is %d", HardDeadtimeout);
  	    RegCloseKey(parmKey);
  	}
  
  	afsi_log("lanmanworkstation : SessTimeout %d", RDRtimeout);
  	if (ConnDeadtimeout == 0)
! 	    ConnDeadtimeout = (unsigned short) (RDRtimeout / 2);
  	afsi_log("ConnDeadTimeout is %d", ConnDeadtimeout);
  	if (HardDeadtimeout == 0)
! 	    HardDeadtimeout = (unsigned short) RDRtimeout;
  	afsi_log("HardDeadTimeout is %d", HardDeadtimeout);
  
  	osi_EndOnce(&once);
***************
*** 438,449 ****
  		if (scp->fileType != CM_SCACHETYPE_DIRECTORY)
  		    pscp = cm_FindSCacheParent(scp);
  
  		lock_ObtainWrite(&cm_scacheLock);
! 		cm_RecycleSCache(scp, CM_SCACHE_RECYCLEFLAG_DESTROY_BUFFERS);
  		lock_ReleaseWrite(&cm_scacheLock);
  
   		if (pscp) {
! 		    if (pscp->cbExpires > 0 && pscp->cbServerp != NULL) {
   			lock_ObtainMutex(&pscp->mx);
   			cm_DiscardSCache(pscp);
   			lock_ReleaseMutex(&pscp->mx);
--- 438,454 ----
  		if (scp->fileType != CM_SCACHETYPE_DIRECTORY)
  		    pscp = cm_FindSCacheParent(scp);
  
+ 
+ 		lock_ObtainMutex(&scp->mx);
  		lock_ObtainWrite(&cm_scacheLock);
! 		cm_RemoveSCacheFromHashTable(scp);
  		lock_ReleaseWrite(&cm_scacheLock);
+ 		scp->flags |= CM_SCACHEFLAG_DELETED;
+ 		lock_ReleaseMutex(&scp->mx);
+ 		cm_ReleaseSCache(scp);
  
   		if (pscp) {
! 		    if (cm_HaveCallback(pscp)) {
   			lock_ObtainMutex(&pscp->mx);
   			cm_DiscardSCache(pscp);
   			lock_ReleaseMutex(&pscp->mx);
Index: openafs/src/WINNT/afsd/cm_daemon.c
diff -c openafs/src/WINNT/afsd/cm_daemon.c:1.16.4.4 openafs/src/WINNT/afsd/cm_daemon.c:1.16.4.7
*** openafs/src/WINNT/afsd/cm_daemon.c:1.16.4.4	Wed Aug 30 16:16:15 2006
--- openafs/src/WINNT/afsd/cm_daemon.c	Fri Oct  6 12:32:43 2006
***************
*** 89,97 ****
          osi_assert(cm_bkgQueueCount-- > 0);
          lock_ReleaseWrite(&cm_daemonLock);
  
          (*rp->procp)(rp->scp, rp->p1, rp->p2, rp->p3, rp->p4, rp->userp);
!                 
!         cm_ReleaseUser(rp->userp);
          cm_ReleaseSCache(rp->scp);
          free(rp);
  
--- 89,102 ----
          osi_assert(cm_bkgQueueCount-- > 0);
          lock_ReleaseWrite(&cm_daemonLock);
  
+ #ifdef DEBUG_REFCOUNT
+ 	osi_Log2(afsd_logp,"cm_BkgDaemon (before) scp 0x%x ref %d",rp->scp, rp->scp->refCount);
+ #endif
          (*rp->procp)(rp->scp, rp->p1, rp->p2, rp->p3, rp->p4, rp->userp);
! #ifdef DEBUG_REFCOUNT                
! 	osi_Log2(afsd_logp,"cm_BkgDaemon (after) scp 0x%x ref %d",rp->scp, rp->scp->refCount);
! #endif
! 	cm_ReleaseUser(rp->userp);
          cm_ReleaseSCache(rp->scp);
          free(rp);
  
***************
*** 100,106 ****
      lock_ReleaseWrite(&cm_daemonLock);
  }
  
! void cm_QueueBKGRequest(cm_scache_t *scp, cm_bkgProc_t *procp, long p1, long p2, long p3, long p4,
  	cm_user_t *userp)
  {
      cm_bkgRequest_t *rp;
--- 105,111 ----
      lock_ReleaseWrite(&cm_daemonLock);
  }
  
! void cm_QueueBKGRequest(cm_scache_t *scp, cm_bkgProc_t *procp, afs_uint32 p1, afs_uint32 p2, afs_uint32 p3, afs_uint32 p4,
  	cm_user_t *userp)
  {
      cm_bkgRequest_t *rp;
Index: openafs/src/WINNT/afsd/cm_daemon.h
diff -c openafs/src/WINNT/afsd/cm_daemon.h:1.4 openafs/src/WINNT/afsd/cm_daemon.h:1.4.4.1
*** openafs/src/WINNT/afsd/cm_daemon.h:1.4	Sat Oct 29 16:13:43 2005
--- openafs/src/WINNT/afsd/cm_daemon.h	Mon Oct  2 23:23:21 2006
***************
*** 24,44 ****
  
  void cm_InitDaemon(int nDaemons);
  
! typedef void (cm_bkgProc_t)(cm_scache_t *scp, long p1, long p2, long p3,
! 	long p4, struct cm_user *up);
  
  typedef struct cm_bkgRequest {
  	osi_queue_t q;
  	cm_bkgProc_t *procp;
          cm_scache_t *scp;
!         long p1;
!         long p2;
!         long p3;
!         long p4;
          struct cm_user *userp;
  } cm_bkgRequest_t;
  
! extern void cm_QueueBKGRequest(cm_scache_t *scp, cm_bkgProc_t *procp, long p1,
! 	long p2, long p3, long p4, cm_user_t *userp);
  
  #endif /*  __CM_DAEMON_H_ENV_ */
--- 24,44 ----
  
  void cm_InitDaemon(int nDaemons);
  
! typedef void (cm_bkgProc_t)(cm_scache_t *scp, afs_uint32 p1, afs_uint32 p2, afs_uint32 p3,
! 	afs_uint32 p4, struct cm_user *up);
  
  typedef struct cm_bkgRequest {
  	osi_queue_t q;
  	cm_bkgProc_t *procp;
          cm_scache_t *scp;
!         afs_uint32 p1;
!         afs_uint32 p2;
!         afs_uint32 p3;
!         afs_uint32 p4;
          struct cm_user *userp;
  } cm_bkgRequest_t;
  
! extern void cm_QueueBKGRequest(cm_scache_t *scp, cm_bkgProc_t *procp, afs_uint32 p1,
! 	afs_uint32 p2, afs_uint32 p3, afs_uint32 p4, cm_user_t *userp);
  
  #endif /*  __CM_DAEMON_H_ENV_ */
Index: openafs/src/WINNT/afsd/cm_dcache.c
diff -c openafs/src/WINNT/afsd/cm_dcache.c:1.30.2.2 openafs/src/WINNT/afsd/cm_dcache.c:1.30.2.8
*** openafs/src/WINNT/afsd/cm_dcache.c:1.30.2.2	Wed Aug  9 19:49:41 2006
--- openafs/src/WINNT/afsd/cm_dcache.c	Fri Oct  6 12:32:43 2006
***************
*** 46,52 ****
  /* functions called back from the buffer package when reading or writing data,
   * or when holding or releasing a vnode pointer.
   */
! long cm_BufWrite(void *vfidp, osi_hyper_t *offsetp, long length, long flags,
                   cm_user_t *userp, cm_req_t *reqp)
  {
      /* store the data back from this buffer; the buffer is locked and held,
--- 46,52 ----
  /* functions called back from the buffer package when reading or writing data,
   * or when holding or releasing a vnode pointer.
   */
! long cm_BufWrite(void *vscp, osi_hyper_t *offsetp, long length, long flags,
                   cm_user_t *userp, cm_req_t *reqp)
  {
      /* store the data back from this buffer; the buffer is locked and held,
***************
*** 56,63 ****
       * bufp->scp.
       */
      long code;
!     cm_fid_t *fidp = vfidp;
!     cm_scache_t *scp;
      long nbytes;
      long temp;
      AFSFetchStatus outStatus;
--- 56,62 ----
       * bufp->scp.
       */
      long code;
!     cm_scache_t *scp = vscp;
      long nbytes;
      long temp;
      AFSFetchStatus outStatus;
***************
*** 77,100 ****
      int require_64bit_ops = 0;
  
      osi_assert(userp != 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
       * buffer, although more likely it will just return a new, empty, buffer.
       */
-     scp = cm_FindSCache(fidp);
-     if (scp == NULL)
-         return CM_ERROR_NOSUCHFILE;	/* shouldn't happen */
- 
-     cm_AFSFidFromFid(&tfid, fidp);
  
      lock_ObtainMutex(&scp->mx);
  
      code = cm_SetupStoreBIOD(scp, offsetp, length, &biod, userp, reqp);
      if (code) {
          osi_Log1(afsd_logp, "cm_SetupStoreBIOD code %x", code);
          lock_ReleaseMutex(&scp->mx);
-         cm_ReleaseSCache(scp);
          return code;
      }
  
--- 76,100 ----
      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
       * buffer, although more likely it will just return a new, empty, buffer.
       */
  
      lock_ObtainMutex(&scp->mx);
+     cm_AFSFidFromFid(&tfid, &scp->fid);
+ 
+     if (scp->flags & CM_SCACHEFLAG_DELETED) {
+ 	lock_ReleaseMutex(&scp->mx);
+ 	return CM_ERROR_NOSUCHFILE;
+     }
  
      code = cm_SetupStoreBIOD(scp, offsetp, length, &biod, userp, reqp);
      if (code) {
          osi_Log1(afsd_logp, "cm_SetupStoreBIOD code %x", code);
          lock_ReleaseMutex(&scp->mx);
          return code;
      }
  
***************
*** 102,108 ****
          osi_Log0(afsd_logp, "cm_SetupStoreBIOD length 0");
          lock_ReleaseMutex(&scp->mx);
          cm_ReleaseBIOD(&biod, 1);	/* should be a NOOP */
-         cm_ReleaseSCache(scp);
          return 0;
      }
  
--- 102,107 ----
***************
*** 295,301 ****
      }
      lock_ReleaseMutex(&scp->mx);
      cm_ReleaseBIOD(&biod, 1);
-     cm_ReleaseSCache(scp);
  
      return code;
  }
--- 294,299 ----
***************
*** 427,439 ****
  /* stabilize scache entry, and return with it locked so 
   * it stays stable.
   */
! long cm_BufStabilize(void *parmp, cm_user_t *userp, cm_req_t *reqp)
  {
!     cm_scache_t *scp;
      long code;
  
-     scp = parmp;
-         
      lock_ObtainMutex(&scp->mx);
      code = cm_SyncOp(scp, NULL, userp, reqp, 0, 
                       CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS | CM_SCACHESYNC_SETSIZE);
--- 425,435 ----
  /* stabilize scache entry, and return with it locked so 
   * it stays stable.
   */
! long cm_BufStabilize(void *vscp, cm_user_t *userp, cm_req_t *reqp)
  {
!     cm_scache_t *scp = vscp;
      long code;
  
      lock_ObtainMutex(&scp->mx);
      code = cm_SyncOp(scp, NULL, userp, reqp, 0, 
                       CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS | CM_SCACHESYNC_SETSIZE);
***************
*** 446,457 ****
  }
  
  /* undoes the work that cm_BufStabilize does: releases lock so things can change again */
! long cm_BufUnstabilize(void *parmp, cm_user_t *userp)
  {
!     cm_scache_t *scp;
!         
!     scp = parmp;
          
      lock_ReleaseMutex(&scp->mx);
          
      /* always succeeds */
--- 442,453 ----
  }
  
  /* undoes the work that cm_BufStabilize does: releases lock so things can change again */
! long cm_BufUnstabilize(void *vscp, cm_user_t *userp)
  {
!     cm_scache_t *scp = vscp;
          
+     cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS | CM_SCACHESYNC_SETSIZE);
+ 
      lock_ReleaseMutex(&scp->mx);
          
      /* always succeeds */
***************
*** 561,566 ****
--- 557,563 ----
                   && bp->dataVersion != scp->dataVersion)
                  stop = 1;
              buf_Release(bp);
+ 	    bp = NULL;
          }
          else 
              stop = 1;
***************
*** 594,616 ****
      return code;
  }
  
! void cm_BkgStore(cm_scache_t *scp, long p1, long p2, long p3, long p4,
                   cm_user_t *userp)
  {
      osi_hyper_t toffset;
      long length;
      cm_req_t req;
  
!     cm_InitReq(&req);
!     req.flags |= CM_REQ_NORETRY;
  
!     toffset.LowPart = p1;
!     toffset.HighPart = p2;
!     length = p3;
  
!     osi_Log4(afsd_logp, "Starting BKG store scp 0x%p, offset 0x%x:%08x, length 0x%x", scp, p2, p1, p3);
  
!     cm_BufWrite(&scp->fid, &toffset, length, /* flags */ 0, userp, &req);
  
      lock_ObtainMutex(&scp->mx);
      cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_ASYNCSTORE);
--- 591,620 ----
      return code;
  }
  
! void cm_BkgStore(cm_scache_t *scp, afs_uint32 p1, afs_uint32 p2, afs_uint32 p3, afs_uint32 p4,
                   cm_user_t *userp)
  {
      osi_hyper_t toffset;
      long length;
      cm_req_t req;
+     long code;
  
!     if (scp->flags & CM_SCACHEFLAG_DELETED) {
! 	osi_Log4(afsd_logp, "Skipping BKG store - Deleted scp 0x%p, offset 0x%x:%08x, length 0x%x", scp, p2, p1, p3);
!     } else {
! 	cm_InitReq(&req);
! #ifdef NO_BKG_RETRIES
! 	req.flags |= CM_REQ_NORETRY;
! #endif
  
! 	toffset.LowPart = p1;
! 	toffset.HighPart = p2;
! 	length = p3;
  
! 	osi_Log4(afsd_logp, "Starting BKG store scp 0x%p, offset 0x%x:%08x, length 0x%x", scp, p2, p1, p3);
  
! 	code = cm_BufWrite(scp, &toffset, length, /* flags */ 0, userp, &req);
!     }
  
      lock_ObtainMutex(&scp->mx);
      cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_ASYNCSTORE);
***************
*** 636,642 ****
  }
  
  /* do the prefetch */
! void cm_BkgPrefetch(cm_scache_t *scp, long p1, long p2, long p3, long p4,
                      cm_user_t *userp)
  {
      long length;
--- 640,646 ----
  }
  
  /* do the prefetch */
! void cm_BkgPrefetch(cm_scache_t *scp, afs_uint32 p1, afs_uint32 p2, afs_uint32 p3, afs_uint32 p4,
                      cm_user_t *userp)
  {
      long length;
***************
*** 742,748 ****
      long flags;			/* flags to cm_SyncOp */
          
      /* clear things out */
!     biop->scp = scp;		/* don't hold */
      biop->offset = *inOffsetp;
      biop->length = 0;
      biop->bufListp = NULL;
--- 746,752 ----
      long flags;			/* flags to cm_SyncOp */
          
      /* clear things out */
!     biop->scp = scp;			/* do not hold; held by caller */
      biop->offset = *inOffsetp;
      biop->length = 0;
      biop->bufListp = NULL;
***************
*** 755,761 ****
      lock_ObtainMutex(&scp->mx);
  
      bufp = NULL;
!     for (temp = 0; temp < inSize; temp += cm_data.buf_blockSize, bufp = NULL) {
          thyper.HighPart = 0;
          thyper.LowPart = temp;
          tbase = LargeIntegerAdd(*inOffsetp, thyper);
--- 759,765 ----
      lock_ObtainMutex(&scp->mx);
  
      bufp = NULL;
!     for (temp = 0; temp < inSize; temp += cm_data.buf_blockSize) {
          thyper.HighPart = 0;
          thyper.LowPart = temp;
          tbase = LargeIntegerAdd(*inOffsetp, thyper);
***************
*** 767,776 ****
              lock_ObtainMutex(&bufp->mx);
              lock_ObtainMutex(&scp->mx);
  
!             flags = CM_SCACHESYNC_NEEDCALLBACK
!                 | CM_SCACHESYNC_GETSTATUS
!                     | CM_SCACHESYNC_STOREDATA
!                         | CM_SCACHESYNC_BUFLOCKED;
              code = cm_SyncOp(scp, bufp, userp, reqp, 0, flags); 
              if (code) {
                  lock_ReleaseMutex(&bufp->mx);
--- 771,777 ----
              lock_ObtainMutex(&bufp->mx);
              lock_ObtainMutex(&scp->mx);
  
!             flags = CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS | CM_SCACHESYNC_STOREDATA | CM_SCACHESYNC_BUFLOCKED;
              code = cm_SyncOp(scp, bufp, userp, reqp, 0, flags); 
              if (code) {
                  lock_ReleaseMutex(&bufp->mx);
***************
*** 791,796 ****
--- 792,798 ----
              cm_SyncOpDone(scp, bufp, flags);
              lock_ReleaseMutex(&bufp->mx);
              buf_Release(bufp);
+ 	    bufp = NULL;
          }       
      }
  
***************
*** 816,821 ****
--- 818,824 ----
      biop->length = cm_data.buf_blockSize;
      firstModOffset = bufp->offset;
      biop->offset = firstModOffset;
+     bufp = NULL;	/* this buffer and reference added to the queue */
  
      /* compute the window surrounding *inOffsetp of size cm_chunkSize */
      scanStart = *inOffsetp;
***************
*** 824,831 ****
      thyper.HighPart = 0;
      scanEnd = LargeIntegerAdd(scanStart, thyper);
  
!     flags = CM_SCACHESYNC_NEEDCALLBACK
!         | CM_SCACHESYNC_GETSTATUS
          | CM_SCACHESYNC_STOREDATA
          | CM_SCACHESYNC_BUFLOCKED
          | CM_SCACHESYNC_NOWAIT;
--- 827,833 ----
      thyper.HighPart = 0;
      scanEnd = LargeIntegerAdd(scanStart, thyper);
  
!     flags = CM_SCACHESYNC_GETSTATUS
          | CM_SCACHESYNC_STOREDATA
          | CM_SCACHESYNC_BUFLOCKED
          | CM_SCACHESYNC_NOWAIT;
***************
*** 846,851 ****
--- 848,854 ----
          lock_ObtainMutex(&scp->mx);
          if (code == 0) {
              buf_Release(bufp);
+ 	    bufp = NULL;
              break;
          }
                  
***************
*** 853,858 ****
--- 856,862 ----
          if (code) {
              lock_ReleaseMutex(&bufp->mx);
              buf_Release(bufp);
+ 	    bufp = NULL;
              break;
          }
                  
***************
*** 861,866 ****
--- 865,871 ----
              cm_SyncOpDone(scp, bufp, flags);
              lock_ReleaseMutex(&bufp->mx);
              buf_Release(bufp);
+ 	    bufp = NULL;
              break;
          }
  
***************
*** 877,882 ****
--- 882,888 ----
          osi_QAddT((osi_queue_t **) &biop->bufListp,
                    (osi_queue_t **) &biop->bufListEndp,
                    &qdp->q);
+ 	bufp = NULL;		/* added to the queue */
  
          /* update biod info describing the transfer */
          biop->offset = LargeIntegerSubtract(biop->offset, thyper);
***************
*** 902,907 ****
--- 908,914 ----
          lock_ObtainMutex(&scp->mx);
          if (code == 0) {
              buf_Release(bufp);
+ 	    bufp = NULL;
              break;
          }
  
***************
*** 909,914 ****
--- 916,922 ----
          if (code) {
              lock_ReleaseMutex(&bufp->mx);
              buf_Release(bufp);
+ 	    bufp = NULL;
              break;
          }
                  
***************
*** 917,922 ****
--- 925,931 ----
              cm_SyncOpDone(scp, bufp, flags);
              lock_ReleaseMutex(&bufp->mx);
              buf_Release(bufp);
+ 	    bufp = NULL;
              break;
          }
  
***************
*** 933,938 ****
--- 942,948 ----
          osi_QAddH((osi_queue_t **) &biop->bufListp,
                    (osi_queue_t **) &biop->bufListEndp,
                    &qdp->q);
+ 	bufp = NULL;
  
          /* update biod info describing the transfer */
          biop->length += cm_data.buf_blockSize;
***************
*** 967,973 ****
      osi_queueData_t *heldBufListEndp;	/* first one */
      int reserving;
  
!     biop->scp = scp;
      biop->offset = *offsetp;
      /* null out the list of buffers */
      biop->bufListp = biop->bufListEndp = NULL;
--- 977,983 ----
      osi_queueData_t *heldBufListEndp;	/* first one */
      int reserving;
  
!     biop->scp = scp;			/* do not hold; held by caller */
      biop->offset = *offsetp;
      /* null out the list of buffers */
      biop->bufListp = biop->bufListEndp = NULL;
***************
*** 1100,1107 ****
              break;
          }
  
!         flags = CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_FETCHDATA
!             | CM_SCACHESYNC_BUFLOCKED;
          if (!isFirst) 
              flags |= CM_SCACHESYNC_NOWAIT;
  
--- 1110,1116 ----
              break;
          }
  
!         flags = CM_SCACHESYNC_FETCHDATA | CM_SCACHESYNC_BUFLOCKED;
          if (!isFirst) 
              flags |= CM_SCACHESYNC_NOWAIT;
  
***************
*** 1181,1187 ****
   */
  void cm_ReleaseBIOD(cm_bulkIO_t *biop, int isStore)
  {
!     cm_scache_t *scp;
      cm_buf_t *bufp;
      osi_queueData_t *qdp;
      osi_queueData_t *nqdp;
--- 1190,1196 ----
   */
  void cm_ReleaseBIOD(cm_bulkIO_t *biop, int isStore)
  {
!     cm_scache_t *scp;		/* do not release; not held in biop */
      cm_buf_t *bufp;
      osi_queueData_t *qdp;
      osi_queueData_t *nqdp;
***************
*** 1191,1231 ****
      if (biop->reserved)
          buf_UnreserveBuffers(cm_chunkSize / cm_data.buf_blockSize);
          
-     flags = CM_SCACHESYNC_NEEDCALLBACK;
      if (isStore)
!         flags |= CM_SCACHESYNC_STOREDATA;
      else
!         flags |= CM_SCACHESYNC_FETCHDATA;
  
      scp = biop->scp;
!     for(qdp = biop->bufListp; qdp; qdp = nqdp) {
!         /* lookup next guy first, since we're going to free this one */
!         nqdp = (osi_queueData_t *) osi_QNext(&qdp->q);
                  
!         /* extract buffer and free queue data */
!         bufp = osi_GetQData(qdp);
! 	osi_QRemoveHT((osi_queue_t **) &biop->bufListp,
! 		      (osi_queue_t **) &biop->bufListEndp,
! 		      &qdp->q);
!         osi_QDFree(qdp);
! 
!         /* now, mark I/O as done, unlock the buffer and release it */
!         lock_ObtainMutex(&bufp->mx);
!         lock_ObtainMutex(&scp->mx);
!         cm_SyncOpDone(scp, bufp, flags);
                  
!         /* turn off writing and wakeup users */
!         if (isStore) {
!             if (bufp->flags & CM_BUF_WAITING) {
!                 osi_Log2(afsd_logp, "cm_ReleaseBIOD Waking [scp 0x%p] bp 0x%p", scp, bufp);
!                 osi_Wakeup((LONG_PTR) bufp);
!             }
!             bufp->flags &= ~(CM_BUF_WRITING | CM_BUF_DIRTY);
!         }
! 
!         lock_ReleaseMutex(&scp->mx);
!         lock_ReleaseMutex(&bufp->mx);
!         buf_Release(bufp);
      }
  
      /* clean things out */
--- 1200,1246 ----
      if (biop->reserved)
          buf_UnreserveBuffers(cm_chunkSize / cm_data.buf_blockSize);
          
      if (isStore)
!         flags = CM_SCACHESYNC_STOREDATA;
      else
!         flags = CM_SCACHESYNC_FETCHDATA;
  
      scp = biop->scp;
!     if (biop->bufListp) {
! 	for(qdp = biop->bufListp; qdp; qdp = nqdp) {
! 	    /* lookup next guy first, since we're going to free this one */
! 	    nqdp = (osi_queueData_t *) osi_QNext(&qdp->q);
                  
! 	    /* extract buffer and free queue data */
! 	    bufp = osi_GetQData(qdp);
! 	    osi_QRemoveHT((osi_queue_t **) &biop->bufListp,
! 			   (osi_queue_t **) &biop->bufListEndp,
! 			   &qdp->q);
! 	    osi_QDFree(qdp);
! 
! 	    /* now, mark I/O as done, unlock the buffer and release it */
! 	    lock_ObtainMutex(&bufp->mx);
! 	    lock_ObtainMutex(&scp->mx);
! 	    cm_SyncOpDone(scp, bufp, flags);
                  
! 	    /* turn off writing and wakeup users */
! 	    if (isStore) {
! 		if (bufp->flags & CM_BUF_WAITING) {
! 		    osi_Log2(afsd_logp, "cm_ReleaseBIOD Waking [scp 0x%p] bp 0x%p", scp, bufp);
! 		    osi_Wakeup((LONG_PTR) bufp);
! 		}
! 		bufp->flags &= ~(CM_BUF_WRITING | CM_BUF_DIRTY);
! 	    }
! 
! 	    lock_ReleaseMutex(&scp->mx);
! 	    lock_ReleaseMutex(&bufp->mx);
! 	    buf_Release(bufp);
! 	    bufp = NULL;
! 	}
!     } else {
! 	lock_ObtainMutex(&scp->mx);
! 	cm_SyncOpDone(scp, NULL, flags);
! 	lock_ReleaseMutex(&scp->mx);
      }
  
      /* clean things out */
***************
*** 1411,1417 ****
                      nbytes_hi = ntohl(nbytes_hi);
                  } else {
                      nbytes_hi = 0;
! 					code = callp->error;
                      rx_EndCall(callp, code);
                      callp = NULL;
                  }
--- 1426,1432 ----
                      nbytes_hi = ntohl(nbytes_hi);
                  } else {
                      nbytes_hi = 0;
! 		    code = callp->error;
                      rx_EndCall(callp, code);
                      callp = NULL;
                  }
Index: openafs/src/WINNT/afsd/cm_dcache.h
diff -c openafs/src/WINNT/afsd/cm_dcache.h:1.4 openafs/src/WINNT/afsd/cm_dcache.h:1.4.4.1
*** openafs/src/WINNT/afsd/cm_dcache.h:1.4	Fri Nov 18 18:45:02 2005
--- openafs/src/WINNT/afsd/cm_dcache.h	Mon Oct  2 23:23:21 2006
***************
*** 42,51 ****
  extern long cm_SetupStoreBIOD(cm_scache_t *scp, osi_hyper_t *inOffsetp,
  	long inSize, cm_bulkIO_t *biop, cm_user_t *userp, cm_req_t *reqp);
  
! extern void cm_BkgPrefetch(cm_scache_t *scp, long p1, long p2, long p3, long p4,
  	struct cm_user *userp);
  
! extern void cm_BkgStore(cm_scache_t *scp, long p1, long p2, long p3, long p4,
  	struct cm_user *userp);
  
  extern void cm_ConsiderPrefetch(cm_scache_t *scp, osi_hyper_t *offsetp,
--- 42,51 ----
  extern long cm_SetupStoreBIOD(cm_scache_t *scp, osi_hyper_t *inOffsetp,
  	long inSize, cm_bulkIO_t *biop, cm_user_t *userp, cm_req_t *reqp);
  
! extern void cm_BkgPrefetch(cm_scache_t *scp, afs_uint32 p1, afs_uint32 p2, afs_uint32 p3, afs_uint32 p4,
  	struct cm_user *userp);
  
! extern void cm_BkgStore(cm_scache_t *scp, afs_uint32 p1, afs_uint32 p2, afs_uint32 p3, afs_uint32 p4,
  	struct cm_user *userp);
  
  extern void cm_ConsiderPrefetch(cm_scache_t *scp, osi_hyper_t *offsetp,
Index: openafs/src/WINNT/afsd/cm_dnlc.c
diff -c openafs/src/WINNT/afsd/cm_dnlc.c:1.10.4.1 openafs/src/WINNT/afsd/cm_dnlc.c:1.10.4.3
*** openafs/src/WINNT/afsd/cm_dnlc.c:1.10.4.1	Wed Sep  6 13:21:19 2006
--- openafs/src/WINNT/afsd/cm_dnlc.c	Sat Oct  7 18:33:29 2006
***************
*** 187,200 ****
      int safety, match;
    
      if (!cm_useDnlc)
! 	return 0;
      if ( cm_debugDnlc ) 
  	osi_Log2(afsd_logp, "cm_dnlcLookup dir %x name %s", 
  		adp, osi_LogSaveString(afsd_logp,aname));
  
      dnlcHash( ts, key );  /* leaves ts pointing at the NULL */
      if (ts - aname >= CM_AFSNCNAMESIZE) 
! 	return 0;
  
      skey = key & (NHSIZE -1);
  
--- 187,200 ----
      int safety, match;
    
      if (!cm_useDnlc)
! 	return NULL;
      if ( cm_debugDnlc ) 
  	osi_Log2(afsd_logp, "cm_dnlcLookup dir %x name %s", 
  		adp, osi_LogSaveString(afsd_logp,aname));
  
      dnlcHash( ts, key );  /* leaves ts pointing at the NULL */
      if (ts - aname >= CM_AFSNCNAMESIZE) 
! 	return NULL;
  
      skey = key & (NHSIZE -1);
  
***************
*** 203,209 ****
  
      ts = 0;
      tnc_begin = cm_data.nameHash[skey];
!     for ( tvc = (cm_scache_t *) 0, tnc = tnc_begin, safety=0; 
            tnc; tnc = tnc->next, safety++ ) 
      {
  	if (tnc->dirp == adp) 
--- 203,209 ----
  
      ts = 0;
      tnc_begin = cm_data.nameHash[skey];
!     for ( tvc = (cm_scache_t *) NULL, tnc = tnc_begin, safety=0; 
            tnc; tnc = tnc->next, safety++ ) 
      {
  	if (tnc->dirp == adp) 
***************
*** 264,270 ****
  	    if ( cm_debugDnlc ) 
  		osi_Log0(afsd_logp, "DNLC cycle"); 
  	    cm_dnlcPurge();
! 	    return(0);
  	}
      }
  
--- 264,270 ----
  	    if ( cm_debugDnlc ) 
  		osi_Log0(afsd_logp, "DNLC cycle"); 
  	    cm_dnlcPurge();
! 	    return(NULL);
  	}
      }
  
Index: openafs/src/WINNT/afsd/cm_ioctl.c
diff -c openafs/src/WINNT/afsd/cm_ioctl.c:1.73.2.4 openafs/src/WINNT/afsd/cm_ioctl.c:1.73.2.8
*** openafs/src/WINNT/afsd/cm_ioctl.c:1.73.2.4	Thu Jul 20 17:46:19 2006
--- openafs/src/WINNT/afsd/cm_ioctl.c	Mon Oct 16 20:21:36 2006
***************
*** 217,223 ****
  {
      long code;
  #ifndef AFSIFS
!     cm_scache_t *substRootp;
  #endif
      char * relativePath = ioctlp->inDatap;
  
--- 217,223 ----
  {
      long code;
  #ifndef AFSIFS
!     cm_scache_t *substRootp = NULL;
  #endif
      char * relativePath = ioctlp->inDatap;
  
***************
*** 241,248 ****
                       CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
                       userp, "", reqp, scpp);
  
!     if (code)
!         return code;
  #else /* AFSIFS */
      if (relativePath[0] == relativePath[1] &&
           relativePath[1] == '\\' && 
--- 241,250 ----
                       CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
                       userp, "", reqp, scpp);
  
!     if (code) {
! 	osi_Log1(afsd_logp,"cm_ParseIoctlPath code 0x%x", code);
! 	return code;
!     }
  #else /* AFSIFS */
      if (relativePath[0] == relativePath[1] &&
           relativePath[1] == '\\' && 
***************
*** 275,287 ****
                               CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
                               userp, sharePath, reqp, &substRootp);
              free(sharePath);
!             if (code) 
                  return code;
  
              code = cm_NameI(substRootp, p, CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
                               userp, NULL, reqp, scpp);
!             if (code) 
                  return code;
          } else {
              /* otherwise, treat the name as a cellname mounted off the afs root.
               * This requires that we reconstruct the shareName string with 
--- 277,294 ----
                               CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
                               userp, sharePath, reqp, &substRootp);
              free(sharePath);
!             if (code) {
! 		osi_Log1(afsd_logp,"cm_ParseIoctlPath [1] code 0x%x", code);
                  return code;
+ 	    }
  
              code = cm_NameI(substRootp, p, CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
                               userp, NULL, reqp, scpp);
! 	    cm_ReleaseSCache(substRootp);
!             if (code) {
! 		osi_Log1(afsd_logp,"cm_ParseIoctlPath [2] code 0x%x", code);
                  return code;
+ 	    }
          } else {
              /* otherwise, treat the name as a cellname mounted off the afs root.
               * This requires that we reconstruct the shareName string with 
***************
*** 303,327 ****
              code = cm_NameI(cm_data.rootSCachep, ioctlp->prefix->data,
                               CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
                               userp, shareName, reqp, &substRootp);
!             if (code) 
                  return code;
  
              code = cm_NameI(substRootp, p, CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
                              userp, NULL, reqp, scpp);
!             if (code) 
                  return code;
          }
      } else {
          code = cm_NameI(cm_data.rootSCachep, ioctlp->prefix->data,
                           CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
                           userp, ioctlp->tidPathp, reqp, &substRootp);
!         if (code) 
              return code;
          
          code = cm_NameI(substRootp, relativePath, CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
                           userp, NULL, reqp, scpp);
!         if (code) 
              return code;
      }
  #endif /* AFSIFS */
  
--- 310,344 ----
              code = cm_NameI(cm_data.rootSCachep, ioctlp->prefix->data,
                               CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
                               userp, shareName, reqp, &substRootp);
!             if (code) {
! 		osi_Log1(afsd_logp,"cm_ParseIoctlPath [3] code 0x%x", code);
                  return code;
+ 	    }
  
              code = cm_NameI(substRootp, p, CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
                              userp, NULL, reqp, scpp);
!             if (code) {
! 		cm_ReleaseSCache(substRootp);
! 		osi_Log1(afsd_logp,"cm_ParseIoctlPath code [4] 0x%x", code);
                  return code;
+ 	    }
          }
      } else {
          code = cm_NameI(cm_data.rootSCachep, ioctlp->prefix->data,
                           CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
                           userp, ioctlp->tidPathp, reqp, &substRootp);
!         if (code) {
! 	    osi_Log1(afsd_logp,"cm_ParseIoctlPath [6] code 0x%x", code);
              return code;
+ 	}
          
          code = cm_NameI(substRootp, relativePath, CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
                           userp, NULL, reqp, scpp);
!         if (code) {
! 	    cm_ReleaseSCache(substRootp);
! 	    osi_Log1(afsd_logp,"cm_ParseIoctlPath [7] code 0x%x", code);
              return code;
+ 	}
      }
  #endif /* AFSIFS */
  
***************
*** 332,338 ****
--- 349,359 ----
      /* This is usually nothing, but for StatMountPoint it is the file name. */
      TranslateExtendedChars(ioctlp->inDatap);
  
+     if (substRootp)
+ 	cm_ReleaseSCache(substRootp);
+ 
      /* and return success */
+     osi_Log1(afsd_logp,"cm_ParseIoctlPath [8] code 0x%x", code);
      return 0;
  }
  
***************
*** 393,399 ****
      long code;
      char tbuffer[1024];
      char *tp, *jp;
!     cm_scache_t *substRootp;
  
      StringCbCopyA(tbuffer, sizeof(tbuffer), ioctlp->inDatap);
      tp = strrchr(tbuffer, '\\');
--- 414,420 ----
      long code;
      char tbuffer[1024];
      char *tp, *jp;
!     cm_scache_t *substRootp = NULL;
  
      StringCbCopyA(tbuffer, sizeof(tbuffer), ioctlp->inDatap);
      tp = strrchr(tbuffer, '\\');
***************
*** 448,453 ****
--- 469,475 ----
  
              code = cm_NameI(substRootp, p, CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
                               userp, NULL, reqp, scpp);
+ 	    cm_ReleaseSCache(substRootp);
              if (code) return code;
          } else {
              /* otherwise, treat the name as a cellname mounted off the afs root.
***************
*** 473,478 ****
--- 495,501 ----
  
              code = cm_NameI(substRootp, p, CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
                              userp, NULL, reqp, scpp);
+ 	    cm_ReleaseSCache(substRootp);
              if (code) return code;
          }
      } else {
***************
*** 483,488 ****
--- 506,512 ----
  
          code = cm_NameI(substRootp, tbuffer, CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
                          userp, NULL, reqp, scpp);
+ 	cm_ReleaseSCache(substRootp);
          if (code) return code;
      }
  
***************
*** 1005,1011 ****
          
      /* if something went wrong, bail out now */
      if (code) {
!         goto done;
      }
          
      lock_ObtainMutex(&scp->mx);
--- 1029,1035 ----
          
      /* if something went wrong, bail out now */
      if (code) {
!         goto done2;
      }
          
      lock_ObtainMutex(&scp->mx);
***************
*** 1014,1020 ****
      if (code) {     
          lock_ReleaseMutex(&scp->mx);
          cm_ReleaseSCache(scp);
!         goto done;
      }
  
      /* now check that this is a real mount point */
--- 1038,1044 ----
      if (code) {     
          lock_ReleaseMutex(&scp->mx);
          cm_ReleaseSCache(scp);
!         goto done2;
      }
  
      /* now check that this is a real mount point */
***************
*** 1022,1028 ****
          lock_ReleaseMutex(&scp->mx);
          cm_ReleaseSCache(scp);
          code = CM_ERROR_INVAL;
!         goto done;
      }
  
      /* time to make the RPC, so drop the lock */
--- 1046,1052 ----
          lock_ReleaseMutex(&scp->mx);
          cm_ReleaseSCache(scp);
          code = CM_ERROR_INVAL;
!         goto done1;
      }
  
      /* time to make the RPC, so drop the lock */
***************
*** 1036,1042 ****
                            FILE_NOTIFY_CHANGE_DIR_NAME,
                            dscp, cp, NULL, TRUE);
  
!   done:
      cm_ReleaseSCache(dscp);
      return code;
  }
--- 1060,1071 ----
                            FILE_NOTIFY_CHANGE_DIR_NAME,
                            dscp, cp, NULL, TRUE);
  
!   done1:
!     lock_ObtainMutex(&scp->mx);
!     cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
!     lock_ReleaseMutex(&scp->mx);
! 
!   done2:
      cm_ReleaseSCache(dscp);
      return code;
  }
***************
*** 1660,1665 ****
--- 1689,1695 ----
          osi_Log0(afsd_logp,"IoctlCreateMountPoint within Freelance root dir");
          code = cm_FreelanceAddMount(leaf, fullCell, volume, 
                                      *ioctlp->inDatap == '%', NULL);
+ 	cm_ReleaseSCache(dscp);
          return code;
      }
  #endif
***************
*** 1718,1723 ****
--- 1748,1754 ----
          }
          osi_Log0(afsd_logp,"IoctlCreateSymlink within Freelance root dir");
          code = cm_FreelanceAddSymlink(leaf, cp, NULL);
+ 	cm_ReleaseSCache(dscp);
          return code;
      }
  #endif
***************
*** 1851,1856 ****
--- 1882,1888 ----
           * the freelance code to do the add. */
          osi_Log0(afsd_logp,"IoctlDeletelink from Freelance root dir");
          code = cm_FreelanceRemoveSymlink(cp);
+ 	cm_ReleaseSCache(dscp);
          return code;
      }
  #endif
***************
*** 1858,1889 ****
      code = cm_Lookup(dscp, cp, CM_FLAG_NOMOUNTCHASE, userp, &req, &scp);
          
      /* if something went wrong, bail out now */
!     if (code) {
!         goto done;
!     }
          
      lock_ObtainMutex(&scp->mx);
      code = cm_SyncOp(scp, NULL, userp, &req, 0,
                        CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
!     if (code) {     
!         lock_ReleaseMutex(&scp->mx);
!         cm_ReleaseSCache(scp);
!         goto done;
!     }
  	
      /* now check that this is a real symlink */
      if (scp->fileType != CM_SCACHETYPE_SYMLINK &&
          scp->fileType != CM_SCACHETYPE_DFSLINK &&
          scp->fileType != CM_SCACHETYPE_INVALID) {
-         lock_ReleaseMutex(&scp->mx);
-         cm_ReleaseSCache(scp);
          code = CM_ERROR_INVAL;
!         goto done;
      }
  	
      /* time to make the RPC, so drop the lock */
      lock_ReleaseMutex(&scp->mx);
-     cm_ReleaseSCache(scp);
          
      /* easier to do it this way */
      code = cm_Unlink(dscp, cp, userp, &req);
--- 1890,1914 ----
      code = cm_Lookup(dscp, cp, CM_FLAG_NOMOUNTCHASE, userp, &req, &scp);
          
      /* if something went wrong, bail out now */
!     if (code)
!         goto done3;
          
      lock_ObtainMutex(&scp->mx);
      code = cm_SyncOp(scp, NULL, userp, &req, 0,
                        CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
!     if (code)
!         goto done2;
  	
      /* now check that this is a real symlink */
      if (scp->fileType != CM_SCACHETYPE_SYMLINK &&
          scp->fileType != CM_SCACHETYPE_DFSLINK &&
          scp->fileType != CM_SCACHETYPE_INVALID) {
          code = CM_ERROR_INVAL;
!         goto done1;
      }
  	
      /* time to make the RPC, so drop the lock */
      lock_ReleaseMutex(&scp->mx);
          
      /* easier to do it this way */
      code = cm_Unlink(dscp, cp, userp, &req);
***************
*** 1893,1899 ****
                            | FILE_NOTIFY_CHANGE_DIR_NAME,
                            dscp, cp, NULL, TRUE);
  
!   done:
      cm_ReleaseSCache(dscp);
      return code;
  }
--- 1918,1932 ----
                            | FILE_NOTIFY_CHANGE_DIR_NAME,
                            dscp, cp, NULL, TRUE);
  
!     lock_ObtainMutex(&scp->mx);
!   done1:
!     cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
! 
!   done2:
!     lock_ReleaseMutex(&scp->mx);
!     cm_ReleaseSCache(scp);
! 
!   done3:
      cm_ReleaseSCache(dscp);
      return code;
  }
Index: openafs/src/WINNT/afsd/cm_scache.c
diff -c openafs/src/WINNT/afsd/cm_scache.c:1.35.2.13 openafs/src/WINNT/afsd/cm_scache.c:1.35.2.22
*** openafs/src/WINNT/afsd/cm_scache.c:1.35.2.13	Thu Jul 27 22:10:15 2006
--- openafs/src/WINNT/afsd/cm_scache.c	Mon Oct 16 20:32:57 2006
***************
*** 52,79 ****
          cm_data.scacheLRULastp = scp;
  }
  
! /* called with cm_scacheLock write-locked; recycles an existing scp. */
! long cm_RecycleSCache(cm_scache_t *scp, afs_int32 flags)
  {
      cm_scache_t **lscpp;
      cm_scache_t *tscp;
      int i;
! 
      if (scp->flags & CM_SCACHEFLAG_INHASH) {
  	/* hash it out first */
  	i = CM_SCACHE_HASH(&scp->fid);
  	for (lscpp = &cm_data.hashTablep[i], tscp = cm_data.hashTablep[i];
! 	      tscp;
! 	      lscpp = &tscp->nextp, tscp = tscp->nextp) {
  	    if (tscp == scp) {
  		*lscpp = scp->nextp;
  		scp->flags &= ~CM_SCACHEFLAG_INHASH;
  		break;
  	    }
  	}
- 	osi_assertx(tscp, "afsd: scache hash screwup");
      }
  
      if (flags & CM_SCACHE_RECYCLEFLAG_DESTROY_BUFFERS) {
  	osi_queueData_t *qdp;
  	cm_buf_t *bufp;
--- 52,100 ----
          cm_data.scacheLRULastp = scp;
  }
  
! /* call with scache write-locked and mutex held */
! void cm_RemoveSCacheFromHashTable(cm_scache_t *scp)
  {
      cm_scache_t **lscpp;
      cm_scache_t *tscp;
      int i;
! 	
      if (scp->flags & CM_SCACHEFLAG_INHASH) {
  	/* hash it out first */
  	i = CM_SCACHE_HASH(&scp->fid);
  	for (lscpp = &cm_data.hashTablep[i], tscp = cm_data.hashTablep[i];
! 	     tscp;
! 	     lscpp = &tscp->nextp, tscp = tscp->nextp) {
  	    if (tscp == scp) {
  		*lscpp = scp->nextp;
  		scp->flags &= ~CM_SCACHEFLAG_INHASH;
  		break;
  	    }
  	}
      }
+ }
  
+ /* called with cm_scacheLock write-locked; recycles an existing scp. 
+  *
+  * this function ignores all of the locking hierarchy.  
+  */
+ long cm_RecycleSCache(cm_scache_t *scp, afs_int32 flags)
+ {
+     if (scp->refCount != 0) {
+ 	return -1;
+     }
+ 
+     if (scp->flags & CM_SCACHEFLAG_SMB_FID) {
+ 	osi_Log1(afsd_logp,"cm_RecycleSCache CM_SCACHEFLAG_SMB_FID detected scp 0x%p", scp);
+ #ifdef DEBUG
+ 	osi_panic("cm_RecycleSCache CM_SCACHEFLAG_SMB_FID detected",__FILE__,__LINE__);
+ #endif
+ 	return -1;
+     }
+ 
+     cm_RemoveSCacheFromHashTable(scp);
+ 
+ #if 0
      if (flags & CM_SCACHE_RECYCLEFLAG_DESTROY_BUFFERS) {
  	osi_queueData_t *qdp;
  	cm_buf_t *bufp;
***************
*** 86,91 ****
--- 107,114 ----
  		lock_ObtainMutex(&bufp->mx);
  		bufp->cmFlags &= ~CM_BUF_CMSTORING;
  		bufp->flags &= ~CM_BUF_DIRTY;
+ 		bufp->flags |= CM_BUF_ERROR;
+ 		bufp->error = VNOVNODE;
  		bufp->dataVersion = -1; /* bad */
  		bufp->dirtyCounter++;
  		if (bufp->flags & CM_BUF_WAITING) {
***************
*** 104,109 ****
--- 127,134 ----
  		lock_ObtainMutex(&bufp->mx);
  		bufp->cmFlags &= ~CM_BUF_CMFETCHING;
  		bufp->flags &= ~CM_BUF_DIRTY;
+ 		bufp->flags |= CM_BUF_ERROR;
+ 		bufp->error = VNOVNODE;
  		bufp->dataVersion = -1; /* bad */
  		bufp->dirtyCounter++;
  		if (bufp->flags & CM_BUF_WAITING) {
***************
*** 114,132 ****
  		buf_Release(bufp);
  	    }
          }
      } else {
  	/* look for things that shouldn't still be set */
  	osi_assert(scp->bufWritesp == NULL);
  	osi_assert(scp->bufReadsp == NULL);
      }
  
      /* invalidate so next merge works fine;
       * also initialize some flags */
      scp->flags &= ~(CM_SCACHEFLAG_STATD
  		     | CM_SCACHEFLAG_RO
  		     | CM_SCACHEFLAG_PURERO
  		     | CM_SCACHEFLAG_OVERQUOTA
! 		     | CM_SCACHEFLAG_OUTOFSPACE);
      scp->serverModTime = 0;
      scp->dataVersion = 0;
      scp->bulkStatProgress = hzero;
--- 139,161 ----
  		buf_Release(bufp);
  	    }
          }
+ 	buf_CleanDirtyBuffers(scp); 
      } else {
  	/* look for things that shouldn't still be set */
  	osi_assert(scp->bufWritesp == NULL);
  	osi_assert(scp->bufReadsp == NULL);
      }
+ #endif
  
      /* invalidate so next merge works fine;
       * also initialize some flags */
      scp->flags &= ~(CM_SCACHEFLAG_STATD
+ 		     | CM_SCACHEFLAG_DELETED
  		     | CM_SCACHEFLAG_RO
  		     | CM_SCACHEFLAG_PURERO
  		     | CM_SCACHEFLAG_OVERQUOTA
! 		     | CM_SCACHEFLAG_OUTOFSPACE
! 		     | CM_SCACHEFLAG_EACCESS);
      scp->serverModTime = 0;
      scp->dataVersion = 0;
      scp->bulkStatProgress = hzero;
***************
*** 174,180 ****
       * while we hold the global refcount lock.
       */
      cm_FreeAllACLEnts(scp);
- 
      return 0;
  }
  
--- 203,208 ----
***************
*** 185,218 ****
  cm_scache_t *cm_GetNewSCache(void)
  {
      cm_scache_t *scp;
  
!   start:
!     if (cm_data.currentSCaches >= cm_data.maxSCaches) {
!         for (scp = cm_data.scacheLRULastp;
!               scp;
!               scp = (cm_scache_t *) osi_QPrev(&scp->q)) {
!             if (scp->refCount == 0) 
!                 break;
!         }
!                 
!         if (scp) {
!             osi_assert(scp >= cm_data.scacheBaseAddress && scp < (cm_scache_t *)cm_data.hashTablep);
  
! 	    if (!cm_RecycleSCache(scp, 0)) {
! 	    
  		/* we found an entry, so return it */
  		/* now remove from the LRU queue and put it back at the
! 		 * head of the LRU queue.
! 		 */
  		cm_AdjustLRU(scp);
  
  		/* and we're done */
  		return scp;
- 	    } else {
- 		/* We don't like this entry, choose another one. */
- 		goto start;
  	    }
!         }
      }
          
      /* if we get here, we should allocate a new scache entry.  We either are below
--- 213,289 ----
  cm_scache_t *cm_GetNewSCache(void)
  {
      cm_scache_t *scp;
+     int retry = 0;
  
! #if 0
!     /* first pass - look for deleted objects */
!     for ( scp = cm_data.scacheLRULastp;
! 	  scp;
! 	  scp = (cm_scache_t *) osi_QPrev(&scp->q)) 
!     {
! 	osi_assert(scp >= cm_data.scacheBaseAddress && scp < (cm_scache_t *)cm_data.hashTablep);
  
! 	if (scp->refCount == 0) {
! 	    if (scp->flags & CM_SCACHEFLAG_DELETED) {
! 		osi_Log1(afsd_logp, "GetNewSCache attempting to recycle deleted scp 0x%x", scp);
! 		if (!cm_RecycleSCache(scp, CM_SCACHE_RECYCLEFLAG_DESTROY_BUFFERS)) {
! 
! 		    /* we found an entry, so return it */
! 		    /* now remove from the LRU queue and put it back at the
! 		     * head of the LRU queue.
! 		     */
! 		    cm_AdjustLRU(scp);
! 
! 		    /* and we're done */
! 		    return scp;
! 		} 
! 		osi_Log1(afsd_logp, "GetNewSCache recycled failed scp 0x%x", scp);
! 	    } else if (!(scp->flags & CM_SCACHEFLAG_INHASH)) {
  		/* we found an entry, so return it */
  		/* now remove from the LRU queue and put it back at the
! 		* head of the LRU queue.
! 		*/
  		cm_AdjustLRU(scp);
  
  		/* and we're done */
  		return scp;
  	    }
! 	}	
!     }	
!     osi_Log0(afsd_logp, "GetNewSCache no deleted or recycled entries available for reuse");
! #endif 
! 
!     if (cm_data.currentSCaches >= cm_data.maxSCaches) {
! 	/* There were no deleted scache objects that we could use.  Try to find
! 	 * one that simply hasn't been used in a while.
! 	 */
! 	    for ( scp = cm_data.scacheLRULastp;
! 		  scp;
! 		  scp = (cm_scache_t *) osi_QPrev(&scp->q)) 
! 	    {
! 		/* It is possible for the refCount to be zero and for there still
! 		 * to be outstanding dirty buffers.  If there are dirty buffers,
! 		 * we must not recycle the scp. */
! 		if (scp->refCount == 0 && scp->bufReadsp == NULL && scp->bufWritesp == NULL) {
! 		    if (!buf_DirtyBuffersExist(&scp->fid)) {
! 			if (!cm_RecycleSCache(scp, 0)) {
! 			    /* we found an entry, so return it */
! 			    /* now remove from the LRU queue and put it back at the
! 			     * head of the LRU queue.
! 			     */
! 			    cm_AdjustLRU(scp);
! 
! 			    /* and we're done */
! 			    return scp;
! 			}
! 		    } else {
! 			osi_Log1(afsd_logp,"GetNewSCache dirty buffers exist scp 0x%x", scp);
! 		    }
! 		}	
! 	    }
! 	    osi_Log1(afsd_logp, "GetNewSCache all scache entries in use (retry = %d)", retry);
! 	    
! 		return NULL;
      }
          
      /* if we get here, we should allocate a new scache entry.  We either are below
***************
*** 445,452 ****
      cm_scache_t *scp;
  
      hash = CM_SCACHE_HASH(fidp);
!         
!     osi_assert(fidp->cell != 0);
  
      lock_ObtainWrite(&cm_scacheLock);
      for (scp=cm_data.hashTablep[hash]; scp; scp=scp->nextp) {
--- 516,525 ----
      cm_scache_t *scp;
  
      hash = CM_SCACHE_HASH(fidp);
! 
!     if (fidp->cell == 0) {
! 	return NULL;
!     }
  
      lock_ObtainWrite(&cm_scacheLock);
      for (scp=cm_data.hashTablep[hash]; scp; scp=scp->nextp) {
***************
*** 461,468 ****
--- 534,546 ----
      return NULL;
  }
  
+ #ifdef DEBUG_REFCOUNT
+ long cm_GetSCacheDbg(cm_fid_t *fidp, cm_scache_t **outScpp, cm_user_t *userp,
+                   cm_req_t *reqp, char * file, long line)
+ #else
  long cm_GetSCache(cm_fid_t *fidp, cm_scache_t **outScpp, cm_user_t *userp,
                    cm_req_t *reqp)
+ #endif
  {
      long hash;
      cm_scache_t *scp;
***************
*** 482,488 ****
           fidp->volume==cm_data.rootFid.volume &&
           fidp->vnode==0x0 && fidp->unique==0x0)
      {
!         osi_Log0(afsd_logp,"cm_getSCache called with root cell/volume and vnode=0 and unique=0");
      }
  
      // yj: check if we have the scp, if so, we don't need
--- 560,566 ----
           fidp->volume==cm_data.rootFid.volume &&
           fidp->vnode==0x0 && fidp->unique==0x0)
      {
!         osi_Log0(afsd_logp,"cm_GetSCache called with root cell/volume and vnode=0 and unique=0");
      }
  
      // yj: check if we have the scp, if so, we don't need
***************
*** 490,495 ****
--- 568,577 ----
      lock_ObtainWrite(&cm_scacheLock);
      for (scp=cm_data.hashTablep[hash]; scp; scp=scp->nextp) {
          if (cm_FidCmp(fidp, &scp->fid) == 0) {
+ #ifdef DEBUG_REFCOUNT
+ 	    afsi_log("%s:%d cm_GetSCache (1) outScpp 0x%p ref %d", file, line, scp, scp->refCount);
+ 	    osi_Log1(afsd_logp,"cm_GetSCache (1) outScpp 0x%p", scp);
+ #endif
              cm_HoldSCacheNoLock(scp);
              *outScpp = scp;
              cm_AdjustLRU(scp);
***************
*** 514,520 ****
                fidp->volume==AFS_FAKE_ROOT_VOL_ID &&
                fidp->vnode==0x1 && fidp->unique==0x1);
      if (cm_freelanceEnabled && isRoot) {
!         osi_Log0(afsd_logp,"cm_getSCache Freelance and isRoot");
          /* freelance: if we are trying to get the root scp for the first
           * time, we will just put in a place holder entry. 
           */
--- 596,602 ----
                fidp->volume==AFS_FAKE_ROOT_VOL_ID &&
                fidp->vnode==0x1 && fidp->unique==0x1);
      if (cm_freelanceEnabled && isRoot) {
!         osi_Log0(afsd_logp,"cm_GetSCache Freelance and isRoot");
          /* freelance: if we are trying to get the root scp for the first
           * time, we will just put in a place holder entry. 
           */
***************
*** 522,528 ****
      }
  	  
      if (cm_freelanceEnabled && special) {
!         osi_Log0(afsd_logp,"cm_getSCache Freelance and special");
          if (fidp->vnode > 1 && fidp->vnode <= cm_noLocalMountPoints + 2) {
  	    lock_ObtainMutex(&cm_Freelance_Lock);
              mp =(cm_localMountPoints+fidp->vnode-2)->mountPointStringp;
--- 604,610 ----
      }
  	  
      if (cm_freelanceEnabled && special) {
!         osi_Log0(afsd_logp,"cm_GetSCache Freelance and special");
          if (fidp->vnode > 1 && fidp->vnode <= cm_noLocalMountPoints + 2) {
  	    lock_ObtainMutex(&cm_Freelance_Lock);
              mp =(cm_localMountPoints+fidp->vnode-2)->mountPointStringp;
***************
*** 531,538 ****
              mp = "";
          }
          scp = cm_GetNewSCache();
! 	  
  	lock_ObtainMutex(&scp->mx);
          scp->fid = *fidp;
          scp->volp = cm_data.rootSCachep->volp;
          scp->dotdotFid.cell=AFS_FAKE_ROOT_CELL_ID;
--- 613,634 ----
              mp = "";
          }
          scp = cm_GetNewSCache();
! 	if (scp == NULL) {
! 	    osi_Log0(afsd_logp,"cm_GetSCache unable to obtain *new* scache entry");
!             lock_ReleaseWrite(&cm_scacheLock);
! 	    return CM_ERROR_WOULDBLOCK;
! 	}
! 
! #if not_too_dangerous
! 	/* dropping the cm_scacheLock allows more than one thread
! 	 * to obtain the same cm_scache_t from the LRU list.  Since
! 	 * the refCount is known to be zero at this point we have to
! 	 * assume that no one else is using the one this is returned.
! 	 */
! 	lock_ReleaseWrite(&cm_scacheLock);
  	lock_ObtainMutex(&scp->mx);
+ 	lock_ObtainWrite(&cm_scacheLock);
+ #endif
          scp->fid = *fidp;
          scp->volp = cm_data.rootSCachep->volp;
          scp->dotdotFid.cell=AFS_FAKE_ROOT_CELL_ID;
***************
*** 544,549 ****
--- 640,646 ----
          cm_data.hashTablep[hash]=scp;
          scp->flags |= CM_SCACHEFLAG_INHASH;
          scp->refCount = 1;
+ 	osi_Log1(afsd_logp,"cm_GetSCache (freelance) sets refCount to 1 scp 0x%x", scp);
          if (fidp->vnode > 1 && fidp->vnode <= cm_noLocalMountPoints + 2)
              scp->fileType = (cm_localMountPoints+fidp->vnode-2)->fileType;
          else 
***************
*** 565,573 ****
          scp->group=0;
          scp->dataVersion=cm_data.fakeDirVersion;
          scp->lockDataVersion=-1; /* no lock yet */
  	lock_ReleaseMutex(&scp->mx);
!         *outScpp = scp;
          lock_ReleaseWrite(&cm_scacheLock);
          return 0;
      }
      // end of yj code
--- 662,676 ----
          scp->group=0;
          scp->dataVersion=cm_data.fakeDirVersion;
          scp->lockDataVersion=-1; /* no lock yet */
+ #if not_too_dangerous
  	lock_ReleaseMutex(&scp->mx);
! #endif
! 	*outScpp = scp;
          lock_ReleaseWrite(&cm_scacheLock);
+ #ifdef DEBUG_REFCOUNT
+ 	afsi_log("%s:%d cm_GetSCache (2) outScpp 0x%p ref %d", file, line, scp, scp->refCount);
+ 	osi_Log1(afsd_logp,"cm_GetSCache (2) outScpp 0x%p", scp);
+ #endif
          return 0;
      }
      // end of yj code
***************
*** 591,596 ****
--- 694,703 ----
       */
      for (scp=cm_data.hashTablep[hash]; scp; scp=scp->nextp) {
          if (cm_FidCmp(fidp, &scp->fid) == 0) {
+ #ifdef DEBUG_REFCOUNT
+ 	    afsi_log("%s:%d cm_GetSCache (3) outScpp 0x%p ref %d", file, line, scp, scp->refCount);
+ 	    osi_Log1(afsd_logp,"cm_GetSCache (3) outScpp 0x%p", scp);
+ #endif
              cm_HoldSCacheNoLock(scp);
              osi_assert(scp->volp == volp);
              cm_AdjustLRU(scp);
***************
*** 604,611 ****
--- 711,735 ----
          
      /* now, if we don't have the fid, recycle something */
      scp = cm_GetNewSCache();
+     if (scp == NULL) {
+ 	osi_Log0(afsd_logp,"cm_GetNewSCache unable to obtain *new* scache entry");
+ 	lock_ReleaseWrite(&cm_scacheLock);
+ 	return CM_ERROR_WOULDBLOCK;
+     }
+     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
+      * to obtain the same cm_scache_t from the LRU list.  Since
+      * the refCount is known to be zero at this point we have to
+      * assume that no one else is using the one this is returned.
+      */
+     lock_ReleaseWrite(&cm_scacheLock);
      lock_ObtainMutex(&scp->mx);
+     lock_ObtainWrite(&cm_scacheLock);
+ #endif
      scp->fid = *fidp;
      scp->volp = volp;	/* a held reference */
  
***************
*** 627,633 ****
--- 751,760 ----
      cm_data.hashTablep[hash] = scp;
      scp->flags |= CM_SCACHEFLAG_INHASH;
      scp->refCount = 1;
+     osi_Log1(afsd_logp,"cm_GetSCache sets refCount to 1 scp 0x%x", scp);
+ #if not_too_dangerous
      lock_ReleaseMutex(&scp->mx);
+ #endif
  
      /* XXX - The following fields in the cm_scache are 
       * uninitialized:
***************
*** 639,644 ****
--- 766,775 ----
          
      /* now we have a held scache entry; just return it */
      *outScpp = scp;
+ #ifdef DEBUG_REFCOUNT
+     afsi_log("%s:%d cm_GetSCache (4) outScpp 0x%p ref %d", file, line, scp, scp->refCount);
+     osi_Log1(afsd_logp,"cm_GetSCache (4) outScpp 0x%p", scp);
+ #endif
      return 0;
  }
  
***************
*** 651,672 ****
      cm_fid_t    parent_fid;
      cm_scache_t * pscp = NULL;
  
!     lock_ObtainWrite(&cm_scacheLock);
      parent_fid = scp->fid;
      parent_fid.vnode = scp->parentVnode;
      parent_fid.unique = scp->parentUnique;
  
      if (cm_FidCmp(&scp->fid, &parent_fid)) {
! 	for (i=0; i<cm_data.hashTableSize; i++) {
! 	    for (pscp = cm_data.hashTablep[i]; pscp; pscp = pscp->nextp) {
! 		if (!cm_FidCmp(&pscp->fid, &parent_fid)) {
! 		    cm_HoldSCacheNoLock(pscp);
! 		    break;
! 		}
  	    }
  	}
      }
!     lock_ReleaseWrite(&cm_scacheLock);
  
      return pscp;
  }
--- 782,803 ----
      cm_fid_t    parent_fid;
      cm_scache_t * pscp = NULL;
  
!     lock_ObtainRead(&cm_scacheLock);
      parent_fid = scp->fid;
      parent_fid.vnode = scp->parentVnode;
      parent_fid.unique = scp->parentUnique;
  
      if (cm_FidCmp(&scp->fid, &parent_fid)) {
! 	i = CM_SCACHE_HASH(&parent_fid);
! 	for (pscp = cm_data.hashTablep[i]; pscp; pscp = pscp->nextp) {
! 	    if (!cm_FidCmp(&pscp->fid, &parent_fid)) {
! 		cm_HoldSCacheNoLock(pscp);
! 		break;
  	    }
  	}
      }
! 
!     lock_ReleaseRead(&cm_scacheLock);
  
      return pscp;
  }
***************
*** 734,755 ****
      cm_buf_t *tbufp;
      afs_uint32 outRights;
      int bufLocked;
  
      /* lookup this first */
      bufLocked = flags & CM_SCACHESYNC_BUFLOCKED;
  
!     /* some minor assertions */
!     if (flags & (CM_SCACHESYNC_STOREDATA | CM_SCACHESYNC_FETCHDATA
!                   | CM_SCACHESYNC_READ | CM_SCACHESYNC_WRITE
!                   | CM_SCACHESYNC_SETSIZE)) {
!         if (bufp) {
!             osi_assert(bufp->refCount > 0);
!             /*
!                osi_assert(cm_FidCmp(&bufp->fid, &scp->fid) == 0);
!              */
!         }
!     }
!     else osi_assert(bufp == NULL);
  
      /* Do the access check.  Now we don't really do the access check
       * atomically, since the caller doesn't expect the parent dir to be
--- 865,880 ----
      cm_buf_t *tbufp;
      afs_uint32 outRights;
      int bufLocked;
+     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
       * atomically, since the caller doesn't expect the parent dir to be
***************
*** 900,906 ****
          // yj: modified this so that callback only checked if we're
          // not checking something on /afs
          /* fix the conditional to match the one in cm_HaveCallback */
!         if (  (flags & CM_SCACHESYNC_NEEDCALLBACK)
  #ifdef AFS_FREELANCE_CLIENT
               && (!cm_freelanceEnabled || 
                    !(scp->fid.vnode==0x1 && scp->fid.unique==0x1) ||
--- 1025,1031 ----
          // yj: modified this so that callback only checked if we're
          // not checking something on /afs
          /* fix the conditional to match the one in cm_HaveCallback */
!         if ((flags & CM_SCACHESYNC_NEEDCALLBACK)
  #ifdef AFS_FREELANCE_CLIENT
               && (!cm_freelanceEnabled || 
                    !(scp->fid.vnode==0x1 && scp->fid.unique==0x1) ||
***************
*** 909,920 ****
                    cm_fakeDirCallback < 2)
  #endif /* AFS_FREELANCE_CLIENT */
               ) {
!             if (!cm_HaveCallback(scp)) {
                  osi_Log1(afsd_logp, "CM SyncOp getting callback on scp 0x%p",
                            scp);
                  if (bufLocked) 
  		    lock_ReleaseMutex(&bufp->mx);
!                 code = cm_GetCallback(scp, userp, reqp, 0);
                  if (bufLocked) {
                      lock_ReleaseMutex(&scp->mx);
                      lock_ObtainMutex(&bufp->mx);
--- 1034,1045 ----
                    cm_fakeDirCallback < 2)
  #endif /* AFS_FREELANCE_CLIENT */
               ) {
!             if ((flags & CM_SCACHESYNC_FORCECB) || !cm_HaveCallback(scp)) {
                  osi_Log1(afsd_logp, "CM SyncOp getting callback on scp 0x%p",
                            scp);
                  if (bufLocked) 
  		    lock_ReleaseMutex(&bufp->mx);
!                 code = cm_GetCallback(scp, userp, reqp, (flags & CM_SCACHESYNC_FORCECB)?1:0);
                  if (bufLocked) {
                      lock_ReleaseMutex(&scp->mx);
                      lock_ObtainMutex(&bufp->mx);
***************
*** 922,927 ****
--- 1047,1053 ----
                  }
                  if (code) 
                      return code;
+ 		flags &= ~CM_SCACHESYNC_FORCECB;	/* only force once */
                  continue;
              }
          }
***************
*** 962,967 ****
--- 1088,1097 ----
          if (flags & CM_SCACHESYNC_NOWAIT) 
              return CM_ERROR_WOULDBLOCK;
  
+ 	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);
+ 
          /* wait here, then try again */
          osi_Log1(afsd_logp, "CM SyncOp sleeping scp 0x%p", scp);
          if ( scp->flags & CM_SCACHEFLAG_WAITING ) {
***************
*** 1059,1064 ****
--- 1189,1196 ----
      osi_queueData_t *qdp;
      cm_buf_t *tbufp;
  
+     lock_AssertMutex(&scp->mx);
+ 
      /* now, update the recorded state for RPC-type calls */
      if (flags & CM_SCACHESYNC_FETCHSTATUS)
          scp->flags &= ~CM_SCACHEFLAG_FETCHING;
***************
*** 1088,1099 ****
  	    osi_QDFree(qdp);
  	}
          if (bufp) {
              bufp->cmFlags &= ~(CM_BUF_CMFETCHING | CM_BUF_CMFULLYFETCHED);
              if (bufp->flags & CM_BUF_WAITING) {
                  osi_Log2(afsd_logp, "CM SyncOpDone Waking [scp 0x%p] bufp 0x%p", scp, bufp);
                  osi_Wakeup((LONG_PTR) &bufp);
              }
!             buf_Release(bufp);
          }
      }
  
--- 1220,1235 ----
  	    osi_QDFree(qdp);
  	}
          if (bufp) {
+ 	    int release = 0;
+ 	    if (bufp->cmFlags & CM_BUF_CMFETCHING)
+ 		release = 1;
              bufp->cmFlags &= ~(CM_BUF_CMFETCHING | CM_BUF_CMFULLYFETCHED);
              if (bufp->flags & CM_BUF_WAITING) {
                  osi_Log2(afsd_logp, "CM SyncOpDone Waking [scp 0x%p] bufp 0x%p", scp, bufp);
                  osi_Wakeup((LONG_PTR) &bufp);
              }
! 	    if (release)
! 		buf_Release(bufp);
          }
      }
  
***************
*** 1110,1121 ****
  	    osi_QDFree(qdp);
  	}
          if (bufp) {
              bufp->cmFlags &= ~CM_BUF_CMSTORING;
              if (bufp->flags & CM_BUF_WAITING) {
                  osi_Log2(afsd_logp, "CM SyncOpDone Waking [scp 0x%p] bufp 0x%p", scp, bufp);
                  osi_Wakeup((LONG_PTR) &bufp);
              }
!             buf_Release(bufp);
          }
      }
  
--- 1246,1261 ----
  	    osi_QDFree(qdp);
  	}
          if (bufp) {
+ 	    int release = 0;
+ 	    if (bufp->cmFlags & CM_BUF_CMSTORING)
+ 		release = 1;
              bufp->cmFlags &= ~CM_BUF_CMSTORING;
              if (bufp->flags & CM_BUF_WAITING) {
                  osi_Log2(afsd_logp, "CM SyncOpDone Waking [scp 0x%p] bufp 0x%p", scp, bufp);
                  osi_Wakeup((LONG_PTR) &bufp);
              }
! 	    if (release)
! 		buf_Release(bufp);
          }
      }
  
***************
*** 1305,1338 ****
      afsFidp->Unique = fidp->unique;
  }       
  
  void cm_HoldSCacheNoLock(cm_scache_t *scp)
  {
      osi_assert(scp != 0);
-     osi_assert(scp->refCount >= 0);
      scp->refCount++;
  }
  
  void cm_HoldSCache(cm_scache_t *scp)
  {
      osi_assert(scp != 0);
      lock_ObtainWrite(&cm_scacheLock);
-     osi_assert(scp->refCount >= 0);
      scp->refCount++;
      lock_ReleaseWrite(&cm_scacheLock);
  }
  
  void cm_ReleaseSCacheNoLock(cm_scache_t *scp)
  {
!     osi_assert(scp != 0);
      osi_assert(scp->refCount-- >= 0);
  }
  
  void cm_ReleaseSCache(cm_scache_t *scp)
  {
!     osi_assert(scp != 0);
      lock_ObtainWrite(&cm_scacheLock);
      osi_assert(scp->refCount != 0);
      scp->refCount--;
      lock_ReleaseWrite(&cm_scacheLock);
  }
  
--- 1445,1512 ----
      afsFidp->Unique = fidp->unique;
  }       
  
+ #ifdef DEBUG_REFCOUNT
+ void cm_HoldSCacheNoLockDbg(cm_scache_t *scp, char * file, long line)
+ #else
  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);
+     afsi_log("%s:%d cm_HoldSCacheNoLock scp 0x%p, ref %d", file, line, scp, scp->refCount);
+ #endif
  }
  
+ #ifdef DEBUG_REFCOUNT
+ void cm_HoldSCacheDbg(cm_scache_t *scp, char * file, long line)
+ #else
  void cm_HoldSCache(cm_scache_t *scp)
+ #endif
  {
      osi_assert(scp != 0);
      lock_ObtainWrite(&cm_scacheLock);
      scp->refCount++;
+ #ifdef DEBUG_REFCOUNT
+     osi_Log2(afsd_logp,"cm_HoldSCache scp 0x%p ref %d",scp, scp->refCount);
+     afsi_log("%s:%d cm_HoldSCache scp 0x%p ref %d", file, line, scp, scp->refCount);
+ #endif
      lock_ReleaseWrite(&cm_scacheLock);
  }
  
+ #ifdef DEBUG_REFCOUNT
+ void cm_ReleaseSCacheNoLockDbg(cm_scache_t *scp, char * file, long line)
+ #else
  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);
+ #endif
  }
  
+ #ifdef DEBUG_REFCOUNT
+ void cm_ReleaseSCacheDbg(cm_scache_t *scp, char * file, long line)
+ #else
  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);
+     afsi_log("%s:%d cm_ReleaseSCache scp 0x%p ref %d", file, line, scp, scp->refCount);
+ #endif
      lock_ReleaseWrite(&cm_scacheLock);
  }
  
Index: openafs/src/WINNT/afsd/cm_scache.h
diff -c openafs/src/WINNT/afsd/cm_scache.h:1.21.2.3 openafs/src/WINNT/afsd/cm_scache.h:1.21.2.8
*** openafs/src/WINNT/afsd/cm_scache.h:1.21.2.3	Wed Jun 28 11:01:21 2006
--- openafs/src/WINNT/afsd/cm_scache.h	Mon Oct 16 20:32:57 2006
***************
*** 246,251 ****
--- 246,252 ----
  			(CM_SCACHEFLAG_WATCHED | CM_SCACHEFLAG_WATCHEDSUBTREE)
  
  #define CM_SCACHEFLAG_EACCESS           0x200000 /* Bulk Stat returned EACCES */
+ #define CM_SCACHEFLAG_SMB_FID	        0x400000
  
  /* sync flags for calls to the server.  The CM_SCACHEFLAG_FETCHING,
   * CM_SCACHEFLAG_STORING and CM_SCACHEFLAG_SIZESTORING flags correspond to the
***************
*** 280,285 ****
--- 281,288 ----
  #define CM_SCACHESYNC_BUFLOCKED		0x80000	/* the buffer is locked */
  #define CM_SCACHESYNC_NOWAIT		0x100000/* don't wait for the state,
  						 * just fail */
+ #define CM_SCACHESYNC_FORCECB		0x200000/* when calling cm_GetCallback()
+                                                  * set the force flag */
  
  /* flags for cm_RecycleSCache	*/
  #define CM_SCACHE_RECYCLEFLAG_DESTROY_BUFFERS 	0x1
***************
*** 305,314 ****
  
  extern void cm_InitSCache(int, long);
  
  extern long cm_GetSCache(cm_fid_t *, cm_scache_t **, struct cm_user *,
  	struct cm_req *);
! 
! extern void cm_PutSCache(cm_scache_t *);
  
  extern cm_scache_t *cm_GetNewSCache(void);
  
--- 308,322 ----
  
  extern void cm_InitSCache(int, long);
  
+ #ifdef DEBUG_REFCOUNT
+ extern long cm_GetSCacheDbg(cm_fid_t *, cm_scache_t **, struct cm_user *,
+ 	struct cm_req *, char *, long);
+ 
+ #define cm_GetSCache(a,b,c,d)  cm_GetSCacheDbg(a,b,c,d,__FILE__,__LINE__)
+ #else
  extern long cm_GetSCache(cm_fid_t *, cm_scache_t **, struct cm_user *,
  	struct cm_req *);
! #endif
  
  extern cm_scache_t *cm_GetNewSCache(void);
  
***************
*** 324,329 ****
--- 332,351 ----
  
  extern void cm_AFSFidFromFid(struct AFSFid *, cm_fid_t *);
  
+ #ifdef DEBUG_REFCOUNT
+ extern void cm_HoldSCacheNoLockDbg(cm_scache_t *, char *, long);
+ 
+ extern void cm_HoldSCacheDbg(cm_scache_t *, char *, long);
+ 
+ extern void cm_ReleaseSCacheNoLockDbg(cm_scache_t *, char *, long);
+ 
+ extern void cm_ReleaseSCacheDbg(cm_scache_t *, char *, long);
+ 
+ #define cm_HoldSCacheNoLock(scp)    cm_HoldSCacheNoLockDbg(scp, __FILE__, __LINE__)
+ #define cm_HoldSCache(scp)          cm_HoldSCacheDbg(scp, __FILE__, __LINE__)
+ #define cm_ReleaseSCacheNoLock(scp) cm_ReleaseSCacheNoLockDbg(scp, __FILE__, __LINE__)
+ #define cm_ReleaseSCache(scp)       cm_ReleaseSCacheDbg(scp, __FILE__, __LINE__)
+ #else
  extern void cm_HoldSCacheNoLock(cm_scache_t *);
  
  extern void cm_HoldSCache(cm_scache_t *);
***************
*** 331,337 ****
  extern void cm_ReleaseSCacheNoLock(cm_scache_t *);
  
  extern void cm_ReleaseSCache(cm_scache_t *);
! 
  extern cm_scache_t *cm_FindSCache(cm_fid_t *fidp);
  
  extern cm_scache_t *cm_FindSCacheParent(cm_scache_t *);
--- 353,359 ----
  extern void cm_ReleaseSCacheNoLock(cm_scache_t *);
  
  extern void cm_ReleaseSCache(cm_scache_t *);
! #endif
  extern cm_scache_t *cm_FindSCache(cm_fid_t *fidp);
  
  extern cm_scache_t *cm_FindSCacheParent(cm_scache_t *);
***************
*** 354,357 ****
--- 376,380 ----
  
  extern long cm_RecycleSCache(cm_scache_t *scp, afs_int32 flags);
  
+ extern void cm_RemoveSCacheFromHashTable(cm_scache_t *scp);
  #endif /*  __CM_SCACHE_H_ENV__ */
Index: openafs/src/WINNT/afsd/cm_utils.c
diff -c openafs/src/WINNT/afsd/cm_utils.c:1.11.4.2 openafs/src/WINNT/afsd/cm_utils.c:1.11.4.3
*** openafs/src/WINNT/afsd/cm_utils.c:1.11.4.2	Sat Jun 24 16:41:54 2006
--- openafs/src/WINNT/afsd/cm_utils.c	Thu Oct  5 16:30:39 2006
***************
*** 261,273 ****
                || error == 122   /* EDQUOT on Linux */
                || error == 1133) /* EDQUOT on Irix  */
          error = CM_ERROR_QUOTA;
!     else if (error == VNOVNODE) {
! #ifdef COMMENT
          error = CM_ERROR_BADFD;
! #else
!         error = CM_ERROR_RETRY;
! #endif
!     } else if (error == 21)
          return CM_ERROR_ISDIR;
      return error;
  }
--- 261,269 ----
                || error == 122   /* EDQUOT on Linux */
                || error == 1133) /* EDQUOT on Irix  */
          error = CM_ERROR_QUOTA;
!     else if (error == VNOVNODE)
          error = CM_ERROR_BADFD;
!     else if (error == 21)
          return CM_ERROR_ISDIR;
      return error;
  }
Index: openafs/src/WINNT/afsd/cm_vnodeops.c
diff -c openafs/src/WINNT/afsd/cm_vnodeops.c:1.69.2.11 openafs/src/WINNT/afsd/cm_vnodeops.c:1.69.2.17
*** openafs/src/WINNT/afsd/cm_vnodeops.c:1.69.2.11	Wed Sep  6 13:21:19 2006
--- openafs/src/WINNT/afsd/cm_vnodeops.c	Mon Oct 16 20:32:57 2006
***************
*** 452,459 ****
      /* First check permissions */
      lock_ObtainMutex(&dscp->mx);
      code = cm_SyncOp(dscp, NULL, userp, reqp, PRSFS_DELETE,
!                       CM_SCACHESYNC_GETSTATUS
!                       | CM_SCACHESYNC_NEEDCALLBACK);
      lock_ReleaseMutex(&dscp->mx);
      if (code)
          return code;
--- 452,459 ----
      /* First check permissions */
      lock_ObtainMutex(&dscp->mx);
      code = cm_SyncOp(dscp, NULL, userp, reqp, PRSFS_DELETE,
!                       CM_SCACHESYNC_GETSTATUS | CM_SCACHESYNC_NEEDCALLBACK);
!     cm_SyncOpDone(dscp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
      lock_ReleaseMutex(&dscp->mx);
      if (code)
          return code;
***************
*** 489,494 ****
--- 489,495 ----
          lock_ReleaseMutex(&scp->mx);
          lock_ObtainMutex(&bufferp->mx);
          lock_ObtainMutex(&scp->mx);
+ 	cm_SyncOpDone(scp, bufferp, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_READ | CM_SCACHESYNC_BUFLOCKED);
          if (code)
              break;
      }
***************
*** 695,700 ****
--- 696,702 ----
                      lock_ReleaseMutex(&scp->mx);
                      break;
                  }
+ 		cm_SyncOpDone(scp, bufferp, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_READ | CM_SCACHESYNC_BUFLOCKED);
                                  
                  if (cm_HaveBuffer(scp, bufferp, 1)) {
                      lock_ReleaseMutex(&scp->mx);
***************
*** 913,918 ****
--- 915,922 ----
          if (code) {
              goto done;
          }
+ 	cm_SyncOpDone(scp, bufp, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_READ);
+ 
  
          if (cm_HaveBuffer(scp, bufp, 0)) 
              break;
***************
*** 1187,1192 ****
--- 1191,1197 ----
          cm_ReleaseSCache(tscp);
          return code;
      }
+     cm_SyncOpDone(tscp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
      /* tscp is now locked */
  
      if (!(flags & CM_FLAG_NOMOUNTCHASE)
***************
*** 1253,1266 ****
--- 1258,1281 ----
      return 1;
  }   
  
+ #ifdef DEBUG_REFCOUNT
+ long cm_LookupDbg(cm_scache_t *dscp, char *namep, long flags, cm_user_t *userp,
+                cm_req_t *reqp, cm_scache_t **outpScpp, char * file, long line)
+ #else
  long cm_Lookup(cm_scache_t *dscp, char *namep, long flags, cm_user_t *userp,
                 cm_req_t *reqp, cm_scache_t **outpScpp)
+ #endif
  {
      long code;
      char tname[256];
      int sysNameIndex = 0;
      cm_scache_t *scp = NULL;
  
+ #ifdef DEBUG_REFCOUNT
+     afsi_log("%s:%d cm_Lookup dscp 0x%p ref %d", file, line, dscp, dscp->refCount, file, line);
+     osi_Log2(afsd_logp, "cm_Lookup dscp 0x%p ref %d", dscp, dscp->refCount);
+ #endif
+ 
      if ( stricmp(namep,SMB_IOCTL_FILENAME_NOSLASH) == 0 ) {
          if (flags & CM_FLAG_CHECKPATH)
              return CM_ERROR_NOSUCHPATH;
***************
*** 1272,1277 ****
--- 1287,1297 ----
          code = cm_ExpandSysName(namep, tname, sizeof(tname), sysNameIndex);
          if (code > 0) {
              code = cm_LookupInternal(dscp, tname, flags, userp, reqp, &scp);
+ #ifdef DEBUG_REFCOUNT
+ 	    afsi_log("%s:%d cm_LookupInternal (1) code 0x%x dscp 0x%p ref %d scp 0x%p ref %d", file, line, code, dscp, dscp->refCount, scp, scp ? scp->refCount : 0);
+ 	    osi_Log3(afsd_logp, "cm_LookupInternal (1) code 0x%x dscp 0x%p scp 0x%p", code, dscp, scp);
+ #endif
+ 
              if (code == 0) {
                  *outpScpp = scp;
                  return 0;
***************
*** 1281,1287 ****
                  scp = NULL;
              }
          } else {
!             return cm_LookupInternal(dscp, namep, flags, userp, reqp, outpScpp);
          }
      }
  
--- 1301,1313 ----
                  scp = NULL;
              }
          } else {
!             code = cm_LookupInternal(dscp, namep, flags, userp, reqp, &scp);
! #ifdef DEBUG_REFCOUNT
! 	    afsi_log("%s:%d cm_LookupInternal (2) code 0x%x dscp 0x%p ref %d scp 0x%p ref %d", file, line, code, dscp, dscp->refCount, scp, scp ? scp->refCount : 0);
! 	    osi_Log3(afsd_logp, "cm_LookupInternal (2) code 0x%x dscp 0x%p scp 0x%p", code, dscp, scp);
! #endif
! 	    *outpScpp = scp;
! 	    return code;
          }
      }
  
***************
*** 1385,1390 ****
--- 1411,1418 ----
                  buf_Release(bufp);
                  return code;
              }
+ 	    cm_SyncOpDone(linkScp, bufp, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_READ);
+ 
              if (cm_HaveBuffer(linkScp, bufp, 0)) 
                  break;
  
***************
*** 1510,1518 ****
      lock_ReleaseMutex(&linkScp->mx);
      return code;
  }
! 
  long cm_NameI(cm_scache_t *rootSCachep, char *pathp, long flags,
                 cm_user_t *userp, char *tidPathp, cm_req_t *reqp, cm_scache_t **outScpp)
  {
      long code;
      char *tp;			/* ptr moving through input buffer */
--- 1538,1551 ----
      lock_ReleaseMutex(&linkScp->mx);
      return code;
  }
! #ifdef DEBUG_REFCOUNT
! long cm_NameIDbg(cm_scache_t *rootSCachep, char *pathp, long flags,
!                cm_user_t *userp, char *tidPathp, cm_req_t *reqp, cm_scache_t **outScpp, 
! 	       char * file, long line)
! #else
  long cm_NameI(cm_scache_t *rootSCachep, char *pathp, long flags,
                 cm_user_t *userp, char *tidPathp, cm_req_t *reqp, cm_scache_t **outScpp)
+ #endif
  {
      long code;
      char *tp;			/* ptr moving through input buffer */
***************
*** 1533,1538 ****
--- 1566,1578 ----
      int extraFlag;		/* avoid chasing mt pts for dir cmd */
      int phase = 1;		/* 1 = tidPathp, 2 = pathp */
  
+ #ifdef DEBUG_REFCOUNT
+     afsi_log("%s:%d cm_NameI rootscp 0x%p ref %d", file, line, rootSCachep, rootSCachep->refCount);
+     osi_Log4(afsd_logp,"cm_NameI rootscp 0x%p path %s tidpath %s flags 0x%x",
+ 	      rootSCachep, pathp ? pathp : "<NULL>", tidPathp ? tidPathp : "<NULL>", 
+ 	      flags);
+ #endif
+ 
      tp = tidPathp;
      if (tp == NULL) {
          tp = pathp;
***************
*** 1548,1553 ****
--- 1588,1594 ----
      symlinkCount = 0;
      dirScp = NULL;
  
+ 
      while (1) {
          tc = *tp++;
  
***************
*** 1601,1610 ****
  			cm_ReleaseSCache(dirScp);
  		    if (psp) 
  			cm_FreeSpace(psp);
! 		    if (code == CM_ERROR_NOSUCHFILE && tscp->fileType == CM_SCACHETYPE_SYMLINK)
  			return CM_ERROR_NOSUCHPATH;
! 		    else
  			return code;
  		}	
  		haveComponent = 0;	/* component done */
  		if (dirScp)
--- 1642,1654 ----
  			cm_ReleaseSCache(dirScp);
  		    if (psp) 
  			cm_FreeSpace(psp);
! 		    if (code == CM_ERROR_NOSUCHFILE && tscp->fileType == CM_SCACHETYPE_SYMLINK) {
! 			osi_Log0(afsd_logp,"cm_NameI code CM_ERROR_NOSUCHPATH");
  			return CM_ERROR_NOSUCHPATH;
! 		    } else {
! 			osi_Log1(afsd_logp,"cm_NameI code 0x%x", code);
  			return code;
+ 		    }
  		}	
  		haveComponent = 0;	/* component done */
  		if (dirScp)
***************
*** 1638,1643 ****
--- 1682,1689 ----
                      }
                      break;
                  }
+ 		cm_SyncOpDone(tscp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
+ 
                  if (tscp->fileType == CM_SCACHETYPE_SYMLINK) {
                      /* this is a symlink; assemble a new buffer */
                      lock_ReleaseMutex(&tscp->mx);
***************
*** 1650,1655 ****
--- 1696,1702 ----
                          }
                          if (psp) 
                              cm_FreeSpace(psp);
+ 			osi_Log0(afsd_logp,"cm_NameI code CM_ERROR_TOO_MANY_SYMLINKS");
                          return CM_ERROR_TOO_MANY_SYMLINKS;
                      }
                      if (tc == 0) 
***************
*** 1733,1738 ****
--- 1780,1790 ----
          *outScpp = tscp;
      else if (tscp)
          cm_ReleaseSCache(tscp);
+ 
+ #ifdef DEBUG_REFCOUNT
+     afsi_log("%s:%d cm_NameI code 0x%x outScpp 0x%p ref %d", file, line, code, *outScpp, (*outScpp)->refCount);
+ #endif
+     osi_Log2(afsd_logp,"cm_NameI code 0x%x outScpp 0x%p", code, *outScpp);
      return code;
  }
  
***************
*** 2107,2113 ****
                        CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
      if (code) 
          goto done;
!         
      if (scp->fileType != CM_SCACHETYPE_FILE) {
          code = CM_ERROR_ISDIR;
          goto done;
--- 2159,2166 ----
                        CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
      if (code) 
          goto done;
!     cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
! 
      if (scp->fileType != CM_SCACHETYPE_FILE) {
          code = CM_ERROR_ISDIR;
          goto done;
***************
*** 2166,2171 ****
--- 2219,2228 ----
      /* done successfully */
      code = 0;
  
+     cm_SyncOpDone(scp, NULL, 
+ 		   CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS
+ 		   | CM_SCACHESYNC_SETSTATUS | CM_SCACHESYNC_SETSIZE);
+ 
    done:
      lock_ReleaseMutex(&scp->mx);
      lock_ReleaseWrite(&scp->bufCreateLock);
***************
*** 2178,2184 ****
                  cm_req_t *reqp)
  {
      long code;
-     int flags;
      AFSFetchStatus afsOutStatus;
      AFSVolSync volSync;
      cm_conn_t *connp;
--- 2235,2240 ----
***************
*** 2190,2200 ****
      if (attrp->mask & CM_ATTRMASK_LENGTH)
          return cm_SetLength(scp, &attrp->length, userp, reqp);
  
-     flags = CM_SCACHESYNC_STORESTATUS;
- 
      lock_ObtainMutex(&scp->mx);
      /* otherwise, we have to make an RPC to get the status */
      code = cm_SyncOp(scp, NULL, userp, reqp, 0, CM_SCACHESYNC_STORESTATUS);
  
      /* make the attr structure */
      cm_StatusFromAttr(&afsInStatus, scp, attrp);
--- 2246,2258 ----
      if (attrp->mask & CM_ATTRMASK_LENGTH)
          return cm_SetLength(scp, &attrp->length, userp, reqp);
  
      lock_ObtainMutex(&scp->mx);
      /* otherwise, we have to make an RPC to get the status */
      code = cm_SyncOp(scp, NULL, userp, reqp, 0, CM_SCACHESYNC_STORESTATUS);
+     if (code) {
+ 	lock_ReleaseMutex(&scp->mx);
+         return code;
+     }
  
      /* make the attr structure */
      cm_StatusFromAttr(&afsInStatus, scp, attrp);
***************
*** 2202,2211 ****
      tfid.Volume = scp->fid.volume;
      tfid.Vnode = scp->fid.vnode;
      tfid.Unique = scp->fid.unique;
! 
!     lock_ReleaseMutex(&scp->mx);
!     if (code) 
!         return code;
  
      /* now make the RPC */
      osi_Log1(afsd_logp, "CALL StoreStatus scp 0x%p", scp);
--- 2260,2266 ----
      tfid.Volume = scp->fid.volume;
      tfid.Vnode = scp->fid.vnode;
      tfid.Unique = scp->fid.unique;
! 	lock_ReleaseMutex(&scp->mx);
  
      /* now make the RPC */
      osi_Log1(afsd_logp, "CALL StoreStatus scp 0x%p", scp);
***************
*** 2774,2780 ****
                  lock_ReleaseMutex(&newDscp->mx);
                  if (code) {
                      /* cleanup first one */
!                     lock_ObtainMutex(&newDscp->mx);
                      cm_SyncOpDone(oldDscp, NULL,
                                     CM_SCACHESYNC_STOREDATA);
                      lock_ReleaseMutex(&oldDscp->mx);
--- 2829,2835 ----
                  lock_ReleaseMutex(&newDscp->mx);
                  if (code) {
                      /* cleanup first one */
!                     lock_ObtainMutex(&oldDscp->mx);
                      cm_SyncOpDone(oldDscp, NULL,
                                     CM_SCACHESYNC_STOREDATA);
                      lock_ReleaseMutex(&oldDscp->mx);
***************
*** 3513,3518 ****
--- 3568,3575 ----
  	    osi_Log0(afsd_logp, "cm_LockCheckPerms user is creator but has no INSERT bits for scp");
      }
  
+     cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
+ 
      osi_Log1(afsd_logp, "cm_LockCheckPerms returning code %d", code);
  
      return code;
Index: openafs/src/WINNT/afsd/cm_vnodeops.h
diff -c openafs/src/WINNT/afsd/cm_vnodeops.h:1.14.4.1 openafs/src/WINNT/afsd/cm_vnodeops.h:1.14.4.2
*** openafs/src/WINNT/afsd/cm_vnodeops.h:1.14.4.1	Tue Jun 27 23:24:05 2006
--- openafs/src/WINNT/afsd/cm_vnodeops.h	Mon Oct 16 20:32:57 2006
***************
*** 65,76 ****
  extern long cm_ReadMountPoint(cm_scache_t *scp, cm_user_t *userp,
  	cm_req_t *reqp);
  
  extern long cm_NameI(cm_scache_t *rootSCachep, char *pathp, long flags,
  	cm_user_t *userp, char *tidPathp, cm_req_t *reqp,
  	cm_scache_t **outScpp);
- 
  extern long cm_Lookup(cm_scache_t *dscp, char *namep, long flags,
  	cm_user_t *userp, cm_req_t *reqp, cm_scache_t **outpScpp);
  
  extern long cm_LookupInternal(cm_scache_t *dscp, char *namep, long flags,
                                cm_user_t *userp, cm_req_t *reqp, 
--- 65,87 ----
  extern long cm_ReadMountPoint(cm_scache_t *scp, cm_user_t *userp,
  	cm_req_t *reqp);
  
+ #ifdef DEBUG_REFCOUNT
+ extern long cm_NameIDbg(cm_scache_t *rootSCachep, char *pathp, long flags,
+ 	cm_user_t *userp, char *tidPathp, cm_req_t *reqp,
+ 	cm_scache_t **outScpp, char *, long);
+ 
+ extern long cm_LookupDbg(cm_scache_t *dscp, char *namep, long flags,
+ 	cm_user_t *userp, cm_req_t *reqp, cm_scache_t **outpScpp, char *, long);
+ 
+ #define cm_Lookup(a,b,c,d,e,f)  cm_LookupDbg(a,b,c,d,e,f,__FILE__,__LINE__)
+ #define cm_NameI(a,b,c,d,e,f,g) cm_NameIDbg(a,b,c,d,e,f,g,__FILE__,__LINE__)
+ #else
  extern long cm_NameI(cm_scache_t *rootSCachep, char *pathp, long flags,
  	cm_user_t *userp, char *tidPathp, cm_req_t *reqp,
  	cm_scache_t **outScpp);
  extern long cm_Lookup(cm_scache_t *dscp, char *namep, long flags,
  	cm_user_t *userp, cm_req_t *reqp, cm_scache_t **outpScpp);
+ #endif
  
  extern long cm_LookupInternal(cm_scache_t *dscp, char *namep, long flags,
                                cm_user_t *userp, cm_req_t *reqp, 
Index: openafs/src/WINNT/afsd/rawops.c
diff -c openafs/src/WINNT/afsd/rawops.c:1.2 openafs/src/WINNT/afsd/rawops.c:1.2.4.1
*** openafs/src/WINNT/afsd/rawops.c:1.2	Fri Jun 17 12:08:01 2005
--- openafs/src/WINNT/afsd/rawops.c	Mon Oct  2 23:23:21 2006
***************
*** 41,46 ****
--- 41,48 ----
      if (code) 
          goto done;
  
+     cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
+ 
      /* now we have the entry locked, look up the length */
      fileLength = scp->length;
  
***************
*** 98,103 ****
--- 100,107 ----
                  if (code) 
                      goto done;
  
+ 		cm_SyncOpDone(scp, bufferp, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_READ);
+ 
                  if (cm_HaveBuffer(scp, bufferp, 0)) break;
  
                  /* otherwise, load the buffer and try again */
***************
*** 177,182 ****
--- 181,188 ----
      if (code) 
          goto done;
      
+     cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_SETSTATUS | CM_SCACHESYNC_GETSTATUS);
+ 
  #if 0
      /* make sure we have a writable FD */
      if (!(fidp->flags & SMB_FID_OPENWRITE)) {
***************
*** 260,266 ****
                                    | CM_SCACHESYNC_BUFLOCKED);
                  if (code) 
                      goto done;
!                                 
                  /* If we're overwriting the entire buffer, or
                   * if we're writing at or past EOF, mark the
                   * buffer as current so we don't call
--- 266,277 ----
                                    | CM_SCACHESYNC_BUFLOCKED);
                  if (code) 
                      goto done;
!                        
! 		cm_SyncOpDone(scp, bufferp, 
! 			       CM_SCACHESYNC_NEEDCALLBACK 
! 			       | CM_SCACHESYNC_WRITE 
! 			       | CM_SCACHESYNC_BUFLOCKED);
! 
                  /* If we're overwriting the entire buffer, or
                   * if we're writing at or past EOF, mark the
                   * buffer as current so we don't call
***************
*** 363,370 ****
          lock_ReleaseMutex(&scp->mx);
          cm_QueueBKGRequest(scp, cm_BkgStore, writeBackOffset.LowPart,
                              writeBackOffset.HighPart, cm_chunkSize, 0, userp);
!     }       
  
      return code;
  }
  
--- 374,382 ----
          lock_ReleaseMutex(&scp->mx);
          cm_QueueBKGRequest(scp, cm_BkgStore, writeBackOffset.LowPart,
                              writeBackOffset.HighPart, cm_chunkSize, 0, userp);
!     }   
  
+     /* cm_SyncOpDone is called when cm_BkgStore completes */
      return code;
  }
  
Index: openafs/src/WINNT/afsd/smb.c
diff -c openafs/src/WINNT/afsd/smb.c:1.118.2.17 openafs/src/WINNT/afsd/smb.c:1.118.2.23
*** openafs/src/WINNT/afsd/smb.c:1.118.2.17	Thu Aug  3 19:30:28 2006
--- openafs/src/WINNT/afsd/smb.c	Sat Oct  7 18:33:29 2006
***************
*** 216,222 ****
  
  void smb_SetRequestStartTime()
  {
!     time_t * tp = malloc(sizeof(time_t));
      if (tp) {
  	*tp = osi_Time();
  
--- 216,224 ----
  
  void smb_SetRequestStartTime()
  {
!     time_t * tp = TlsGetValue(smb_TlsRequestSlot);
!     if (!tp)
! 	tp = malloc(sizeof(time_t));
      if (tp) {
  	*tp = osi_Time();
  
***************
*** 892,897 ****
--- 894,900 ----
  {
      smb_vc_t *vcp;
  
+ 	lock_ObtainWrite(&smb_globalLock);	/* for numVCs */
      lock_ObtainWrite(&smb_rctLock);
      for (vcp = smb_allVCsp; vcp; vcp=vcp->nextp) {
  	if (vcp->magic != SMB_VC_MAGIC)
***************
*** 907,915 ****
      if (!vcp && (flags & SMB_FLAG_CREATE)) {
          vcp = malloc(sizeof(*vcp));
          memset(vcp, 0, sizeof(*vcp));
- 	lock_ObtainWrite(&smb_globalLock);
          vcp->vcID = ++numVCs;
- 	lock_ReleaseWrite(&smb_globalLock);
  	vcp->magic = SMB_VC_MAGIC;
          vcp->refCount = 2; 	/* smb_allVCsp and caller */
          vcp->tidCounter = 1;
--- 910,916 ----
***************
*** 952,964 ****
              memset(vcp->encKey, 0, MSV1_0_CHALLENGE_LENGTH);
  
          if (numVCs >= CM_SESSION_RESERVED) {
- 	    lock_ObtainWrite(&smb_globalLock);
              numVCs = 0;
- 	    lock_ReleaseWrite(&smb_globalLock);
              osi_Log0(smb_logp, "WARNING: numVCs wrapping around");
          }
      }
      lock_ReleaseWrite(&smb_rctLock);
      return vcp;
  }
  
--- 953,964 ----
              memset(vcp->encKey, 0, MSV1_0_CHALLENGE_LENGTH);
  
          if (numVCs >= CM_SESSION_RESERVED) {
              numVCs = 0;
              osi_Log0(smb_logp, "WARNING: numVCs wrapping around");
          }
      }
      lock_ReleaseWrite(&smb_rctLock);
+ 	lock_ReleaseWrite(&smb_globalLock);
      return vcp;
  }
  
***************
*** 1147,1153 ****
--- 1147,1162 ----
      smb_tid_t *tidp;
  
      lock_ObtainWrite(&smb_rctLock);
+   retry:
      for (tidp = vcp->tidsp; tidp; tidp = tidp->nextp) {
+ 	if (tidp->refCount == 0 && tidp->delete) {
+ 	    tidp->refCount++;
+ 	    lock_ReleaseWrite(&smb_rctLock);
+ 	    smb_ReleaseTID(tidp);
+ 	    lock_ObtainWrite(&smb_rctLock);
+ 	    goto retry;
+ 	}
+ 
          if (tid == tidp->tid) {
              tidp->refCount++;
              break;
***************
*** 1452,1457 ****
--- 1461,1473 ----
  
    retry:
      for(fidp = vcp->fidsp; fidp; fidp = (smb_fid_t *) osi_QNext(&fidp->q)) {
+ 	if (fidp->refCount == 0 && fidp->delete) {
+ 	    fidp->refCount++;
+ 	    lock_ReleaseWrite(&smb_rctLock);
+ 	    smb_ReleaseFID(fidp);
+ 	    lock_ObtainWrite(&smb_rctLock);
+ 	    goto retry;
+ 	}
          if (fid == fidp->fid) {
              if (newFid) {
                  fid++;
***************
*** 1545,1551 ****
--- 1561,1573 ----
          vcp = fidp->vcp;
          fidp->vcp = NULL;
          scp = fidp->scp;    /* release after lock is released */
+ 		if (scp) {
+ 		lock_ObtainMutex(&scp->mx);
+ 		scp->flags &= ~CM_SCACHEFLAG_SMB_FID;
+ 		lock_ReleaseMutex(&scp->mx);
+ 		osi_Log2(afsd_logp,"smb_ReleaseFID fidp 0x%p scp 0x%p", fidp, scp);
          fidp->scp = NULL;
+ 		}
          userp = fidp->userp;
          fidp->userp = NULL;
  
***************
*** 2007,2012 ****
--- 2029,2035 ----
          lock_ReleaseMutex(&dsp->mx);
          lock_FinalizeMutex(&dsp->mx);
          scp = dsp->scp;
+ 	osi_Log2(afsd_logp,"smb_ReleaseDirSearch dsp 0x%p scp 0x%p", dsp, scp);
          free(dsp);
      } else {
          lock_ReleaseMutex(&dsp->mx);
***************
*** 3602,3607 ****
--- 3625,3631 ----
                           wlRequest);
  
                  scp = wlRequest->scp;
+ 		osi_Log2(afsd_logp,"smb_WaitingLocksDaemon wlRequest 0x%p scp 0x%p", wlRequest, scp);
  
                  cm_InitReq(&req);
  
***************
*** 3963,3968 ****
--- 3987,3994 ----
              continue;
          }
  
+ 	cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
+ 
          attr = smb_Attributes(scp);
          /* check hidden attribute (the flag is only ON when dot file hiding is on ) */
          if (patchp->flags & SMB_DIRLISTPATCH_DOTFILE)
***************
*** 4136,4141 ****
--- 4162,4168 ----
      lock_ObtainMutex(&dsp->mx);
      if (dsp->scp) {
          scp = dsp->scp;
+ 	osi_Log2(afsd_logp,"smb_ReceiveCoreSearchDir (1) dsp 0x%p scp 0x%p", dsp, scp);
          cm_HoldSCache(scp);
          code = 0;
      } else {
***************
*** 4167,4172 ****
--- 4194,4200 ----
  #endif /* DFS_SUPPORT */
  
              dsp->scp = scp;
+ 	    osi_Log2(afsd_logp,"smb_ReceiveCoreSearchDir (2) dsp 0x%p scp 0x%p", dsp, scp);
              /* we need one hold for the entry we just stored into,
               * and one for our own processing.  When we're done with this
               * function, we'll drop the one for our own processing.
***************
*** 4211,4216 ****
--- 4239,4246 ----
          return code;
      }
          
+     cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
+ 
      dirLength = scp->length;
      bufferp = NULL;
      bufferOffset.LowPart = bufferOffset.HighPart = 0;
***************
*** 4317,4322 ****
--- 4347,4354 ----
                      break;
                  }
                                  
+ 		cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_READ);
+ 
                  if (cm_HaveBuffer(scp, bufferp, 0)) {
                      osi_Log2(smb_logp, "SMB search dir !HaveBuffer scp %x bufferp %x", scp, bufferp);
                      break;
***************
*** 4492,4498 ****
  
      /* release the mutex */
      lock_ReleaseMutex(&scp->mx);
!     if (bufferp) buf_Release(bufferp);
  
      /* apply and free last set of patches; if not doing a star match, this
       * will be empty, but better safe (and freeing everything) than sorry.
--- 4524,4533 ----
  
      /* release the mutex */
      lock_ReleaseMutex(&scp->mx);
!     if (bufferp) {
! 	buf_Release(bufferp);
! 	bufferp = NULL;
!     }
  
      /* apply and free last set of patches; if not doing a star match, this
       * will be empty, but better safe (and freeing everything) than sorry.
***************
*** 4597,4607 ****
      lock_ObtainMutex(&newScp->mx);
      code = cm_SyncOp(newScp, NULL, userp, &req, PRSFS_LOOKUP,
                       CM_SCACHESYNC_GETSTATUS | CM_SCACHESYNC_NEEDCALLBACK);
!     if (code && code != CM_ERROR_NOACCESS) {
!         lock_ReleaseMutex(&newScp->mx);
!         cm_ReleaseSCache(newScp);
!         cm_ReleaseUser(userp);
!         return code;
      }
  
      attrs = smb_Attributes(newScp);
--- 4632,4646 ----
      lock_ObtainMutex(&newScp->mx);
      code = cm_SyncOp(newScp, NULL, userp, &req, PRSFS_LOOKUP,
                       CM_SCACHESYNC_GETSTATUS | CM_SCACHESYNC_NEEDCALLBACK);
!     if (code) {
! 	if (code != CM_ERROR_NOACCESS) {
! 	    lock_ReleaseMutex(&newScp->mx);
! 	    cm_ReleaseSCache(newScp);
! 	    cm_ReleaseUser(userp);
! 	    return code;
! 	}
!     } else {
! 	cm_SyncOpDone(newScp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
      }
  
      attrs = smb_Attributes(newScp);
***************
*** 4690,4695 ****
--- 4729,4736 ----
          return code;
      }
  
+     cm_SyncOpDone(newScp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
+ 
      /* Check for RO volume */
      if (newScp->flags & CM_SCACHEFLAG_RO) {
          lock_ReleaseMutex(&newScp->mx);
***************
*** 4809,4817 ****
                  code = CM_ERROR_NOSUCHFILE;
              else if (dscp->fileType == CM_SCACHETYPE_DIRECTORY) {
                  cm_buf_t *bp = buf_Find(dscp, &hzero);
!                 if (bp)
                      buf_Release(bp);
!                 else
                      code = CM_ERROR_NOSUCHFILE;
              }
              cm_ReleaseSCache(dscp);
--- 4850,4859 ----
                  code = CM_ERROR_NOSUCHFILE;
              else if (dscp->fileType == CM_SCACHETYPE_DIRECTORY) {
                  cm_buf_t *bp = buf_Find(dscp, &hzero);
!                 if (bp) {
                      buf_Release(bp);
! 		    bp = NULL;
! 		} else
                      code = CM_ERROR_NOSUCHFILE;
              }
              cm_ReleaseSCache(dscp);
***************
*** 4852,4857 ****
--- 4894,4901 ----
          return code;
      }
  
+     cm_SyncOpDone(newScp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
+ 
  #ifdef undef
      /* use smb_Attributes instead.   Also the fact that a file is 
       * in a readonly volume doesn't mean it shojuld be marked as RO 
***************
*** 5016,5021 ****
--- 5060,5070 ----
  
      /* save a pointer to the vnode */
      fidp->scp = scp;
+     osi_Log2(afsd_logp,"smb_ReceiveCoreOpen fidp 0x%p scp 0x%p", fidp, scp);
+     lock_ObtainMutex(&scp->mx);
+     scp->flags |= CM_SCACHEFLAG_SMB_FID;
+     lock_ReleaseMutex(&scp->mx);
+ 
      /* and the user */
      cm_HoldUser(userp);
      fidp->userp = userp;
***************
*** 5093,5099 ****
          code = cm_Unlink(dscp, dep->name, rockp->userp, rockp->reqp);
          if (code == 0 && (dscp->flags & CM_SCACHEFLAG_ANYWATCH))
              smb_NotifyChange(FILE_ACTION_REMOVED,
!                              FILE_NOTIFY_CHANGE_FILE_NAME,
                               dscp, dep->name, NULL, TRUE);
          if (code == 0) {
              rockp->any = 1;
--- 5142,5148 ----
          code = cm_Unlink(dscp, dep->name, rockp->userp, rockp->reqp);
          if (code == 0 && (dscp->flags & CM_SCACHEFLAG_ANYWATCH))
              smb_NotifyChange(FILE_ACTION_REMOVED,
! 			     FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_CREATION,
                               dscp, dep->name, NULL, TRUE);
          if (code == 0) {
              rockp->any = 1;
***************
*** 5651,5657 ****
          code = cm_RemoveDir(dscp, dep->name, rockp->userp, rockp->reqp);
          if (code == 0 && (dscp->flags & CM_SCACHEFLAG_ANYWATCH))
              smb_NotifyChange(FILE_ACTION_REMOVED,
!                              FILE_NOTIFY_CHANGE_DIR_NAME,
                               dscp, dep->name, NULL, TRUE);
          if (code == 0)
              rockp->any = 1;
--- 5700,5706 ----
          code = cm_RemoveDir(dscp, dep->name, rockp->userp, rockp->reqp);
          if (code == 0 && (dscp->flags & CM_SCACHEFLAG_ANYWATCH))
              smb_NotifyChange(FILE_ACTION_REMOVED,
!                              FILE_NOTIFY_CHANGE_DIR_NAME | FILE_NOTIFY_CHANGE_CREATION,
                               dscp, dep->name, NULL, TRUE);
          if (code == 0)
              rockp->any = 1;
***************
*** 5846,5857 ****
                    afs_uint32 dosTime) {
      long code = 0;
      cm_req_t req;
!     cm_scache_t *dscp = fidp->NTopen_dscp;
!     char *pathp = fidp->NTopen_pathp;
!     cm_scache_t * scp;
  
!     osi_Log3(smb_logp, "smb_CloseFID Closing fidp 0x%x (fid=%d vcp=0x%x)",
!              fidp, fidp->fid, vcp);
  
      if (!userp) {
  	lock_ObtainMutex(&fidp->mx);
--- 5895,5908 ----
                    afs_uint32 dosTime) {
      long code = 0;
      cm_req_t req;
!     cm_scache_t *dscp = NULL;
!     char *pathp = NULL;
!     cm_scache_t * scp = NULL;
!     int deleted = 0;
!     int nullcreator = 0;
  
!     osi_Log4(smb_logp, "smb_CloseFID Closing fidp 0x%x (fid=%d scp=0x%x vcp=0x%x)",
!              fidp, fidp->fid, scp, vcp);
  
      if (!userp) {
  	lock_ObtainMutex(&fidp->mx);
***************
*** 5878,5883 ****
--- 5929,5948 ----
      lock_ReleaseWrite(&smb_rctLock);
  
      lock_ObtainMutex(&fidp->mx);
+     if (fidp->NTopen_dscp) {
+ 	dscp = fidp->NTopen_dscp;
+ 	cm_HoldSCache(dscp);
+     }
+ 
+     if (fidp->NTopen_pathp) {
+ 	pathp = strdup(fidp->NTopen_pathp);
+     }
+ 
+     if (fidp->scp) {
+ 	scp = fidp->scp;
+ 	cm_HoldSCache(scp);
+     }
+ 
      /* Don't jump the gun on an async raw write */
      while (fidp->raw_writers) {
          lock_ReleaseMutex(&fidp->mx);
***************
*** 5885,5894 ****
          lock_ObtainMutex(&fidp->mx);
      }
  
-     scp = fidp->scp;
-     if (scp)
- 	cm_HoldSCache(scp);
- 
      /* watch for ioctl closes, and read-only opens */
      if (scp != NULL &&
          (fidp->flags & (SMB_FID_OPENWRITE | SMB_FID_DELONCLOSE))
--- 5950,5955 ----
***************
*** 5932,5938 ****
  
          cm_UnlockByKey(scp, key, CM_UNLOCK_BY_FID, userp, &req);
  
!         cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_LOCK);
  
      post_syncopdone:
  
--- 5993,5999 ----
  
          cm_UnlockByKey(scp, key, CM_UNLOCK_BY_FID, userp, &req);
  
! 	cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS | CM_SCACHESYNC_LOCK);
  
      post_syncopdone:
  
***************
*** 5947,5962 ****
          smb_FullName(dscp, scp, pathp, &fullPathp, userp, &req);
          if (scp->fileType == CM_SCACHETYPE_DIRECTORY) {
              code = cm_RemoveDir(dscp, fullPathp, userp, &req);
!             if (code == 0 && (dscp->flags & CM_SCACHEFLAG_ANYWATCH))
!                 smb_NotifyChange(FILE_ACTION_REMOVED,
!                                  FILE_NOTIFY_CHANGE_DIR_NAME,
!                                  dscp, fullPathp, NULL, TRUE);
          } else {
              code = cm_Unlink(dscp, fullPathp, userp, &req);
!             if (code == 0 && (dscp->flags & CM_SCACHEFLAG_ANYWATCH))
!                 smb_NotifyChange(FILE_ACTION_REMOVED,
!                                  FILE_NOTIFY_CHANGE_FILE_NAME,
!                                  dscp, fullPathp, NULL, TRUE);
          }
          free(fullPathp);
  	lock_ObtainMutex(&fidp->mx);
--- 6008,6029 ----
          smb_FullName(dscp, scp, pathp, &fullPathp, userp, &req);
          if (scp->fileType == CM_SCACHETYPE_DIRECTORY) {
              code = cm_RemoveDir(dscp, fullPathp, userp, &req);
! 	    if (code == 0) {
! 		deleted = 1;
! 		if (dscp->flags & CM_SCACHEFLAG_ANYWATCH)
! 		    smb_NotifyChange(FILE_ACTION_REMOVED,
! 				      FILE_NOTIFY_CHANGE_DIR_NAME | FILE_NOTIFY_CHANGE_CREATION,
! 				      dscp, fullPathp, NULL, TRUE);
! 	    }
          } else {
              code = cm_Unlink(dscp, fullPathp, userp, &req);
! 	    if (code == 0) {				
! 		deleted = 1;
! 		if (dscp->flags & CM_SCACHEFLAG_ANYWATCH)
! 		    smb_NotifyChange(FILE_ACTION_REMOVED,
! 				      FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_CREATION,
! 				      dscp, fullPathp, NULL, TRUE);
! 	    }
          }
          free(fullPathp);
  	lock_ObtainMutex(&fidp->mx);
***************
*** 5966,5994 ****
      /* if this was a newly created file, then clear the creator
       * in the stat cache entry. */
      if (fidp->flags & SMB_FID_CREATED) {
!         lock_ObtainMutex(&scp->mx);
! 	if (scp->creator == userp)
! 	    scp->creator = NULL;
! 	lock_ReleaseMutex(&scp->mx);
  	fidp->flags &= ~SMB_FID_CREATED;
      }
  
      if (fidp->flags & SMB_FID_NTOPEN) {
  	fidp->NTopen_dscp = NULL;
          fidp->NTopen_pathp = NULL;
  	fidp->flags &= ~SMB_FID_NTOPEN;
      }
      if (fidp->NTopen_wholepathp) {
!         free(fidp->NTopen_wholepathp);
!         fidp->NTopen_wholepathp = NULL;
      }
      lock_ReleaseMutex(&fidp->mx);
  
      if (dscp)
  	cm_ReleaseSCache(dscp);
  
!     if (scp)
  	cm_ReleaseSCache(scp);
  
      if (pathp)
  	free(pathp);
--- 6033,6081 ----
      /* if this was a newly created file, then clear the creator
       * in the stat cache entry. */
      if (fidp->flags & SMB_FID_CREATED) {
! 	nullcreator = 1;
  	fidp->flags &= ~SMB_FID_CREATED;
      }
  
      if (fidp->flags & SMB_FID_NTOPEN) {
+ 	cm_ReleaseSCache(fidp->NTopen_dscp);
  	fidp->NTopen_dscp = NULL;
+ 	free(fidp->NTopen_pathp);
          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) {
! 	free(fidp->NTopen_wholepathp);
! 	fidp->NTopen_wholepathp = NULL;
!     }
! 
!     if (fidp->scp) {
! 	cm_ReleaseSCache(fidp->scp);
! 	fidp->scp = NULL;
      }
      lock_ReleaseMutex(&fidp->mx);
  
      if (dscp)
  	cm_ReleaseSCache(dscp);
  
!     if (scp) {
! 	if (deleted || nullcreator) {
! 	    lock_ObtainMutex(&scp->mx);
! 	    if (nullcreator && scp->creator == userp)
! 		scp->creator = NULL;
! 	    if (deleted)
! 		scp->flags |= CM_SCACHEFLAG_DELETED;
! 	    lock_ReleaseMutex(&scp->mx);
! 	}
! 	lock_ObtainMutex(&scp->mx);
! 	scp->flags &= ~CM_SCACHEFLAG_SMB_FID;
! 	lock_ReleaseMutex(&scp->mx);
  	cm_ReleaseSCache(scp);
+     }
  
      if (pathp)
  	free(pathp);
***************
*** 6045,6051 ****
      osi_hyper_t bufferOffset;
      long bufIndex, nbytes;
      int chunk;
!     int sequential = 0;
      cm_req_t req;
  
      cm_InitReq(&req);
--- 6132,6138 ----
      osi_hyper_t bufferOffset;
      long bufIndex, nbytes;
      int chunk;
!     int sequential = (fidp->flags & SMB_FID_SEQUENTIAL);
      cm_req_t req;
  
      cm_InitReq(&req);
***************
*** 6055,6060 ****
--- 6142,6148 ----
  
      lock_ObtainMutex(&fidp->mx);
      scp = fidp->scp;
+     cm_HoldSCache(scp);
      lock_ObtainMutex(&scp->mx);
  
      if (offset.HighPart == 0) {
***************
*** 6063,6069 ****
              fidp->prev_chunk = fidp->curr_chunk;
              fidp->curr_chunk = chunk;
          }
!         if (fidp->curr_chunk == fidp->prev_chunk + 1)
              sequential = 1;
      }
      lock_ReleaseMutex(&fidp->mx);
--- 6151,6157 ----
              fidp->prev_chunk = fidp->curr_chunk;
              fidp->curr_chunk = chunk;
          }
!         if (!(fidp->flags & SMB_FID_RANDOM) && (fidp->curr_chunk == fidp->prev_chunk + 1))
              sequential = 1;
      }
      lock_ReleaseMutex(&fidp->mx);
***************
*** 6071,6077 ****
      /* start by looking up the file's end */
      code = cm_SyncOp(scp, NULL, userp, &req, 0,
                       CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
!     if (code) goto done;
  
      /* now we have the entry locked, look up the length */
      fileLength = scp->length;
--- 6159,6168 ----
      /* start by looking up the file's end */
      code = cm_SyncOp(scp, NULL, userp, &req, 0,
                       CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
!     if (code) 
! 	goto done;
! 
!     cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
  
      /* now we have the entry locked, look up the length */
      fileLength = scp->length;
***************
*** 6127,6134 ****
                  code = cm_SyncOp(scp, bufferp, userp, &req, 0,
                                   CM_SCACHESYNC_NEEDCALLBACK |
                                   CM_SCACHESYNC_READ);
!                 if (code) goto done;
!                                 
                  if (cm_HaveBuffer(scp, bufferp, 0)) break;
  
                  /* otherwise, load the buffer and try again */
--- 6218,6228 ----
                  code = cm_SyncOp(scp, bufferp, userp, &req, 0,
                                   CM_SCACHESYNC_NEEDCALLBACK |
                                   CM_SCACHESYNC_READ);
!                 if (code) 
! 		    goto done;
!                     
! 		cm_SyncOpDone(scp, bufferp, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_READ);
! 
                  if (cm_HaveBuffer(scp, bufferp, 0)) break;
  
                  /* otherwise, load the buffer and try again */
***************
*** 6169,6180 ****
  
    done:
      lock_ReleaseMutex(&scp->mx);
!     if (bufferp) 
          buf_Release(bufferp);
  
      if (code == 0 && sequential)
          cm_ConsiderPrefetch(scp, &lastByte, userp, &req);
  
      return code;
  }
  
--- 6263,6276 ----
  
    done:
      lock_ReleaseMutex(&scp->mx);
!     if (bufferp)
          buf_Release(bufferp);
  
      if (code == 0 && sequential)
          cm_ConsiderPrefetch(scp, &lastByte, userp, &req);
  
+     cm_ReleaseSCache(scp);
+ 
      return code;
  }
  
***************
*** 6240,6245 ****
--- 6336,6343 ----
      if (code) 
          goto done;
          
+     cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_SETSTATUS | CM_SCACHESYNC_GETSTATUS);
+ 
      /* now we have the entry locked, look up the length */
      fileLength = scp->length;
      minLength = fileLength;
***************
*** 6317,6322 ****
--- 6415,6425 ----
                  if (code) 
                      goto done;
  
+ 		cm_SyncOpDone(scp, bufferp, 
+ 			       CM_SCACHESYNC_NEEDCALLBACK 
+ 			       | CM_SCACHESYNC_WRITE 
+ 			       | CM_SCACHESYNC_BUFLOCKED);
+ 
                  /* If we're overwriting the entire buffer, or
                   * if we're writing at or past EOF, mark the
                   * buffer as current so we don't call
***************
*** 6426,6431 ****
--- 6529,6535 ----
          lock_ReleaseMutex(&scp->mx);
          cm_QueueBKGRequest(scp, cm_BkgStore, writeBackOffset.LowPart,
                              writeBackOffset.HighPart, cm_chunkSize, 0, userp);
+ 	/* cm_SyncOpDone is called at the completion of cm_BkgStore */
      }
  
      cm_ReleaseSCache(scp);
***************
*** 7166,7172 ****
  	    created = 1;
  	    if (dscp->flags & CM_SCACHEFLAG_ANYWATCH)
  		smb_NotifyChange(FILE_ACTION_ADDED,	
! 				 FILE_NOTIFY_CHANGE_FILE_NAME,
  				 dscp, lastNamep, NULL, TRUE);
  	} else if (!excl && code == CM_ERROR_EXISTS) {
              /* not an exclusive create, and someone else tried
--- 7270,7276 ----
  	    created = 1;
  	    if (dscp->flags & CM_SCACHEFLAG_ANYWATCH)
  		smb_NotifyChange(FILE_ACTION_ADDED,	
! 				 FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_CREATION,
  				 dscp, lastNamep, NULL, TRUE);
  	} else if (!excl && code == CM_ERROR_EXISTS) {
              /* not an exclusive create, and someone else tried
***************
*** 7217,7224 ****
--- 7321,7334 ----
      if (created)
  	fidp->flags |= SMB_FID_CREATED;
  
+     osi_Log2(afsd_logp,"smb_ReceiveCoreCreate fidp 0x%p scp 0x%p", fidp, scp);
+ 
      /* save a pointer to the vnode */
      fidp->scp = scp;
+     lock_ObtainMutex(&scp->mx);
+     scp->flags |= CM_SCACHEFLAG_SMB_FID;
+     lock_ReleaseMutex(&scp->mx);
+     
      /* and the user */
      fidp->userp = userp;
      lock_ReleaseMutex(&fidp->mx);
***************
*** 7277,7282 ****
--- 7387,7393 ----
      code = cm_SyncOp(scp, NULL, userp, &req, 0,
                       CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
      if (code == 0) {
+ 	cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
          if (whence == 1) {
              /* offset from current offset */
              new_offset = LargeIntegerAdd(fidp->offset,
***************
*** 9077,9082 ****
--- 9188,9197 ----
                  if (fidp->scp != NULL) {
                      scp = fidp->scp;
                      fidp->scp = NULL;
+ 		    lock_ObtainMutex(&scp->mx);
+ 		    scp->flags &= ~CM_SCACHEFLAG_SMB_FID;
+ 		    lock_ReleaseMutex(&scp->mx);
+ 		    osi_Log2(afsd_logp,"smb_Shutdown fidp 0x%p scp 0x%p", fidp, scp);
                      cm_ReleaseSCache(scp);
                  }
                  lock_ReleaseMutex(&fidp->mx);
Index: openafs/src/WINNT/afsd/smb.h
diff -c openafs/src/WINNT/afsd/smb.h:1.41.2.8 openafs/src/WINNT/afsd/smb.h:1.41.2.9
*** openafs/src/WINNT/afsd/smb.h:1.41.2.8	Fri Aug 25 13:08:23 2006
--- openafs/src/WINNT/afsd/smb.h	Mon Oct  2 23:23:21 2006
***************
*** 398,403 ****
--- 398,405 ----
  #define SMB_FID_MTIMESETDONE		0x80	/* have set modtime via Tr2 */
  #define SMB_FID_LOOKSLIKECOPY	(SMB_FID_LENGTHSETDONE | SMB_FID_MTIMESETDONE)
  #define SMB_FID_NTOPEN			0x100	/* have dscp and pathp */
+ #define SMB_FID_SEQUENTIAL		0x200
+ #define SMB_FID_RANDOM			0x400
  
  #define SMB_FID_SHARE_READ              0x1000
  #define SMB_FID_SHARE_WRITE             0x2000
Index: openafs/src/WINNT/afsd/smb3.c
diff -c openafs/src/WINNT/afsd/smb3.c:1.95.2.16 openafs/src/WINNT/afsd/smb3.c:1.95.2.20
*** openafs/src/WINNT/afsd/smb3.c:1.95.2.16	Wed Aug 30 02:33:01 2006
--- openafs/src/WINNT/afsd/smb3.c	Sat Oct  7 18:33:30 2006
***************
*** 2295,2301 ****
  	    created = 1;
  	    if (dscp->flags & CM_SCACHEFLAG_ANYWATCH)
  		smb_NotifyChange(FILE_ACTION_ADDED,
! 				 FILE_NOTIFY_CHANGE_FILE_NAME,  
  				  dscp, lastNamep, NULL, TRUE);
  	} else if (!excl && code == CM_ERROR_EXISTS) {
              /* not an exclusive create, and someone else tried
--- 2295,2301 ----
  	    created = 1;
  	    if (dscp->flags & CM_SCACHEFLAG_ANYWATCH)
  		smb_NotifyChange(FILE_ACTION_ADDED,
! 				 FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_CREATION,  
  				  dscp, lastNamep, NULL, TRUE);
  	} else if (!excl && code == CM_ERROR_EXISTS) {
              /* not an exclusive create, and someone else tried
***************
*** 2363,2369 ****
--- 2363,2374 ----
      cm_HoldUser(userp);
      lock_ObtainMutex(&fidp->mx);
      /* save a pointer to the vnode */
+     osi_Log2(afsd_logp,"smb_ReceiveTran2Open fidp 0x%p scp 0x%p", fidp, scp);
      fidp->scp = scp;
+     lock_ObtainMutex(&scp->mx);
+     scp->flags |= CM_SCACHEFLAG_SMB_FID;
+     lock_ReleaseMutex(&scp->mx);
+     
      /* and the user */
      fidp->userp = userp;
          
***************
*** 2812,2817 ****
--- 2817,2824 ----
      code = cm_SyncOp(scp, NULL, userp, &req, 0,
                        CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
      if (code) goto done;
+ 
+     cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
          
      /* now we have the status in the cache entry, and everything is locked.
       * Marshall the output data.
***************
*** 3087,3097 ****
          code = cm_SyncOp(scp, NULL, userp, &req, 0,
                            CM_SCACHESYNC_GETSTATUS
                           | CM_SCACHESYNC_NEEDCALLBACK);
- 	lock_ReleaseMutex(&scp->mx);
          if (code) {
              goto done;
          }
  
  	lock_ObtainMutex(&fidp->mx);
  	lock_ObtainMutex(&scp->mx);
  
--- 3094,3106 ----
          code = cm_SyncOp(scp, NULL, userp, &req, 0,
                            CM_SCACHESYNC_GETSTATUS
                           | CM_SCACHESYNC_NEEDCALLBACK);
          if (code) {
+ 	    lock_ReleaseMutex(&scp->mx);
              goto done;
          }
+ 	cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
  
+ 	lock_ReleaseMutex(&scp->mx);
  	lock_ObtainMutex(&fidp->mx);
  	lock_ObtainMutex(&scp->mx);
  
***************
*** 3210,3215 ****
--- 3219,3225 ----
      lock_ObtainMutex(&fidp->mx);
      delonclose = fidp->flags & SMB_FID_DELONCLOSE;
      scp = fidp->scp;
+     osi_Log2(afsd_logp,"smb_ReleaseTran2QFileInfo fidp 0x%p scp 0x%p", fidp, scp);
      cm_HoldSCache(scp);
      lock_ReleaseMutex(&fidp->mx);
      lock_ObtainMutex(&scp->mx);
***************
*** 3218,3223 ****
--- 3228,3235 ----
      if (code) 
          goto done;
  
+     cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
+ 
      /* now we have the status in the cache entry, and everything is locked.
       * Marshall the output data.
       */
***************
*** 3326,3331 ****
--- 3338,3344 ----
      }
  
      scp = fidp->scp;
+     osi_Log2(afsd_logp,"smb_ReceiveTran2SetFileInfo fidp 0x%p scp 0x%p", fidp, scp);
      cm_HoldSCache(scp);
      lock_ReleaseMutex(&fidp->mx);
  
***************
*** 3356,3365 ****
          code = cm_SyncOp(scp, NULL, userp, &req, 0,
                            CM_SCACHESYNC_GETSTATUS
                           | CM_SCACHESYNC_NEEDCALLBACK);
! 	lock_ReleaseMutex(&scp->mx);
!         if (code)
              goto done;
  
  	lock_ObtainMutex(&fidp->mx);
  	lock_ObtainMutex(&scp->mx);
  
--- 3369,3382 ----
          code = cm_SyncOp(scp, NULL, userp, &req, 0,
                            CM_SCACHESYNC_GETSTATUS
                           | CM_SCACHESYNC_NEEDCALLBACK);
!         if (code) {
! 	    lock_ReleaseMutex(&scp->mx);
              goto done;
+ 	}
+ 
+ 	cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
  
+ 	lock_ReleaseMutex(&scp->mx);
  	lock_ObtainMutex(&fidp->mx);
  	lock_ObtainMutex(&scp->mx);
  
***************
*** 3716,3722 ****
              }
              continue;
          }
!                 
          /* now watch for a symlink */
          code = 0;
          while (code == 0 && scp->fileType == CM_SCACHETYPE_SYMLINK) {
--- 3733,3741 ----
              }
              continue;
          }
!         
! 	cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
! 
          /* now watch for a symlink */
          code = 0;
          while (code == 0 && scp->fileType == CM_SCACHETYPE_SYMLINK) {
***************
*** 4296,4301 ****
--- 4315,4321 ----
      lock_ObtainMutex(&dsp->mx);
      if (dsp->scp) {
          scp = dsp->scp;
+ 	osi_Log2(afsd_logp,"smb_ReceiveTran2SearchDir dsp 0x%p scp 0x%p", dsp, scp);
          cm_HoldSCache(scp);
          code = 0;
      } else {
***************
*** 4334,4339 ****
--- 4354,4360 ----
              }
  #endif /* DFS_SUPPORT */
              dsp->scp = scp;
+ 	    osi_Log2(afsd_logp,"smb_ReceiveTran2SearchDir dsp 0x%p scp 0x%p", dsp, scp);
              /* we need one hold for the entry we just stored into,
               * and one for our own processing.  When we're done
               * with this function, we'll drop the one for our own
***************
*** 4373,4378 ****
--- 4394,4401 ----
          return code;
      }
  
+     cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
+ 
    startsearch:
      dirLength = scp->length;
      bufferp = NULL;
***************
*** 4490,4496 ****
                      osi_Log2(smb_logp, "T2 search dir cm_SyncOp scp %x failed %d", scp, code);
                      break;
                  }
!                                 
                  if (cm_HaveBuffer(scp, bufferp, 0)) {
                      osi_Log2(smb_logp, "T2 search dir !HaveBuffer scp %x bufferp %x", scp, bufferp);
                      break;
--- 4513,4521 ----
                      osi_Log2(smb_logp, "T2 search dir cm_SyncOp scp %x failed %d", scp, code);
                      break;
                  }
!                        
! 		cm_SyncOpDone(scp, bufferp, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_READ);
! 
                  if (cm_HaveBuffer(scp, bufferp, 0)) {
                      osi_Log2(smb_logp, "T2 search dir !HaveBuffer scp %x bufferp %x", scp, bufferp);
                      break;
***************
*** 4756,4763 ****
  
      /* release the mutex */
      lock_ReleaseMutex(&scp->mx);
!     if (bufferp) 
          buf_Release(bufferp);
  
      /* apply and free last set of patches; if not doing a star match, this
       * will be empty, but better safe (and freeing everything) than sorry.
--- 4781,4790 ----
  
      /* release the mutex */
      lock_ReleaseMutex(&scp->mx);
!     if (bufferp) {
          buf_Release(bufferp);
+ 	bufferp = NULL;
+     }
  
      /* apply and free last set of patches; if not doing a star match, this
       * will be empty, but better safe (and freeing everything) than sorry.
***************
*** 5061,5067 ****
  	    created = 1;
  	    if (dscp->flags & CM_SCACHEFLAG_ANYWATCH)
  		smb_NotifyChange(FILE_ACTION_ADDED,
! 				 FILE_NOTIFY_CHANGE_FILE_NAME,
  				 dscp, lastNamep, NULL, TRUE);
  	} else if (!excl && code == CM_ERROR_EXISTS) {
              /* not an exclusive create, and someone else tried
--- 5088,5094 ----
  	    created = 1;
  	    if (dscp->flags & CM_SCACHEFLAG_ANYWATCH)
  		smb_NotifyChange(FILE_ACTION_ADDED,
! 				 FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_CREATION,
  				 dscp, lastNamep, NULL, TRUE);
  	} else if (!excl && code == CM_ERROR_EXISTS) {
              /* not an exclusive create, and someone else tried
***************
*** 5110,5115 ****
--- 5137,5146 ----
      lock_ObtainMutex(&fidp->mx);
      /* save a pointer to the vnode */
      fidp->scp = scp;
+     lock_ObtainMutex(&scp->mx);
+     scp->flags |= CM_SCACHEFLAG_SMB_FID;
+     lock_ReleaseMutex(&scp->mx);
+     osi_Log2(afsd_logp,"smb_ReceiveV3OpenX fidp 0x%p scp 0x%p", fidp, scp);
      /* also the user */
      fidp->userp = userp;
          
***************
*** 5225,5230 ****
--- 5256,5262 ----
          return CM_ERROR_BADFD;
      }
      scp = fidp->scp;
+     osi_Log2(afsd_logp,"smb_ReceiveV3LockingX fidp 0x%p scp 0x%p", fidp, scp);
      cm_HoldSCache(scp);
      lock_ReleaseMutex(&fidp->mx);
  
***************
*** 5306,5311 ****
--- 5338,5344 ----
                  wlRequest->vcp = vcp;
                  smb_HoldVC(vcp);
                  wlRequest->scp = scp;
+ 		osi_Log2(afsd_logp,"smb_ReceiveV3LockingX wlRequest 0x%p scp 0x%p", wlRequest, scp);
                  cm_HoldSCache(scp);
                  wlRequest->inp = smb_CopyPacket(inp);
                  wlRequest->outp = smb_CopyPacket(outp);
***************
*** 5464,5469 ****
--- 5497,5503 ----
          return CM_ERROR_BADFD;
      }
      scp = fidp->scp;
+     osi_Log2(afsd_logp,"smb_ReceiveV3GetAttributes fidp 0x%p scp 0x%p", fidp, scp);
      cm_HoldSCache(scp);
      lock_ReleaseMutex(&fidp->mx);
          
***************
*** 5477,5482 ****
--- 5511,5518 ----
      if (code) 
  	goto done;
  
+     cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);
+ 
      /* decode times.  We need a search time, but the response to this
       * call provides the date first, not the time, as returned in the
       * searchTime variable.  So we take the high-order bits first.
***************
*** 5538,5543 ****
--- 5574,5580 ----
          return CM_ERROR_BADFD;
      }
      scp = fidp->scp;
+     osi_Log2(afsd_logp,"smb_ReceiveV3SetAttributes fidp 0x%p scp 0x%p", fidp, scp);
      cm_HoldSCache(scp);
      lock_ReleaseMutex(&fidp->mx);
          
***************
*** 6058,6063 ****
--- 6095,6104 ----
          fidflags |= SMB_FID_OPENWRITE;
      if (createOptions & FILE_DELETE_ON_CLOSE)
          fidflags |= SMB_FID_DELONCLOSE;
+     if (createOptions & FILE_SEQUENTIAL_ONLY && !(createOptions & FILE_RANDOM_ACCESS))
+ 	fidflags |= SMB_FID_SEQUENTIAL;
+     if (createOptions & FILE_RANDOM_ACCESS && !(createOptions & FILE_SEQUENTIAL_ONLY))
+ 	fidflags |= SMB_FID_RANDOM;
  
      /* and the share mode */
      if (shareAccess & FILE_SHARE_READ)
***************
*** 6329,6335 ****
  	    created = 1;
  	    if (dscp->flags & CM_SCACHEFLAG_ANYWATCH)
  		smb_NotifyChange(FILE_ACTION_ADDED,
! 				 FILE_NOTIFY_CHANGE_FILE_NAME,
  				 dscp, lastNamep, NULL, TRUE);
  	} else if (code == CM_ERROR_EXISTS && createDisp != FILE_CREATE) {
              /* Not an exclusive create, and someone else tried
--- 6370,6376 ----
  	    created = 1;
  	    if (dscp->flags & CM_SCACHEFLAG_ANYWATCH)
  		smb_NotifyChange(FILE_ACTION_ADDED,
! 				 FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_CREATION,
  				 dscp, lastNamep, NULL, TRUE);
  	} else if (code == CM_ERROR_EXISTS && createDisp != FILE_CREATE) {
              /* Not an exclusive create, and someone else tried
***************
*** 6553,6558 ****
--- 6594,6603 ----
      lock_ObtainMutex(&fidp->mx);
      /* save a pointer to the vnode */
      fidp->scp = scp;    /* Hold transfered to fidp->scp and no longer needed */
+     lock_ObtainMutex(&scp->mx);
+     scp->flags |= CM_SCACHEFLAG_SMB_FID;
+     lock_ReleaseMutex(&scp->mx);
+     osi_Log2(afsd_logp,"smb_ReceiveNTCreateX fidp 0x%p scp 0x%p", fidp, scp);
  
      fidp->flags = fidflags;
  
***************
*** 6562,6570 ****
  
      /* save parent dir and pathname for delete or change notification */
      if (fidflags & (SMB_FID_OPENDELETE | SMB_FID_OPENWRITE)) {
          fidp->flags |= SMB_FID_NTOPEN;
          fidp->NTopen_dscp = dscp;
!         cm_HoldSCache(dscp);
          fidp->NTopen_pathp = strdup(lastNamep);
      }
      fidp->NTopen_wholepathp = realPathp;
--- 6607,6616 ----
  
      /* save parent dir and pathname for delete or change notification */
      if (fidflags & (SMB_FID_OPENDELETE | SMB_FID_OPENWRITE)) {
+ 	osi_Log2(afsd_logp,"smb_ReceiveNTCreateX fidp 0x%p dscp 0x%p", fidp, dscp);
          fidp->flags |= SMB_FID_NTOPEN;
          fidp->NTopen_dscp = dscp;
! 	dscp = NULL;
          fidp->NTopen_pathp = strdup(lastNamep);
      }
      fidp->NTopen_wholepathp = realPathp;
***************
*** 6802,6807 ****
--- 6848,6857 ----
          fidflags |= SMB_FID_OPENWRITE;
      if (createOptions & FILE_DELETE_ON_CLOSE)
          fidflags |= SMB_FID_DELONCLOSE;
+     if (createOptions & FILE_SEQUENTIAL_ONLY && !(createOptions & FILE_RANDOM_ACCESS))
+ 	fidflags |= SMB_FID_SEQUENTIAL;
+     if (createOptions & FILE_RANDOM_ACCESS && !(createOptions & FILE_SEQUENTIAL_ONLY))
+ 	fidflags |= SMB_FID_RANDOM;
  
      /* And the share mode */
      if (shareAccess & FILE_SHARE_READ)
***************
*** 7006,7012 ****
  	    created = 1;
  	    if (dscp->flags & CM_SCACHEFLAG_ANYWATCH)
  		smb_NotifyChange(FILE_ACTION_ADDED,
! 				 FILE_NOTIFY_CHANGE_FILE_NAME,
  				 dscp, lastNamep, NULL, TRUE);
  	} else if (code == CM_ERROR_EXISTS && createDisp != FILE_CREATE) {
              /* Not an exclusive create, and someone else tried
--- 7056,7062 ----
  	    created = 1;
  	    if (dscp->flags & CM_SCACHEFLAG_ANYWATCH)
  		smb_NotifyChange(FILE_ACTION_ADDED,
! 				 FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_CREATION,
  				 dscp, lastNamep, NULL, TRUE);
  	} else if (code == CM_ERROR_EXISTS && createDisp != FILE_CREATE) {
              /* Not an exclusive create, and someone else tried
***************
*** 7162,7167 ****
--- 7212,7221 ----
      lock_ObtainMutex(&fidp->mx);
      /* save a pointer to the vnode */
      fidp->scp = scp;
+     lock_ObtainMutex(&scp->mx);
+     scp->flags |= CM_SCACHEFLAG_SMB_FID;
+     lock_ReleaseMutex(&scp->mx);
+     osi_Log2(afsd_logp,"smb_ReceiveNTTranCreate fidp 0x%p scp 0x%p", fidp, scp);
  
      fidp->flags = fidflags;
  
***************
*** 7173,7179 ****
      if (fidflags & (SMB_FID_OPENDELETE | SMB_FID_OPENWRITE)) {
          fidp->flags |= SMB_FID_NTOPEN;
          fidp->NTopen_dscp = dscp;
!         cm_HoldSCache(dscp);
          fidp->NTopen_pathp = strdup(lastNamep);
      }
      fidp->NTopen_wholepathp = realPathp;
--- 7227,7234 ----
      if (fidflags & (SMB_FID_OPENDELETE | SMB_FID_OPENWRITE)) {
          fidp->flags |= SMB_FID_NTOPEN;
          fidp->NTopen_dscp = dscp;
! 	osi_Log2(afsd_logp,"smb_ReceiveNTTranCreate fidp 0x%p dscp 0x%p", fidp, dscp);
! 	dscp = NULL;
          fidp->NTopen_pathp = strdup(lastNamep);
      }
      fidp->NTopen_wholepathp = realPathp;
***************
*** 7338,7343 ****
--- 7393,7399 ----
               filter, fid, watchtree, osi_LogSaveString(smb_logp, fidp->NTopen_wholepathp));
  
      scp = fidp->scp;
+     osi_Log2(afsd_logp,"smb_ReceiveNTTranNotifyChange fidp 0x%p scp 0x%p", fidp, scp);
      lock_ObtainMutex(&scp->mx);
      if (watchtree)
          scp->flags |= CM_SCACHEFLAG_WATCHEDSUBTREE;
***************
*** 7688,7693 ****
--- 7744,7750 ----
                            osi_LogSaveString(smb_logp, (fidp)?fidp->NTopen_wholepathp:""));
  
                  scp = fidp->scp;
+ 		osi_Log2(afsd_logp,"smb_ReceiveNTCancel fidp 0x%p scp 0x%p", fidp, scp);
                  lock_ObtainMutex(&scp->mx);
                  if (watchtree)
                      scp->flags &= ~CM_SCACHEFLAG_WATCHEDSUBTREE;
Index: openafs/src/WINNT/client_config/NTMakefile
diff -c openafs/src/WINNT/client_config/NTMakefile:1.11 openafs/src/WINNT/client_config/NTMakefile:1.11.4.1
*** openafs/src/WINNT/client_config/NTMakefile:1.11	Sun Nov 20 20:56:17 2005
--- openafs/src/WINNT/client_config/NTMakefile	Tue Oct 10 11:49:33 2006
***************
*** 180,185 ****
--- 180,186 ----
  clean::
  	$(DEL) $(COPYHEADERS)
  	$(CD) lang
+ 	$(DEL) AFS_component_version_number.h
  	if exist $(NTLANG) $(NTLANG) en_US $(MAKECMD) /nologo /e /f NTMakefile clean
  	if exist $(NTLANG) $(NTLANG) ja_JP $(MAKECMD) /nologo /e /f NTMakefile clean
  	if exist $(NTLANG) $(NTLANG) ko_KR $(MAKECMD) /nologo /e /f NTMakefile clean
Index: openafs/src/WINNT/client_config/lang/de_DE/afs_config.rc
diff -c openafs/src/WINNT/client_config/lang/de_DE/afs_config.rc:1.5 openafs/src/WINNT/client_config/lang/de_DE/afs_config.rc:1.5.6.1
*** openafs/src/WINNT/client_config/lang/de_DE/afs_config.rc:1.5	Fri Apr 29 15:49:58 2005
--- openafs/src/WINNT/client_config/lang/de_DE/afs_config.rc	Wed Sep 13 13:51:57 2006
***************
*** 52,60 ****
      CONTROL         "&AFS-Token beim Anmelden bei Windows erhalten",
                      IDC_LOGON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,50,
                      193,10
!     CONTROL         "Das Symbol für den AFS Client in der Menüleiste &anzeigen",
!                     IDC_TRAYICON,
!                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,72,193,10
      LTEXT           "Hinweis: Diese Steuerelemente sind gesperrt, weil der AFS Client-Service nicht aktiv ist.",
                      IDC_WARN,13,124,193,17
      GROUPBOX        "Client-Status",IDC_STATIC,7,157,206,61
--- 52,60 ----
      CONTROL         "&AFS-Token beim Anmelden bei Windows erhalten",
                      IDC_LOGON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,50,
                      193,10
! //    CONTROL         "Das Symbol für den AFS Client in der Menüleiste &anzeigen",
! //                    IDC_TRAYICON,
! //                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,72,193,10
      LTEXT           "Hinweis: Diese Steuerelemente sind gesperrt, weil der AFS Client-Service nicht aktiv ist.",
                      IDC_WARN,13,124,193,17
      GROUPBOX        "Client-Status",IDC_STATIC,7,157,206,61
***************
*** 79,87 ****
      CONTROL         "&AFS-Token beim Anmelden bei Windows erhalten",
                      IDC_LOGON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,73,
                      193,10
!     CONTROL         "Das Symbol für den AFS Light in der Menüleiste &anzeigen",
!                     IDC_TRAYICON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,93,
!                     193,10
      LTEXT           "Hinweis: Diese Steuerelemente sind gesperrt, weil der AFS Light mit keinem AFS-Gateway verbunden ist.",
                      IDC_WARN,13,114,219,17
  END
--- 79,87 ----
      CONTROL         "&AFS-Token beim Anmelden bei Windows erhalten",
                      IDC_LOGON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,73,
                      193,10
! //    CONTROL         "Das Symbol für den AFS Light in der Menüleiste &anzeigen",
! //                    IDC_TRAYICON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,93,
! //                    193,10
      LTEXT           "Hinweis: Diese Steuerelemente sind gesperrt, weil der AFS Light mit keinem AFS-Gateway verbunden ist.",
                      IDC_WARN,13,114,219,17
  END
Index: openafs/src/WINNT/client_config/lang/en_US/afs_config.rc
diff -c openafs/src/WINNT/client_config/lang/en_US/afs_config.rc:1.7 openafs/src/WINNT/client_config/lang/en_US/afs_config.rc:1.7.6.1
*** openafs/src/WINNT/client_config/lang/en_US/afs_config.rc:1.7	Fri Apr 29 15:50:03 2005
--- openafs/src/WINNT/client_config/lang/en_US/afs_config.rc	Wed Sep 13 13:51:57 2006
***************
*** 52,59 ****
      EDITTEXT        IDC_CELL,59,22,114,13,ES_LOWERCASE | ES_AUTOHSCROLL
      CONTROL         "&Obtain AFS tokens when logging into Windows",IDC_LOGON,
                      "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,50,193,10
!     CONTROL         "S&how the AFS Client icon in the taskbar",IDC_TRAYICON,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,13,72,193,10
      LTEXT           "Note: these controls are disabled because the AFS Client service is not running.",
                      IDC_WARN,13,124,193,17
      GROUPBOX        "Client Status",IDC_STATIC,7,157,206,61
--- 52,59 ----
      EDITTEXT        IDC_CELL,59,22,114,13,ES_LOWERCASE | ES_AUTOHSCROLL
      CONTROL         "&Obtain AFS tokens when logging into Windows",IDC_LOGON,
                      "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,50,193,10
! //    CONTROL         "S&how the AFS Client icon in the taskbar",IDC_TRAYICON,"Button",
! //                    BS_AUTOCHECKBOX | WS_TABSTOP,13,72,193,10
      LTEXT           "Note: these controls are disabled because the AFS Client service is not running.",
                      IDC_WARN,13,124,193,17
      GROUPBOX        "Client Status",IDC_STATIC,7,157,206,61
***************
*** 76,83 ****
                      WS_DISABLED | NOT WS_TABSTOP
      CONTROL         "&Obtain AFS tokens when logging into Windows",IDC_LOGON,
                      "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,73,193,10
!     CONTROL         "S&how the AFS Light icon in the taskbar",IDC_TRAYICON,
!                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,93,193,10
      LTEXT           "Note: these controls are disabled because AFS Light is not connected to an AFS gateway.",
                      IDC_WARN,13,114,219,17
  END
--- 76,83 ----
                      WS_DISABLED | NOT WS_TABSTOP
      CONTROL         "&Obtain AFS tokens when logging into Windows",IDC_LOGON,
                      "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,73,193,10
! //    CONTROL         "S&how the AFS Light icon in the taskbar",IDC_TRAYICON,
! //                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,93,193,10
      LTEXT           "Note: these controls are disabled because AFS Light is not connected to an AFS gateway.",
                      IDC_WARN,13,114,219,17
  END
Index: openafs/src/WINNT/client_config/lang/es_ES/afs_config.rc
diff -c openafs/src/WINNT/client_config/lang/es_ES/afs_config.rc:1.5 openafs/src/WINNT/client_config/lang/es_ES/afs_config.rc:1.5.6.1
*** openafs/src/WINNT/client_config/lang/es_ES/afs_config.rc:1.5	Fri Apr 29 15:50:08 2005
--- openafs/src/WINNT/client_config/lang/es_ES/afs_config.rc	Wed Sep 13 13:51:58 2006
***************
*** 52,60 ****
      CONTROL         "&Obtener señales de AFS al iniciar la sesión en Windows",
                      IDC_LOGON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,50,
                      193,10
!     CONTROL         "&Mostrar el icono AFS Client en la barra de tareas",
!                     IDC_TRAYICON,
!                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,72,193,10
      LTEXT           "Nota: estos controles están inhabilitados porque el servicio de AFS Client no se está ejecutando. ",
                      IDC_WARN,13,124,193,17
      GROUPBOX        "Estado de cliente",IDC_STATIC,7,157,206,61
--- 52,60 ----
      CONTROL         "&Obtener señales de AFS al iniciar la sesión en Windows",
                      IDC_LOGON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,50,
                      193,10
! //    CONTROL         "&Mostrar el icono AFS Client en la barra de tareas",
! //                    IDC_TRAYICON,
! //                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,72,193,10
      LTEXT           "Nota: estos controles están inhabilitados porque el servicio de AFS Client no se está ejecutando. ",
                      IDC_WARN,13,124,193,17
      GROUPBOX        "Estado de cliente",IDC_STATIC,7,157,206,61
***************
*** 78,86 ****
      CONTROL         "&Obtener señales de AFS al iniciar la sesión en Windows",
                      IDC_LOGON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,73,
                      219,10
!     CONTROL         "&Mostrar el icono AFS Light en la barra de tareas",
!                     IDC_TRAYICON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,93,
!                     214,10
      LTEXT           "Nota: estos controles están inhabilitados porque el AFS Light no está conectado a una pasarela de AFS.",
                      IDC_WARN,13,114,219,17
  END
--- 78,86 ----
      CONTROL         "&Obtener señales de AFS al iniciar la sesión en Windows",
                      IDC_LOGON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,73,
                      219,10
! //    CONTROL         "&Mostrar el icono AFS Light en la barra de tareas",
! //                    IDC_TRAYICON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,93,
! //                    214,10
      LTEXT           "Nota: estos controles están inhabilitados porque el AFS Light no está conectado a una pasarela de AFS.",
                      IDC_WARN,13,114,219,17
  END
Index: openafs/src/WINNT/client_config/lang/ja_JP/afs_config.rc
diff -c openafs/src/WINNT/client_config/lang/ja_JP/afs_config.rc:1.5 openafs/src/WINNT/client_config/lang/ja_JP/afs_config.rc:1.5.6.1
*** openafs/src/WINNT/client_config/lang/ja_JP/afs_config.rc:1.5	Fri Apr 29 15:50:12 2005
--- openafs/src/WINNT/client_config/lang/ja_JP/afs_config.rc	Wed Sep 13 13:51:58 2006
***************
*** 52,61 ****
      CONTROL         "Windows ‚Ö‚ÌƒƒOƒCƒ“Žž‚É AFS ƒg[ƒNƒ“‚ðŽæ“¾(&O)",
                      IDC_LOGON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,50,
                      198,10
!     CONTROL         "ƒ^ƒXƒNƒo[‚ÉAFSƒNƒ‰ƒCƒAƒ“ƒgEƒAƒCƒRƒ“‚ð•\Ž¦(&H)",
!                     IDC_TRAYICON,
!                     "Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,11,72,193,10
      LTEXT           "’: AFS ƒNƒ‰ƒCƒAƒ“ƒgEƒT[ƒrƒX‚ªŽÀs‚³‚ê‚Ä‚¢‚È‚¢‚½‚ßA‚±‚ê‚ç‚Ì§Œä‚ÍŽg—p‚Å‚«‚Ü‚¹‚ñB",
                      IDC_WARN,13,124,193,17
      GROUPBOX        "ƒNƒ‰ƒCƒAƒ“ƒgó‹µ",IDC_STATIC,7,157,206,61
--- 52,61 ----
      CONTROL         "Windows ‚Ö‚ÌƒƒOƒCƒ“Žž‚É AFS ƒg[ƒNƒ“‚ðŽæ“¾(&O)",
                      IDC_LOGON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,50,
                      198,10
! //    CONTROL         "ƒ^ƒXƒNƒo[‚ÉAFSƒNƒ‰ƒCƒAƒ“ƒgEƒAƒCƒRƒ“‚ð•\Ž¦(&H)",
! //                    IDC_TRAYICON,
! //                    "Button",
! //                    BS_AUTOCHECKBOX | WS_TABSTOP,11,72,193,10
      LTEXT           "’: AFS ƒNƒ‰ƒCƒAƒ“ƒgEƒT[ƒrƒX‚ªŽÀs‚³‚ê‚Ä‚¢‚È‚¢‚½‚ßA‚±‚ê‚ç‚Ì§Œä‚ÍŽg—p‚Å‚«‚Ü‚¹‚ñB",
                      IDC_WARN,13,124,193,17
      GROUPBOX        "ƒNƒ‰ƒCƒAƒ“ƒgó‹µ",IDC_STATIC,7,157,206,61
***************
*** 79,86 ****
      CONTROL         "Windows ‚Ö‚ÌƒƒOƒCƒ“Žž‚É AFS ƒg[ƒNƒ“‚ðŽæ“¾(&O)",
                      IDC_LOGON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,77,
                      217,10
!     CONTROL         "ƒ^ƒXƒNƒo[‚É AFS Light ƒAƒCƒRƒ“‚ð•\Ž¦(&H)",IDC_TRAYICON,
!                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,95,215,10
      LTEXT           "’: AFS Light ‚ª AFS ƒQ[ƒgƒEƒFƒC‚ÉÚ‘±‚µ‚Ä‚¢‚È‚¢‚½‚ßA‚±‚ê‚ç‚Ì§Œä‚ÍŽg—p‚Å‚«‚Ü‚¹‚ñB",
                      IDC_WARN,13,114,219,17
  END
--- 79,86 ----
      CONTROL         "Windows ‚Ö‚ÌƒƒOƒCƒ“Žž‚É AFS ƒg[ƒNƒ“‚ðŽæ“¾(&O)",
                      IDC_LOGON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,77,
                      217,10
! //    CONTROL         "ƒ^ƒXƒNƒo[‚É AFS Light ƒAƒCƒRƒ“‚ð•\Ž¦(&H)",IDC_TRAYICON,
! //                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,95,215,10
      LTEXT           "’: AFS Light ‚ª AFS ƒQ[ƒgƒEƒFƒC‚ÉÚ‘±‚µ‚Ä‚¢‚È‚¢‚½‚ßA‚±‚ê‚ç‚Ì§Œä‚ÍŽg—p‚Å‚«‚Ü‚¹‚ñB",
                      IDC_WARN,13,114,219,17
  END
Index: openafs/src/WINNT/client_config/lang/ko_KR/afs_config.rc
diff -c openafs/src/WINNT/client_config/lang/ko_KR/afs_config.rc:1.5 openafs/src/WINNT/client_config/lang/ko_KR/afs_config.rc:1.5.6.1
*** openafs/src/WINNT/client_config/lang/ko_KR/afs_config.rc:1.5	Fri Apr 29 15:50:16 2005
--- openafs/src/WINNT/client_config/lang/ko_KR/afs_config.rc	Wed Sep 13 13:51:59 2006
***************
*** 51,59 ****
      EDITTEXT        IDC_CELL,59,22,114,13,ES_LOWERCASE | ES_AUTOHSCROLL
      CONTROL         "Windows·Î ·Î±×ÀÎÇÒ ¶§ AFS ÅäÅ« È®º¸(&O)",IDC_LOGON,
                      "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,50,193,10
!     CONTROL         "ÀÛ¾÷ Ç¥½ÃÁÙ¿¡ AFS Å¬¶óÀÌ¾ðÆ® ¾ÆÀÌÄÜ Ç¥½Ã(&H)",
!                     IDC_TRAYICON,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,13,72,193,10
      LTEXT           "ÁÖ: ÀÌ Á¦¾î´Â AFS Å¬¶óÀÌ¾ðÆ® ¼­ºñ½º°¡ ½ÇÇà ÁßÀÌÁö ¾ÊÀ¸¹Ç·Î »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.",
                      IDC_WARN,13,124,193,17
      GROUPBOX        "Å¬¶óÀÌ¾ðÆ® »óÅÂ",IDC_STATIC,7,157,206,61
--- 51,59 ----
      EDITTEXT        IDC_CELL,59,22,114,13,ES_LOWERCASE | ES_AUTOHSCROLL
      CONTROL         "Windows·Î ·Î±×ÀÎÇÒ ¶§ AFS ÅäÅ« È®º¸(&O)",IDC_LOGON,
                      "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,50,193,10
! //    CONTROL         "ÀÛ¾÷ Ç¥½ÃÁÙ¿¡ AFS Å¬¶óÀÌ¾ðÆ® ¾ÆÀÌÄÜ Ç¥½Ã(&H)",
! //                    IDC_TRAYICON,"Button",
! //                    BS_AUTOCHECKBOX | WS_TABSTOP,13,72,193,10
      LTEXT           "ÁÖ: ÀÌ Á¦¾î´Â AFS Å¬¶óÀÌ¾ðÆ® ¼­ºñ½º°¡ ½ÇÇà ÁßÀÌÁö ¾ÊÀ¸¹Ç·Î »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.",
                      IDC_WARN,13,124,193,17
      GROUPBOX        "Å¬¶óÀÌ¾ðÆ® »óÅÂ",IDC_STATIC,7,157,206,61
***************
*** 76,83 ****
                      WS_DISABLED | NOT WS_TABSTOP
      CONTROL         "Windows·Î ·Î±×ÀÎÇÒ ¶§ AFS ÅäÅ« È®º¸(&O)",IDC_LOGON,
                      "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,73,193,10
!     CONTROL         "ÀÛ¾÷ Ç¥½ÃÁÙ¿¡ AFS ¶óÀÌÆ® ¾ÆÀÌÄÜ Ç¥½Ã(&H)",IDC_TRAYICON,
!                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,93,193,10
      LTEXT           "ÁÖ: ÀÌ Á¦¾î´Â AFS ¶óÀÌÆ®°¡ AFS °ÔÀÌÆ®¿þÀÌ¿¡ Á¢¼ÓµÇÁö ¾Ê¾ÒÀ¸¹Ç·Î »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.",
                      IDC_WARN,13,114,219,17
  END
--- 76,83 ----
                      WS_DISABLED | NOT WS_TABSTOP
      CONTROL         "Windows·Î ·Î±×ÀÎÇÒ ¶§ AFS ÅäÅ« È®º¸(&O)",IDC_LOGON,
                      "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,73,193,10
! //    CONTROL         "ÀÛ¾÷ Ç¥½ÃÁÙ¿¡ AFS ¶óÀÌÆ® ¾ÆÀÌÄÜ Ç¥½Ã(&H)",IDC_TRAYICON,
! //                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,93,193,10
      LTEXT           "ÁÖ: ÀÌ Á¦¾î´Â AFS ¶óÀÌÆ®°¡ AFS °ÔÀÌÆ®¿þÀÌ¿¡ Á¢¼ÓµÇÁö ¾Ê¾ÒÀ¸¹Ç·Î »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.",
                      IDC_WARN,13,114,219,17
  END
Index: openafs/src/WINNT/client_config/lang/pt_BR/afs_config.rc
diff -c openafs/src/WINNT/client_config/lang/pt_BR/afs_config.rc:1.5 openafs/src/WINNT/client_config/lang/pt_BR/afs_config.rc:1.5.6.1
*** openafs/src/WINNT/client_config/lang/pt_BR/afs_config.rc:1.5	Fri Apr 29 15:50:21 2005
--- openafs/src/WINNT/client_config/lang/pt_BR/afs_config.rc	Wed Sep 13 13:51:59 2006
***************
*** 52,60 ****
      CONTROL         "&Obter tokens do AFS ao efetuar logon no Windows",
                      IDC_LOGON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,50,
                      193,10
!     CONTROL         "&Mostrar o ícone do AFS Client na barra de tarefas",
!                     IDC_TRAYICON,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,13,72,193,10
      LTEXT           "Nota: estes controles estão desativados porque o serviço AFS Client não está sendo executado.",
                      IDC_WARN,13,124,193,17
      GROUPBOX        "Status do Cliente",IDC_STATIC,7,157,206,61
--- 52,60 ----
      CONTROL         "&Obter tokens do AFS ao efetuar logon no Windows",
                      IDC_LOGON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,50,
                      193,10
! //    CONTROL         "&Mostrar o ícone do AFS Client na barra de tarefas",
! //                    IDC_TRAYICON,"Button",
! //                    BS_AUTOCHECKBOX | WS_TABSTOP,13,72,193,10
      LTEXT           "Nota: estes controles estão desativados porque o serviço AFS Client não está sendo executado.",
                      IDC_WARN,13,124,193,17
      GROUPBOX        "Status do Cliente",IDC_STATIC,7,157,206,61
***************
*** 78,86 ****
      CONTROL         "&Obter tokens do AFS ao efetuar logon no Windows",
                      IDC_LOGON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,73,
                      193,10
!     CONTROL         "&Mostrar o ícone do AFS Básico na barra de tarefas",
!                     IDC_TRAYICON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,93,
!                     193,10
      LTEXT           "Nota: estes controles estão desativados porque o serviço AFS Básico não está conectado a um gateway AFS.",
                      IDC_WARN,13,114,219,17
  END
--- 78,86 ----
      CONTROL         "&Obter tokens do AFS ao efetuar logon no Windows",
                      IDC_LOGON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,73,
                      193,10
! //    CONTROL         "&Mostrar o ícone do AFS Básico na barra de tarefas",
! //                    IDC_TRAYICON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,93,
! //                    193,10
      LTEXT           "Nota: estes controles estão desativados porque o serviço AFS Básico não está conectado a um gateway AFS.",
                      IDC_WARN,13,114,219,17
  END
Index: openafs/src/WINNT/client_config/lang/zh_CN/afs_config.rc
diff -c openafs/src/WINNT/client_config/lang/zh_CN/afs_config.rc:1.5 openafs/src/WINNT/client_config/lang/zh_CN/afs_config.rc:1.5.6.1
*** openafs/src/WINNT/client_config/lang/zh_CN/afs_config.rc:1.5	Fri Apr 29 15:50:25 2005
--- openafs/src/WINNT/client_config/lang/zh_CN/afs_config.rc	Wed Sep 13 13:51:59 2006
***************
*** 51,58 ****
      EDITTEXT        IDC_CELL,62,22,114,13,ES_LOWERCASE | ES_AUTOHSCROLL
      CONTROL         "µÇÂ¼µ½ Windows Ê±»ñµÃ AFS ÁîÅÆ",IDC_LOGON,"Button",
                      BS_AUTOCHECKBOX | WS_TABSTOP,13,50,193,10
!     CONTROL         "ÔÚÈÎÎñÀ¸ÖÐÏÔÊ¾ AFS ¿Í»§»úÍ¼±ê(&I)",IDC_TRAYICON,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,13,72,193,10
      LTEXT           "×¢Òâ£ºÓÉÓÚÃ»ÓÐÔËÐÐ AFS ¿Í»§»ú·þÎñ£¬½«½ûÓÃÕâÐ©¿ØÖÆ¡£",
                      IDC_WARN,13,124,193,17
      GROUPBOX        "¿Í»§»ú×´Ì¬",IDC_STATIC,7,157,206,61
--- 51,58 ----
      EDITTEXT        IDC_CELL,62,22,114,13,ES_LOWERCASE | ES_AUTOHSCROLL
      CONTROL         "µÇÂ¼µ½ Windows Ê±»ñµÃ AFS ÁîÅÆ",IDC_LOGON,"Button",
                      BS_AUTOCHECKBOX | WS_TABSTOP,13,50,193,10
! //    CONTROL         "ÔÚÈÎÎñÀ¸ÖÐÏÔÊ¾ AFS ¿Í»§»úÍ¼±ê(&I)",IDC_TRAYICON,"Button",
! //                    BS_AUTOCHECKBOX | WS_TABSTOP,13,72,193,10
      LTEXT           "×¢Òâ£ºÓÉÓÚÃ»ÓÐÔËÐÐ AFS ¿Í»§»ú·þÎñ£¬½«½ûÓÃÕâÐ©¿ØÖÆ¡£",
                      IDC_WARN,13,124,193,17
      GROUPBOX        "¿Í»§»ú×´Ì¬",IDC_STATIC,7,157,206,61
***************
*** 75,82 ****
                      WS_DISABLED | NOT WS_TABSTOP
      CONTROL         "µÇÂ¼µ½ Windows Ê±»ñµÃ AFS ÁîÅÆ",IDC_LOGON,"Button",
                      BS_AUTOCHECKBOX | WS_TABSTOP,13,73,193,10
!     CONTROL         "ÔÚÈÎÎñÀ¸ÖÐÏÔÊ¾ AFS Light Í¼±ê(&H)",IDC_TRAYICON,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,13,93,193,10
      LTEXT           "×¢Òâ£ºÓÉÓÚ AFS ¿Í»§»úÃ»ÓÐÁ¬½ÓÖÁ AFS Íø¹Ø£¬½«½ûÓÃÕâÐ©¿ØÖÆ¡£",
                      IDC_WARN,13,114,219,17
  END
--- 75,82 ----
                      WS_DISABLED | NOT WS_TABSTOP
      CONTROL         "µÇÂ¼µ½ Windows Ê±»ñµÃ AFS ÁîÅÆ",IDC_LOGON,"Button",
                      BS_AUTOCHECKBOX | WS_TABSTOP,13,73,193,10
! //    CONTROL         "ÔÚÈÎÎñÀ¸ÖÐÏÔÊ¾ AFS Light Í¼±ê(&H)",IDC_TRAYICON,"Button",
! //                    BS_AUTOCHECKBOX | WS_TABSTOP,13,93,193,10
      LTEXT           "×¢Òâ£ºÓÉÓÚ AFS ¿Í»§»úÃ»ÓÐÁ¬½ÓÖÁ AFS Íø¹Ø£¬½«½ûÓÃÕâÐ©¿ØÖÆ¡£",
                      IDC_WARN,13,114,219,17
  END
Index: openafs/src/WINNT/client_config/lang/zh_TW/afs_config.rc
diff -c openafs/src/WINNT/client_config/lang/zh_TW/afs_config.rc:1.5 openafs/src/WINNT/client_config/lang/zh_TW/afs_config.rc:1.5.6.1
*** openafs/src/WINNT/client_config/lang/zh_TW/afs_config.rc:1.5	Fri Apr 29 15:50:29 2005
--- openafs/src/WINNT/client_config/lang/zh_TW/afs_config.rc	Wed Sep 13 13:52:00 2006
***************
*** 51,58 ****
      EDITTEXT        IDC_CELL,68,22,114,13,ES_LOWERCASE | ES_AUTOHSCROLL
      CONTROL         "µn¤J Windows ®É¨ú±o AFS °O¸¹(&O)",IDC_LOGON,"Button",
                      BS_AUTOCHECKBOX | WS_TABSTOP,13,50,193,10
!     CONTROL         "¦b¤u§@¦CÅã¥Ü¡uAFS ¥Î¤áºÝ¡v¹Ï¥Ü(&H)  ",IDC_TRAYICON,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,13,72,193,10
      LTEXT           "ªþµù¡G¥Ñ©ó¨Ã¥¼°õ¦æ¡uAFS ¥Î¤áºÝ¡vªA°È¡A¦]¦¹±±¨î³£¤w°±¥Î¡C",
                      IDC_WARN,13,124,193,17
      GROUPBOX        "¥Î¤áºÝª¬ºA",IDC_STATIC,7,157,206,61
--- 51,58 ----
      EDITTEXT        IDC_CELL,68,22,114,13,ES_LOWERCASE | ES_AUTOHSCROLL
      CONTROL         "µn¤J Windows ®É¨ú±o AFS °O¸¹(&O)",IDC_LOGON,"Button",
                      BS_AUTOCHECKBOX | WS_TABSTOP,13,50,193,10
! //    CONTROL         "¦b¤u§@¦CÅã¥Ü¡uAFS ¥Î¤áºÝ¡v¹Ï¥Ü(&H)  ",IDC_TRAYICON,"Button",
! //                    BS_AUTOCHECKBOX | WS_TABSTOP,13,72,193,10
      LTEXT           "ªþµù¡G¥Ñ©ó¨Ã¥¼°õ¦æ¡uAFS ¥Î¤áºÝ¡vªA°È¡A¦]¦¹±±¨î³£¤w°±¥Î¡C",
                      IDC_WARN,13,124,193,17
      GROUPBOX        "¥Î¤áºÝª¬ºA",IDC_STATIC,7,157,206,61
***************
*** 75,82 ****
                      WS_DISABLED | NOT WS_TABSTOP
      CONTROL         "µn¤J Windows ®É¨ú±o AFS °O¸¹(&O)",IDC_LOGON,"Button",
                      BS_AUTOCHECKBOX | WS_TABSTOP,13,73,193,10
!     CONTROL         "¦b¤u§@¦CÅã¥Ü¡uAFS Light ¡v¹Ï¥Ü(&H)",IDC_TRAYICON,"Button",
!                     BS_AUTOCHECKBOX | WS_TABSTOP,13,93,193,10
      LTEXT           "ªþµù¡G¥Ñ©ó¡uAFS Light ¡v¨Ã¥¼³s±µ¦Ü AFS ¹h¹D¡A¦]¦¹°±¥Î³o¨Ç±±¨î¡C",
                      IDC_WARN,13,114,219,17
  END
--- 75,82 ----
                      WS_DISABLED | NOT WS_TABSTOP
      CONTROL         "µn¤J Windows ®É¨ú±o AFS °O¸¹(&O)",IDC_LOGON,"Button",
                      BS_AUTOCHECKBOX | WS_TABSTOP,13,73,193,10
! //    CONTROL         "¦b¤u§@¦CÅã¥Ü¡uAFS Light ¡v¹Ï¥Ü(&H)",IDC_TRAYICON,"Button",
! //                    BS_AUTOCHECKBOX | WS_TABSTOP,13,93,193,10
      LTEXT           "ªþµù¡G¥Ñ©ó¡uAFS Light ¡v¨Ã¥¼³s±µ¦Ü AFS ¹h¹D¡A¦]¦¹°±¥Î³o¨Ç±±¨î¡C",
                      IDC_WARN,13,114,219,17
  END
Index: openafs/src/WINNT/client_cpa/NTMakefile
diff -c openafs/src/WINNT/client_cpa/NTMakefile:1.6 openafs/src/WINNT/client_cpa/NTMakefile:1.6.4.1
*** openafs/src/WINNT/client_cpa/NTMakefile:1.6	Sun Nov 20 20:56:18 2005
--- openafs/src/WINNT/client_cpa/NTMakefile	Tue Oct 10 11:49:34 2006
***************
*** 50,55 ****
--- 50,56 ----
  
  clean::
  	$(CD) lang
+ 	$(DEL) AFS_component_version_number.h
  	if exist $(NTLANG) $(NTLANG) en_US $(MAKECMD) /nologo /f NTMakefile clean
  	if exist $(NTLANG) $(NTLANG) ja_JP $(MAKECMD) /nologo /f NTMakefile clean
  	if exist $(NTLANG) $(NTLANG) ko_KR $(MAKECMD) /nologo /f NTMakefile clean
Index: openafs/src/WINNT/client_creds/window.cpp
diff -c openafs/src/WINNT/client_creds/window.cpp:1.16 openafs/src/WINNT/client_creds/window.cpp:1.16.4.1
*** openafs/src/WINNT/client_creds/window.cpp:1.16	Sat Oct  1 00:50:44 2005
--- openafs/src/WINNT/client_creds/window.cpp	Tue Oct 10 11:54:33 2006
***************
*** 207,226 ****
                    {
                        if (StartService (hService, 0, 0))
                            TestAndDoMapShare(SERVICE_START_PENDING);
! 		                  if ( KFW_is_available() && KFW_AFS_wait_for_service_start() ) {
  #ifdef USE_MS2MIT
!                               KFW_import_windows_lsa();
  #endif /* USE_MS2MIT */
! 			                  KFW_AFS_renew_tokens_for_all_cells();
! 						  }
  
                        CloseServiceHandle (hService);
                    }
  
                    CloseServiceHandle (hManager);
                }
!               KFW_AFS_wait_for_service_start();
!               ObtainTokensFromUserIfNeeded(g.hMain);
            }
            break;
        }
--- 207,226 ----
                    {
                        if (StartService (hService, 0, 0))
                            TestAndDoMapShare(SERVICE_START_PENDING);
! 		      if ( KFW_is_available() && KFW_AFS_wait_for_service_start() ) {
  #ifdef USE_MS2MIT
! 			  KFW_import_windows_lsa();
  #endif /* USE_MS2MIT */
! 			  KFW_AFS_renew_tokens_for_all_cells();
! 		      }
  
                        CloseServiceHandle (hService);
                    }
  
                    CloseServiceHandle (hManager);
                }
!               if (KFW_AFS_wait_for_service_start())
! 		  ObtainTokensFromUserIfNeeded(g.hMain);
            }
            break;
        }
Index: openafs/src/WINNT/client_exp/NTMakefile
diff -c openafs/src/WINNT/client_exp/NTMakefile:1.9.4.1 openafs/src/WINNT/client_exp/NTMakefile:1.9.4.2
*** openafs/src/WINNT/client_exp/NTMakefile:1.9.4.1	Tue Jun  6 10:47:08 2006
--- openafs/src/WINNT/client_exp/NTMakefile	Tue Oct 10 11:49:34 2006
***************
*** 131,136 ****
--- 131,137 ----
  clean::
  	$(DEL) *.pdb
  	$(CD) lang
+ 	$(DEL) AFS_component_version_number.h
  	if exist $(NTLANG) $(NTLANG) en_US $(MAKECMD) /nologo /f NTMakefile clean
  	if exist $(NTLANG) $(NTLANG) ja_JP $(MAKECMD) /nologo /f NTMakefile clean
  	if exist $(NTLANG) $(NTLANG) ko_KR $(MAKECMD) /nologo /f NTMakefile clean
Index: openafs/src/WINNT/client_osi/osibasel.c
diff -c openafs/src/WINNT/client_osi/osibasel.c:1.4.4.1 openafs/src/WINNT/client_osi/osibasel.c:1.4.4.2
*** openafs/src/WINNT/client_osi/osibasel.c:1.4.4.1	Thu Jun  1 11:36:18 2006
--- openafs/src/WINNT/client_osi/osibasel.c	Mon Oct  2 22:48:23 2006
***************
*** 56,61 ****
--- 56,63 ----
  		lockp->flags |= OSI_LOCKFLAG_EXCL;
  	}
  
+         lockp->tid = thrd_Current();
+ 
  	LeaveCriticalSection(csp);
  }
  
***************
*** 85,91 ****
  		/* if we're here, all clear to set the lock */
  		lockp->readers++;
  	}
! 	LeaveCriticalSection(csp);
  }
  
  void lock_ReleaseRead(osi_rwlock_t *lockp)
--- 87,94 ----
  		/* if we're here, all clear to set the lock */
  		lockp->readers++;
  	}
! 
!         LeaveCriticalSection(csp);
  }
  
  void lock_ReleaseRead(osi_rwlock_t *lockp)
***************
*** 132,137 ****
--- 135,142 ----
  
  	osi_assertx(lockp->flags & OSI_LOCKFLAG_EXCL, "write lock not held");
  	
+         lockp->tid = 0;
+ 
  	lockp->flags &= ~OSI_LOCKFLAG_EXCL;
  	if (!osi_TEmpty(&lockp->d.turn)) {
  		osi_TSignalForMLs(&lockp->d.turn, 0, csp);
***************
*** 163,168 ****
--- 168,175 ----
  	lockp->flags &= ~OSI_LOCKFLAG_EXCL;
          lockp->readers++;
  
+         lockp->tid = 0;
+ 
  	if (!osi_TEmpty(&lockp->d.turn)) {
  		osi_TSignalForMLs(&lockp->d.turn, /* still have readers */ 1, csp);
  	}
***************
*** 283,289 ****
  		i = 1;
  	}
  
! 	LeaveCriticalSection(csp);
  
  	return i;
  }
--- 290,299 ----
  		i = 1;
  	}
  
! 	if (i)
! 	    lockp->tid = thrd_Current();
! 
!         LeaveCriticalSection(csp);
  
  	return i;
  }
***************
*** 311,316 ****
--- 321,329 ----
  		i = 1;
  	}
  
+         if (i)
+ 	    lockp->tid = thrd_Current();
+ 
  	LeaveCriticalSection(csp);
  
  	return i;
***************
*** 452,457 ****
--- 465,471 ----
  	mp->flags = 0;
  	mp->atomicIndex = osi_MUTEXHASH(mp);
  	mp->readers = 0;
+         mp->tid = 0;
          osi_TInit(&mp->d.turn);
  	return;
  }
Index: openafs/src/WINNT/client_osi/osibasel.h
diff -c openafs/src/WINNT/client_osi/osibasel.h:1.5 openafs/src/WINNT/client_osi/osibasel.h:1.5.4.1
*** openafs/src/WINNT/client_osi/osibasel.h:1.5	Sun Nov  6 04:29:36 2005
--- openafs/src/WINNT/client_osi/osibasel.h	Mon Oct  2 22:48:23 2006
***************
*** 56,61 ****
--- 56,62 ----
  	char type;			/* for all types; type 0 uses atomic count */
  	char flags;			/* flags for base type */
          unsigned short atomicIndex;	/* index into hash table for low-level sync */
+         DWORD tid;			/* writer's tid */
          unsigned short waiters;		/* waiters */
  	unsigned short readers;		/* readers */
  	union {
Index: openafs/src/WINNT/client_osi/osilog.c
diff -c openafs/src/WINNT/client_osi/osilog.c:1.12 openafs/src/WINNT/client_osi/osilog.c:1.12.4.2
*** openafs/src/WINNT/client_osi/osilog.c:1.12	Sat Nov  5 01:47:55 2005
--- openafs/src/WINNT/client_osi/osilog.c	Sat Oct  7 18:36:03 2006
***************
*** 54,60 ****
  };
  
  /* create a new log, taking a name and a size in entries (not words) */
! osi_log_t *osi_LogCreate(char *namep, long size)
  {
  	osi_log_t *logp;
          osi_fdType_t *typep;
--- 54,60 ----
  };
  
  /* create a new log, taking a name and a size in entries (not words) */
! osi_log_t *osi_LogCreate(char *namep, size_t size)
  {
  	osi_log_t *logp;
          osi_fdType_t *typep;
***************
*** 253,259 ****
  			lep->parms[0], lep->parms[1],
  			lep->parms[2], lep->parms[3]);
  		snprintf(wholemsg, sizeof(wholemsg),
! 			 "time %d.%06d, tid %d %s\n",
  			lep->micros / 1000000,
  			lep->micros % 1000000,
  			lep->tid, msg);
--- 253,259 ----
  			lep->parms[0], lep->parms[1],
  			lep->parms[2], lep->parms[3]);
  		snprintf(wholemsg, sizeof(wholemsg),
! 			 "time %d.%06d, tid %d %s\r\n",
  			lep->micros / 1000000,
  			lep->micros % 1000000,
  			lep->tid, msg);
Index: openafs/src/WINNT/client_osi/osistatl.h
diff -c openafs/src/WINNT/client_osi/osistatl.h:1.5 openafs/src/WINNT/client_osi/osistatl.h:1.5.8.1
*** openafs/src/WINNT/client_osi/osistatl.h:1.5	Sat Oct 16 22:44:52 2004
--- openafs/src/WINNT/client_osi/osistatl.h	Mon Oct  2 22:48:23 2006
***************
*** 59,64 ****
--- 59,65 ----
  	osi_turnstile_t turn;  	/* the real turnstile */
  	unsigned long refCount;	/* so we can iterate cleanly */
  	short states;
+         DWORD tid;
  
  	/* track # of lock calls and blocks */
  	LARGE_INTEGER lockedTime;	/* total time held */
***************
*** 81,86 ****
--- 82,88 ----
  	osi_turnstile_t turn;		/* the real turnstile */
  	unsigned long refCount;		/* so we can iterate cleanly */
  	short states;
+         DWORD tid;
  
  	/* statistics */
  	LARGE_INTEGER writeLockedTime;	/* total time held */
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.2 openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm:1.5.4.3
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm:1.5.4.2	Sun Sep  3 12:55:28 2006
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm	Sun Oct  8 21:22:30 2006
***************
*** 198,204 ****
  
  <h1>OpenAFS for Windows</h1>
  
! <h2>Version 1.5.8</h2>
  
  <p class=MsoNormal><span style='mso-fareast-font-family:"MS Mincho"'>&nbsp; <o:p></o:p></span></p>
  
--- 198,204 ----
  
  <h1>OpenAFS for Windows</h1>
  
! <h2>Version 1.5.9</h2>
  
  <p class=MsoNormal><span style='mso-fareast-font-family:"MS Mincho"'>&nbsp; <o:p></o:p></span></p>
  
***************
*** 223,229 ****
  mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
  style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span></span><![endif]><a
! href="ReleaseNotes/frames.htm">OpenAFS for Windows
  Release Notes</a></p>
  
  <p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1;
--- 223,229 ----
  mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
  style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span></span><![endif]><a
! href="ReleaseNotes/frames.htm">OpenAFS for Windows 1.5.9
  Release Notes</a></p>
  
  <p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1;
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.3 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm:1.1.6.4
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm:1.1.6.3	Sun Sep  3 12:55:33 2006
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm	Sun Oct  8 21:22:36 2006
***************
*** 3,9 ****
  <head>
  <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
  <meta name=Generator content="Microsoft Word 11 (filtered)">
! <title>OpenAFS for Windows 1.5.8 Release Notes</title>
  <style>
  <!--
   /* Font Definitions */
--- 3,9 ----
  <head>
  <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
  <meta name=Generator content="Microsoft Word 11 (filtered)">
! <title>OpenAFS for Windows 1.5.9 Release Notes</title>
  <style>
  <!--
   /* Font Definitions */
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.5 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes-frames.htm:1.1.4.6
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes-frames.htm:1.1.4.5	Sun Sep  3 12:55:33 2006
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes-frames.htm	Sun Oct  8 21:22:36 2006
***************
*** 1,32 ****
! <html>
  
  <head>
  <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
! <meta name=Generator content="Microsoft Word 11 (filtered)">
! <title>OpenAFS for Windows 1.5.8 Release Notes</title>
  <style>
  <!--
   /* Font Definitions */
   @font-face
  	{font-family:"MS Mincho";
! 	panose-1:2 2 6 9 4 2 5 8 3 4;}
  @font-face
  	{font-family:"\@MS Mincho";
! 	panose-1:2 2 6 9 4 2 5 8 3 4;}
   /* Style Definitions */
   p.MsoNormal, li.MsoNormal, div.MsoNormal
! 	{margin:0pt;
  	margin-bottom:.0001pt;
  	font-size:12.0pt;
! 	font-family:"Times New Roman";}
  @page Section1
  	{size:612.0pt 792.0pt;
! 	margin:72.0pt 90.0pt 72.0pt 90.0pt;}
  div.Section1
  	{page:Section1;}
  -->
  </style>
! 
  </head>
  
  <frameset cols="216,1*">
--- 1,89 ----
! <html xmlns:o="urn:schemas-microsoft-com:office:office"
! xmlns:w="urn:schemas-microsoft-com:office:word"
! xmlns="http://www.w3.org/TR/REC-html40">
  
  <head>
  <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
! <meta name=ProgId content=Word.Document>
! <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.9 Release Notes</title>
! <!--[if gte mso 9]><xml>
!  <w:WordDocument>
!   <w:Zoom>0</w:Zoom>
!   <w:ValidateAgainstSchemas/>
!   <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
!   <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
!   <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
!   <w:Compatibility>
!    <w:UseFELayout/>
!   </w:Compatibility>
!   <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
!  </w:WordDocument>
! </xml><![endif]--><!--[if gte mso 9]><xml>
!  <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
!  </w:LatentStyles>
! </xml><![endif]-->
  <style>
  <!--
   /* Font Definitions */
   @font-face
  	{font-family:"MS Mincho";
! 	panose-1:2 2 6 9 4 2 5 8 3 4;
! 	mso-font-alt:"\FF2D\FF33 \660E\671D";
! 	mso-font-charset:128;
! 	mso-generic-font-family:roman;
! 	mso-font-format:other;
! 	mso-font-pitch:fixed;
! 	mso-font-signature:1 134676480 16 0 131072 0;}
  @font-face
  	{font-family:"\@MS Mincho";
! 	panose-1:2 2 6 9 4 2 5 8 3 4;
! 	mso-font-charset:128;
! 	mso-generic-font-family:auto;
! 	mso-font-pitch:auto;
! 	mso-font-signature:0 0 0 0 0 0;}
   /* Style Definitions */
   p.MsoNormal, li.MsoNormal, div.MsoNormal
! 	{mso-style-parent:"";
! 	margin:0pt;
  	margin-bottom:.0001pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:"Times New Roman";
! 	mso-fareast-font-family:"MS Mincho";}
  @page Section1
  	{size:612.0pt 792.0pt;
! 	margin:72.0pt 90.0pt 72.0pt 90.0pt;
! 	mso-header-margin:36.0pt;
! 	mso-footer-margin:36.0pt;
! 	mso-paper-source:0;}
  div.Section1
  	{page:Section1;}
  -->
  </style>
! <!--[if gte mso 10]>
! <style>
!  /* Style Definitions */
!  table.MsoNormalTable
! 	{mso-style-name:"Table Normal";
! 	mso-tstyle-rowband-size:0;
! 	mso-tstyle-colband-size:0;
! 	mso-style-noshow:yes;
! 	mso-style-parent:"";
! 	mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
! 	mso-para-margin:0pt;
! 	mso-para-margin-bottom:.0001pt;
! 	mso-pagination:widow-orphan;
! 	font-size:10.0pt;
! 	font-family:"Times New Roman";
! 	mso-fareast-font-family:"Times New Roman";
! 	mso-ansi-language:#0400;
! 	mso-fareast-language:#0400;
! 	mso-bidi-language:#0400;}
! </style>
! <![endif]-->
  </head>
  
  <frameset cols="216,1*">
***************
*** 36,42 ****
   </frameset>
   <frame name=Frame1 src=relnotes.htm>
   <noframes>
!   <body lang=EN-US>
    <div class=Section1>
    <p class=MsoNormal>This page uses frames, but your browser doesn't support
    them.</p>
--- 93,99 ----
   </frameset>
   <frame name=Frame1 src=relnotes.htm>
   <noframes>
!   <body lang=EN-US style='tab-interval:36.0pt'>
    <div class=Section1>
    <p class=MsoNormal>This page uses frames, but your browser doesn't support
    them.</p>
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.4 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm:1.6.4.6
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm:1.6.4.4	Sun Sep  3 12:55:33 2006
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm	Mon Oct 16 10:13:09 2006
***************
*** 1,55 ****
! <html>
  
  <head>
  <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
! <meta name=Generator content="Microsoft Word 11 (filtered)">
! <title>OpenAFS for Windows 1.5.8 Release Notes</title>
! 
  <style>
  <!--
   /* Font Definitions */
   @font-face
- 	{font-family:Wingdings;
- 	panose-1:5 0 0 0 0 0 0 0 0 0;}
- @font-face
  	{font-family:"MS Mincho";
! 	panose-1:2 2 6 9 4 2 5 8 3 4;}
  @font-face
! 	{font-family:Tahoma;
! 	panose-1:2 11 6 4 3 5 4 4 2 4;}
  @font-face
  	{font-family:Albany;
! 	panose-1:2 11 6 4 2 2 2 2 2 4;}
  @font-face
  	{font-family:StarSymbol;
! 	panose-1:5 0 0 0 0 0 0 0 0 0;}
  @font-face
  	{font-family:Thorndale;
! 	panose-1:2 2 6 3 5 4 5 2 3 4;}
  @font-face
  	{font-family:Cumberland;
! 	panose-1:2 7 3 9 2 2 5 2 4 4;}
  @font-face
  	{font-family:"Andale Sans UI";
! 	panose-1:2 11 5 2 0 0 0 0 0 1;}
! @font-face
! 	{font-family:"\@MS Mincho";
! 	panose-1:2 2 6 9 4 2 5 8 3 4;}
   /* Style Definitions */
   p.MsoNormal, li.MsoNormal, div.MsoNormal
! 	{margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:0pt;
  	font-size:12.0pt;
! 	font-family:Thorndale;}
  h1
  	{margin-top:12.0pt;
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
! 	text-indent:0pt;
  	page-break-after:avoid;
  	font-size:16.0pt;
  	font-family:Albany;}
  h2
--- 1,129 ----
! <html xmlns:v="urn:schemas-microsoft-com:vml"
! xmlns:o="urn:schemas-microsoft-com:office:office"
! xmlns:w="urn:schemas-microsoft-com:office:word"
! xmlns:st1="urn:schemas-microsoft-com:office:smarttags"
! xmlns="http://www.w3.org/TR/REC-html40">
  
  <head>
  <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
! <meta name=ProgId content=Word.Document>
! <meta name=Generator content="Microsoft Word 11">
! <meta name=Originator content="Microsoft Word 11">
! <link rel=File-List href="relnotes_files/filelist.xml">
! <title>OpenAFS for Windows 1.5.9 Release Notes</title>
! <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="PostalCode"/>
! <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="State"/>
! <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="City"/>
! <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="Street"/>
! <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="address"/>
! <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="country-region"/>
! <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="PlaceType"/>
! <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="PlaceName"/>
! <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="place"/>
! <!--[if gte mso 9]><xml>
!  <w:WordDocument>
!   <w:Zoom>0</w:Zoom>
!   <w:ValidateAgainstSchemas/>
!   <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
!   <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
!   <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
!   <w:Compatibility>
!    <w:UseFELayout/>
!   </w:Compatibility>
!   <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
!  </w:WordDocument>
! </xml><![endif]--><!--[if gte mso 9]><xml>
!  <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
!  </w:LatentStyles>
! </xml><![endif]--><!--[if !mso]><object
!  classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></object>
! <style>
! st1\:*{behavior:url(#ieooui) }
! </style>
! <![endif]-->
  <style>
  <!--
   /* Font Definitions */
   @font-face
  	{font-family:"MS Mincho";
! 	panose-1:2 2 6 9 4 2 5 8 3 4;
! 	mso-font-alt:"\FF2D\FF33 \660E\671D";
! 	mso-font-charset:128;
! 	mso-generic-font-family:roman;
! 	mso-font-format:other;
! 	mso-font-pitch:fixed;
! 	mso-font-signature:1 134676480 16 0 131072 0;}
  @font-face
! 	{font-family:"\@MS Mincho";
! 	panose-1:2 2 6 9 4 2 5 8 3 4;
! 	mso-font-charset:128;
! 	mso-generic-font-family:auto;
! 	mso-font-pitch:auto;
! 	mso-font-signature:0 0 0 0 0 0;}
  @font-face
  	{font-family:Albany;
! 	panose-1:2 11 6 4 2 2 2 2 2 4;
! 	mso-font-charset:0;
! 	mso-generic-font-family:swiss;
! 	mso-font-pitch:variable;
! 	mso-font-signature:647 0 0 0 159 0;}
  @font-face
  	{font-family:StarSymbol;
! 	panose-1:5 0 0 0 0 0 0 0 0 0;
! 	mso-font-charset:0;
! 	mso-generic-font-family:auto;
! 	mso-font-pitch:variable;
! 	mso-font-signature:3 268468224 0 0 1 0;}
  @font-face
  	{font-family:Thorndale;
! 	panose-1:2 2 6 3 5 4 5 2 3 4;
! 	mso-font-charset:0;
! 	mso-generic-font-family:roman;
! 	mso-font-pitch:variable;
! 	mso-font-signature:647 0 0 0 159 0;}
  @font-face
  	{font-family:Cumberland;
! 	panose-1:2 7 3 9 2 2 5 2 4 4;
! 	mso-font-charset:0;
! 	mso-generic-font-family:modern;
! 	mso-font-pitch:fixed;
! 	mso-font-signature:647 0 0 0 159 0;}
  @font-face
  	{font-family:"Andale Sans UI";
! 	panose-1:2 11 5 2 0 0 0 0 0 1;
! 	mso-font-charset:0;
! 	mso-generic-font-family:swiss;
! 	mso-font-pitch:variable;
! 	mso-font-signature:647 0 0 0 159 0;}
   /* Style Definitions */
   p.MsoNormal, li.MsoNormal, div.MsoNormal
! 	{mso-style-parent:"";
! 	margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:0pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:Thorndale;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:"Times New Roman";}
  h1
  	{margin-top:12.0pt;
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
! 	mso-pagination:widow-orphan;
  	page-break-after:avoid;
+ 	mso-outline-level:1;
  	font-size:16.0pt;
  	font-family:Albany;}
  h2
***************
*** 57,64 ****
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
! 	text-indent:0pt;
  	page-break-after:avoid;
  	font-size:14.0pt;
  	font-family:Albany;
  	font-style:italic;}
--- 131,139 ----
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
! 	mso-pagination:widow-orphan;
  	page-break-after:avoid;
+ 	mso-outline-level:2;
  	font-size:14.0pt;
  	font-family:Albany;
  	font-style:italic;}
***************
*** 67,74 ****
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
! 	text-indent:0pt;
  	page-break-after:avoid;
  	font-size:14.0pt;
  	font-family:Albany;}
  h4
--- 142,150 ----
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
! 	mso-pagination:widow-orphan;
  	page-break-after:avoid;
+ 	mso-outline-level:3;
  	font-size:14.0pt;
  	font-family:Albany;}
  h4
***************
*** 76,82 ****
--- 152,160 ----
  	margin-right:0pt;
  	margin-bottom:3.0pt;
  	margin-left:0pt;
+ 	mso-pagination:widow-orphan;
  	page-break-after:avoid;
+ 	mso-outline-level:4;
  	font-size:14.0pt;
  	font-family:"Times New Roman";}
  h5
***************
*** 84,89 ****
--- 162,169 ----
  	margin-right:0pt;
  	margin-bottom:3.0pt;
  	margin-left:0pt;
+ 	mso-pagination:widow-orphan;
+ 	mso-outline-level:5;
  	font-size:13.0pt;
  	font-family:Thorndale;
  	font-style:italic;}
***************
*** 92,97 ****
--- 172,179 ----
  	margin-right:0pt;
  	margin-bottom:3.0pt;
  	margin-left:0pt;
+ 	mso-pagination:widow-orphan;
+ 	mso-outline-level:6;
  	font-size:11.0pt;
  	font-family:"Times New Roman";}
  p.MsoToc1, li.MsoToc1, div.MsoToc1
***************
*** 99,148 ****
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:0pt;
  	font-size:12.0pt;
! 	font-family:Thorndale;}
  p.MsoToc2, li.MsoToc2, div.MsoToc2
  	{margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:14.15pt;
  	font-size:12.0pt;
! 	font-family:Thorndale;}
  p.MsoToc3, li.MsoToc3, div.MsoToc3
  	{margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:28.3pt;
  	font-size:12.0pt;
! 	font-family:Thorndale;}
  p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
  	{margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:0pt;
  	font-size:10.0pt;
! 	font-family:Thorndale;}
  p.MsoHeader, li.MsoHeader, div.MsoHeader
  	{margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:0pt;
  	font-size:12.0pt;
! 	font-family:Thorndale;}
  p.MsoFooter, li.MsoFooter, div.MsoFooter
  	{margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:0pt;
  	font-size:12.0pt;
! 	font-family:Thorndale;}
  p.MsoEnvelopeAddress, li.MsoEnvelopeAddress, div.MsoEnvelopeAddress
  	{margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:144.0pt;
  	font-size:12.0pt;
! 	font-family:Arial;}
  span.MsoFootnoteReference
  	{vertical-align:super;}
  p.MsoList, li.MsoList, div.MsoList
--- 181,250 ----
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:0pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:Thorndale;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:"Times New Roman";}
  p.MsoToc2, li.MsoToc2, div.MsoToc2
  	{margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:14.15pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:Thorndale;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:"Times New Roman";}
  p.MsoToc3, li.MsoToc3, div.MsoToc3
  	{margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:28.3pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:Thorndale;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:"Times New Roman";}
  p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
  	{margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:0pt;
+ 	mso-pagination:widow-orphan;
  	font-size:10.0pt;
! 	font-family:Thorndale;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:"Times New Roman";}
  p.MsoHeader, li.MsoHeader, div.MsoHeader
  	{margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:0pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:Thorndale;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:"Times New Roman";}
  p.MsoFooter, li.MsoFooter, div.MsoFooter
  	{margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:0pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:Thorndale;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:"Times New Roman";}
  p.MsoEnvelopeAddress, li.MsoEnvelopeAddress, div.MsoEnvelopeAddress
  	{margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:144.0pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:Arial;
! 	mso-fareast-font-family:"MS Mincho";}
  span.MsoFootnoteReference
  	{vertical-align:super;}
  p.MsoList, li.MsoList, div.MsoList
***************
*** 150,733 ****
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
  	font-size:12.0pt;
! 	font-family:Thorndale;}
  p.MsoTitle, li.MsoTitle, div.MsoTitle
  	{margin-top:12.0pt;
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
  	text-align:center;
  	page-break-after:avoid;
  	font-size:18.0pt;
  	font-family:Albany;
  	font-weight:bold;}
  p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
  	{margin-top:0pt;
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
  	font-size:12.0pt;
! 	font-family:Thorndale;}
  p.MsoBodyTextIndent, li.MsoBodyTextIndent, div.MsoBodyTextIndent
  	{margin-top:0pt;
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:14.15pt;
  	font-size:12.0pt;
! 	font-family:Thorndale;}
  p.MsoSubtitle, li.MsoSubtitle, div.MsoSubtitle
  	{margin-top:12.0pt;
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
  	text-align:center;
  	page-break-after:avoid;
  	font-size:14.0pt;
  	font-family:Albany;
  	font-style:italic;}
  a:link, span.MsoHyperlink
  	{color:navy;
! 	text-decoration:underline;}
  a:visited, span.MsoHyperlinkFollowed
  	{color:maroon;
! 	text-decoration:underline;}
  pre
  	{margin:0pt;
  	margin-bottom:.0001pt;
  	font-size:10.0pt;
! 	font-family:"Courier New";}
! span.Bullets
! 	{font-family:StarSymbol;}
! p.Heading, li.Heading, div.Heading
! 	{margin-top:12.0pt;
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
  	page-break-after:avoid;
  	font-size:14.0pt;
! 	font-family:Albany;}
! p.Caption1, li.Caption1, div.Caption1
! 	{margin-top:6.0pt;
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
  	font-size:10.0pt;
  	font-family:Thorndale;
  	font-style:italic;}
! p.Index, li.Index, div.Index
! 	{margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:0pt;
  	font-size:12.0pt;
! 	font-family:Thorndale;}
! p.ContentsHeading, li.ContentsHeading, div.ContentsHeading
! 	{margin-top:12.0pt;
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
  	page-break-after:avoid;
  	font-size:16.0pt;
  	font-family:Albany;
  	font-weight:bold;}
! p.PreformattedText, li.PreformattedText, div.PreformattedText
! 	{margin:0pt;
  	margin-bottom:.0001pt;
  	font-size:10.0pt;
! 	font-family:Cumberland;}
! p.ListContents, li.ListContents, div.ListContents
! 	{margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:28.35pt;
  	font-size:12.0pt;
! 	font-family:Thorndale;}
! p.ListHeading, li.ListHeading, div.ListHeading
! 	{margin-top:4.3pt;
  	margin-right:0pt;
  	margin-bottom:4.3pt;
  	margin-left:0pt;
  	font-size:12.0pt;
! 	font-family:Thorndale;}
! span.HeadingChar
! 	{font-family:Albany;}
! span.Heading3Char
! 	{font-family:Albany;
! 	font-weight:bold;}
! p.Header5, li.Header5, div.Header5
! 	{margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:0pt;
  	font-size:12.0pt;
! 	font-family:Thorndale;}
! p.Heading3, li.Heading3, div.Heading3
! 	{margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:0pt;
  	font-size:12.0pt;
! 	font-family:Thorndale;}
! span.Heading4Char
! 	{font-family:"Andale Sans UI";
! 	font-weight:bold;}
! p.Default, li.Default, div.Default
! 	{margin:0pt;
  	margin-bottom:.0001pt;
  	text-autospace:none;
  	font-size:12.0pt;
  	font-family:Arial;
  	color:black;}
! span.BodyTextChar
! 	{font-family:Thorndale;}
!  /* Page Definitions */
!  @page Section1
  	{size:612.0pt 792.0pt;
! 	margin:72.0pt 90.0pt 72.0pt 90.0pt;}
  div.Section1
  	{page:Section1;}
- @page Section2
- 	{size:612.0pt 792.0pt;
- 	margin:72.0pt 90.0pt 72.0pt 90.0pt;}
- div.Section2
- 	{page:Section2;}
   /* List Definitions */
!  ol
  	{margin-bottom:0pt;}
  ul
  	{margin-bottom:0pt;}
  -->
  </style>
! 
  </head>
  
! <body lang=EN-US link=navy vlink=maroon style='line-break:strict'>
  
  <div class=Section1>
  
! <p class=MsoTitle>OpenAFS for Windows 1.5.8<br>
  Release Notes</p>
  
  <p class=MsoBodyText>The Andrew File System (AFS) is a location-independent
! file system that uses a local cache to increase its performance.  An AFS client
! accesses files anonymously or via a Kerberos authentication.  The global AFS is
! partitioned into cells.  The AFS cell is a collection of AFS volumes that are
! administered by a common entity.   AFS cells can be administered by a
! department even when the Kerberos realm used for local authentication is
! managed by a much larger organization.  AFS clients and servers take advantage
! of Kerberos cross realm authentication to enable authenticated access by
! entities located outside the local realm.  Authorization is enforced by the use
! of directory level access control lists which can consist of individual or
! group identities.  </p>
! 
! <p class=MsoBodyText>The AFS volume is a tree of files and sub-directories. 
! AFS volumes are created by administrators and are joined to an AFS cell via the
! use of a mount point.   Once a volume is created, users can create files and
! directories as well as mount points and symlinks within the volume without
! regard for the physical location of the volume.  Administrators can move the
! volume to another server as necessary without the need to notify users.   In
! fact, the volume move can occur while files in the volume are in use.  </p>
! 
! <p class=MsoBodyText>AFS volumes can be replicated to read-only copies.   When
! accessing files from a read-only replica, clients will read all of the data
! from a single replica.   If that replica becomes unavailable, the clients will
! failover to any replica that is reachable.  Users of the data are unaware of
! where the replicas are stored or which one is being accessed.   The contents of
! the replicas can be updated at any time by <i>releasing</i> the current
! contents of the source volume.</p>
  
  <p class=MsoBodyText>OpenAFS for Windows (OAFW) provides AFS client access
! Microsoft Windows operating systems.  It strives to maintain transparency such
! that the user is unaware of the distinction between the use of AFS and
! Microsoft Windows file shares.   OAFW can be part of a single sign-on solution
! by allowing credentials for a Kerberos principal to be obtained at logon and
! for that principal to be used to obtain AFS tokens for one or more cells.  
! Although OAFW is implemented as a locally installed SMB to AFS gateway, OAFW
! maintains the portability of file paths by its use of the <a href="file:///\\AFS">\\AFS</a>
! UNC server name.</p>
  
  <p class=MsoBodyText>OpenAFS is the product of an open source development
! effort begun on October 31 2000.  OpenAFS is maintained and developed by a
! group of volunteers with the support of the user community.   If you use
! OpenAFS as part of your computing infrastructure please contribute to its
  continued growth.</p>
  
! <p class=MsoToc1><span class=MsoHyperlink><a
! href="#_Toc115417109">1. Installer Options<span
! style='color:windowtext;display:none;text-decoration:none'>. </span><span
! style='color:windowtext;display:none;text-decoration:none'>1</span></a></span></p>
! 
! <p class=MsoToc1><span class=MsoHyperlink><a
! href="#_Toc115417110">2. System Requirements<span
! style='color:windowtext;display:none;text-decoration:none'>. </span><span
! style='color:windowtext;display:none;text-decoration:none'>2</span></a></span></p>
! 
! <p class=MsoToc1><span class=MsoHyperlink><a
! href="#_Toc115417111">3. Operational Notes<span
! style='color:windowtext;display:none;text-decoration:none'>. </span><span
! style='color:windowtext;display:none;text-decoration:none'>2</span></a></span></p>
! 
! <p class=MsoToc1><span class=MsoHyperlink><a
! href="#_Toc115417112">4. How to Debug Problems
! with OpenAFS for Windows:<span style='color:windowtext;display:none;text-decoration:
! none'> </span><span
! style='color:windowtext;display:none;text-decoration:none'>11</span></a></span></p>
! 
! <p class=MsoToc1><span class=MsoHyperlink><a
! href="#_Toc115417113">5. Reporting Bugs:<span
! style='color:windowtext;display:none;text-decoration:none'> </span><span
! style='color:windowtext;display:none;text-decoration:none'>13</span></a></span></p>
! 
! <p class=MsoToc1><span class=MsoHyperlink><a
! href="#_Toc115417114">6. How to Contribute to
! the Development of OpenAFS for Windows<span style='color:windowtext;display:
! none;text-decoration:none'>. </span><span
! style='color:windowtext;display:none;text-decoration:none'>14</span></a></span></p>
! 
! <p class=MsoToc1><span class=MsoHyperlink><a
! href="#_Toc115417115">7. MSI Deployment Guide<span
! style='color:windowtext;display:none;text-decoration:none'>. </span><span
! style='color:windowtext;display:none;text-decoration:none'>15</span></a></span></p>
! 
! <p class=MsoToc1><span class=MsoHyperlink><a
! href="#_Toc115417116">Appendix A: Registry
! Values<span style='color:windowtext;display:none;text-decoration:none'>. </span><span
! style='color:windowtext;display:none;text-decoration:none'>26</span></a></span></p>
! 
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993082"></a><a
! name="_Toc126872163"></a><a name="_Toc115417109"></a><a name="_Toc115417037"></a><a
! name="_Toc115416098">1. Installer Options</a></h1>
! 
! <p class=MsoNormal>It can be installed either as a new installation or an upgrade
! from previous versions of OpenAFS for Windows or IBM AFS for Windows. 
! Installers are provided in two forms:</p>
  
  <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt'><span
! style='font-size:9.0pt'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>an executable (.exe) that is built using the Nullsoft Scriptable
  Installation System, or</p>
  
  <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt'><span
! style='font-size:9.0pt'>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>a Windows Installer package (.msi) that is built using WiX and
! can be customized for organizations via the use of MSI Transforms (see <a
! href="#_MSI_Deployment_Guide">MSI Deployment
! Guide</a>)</p>
! 
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993083"></a><a
! name="_Toc126872164"></a><a name="_Toc115417110"></a><a name="_Toc115417038"></a><a
! name="_Toc115416099">2. System Requirements</a></h1>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993084"></a><a
! name="_Toc126872165"></a><a name="_Toc115417039"></a><a name="_Toc115416100">2.1
! Supported Operating Systems</a></h2>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Microsoft Windows 2000 Workstation</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Microsoft Windows 2000 Server</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Microsoft Windows XP Home</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Microsoft Windows XP Professional</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Microsoft Windows XP 64</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Microsoft Windows 2003 Server (32-bit and 64-bit Intel)</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Microsoft Windows 2003 R2 Server (32-bit and 64-bit Intel)</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Microsoft Windows Vista Beta 2 (32-bit and 64-bit Intel)  (not
! for production use)</p>
! 
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993085"></a><a
! name="_Toc126872166"></a><a name="_Toc115416101">2.1.1 Unsupported Operating
! Systems</a></h3>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Microsoft Windows 95</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Microsoft Windows 98</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Microsoft Windows 98 OSR2</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Microsoft Windows ME</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Microsoft NT</p>
  
  <p class=MsoNormal>Older releases of OpenAFS are available for download if
! unsupported operating systems must be used.  The last version of OpenAFS with
! support for Win9x is 1.2.2b.  The last version with support for Windows NT 4.0
! is 1.2.10.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993086"></a><a
! name="_Toc126872167"></a><a name="_Toc115417040"></a><a name="_Toc115416102">2.2
! Disk Space</a></h2>
  
  <p class=MsoNormal>Up to 60mb required for the OpenAFS binaries plus 100MB for
! the default AFSCache file.   (The size of the AFSCache file may be adjusted via
! the Registry after installation.)</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993087"></a><a
! name="_Toc126872168"></a><a name="_Toc115417041"></a><a name="_Toc115416103">2.3
! Additional Software</a> Packages</h2>
  
  <p class=MsoNormal><a href="http://web.mit.edu/kerberos/dist/index.html">MIT
  Kerberos for Windows</a> 2.6.x or 3.x.x if Kerberos 5 authentication support is
  desired.</p>
  
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993088"></a><a
! name="_Toc126872169"></a><a name="_Toc115417111"></a><a name="_Toc115417042"></a><a
! name="_Toc115416104">3. Operational Notes</a></h1>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993089"></a><a
! name="_Toc126872170"></a><a name="_Toc115417043"></a><a name="_Toc115416105">3.1.
! Requirements for Kerberos 5 Authentication</a></h2>
  
  <p class=MsoNormal>The Kerberos 4 infrastructure on which the OpenAFS 1.2
! series is reliant is no longer secure.  Cross-realm Kerberos is very important
! in the AFS context and most sites have or are migrating to Kerberos 5
! environments.  The OpenAFS 1.4 series integrates with MIT Kerberos for Windows
! 2.6.5 and above to support Kerberos 5 authentication including automatic
! renewal of AFS tokens and single sign-on via the Microsoft Windows Kerberos
! Logon Service.</p>
  
  <p class=MsoNormal>When KFW is installed, the OpenAFS 1.4 client will obtain
! Kerberos 5 tickets and use them as tokens without modification.  The OpenAFS
! 1.4 client requires that all of the AFS Servers with which it communicates
! support the use of Kerberos 5 tickets as tokens. If Kerberos 5 based tokens are
! presented to an AFS server that does not understand them, the server will be
! unable to communicate with the client when tokens are present. Kerberos 5 based
! tokens are supported by OpenAFS release 1.2.8 or later.  IBM Transarc servers
! do not support Kerberos 5.</p>
! 
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993090"></a><a
! name="_Toc126872171"></a><a name="_Toc115416106">3.1.1. Active Directory</a></h3>
  
  <p class=MsoNormal>There are two things to consider when using a Microsoft
  Windows Active Directory as the Kerberos realm that issues the AFS service
! ticket.  First, the Kerberos 5 tickets issued by Active Directory can be quite
! large when compared to tickets issued by a traditional KDC due to the
! incorporation of authorization data in the PAC.  If the issued tickets become
! larger than 344 bytes OpenAFS 1.2 servers will be unable to process them. 
! OpenAFS 1.4 servers can support the largest tickets that Active Directory can
! issue.  Second, the Kerberos 5 tickets issued by Windows 2003 Active Directory
! are encrypted with the DES-CBC-MD5 enctype.  OpenAFS 1.2 servers only support
! the DES-CBC-CRC enctype.</p>
  
  <p class=MsoNormal>Microsoft has documented in <a
  href="http://support.microsoft.com/kb/832572/">Knowledge Base article 832572</a>
  a new NO_AUTH_REQUIRED flag that can be set on the account mapped to the AFS
! service principal which will prevent the generation of a PAC.</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993091"></a><a
! name="_Toc126872172"></a><a name="_Toc115416107">3.1.2. Using the krb524
! service</a></h3>
  
  <p class=MsoNormal>Some organizations which have AFS cell names and Kerberos
  realm names which differ by more then just lower and upper case rely on a
  modification to krb524d which maps a Kerberos 5 ticket from realm FOO to a
! Kerberos 4 ticket in realm BAR.  This allows user@FOO to appear to be user@bar
! for the purposes of accessing the AFS cell.  As of OpenAFS 1.2.8, support was
! added to allow the immediate use of Kerberos 5 tickets as AFS (2b) tokens. This
! is the first building block necessary to break away from the limitations of
! Kerberos 4 with AFS.  By using Kerberos 5 directly we avoid the security holes
! inherent in Kerberos 4 cross-realm.  We also gain access to cryptographically stronger
! algorithms for authentication and encryption. </p>
  
  <p class=MsoNormal>Another reason for using Kerberos 5 directly is because the
  krb524 service runs on a port (4444) which has become increasingly blocked by
! ISPs.  The port was used to spread a worm which attacked Microsoft Windows in
! the summer of 2003.  When the port is blocked users find that they are unable
! to authenticate.</p>
  
  <p class=MsoNormal>Replacing the Kerberos 4 ticket with a Kerberos 5 ticket is
  a win in all situations except when the cell name does not match the realm name
  and the principal names placed into the ACL’s are not the principal names from
! the Kerberos 5 ticket.  To support this transition, OpenAFS for Windows 1.4
! adds a new registry value, <i><a
! href="#_Value___: Use524">Use524</a></i>, to
! force the use of krb524d.  However, the availability of this option should only
! be used by individuals until such time as their organizations can provide a
! more permanent solution.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993092"></a><a
! name="_Toc126872173"></a><a name="_Toc115417044"></a><a name="_Toc115416108">3.2.
! Use of the Microsoft Loopback Adapter</a></h2>
  
  <p class=MsoNormal>By itself the OpenAFS Client Service does not provide robust
! behavior in a plug-n-play network environment.  Changes to the number of
  network adapters or their assigned IP addresses will cause the service to
! terminate unexpectedly.  To avoid this behavior OpenAFS for Windows installs a
! single instance of the Microsoft Loopback Adapter (MLA) on the machine.  With
! the MLA installed, the OpenAFS Client Service will not be affected by the
! configuration changes of other network adapters installed on the system.  </p>
  
  <p class=MsoNormal>The MLA is installed with a name of &quot;AFS&quot; and a
! pre-assigned IP address in the 10.x.x.x range.  The MLA is bound to the “Client
! for Microsoft Networks” service and not bound to the “File and Printer Sharing
! for Microsoft Networks”.  If the MLA is unbound to &quot;Client Microsoft
! Networks&quot;, the OpenAFS Client Service will become inaccessible when the
! machine is disconnected from the network.  If the MLA is bound to &quot;File
! and Printer Sharing ...&quot; there will be a service type collision between
! the name &quot;AFS&quot; and the name of the machine on the MLA's IP Address
! that will result in the OpenAFS client service becoming inaccessible and the
! &quot;NET VIEW \\AFS&quot; command will return a &quot;System Error 52&quot;
! message.  To correct the problem:</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span> stop the AFS Client Service</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span> bind the &quot;Client for Microsoft Networks&quot; to the MLA</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span> unbind &quot;File and Printer Sharing for Microsoft
! Networks&quot; from the MLA</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span> Disable and then re-enable the MLA</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span> start the AFS Client Service</p>
  
  <p class=MsoNormal>When the MLA is not installed the unique NETBIOS name
! published by OpenAFS SMB server is &quot;<i>MACHINE</i>-AFS&quot;.  One of the
! benefits of using the MLA is that the NETBIOS name does not have to be
! published on any adapter other than the MLA.  Therefore the chosen name is no
! longer required to be unique.  Instead the NETBIOS name associated with the AFS
! Client Service is simply &quot;AFS&quot; and portable UNC paths of the form \\AFS\cellname\path
! can now be used on all machines.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993093"></a><a
! name="_Toc126872174"></a><a name="_Toc115417045"></a><a name="_Toc115416109">3.3.
! Using Freelance (Dynamic Root) Mode to Improve Mobility</a></h2>
  
  <p class=MsoNormal>Traditionally, when the OpenAFS Client Service starts it
! must be able to access the &quot;root.afs&quot; volume of the default cell. 
! The &quot;root.afs&quot; volume contains the set of mount points to the
! &quot;root.cell&quot; volumes of various cells the administrator of the default
! cell believes should be accessible.  If the &quot;root.afs&quot; volume is
! inaccessible when the client service is started, the service will terminate
! unexpectedly.  Since many users now use laptops or otherwise operate in
! disconnected environments in which a VPN may be required to access the cell's
! servers, it is often the case that the &quot;root.afs&quot; volume for the
! default cell is not reachable and the OpenAFS Client Service will not
  successfully start. </p>
  
  <p class=MsoNormal>To allow the OpenAFS Client Service to operate in these
  environments, a fake &quot;root.afs&quot; volume is dynamically constructed
! from mount points and symlinks stored in the local registry.  This method of
! operation is referred to as Freelance mode.</p>
  
  <p class=MsoNormal>The content of the fake “root.afs” volume is dynamically
! modified as cells are accessed.  When the fake &quot;root.afs&quot; volume is
! initially constructed it will only contain two mount points: a <i>regular path </i>and
! <i>read-write path </i>mount point used to access the &quot;root.cell&quot;
! volume of the default AFS cell.  Any attempt to access a valid cell name will
! result in a new mount point being created in the fake &quot;root.afs&quot;
! volume.  If the cellname begins with a &quot;.&quot; the mount point will be a <i>read-write
! path</i>; otherwise the mount point will be a <i>regular path</i>.  These mount
! points are preserved in the registry at key:</p>
  
! <p class=PreformattedText style='margin-left:35.45pt'><a
  href="#_Regkey:_[HKLMSOFTWAREOpenAFSClie">HKLM\SOFTWARE\OpenAFS\Client\Freelance</a></p>
  
  <p class=MsoNormal>Additional mount points may be manually created using the
! &quot;fs mkmount&quot; command.  Mount points may be removed using the &quot;fs
! rmmount&quot; command.</p>
  
! <p class=PreformattedText style='margin-left:35.45pt'>&gt;fs mkmount
  \\AFS\athena.mit.edu root.cell athena.mit.edu</p>
  
! <p class=PreformattedText style='margin-left:35.45pt'>&gt;fs mkmount
  \\AFS\.athena.mit.edu root.cell athena.mit.edu -rw</p>
  
! <p class=PreformattedText style='margin-left:35.45pt'>&gt;fs rmmount
  \\AFS\athena.mit.edu</p>
  
! <p class=PreformattedText style='margin-left:35.45pt'>&gt;fs rmmount
  \\AFS\.athena.mit.edu</p>
  
  <p class=MsoNormal>Symlinks may also be created within the Freelance “root.afs”
  volume.</p>
  
! <p class=PreformattedText style='margin-left:35.45pt'>&gt;symlink make \\afs\link
! \\afs\athena.mit.edu\user\j\a\jaltman</p>
  
! <p class=PreformattedText>      &gt;symlink list \\afs\link</p>
  
! <p class=PreformattedText>      '\\afs\link' is a symlink to
! 'athena.mit.edu\user\j\a\jaltman'</p>
  
! <p class=PreformattedText style='margin-left:35.45pt'>&gt;symlink rm \\afs\link</p>
  
  <p class=MsoNormal>The symlinks are stored in the registry at:</p>
  
! <p class=PreformattedText style='margin-left:35.45pt'><a
! href="#_Regkey:_[HKLMSOFTWAREOpenAFSClie_1">HKLM\SOFTWARE\OpenAFS\Client\Freelance\Symlinks</a> </p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993094"></a><a
! name="_Toc126872175"></a><a name="_Toc115417046"></a><a name="_Toc115416110">3.4.
! Locating AFS Volume Database Servers</a> </h2>
  
  <p class=MsoNormal>The OpenAFS for Windows client will use DNS AFSDB records to
  discover the location of AFS Volume Database servers when entries are not
  present in the client's CellServDB file
  (\%PROGRAMFILES%\OpenAFS\Client\CellServDB).</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993095"></a><a
! name="_Toc126872176"></a><a name="_Toc115417047"></a><a name="_Toc115416111">3.5.
! Obtaining AFS Tokens as a Part of Windows Logon</a></h2>
  
  <p class=MsoNormal>OpenAFS for Windows installs a WinLogon Network Provider to
! provide Single Sign-On functionality (aka Integrated Logon.)  Integrated Logon
! can be used when the Windows username and password match the username and
! password associated with the default cell's Kerberos realm.  For example, if
! the Windows username is &quot;jaltman&quot; and the default cell is
  &quot;athena.mit.edu&quot;, then Integrated Logon can be successfully used if
  the windows password matches the password assigned to the Kerberos principal
! &quot;<a href="mailto:jaltman@ATHENA.MIT.EDU">jaltman@ATHENA.MIT.EDU</a>&quot;. 
  The realm “ATHENA.MIT.EDU” is obtained by performing a domain name to realm
  mapping on the hostname of one of the cell's Volume Database servers.</p>
  
  <p class=MsoNormal>Integrated Logon is required if you desire the ability to
! store roaming user profiles within the AFS file system.  OpenAFS does not
  provide tools for synchronizing the Windows and Kerberos user accounts and
  passwords.</p>
  
  <p class=MsoNormal>When KFW is configured, Integrated Logon will use it to
! obtain tokens.  The Kerberos 5 tickets obtained during the process of
  generating AFS tokens are preserved and stored into the default ccache within
  the user logon session.</p>
  
--- 252,1007 ----
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:Thorndale;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:"Times New Roman";}
  p.MsoTitle, li.MsoTitle, div.MsoTitle
  	{margin-top:12.0pt;
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
  	text-align:center;
+ 	mso-pagination:widow-orphan;
  	page-break-after:avoid;
  	font-size:18.0pt;
  	font-family:Albany;
+ 	mso-fareast-font-family:"MS Mincho";
+ 	mso-bidi-font-family:"Times New Roman";
  	font-weight:bold;}
  p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
  	{margin-top:0pt;
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:Thorndale;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:"Times New Roman";}
  p.MsoBodyTextIndent, li.MsoBodyTextIndent, div.MsoBodyTextIndent
  	{margin-top:0pt;
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:14.15pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:Thorndale;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:"Times New Roman";}
  p.MsoSubtitle, li.MsoSubtitle, div.MsoSubtitle
  	{margin-top:12.0pt;
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
  	text-align:center;
+ 	mso-pagination:widow-orphan;
  	page-break-after:avoid;
  	font-size:14.0pt;
  	font-family:Albany;
+ 	mso-fareast-font-family:"MS Mincho";
+ 	mso-bidi-font-family:"Times New Roman";
  	font-style:italic;}
  a:link, span.MsoHyperlink
  	{color:navy;
! 	text-decoration:underline;
! 	text-underline:single;}
  a:visited, span.MsoHyperlinkFollowed
  	{color:maroon;
! 	text-decoration:underline;
! 	text-underline:single;}
  pre
  	{margin:0pt;
  	margin-bottom:.0001pt;
+ 	mso-pagination:widow-orphan;
  	font-size:10.0pt;
! 	font-family:"Courier New";
! 	mso-fareast-font-family:"MS Mincho";}
! p.heading, li.heading, div.heading
! 	{mso-style-name:heading;
! 	margin-top:12.0pt;
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
+ 	mso-pagination:widow-orphan;
  	page-break-after:avoid;
  	font-size:14.0pt;
! 	font-family:Albany;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:"Times New Roman";}
! p.caption1, li.caption1, div.caption1
! 	{mso-style-name:caption1;
! 	margin-top:6.0pt;
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
+ 	mso-pagination:widow-orphan;
  	font-size:10.0pt;
  	font-family:Thorndale;
+ 	mso-fareast-font-family:"MS Mincho";
+ 	mso-bidi-font-family:"Times New Roman";
  	font-style:italic;}
! p.index, li.index, div.index
! 	{mso-style-name:index;
! 	margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:0pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:Thorndale;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:"Times New Roman";}
! p.contentsheading, li.contentsheading, div.contentsheading
! 	{mso-style-name:contentsheading;
! 	margin-top:12.0pt;
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
+ 	mso-pagination:widow-orphan;
  	page-break-after:avoid;
  	font-size:16.0pt;
  	font-family:Albany;
+ 	mso-fareast-font-family:"MS Mincho";
+ 	mso-bidi-font-family:"Times New Roman";
  	font-weight:bold;}
! p.preformattedtext, li.preformattedtext, div.preformattedtext
! 	{mso-style-name:preformattedtext;
! 	margin:0pt;
  	margin-bottom:.0001pt;
+ 	mso-pagination:widow-orphan;
  	font-size:10.0pt;
! 	font-family:Cumberland;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:"Times New Roman";}
! p.listcontents, li.listcontents, div.listcontents
! 	{mso-style-name:listcontents;
! 	margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:28.35pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:Thorndale;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:"Times New Roman";}
! p.listheading, li.listheading, div.listheading
! 	{mso-style-name:listheading;
! 	margin-top:4.3pt;
  	margin-right:0pt;
  	margin-bottom:4.3pt;
  	margin-left:0pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:Thorndale;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:"Times New Roman";}
! p.header5, li.header5, div.header5
! 	{mso-style-name:header5;
! 	margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:0pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:Thorndale;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:"Times New Roman";}
! p.heading3, li.heading3, div.heading3
! 	{mso-style-name:heading3;
! 	margin-top:7.2pt;
  	margin-right:0pt;
  	margin-bottom:7.2pt;
  	margin-left:0pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:Thorndale;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:"Times New Roman";}
! p.default, li.default, div.default
! 	{mso-style-name:default;
! 	margin:0pt;
  	margin-bottom:.0001pt;
+ 	mso-pagination:widow-orphan;
  	text-autospace:none;
  	font-size:12.0pt;
  	font-family:Arial;
+ 	mso-fareast-font-family:"MS Mincho";
  	color:black;}
! span.bullets
! 	{mso-style-name:bullets;
! 	font-family:StarSymbol;
! 	mso-ascii-font-family:StarSymbol;
! 	mso-hansi-font-family:StarSymbol;}
! span.headingchar
! 	{mso-style-name:headingchar;
! 	font-family:Albany;
! 	mso-ascii-font-family:Albany;
! 	mso-hansi-font-family:Albany;}
! span.heading3char
! 	{mso-style-name:heading3char;
! 	font-family:Albany;
! 	mso-ascii-font-family:Albany;
! 	mso-hansi-font-family:Albany;
! 	font-weight:bold;}
! span.heading4char
! 	{mso-style-name:heading4char;
! 	font-family:"Andale Sans UI";
! 	mso-ascii-font-family:"Andale Sans UI";
! 	mso-hansi-font-family:"Andale Sans UI";
! 	font-weight:bold;}
! span.bodytextchar
! 	{mso-style-name:bodytextchar;
! 	font-family:Thorndale;
! 	mso-ascii-font-family:Thorndale;
! 	mso-hansi-font-family:Thorndale;}
! @page Section1
  	{size:612.0pt 792.0pt;
! 	margin:72.0pt 90.0pt 72.0pt 90.0pt;
! 	mso-header-margin:36.0pt;
! 	mso-footer-margin:36.0pt;
! 	mso-paper-source:0;}
  div.Section1
  	{page:Section1;}
   /* List Definitions */
!  @list l0
! 	{mso-list-id:377976992;
! 	mso-list-template-ids:-748024626;}
! @list l0:level1
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:36.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	mso-ansi-font-size:10.0pt;
! 	font-family:Symbol;}
! @list l1
! 	{mso-list-id:1266575792;
! 	mso-list-template-ids:-1777932230;}
! @list l1:level1
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:36.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	mso-ansi-font-size:10.0pt;
! 	font-family:Symbol;}
! @list l1:level2
! 	{mso-level-tab-stop:72.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l1:level3
! 	{mso-level-tab-stop:108.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l1:level4
! 	{mso-level-tab-stop:144.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l1:level5
! 	{mso-level-tab-stop:180.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l1:level6
! 	{mso-level-tab-stop:216.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l1:level7
! 	{mso-level-tab-stop:252.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l1:level8
! 	{mso-level-tab-stop:288.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l1:level9
! 	{mso-level-tab-stop:324.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! ol
  	{margin-bottom:0pt;}
  ul
  	{margin-bottom:0pt;}
  -->
  </style>
! <!--[if gte mso 10]>
! <style>
!  /* Style Definitions */
!  table.MsoNormalTable
! 	{mso-style-name:"Table Normal";
! 	mso-tstyle-rowband-size:0;
! 	mso-tstyle-colband-size:0;
! 	mso-style-noshow:yes;
! 	mso-style-parent:"";
! 	mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
! 	mso-para-margin:0pt;
! 	mso-para-margin-bottom:.0001pt;
! 	mso-pagination:widow-orphan;
! 	font-size:10.0pt;
! 	font-family:"Times New Roman";
! 	mso-fareast-font-family:"Times New Roman";
! 	mso-ansi-language:#0400;
! 	mso-fareast-language:#0400;
! 	mso-bidi-language:#0400;}
! </style>
! <![endif]--><!--[if gte mso 9]><xml>
!  <o:shapedefaults v:ext="edit" spidmax="3074"/>
! </xml><![endif]--><!--[if gte mso 9]><xml>
!  <o:shapelayout v:ext="edit">
!   <o:idmap v:ext="edit" data="1"/>
!  </o:shapelayout></xml><![endif]-->
  </head>
  
! <body lang=EN-US link=navy vlink=maroon style='tab-interval:36.0pt;line-break:
! strict'>
  
  <div class=Section1>
  
! <p class=MsoTitle>OpenAFS for Windows 1.5.9<br>
  Release Notes</p>
  
  <p class=MsoBodyText>The Andrew File System (AFS) is a location-independent
! file system that uses a local cache to increase its performance.&nbsp; An AFS
! client accesses files anonymously or via a Kerberos authentication.&nbsp; The
! global AFS is partitioned into cells.&nbsp; The AFS cell is a collection of AFS
! volumes that are administered by a common entity.&nbsp;&nbsp; AFS cells can be
! administered by a department even when the Kerberos realm used for local
! authentication is managed by a much larger organization.&nbsp; AFS clients and
! servers take advantage of Kerberos cross realm authentication to enable
! authenticated access by entities located outside the local realm.&nbsp;
! Authorization is enforced by the use of directory level access control lists
! which can consist of individual or group identities.&nbsp; </p>
! 
! <p class=MsoBodyText>The AFS volume is a tree of files and
! sub-directories.&nbsp; AFS volumes are created by administrators and are joined
! to an AFS cell via the use of a mount point.&nbsp;&nbsp; Once a volume is
! created, users can create files and directories as well as mount points and
! symlinks within the volume without regard for the physical location of the
! volume.&nbsp; Administrators can move the volume to another server as necessary
! without the need to notify users.&nbsp;&nbsp; In fact, the volume move can
! occur while files in the volume are in use.&nbsp; </p>
! 
! <p class=MsoBodyText>AFS volumes can be replicated to read-only
! copies.&nbsp;&nbsp; When accessing files from a read-only replica, clients will
! read all of the data from a single replica.&nbsp;&nbsp; If that replica becomes
! unavailable, the clients will failover to any replica that is reachable.&nbsp;
! Users of the data are unaware of where the replicas are stored or which one is
! being accessed.&nbsp;&nbsp; The contents of the replicas can be updated at any
! time by <i>releasing</i> the current contents of the source volume.</p>
  
  <p class=MsoBodyText>OpenAFS for Windows (OAFW) provides AFS client access
! Microsoft Windows operating systems.&nbsp; It strives to maintain transparency
! such that the user is unaware of the distinction between the use of AFS and
! Microsoft Windows file shares.&nbsp;&nbsp; OAFW can be part of a single sign-on
! solution by allowing credentials for a Kerberos principal to be obtained at
! logon and for that principal to be used to obtain AFS tokens for one or more
! cells.&nbsp;&nbsp; Although OAFW is implemented as a locally installed SMB to
! AFS gateway, OAFW maintains the portability of file paths by its use of the <a
! href="file:///\\AFS">\\AFS</a> UNC server name.</p>
  
  <p class=MsoBodyText>OpenAFS is the product of an open source development
! effort begun on October 31 2000.&nbsp; OpenAFS is maintained and developed by a
! group of volunteers with the support of the user community.&nbsp;&nbsp; If you
! use OpenAFS as part of your computing infrastructure please contribute to its
  continued growth.</p>
  
! <p class=MsoToc1><span class=MsoHyperlink><a href="#_Toc115417109">1. Installer
! Options<span style='color:windowtext;display:none;mso-hide:all;text-decoration:
! none;text-underline:none'>. 1</span></a></span></p>
! 
! <p class=MsoToc1><span class=MsoHyperlink><a href="#_Toc115417110">2. System
! Requirements<span style='color:windowtext;display:none;mso-hide:all;text-decoration:
! none;text-underline:none'>. 2</span></a></span></p>
! 
! <p class=MsoToc1><span class=MsoHyperlink><a href="#_Toc115417111">3.
! Operational Notes<span style='color:windowtext;display:none;mso-hide:all;
! text-decoration:none;text-underline:none'>. 2</span></a></span></p>
! 
! <p class=MsoToc1><span class=MsoHyperlink><a href="#_Toc115417112">4. How to
! Debug Problems with OpenAFS for Windows:<span style='color:windowtext;
! display:none;mso-hide:all;text-decoration:none;text-underline:none'> 11</span></a></span></p>
! 
! <p class=MsoToc1><span class=MsoHyperlink><a href="#_Toc115417113">5. Reporting
! Bugs:<span style='color:windowtext;display:none;mso-hide:all;text-decoration:
! none;text-underline:none'> 13</span></a></span></p>
! 
! <p class=MsoToc1><span class=MsoHyperlink><a href="#_Toc115417114">6. How to
! Contribute to the Development of OpenAFS for Windows<span style='color:windowtext;
! display:none;mso-hide:all;text-decoration:none;text-underline:none'>. 14</span></a></span></p>
! 
! <p class=MsoToc1><span class=MsoHyperlink><a href="#_Toc115417115">7. MSI
! Deployment Guide<span style='color:windowtext;display:none;mso-hide:all;
! text-decoration:none;text-underline:none'>. 15</span></a></span></p>
! 
! <p class=MsoToc1><span class=MsoHyperlink><a href="#_Toc115417116">Appendix A:
! Registry Values<span style='color:windowtext;display:none;mso-hide:all;
! text-decoration:none;text-underline:none'>. 26</span></a></span></p>
! 
! <h1><a name="_Toc115416098"></a><a name="_Toc139993082"></a><a
! name="_Toc126872163"></a><a name="_Toc115417109"></a><a name="_Toc115417037"></a><span
! style='mso-bookmark:_Toc115416098'>1. Installer Options</span></h1>
! 
! <p class=MsoNormal>It can be installed either as a new installation or an
! upgrade from previous versions of OpenAFS for Windows or IBM AFS for
! Windows.&nbsp; Installers are provided in two forms:</p>
  
  <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt'><span
! style='font-size:9.0pt'>1.</span><span style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span>an executable (.exe) that is built using the Nullsoft Scriptable
  Installation System, or</p>
  
  <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt'><span
! style='font-size:9.0pt'>2.</span><span style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span>a Windows Installer package (.msi) that is built using WiX and can be
! customized for organizations via the use of MSI Transforms (see <a
! href="#_MSI_Deployment_Guide">MSI Deployment Guide</a>)</p>
! 
! <h1><a name="_Toc115416099"></a><a name="_Toc139993083"></a><a
! name="_Toc126872164"></a><a name="_Toc115417110"></a><a name="_Toc115417038"></a><span
! style='mso-bookmark:_Toc115416099'>2. System Requirements</span></h1>
! 
! <h2><a name="_Toc115416100"></a><a name="_Toc139993084"></a><a
! name="_Toc126872165"></a><a name="_Toc115417039"></a><span style='mso-bookmark:
! _Toc115416100'>2.1 Supported Operating Systems</span></h2>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Microsoft
! Windows 2000 Workstation</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Microsoft
! Windows 2000 Server</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Microsoft
! Windows XP Home</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Microsoft
! Windows XP Professional</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Microsoft
! Windows XP 64</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Microsoft
! Windows 2003 Server (32-bit and 64-bit Intel)</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Microsoft
! Windows 2003 R2 Server (32-bit and 64-bit Intel)</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Microsoft
! Windows Vista RC2 (32-bit and 64-bit Intel)&nbsp; (not for production use)</p>
! 
! <h3><a name="_Toc115416101"></a><a name="_Toc139993085"></a><a
! name="_Toc126872166"></a><span style='mso-bookmark:_Toc115416101'>2.1.1
! Unsupported Operating Systems</span></h3>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Microsoft
! Windows 95</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Microsoft
! Windows 98</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Microsoft
! Windows 98 OSR2</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Microsoft
! Windows ME</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Microsoft
! NT</p>
  
  <p class=MsoNormal>Older releases of OpenAFS are available for download if
! unsupported operating systems must be used.&nbsp; The last version of OpenAFS
! with support for Win9x is 1.2.2b.&nbsp; The last version with support for
! Windows NT 4.0 is 1.2.10.</p>
! 
! <h2><a name="_Toc115416102"></a><a name="_Toc139993086"></a><a
! name="_Toc126872167"></a><a name="_Toc115417040"></a><span style='mso-bookmark:
! _Toc115416102'>2.2 Disk Space</span></h2>
  
  <p class=MsoNormal>Up to 60mb required for the OpenAFS binaries plus 100MB for
! the default AFSCache file.&nbsp;&nbsp; (The size of the AFSCache file may be adjusted
! via the Registry after installation.)</p>
  
! <h2><a name="_Toc115416103"></a><a name="_Toc139993087"></a><a
! name="_Toc126872168"></a><a name="_Toc115417041"></a><span style='mso-bookmark:
! _Toc115416103'>2.3 Additional Software</span> Packages</h2>
  
  <p class=MsoNormal><a href="http://web.mit.edu/kerberos/dist/index.html">MIT
  Kerberos for Windows</a> 2.6.x or 3.x.x if Kerberos 5 authentication support is
  desired.</p>
  
! <h1><a name="_Toc115416104"></a><a name="_Toc139993088"></a><a
! name="_Toc126872169"></a><a name="_Toc115417111"></a><a name="_Toc115417042"></a><span
! style='mso-bookmark:_Toc115416104'>3. Operational Notes</span></h1>
! 
! <h2><a name="_Toc115416105"></a><a name="_Toc139993089"></a><a
! name="_Toc126872170"></a><a name="_Toc115417043"></a><span style='mso-bookmark:
! _Toc115416105'>3.1. Requirements for Kerberos 5 Authentication</span></h2>
  
  <p class=MsoNormal>The Kerberos 4 infrastructure on which the OpenAFS 1.2
! series is reliant is no longer secure.&nbsp; Cross-realm Kerberos is very
! important in the AFS context and most sites have or are migrating to Kerberos 5
! environments.&nbsp; The OpenAFS 1.4 series integrates with <a
! href="http://web.mit.edu/kerberos/">MIT Kerberos for Windows</a> 2.6.5 and
! above to support Kerberos 5 authentication including automatic renewal of AFS
! tokens and single sign-on via the Microsoft Windows Kerberos Logon Service.</p>
  
  <p class=MsoNormal>When KFW is installed, the OpenAFS 1.4 client will obtain
! Kerberos 5 tickets and use them as tokens without modification.&nbsp; The
! OpenAFS 1.4 client requires that all of the AFS Servers with which it
! communicates support the use of Kerberos 5 tickets as tokens. If Kerberos 5
! based tokens are presented to an AFS server that does not understand them, the
! server will be unable to communicate with the client when tokens are present.
! Kerberos 5 based tokens are supported by OpenAFS release 1.2.8 or later.&nbsp;
! IBM Transarc servers do not support Kerberos 5.</p>
! 
! <h3><a name="_Toc115416106"></a><a name="_Toc139993090"></a><a
! name="_Toc126872171"></a><span style='mso-bookmark:_Toc115416106'>3.1.1. Active
! Directory</span></h3>
  
  <p class=MsoNormal>There are two things to consider when using a Microsoft
  Windows Active Directory as the Kerberos realm that issues the AFS service
! ticket.&nbsp; First, the Kerberos 5 tickets issued by Active Directory can be
! quite large when compared to tickets issued by a traditional KDC due to the
! incorporation of authorization data in the <st1:place w:st="on">PAC.</st1:place>&nbsp;
! If the issued tickets become larger than 344 bytes OpenAFS 1.2 servers will be
! unable to process them.&nbsp; OpenAFS 1.4 servers can support the largest
! tickets that Active Directory can issue.&nbsp; Second, the Kerberos 5 tickets
! issued by Windows 2003 Active Directory are encrypted with the DES-CBC-MD5
! enctype.&nbsp; OpenAFS 1.2 servers only support the DES-CBC-CRC enctype.</p>
  
  <p class=MsoNormal>Microsoft has documented in <a
  href="http://support.microsoft.com/kb/832572/">Knowledge Base article 832572</a>
  a new NO_AUTH_REQUIRED flag that can be set on the account mapped to the AFS
! service principal which will prevent the generation of a <st1:place w:st="on">PAC.</st1:place></p>
  
! <h3><a name="_Toc115416107"></a><a name="_Toc139993091"></a><a
! name="_Toc126872172"></a><span style='mso-bookmark:_Toc115416107'>3.1.2. Using
! the krb524 service</span></h3>
  
  <p class=MsoNormal>Some organizations which have AFS cell names and Kerberos
  realm names which differ by more then just lower and upper case rely on a
  modification to krb524d which maps a Kerberos 5 ticket from realm FOO to a
! Kerberos 4 ticket in realm BAR.&nbsp; This allows user@FOO to appear to be
! user@bar for the purposes of accessing the AFS cell.&nbsp; As of OpenAFS 1.2.8,
! support was added to allow the immediate use of Kerberos 5 tickets as AFS (2b)
! tokens. This is the first building block necessary to break away from the limitations
! of Kerberos 4 with AFS.&nbsp; By using Kerberos 5 directly we avoid the
! security holes inherent in Kerberos 4 cross-realm.&nbsp; We also gain access to
! cryptographically stronger algorithms for authentication and encryption. </p>
  
  <p class=MsoNormal>Another reason for using Kerberos 5 directly is because the
  krb524 service runs on a port (4444) which has become increasingly blocked by
! ISPs.&nbsp; The port was used to spread a worm which attacked Microsoft Windows
! in the summer of 2003.&nbsp; When the port is blocked users find that they are
! unable to authenticate.</p>
  
  <p class=MsoNormal>Replacing the Kerberos 4 ticket with a Kerberos 5 ticket is
  a win in all situations except when the cell name does not match the realm name
  and the principal names placed into the ACL’s are not the principal names from
! the Kerberos 5 ticket.&nbsp; To support this transition, OpenAFS for Windows
! 1.4 adds a new registry value, <i><a href="#_Value___:_Use524">Use524</a></i>,
! to force the use of krb524d.&nbsp; However, the availability of this option should
! only be used by individuals until such time as their organizations can provide
! a more permanent solution.</p>
! 
! <h3>3.1.3. Network Identity Manager Plug-in</h3>
! 
! <p class=MsoNormal>As of release 1.5.9, OpenAFS for Windows includes a Network
! Identity Manager plug-in for obtaining AFS tokens. <span
! style='mso-spacerun:yes'> </span>This plug-in is a contribution from <a
! href="https://www.secure-endpoints.com/">Secure Endpoints Inc.</a><span
! style='mso-spacerun:yes'>  </span>Network Identity Manager is a credential
! management tool that ships with <a href="http://web.mit.edu/kerberos/">MIT
! Kerberos for Windows</a> version 3.0 and above. <span
! style='mso-spacerun:yes'> </span>The OpenAFS plug-in requires <a
! href="http://web.mit.edu/kerberos/">MIT Kerberos for Windows</a> version 3.1 or
! above.</p>
! 
! <h2><a name="_Toc115416108"></a><a name="_Toc139993092"></a><a
! name="_Toc126872173"></a><a name="_Toc115417044"></a><span style='mso-bookmark:
! _Toc115416108'>3.2. Use of the Microsoft Loopback Adapter</span></h2>
  
  <p class=MsoNormal>By itself the OpenAFS Client Service does not provide robust
! behavior in a plug-n-play network environment.&nbsp; Changes to the number of
  network adapters or their assigned IP addresses will cause the service to
! terminate unexpectedly.&nbsp; To avoid this behavior OpenAFS for Windows
! installs a single instance of the Microsoft Loopback Adapter (MLA) on the
! machine.&nbsp; With the MLA installed, the OpenAFS Client Service will not be
! affected by the configuration changes of other network adapters installed on
! the system.&nbsp; </p>
  
  <p class=MsoNormal>The MLA is installed with a name of &quot;AFS&quot; and a
! pre-assigned IP address in the 10.x.x.x range.&nbsp; The MLA is bound to the
! “Client for Microsoft Networks” service and not bound to the “File and Printer
! Sharing for Microsoft Networks”.&nbsp; If the MLA is unbound to &quot;Client
! Microsoft Networks&quot;, the OpenAFS Client Service will become inaccessible
! when the machine is disconnected from the network.&nbsp; If the MLA is bound to
! &quot;File and Printer Sharing ...&quot; there will be a service type collision
! between the name &quot;AFS&quot; and the name of the machine on the MLA's IP
! Address that will result in the OpenAFS client service becoming inaccessible
! and the &quot;NET VIEW \\AFS&quot; command will return a &quot;System Error
! 52&quot; message.&nbsp; To correct the problem:</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&nbsp;stop
! the AFS Client Service</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&nbsp;bind
! the &quot;Client for Microsoft Networks&quot; to the MLA</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&nbsp;unbind
! &quot;File and Printer Sharing for Microsoft Networks&quot; from the MLA</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&nbsp;Disable
! and then re-enable the MLA</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&nbsp;start
! the AFS Client Service</p>
  
  <p class=MsoNormal>When the MLA is not installed the unique NETBIOS name
! published by OpenAFS SMB server is &quot;<i>MACHINE</i>-AFS&quot;.&nbsp; One of
! the benefits of using the MLA is that the NETBIOS name does not have to be
! published on any adapter other than the MLA.&nbsp; Therefore the chosen name is
! no longer required to be unique.&nbsp; Instead the NETBIOS name associated with
! the AFS Client Service is simply &quot;AFS&quot; and portable UNC paths of the
! form \\AFS\cellname\path can now be used on all machines.</p>
! 
! <h2><a name="_Toc115416109"></a><a name="_Toc139993093"></a><a
! name="_Toc126872174"></a><a name="_Toc115417045"></a><span style='mso-bookmark:
! _Toc115416109'>3.3. Using Freelance (Dynamic Root) Mode to Improve Mobility</span></h2>
  
  <p class=MsoNormal>Traditionally, when the OpenAFS Client Service starts it
! must be able to access the &quot;root.afs&quot; volume of the default
! cell.&nbsp; The &quot;root.afs&quot; volume contains the set of mount points to
! the &quot;root.cell&quot; volumes of various cells the administrator of the
! default cell believes should be accessible.&nbsp; If the &quot;root.afs&quot;
! volume is inaccessible when the client service is started, the service will
! terminate unexpectedly.&nbsp; Since many users now use laptops or otherwise
! operate in disconnected environments in which a VPN may be required to access
! the cell's servers, it is often the case that the &quot;root.afs&quot; volume
! for the default cell is not reachable and the OpenAFS Client Service will not
  successfully start. </p>
  
  <p class=MsoNormal>To allow the OpenAFS Client Service to operate in these
  environments, a fake &quot;root.afs&quot; volume is dynamically constructed
! from mount points and symlinks stored in the local registry.&nbsp; This method
! of operation is referred to as Freelance mode.</p>
  
  <p class=MsoNormal>The content of the fake “root.afs” volume is dynamically
! modified as cells are accessed.&nbsp; When the fake &quot;root.afs&quot; volume
! is initially constructed it will only contain two mount points: a <i>regular
! path </i>and <i>read-write path </i>mount point used to access the
! &quot;root.cell&quot; volume of the default AFS cell.&nbsp; Any attempt to
! access a valid cell name will result in a new mount point being created in the
! fake &quot;root.afs&quot; volume.&nbsp; If the cellname begins with a
! &quot;.&quot; the mount point will be a <i>read-write path</i>; otherwise the
! mount point will be a <i>regular path</i>.&nbsp; These mount points are
! preserved in the registry at key:</p>
  
! <p class=preformattedtext style='margin-left:35.45pt'><a
  href="#_Regkey:_[HKLMSOFTWAREOpenAFSClie">HKLM\SOFTWARE\OpenAFS\Client\Freelance</a></p>
  
  <p class=MsoNormal>Additional mount points may be manually created using the
! &quot;fs mkmount&quot; command.&nbsp; Mount points may be removed using the
! &quot;fs rmmount&quot; command.</p>
  
! <p class=preformattedtext style='margin-left:35.45pt'>&gt;fs mkmount
  \\AFS\athena.mit.edu root.cell athena.mit.edu</p>
  
! <p class=preformattedtext style='margin-left:35.45pt'>&gt;fs mkmount
  \\AFS\.athena.mit.edu root.cell athena.mit.edu -rw</p>
  
! <p class=preformattedtext style='margin-left:35.45pt'>&gt;fs rmmount
  \\AFS\athena.mit.edu</p>
  
! <p class=preformattedtext style='margin-left:35.45pt'>&gt;fs rmmount
  \\AFS\.athena.mit.edu</p>
  
  <p class=MsoNormal>Symlinks may also be created within the Freelance “root.afs”
  volume.</p>
  
! <p class=preformattedtext style='margin-left:35.45pt'>&gt;symlink make
! \\afs\link \\afs\athena.mit.edu\user\j\a\jaltman</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;symlink list
! \\afs\link</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '\\afs\link' is a
! symlink to 'athena.mit.edu\user\j\a\jaltman'</p>
  
! <p class=preformattedtext style='margin-left:35.45pt'>&gt;symlink rm \\afs\link</p>
  
  <p class=MsoNormal>The symlinks are stored in the registry at:</p>
  
! <p class=preformattedtext style='margin-left:35.45pt'><a
! href="#_Regkey:_[HKLMSOFTWAREOpenAFSClie_1">HKLM\SOFTWARE\OpenAFS\Client\Freelance\Symlinks</a>&nbsp;</p>
  
! <h2><a name="_Toc115416110"></a><a name="_Toc139993094"></a><a
! name="_Toc126872175"></a><a name="_Toc115417046"></a><span style='mso-bookmark:
! _Toc115416110'>3.4. Locating AFS Volume Database Servers</span> </h2>
  
  <p class=MsoNormal>The OpenAFS for Windows client will use DNS AFSDB records to
  discover the location of AFS Volume Database servers when entries are not
  present in the client's CellServDB file
  (\%PROGRAMFILES%\OpenAFS\Client\CellServDB).</p>
  
! <h2><a name="_Toc115416111"></a><a name="_Toc139993095"></a><a
! name="_Toc126872176"></a><a name="_Toc115417047"></a><span style='mso-bookmark:
! _Toc115416111'>3.5. Obtaining AFS Tokens as a Part of Windows Logon</span></h2>
  
  <p class=MsoNormal>OpenAFS for Windows installs a WinLogon Network Provider to
! provide Single Sign-On functionality (aka Integrated Logon.)&nbsp; Integrated
! Logon can be used when the Windows username and password match the username and
! password associated with the default cell's Kerberos realm.&nbsp; For example,
! if the Windows username is &quot;jaltman&quot; and the default cell is
  &quot;athena.mit.edu&quot;, then Integrated Logon can be successfully used if
  the windows password matches the password assigned to the Kerberos principal
! &quot;<a href="mailto:jaltman@ATHENA.MIT.EDU">jaltman@ATHENA.MIT.EDU</a>&quot;.&nbsp;
  The realm “ATHENA.MIT.EDU” is obtained by performing a domain name to realm
  mapping on the hostname of one of the cell's Volume Database servers.</p>
  
  <p class=MsoNormal>Integrated Logon is required if you desire the ability to
! store roaming user profiles within the AFS file system.&nbsp; OpenAFS does not
  provide tools for synchronizing the Windows and Kerberos user accounts and
  passwords.</p>
  
  <p class=MsoNormal>When KFW is configured, Integrated Logon will use it to
! obtain tokens.&nbsp; The Kerberos 5 tickets obtained during the process of
  generating AFS tokens are preserved and stored into the default ccache within
  the user logon session.</p>
  
***************
*** 736,780 ****
  Kerberos KDC is inaccessible at logon time.</p>
  
  <p class=MsoNormal>Integrated Login supports the ability to obtain tokens for
! multiple cells.  For further information on how to configure this feature read
! the <a href="../relnotes.htm#_Value:_TheseCells">TheseCells</a> value in <a
  href="#_Appendix_A:_Registry_Values">Appendix A</a>.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993096"></a><a
! name="_Toc126872177"></a><a name="_Toc115417048"></a><a name="_Toc115416112">3.6.
! AFS System Tray Command Line Options</a></h2>
  
  <p class=MsoNormal>The AFS System Tray tool (afscreds.exe) supports several
  command line options: </p>
  
! <p class=PreformattedText>    -A = autoinit </p>
  
! <p class=PreformattedText>    -E = force existing afscreds to exit</p>
  
! <p class=PreformattedText>    -I = install startup shortcut</p>
  
! <p class=PreformattedText>    -M = renew drive maps </p>
  
! <p class=PreformattedText>    -N = IP address change detection </p>
  
! <p class=PreformattedText>    -Q = quiet mode.  do not display start service
! dialog</p>
  
! <p class=PreformattedText>         if afsd_service is not already running</p>
  
! <p class=PreformattedText>    -S = show tokens dialog on startup</p>
  
! <p class=PreformattedText>    -U = uninstall startup shortcut</p>
  
! <p class=PreformattedText>    -X = test and do map share</p>
  
! <p class=PreformattedText>    -Z = unmap drives</p>
  
  <p class=MsoNormal>autoinit will result in automated attempts to acquire AFS
! tokens when afscreds.exe is started.  afscreds.exe will attempt to utilize
  tickets stored in the MSLSA credentials cache; any existing CCAPI credentials
! cache; and finally display an Obtain Tokens dialog to the user.  When used in
! combination with IP address change detection, afscreds.exe will attempt to
  acquire AFS tokens whenever the IP address list changes and the Kerberos KDC is
  accessible.</p>
  
--- 1010,1056 ----
  Kerberos KDC is inaccessible at logon time.</p>
  
  <p class=MsoNormal>Integrated Login supports the ability to obtain tokens for
! multiple cells.&nbsp; For further information on how to configure this feature
! read the <a href="../relnotes.htm#_Value:_TheseCells">TheseCells</a> value in <a
  href="#_Appendix_A:_Registry_Values">Appendix A</a>.</p>
  
! <h2><a name="_Toc115416112"></a><a name="_Toc139993096"></a><a
! name="_Toc126872177"></a><a name="_Toc115417048"></a><span style='mso-bookmark:
! _Toc115416112'>3.6. AFS System Tray Command Line Options</span></h2>
  
  <p class=MsoNormal>The AFS System Tray tool (afscreds.exe) supports several
  command line options: </p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp; -A = autoinit </p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp; -E = force existing afscreds to
! exit</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp; -I = install startup shortcut</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp; -M = renew drive maps </p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp; -N = IP address change detection </p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp; -Q = quiet mode.&nbsp; do not
! display start service dialog</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if
! afsd_service is not already running</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp; -S = show tokens dialog on startup</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp; -U = uninstall startup shortcut</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp; -X = test and do map share</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp; -Z = unmap drives</p>
  
  <p class=MsoNormal>autoinit will result in automated attempts to acquire AFS
! tokens when afscreds.exe is started.&nbsp; afscreds.exe will attempt to utilize
  tickets stored in the MSLSA credentials cache; any existing CCAPI credentials
! cache; and finally display an Obtain Tokens dialog to the user.&nbsp; When used
! in combination with IP address change detection, afscreds.exe will attempt to
  acquire AFS tokens whenever the IP address list changes and the Kerberos KDC is
  accessible.</p>
  
***************
*** 783,855 ****
  each time afscreds.exe is started.</p>
  
  <p class=MsoNormal>By default afscreds.exe is configured by the OpenAFS.org
! installers to use “-A -N -M -Q” as startup options.  Currently, there is no
! user interface to change this selection after install time although these
  options may be altered via the registry on either per machine or per user
! basis.  See <a
! href="#_Value___: AfscredsShortcutParams">AfscredsShortcutParams</a>
! in <a href="#_Appendix_A:_Registry_Values">Appendix
! A</a>.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993097"></a><a
! name="_Toc126872178"></a><a name="_Toc115417049"></a><a name="_Toc115416113">3.7.
! The “AFS Client Admins” Authorization Group</a></h2>
  
  <p class=MsoNormal>The OpenAFS for Windows 1.4 client supports a local Windows
! authorization group named &quot;AFS Client Admins&quot;.  This group is used in
! place of the &quot;Administrators&quot; group to determine which users are
! allowed to modify the AFS Client Service configuration via the AFS Control
! Panel (afs_config.exe) or fs.exe command line tool.  The following fs.exe
  commands are now restricted to members of the &quot;AFS Client Admins&quot;
  group:</p>
  
! <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>checkservers with a non-zero timer value</p>
! 
! <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>setcachesize</p>
! 
! <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>newcell</p>
! 
! <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>sysname with a new sysname list</p>
! 
! <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>exportafs</p>
! 
! <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>setcell</p>
! 
! <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>setserverprefs</p>
! 
! <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>storebehind</p>
! 
! <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>setcrypt</p>
! 
! <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>cscpolicy</p>
! 
! <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>trace</p>
! 
! <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>minidump</p>
  
  <p class=MsoNormal>The creation or removal of mount points and symlinks in the
  Freelance “root.afs” volume are also restricted to members of the “AFS Client
--- 1059,1131 ----
  each time afscreds.exe is started.</p>
  
  <p class=MsoNormal>By default afscreds.exe is configured by the OpenAFS.org
! installers to use “-A -N -M -Q” as startup options.&nbsp; Currently, there is
! no user interface to change this selection after install time although these
  options may be altered via the registry on either per machine or per user
! basis.&nbsp; See <a href="#_Value___:_AfscredsShortcutParams">AfscredsShortcutParams</a>
! in <a href="#_Appendix_A:_Registry_Values">Appendix A</a>.</p>
  
! <h2><a name="_Toc115416113"></a><a name="_Toc139993097"></a><a
! name="_Toc126872178"></a><a name="_Toc115417049"></a><span style='mso-bookmark:
! _Toc115416113'>3.7. The “AFS Client Admins” Authorization Group</span></h2>
  
  <p class=MsoNormal>The OpenAFS for Windows 1.4 client supports a local Windows
! authorization group named &quot;AFS Client Admins&quot;.&nbsp; This group is
! used in place of the &quot;Administrators&quot; group to determine which users
! are allowed to modify the AFS Client Service configuration via the AFS Control
! Panel (afs_config.exe) or fs.exe command line tool.&nbsp; The following fs.exe
  commands are now restricted to members of the &quot;AFS Client Admins&quot;
  group:</p>
  
! <p class=preformattedtext style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>checkservers
! with a non-zero timer value</p>
! 
! <p class=preformattedtext style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>setcachesize</p>
! 
! <p class=preformattedtext style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>newcell</p>
! 
! <p class=preformattedtext style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>sysname
! with a new sysname list</p>
! 
! <p class=preformattedtext style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>exportafs</p>
! 
! <p class=preformattedtext style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>setcell</p>
! 
! <p class=preformattedtext style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>setserverprefs</p>
! 
! <p class=preformattedtext style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>storebehind</p>
! 
! <p class=preformattedtext style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>setcrypt</p>
! 
! <p class=preformattedtext style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>cscpolicy</p>
! 
! <p class=preformattedtext style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>trace</p>
! 
! <p class=preformattedtext style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>minidump</p>
  
  <p class=MsoNormal>The creation or removal of mount points and symlinks in the
  Freelance “root.afs” volume are also restricted to members of the “AFS Client
***************
*** 857,1073 ****
  
  <p class=MsoNormal>The initial membership of the &quot;AFS Client Admins&quot;
  group when created by the installer is equivalent to the local
! &quot;Administrators&quot; group.  If a user is added to the
  &quot;Administrators&quot; group after the creation of the &quot;AFS Client
! Admin&quot; group, that user will not be an AFS Client Administrator.  Only
! users that are members of the &quot;AFS Client Admins&quot; group are AFS
! Client Administrators.  The local &quot;SYSTEM&quot; account is an implicit
! member of the &quot;AFS Client Admins&quot; group.</p>
  
  <p class=MsoNormal>Setting the default sysname for a machine should be done via
! the <a href="#_Value_:_SysName">registry</a>
! and not via &quot;fs sysname&quot;.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993098"></a><a
! name="_Toc126872179"></a><a name="_Toc115417050"></a><a name="_Toc115416114">3.8.
! OpenAFS support for UNC paths</a> </h2>
! 
! <p class=MsoNormal>The OpenAFS 1.4 client supports UNC paths everywhere.  UNC
! paths provide a canonical name for resources stored within AFS.  UNC paths
! should be used instead of drive letter mappings whenever possible.   This is
! especially true when specifying the location of roaming profiles and redirected
! folders.  </p>
  
  <p class=MsoNormal>Power users that make extensive use of the command line
  shell, cmd.exe, should consider using JP Software's 4NT or Take Command command
! processors.  Unlike cmd.exe, the JPSoftware shells fully support UNC paths as
! the current directory.  With the release of version 4NT 7.0 and Take Command 7.0,
! JPSoftware is adding special recognition of OpenAFS.  AFS paths can be entered
! in UNIX notation (e.g., <a href="file:///\\afs\openafs.org\software">/afs/openafs.org/software</a>),
! space utilization reports the output of the volume status for the specified
! path, and many AFS specific functions and variables have been added to the
! command language.</p>
  
  <p class=MsoNormal>JPSoftware's web site is <span class=MsoHyperlink>http://www.jpsoft.com</span>.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993099"></a><a
! name="_Toc126872180"></a><a name="_Toc115417051"></a><a name="_Toc115416115">3.9.
! OpenAFS includes aklog.exe</a></h2>
  
  <p class=MsoNormal>The OpenAFS 1.4 Client ships with its own version of
  aklog.exe which should be used in preference to those obtained by third party
! sources.  The OpenAFS aklog.exe supports Kerberos 5 as well as the ability to
! auto-generate AFS IDs within foreign PTS databases.</p>
  
! <p class=PreformattedText>Usage: aklog [-d] [[-cell | -c] cell [-k krb_realm]]</p>
  
! <p class=PreformattedText>             [[-p | -path] pathname]</p>
  
! <p class=PreformattedText>             [-noprdb] [-force]</p>
  
! <p class=PreformattedText>             [-5 [-m]| -4]</p>
  
! <p class=PreformattedText>&nbsp;</p>
  
! <p class=PreformattedText>   -d = output debugging information.</p>
  
! <p class=PreformattedText>   cell = zero or more cells for which tokens will be
! obtained</p>
  
! <p class=PreformattedText>   krb_realm = the kerberos realm of the cell.</p>
  
! <p class=PreformattedText>   pathname = the directory for which authentication
! is required</p>
  
! <p class=PreformattedText>   -noprdb = don't try to determine AFS ID.</p>
  
! <p class=PreformattedText>   -5 or -4 = use Kerberos V (default) or Kerberos IV
! tickets</p>
  
! <p class=PreformattedText>   -m = use krb524d to convert Kerberos V tickets to
! Kerberos IV</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993100"></a><a
! name="_Toc126872181"></a><a name="_Toc115417052"></a><a name="_Toc115416116">3.10.
! OpenAFS Servers on Windows are Unsupported</a></h2>
  
  <p class=MsoNormal>The AFS Server functionality provided with OpenAFS 1.4 might
! work but should be considered highly experimental.  It has not been thoroughly
! tested.  Any data which would cause pain if lost should not be stored in an
! OpenAFS Server on Windows.</p>
  
  <p class=MsoNormal>A few notes on the usage of the AFS Client Service if it is
  going to be used with the OpenAFS AFS Server:</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>When installed on the same machine as the AFS Server, Freelance
! mode must be turned off.  Otherwise, you will be unable to manipulate the
! contents of the root.afs volume for the hosted cell.</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>The AFS Server and related tools only support the built in
! kaserver (Kerberos IV).  If the AFS Server is being used, MIT Kerberos for
! Windows should not be installed or must be disabled.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993101"></a><a
! name="_Toc126872182"></a><a name="_Toc115417053"></a><a name="_Toc115416117">3.11.
! OpenAFS Debugging Symbol files</a></h2>
  
  <p class=MsoNormal>The OpenAFS for Windows installers now include Debugging
  Symbol files which should be installed if you are experiencing problems and
! need to send crash reports.  This is true for both the release and the debug
! versions of the installers.  The difference between the release and debug
! versions are:</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>whether or not the binaries were compiled with optimization</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>whether the debug symbols are installed by default</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>whether additional debug statements were compiled into the
! binaries</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993102"></a><a
! name="_Toc126872183"></a><a name="_Toc115417054"></a><a name="_Toc115416118">3.12.
! </a>Large Files (64-bit) Supported</h2>
  
  <p class=MsoNormal>As of release 1.5.3, OpenAFS for Windows supports files
! larger than 2GB.  The maximum file size is now 16777216 terabytes when the AFS
! File Server supports large files.   If the AFS File Server does not support
! large files, then the file size limit remains 2GB.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993103"></a><a
! name="_Toc126872184"></a><a name="_Toc115417055"></a><a name="_Toc115416119">3.13.
! Encrypted AFS File Access</a></h2>
  
  <p class=MsoNormal>The OpenAFS for Windows installer by default activates a
  weak form of encrypted data transfer between the AFS client and the AFS
! servers.  This is often referred to as &quot;fcrypt&quot; mode.  Encrypted data
! transfer can be turned on or off with the “fs crypt” command.  Transitions
! between “crypt” and “non-crypt” modes are logged to the Windows Application
! Event Log. </p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993104"></a><a
! name="_Toc126872185"></a><a name="_Toc115417056"></a><a name="_Toc115416120">3.14.
! Authenticated Access to the OpenAFS Client Service</a></h2>
  
  <p class=MsoNormal>OpenAFS 1.4 supports authenticated SMB connections using
! either NTLM or GSS SPNEGO (NTLM).  In previous versions of OpenAFS, the SMB
! connections were unauthenticated which opened the door for several attacks
  which could be used to obtain access to another user's tokens on shared
! machines.    </p>
  
  <p class=MsoNormal>When GSS SPNEGO attempts a Kerberos 5 authentication, the
  Windows SMB client will attempt to retrieve service tickets for
  &quot;cifs/afs@REALM&quot; (if the loopback adapter is in use) or
! &quot;cifs/machine-afs@REALM&quot; (if the loopback adapter is not being
! used).  It is extremely important that this service principal not exist in the
! KDC database as the Kerberos authentication must fail allowing automatic
! fallback to NTLM.  When NTLM is used a special local authentication mode will
! be used that does not require access to the user's password.  Instead, Windows
! will internally recognize the request as coming from a local logon session.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993105"></a><a
! name="_Toc126872186"></a><a name="_Toc115417057"></a><a name="_Toc115416121">3.15.
! No More INI Files</a></h2>
  
  <p class=MsoNormal>Previous AFS clients for Windows stored configuration data
! in Windows .INI files.   OpenAFS 1.4 does not use Windows .INI files for the storage
! of configuration data.   All settings are now stored in the registry (see <a
! href="#_Appendix_A:_Registry_Values">Appendix A</a>). 
  The CellServDB file is now stored in the %PROGRAMFILES%\OpenAFS\Client
! directory.   The <i><a
! href="#_Value___: CellServDBDir">CellServDBDir</a></i>
  registry value can be used to specify an alternative location.</p>
  
  <p class=MsoNormal>OpenAFS 1.4 will relocate the contents of the “afsdcell.ini”
! file to the new CellServDB file.  OpenAFS 1.4 will also import the contents of
! the “afs_freelance.ini” file to the Windows registry.   OpenAFS 1.4 will not
! process the contents of the “afsddbmt.ini”.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993106"></a><a
! name="_Toc126872187"></a><a name="_Toc115417058"></a><a name="_Toc115416122">3.16.
! Microsoft Windows Internet Connection Firewall</a></h2>
  
  <p class=MsoNormal>The OpenAFS 1.4 Client is compatible with the Internet
! Connection Firewall that debuted with Windows XP SP2 and Windows 2003 SP1.  The
! Internet Connection Firewall will be automatically adjusted to allow the
! receipt of incoming callback messages from the AFS file server.  In addition,
! the appropriate <i>Back Connection</i> registry entries are added to allow SMB
! authentication to be performed across the Microsoft Loopback Adapter.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993107"></a><a
! name="_Toc126872188"></a><a name="_Toc115417059"></a><a name="_Toc115416123">3.17.
! Browsing AFS from the Explorer Shell and Office</a></h2>
  
  <p class=MsoNormal>The OpenAFS 1.4 Client Service implements the CIFS Remote
  Admin Protocol which allows Explorer to browse server and share information.
  This significantly enhances the interoperability of AFS volumes within the
  Explorer Shell and Microsoft Office applications.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993108"></a><a
! name="_Toc126872189"></a><a name="_Toc115417060"></a><a name="_Toc115416124">3.18.
! </a>Byte Range Locking</h2>
  
  <p class=MsoNormal>Many applications on Windows (e.g. Microsoft Office) require
  the use of byte range locks applied to a file either to protect against
! simultaneous file access or as a signaling mechanism.   OpenAFS for Windows
! release 1.5 (or greater) implements byte range locking within the CIFS-AFS
! gateway server.   This support for byte range locking obtains <span
! style='font-family:"Times New Roman"'>AFS’ advisory file server locks to simulate
! Microsoft Windows mandatory locks.&nbsp;&nbsp; When an application opens a
! file, a lock will be obtained from AFS indicating that the file is in
! use.&nbsp; If the lock is a write lock, access to the file will be restricted
! to other applications running on the same machine as the first application to
! request the lock.&nbsp;&nbsp; Applications running on other machines will see
! the AFS full file lock and will be unable to access the file.</span></p>
  
  <p class=MsoNormal><span style='font-family:"Times New Roman"'>Most Windows
  applications and Windows itself opens files in shared read mode. When this is
--- 1133,1361 ----
  
  <p class=MsoNormal>The initial membership of the &quot;AFS Client Admins&quot;
  group when created by the installer is equivalent to the local
! &quot;Administrators&quot; group.&nbsp; If a user is added to the
  &quot;Administrators&quot; group after the creation of the &quot;AFS Client
! Admin&quot; group, that user will not be an AFS Client Administrator.&nbsp;
! Only users that are members of the &quot;AFS Client Admins&quot; group are AFS
! Client Administrators.&nbsp; The local &quot;SYSTEM&quot; account is an
! implicit member of the &quot;AFS Client Admins&quot; group.</p>
  
  <p class=MsoNormal>Setting the default sysname for a machine should be done via
! the <a href="#_Value_:_SysName">registry</a> and not via &quot;fs
! sysname&quot;.</p>
  
! <h2><a name="_Toc115416114"></a><a name="_Toc139993098"></a><a
! name="_Toc126872179"></a><a name="_Toc115417050"></a><span style='mso-bookmark:
! _Toc115416114'>3.8. OpenAFS support for UNC paths</span> </h2>
! 
! <p class=MsoNormal>The OpenAFS 1.4 client supports UNC paths everywhere.&nbsp;
! UNC paths provide a canonical name for resources stored within AFS.&nbsp; UNC paths
! should be used instead of drive letter mappings whenever possible.&nbsp;&nbsp;
! This is especially true when specifying the location of roaming profiles and
! redirected folders.&nbsp;&nbsp;</p>
  
  <p class=MsoNormal>Power users that make extensive use of the command line
  shell, cmd.exe, should consider using JP Software's 4NT or Take Command command
! processors.&nbsp; Unlike cmd.exe, the JPSoftware shells fully support UNC paths
! as the current directory.&nbsp; With the release of version 4NT 7.0 and Take
! Command 7.0, JPSoftware is adding special recognition of OpenAFS.&nbsp; AFS
! paths can be entered in UNIX notation (e.g., <a
! href="file:///\\afs\openafs.org\software">/afs/openafs.org/software</a>), space
! utilization reports the output of the volume status for the specified path, and
! many AFS specific functions and variables have been added to the command
! language.</p>
  
  <p class=MsoNormal>JPSoftware's web site is <span class=MsoHyperlink>http://www.jpsoft.com</span>.</p>
  
! <h2><a name="_Toc115416115"></a><a name="_Toc139993099"></a><a
! name="_Toc126872180"></a><a name="_Toc115417051"></a><span style='mso-bookmark:
! _Toc115416115'>3.9. OpenAFS includes aklog.exe</span></h2>
  
  <p class=MsoNormal>The OpenAFS 1.4 Client ships with its own version of
  aklog.exe which should be used in preference to those obtained by third party
! sources.&nbsp; The OpenAFS aklog.exe supports Kerberos 5 as well as the ability
! to auto-generate AFS IDs within foreign PTS databases.</p>
  
! <p class=preformattedtext>Usage: aklog [-d] [[-cell | -c] cell [-k krb_realm]]</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! [[-p | -path] pathname]</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! [-noprdb] [-force]</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! [-5 [-m]| -4]</p>
  
! <p class=preformattedtext>&nbsp;</p>
  
! <p class=preformattedtext>&nbsp;&nbsp; -d = output debugging information.</p>
  
! <p class=preformattedtext>&nbsp;&nbsp; cell = zero or more cells for which
! tokens will be obtained</p>
  
! <p class=preformattedtext>&nbsp;&nbsp; krb_realm = the kerberos realm of the
! cell.</p>
  
! <p class=preformattedtext>&nbsp;&nbsp; pathname = the directory for which
! authentication is required</p>
  
! <p class=preformattedtext>&nbsp;&nbsp; -noprdb = don't try to determine AFS ID.</p>
  
! <p class=preformattedtext>&nbsp;&nbsp; -5 or -4 = use Kerberos V (default) or
! Kerberos IV tickets</p>
  
! <p class=preformattedtext>&nbsp;&nbsp; -m = use krb524d to convert Kerberos V
! tickets to Kerberos IV</p>
  
! <h2><a name="_Toc115416116"></a><a name="_Toc139993100"></a><a
! name="_Toc126872181"></a><a name="_Toc115417052"></a><span style='mso-bookmark:
! _Toc115416116'>3.10. OpenAFS Servers on Windows are Unsupported</span></h2>
  
  <p class=MsoNormal>The AFS Server functionality provided with OpenAFS 1.4 might
! work but should be considered highly experimental.&nbsp; It has not been
! thoroughly tested.&nbsp; Any data which would cause pain if lost should not be
! stored in an OpenAFS Server on Windows.</p>
  
  <p class=MsoNormal>A few notes on the usage of the AFS Client Service if it is
  going to be used with the OpenAFS AFS Server:</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>When
! installed on the same machine as the AFS Server, Freelance mode must be turned
! off.&nbsp; Otherwise, you will be unable to manipulate the contents of the
! root.afs volume for the hosted cell.</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>The
! AFS Server and related tools only support the built in kaserver (Kerberos
! IV).&nbsp; If the AFS Server is being used, <a
! href="http://web.mit.edu/kerberos/">MIT Kerberos for Windows</a> should not be
! installed or must be disabled.</p>
! 
! <h2><a name="_Toc115416117"></a><a name="_Toc139993101"></a><a
! name="_Toc126872182"></a><a name="_Toc115417053"></a><span style='mso-bookmark:
! _Toc115416117'>3.11. OpenAFS Debugging Symbol files</span></h2>
  
  <p class=MsoNormal>The OpenAFS for Windows installers now include Debugging
  Symbol files which should be installed if you are experiencing problems and
! need to send crash reports.&nbsp; This is true for both the release and the
! debug versions of the installers.&nbsp; The difference between the release and
! debug versions are:</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>whether
! or not the binaries were compiled with optimization</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>whether
! the debug symbols are installed by default</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>whether
! additional debug statements were compiled into the binaries</p>
! 
! <h2><a name="_Toc115416118"></a><a name="_Toc139993102"></a><a
! name="_Toc126872183"></a><a name="_Toc115417054"></a><span style='mso-bookmark:
! _Toc115416118'>3.12. </span>Large Files (64-bit) Supported</h2>
  
  <p class=MsoNormal>As of release 1.5.3, OpenAFS for Windows supports files
! larger than 2GB.&nbsp; The maximum file size is now 16777216 terabytes when the
! AFS File Server supports large files.&nbsp;&nbsp; If the AFS File Server does
! not support large files, then the file size limit remains 2GB.</p>
! 
! <h2><a name="_Toc115416119"></a><a name="_Toc139993103"></a><a
! name="_Toc126872184"></a><a name="_Toc115417055"></a><span style='mso-bookmark:
! _Toc115416119'>3.13. Encrypted AFS File Access</span></h2>
  
  <p class=MsoNormal>The OpenAFS for Windows installer by default activates a
  weak form of encrypted data transfer between the AFS client and the AFS
! servers.&nbsp; This is often referred to as &quot;fcrypt&quot; mode.&nbsp;
! Encrypted data transfer can be turned on or off with the “fs crypt”
! command.&nbsp; Transitions between “crypt” and “non-crypt” modes are logged to
! the Windows Application Event Log. </p>
! 
! <h2><a name="_Toc115416120"></a><a name="_Toc139993104"></a><a
! name="_Toc126872185"></a><a name="_Toc115417056"></a><span style='mso-bookmark:
! _Toc115416120'>3.14. Authenticated Access to the OpenAFS Client Service</span></h2>
  
  <p class=MsoNormal>OpenAFS 1.4 supports authenticated SMB connections using
! either NTLM or GSS SPNEGO (NTLM).&nbsp; In previous versions of OpenAFS, the
! SMB connections were unauthenticated which opened the door for several attacks
  which could be used to obtain access to another user's tokens on shared
! machines.&nbsp;&nbsp;&nbsp; </p>
  
  <p class=MsoNormal>When GSS SPNEGO attempts a Kerberos 5 authentication, the
  Windows SMB client will attempt to retrieve service tickets for
  &quot;cifs/afs@REALM&quot; (if the loopback adapter is in use) or
! &quot;cifs/machine-afs@REALM&quot; (if the loopback adapter is not being used).&nbsp;
! It is extremely important that this service principal not exist in the KDC
! database as the Kerberos authentication must fail allowing automatic fallback
! to NTLM.&nbsp; When NTLM is used a special local authentication mode will be
! used that does not require access to the user's password.&nbsp; Instead,
! Windows will internally recognize the request as coming from a local logon
! session.</p>
! 
! <h2><a name="_Toc115416121"></a><a name="_Toc139993105"></a><a
! name="_Toc126872186"></a><a name="_Toc115417057"></a><span style='mso-bookmark:
! _Toc115416121'>3.15. No More INI Files</span></h2>
  
  <p class=MsoNormal>Previous AFS clients for Windows stored configuration data
! in Windows .INI files. &nbsp;&nbsp;OpenAFS 1.4 does not use Windows .INI files
! for the storage of configuration data.&nbsp;&nbsp; All settings are now stored
! in the registry (see <a href="#_Appendix_A:_Registry_Values">Appendix A</a>).&nbsp;
  The CellServDB file is now stored in the %PROGRAMFILES%\OpenAFS\Client
! directory.&nbsp;&nbsp; The <i><a href="#_Value___:_CellServDBDir">CellServDBDir</a></i>
  registry value can be used to specify an alternative location.</p>
  
  <p class=MsoNormal>OpenAFS 1.4 will relocate the contents of the “afsdcell.ini”
! file to the new CellServDB file.&nbsp; OpenAFS 1.4 will also import the
! contents of the “afs_freelance.ini” file to the Windows registry.&nbsp;&nbsp;
! OpenAFS 1.4 will not process the contents of the “afsddbmt.ini”.</p>
! 
! <h2><a name="_Toc115416122"></a><a name="_Toc139993106"></a><a
! name="_Toc126872187"></a><a name="_Toc115417058"></a><span style='mso-bookmark:
! _Toc115416122'>3.16. Microsoft Windows Internet Connection Firewall</span></h2>
  
  <p class=MsoNormal>The OpenAFS 1.4 Client is compatible with the Internet
! Connection Firewall that debuted with Windows XP SP2 and Windows 2003
! SP1.&nbsp; The Internet Connection Firewall will be automatically adjusted to
! allow the receipt of incoming callback messages from the AFS file server.&nbsp;
! In addition, the appropriate <i>Back Connection</i> registry entries are added
! to allow SMB authentication to be performed across the Microsoft Loopback
! Adapter.</p>
! 
! <h2><a name="_Toc115416123"></a><a name="_Toc139993107"></a><a
! name="_Toc126872188"></a><a name="_Toc115417059"></a><span style='mso-bookmark:
! _Toc115416123'>3.17. Browsing AFS from the Explorer Shell and Office</span></h2>
  
  <p class=MsoNormal>The OpenAFS 1.4 Client Service implements the CIFS Remote
  Admin Protocol which allows Explorer to browse server and share information.
  This significantly enhances the interoperability of AFS volumes within the
  Explorer Shell and Microsoft Office applications.</p>
  
! <h2><a name="_Toc115416124"></a><a name="_Toc139993108"></a><a
! name="_Toc126872189"></a><a name="_Toc115417060"></a><span style='mso-bookmark:
! _Toc115416124'>3.18. </span><st1:place w:st="on"><st1:PlaceName w:st="on">Byte</st1:PlaceName>
!  <st1:PlaceType w:st="on">Range</st1:PlaceType></st1:place> Locking</h2>
  
  <p class=MsoNormal>Many applications on Windows (e.g. Microsoft Office) require
  the use of byte range locks applied to a file either to protect against
! simultaneous file access or as a signaling mechanism.&nbsp;&nbsp; OpenAFS for
! Windows release 1.5 (or greater) implements byte range locking within the
! CIFS-AFS gateway server.&nbsp;&nbsp; This support for byte range locking
! obtains <span style='font-family:"Times New Roman"'>AFS’ advisory file server
! locks to simulate Microsoft Windows mandatory locks.&nbsp;&nbsp; When an
! application opens a file, a lock will be obtained from AFS indicating that the
! file is in use.&nbsp; If the lock is a write lock, access to the file will be
! restricted to other applications running on the same machine as the first
! application to request the lock.&nbsp;&nbsp; Applications running on other
! machines will see the AFS full file lock and will be unable to access the file.</span></p>
  
  <p class=MsoNormal><span style='font-family:"Times New Roman"'>Most Windows
  applications and Windows itself opens files in shared read mode. When this is
***************
*** 1077,1483 ****
  
  <p class=MsoNormal>As the CIFS-AFS gateway server attempts to implement Windows
  lock semantics on top of AFS lock semantics it is important to understand how
! AFS file locks work.  In Windows there are no special privileges associated
! with obtaining file locks.  If you can read or execute a file, then you can
! obtain a read lock.  If you can write or create a file, then you can obtain a
! write lock.  In AFS if you can write to a file, then you can obtain a write
! lock.  However, in AFS if you can read a file it does not mean that you can
! obtain a read lock on it.   The ability to obtain read locks is granted only if
! you have the lock (or ‘k’) privilege.  This behavior is required in order to
! allow anonymous users to read files while preventing them from being able to
! deny access to the files to other users.  <i>OpenAFS 1.4.0 and earlier as well
! as all IBM AFS file servers have an implementation bug that prevents users with
! write privileges from being able to obtain locks without the lock privilege.</i> 
! When AFS serves data out of read-only volumes the file server will deny all
! requests for read and write locks because the contents of the volume cannot be
! changed by the client.</p>
  
  <p class=MsoNormal>Since Microsoft Windows applications almost always attempt
  to obtain a temporary read lock when accessing files the CIFS-AFS gateway
  implements the following semantics in order to reduce the inconvenience on end
! users.  </p>
  
! <ul type=disc>
!  <li class=MsoNormal>If the file is located on a read-only volume and the
!      application requests a read lock, the CIFS-AFS server will grant the lock
!      request without asking the AFS file server.</li>
!  <li class=MsoNormal>If the file is located on a read-only volume and the
!      application requests a write lock, the CIFS-AFS server will refuse the
!      lock request and return a read only error.</li>
!  <li class=MsoNormal>If the file is located on a read-write volume and the
!      application requests a write lock, the CIFS-AFS server will request a lock
!      from the AFS file server.  If granted by the file server, then the
!      CIFS-AFS server will grant the lock request.  Otherwise, the request will
!      be denied either with an access denied or an in use error.</li>
!  <li class=MsoNormal>If the file is located on a read-write volume and the
!      application requests a read lock, the CIFS-AFS server will request a lock
!      from the AFS file server.  If granted by the file server, then the
!      CIFS-AFS server grants the lock request.  If the request is denied due to
!      an access denied error and the user has the lookup and read privileges but
!      not the lock privilege, then the CIFS-AFS server will grant the request
!      even though the AFS file server said ‘no’.  If the user does not have at
       least those permissions, the CIFS-AFS server will deny the request.</li>
!  <li class=MsoNormal>If multiple processes on the same machine attempt to
!      access the same file simultaneously, the CIFS-AFS server will locally
!      manage the granted locks and all processes will share a single lock on the
!      AFS file server.</li>
!  <li class=MsoNormal>If the CIFS-AFS server is unable to renew the AFS file
!      server locks, then it will invalidate the associated file handles.  This
!      is the same behavior that an application will experience if it was using a
!      Windows File Share and the connection was broken.   Invalidating the file
!      handles prevents subsequent data corruption from taking place.</li>
  </ul>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993109"></a><a
! name="_Toc126872190"></a><a name="_Toc115417061"></a><a name="_Toc115416125">3.19.
! Automatic Discarding of AFS Tokens at Logoff</a></h2>
  
  <p class=MsoNormal>OpenAFS 1.4 will automatically forget a user's tokens upon
! Logoff unless the user's profile was loaded from an AFS volume.  In this
! situation there is no mechanism to determine when the profile has been
! successfully written back to the network.  It is therefore unsafe to release
! the user's tokens.  Whether or not the profile has been loaded from the
! registry can be determined for Local Accounts, Active Directory accounts and
! NT4 accounts.</p>
  
  <p class=MsoNormal>If there is a need to disable this functionality, the <a
! href="#_Value_:_LogoffPreserveTokens">LogoffPreserveTokens</a>
! registry value can be used. (see <a
! href="#_Appendix_A:_Registry_Values">Appendix A</a>.)</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993110"></a><a
! name="_Toc126872191"></a><a name="_Toc115417062"></a><a name="_Toc115416126">3.20.
! Terminal Server installations</a></h2>
  
  <p class=MsoNormal>When installing the NSIS (.exe) installer under Terminal
! Server, you must execute it from within the Add/Remove Programs Control Panel. 
! Failure to do so will result in AFS not running properly.  The AFS Server
! should not be installed on a machine with Terminal Server installed.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993111"></a><a
! name="_Toc126872192"></a><a name="_Toc115417063"></a><a name="_Toc115416127">3.21.
! Hidden Dot Files</a></h2>
! 
! <p class=MsoNormal>AFS is a UNIX native file system.  The OpenAFS client
! attempts to treat the files stored in AFS as they would be on UNIX.  File and
! directory names beginning with a &quot;.&quot; are automatically given the Hidden
! attribute so they will not normally be displayed.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993112"></a><a
! name="_Toc126872193"></a><a name="_Toc115417064"></a><a name="_Toc115416128">3.22.
! Status Cache Limits</a></h2>
  
  <p class=MsoNormal>The Status Cache (AFS Configuration Control Panel: Advanced
! Page) is defined to have a maximum number of entries.  Each entry represents a
! single file or directory entry accessed within the AFS file system.  When the
! maximum number of entries are allocated, entries will begin to be reused
! according to a least recently used (LRU) algorithm.  If the number of files or
! directories being accessed repeatedly by your applications is greater then the
! maximum number of entries, your host will begin to experience thrashing of the
! Status Cache and all requests will result in network operations.</p>
  
  <p class=MsoNormal>If you are experiencing poor performance try increasing the
! maximum number of Status Cache entries.  Each entry requires approximately
! 1.2K.  In OpenAFS 1.4, the default number of Status Cache entries is 10,000.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993113"></a><a
! name="_Toc126872194"></a><a name="_Toc115417065"></a><a name="_Toc115416129">3.23.
! NETBIOS over TCP/IP must be enabled</a></h2>
  
! <p class=MsoNormal>&quot;Netbios over TCP/IP&quot; must be active on the
! machine in order for communication with the AFS Client Service to succeed.  If
  &quot;Netbios over TCP/IP&quot; is disabled on the machine, then communication
  with the AFS Client Service will be impossible.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993114"></a><a
! name="_Toc126872195"></a><a name="_Toc115417066"></a><a name="_Toc115416130">3.24.
! OpenAFS binaries are digitally signed</a></h2>
  
  <p class=MsoNormal>The OpenAFS Client Service and related binaries distributed
! by OpenAFS.org are digitally signed by &quot;Secure Endpoints Inc.&quot;.  The
! OpenAFS Client Service will perform a run-time verification check to ensure
  that all OpenAFS related DLLs loaded by the service match the same file version
! number and were signed by the same entity.  This check has been added to
  prevent the stability problems caused by more than one AFS installation present
! on a machine at the same time.  Many hours of support time have been wasted
! tracking down problems caused by the mixture of files from different releases. 
! </p>
! 
! <p class=MsoNormal><a
! href="#_Appendix_A:_Registry_Values">Appendix A</a>
! documents the &quot;<a
! href="#_Value___: VerifyServiceSignature">VerifyServiceSignature</a>&quot;
! registry value which can be used to disable the signature check.  The file
  version check cannot be disabled.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993115"></a><a
! name="_Toc126872196"></a><a name="_Toc115417067"></a><a name="_Toc115416131">3.25.
! Maximum Size of the AFSCache File</a></h2>
! 
! <p class=MsoNormal>The maximum cache size is approximately 1.3GB.  This is the
! largest contiguous block of memory in the 2GB process address space which can
! be used for constructing a memory mapped file.  Due to fragmentation of the
! process space caused by the loading of libraries required by the digital
  signature verification code, any attempt to specify a cache size greater then
  700MB will result in the automatic disabling of the signature check.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993116"></a><a
! name="_Toc126872197"></a><a name="_Toc115417068"></a><a name="_Toc115416132">3.26.
! Filename Character Sets</a></h2>
  
  <p class=MsoNormal>OpenAFS for Windows implements an SMB server which is used
! as a gateway to the AFS filesystem.  Because of limitations of the SMB
  implementation, Windows stores all files into AFS using OEM code pages such as
! CP437 (United States) or CP850 (Western Europe).  These code pages are
  incompatible with the ISO Latin-1 character set typically used as the default
! on UNIX systems in both the United States and Western Europe.  Filenames stored
! by OpenAFS for Windows are therefore unreadable on UNIX systems if they include
  any of the following characters:</p>
  
! <table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
!  style='border-collapse:collapse;border:none'>
!  <tr style='height:399.5pt'>
    <td width=590 valign=top style='width:442.8pt;border:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt;height:399.5pt'>
!   <p class=PreformattedText>     [Ç]  128  08/00  200  80  C cedilla</p>
!   <p class=PreformattedText>     [ü]  129  08/01  201  81  u diaeresis</p>
!   <p class=PreformattedText>     [é]  130  08/02  202  82  e acute</p>
!   <p class=PreformattedText>     [â]  131  08/03  203  83  a circumflex</p>
!   <p class=PreformattedText>     [ä]  132  08/04  204  84  a diaeresis</p>
!   <p class=PreformattedText>     [à]  133  08/05  205  85  a grave</p>
!   <p class=PreformattedText>     [å]  134  08/06  206  86  a ring</p>
!   <p class=PreformattedText>     [ç]  135  08/07  207  87  c cedilla</p>
!   <p class=PreformattedText>     [ê]  136  08/08  210  88  e circumflex</p>
!   <p class=PreformattedText>     [ë]  137  08/09  211  89  e diaeresis</p>
!   <p class=PreformattedText>     [è]  138  08/10  212  8A  e grave</p>
!   <p class=PreformattedText>     [ï]  139  08/11  213  8B  i diaeresis</p>
!   <p class=PreformattedText>     [î]  140  08/12  214  8C  i circumflex</p>
!   <p class=PreformattedText>     [ì]  141  08/13  215  8D  i grave</p>
!   <p class=PreformattedText>     [Ä]  142  08/14  216  8E  A diaeresis</p>
!   <p class=PreformattedText>     [Å]  143  08/15  217  8F  A ring</p>
!   <p class=PreformattedText>     [É]  144  09/00  220  90  E acute</p>
!   <p class=PreformattedText>     [æ]  145  09/01  221  91  ae diphthong</p>
!   <p class=PreformattedText>     [Æ]  146  09/02  222  92  AE diphthong</p>
!   <p class=PreformattedText>     [ô]  147  09/03  223  93  o circumflex</p>
!   <p class=PreformattedText>     [ö]  148  09/04  224  94  o diaeresis</p>
!   <p class=PreformattedText>     [ò]  149  09/05  225  95  o grave</p>
!   <p class=PreformattedText>     [û]  150  09/06  226  96  u circumflex</p>
!   <p class=PreformattedText>     [ù]  151  09/07  227  97  u grave</p>
!   <p class=PreformattedText>     [ÿ]  152  09/08  230  98  y diaeresis</p>
!   <p class=PreformattedText>     [Ö]  153  09/09  231  99  O diaeresis</p>
!   <p class=PreformattedText>     [Ü]  154  09/10  232  9A  U diaeresis</p>
!   <p class=PreformattedText>     [ø]  155  09/11  233  9B  o slash</p>
!   <p class=PreformattedText>     [£]  156  09/12  234  9C  Pound sterling sign</p>
!   <p class=PreformattedText>     [Ø]  157  09/13  235  9D  O slash</p>
!   <p class=PreformattedText>     [×]  158  09/14  236  9E  Multiplication sign</p>
!   <p class=PreformattedText>     [ƒ]  159  09/15  237  9F  Florin sign</p>
    </td>
   </tr>
  </table>
  
! <p class=PreformattedText>&nbsp;</p>
  
  <p class=MsoNormal>OpenAFS 1.4 provides an optional registry value, <i><a
! href="#_Value___: StoreAnsiFilenames">StoreAnsiFilenames</a></i>,
! that can be set to instruct OpenAFS to store filenames using the ANSI Code Page
! instead of the OEM Code Page.  The ANSI Code Page is a compatible superset of
! Latin-1.  This setting is not the default setting because making this change
! would prevent OpenAFS for Windows from being able to access filenames
  containing the above characters which were created without this setting.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993117"></a><a
! name="_Toc126872198"></a><a name="_Toc115417069"></a><a name="_Toc115416133">3.27.
! Known Character Set Issues with Roaming Profiles</a></h2>
  
  <p class=MsoNormal>There is a known issue with storing Windows Roaming Profiles
  when the profile contains either directories or files with names which cannot
! be represented in the local OEM character set.  In this case, attempts to write
! the profile back to AFS will fail.  OpenAFS for Windows does not currently
! support UNICODE.  To avoid this problem some sites run logoff scripts (assigned
! by group policy) which rename all files to use only the supported characters
! for the locale.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993118"></a><a
! name="_Toc126872199"></a><a name="_Toc115417070"></a><a name="_Toc115416134">3.28.
! The AFSCache File</a></h2>
  
  <p class=MsoNormal>The AFS Cache file is stored by default at %TEMP%\AFSCache
! in a persistent file marked with the Hidden and System attributes.  The
  persistent nature of the data stored in the cache file improves the performance
  of OpenAFS by reducing the number of times data must be read from the AFS file
! servers.  </p>
  
  <p class=MsoNormal>The performance of the AFS Client Service is significantly
! affected by the access times associated with the AFSCache paging file.   When
! given the choice, the AFSCache file should be placed on a fast disk, preferably
! NTFS, the file should not be compressed and should consist of as few fragments
! as possible.   Significant performance gains can be achieved by defragmenting
! the AFSCache file with Sysinternal's Contig utility.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993119"></a><a
! name="_Toc126872200"></a><a name="_Toc115417071"></a><a name="_Toc115416135">3.29.
! Restricting OpenAFS Client Service Start and Stop</a></h2>
  
  <p class=MsoNormal>A new command line tool, afsdacl.exe, can be used to
  restrict the ability to start and stop the OpenAFS Client Service.</p>
  
! <p class=PreformattedText>    afsdacl : Set or reset the DACL to allow starting
! or stopping</p>
  
! <p class=PreformattedText>         the afsd service by any ordinary user.</p>
  
! <p class=PreformattedText>&nbsp;</p>
  
! <p class=PreformattedText>    Usage : afsdacl [-set | -reset] [-show]</p>
  
! <p class=PreformattedText>          -set   : Sets the DACL</p>
  
! <p class=PreformattedText>          -reset : Reset the DACL</p>
  
! <p class=PreformattedText>          -show  : Show current DACL (SDSF)</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993120"></a><a
! name="_Toc126872201"></a><a name="_Toc115417072"></a><a name="_Toc115416136">3.30.
! The @sys Name List</a></h2>
  
  <p class=MsoNormal>The default @sys name list in OpenAFS 1.4 is set to
! &quot;x86_win32 i386_w2k i386_nt40&quot; for 32-bit x86 systems.  The default
! for itanium will be &quot;ia64_win64&quot; and &quot;amd64_win64&quot; for amd
! 64-bit processors when those platforms are supported.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993121"></a><a
! name="_Toc126872202"></a><a name="_Toc115417073"></a><a name="_Toc115416137">3.31.
! Symlinks to AFS UNC paths</a></h2>
  
  <p class=MsoNormal>In OpenAFS 1.4, symlinks to AFS UNC paths, \\AFS[\all]\...,
! are treated the same as symlinks to /afs/...  However, please use /afs/... as
! the Windows UNC form will not work on UNIX.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993122"></a><a
! name="_Toc126872203"></a><a name="_Toc115417074"></a><a name="_Toc115416138">3.32.
! Cache Manager Debugging Now Supported</a></h2>
  
  <p class=MsoNormal>OpenAFS for Windows 1.4 implements the Cache Manager
! Debugging RPC Interface.  The CM debugger can be queried with cmdebug.exe.</p>
  
! <p class=PreformattedText>Usage: cmdebug -servers &lt;server machine&gt; [-port
  &lt;IP port&gt;] [-long]</p>
  
! <p class=PreformattedText>               [-addrs] [-cache] [-help]</p>
  
! <p class=PreformattedText>Where: -long   print all info</p>
  
! <p class=PreformattedText>       -addrs  print only host interfaces</p>
  
! <p class=PreformattedText>       -cache  print only cache configuration</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993123"></a><a
! name="_Toc126872204"></a><a name="_Toc115417075"></a><a name="_Toc115416139">3.33.
! Windows Logon Caching vs. Kerberos Logons</a></h2>
  
  <p class=MsoNormal>If you are a site which utilizes MIT/Heimdal Kerberos
  principals to logon to Windows via a cross-realm relationship with a
  multi-domain Windows forest, you must enable Windows logon caching unless the
! workstation is Windows Vista Beta 2 or later.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993124"></a><a
! name="_Toc126872205"></a><a name="_Toc115417076"></a><a name="_Toc115416140">3.34.
! Initial Server Preferences</a></h2>
  
  <p class=MsoNormal>VLDB and File Server Preferences can now be provided initial
! values using registry keys.  This is useful for managed machines in a Windows
! domain which are centrally located (e.g., in a computing lab.)  See <a
! href="#_Appendix_A:_Registry_Values">Appendix A</a>
! for details on the &quot;<a
! href="#_Regkey:_[HKLMSOFTWAREOpenAFSClie_2">Server
! Preferences</a>&quot; keys.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993125"></a><a
! name="_Toc126872206"></a><a name="_Toc115417077"></a><a name="_Toc115416141">3.35.
! File Timestamps</a></h2>
  
  <p class=MsoNormal>OpenAFS 1.4 reports timestamps on files stored in AFS in UTC
! all year round.  In locales with daylight savings time, previous versions of
! AFS for Windows reported the time when DST is active as UTC+1.  This was done
! to preserve the relative local time for the user.  A file stored at 11:00am EST
! in January would be reported as having been stored at 11:00am EDT in June. 
! Unfortunately, this has the negative side effect of changing the reported
! timestamp from 16:00UTC to 15:00UTC.  Since Windows treats all file times in
! UTC, data synchronization applications which rely on the timestamp would
! believe that all files stored in AFS had changed.</p>
  
  <p class=MsoNormal>It should be noted that UNIX based operating systems (such
! as Solaris) do not appear to report file times to applications in UTC.  They do
! preserve the relative local time.  This may confuse some users who are used to
! being able to compare the timestamp in an UNIX shell with the timestamp from
! the Windows explorer.  During DST, these two times will no longer agree even
! though they are in fact representing the same moment in time.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993126"></a><a
! name="_Toc126872207"></a><a name="_Toc115417078"></a><a name="_Toc115416142">3.36.
! Windows RPC client support must be installed</a> </h2>
  
  <p class=MsoNormal>If the installer refuses to install and complains about an
  RPC configuration error, check to ensure that the following registry entries
  are present and that they refer to the dll &quot;rpcrt4.dll&quot;:</p>
  
! <p class=PreformattedText>   HKLM
  &quot;SOFTWARE\Microsoft\RPC\ClientProtocols&quot; &quot;ncacn_np&quot;</p>
  
! <p class=PreformattedText>   HKLM
  &quot;SOFTWARE\Microsoft\RPC\ClientProtocols&quot; &quot;ncacn_ip_tcp&quot;</p>
  
! <p class=PreformattedText>   HKLM
  &quot;SOFTWARE\Microsoft\RPC\ClientProtocols&quot; &quot;ncadg_ip_udp&quot;</p>
  
! <p class=PreformattedText>   HKLM
  &quot;SOFTWARE\Microsoft\RPC\ClientProtocols&quot; &quot;ncacn_http&quot;</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993127"></a><a
! name="_Toc126872208"></a><a name="_Toc115417079"></a><a name="_Toc115416143">3.37.
! Generating Minidumps of the OpenAFS Client Service</a></h2>
! 
! <p class=MsoNormal>OpenAFS 1.4 adds a new command, &quot;fs minidump&quot;. 
! This command can be used at any time to generate a mini dump file containing
! the current stack of the afsd_service.exe process.   This output can be very
! helpful when debugging the AFS Client Service when it is unresponsive to
! SMB/CIFS requests.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993128"></a><a
! name="_Toc126872209"></a><a name="_Toc115417080"></a><a name="_Toc115416144">3.38.
! AFS Client Universally Unique Identifiers</a></h2>
  
  <p class=MsoNormal>The OpenAFS for Windows 1.4 client implements Universally
! Unique Identifiers (UUIDs).  They are used to provide the server with a method
! of identifying the client that is independent of IP address.  The UUID is
! generated when the AFSCache file is created and is maintained as long as the
! contents of the AFSCache file are kept intact.  The UUID is stored in the
! AFSCache file.   When cloning machines that have Windows AFS client installed,
! the AFSCache files should be deleted as part of the cloning process.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993129">3.39.
! Delayed Write Errors with Microsoft Office Applications</a></h2>
  
  <p class=MsoBodyText>Microsoft Office makes heavy use of asynchronous
! input/output methods for reading and writing to file streams.  This can result
! in hundreds of requests being simultaneously queued for service by the CIFS
! client with a fixed timeout period.  As the AFS CIFS server is local to the
! machine the Windows CIFS client believes that it can respond almost
  instantaneously to write requests as the actual writing to the AFS file server
! is performed by a background daemon thread.  When the actual network bandwidth
  to the AFS file server is slow and the file size is large it is possible for
! the CIFS client to time out the connection.  When this happens a “delayed write
! error” will be reported to the user and the application may crash.  The only
! workaround at the current time is to save first to a local disk and
  subsequently copy the file to AFS as copying a file with the explorer shell
! does not use asynchronous i/o.</p>
  
  <p class=MsoBodyText>The CIFS session timeout defaults to 45 seconds and can be
  increased by modifying the <a href="../relnotes.htm#_Value:_ConnDeadTimeout">registry</a>.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993130">3.40.
! Global Drives (aka </a>Service Drive Letters) are no longer supported by
! Microsoft</h2>
  
  <p class=MsoBodyText>The Global DriveAuto-mount feature has been deprecated due
  to the following Microsoft KB article.</p>
--- 1365,1818 ----
  
  <p class=MsoNormal>As the CIFS-AFS gateway server attempts to implement Windows
  lock semantics on top of AFS lock semantics it is important to understand how
! AFS file locks work.&nbsp; In Windows there are no special privileges
! associated with obtaining file locks.&nbsp; If you can read or execute a file,
! then you can obtain a read lock.&nbsp; If you can write or create a file, then
! you can obtain a write lock.&nbsp; In AFS if you can write to a file, then you
! can obtain a write lock.&nbsp; However, in AFS if you can read a file it does
! not mean that you can obtain a read lock on it.&nbsp;&nbsp; The ability to
! obtain read locks is granted only if you have the lock (or ‘k’)
! privilege.&nbsp; This behavior is required in order to allow anonymous users to
! read files while preventing them from being able to deny access to the files to
! other users.&nbsp; <i>OpenAFS 1.4.0 and earlier as well as all IBM AFS file
! servers have an implementation bug that prevents users with write privileges
! from being able to obtain locks without the lock privilege.</i>&nbsp; When AFS
! serves data out of read-only volumes the file server will deny all requests for
! read and write locks because the contents of the volume cannot be changed by
! the client.</p>
  
  <p class=MsoNormal>Since Microsoft Windows applications almost always attempt
  to obtain a temporary read lock when accessing files the CIFS-AFS gateway
  implements the following semantics in order to reduce the inconvenience on end
! users.&nbsp; </p>
  
! <ul style='margin-top:0pt' type=disc>
!  <li class=MsoNormal style='mso-list:l1 level1 lfo3;tab-stops:list 36.0pt'>If
!      the file is located on a read-only volume and the application requests a
!      read lock, the CIFS-AFS server will grant the lock request without asking
!      the AFS file server.</li>
!  <li class=MsoNormal style='mso-list:l1 level1 lfo3;tab-stops:list 36.0pt'>If
!      the file is located on a read-only volume and the application requests a
!      write lock, the CIFS-AFS server will refuse the lock request and return a
!      read only error.</li>
!  <li class=MsoNormal style='mso-list:l1 level1 lfo3;tab-stops:list 36.0pt'>If
!      the file is located on a read-write volume and the application requests a
!      write lock, the CIFS-AFS server will request a lock from the AFS file
!      server.&nbsp; If granted by the file server, then the CIFS-AFS server will
!      grant the lock request.&nbsp; Otherwise, the request will be denied either
!      with an access denied or an in use error.</li>
!  <li class=MsoNormal style='mso-list:l1 level1 lfo3;tab-stops:list 36.0pt'>If
!      the file is located on a read-write volume and the application requests a
!      read lock, the CIFS-AFS server will request a lock from the AFS file
!      server.&nbsp; If granted by the file server, then the CIFS-AFS server
!      grants the lock request.&nbsp; If the request is denied due to an access
!      denied error and the user has the lookup and read privileges but not the
!      lock privilege, then the CIFS-AFS server will grant the request even
!      though the AFS file server said ‘no’.&nbsp; If the user does not have at
       least those permissions, the CIFS-AFS server will deny the request.</li>
!  <li class=MsoNormal style='mso-list:l1 level1 lfo3;tab-stops:list 36.0pt'>If
!      multiple processes on the same machine attempt to access the same file
!      simultaneously, the CIFS-AFS server will locally manage the granted locks
!      and all processes will share a single lock on the AFS file server.</li>
!  <li class=MsoNormal style='mso-list:l1 level1 lfo3;tab-stops:list 36.0pt'>If
!      the CIFS-AFS server is unable to renew the AFS file server locks, then it
!      will invalidate the associated file handles.&nbsp; This is the same
!      behavior that an application will experience if it was using a Windows
!      File Share and the connection was broken.&nbsp;&nbsp; Invalidating the
!      file handles prevents subsequent data corruption from taking place.</li>
  </ul>
  
! <h2><a name="_Toc115416125"></a><a name="_Toc139993109"></a><a
! name="_Toc126872190"></a><a name="_Toc115417061"></a><span style='mso-bookmark:
! _Toc115416125'>3.19. Automatic Discarding of AFS Tokens at Logoff</span></h2>
  
  <p class=MsoNormal>OpenAFS 1.4 will automatically forget a user's tokens upon
! Logoff unless the user's profile was loaded from an AFS volume.&nbsp; In this situation
! there is no mechanism to determine when the profile has been successfully
! written back to the network.&nbsp; It is therefore unsafe to release the user's
! tokens.&nbsp; Whether or not the profile has been loaded from the registry can
! be determined for Local Accounts, Active Directory accounts and NT4 accounts.</p>
  
  <p class=MsoNormal>If there is a need to disable this functionality, the <a
! href="#_Value_:_LogoffPreserveTokens">LogoffPreserveTokens</a> registry value
! can be used. (see <a href="#_Appendix_A:_Registry_Values">Appendix A</a>.)</p>
! 
! <h2><a name="_Toc115416126"></a><a name="_Toc139993110"></a><a
! name="_Toc126872191"></a><a name="_Toc115417062"></a><span style='mso-bookmark:
! _Toc115416126'>3.20. Terminal Server installations</span></h2>
  
  <p class=MsoNormal>When installing the NSIS (.exe) installer under Terminal
! Server, you must execute it from within the Add/Remove Programs Control
! Panel.&nbsp; Failure to do so will result in AFS not running properly.&nbsp; The
! AFS Server should not be installed on a machine with Terminal Server installed.</p>
! 
! <h2><a name="_Toc115416127"></a><a name="_Toc139993111"></a><a
! name="_Toc126872192"></a><a name="_Toc115417063"></a><span style='mso-bookmark:
! _Toc115416127'>3.21. Hidden Dot Files</span></h2>
! 
! <p class=MsoNormal>AFS is a UNIX native file system.&nbsp; The OpenAFS client
! attempts to treat the files stored in AFS as they would be on UNIX.&nbsp; File
! and directory names beginning with a &quot;.&quot; are automatically given the
! Hidden attribute so they will not normally be displayed.</p>
! 
! <h2><a name="_Toc115416128"></a><a name="_Toc139993112"></a><a
! name="_Toc126872193"></a><a name="_Toc115417064"></a><span style='mso-bookmark:
! _Toc115416128'>3.22. Status Cache Limits</span></h2>
  
  <p class=MsoNormal>The Status Cache (AFS Configuration Control Panel: Advanced
! Page) is defined to have a maximum number of entries.&nbsp; Each entry represents
! a single file or directory entry accessed within the AFS file system.&nbsp;
! When the maximum number of entries are allocated, entries will begin to be
! reused according to a least recently used (LRU) algorithm.&nbsp; If the number
! of files or directories being accessed repeatedly by your applications is
! greater then the maximum number of entries, your host will begin to experience
! thrashing of the Status Cache and all requests will result in network
! operations.</p>
  
  <p class=MsoNormal>If you are experiencing poor performance try increasing the
! maximum number of Status Cache entries.&nbsp; Each entry requires approximately
! 1.2K.&nbsp; In OpenAFS 1.4, the default number of Status Cache entries is
! 10,000.</p>
! 
! <h2><a name="_Toc115416129"></a><a name="_Toc139993113"></a><a
! name="_Toc126872194"></a><a name="_Toc115417065"></a><span style='mso-bookmark:
! _Toc115416129'>3.23. NETBIOS over TCP/IP must be enabled</span></h2>
  
! <p class=MsoNormal>&quot;Netbios over TCP/IP&quot; must be active on the machine
! in order for communication with the AFS Client Service to succeed.&nbsp; If
  &quot;Netbios over TCP/IP&quot; is disabled on the machine, then communication
  with the AFS Client Service will be impossible.</p>
  
! <h2><a name="_Toc115416130"></a><a name="_Toc139993114"></a><a
! name="_Toc126872195"></a><a name="_Toc115417066"></a><span style='mso-bookmark:
! _Toc115416130'>3.24. OpenAFS binaries are digitally signed</span></h2>
  
  <p class=MsoNormal>The OpenAFS Client Service and related binaries distributed
! by OpenAFS.org are digitally signed by &quot;Secure Endpoints Inc.&quot;.&nbsp;
! The OpenAFS Client Service will perform a run-time verification check to ensure
  that all OpenAFS related DLLs loaded by the service match the same file version
! number and were signed by the same entity.&nbsp; This check has been added to
  prevent the stability problems caused by more than one AFS installation present
! on a machine at the same time.&nbsp; Many hours of support time have been
! wasted tracking down problems caused by the mixture of files from different
! releases.&nbsp; </p>
! 
! <p class=MsoNormal><a href="#_Appendix_A:_Registry_Values">Appendix A</a>
! documents the &quot;<a href="#_Value___:_VerifyServiceSignature">VerifyServiceSignature</a>&quot;
! registry value which can be used to disable the signature check.&nbsp; The file
  version check cannot be disabled.</p>
  
! <h2><a name="_Toc115416131"></a><a name="_Toc139993115"></a><a
! name="_Toc126872196"></a><a name="_Toc115417067"></a><span style='mso-bookmark:
! _Toc115416131'>3.25. Maximum Size of the AFSCache File</span></h2>
! 
! <p class=MsoNormal>The maximum cache size is approximately 1.3GB.&nbsp; This is
! the largest contiguous block of memory in the 2GB process address space which
! can be used for constructing a memory mapped file.&nbsp; Due to fragmentation
! of the process space caused by the loading of libraries required by the digital
  signature verification code, any attempt to specify a cache size greater then
  700MB will result in the automatic disabling of the signature check.</p>
  
! <h2><a name="_Toc115416132"></a><a name="_Toc139993116"></a><a
! name="_Toc126872197"></a><a name="_Toc115417068"></a><span style='mso-bookmark:
! _Toc115416132'>3.26. Filename Character Sets</span></h2>
  
  <p class=MsoNormal>OpenAFS for Windows implements an SMB server which is used
! as a gateway to the AFS filesystem.&nbsp; Because of limitations of the SMB
  implementation, Windows stores all files into AFS using OEM code pages such as
! CP437 (United States) or CP850 (Western Europe).&nbsp; These code pages are
  incompatible with the ISO Latin-1 character set typically used as the default
! on UNIX systems in both the <st1:country-region w:st="on">United States</st1:country-region>
! and <st1:place w:st="on">Western Europe</st1:place>.&nbsp; Filenames stored by
! OpenAFS for Windows are therefore unreadable on UNIX systems if they include
  any of the following characters:</p>
  
! <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
!  style='border-collapse:collapse;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
!   height:399.5pt'>
    <td width=590 valign=top style='width:442.8pt;border:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt;height:399.5pt'>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [Ç]&nbsp; 128&nbsp;
!   08/00&nbsp; 200&nbsp; 80&nbsp; C cedilla</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [ü]&nbsp; 129&nbsp;
!   08/01&nbsp; 201&nbsp; 81&nbsp; u diaeresis</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [é]&nbsp; 130&nbsp;
!   08/02&nbsp; 202&nbsp; 82&nbsp; e acute</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [â]&nbsp; 131&nbsp;
!   08/03&nbsp; 203&nbsp; 83&nbsp; a circumflex</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [ä]&nbsp; 132&nbsp;
!   08/04&nbsp; 204&nbsp; 84&nbsp; a diaeresis</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [à]&nbsp; 133&nbsp;
!   08/05&nbsp; 205&nbsp; 85&nbsp; a grave</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [å]&nbsp; 134&nbsp;
!   08/06&nbsp; 206&nbsp; 86&nbsp; a ring</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [ç]&nbsp; 135&nbsp;
!   08/07&nbsp; 207&nbsp; 87&nbsp; c cedilla</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [ê]&nbsp; 136&nbsp;
!   08/08&nbsp; 210&nbsp; 88&nbsp; e circumflex</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [ë]&nbsp; 137&nbsp;
!   08/09&nbsp; 211&nbsp; 89&nbsp; e diaeresis</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [è]&nbsp; 138&nbsp;
!   08/10&nbsp; 212&nbsp; 8A&nbsp; e grave</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [ï]&nbsp; 139&nbsp;
!   08/11&nbsp; 213&nbsp; 8B&nbsp; i diaeresis</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [î]&nbsp; 140&nbsp;
!   08/12&nbsp; 214&nbsp; 8C&nbsp; i circumflex</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [ì]&nbsp; 141&nbsp;
!   08/13&nbsp; 215&nbsp; 8D&nbsp; i grave</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [Ä]&nbsp; 142&nbsp;
!   08/14&nbsp; 216&nbsp; 8E&nbsp; A diaeresis</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [Å]&nbsp; 143&nbsp;
!   08/15&nbsp; 217&nbsp; 8F&nbsp; A ring</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [É]&nbsp; 144&nbsp;
!   09/00&nbsp; 220&nbsp; 90&nbsp; E acute</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [æ]&nbsp; 145&nbsp;
!   09/01&nbsp; 221&nbsp; 91&nbsp; ae diphthong</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [Æ]&nbsp; 146&nbsp;
!   09/02&nbsp; 222&nbsp; 92&nbsp; AE diphthong</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [ô]&nbsp; 147&nbsp;
!   09/03&nbsp; 223&nbsp; 93&nbsp; o circumflex</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [ö]&nbsp; 148&nbsp;
!   09/04&nbsp; 224&nbsp; 94&nbsp; o diaeresis</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [ò]&nbsp; 149&nbsp;
!   09/05&nbsp; 225&nbsp; 95&nbsp; o grave</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [û]&nbsp; 150&nbsp;
!   09/06&nbsp; 226&nbsp; 96&nbsp; u circumflex</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [ù]&nbsp; 151&nbsp;
!   09/07&nbsp; 227&nbsp; 97&nbsp; u grave</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [ÿ]&nbsp; 152&nbsp;
!   09/08&nbsp; 230&nbsp; 98&nbsp; y diaeresis</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [Ö]&nbsp; 153&nbsp;
!   09/09&nbsp; 231&nbsp; 99&nbsp; O diaeresis</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [Ü]&nbsp; 154&nbsp;
!   09/10&nbsp; 232&nbsp; 9A&nbsp; U diaeresis</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [ø]&nbsp; 155&nbsp;
!   09/11&nbsp; 233&nbsp; 9B&nbsp; o slash</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [£]&nbsp; 156&nbsp;
!   09/12&nbsp; 234&nbsp; 9C&nbsp; Pound sterling sign</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [Ø]&nbsp; 157&nbsp;
!   09/13&nbsp; 235&nbsp; 9D&nbsp; O slash</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [×]&nbsp; 158&nbsp;
!   09/14&nbsp; 236&nbsp; 9E&nbsp; Multiplication sign</p>
!   <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; [ƒ]&nbsp; 159&nbsp;
!   09/15&nbsp; 237&nbsp; 9F&nbsp; <st1:place w:st="on">Florin</st1:place> sign</p>
    </td>
   </tr>
  </table>
  
! <p class=preformattedtext>&nbsp;</p>
  
  <p class=MsoNormal>OpenAFS 1.4 provides an optional registry value, <i><a
! href="#_Value___:_StoreAnsiFilenames">StoreAnsiFilenames</a></i>, that can be
! set to instruct OpenAFS to store filenames using the ANSI Code Page instead of
! the OEM Code Page.&nbsp; The ANSI Code Page is a compatible superset of
! Latin-1.&nbsp; This setting is not the default setting because making this
! change would prevent OpenAFS for Windows from being able to access filenames
  containing the above characters which were created without this setting.</p>
  
! <h2><a name="_Toc115416133"></a><a name="_Toc139993117"></a><a
! name="_Toc126872198"></a><a name="_Toc115417069"></a><span style='mso-bookmark:
! _Toc115416133'>3.27. Known Character Set Issues with Roaming Profiles</span></h2>
  
  <p class=MsoNormal>There is a known issue with storing Windows Roaming Profiles
  when the profile contains either directories or files with names which cannot
! be represented in the local OEM character set.&nbsp; In this case, attempts to
! write the profile back to AFS will fail.&nbsp; OpenAFS for Windows does not
! currently support UNICODE.&nbsp; To avoid this problem some sites run logoff
! scripts (assigned by group policy) which rename all files to use only the
! supported characters for the locale.</p>
! 
! <h2><a name="_Toc115416134"></a><a name="_Toc139993118"></a><a
! name="_Toc126872199"></a><a name="_Toc115417070"></a><span style='mso-bookmark:
! _Toc115416134'>3.28. The AFSCache File</span></h2>
  
  <p class=MsoNormal>The AFS Cache file is stored by default at %TEMP%\AFSCache
! in a persistent file marked with the Hidden and System attributes.&nbsp; The
  persistent nature of the data stored in the cache file improves the performance
  of OpenAFS by reducing the number of times data must be read from the AFS file
! servers.&nbsp; </p>
  
  <p class=MsoNormal>The performance of the AFS Client Service is significantly
! affected by the access times associated with the AFSCache paging
! file.&nbsp;&nbsp; When given the choice, the AFSCache file should be placed on
! a fast disk, preferably NTFS, the file should not be compressed and should
! consist of as few fragments as possible.&nbsp;&nbsp; Significant performance
! gains can be achieved by defragmenting the AFSCache file with Sysinternal's
! Contig utility.</p>
! 
! <h2><a name="_Toc115416135"></a><a name="_Toc139993119"></a><a
! name="_Toc126872200"></a><a name="_Toc115417071"></a><span style='mso-bookmark:
! _Toc115416135'>3.29. Restricting OpenAFS Client Service Start and Stop</span></h2>
  
  <p class=MsoNormal>A new command line tool, afsdacl.exe, can be used to
  restrict the ability to start and stop the OpenAFS Client Service.</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp; afsdacl : Set or reset the DACL to
! allow starting or stopping</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the
! afsd service by any ordinary user.</p>
  
! <p class=preformattedtext>&nbsp;</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp; Usage : afsdacl [-set | -reset]
! [-show]</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! -set&nbsp;&nbsp; : Sets the DACL</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! -reset : Reset the DACL</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! &nbsp;&nbsp;-show&nbsp; : Show current DACL (SDSF)</p>
  
! <h2><a name="_Toc115416136"></a><a name="_Toc139993120"></a><a
! name="_Toc126872201"></a><a name="_Toc115417072"></a><span style='mso-bookmark:
! _Toc115416136'>3.30. The @sys Name List</span></h2>
  
  <p class=MsoNormal>The default @sys name list in OpenAFS 1.4 is set to
! &quot;x86_win32 i386_w2k i386_nt40&quot; for 32-bit x86 systems.&nbsp; The
! default for itanium will be &quot;ia64_win64&quot; and &quot;amd64_win64&quot;
! for amd 64-bit processors when those platforms are supported.</p>
! 
! <h2><a name="_Toc115416137"></a><a name="_Toc139993121"></a><a
! name="_Toc126872202"></a><a name="_Toc115417073"></a><span style='mso-bookmark:
! _Toc115416137'>3.31. Symlinks to AFS UNC paths</span></h2>
  
  <p class=MsoNormal>In OpenAFS 1.4, symlinks to AFS UNC paths, \\AFS[\all]\...,
! are treated the same as symlinks to /afs/...&nbsp; However, please use /afs/...
! as the Windows UNC form will not work on UNIX.</p>
  
! <h2><a name="_Toc115416138"></a><a name="_Toc139993122"></a><a
! name="_Toc126872203"></a><a name="_Toc115417074"></a><span style='mso-bookmark:
! _Toc115416138'>3.32. Cache Manager Debugging Now Supported</span></h2>
  
  <p class=MsoNormal>OpenAFS for Windows 1.4 implements the Cache Manager
! Debugging RPC Interface.&nbsp; The CM debugger can be queried with cmdebug.exe.</p>
  
! <p class=preformattedtext>Usage: cmdebug -servers &lt;server machine&gt; [-port
  &lt;IP port&gt;] [-long]</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! [-addrs] [-cache] [-help]</p>
  
! <p class=preformattedtext>Where: -long&nbsp;&nbsp; print all info</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -addrs&nbsp;
! print only host interfaces</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -cache&nbsp;
! print only cache configuration</p>
  
! <h2><a name="_Toc115416139"></a><a name="_Toc139993123"></a><a
! name="_Toc126872204"></a><a name="_Toc115417075"></a><span style='mso-bookmark:
! _Toc115416139'>3.33. Windows Logon Caching vs. Kerberos Logons</span></h2>
  
  <p class=MsoNormal>If you are a site which utilizes MIT/Heimdal Kerberos
  principals to logon to Windows via a cross-realm relationship with a
  multi-domain Windows forest, you must enable Windows logon caching unless the
! workstation is Windows Vista RC2 or later.</p>
  
! <h2><a name="_Toc115416140"></a><a name="_Toc139993124"></a><a
! name="_Toc126872205"></a><a name="_Toc115417076"></a><span style='mso-bookmark:
! _Toc115416140'>3.34. Initial Server Preferences</span></h2>
  
  <p class=MsoNormal>VLDB and File Server Preferences can now be provided initial
! values using registry keys.&nbsp; This is useful for managed machines in a
! Windows domain which are centrally located (e.g., in a computing lab.)&nbsp;
! See <a href="#_Appendix_A:_Registry_Values">Appendix A</a> for details on the
! &quot;<a href="#_Regkey:_[HKLMSOFTWAREOpenAFSClie_2">Server Preferences</a>&quot;
! keys.</p>
! 
! <h2><a name="_Toc115416141"></a><a name="_Toc139993125"></a><a
! name="_Toc126872206"></a><a name="_Toc115417077"></a><span style='mso-bookmark:
! _Toc115416141'>3.35. File Timestamps</span></h2>
  
  <p class=MsoNormal>OpenAFS 1.4 reports timestamps on files stored in AFS in UTC
! all year round.&nbsp; In locales with daylight savings time, previous versions
! of AFS for Windows reported the time when DST is active as UTC+1.&nbsp; This
! was done to preserve the relative local time for the user.&nbsp; A file stored
! at 11:00am EST in January would be reported as having been stored at 11:00am
! EDT in June.&nbsp; Unfortunately, this has the negative side effect of changing
! the reported timestamp from 16:00UTC to 15:00UTC.&nbsp; Since Windows treats
! all file times in UTC, data synchronization applications which rely on the
! timestamp would believe that all files stored in AFS had changed.</p>
  
  <p class=MsoNormal>It should be noted that UNIX based operating systems (such
! as Solaris) do not appear to report file times to applications in UTC.&nbsp;
! They do preserve the relative local time.&nbsp; This may confuse some users who
! are used to being able to compare the timestamp in an UNIX shell with the
! timestamp from the Windows explorer.&nbsp; During DST, these two times will no
! longer agree even though they are in fact representing the same moment in time.</p>
! 
! <h2><a name="_Toc115416142"></a><a name="_Toc139993126"></a><a
! name="_Toc126872207"></a><a name="_Toc115417078"></a><span style='mso-bookmark:
! _Toc115416142'>3.36. Windows RPC client support must be installed</span> </h2>
  
  <p class=MsoNormal>If the installer refuses to install and complains about an
  RPC configuration error, check to ensure that the following registry entries
  are present and that they refer to the dll &quot;rpcrt4.dll&quot;:</p>
  
! <p class=preformattedtext>&nbsp;&nbsp; HKLM
  &quot;SOFTWARE\Microsoft\RPC\ClientProtocols&quot; &quot;ncacn_np&quot;</p>
  
! <p class=preformattedtext>&nbsp;&nbsp; HKLM
  &quot;SOFTWARE\Microsoft\RPC\ClientProtocols&quot; &quot;ncacn_ip_tcp&quot;</p>
  
! <p class=preformattedtext>&nbsp;&nbsp; HKLM
  &quot;SOFTWARE\Microsoft\RPC\ClientProtocols&quot; &quot;ncadg_ip_udp&quot;</p>
  
! <p class=preformattedtext>&nbsp;&nbsp; HKLM
  &quot;SOFTWARE\Microsoft\RPC\ClientProtocols&quot; &quot;ncacn_http&quot;</p>
  
! <h2><a name="_Toc115416143"></a><a name="_Toc139993127"></a><a
! name="_Toc126872208"></a><a name="_Toc115417079"></a><span style='mso-bookmark:
! _Toc115416143'>3.37. Generating Minidumps of the OpenAFS Client Service</span></h2>
! 
! <p class=MsoNormal>OpenAFS 1.4 adds a new command, &quot;fs
! minidump&quot;.&nbsp; This command can be used at any time to generate a mini
! dump file containing the current stack of the afsd_service.exe
! process.&nbsp;&nbsp; This output can be very helpful when debugging the AFS
! Client Service when it is unresponsive to SMB/CIFS requests.</p>
! 
! <h2><a name="_Toc115416144"></a><a name="_Toc139993128"></a><a
! name="_Toc126872209"></a><a name="_Toc115417080"></a><span style='mso-bookmark:
! _Toc115416144'>3.38. AFS Client Universally Unique Identifiers</span></h2>
  
  <p class=MsoNormal>The OpenAFS for Windows 1.4 client implements Universally
! Unique Identifiers (UUIDs).&nbsp; They are used to provide the server with a
! method of identifying the client that is independent of IP address.&nbsp; The
! UUID is generated when the AFSCache file is created and is maintained as long
! as the contents of the AFSCache file are kept intact.&nbsp; The UUID is stored
! in the AFSCache file.&nbsp;&nbsp; When cloning machines that have Windows AFS
! client installed, the AFSCache files should be deleted as part of the cloning
! process.</p>
  
! <h2><a name="_Toc139993129">3.39. Delayed Write Errors with Microsoft Office
! Applications</a></h2>
  
  <p class=MsoBodyText>Microsoft Office makes heavy use of asynchronous
! input/output methods for reading and writing to file streams.&nbsp; This can
! result in hundreds of requests being simultaneously queued for service by the
! CIFS client with a fixed timeout period.&nbsp; As the AFS CIFS server is local
! to the machine the Windows CIFS client believes that it can respond almost
  instantaneously to write requests as the actual writing to the AFS file server
! is performed by a background daemon thread.&nbsp; When the actual network bandwidth
  to the AFS file server is slow and the file size is large it is possible for
! the CIFS client to time out the connection.&nbsp; When this happens a “delayed
! write error” will be reported to the user and the application may crash.&nbsp;
! The only workaround at the current time is to save first to a local disk and
  subsequently copy the file to AFS as copying a file with the explorer shell
! does not use asynchronous i/o. </p>
  
  <p class=MsoBodyText>The CIFS session timeout defaults to 45 seconds and can be
  increased by modifying the <a href="../relnotes.htm#_Value:_ConnDeadTimeout">registry</a>.</p>
  
! <h2><a name="_Toc139993130">3.40. Global Drives (aka </a><st1:Street w:st="on"><st1:address
!  w:st="on">Service Drive</st1:address></st1:Street> Letters) are no longer
! supported by Microsoft</h2>
  
  <p class=MsoBodyText>The Global DriveAuto-mount feature has been deprecated due
  to the following Microsoft KB article.</p>
***************
*** 1486,1839 ****
  href="http://msdn.microsoft.com/library/en-us/dllproc/base/services_and_redirected_drives.asp">http://msdn.microsoft.com/library/en-us/dllproc/base/services_and_redirected_drives.asp</a></p>
  
  <p class=MsoBodyText>It says that services mounting drive letters are no longer
! supported by Microsoft and may act unpredictably.  The experience other users
! have had is that if the connection to the OpenAFS CIFS/SMB server is terminated
! by the Windows CIFS client, the drive mapping may not be re-established until
! the machine is rebooted.</p>
  
  <p class=MsoBodyText>OpenAFS supports UNC paths and whenever possible
  applications should be modified to use of \\AFS\&lt;cellname&gt;\&lt;path&gt;
  instead of drive letters.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993131">3.41.
! 64-bit Microsoft Windows Installations</a></h2>
  
  <p class=MsoBodyText>Although 64-bit Windows platforms support both 64-bit and
! 32-bit applications, the OpenAFS Service installed on the machine must be 64-bit. 
! The 64-bit installer contains only 64-bit executables.  In order to support
! 32-bit applications that link against OpenAFS libraries it is required that a
! separate 32-bit OpenAFS Tools set be installed.</p>
  
  <p class=MsoBodyText>OpenAFS on 64-bit Windows benefits from the lifting of the
! 2GB process memory restriction that is present on 32-bit Windows.   Without
! this restriction the AFS Cache File can become arbitrarily large limited only
! by available disk space.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993132">3.42. Known
! Issues with Microsoft Windows </a>Vista</h2>
! 
! <p class=MsoBodyText>OpenAFS for Windows is known to work with Vista and Longhorn Server Beta 2 from the command prompt.  There are still issues with the
! Explorer Shell that Secure Endpoints Inc. and Microsoft are working to resolve.</p>
! 
! <p class=MsoBodyText>&nbsp;</p>
! 
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993133"></a><a
! name="_Toc126872210"></a><a name="_Toc115417112"></a><a name="_Toc115417081"></a><a
! name="_Toc115416145">4. How to Debug Problems with OpenAFS for Windows:</a></h1>
  
  <p class=MsoNormal>OpenAFS for Windows provides a wide range of tools to assist
! you in debugging problems.  The techniques available to you are varied because
! of the wide range of issues that have been discovered over the years.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993134"></a><a
! name="_Toc126872211"></a><a name="_Toc115417082"></a><a name="_Toc115416146">4.1.
! pioctl debugging (</a><a
! href="#_Value___: IoctlDebug">IoctlDebug</a>
  registry key)</h2>
  
  <p class=MsoNormal>pioctl (path-based ioctl) calls are used by various tools to
! communicate with the AFS Client Service.  Some of the operations performed
  include:</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>setting/querying tokens  (tokens.exe, aklog.exe, afscreds.exe)</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>setting/querying ACLs </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>setting/querying cache parameters</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>flushing files or volumes</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>setting/querying server preferences</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>querying path location</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>checking the status of servers and volumes</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>setting/querying the sysname list</p>
  
  <p class=MsoNormal>pioctl calls are implemented by writing to a special UNC
! path that is processed by the AFS Client Service.   If there is a failure to
! communicate with the AFS Client Service via SMB/CIFS, it will be impossible to
! perform any of the above operations.   </p>
  
  <p class=MsoNormal>To assist in debugging these problems, the registry value:</p>
  
! <p class=PreformattedText>  [HKLM\SOFTWARE\OpenAFS\Client]</p>
  
! <p class=PreformattedText>  REG_DWORD:  IoctlDebug   = 0x01</p>
  
! <p class=MsoNormal>should be set.  Then any of the commands that perform pioctl
! calls should be executed from the command prompt.  With this key set the pioctl
! library will generate debugging output to stderr.  The output will contain the
! Win32 API calls executed along with their most important parameters and their
! return code.   The MSDN Library and the Microsoft KnowledgeBase can be used as
! a reference to help you determine the configuration probem with your system.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993135"></a><a
! name="_Toc126872212"></a><a name="_Toc115417083"></a><a name="_Toc115416147">4.2.
! afsd_service initialization log (%WinDir%\TEMP\afsd_init.log)</a></h2>
  
  <p class=MsoNormal>Every time the AFS Client Service starts it appends data
! about its progress and configuration to a file.  This file provides information
! crucial to determining why the service cannot start when there are problems. 
! When the process terminates due to a panic condition it will write to this file
! the source code file and line number of the error.  In many cases the panic
! condition is due to a misconfiguration of the machine.  In other cases it might
! be due to a programming error in the software.  A quick review of the location
! in the source code will quickly reveal the reason for the termination.</p>
  
! <p class=MsoNormal>The <i><a
! href="#_Value___: MaxLogSize">MaxLogSize</a></i>
  registry value determines the maximum size of the %WINDIR%\TEMP\afsd_init.log
! file.  If the file is larger than this value when OpenAFS Client Service
! starts, the file will be reset to 0 bytes.  If value is set to 0, the file will
! be allowed to grow indefinitely.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993136"></a><a
! name="_Toc126872213"></a><a name="_Toc115417084"></a><a name="_Toc115416148">4.3.
! afsd_service debug logs (fs trace {-on, -off, -dump}
! -&gt;%WinDir%\TEMP\afsd.log)</a></h2>
  
  <p class=MsoNormal>When attempting to debug the behavior of the SMB/CIFS Server
  and the Cache Manager it is often useful to examine a log of the operations
! being performed.  While running the AFS Client Service keeps an in memory log
! of many of its actions.   The default number of actions preserved at any one
! time is 5000.  This can be adjusted with the <a
  href="#_Value_:_TraceBufferSize">registry value</a>:</p>
  
! <p class=PreformattedText> 
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</p>
  
! <p class=PreformattedText>  REG_DWORD  TraceBufferSize </p>
  
  <p class=MsoNormal>A restart of the service is necessary when adjusting this
! value.   Execute &quot;fs trace -on&quot; to clear to the log and &quot;fs
! trace -dump&quot; to output the contents of the log to the file.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993137"></a><a
! name="_Toc126872214"></a><a name="_Toc115417085"></a><a name="_Toc115416149">4.4.
! Using SysInternal’s DbgView and FileMon Tools</a></h2>
! 
! <p class=MsoNormal>An alternatve option to the use of &quot;fs trace -dump&quot;
! to capture internal OpenAFS Client Service events is to use a tool such as
! Sysinternal's DbgView to capture real-time debugging output.  When the OpenAFS
! Client Service starts and Bit 2 of the <a
! href="#_Value__:_TraceOption">TraceOption</a>
! value in the registry is set, all trace log events are output using the Windows
! Debug Monitor interface (OutputDebugString).  </p>
  
! <p class=PreformattedText> 
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</p>
  
! <p class=PreformattedText style='text-indent:12.0pt'>REG_DWORD   TraceOption =
! 0x04</p>
  
  <p class=MsoNormal>Use “fs trace –on” and “fs trace –off” to toggle the
  generation of log messages. </p>
  
! <p class=MsoNormal><a name="_Toc126872215"></a><a name="_Toc115417086"></a><a
! name="_Toc115416150">Sysinternal’s FileMon utility can be use to monitor the
! file operations requested by applications and their success or failure.   Use
! the Volumes menu to restrict FileMon monitor to <i>Network</i> volumes only in
! order to reduce the output to just the CIFS requests.  Turn on the <i>Advanced
! Output</i> option in order to log with finer granularity.</a></p>
  
  <p class=MsoNormal>Turn on the <i>Clock Time</i> and <i>Show Milliseconds</i>
  options in both tools to make it easier to synchronize the application requests
! and the resulting OpenAFS Client Service operations.   The captured data can be
! stored to files for inclusion in <a href="../relnotes.htm#_5._Reporting_Bugs:">bug
! reports</a>.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993138">4.5. Microsoft
! MiniDumps <br>
  (fs minidump -&gt; %WinDir%\TEMP\afsd.dmp)</a></h2>
  
  <p class=MsoNormal>If the AFS Client Service become unresponsive to any form of
  communication there may be a serious error that can only be debugged by someone
! with access to the source code and a debugger.   The &quot;fs minidump&quot;
! command can be used to force the generation of a MiniDump file containing the
! state of all of the threads in the AFS Client Service process.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993139"></a><a
! name="_Toc126872216"></a><a name="_Toc115417087"></a><a name="_Toc115416151">4.6.
! Single Sign-on (Integrated Logon) debugging</a></h2>
  
  <p class=MsoNormal>If you are having trouble with the Integrated Logon
  operations it is often useful to be able to obtain a log of what it is
! attempting to do.   Setting Bit 0 of the <a
! href="#_Value__:_TraceOption">TraceOption</a> registry
! value:</p>
  
! <p class=PreformattedText> 
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</p>
  
! <p class=PreformattedText>  REG_DWORD   TraceOption = 0x01</p>
  
  <p class=MsoNormal>will instruct the Integrated Logon Network Provider and
  Event Handlers to log information to the Windows Event Log: Application under
  the name “AFS Logon&quot;.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993140"></a><a
! name="_Toc126872217"></a><a name="_Toc115417088"></a><a name="_Toc115416152">4.7.
! RX (AFS RPC) debugging (rxdebug)</a></h2>
  
  <p class=MsoNormal>The rxdebug.exe tool can be used to query a variety of
! information about the AFS services installed on a given machine.  The port for
! the AFS Cache Manager is 7001.  </p>
  
! <p class=PreformattedText>Usage: rxdebug -servers &lt;server machine&gt; [-port
  &lt;IP port&gt;] [-nodally] </p>
  
! <p class=PreformattedText style='margin-left:35.45pt;text-indent:35.45pt'>  
  [-allconnections] [-rxstats] [-onlyserver] [-onlyclient] </p>
  
! <p class=PreformattedText style='margin-left:70.9pt'>   [-onlyport &lt;show
! only &lt;port&gt;&gt;] </p>
  
! <p class=PreformattedText style='margin-left:70.9pt'>   [-onlyhost &lt;show
  only &lt;host&gt;&gt;] </p>
  
! <p class=PreformattedText style='margin-left:70.9pt'>   [-onlyauth &lt;show
! only &lt;auth level&gt;&gt;] [-version] </p>
  
! <p class=PreformattedText style='margin-left:70.9pt'>   [-noconns] [-peers]
! [-help]</p>
  
! <p class=PreformattedText>Where: -nodally         don't show dallying conns</p>
  
! <p class=PreformattedText>       -allconnections  don't filter out
! uninteresting connections</p>
  
! <p class=PreformattedText>       -rxstats         show Rx statistics</p>
  
! <p class=PreformattedText>       -onlyserver      only show server conns</p>
  
! <p class=PreformattedText>       -onlyclient      only show client conns</p>
  
! <p class=PreformattedText>       -version         show AFS version id</p>
  
! <p class=PreformattedText>       -noconns         show no connections</p>
  
! <p class=PreformattedText>       -peers           show peers</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993141"></a><a
! name="_Toc126872218"></a><a name="_Toc115417089"></a><a name="_Toc115416153">4.8.
! Cache Manager debugging (cmdebug)</a></h2>
  
  <p class=MsoNormal>The cmdebug.exe tool can be used to query the state of the
  AFS Cache Manager on a given machine.</p>
  
! <p class=PreformattedText>Usage: cmdebug -servers &lt;server machine&gt; [-port
  &lt;IP port&gt;] [-long] </p>
  
! <p class=PreformattedText style='margin-left:70.9pt'>   [-refcounts]
  [-callbacks] [-addrs] [-cache] [-help]</p>
  
! <p class=PreformattedText>Where: -long       print all info</p>
  
! <p class=PreformattedText>       -refcounts  print only cache entries with
! positive reference counts</p>
  
! <p class=PreformattedText>       -callbacks  print only cache entries with
! callbacks</p>
  
! <p class=PreformattedText>       -addrs      print only host interfaces</p>
  
! <p class=PreformattedText>       -cache      print only cache configuration</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993142"></a><a
! name="_Toc126872219"></a><a name="_Toc115417090"></a><a name="_Toc115416154">4.9.
! Persistent Cache consistency check</a></h2>
  
  <p class=MsoNormal>The persistent cache is stored in a Hidden System file at
! %WinDir%\TEMP\AFSCache.  If there is a problem with the persistent cache that
! prevent the AFS Client Service from being able to start a validation check on
! the file can be performed.</p>
  
! <p class=PreformattedText>  afsd_service.exe --validate-cache
  &lt;cache-path&gt;</p>
  
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993143"></a><a
! name="_Toc126872220"></a><a name="_Toc115417113"></a><a name="_Toc115417091"></a><a
! name="_Toc115416155"></a><a name="_5._Reporting_Bugs:"></a>5. Reporting Bugs:</h1>
  
  <p class=MsoNormal>Bug reports should be sent to <a
! href="mailto:openafs-bugs@openafs.org?subject=Bug%20Report">openafs-bugs@openafs.org</a>. 
! Please include as much information as possible about the issue.  If you are
! reporting a crash, please install the debugging symbols by re-running the
! installer.  If a dump file is available for the problem,
! %WINDIR%\TEMP\afsd.dmp, include it along with the AFS Client Trace file 
! %WINDIR%\TEMP\afsd.log.  The AFS Client startup log is
! %WINDIR%\TEMP\afsd_init.log.  Send the last continuous block of  log information
! from this file.</p>
  
  <p class=MsoNormal>Configuring DrWatson to generate dump files for crashes:</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Run drwtsn32.exe to configure or to identify where the log and
! the crash dump files are created: </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>click Start &gt; Run...  </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>type drwtsn32 &lt;enter&gt;. </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Select either a Crash Dump Type: Mini or Full. </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Clear Dump Symbol Table</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Clear Append to Existing Log file. </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Check Dump All Thread Contexts.</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Check Create Crash Dump File</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Next run the monitoring module of Dr. Watson: </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>click Start &gt; Run...</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>type drwatson &lt;enter&gt;. </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Once a crash happens, Dr. Watson generates a dump file and a
! report in the log file, including the address of the crash and the stack dump.</p>
  
  <p class=MsoNormal>Once you have the Dr. Watson's logfile and minidump, zip
  them and attach them to your e-mail.</p>
--- 1821,2219 ----
  href="http://msdn.microsoft.com/library/en-us/dllproc/base/services_and_redirected_drives.asp">http://msdn.microsoft.com/library/en-us/dllproc/base/services_and_redirected_drives.asp</a></p>
  
  <p class=MsoBodyText>It says that services mounting drive letters are no longer
! supported by Microsoft and may act unpredictably.&nbsp; The experience other
! users have had is that if the connection to the OpenAFS CIFS/SMB server is
! terminated by the Windows CIFS client, the drive mapping may not be
! re-established until the machine is rebooted.</p>
  
  <p class=MsoBodyText>OpenAFS supports UNC paths and whenever possible
  applications should be modified to use of \\AFS\&lt;cellname&gt;\&lt;path&gt;
  instead of drive letters.</p>
  
! <h2><a name="_Toc139993131">3.41. 64-bit Microsoft Windows Installations</a></h2>
  
  <p class=MsoBodyText>Although 64-bit Windows platforms support both 64-bit and
! 32-bit applications, the OpenAFS Service installed on the machine must be
! 64-bit.&nbsp; The 64-bit installer contains only 64-bit executables.&nbsp; In
! order to support 32-bit applications that link against OpenAFS libraries it is
! required that a separate 32-bit OpenAFS Tools set be installed.</p>
  
  <p class=MsoBodyText>OpenAFS on 64-bit Windows benefits from the lifting of the
! 2GB process memory restriction that is present on 32-bit Windows.&nbsp;&nbsp;
! Without this restriction the AFS Cache File can become arbitrarily large
! limited only by available disk space.</p>
! 
! <h2><a name="_Toc139993132">3.42. Known Issues with Microsoft Windows </a><st1:place
! w:st="on">Vista</st1:place></h2>
! 
! <p class=MsoBodyText>OpenAFS for Windows works with Microsoft Windows Vista RC2
! (Build 5744) and Longhorn Server (Build 5744) from both the command prompt and
! the Explorer Shell.<span style='mso-spacerun:yes'>  </span>When performing an
! upgrade from earlier versions of Microsoft Windows the Microsoft Loopback
! Adapter (MSLA) will be uninstalled.<span style='mso-spacerun:yes'>  
! </span>OpenAFS should be re-installed after the Microsoft Vista installation to
! restore the MSLA configuration.</p>
! 
! <p class=MsoBodyText>When Vista RC2 resumes from standby mode, the AFS Client
! Service will panic. <span style='mso-spacerun:yes'> </span>This is due to a bug
! in <st1:place w:st="on">Vista</st1:place> that is fixed in Build 5758.</p>
! 
! <p class=MsoBodyText>Under the new Windows Vista security model, users are
! required to start applications under a new “administrative session” whenever
! privileged operations must be performed.<span style='mso-spacerun:yes'> 
! </span>AFS tokens obtained during the regular session are not available to
! users in the “administrative session”.<span style='mso-spacerun:yes'> 
! </span>The “administrative session” is the equivalent of a second user logging
! into the machine. </p>
! 
! <h1><a name="_Toc115416145"></a><a name="_Toc139993133"></a><a
! name="_Toc126872210"></a><a name="_Toc115417112"></a><a name="_Toc115417081"></a><span
! style='mso-bookmark:_Toc115416145'>4. How to Debug Problems with OpenAFS for
! Windows:</span></h1>
  
  <p class=MsoNormal>OpenAFS for Windows provides a wide range of tools to assist
! you in debugging problems.&nbsp; The techniques available to you are varied
! because of the wide range of issues that have been discovered over the years.</p>
  
! <h2><a name="_Toc115416146"></a><a name="_Toc139993134"></a><a
! name="_Toc126872211"></a><a name="_Toc115417082"></a><span style='mso-bookmark:
! _Toc115416146'>4.1. pioctl debugging (</span><a href="#_Value___:_IoctlDebug">IoctlDebug</a>
  registry key)</h2>
  
  <p class=MsoNormal>pioctl (path-based ioctl) calls are used by various tools to
! communicate with the AFS Client Service.&nbsp; Some of the operations performed
  include:</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>setting/querying
! tokens&nbsp; (tokens.exe, aklog.exe, afscreds.exe)</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>setting/querying
! ACLs </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>setting/querying
! cache parameters</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>flushing
! files or volumes</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>setting/querying
! server preferences</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>querying
! path location</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>checking
! the status of servers and volumes</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>setting/querying
! the sysname list</p>
  
  <p class=MsoNormal>pioctl calls are implemented by writing to a special UNC
! path that is processed by the AFS Client Service.&nbsp;&nbsp; If there is a
! failure to communicate with the AFS Client Service via SMB/CIFS, it will be
! impossible to perform any of the above operations.&nbsp;&nbsp; </p>
  
  <p class=MsoNormal>To assist in debugging these problems, the registry value:</p>
  
! <p class=preformattedtext>&nbsp; [HKLM\SOFTWARE\OpenAFS\Client]</p>
  
! <p class=preformattedtext>&nbsp; REG_DWORD:&nbsp; IoctlDebug&nbsp;&nbsp; = 0x01</p>
  
! <p class=MsoNormal>should be set.&nbsp; Then any of the commands that perform
! pioctl calls should be executed from the command prompt.&nbsp; With this key
! set the pioctl library will generate debugging output to stderr.&nbsp; The
! output will contain the Win32 API calls executed along with their most
! important parameters and their return code.&nbsp;&nbsp; The MSDN Library and
! the Microsoft KnowledgeBase can be used as a reference to help you determine
! the configuration probem with your system.</p>
! 
! <h2><a name="_Toc115416147"></a><a name="_Toc139993135"></a><a
! name="_Toc126872212"></a><a name="_Toc115417083"></a><span style='mso-bookmark:
! _Toc115416147'>4.2. afsd_service initialization log (%WinDir%\TEMP\afsd_init.log)</span></h2>
  
  <p class=MsoNormal>Every time the AFS Client Service starts it appends data
! about its progress and configuration to a file.&nbsp; This file provides
! information crucial to determining why the service cannot start when there are
! problems.&nbsp; When the process terminates due to a panic condition it will
! write to this file the source code file and line number of the error.&nbsp; In
! many cases the panic condition is due to a misconfiguration of the
! machine.&nbsp; In other cases it might be due to a programming error in the software.&nbsp;
! A quick review of the location in the source code will quickly reveal the
! reason for the termination.</p>
  
! <p class=MsoNormal>The <i><a href="#_Value___:_MaxLogSize">MaxLogSize</a></i>
  registry value determines the maximum size of the %WINDIR%\TEMP\afsd_init.log
! file.&nbsp; If the file is larger than this value when OpenAFS Client Service
! starts, the file will be reset to 0 bytes.&nbsp; If value is set to 0, the file
! will be allowed to grow indefinitely.</p>
! 
! <h2><a name="_Toc115416148"></a><a name="_Toc139993136"></a><a
! name="_Toc126872213"></a><a name="_Toc115417084"></a><span style='mso-bookmark:
! _Toc115416148'>4.3. afsd_service debug logs (fs trace {-on, -off, -dump}
! -&gt;%WinDir%\TEMP\afsd.log)</span></h2>
  
  <p class=MsoNormal>When attempting to debug the behavior of the SMB/CIFS Server
  and the Cache Manager it is often useful to examine a log of the operations
! being performed.&nbsp; While running the AFS Client Service keeps an in memory
! log of many of its actions.&nbsp;&nbsp; The default number of actions preserved
! at any one time is 5000.&nbsp; This can be adjusted with the <a
  href="#_Value_:_TraceBufferSize">registry value</a>:</p>
  
! <p class=preformattedtext>&nbsp;
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</p>
  
! <p class=preformattedtext>&nbsp; REG_DWORD&nbsp; TraceBufferSize </p>
  
  <p class=MsoNormal>A restart of the service is necessary when adjusting this
! value.&nbsp;&nbsp; Execute &quot;fs trace -on&quot; to clear to the log and
! &quot;fs trace -dump&quot; to output the contents of the log to the file.</p>
  
! <h2><a name="_Toc115416149"></a><a name="_Toc139993137"></a><a
! name="_Toc126872214"></a><a name="_Toc115417085"></a><span style='mso-bookmark:
! _Toc115416149'>4.4. Using SysInternal’s DbgView and FileMon Tools</span></h2>
! 
! <p class=MsoNormal>An alternatve option to the use of &quot;fs trace
! -dump&quot; to capture internal OpenAFS Client Service events is to use a tool
! such as Sysinternal's DbgView to capture real-time debugging output.&nbsp; When
! the OpenAFS Client Service starts and Bit 2 of the <a
! href="#_Value__:_TraceOption">TraceOption</a> value in the registry is set, all
! trace log events are output using the Windows Debug Monitor interface
! (OutputDebugString).&nbsp; </p>
  
! <p class=preformattedtext>&nbsp;
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</p>
  
! <p class=preformattedtext style='text-indent:12.0pt'>REG_DWORD&nbsp;&nbsp;
! TraceOption = 0x04</p>
  
  <p class=MsoNormal>Use “fs trace –on” and “fs trace –off” to toggle the
  generation of log messages. </p>
  
! <p class=MsoNormal><a name="_Toc115416150"></a><a name="_Toc126872215"></a><a
! name="_Toc115417086"></a><span style='mso-bookmark:_Toc115416150'>Sysinternal’s
! FileMon utility can be use to monitor the file operations requested by
! applications and their success or failure.&nbsp;&nbsp; Use the Volumes menu to
! restrict FileMon monitor to <i>Network</i> volumes only in order to reduce the
! output to just the CIFS requests.&nbsp; Turn on the <i>Advanced Output</i>
! option in order to log with finer granularity.</span></p>
  
  <p class=MsoNormal>Turn on the <i>Clock Time</i> and <i>Show Milliseconds</i>
  options in both tools to make it easier to synchronize the application requests
! and the resulting OpenAFS Client Service operations.&nbsp;&nbsp; The captured
! data can be stored to files for inclusion in <a
! href="../relnotes.htm#_5._Reporting_Bugs:">bug reports</a>.</p>
  
! <h2><a name="_Toc139993138">4.5. Microsoft MiniDumps <br>
  (fs minidump -&gt; %WinDir%\TEMP\afsd.dmp)</a></h2>
  
  <p class=MsoNormal>If the AFS Client Service become unresponsive to any form of
  communication there may be a serious error that can only be debugged by someone
! with access to the source code and a debugger.&nbsp;&nbsp; The &quot;fs
! minidump&quot; command can be used to force the generation of a MiniDump file
! containing the state of all of the threads in the AFS Client Service process.</p>
! 
! <h2><a name="_Toc115416151"></a><a name="_Toc139993139"></a><a
! name="_Toc126872216"></a><a name="_Toc115417087"></a><span style='mso-bookmark:
! _Toc115416151'>4.6. Single Sign-on (Integrated Logon) debugging</span></h2>
  
  <p class=MsoNormal>If you are having trouble with the Integrated Logon
  operations it is often useful to be able to obtain a log of what it is
! attempting to do.&nbsp;&nbsp; Setting Bit 0 of the <a
! href="#_Value__:_TraceOption">TraceOption</a> registry value:</p>
  
! <p class=preformattedtext>&nbsp;
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</p>
  
! <p class=preformattedtext>&nbsp; REG_DWORD&nbsp;&nbsp; TraceOption = 0x01</p>
  
  <p class=MsoNormal>will instruct the Integrated Logon Network Provider and
  Event Handlers to log information to the Windows Event Log: Application under
  the name “AFS Logon&quot;.</p>
  
! <h2><a name="_Toc115416152"></a><a name="_Toc139993140"></a><a
! name="_Toc126872217"></a><a name="_Toc115417088"></a><span style='mso-bookmark:
! _Toc115416152'>4.7. RX (AFS RPC) debugging (rxdebug)</span></h2>
  
  <p class=MsoNormal>The rxdebug.exe tool can be used to query a variety of
! information about the AFS services installed on a given machine.&nbsp; The port
! for the AFS Cache Manager is 7001.&nbsp; </p>
  
! <p class=preformattedtext>Usage: rxdebug -servers &lt;server machine&gt; [-port
  &lt;IP port&gt;] [-nodally] </p>
  
! <p class=preformattedtext style='margin-left:35.45pt;text-indent:35.45pt'>&nbsp;&nbsp;
  [-allconnections] [-rxstats] [-onlyserver] [-onlyclient] </p>
  
! <p class=preformattedtext style='margin-left:70.9pt'>&nbsp;&nbsp; [-onlyport
! &lt;show only &lt;port&gt;&gt;] </p>
  
! <p class=preformattedtext style='margin-left:70.9pt'>&nbsp;&nbsp; [-onlyhost &lt;show
  only &lt;host&gt;&gt;] </p>
  
! <p class=preformattedtext style='margin-left:70.9pt'>&nbsp;&nbsp; [-onlyauth
! &lt;show only &lt;auth level&gt;&gt;] [-version] </p>
  
! <p class=preformattedtext style='margin-left:70.9pt'>&nbsp;&nbsp; [-noconns]
! [-peers] [-help]</p>
  
! <p class=preformattedtext>Where:
! -nodally&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; don't show dallying
! conns</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! -allconnections&nbsp; don't filter out uninteresting connections</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! -rxstats&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; show Rx statistics</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! -onlyserver&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; only show server conns</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! -onlyclient&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; only show client conns</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! -version&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; show AFS version id</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! -noconns&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; show no connections</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! -peers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; show peers</p>
  
! <h2><a name="_Toc115416153"></a><a name="_Toc139993141"></a><a
! name="_Toc126872218"></a><a name="_Toc115417089"></a><span style='mso-bookmark:
! _Toc115416153'>4.8. Cache Manager debugging (cmdebug)</span></h2>
  
  <p class=MsoNormal>The cmdebug.exe tool can be used to query the state of the
  AFS Cache Manager on a given machine.</p>
  
! <p class=preformattedtext>Usage: cmdebug -servers &lt;server machine&gt; [-port
  &lt;IP port&gt;] [-long] </p>
  
! <p class=preformattedtext style='margin-left:70.9pt'>&nbsp;&nbsp; [-refcounts]
  [-callbacks] [-addrs] [-cache] [-help]</p>
  
! <p class=preformattedtext>Where: -long&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! print all info</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -refcounts&nbsp;
! print only cache entries with positive reference counts</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -callbacks&nbsp;
! print only cache entries with callbacks</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! -addrs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print only host interfaces</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! -cache&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print only cache configuration</p>
  
! <h2><a name="_Toc115416154"></a><a name="_Toc139993142"></a><a
! name="_Toc126872219"></a><a name="_Toc115417090"></a><span style='mso-bookmark:
! _Toc115416154'>4.9. Persistent Cache consistency check</span></h2>
  
  <p class=MsoNormal>The persistent cache is stored in a Hidden System file at
! %WinDir%\TEMP\AFSCache.&nbsp; If there is a problem with the persistent cache
! that prevent the AFS Client Service from being able to start a validation check
! on the file can be performed.</p>
  
! <p class=preformattedtext>&nbsp; afsd_service.exe --validate-cache
  &lt;cache-path&gt;</p>
  
! <h1><a name="_Toc139993143"></a><a name="_Toc126872220"></a><a
! name="_Toc115417113"></a><a name="_Toc115417091"></a><a name="_Toc115416155"></a><a
! name="_5._Reporting_Bugs:"></a>5. Reporting Bugs:</h1>
  
  <p class=MsoNormal>Bug reports should be sent to <a
! href="mailto:openafs-bugs@openafs.org?subject=Bug%20Report">openafs-bugs@openafs.org</a>.&nbsp;
! Please include as much information as possible about the issue.&nbsp; If you
! are reporting a crash, please install the debugging symbols by re-running the
! installer.&nbsp; If a dump file is available for the problem,
! %WINDIR%\TEMP\afsd.dmp, include it along with the AFS Client Trace file&nbsp;
! %WINDIR%\TEMP\afsd.log.&nbsp; The AFS Client startup log is
! %WINDIR%\TEMP\afsd_init.log.&nbsp; Send the last continuous block of&nbsp; log
! information from this file.</p>
  
  <p class=MsoNormal>Configuring DrWatson to generate dump files for crashes:</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Run drwtsn32.exe
! to configure or to identify where the log and the crash dump files are created:
! </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>click
! Start &gt; Run...&nbsp; </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>type
! drwtsn32 &lt;enter&gt;. </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Select
! either a Crash Dump Type: Mini or Full. </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Clear
! Dump Symbol Table</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Clear
! Append to Existing Log file. </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Check
! Dump All Thread Contexts.</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Check
! Create Crash Dump File</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Next
! run the monitoring module of Dr. Watson: </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>click
! Start &gt; Run...</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>type
! drwatson &lt;enter&gt;. </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt'><span
! style='font-size:9.0pt;font-family:Symbol'>·</span><span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Once
! a crash happens, Dr. Watson generates a dump file and a report in the log file,
! including the address of the crash and the stack dump.</p>
  
  <p class=MsoNormal>Once you have the Dr. Watson's logfile and minidump, zip
  them and attach them to your e-mail.</p>
***************
*** 1841,1934 ****
  <p class=MsoNormal>When reporting a error, please be sure to include the
  version of OpenAFS.</p>
  
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993144"></a><a
! name="_Toc126872221"></a><a name="_Toc115417114"></a><a name="_Toc115417092"></a><a
! name="_Toc115416156">6. How to Contribute to the Development of OpenAFS for
! Windows</a></h1>
  
  <p class=MsoNormal>Contributions to the development of OpenAFS for Windows are
! continuously needed.  Contributions may take many forms including cash
  donations, support contracts, donated developer time, and even donated tech
  writer time.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993145"></a><a
! name="_Toc126872222"></a><a name="_Toc115417093"></a><a name="_Toc115416157">6.1.
! The USENIX OpenAFS Fund</a> </h2>
  
  <p class=MsoBodyText><a href="http://www.usenix.org/">USENIX</a>, a 501c3
  non-profit corporation, has formed the USENIX OpenAFS Fund in order to accept
  tax deductible donations on behalf of the OpenAFS Elders. The donated funds
  will be allocated by the OpenAFS Elders to fund OpenAFS development,
! documentation, project management, and maintaining openafs.org. </p>
  
  <div>
  
! <table cellspacing=0 cellpadding=0 hspace=0 vspace=0 width=540 height=88>
!  <tr>
!   <td valign=top align=left height=88 style='padding-top:0pt;padding-right:
!   9.0pt;padding-bottom:0pt;padding-left:9.0pt'>
    <p class=MsoEnvelopeAddress>USENIX OpenAFS Fund<br>
    USENIX Association <br>
!     2560 Ninth St., Suite 215 <br>
!     Berkeley, CA 94710 </p>
    </td>
   </tr>
  </table>
  
  </div>
  
! <br clear=ALL>
  
  <p class=MsoBodyText>Donations can be made by sending a check, drawn on a U.S.
  bank, made out to the USENIX OpenAFS Fund or by making a <a
  href="https://db.usenix.org/cgi-bin/openafs/openafs.cgi">donation online</a>.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993146"></a><a
! name="_Toc126872223"></a><a name="_Toc115417094">6.2. Secure Endpoints Inc.</a>
! </h2>
  
  <p class=MsoBodyText><a href="http://www.secure-endpoints.com/">Secure
  Endpoints Inc.</a> provides development and support services for OpenAFS for
! Windows and MIT Kerberos for Windows.  Donations provided to Secure Endpoints
! Inc. for the development of OpenAFS are used to cover the OpenAFS gatekeeper responsibilities;
! providing support to the OpenAFS community via the OpenAFS mailing lists; and
! furthering development of desired features that are either too small to be
! financed by development contracts.</p>
! 
! <p class=MsoBodyText>Secure Endpoints Inc. accepts software development agreements
! from organizations who wish to fund a well-defined set of bug fixes or new
! features. </p>
  
  <p class=MsoBodyText>Secure Endpoints Inc. provides contract based support for
! the OpenAFS for Windows and the MIT Kerberos for Windows products. </p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993147"></a><a
! name="_Toc126872224"></a><a name="_Toc115417095">6.3. The MIT Kerberos Account</a>
! </h2>
  
  <p class=MsoNormal style='margin:0pt;margin-bottom:.0001pt;text-autospace:none'><span
  style='font-family:"Times New Roman";color:black'>Th</span><span
! class=BodyTextChar>e <a href="http://web.mit.edu/kerberos/">MIT Kerberos</a> development
! team accepts unrestricted grants.  Grants are tax deductible and the full
! amount of the grant will be used to fund the development of Kerberos 5 and/or
! Kerberos for Windows.  OpenAFS for Windows is dependent on MIT Kerberos for
! Windows for authentication and shares many of the same re</span><span
! style='font-family:"Times New Roman";color:black'>quirements for credential
! management.  Future releases of both products will share a common identity
! management user interface. </span></p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993148"></a><a
! name="_Toc126872225"></a><a name="_Toc115417096">6.4. Direct contributions of
! code and/or documentation</a> </h2>
  
  <p class=MsoBodyText>Organizations that use OpenAFS in house and have
  development staffs are encouraged to contribute any code modifications they
  make to OpenAFS.org via <u><span style='color:blue'>openafs-bugs@openafs.org</span></u>.
!  Contributions of documentation are highly desired. </p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993149"></a><a
! name="_Toc126872226"></a><a name="_Toc115417097">6.5. OpenAFS for Windows
! Mailing Lists</a></h2>
  
  <p class=MsoNormal>If you wish to participate in OpenAFS for Windows
  development please join the <i><a
--- 2221,2323 ----
  <p class=MsoNormal>When reporting a error, please be sure to include the
  version of OpenAFS.</p>
  
! <h1><a name="_Toc115416156"></a><a name="_Toc139993144"></a><a
! name="_Toc126872221"></a><a name="_Toc115417114"></a><a name="_Toc115417092"></a><span
! style='mso-bookmark:_Toc115416156'>6. How to Contribute to the Development of
! OpenAFS for Windows</span></h1>
  
  <p class=MsoNormal>Contributions to the development of OpenAFS for Windows are
! continuously needed.&nbsp; Contributions may take many forms including cash
  donations, support contracts, donated developer time, and even donated tech
  writer time.</p>
  
! <h2><a name="_Toc115416157"></a><a name="_Toc139993145"></a><a
! name="_Toc126872222"></a><a name="_Toc115417093"></a><span style='mso-bookmark:
! _Toc115416157'>6.1. The USENIX OpenAFS Fund</span> </h2>
  
  <p class=MsoBodyText><a href="http://www.usenix.org/">USENIX</a>, a 501c3
  non-profit corporation, has formed the USENIX OpenAFS Fund in order to accept
  tax deductible donations on behalf of the OpenAFS Elders. The donated funds
  will be allocated by the OpenAFS Elders to fund OpenAFS development,
! documentation, project management, and maintaining openafs.org. <o:p></o:p></p>
  
  <div>
  
! <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=540
!  style='width:405.0pt;mso-cellspacing:0pt;mso-padding-alt:0pt 0pt 0pt 0pt'
!  hspace=0 vspace=0 height=88>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
!   height:66.0pt'>
!   <td valign=top style='padding:0pt 9.0pt 0pt 9.0pt;height:66.0pt'>
    <p class=MsoEnvelopeAddress>USENIX OpenAFS Fund<br>
    USENIX Association <br>
! <st1:address w:st="on"><st1:Street w:st="on">2560 Ninth St., Suite 215</st1:Street>
!    <br>
! <st1:City w:st="on">Berkeley</st1:City>, <st1:State w:st="on">CA</st1:State> <st1:PostalCode
!    w:st="on">94710</st1:PostalCode></st1:address> </p>
    </td>
   </tr>
  </table>
  
  </div>
  
! <p class=MsoNormal style='margin:0pt;margin-bottom:.0001pt'><span
! style='font-family:"Times New Roman"'><br clear=all style='mso-special-character:
! line-break'>
! <o:p></o:p></span></p>
  
  <p class=MsoBodyText>Donations can be made by sending a check, drawn on a U.S.
  bank, made out to the USENIX OpenAFS Fund or by making a <a
  href="https://db.usenix.org/cgi-bin/openafs/openafs.cgi">donation online</a>.</p>
  
! <h2><a name="_Toc115417094"></a><a name="_Toc139993146"></a><a
! name="_Toc126872223"></a><span style='mso-bookmark:_Toc115417094'>6.2. Secure
! Endpoints Inc.</span> </h2>
  
  <p class=MsoBodyText><a href="http://www.secure-endpoints.com/">Secure
  Endpoints Inc.</a> provides development and support services for OpenAFS for
! Windows and <a href="http://web.mit.edu/kerberos/">MIT Kerberos for Windows</a>.
! &nbsp;Donations provided to Secure Endpoints Inc. for the development of
! OpenAFS are used to cover the OpenAFS gatekeeper responsibilities; providing
! support to the OpenAFS community via the OpenAFS mailing lists; and furthering
! development of desired features that are either too small to be financed by
! development contracts.</p>
! 
! <p class=MsoBodyText>Secure Endpoints Inc. accepts software development
! agreements from organizations who wish to fund a well-defined set of bug fixes
! or new features. </p>
  
  <p class=MsoBodyText>Secure Endpoints Inc. provides contract based support for
! the OpenAFS for Windows and the <a href="http://web.mit.edu/kerberos/">MIT
! Kerberos for Windows</a> products. </p>
  
! <h2><a name="_Toc115417095"></a><a name="_Toc139993147"></a><a
! name="_Toc126872224"></a><span style='mso-bookmark:_Toc115417095'>6.3. The MIT
! Kerberos Account</span> </h2>
  
  <p class=MsoNormal style='margin:0pt;margin-bottom:.0001pt;text-autospace:none'><span
  style='font-family:"Times New Roman";color:black'>Th</span><span
! class=bodytextchar>e <a href="http://web.mit.edu/kerberos/">MIT Kerberos</a>
! development team accepts unrestricted grants. &nbsp;Grants are tax deductible
! and the full amount of the grant will be used to fund the development of
! Kerberos 5 and/or MIT Kerberos for Windows. &nbsp;OpenAFS for Windows is
! dependent on MIT Kerberos for Windows for authentication and shares many of the
! same re</span><span style='font-family:"Times New Roman";color:black'>quirements
! for credential management. &nbsp;Future releases of both products will share a
! common identity management user interface. </span></p>
! 
! <h2><a name="_Toc115417096"></a><a name="_Toc139993148"></a><a
! name="_Toc126872225"></a><span style='mso-bookmark:_Toc115417096'>6.4. Direct
! contributions of code and/or documentation</span> </h2>
  
  <p class=MsoBodyText>Organizations that use OpenAFS in house and have
  development staffs are encouraged to contribute any code modifications they
  make to OpenAFS.org via <u><span style='color:blue'>openafs-bugs@openafs.org</span></u>.
! &nbsp;Contributions of documentation are highly desired. </p>
  
! <h2><a name="_Toc115417097"></a><a name="_Toc139993149"></a><a
! name="_Toc126872226"></a><span style='mso-bookmark:_Toc115417097'>6.5. OpenAFS
! for Windows Mailing Lists</span></h2>
  
  <p class=MsoNormal>If you wish to participate in OpenAFS for Windows
  development please join the <i><a
***************
*** 1939,2338 ****
  
  <p class=MsoNormal>User questions should be sent to the <a
  href="mailto:openafs-info@openafs.org?subject=OpenAFS%20for%20Windows%20User%20Question">openafs-info@openafs.org</a>
! mailing list.  </p>
  
  <p class=MsoNormal style='margin-left:35.45pt'><span class=MsoHyperlink>https://lists.openafs.org/mailman/listinfo/openafs-info</span></p>
  
  <p class=MsoNormal>You must join the mailing lists if you wish to post to the
  list without incurring a moderation delay.</p>
  
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993150"></a><a
! name="_Toc126872227"></a><a name="_Toc115417115"></a><a name="_Toc115417098"></a><a
! name="_Toc115416158"></a><a name="_MSI_Deployment_Guide"></a>7. MSI Deployment
! Guide</h1>
! 
! </div>
! 
! <b><span style='font-size:16.0pt;font-family:Albany'><br clear=all
  style='page-break-before:always'>
  </span></b>
  
! <div class=Section2>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993151"></a><a
! name="_Toc126872228"></a><a name="_Toc115417099"></a><a name="_Toc115416159">7.1.
! Introduction</a></h2>
  
  <p class=MsoNormal>A MSI installer option is available for those who wish to
  use Windows Installer for installing OpenAFS and for organizations that wish to
! deploy OpenAFS through Group Policy.  The first version of OpenAFS for Windows
! available as an MSI was 1.3.65.</p>
  
  <p class=MsoNormal>This document provides a guide for authoring transforms used
! to customize the MSI package for a particular organization.  Although many
  settings can be deployed via transforms, in an Active Directory environment it
! is advisable to deploy registry settings    and configuration files through
! group policy and/or startup scripts so that machines where OpenAFS for Windows
! is already installed will pick up these customizations.</p>
! 
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993152"></a><a
! name="_Toc126872229"></a><a name="_Toc115416160">7.1.1 Requirements</a></h3>
  
  <p class=MsoNormal>The information in this document applies to MSI packages
  distributed with OpenAFS for Windows releases from 1.3.65 and onwards or MSI
! packages built from corresponding source releases.  Not all releases support
! all the configuration options documented here.</p>
  
  <p class=MsoNormal>Authoring a &quot;Windows Installer&quot; transform requires
  additional software for editing the MSI database tables and generating the
! transform from the modified MSI package.  ORCA.EXE and MSITRAN.EXE which are
! included in the Windows Platform SDK (&quot;Windows Installer&quot; SDK) can be
! used for this purpose.</p>
  
! <p class=MsoNormal>For reference, the schema for the MSI package is based on
! SCHEMA.MSI distributed with the Platform SDK.</p>
  
  <p class=MsoNormal>For general information about &quot;Windows Installer&quot;,
  refer to:</p>
  
! <p class=MsoNormal>    <a
  href="http://msdn.microsoft.com/library/en-us/msi/setup/windows_installer_start_page.asp">http://msdn.microsoft.com/library/en-us/msi/setup/windows_installer_start_page.asp</a></p>
  
  <p class=MsoNormal>For general information about authoring MSI transforms,
  refer to:</p>
  
! <p class=MsoNormal>    <a
  href="http://msdn.microsoft.com/library/en-us/msi/setup/transforms.asp">http://msdn.microsoft.com/library/en-us/msi/setup/transforms.asp</a></p>
  
  <p class=MsoNormal>The remainder of this document assumes some familiarity with
! authoring transforms.  While the MSDN documentation for Windows Installer is a
! bit dense, the guide on MSI transforms found at the second link above is
! recommended reading.  MSDN also includes a step-by-step example for creating a
! transform at:</p>
  
! <p class=MsoNormal>    <a
  href="http://msdn.microsoft.com/library/en-us/msi/setup/a_customization_transform_example.asp">http://msdn.microsoft.com/library/en-us/msi/setup/a_customization_transform_example.asp</a></p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993153"></a><a
! name="_Toc126872230"></a><a name="_Toc115416161">7.1.2 Authoring a Transform</a></h3>
  
  <p class=MsoNormal>Transforms describe a set of modifications to be performed
! on an existing MSI for the purpose of customizing it.  This is ordinarily done
! by making a copy of the MSI to be customized, modifying the copy and then using
! the old and the new MSI to generate a transform.  For example:</p>
! 
! <p class=PreformattedText style='margin-left:36.0pt;text-indent:-18.0pt'>1.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span>copy openafs.msi
! openafs-modified.msi</p>
! 
! <p class=PreformattedText style='margin-left:36.0pt;text-indent:-18.0pt'>2.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span>(edit the
! openafs-modified.msi to include the necessary changes)</p>
! 
! <p class=PreformattedText style='margin-left:36.0pt;text-indent:-18.0pt'>3.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span>msitran -g
! openafs.msi openafs-modified.msi openafs-transform.mst</p>
  
! <p class=PreformattedText style='margin-left:36.0pt;text-indent:-18.0pt'>4.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span>(generates
  openafs-transform.mst, which is the transform)</p>
  
! <p class=MsoNormal>Transforms have an extension of .mst.  'msitran' is a tool
! distributed as part of the &quot;Windows Installer&quot; SDK (part of the
  Windows Platform SDK).</p>
  
  <p class=MsoNormal>You can test a transform by:</p>
  
! <p class=PreformattedText style='margin-left:36.0pt;text-indent:-18.0pt'>1.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span>copy openafs.msi
! openafs-test.msi</p>
! 
! <p class=PreformattedText style='margin-left:36.0pt;text-indent:-18.0pt'>2.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span>msitran -a
! openafs-transform.mst openafs-test.msi</p>
  
  <p class=MsoNormal>and then checking the resulting openafs-test.msi to see if
  all changes you have made above to openafs-modified.msi is present in
! openafs-test.msi.  'msitran' will complain if some modification in the
  transform can not be successfully applied.</p>
  
  <p class=MsoNormal>As mentioned above, you can use a tool like ORCA.EXE to edit
! the MSI databases directly when editing openafs-modified.msi.  More details are
! given below.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993154"></a><a
! name="_Toc126872231"></a><a name="_Toc115417100"></a><a name="_Toc115416162">7.2.
! Configuration Options</a></h2>
  
  <p class=MsoNormal>The logic necessary to implement many of the settings
! described in <a
! href="#_Appendix_A:_Registry_Values">Appendix A</a>
! are present in the MSI.  Most of these can be controlled by setting the
! corresponding properties to the desired value.  Some settings may require
! modifying existing registry entries (though not recommended) or adding new resources
! (like files or registry keys).  Instructions for performing these tasks are
! below.</p>
! 
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993155"></a><a
! name="_Toc126872232"></a><a name="_Toc115416163">7.2.1 Configurable Properties</a></h3>
  
  <p class=MsoNormal>Most configurable properties correspond to registry keys or
! values.  Due to the logic invoked based on the existence of these registry keys
! or values, they are only set if the associated property is defined to have a
! non null value.  If the associated property is not defined in the MSI, the
! registry key or value will not be touched.  By default, the MSI does not
! contain these properties and hence will not set the registry keys.  You will
! need to add properties as needed to the MSI.</p>
  
  <p class=MsoNormal>When one of the configurable properties is set, the
  installer will use the property value to set the corresponding setting in the
! HKEY_LOCAL_MACHINE registry hive.  The HKEY_CURRENT_USER hive is not touched by
! the installer.</p>
  
  <p class=MsoNormal>For each property, the associated registry setting is
! referenced by the same text used in <a
! href="#_Appendix_A:_Registry_Values">Appendix A</a>.</p>
  
  <p class=MsoNormal>Strings are quoted using single quotes (e.g. 'a string'). An
! empty string is denoted as ''.  Note that you can't author null values into the
! 'Property' table.</p>
  
  <p class=MsoNormal>Numeric values should be authored as decimal strings.</p>
  
! <h4><a name="_Toc139993156"></a><a name="_Toc126872233"></a><a
! name="_Toc115416164">7.2.1.1 Setting Properties</a></h4>
  
  <p class=MsoNormal>In order to set a property,</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt'><span style='font-size:9.0pt'>1.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Open the MSI in ORCA.EXE</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt'><span style='font-size:9.0pt'>2.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Select the 'Property' table from the list of tables on the left.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt'><span style='font-size:9.0pt'>3.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>Find the property in the list of properties on the right, double
! click the value and type the new value.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt'><span style='font-size:9.0pt'>4.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span>If the property does not exist in the property list, right click
! the list and select 'Add Row', type the property name and the desired value.</p>
! 
! <h4><a name="_Toc139993157"></a><a name="_Toc126872234"></a><a
! name="_Toc115416165">7.2.1.2 OpenAFS for Windows Properties</a></h4>
! 
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
    <h5><a name="_Toc139993158"></a><a name="_Toc126872235"></a><a
!   name="_Toc115416166"></a><a name="_(Service_parameters):"></a>(Service
!   parameters):</h5>
!   <p class=ListContents style='margin-left:0pt'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</p>
    </td>
   </tr>
!  <tr>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
    <h5><a name="_Toc139993159"></a><a name="_Toc126872236"></a><a
!   name="_Toc115416167"></a><a name="_(Network_provider):"></a>(Network
!   provider):</h5>
!   <p class=ListContents style='margin-left:0pt'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</p>
    </td>
   </tr>
!  <tr>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
    <h5><a name="_Toc139993160"></a><a name="_Toc126872237"></a><a
!   name="_Toc115416168"></a><a name="_(OpenAFS_Client):"></a>(OpenAFS Client):</h5>
!   <p class=ListContents style='margin-left:0pt'>[HKLM\SOFTWARE\OpenAFS\Client]</p>
    </td>
   </tr>
  </table>
  
! <h5><a name="_Toc139993161"></a><a name="_Toc126872238"></a><a
! name="_Toc115416169">7.2.1.2.1 Registry Properties</a></h5>
  
  <p class=MsoNormal>These properties are used to set the values of registry
  entries associated with OpenAFS for Windows.</p>
  
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993162"></a><a name="_Toc126872239"></a><a
!   name="_Toc115416170">AFSCACHEPATH</a></h6>
!   <p class=MsoList>Registry key    : <a
!   href="#_(Service_parameters):">(Service
!   parameters)</a></p>
!   <p class=MsoList>Registry value : <a
!   href="#_Value_:_CachePath">CachePath</a></p>
!   <p class=MsoList>Valid values    : string .</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993163"></a><a name="_Toc126872240"></a><a
!   name="_Toc115416171">AFSCACHESIZE</a></h6>
!   <p class=MsoList>Registry key    : <a
!   href="#_(Service_parameters):">(Service
!   parameters)</a></p>
!   <p class=MsoList>Registry value : <a
!   href="#_Value___: CacheSize">CacheSize</a></p>
!   <p class=MsoList>Valid values    : numeric</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993164"></a><a name="_Toc126872241"></a><a
!   name="_Toc115416172">AFSCELLNAME</a></h6>
!   <p class=MsoList>Registry key    : <a
!   href="#_(Service_parameters):">(Service
!   parameters)</a></p>
!   <p class=MsoList>Registry value : <a
!   href="#_Value_:_Cell">Cell</a></p>
!   <p class=MsoList>Valid values    : string</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993165"></a><a name="_Toc126872242"></a><a
!   name="_Toc115416173">FREELANCEMODE</a></h6>
!   <p class=MsoList>Registry key    : <a
!   href="#_(Service_parameters):">(Service
!   parameters)</a></p>
!   <p class=MsoList>Registry value : <a
!   href="#_Value_:_FreelanceClient">FreelanceClient</a></p>
!   <p class=MsoList>Valid values    : '1' or '0'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993166"></a><a name="_Toc126872243"></a><a
!   name="_Toc115416174">HIDEDOTFILES</a></h6>
!   <p class=MsoList>Registry key    : <a
!   href="#_(Service_parameters):">(Service
!   parameters)</a></p>
!   <p class=MsoList>Registry value : <a
!   href="#_Value_:_HideDotFiles">HideDotFiles</a></p>
!   <p class=MsoList>Valid values    : '1' or '0'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993167"></a><a name="_Toc126872244"></a><a
!   name="_Toc115416175">LOGONOPTIONS</a></h6>
!   <p class=MsoList>Registry key    : <a
!   href="#_(Network_provider):">(Network
!   provider)</a></p>
!   <p class=MsoList>Registry value : <a
!   href="#_Value___: LogonOptions">LogonOptions</a></p>
!   <p class=MsoList>Valid values    : '0', '1' or '3'</p>
!   <p class=MsoNormal>See <a
!   href="#_Appendix_A:_Registry_Values">Appendix
!   A</a> <a
!   href="#_A.2.1_Domain_specific_configuration">section
!   2.1 (Domain specific configuration keys for Network Provider)</a> for more
!   details.</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993168"></a><a name="_Toc126872245"></a><a
!   name="_Toc115416176">MOUNTROOT</a></h6>
!   <p class=MsoList>Registry key    : <a
!   href="#_(Service_parameters):">(Service
!   parameters)</a></p>
!   <p class=MsoList>Registry value : <a
!   href="#_Value_:_Mountroot">Mountroot</a></p>
!   <p class=MsoList>Valid values    : string</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993169"></a><a name="_Toc126872246"></a><a
!   name="_Toc115416177">NETBIOSNAME</a></h6>
!   <p class=MsoList>Registry key    : <a
!   href="#_(Service_parameters):">(Service
!   parameters)</a></p>
!   <p class=MsoList>Registry value : <a
!   href="#_Value___: NetbiosName">NetbiosName</a></p>
!   <p class=MsoList>Valid values    : string (at most 15 characters)</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993170"></a><a name="_Toc126872247"></a><a
!   name="_Toc115416178">NOFINDLANABYNAME</a></h6>
!   <p class=MsoList>Registry key    : <a
!   href="#_(Service_parameters):">(Service
!   parameters)</a></p>
!   <p class=MsoList>Registry value : <a
!   href="#_Value___: NoFindLanaByName">NoFindLanaByName</a></p>
!   <p class=MsoList>Valid values    : '1' or '0'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993171"></a><a name="_Toc126872248"></a><a
!   name="_Toc115416179">RXMAXMTU</a></h6>
!   <p class=MsoList>Registry key    : <a
!   href="#_(Service_parameters):">(Service
!   parameters)</a></p>
!   <p class=MsoList>Registry value : <a
!   href="#_Value_:_RxMaxMTU">RxMaxMTU</a></p>
!   <p class=MsoList>Valid values    : numeric</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993172"></a><a name="_Toc126872249"></a><a
!   name="_Toc115416180">SECURITYLEVEL</a></h6>
!   <p class=MsoList>Registry key    : <a
!   href="#_(Service_parameters):">(Service
!   parameters)</a></p>
!   <p class=MsoList>Registry value : <a
!   href="#_Value_:_SecurityLevel">SecurityLevel</a></p>
!   <p class=MsoList>Valid values    : '1' or '0'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993173"></a><a name="_Toc126872250"></a><a
!   name="_Toc115416181">SMBAUTHTYPE</a></h6>
!   <p class=MsoList>Registry key    : <a
!   href="#_(Service_parameters):">(Service
!   parameters)</a></p>
!   <p class=MsoList>Registry value : <a
!   href="#_Value___: smbAuthType">SMBAuthType</a></p>
!   <p class=MsoList>Valid values    : '0','1' or '2'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993174"></a><a name="_Toc126872251"></a><a
!   name="_Toc115416182">STOREANSIFILENAMES</a></h6>
!   <p class=MsoList>Registry key    : <a
    href="#_(OpenAFS_Client):">(OpenAFS Client)</a></p>
!   <p class=MsoList>Registry value : <a
!   href="#_Value___: StoreAnsiFilenames">StoreAnsiFilenames</a></p>
!   <p class=MsoList>Valid values    : '0' or '1'</p>
    </td>
   </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993175"></a><a name="_Toc126872252"></a><a
!   name="_Toc115416183">USEDNS</a></h6>
!   <p class=MsoList>Registry key    : <a
!   href="#_(Service_parameters):">(Service
!   parameters)</a></p>
!   <p class=MsoList>Registry value : <a
!   href="#_Value_:_UseDNS">UseDNS</a></p>
!   <p class=MsoList>Valid values    : '1' or '0'</p>
    </td>
   </tr>
  </table>
--- 2328,2731 ----
  
  <p class=MsoNormal>User questions should be sent to the <a
  href="mailto:openafs-info@openafs.org?subject=OpenAFS%20for%20Windows%20User%20Question">openafs-info@openafs.org</a>
! mailing list.&nbsp; </p>
  
  <p class=MsoNormal style='margin-left:35.45pt'><span class=MsoHyperlink>https://lists.openafs.org/mailman/listinfo/openafs-info</span></p>
  
  <p class=MsoNormal>You must join the mailing lists if you wish to post to the
  list without incurring a moderation delay.</p>
  
! <h1><a name="_Toc139993150"></a><a name="_Toc126872227"></a><a
! name="_Toc115417115"></a><a name="_Toc115417098"></a><a name="_Toc115416158"></a><a
! name="_MSI_Deployment_Guide"></a>7. MSI Deployment Guide</h1>
! 
! <b><span style='font-size:16.0pt;font-family:Albany;mso-fareast-font-family:
! "MS Mincho";mso-bidi-font-family:"Times New Roman";mso-ansi-language:EN-US;
! mso-fareast-language:JA;mso-bidi-language:AR-SA'><br clear=all
  style='page-break-before:always'>
  </span></b>
  
! <h2><a name="_Toc115416159"></a><a name="_Toc139993151"></a><a
! name="_Toc126872228"></a><a name="_Toc115417099"></a><span style='mso-bookmark:
! _Toc115416159'>7.1. Introduction</span></h2>
  
  <p class=MsoNormal>A MSI installer option is available for those who wish to
  use Windows Installer for installing OpenAFS and for organizations that wish to
! deploy OpenAFS through Group Policy.&nbsp; The first version of OpenAFS for
! Windows available as an MSI was 1.3.65.</p>
  
  <p class=MsoNormal>This document provides a guide for authoring transforms used
! to customize the MSI package for a particular organization.&nbsp; Although many
  settings can be deployed via transforms, in an Active Directory environment it
! is advisable to deploy registry settings&nbsp;&nbsp;&nbsp; and configuration
! files through group policy and/or startup scripts so that machines where
! OpenAFS for Windows is already installed will pick up these customizations.</p>
! 
! <h3><a name="_Toc115416160"></a><a name="_Toc139993152"></a><a
! name="_Toc126872229"></a><span style='mso-bookmark:_Toc115416160'>7.1.1
! Requirements</span></h3>
  
  <p class=MsoNormal>The information in this document applies to MSI packages
  distributed with OpenAFS for Windows releases from 1.3.65 and onwards or MSI
! packages built from corresponding source releases. &nbsp;Not all releases
! support all the configuration options documented here.</p>
  
  <p class=MsoNormal>Authoring a &quot;Windows Installer&quot; transform requires
  additional software for editing the MSI database tables and generating the
! transform from the modified MSI package.&nbsp; ORCA.EXE and MSITRAN.EXE which
! are included in the Windows Platform SDK (&quot;Windows Installer&quot; SDK)
! can be used for this purpose.</p>
  
! <p class=MsoNormal>For reference, the schema for the MSI package is based on SCHEMA.MSI
! distributed with the Platform SDK.</p>
  
  <p class=MsoNormal>For general information about &quot;Windows Installer&quot;,
  refer to:</p>
  
! <p class=MsoNormal>&nbsp;&nbsp;&nbsp; <a
  href="http://msdn.microsoft.com/library/en-us/msi/setup/windows_installer_start_page.asp">http://msdn.microsoft.com/library/en-us/msi/setup/windows_installer_start_page.asp</a></p>
  
  <p class=MsoNormal>For general information about authoring MSI transforms,
  refer to:</p>
  
! <p class=MsoNormal>&nbsp;&nbsp;&nbsp; <a
  href="http://msdn.microsoft.com/library/en-us/msi/setup/transforms.asp">http://msdn.microsoft.com/library/en-us/msi/setup/transforms.asp</a></p>
  
  <p class=MsoNormal>The remainder of this document assumes some familiarity with
! authoring transforms.&nbsp; While the MSDN documentation for Windows Installer
! is a bit dense, the guide on MSI transforms found at the second link above is
! recommended reading.&nbsp; MSDN also includes a step-by-step example for
! creating a transform at:</p>
  
! <p class=MsoNormal>&nbsp;&nbsp;&nbsp; <a
  href="http://msdn.microsoft.com/library/en-us/msi/setup/a_customization_transform_example.asp">http://msdn.microsoft.com/library/en-us/msi/setup/a_customization_transform_example.asp</a></p>
  
! <h3><a name="_Toc115416161"></a><a name="_Toc139993153"></a><a
! name="_Toc126872230"></a><span style='mso-bookmark:_Toc115416161'>7.1.2 Authoring
! a Transform</span></h3>
  
  <p class=MsoNormal>Transforms describe a set of modifications to be performed
! on an existing MSI for the purpose of customizing it.&nbsp; This is ordinarily
! done by making a copy of the MSI to be customized, modifying the copy and then
! using the old and the new MSI to generate a transform.&nbsp; For example:</p>
! 
! <p class=preformattedtext style='margin-left:36.0pt;text-indent:-18.0pt'>1.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp; </span>copy
! openafs.msi openafs-modified.msi</p>
! 
! <p class=preformattedtext style='margin-left:36.0pt;text-indent:-18.0pt'>2.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp; </span>(edit
! the openafs-modified.msi to include the necessary changes)</p>
! 
! <p class=preformattedtext style='margin-left:36.0pt;text-indent:-18.0pt'>3.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp; </span>msitran
! -g openafs.msi openafs-modified.msi openafs-transform.mst</p>
  
! <p class=preformattedtext style='margin-left:36.0pt;text-indent:-18.0pt'>4.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp; </span>(generates
  openafs-transform.mst, which is the transform)</p>
  
! <p class=MsoNormal>Transforms have an extension of .mst.&nbsp; 'msitran' is a
! tool distributed as part of the &quot;Windows Installer&quot; SDK (part of the
  Windows Platform SDK).</p>
  
  <p class=MsoNormal>You can test a transform by:</p>
  
! <p class=preformattedtext style='margin-left:36.0pt;text-indent:-18.0pt'>1.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp; </span>copy
! openafs.msi openafs-test.msi</p>
! 
! <p class=preformattedtext style='margin-left:36.0pt;text-indent:-18.0pt'>2.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp; </span>msitran
! -a openafs-transform.mst openafs-test.msi</p>
  
  <p class=MsoNormal>and then checking the resulting openafs-test.msi to see if
  all changes you have made above to openafs-modified.msi is present in
! openafs-test.msi.&nbsp; 'msitran' will complain if some modification in the
  transform can not be successfully applied.</p>
  
  <p class=MsoNormal>As mentioned above, you can use a tool like ORCA.EXE to edit
! the MSI databases directly when editing openafs-modified.msi.&nbsp; More
! details are given below.</p>
  
! <h2><a name="_Toc115416162"></a><a name="_Toc139993154"></a><a
! name="_Toc126872231"></a><a name="_Toc115417100"></a><span style='mso-bookmark:
! _Toc115416162'>7.2. Configuration Options</span></h2>
  
  <p class=MsoNormal>The logic necessary to implement many of the settings
! described in <a href="#_Appendix_A:_Registry_Values">Appendix A</a> are present
! in the MSI.&nbsp; Most of these can be controlled by setting the corresponding
! properties to the desired value.&nbsp; Some settings may require modifying
! existing registry entries (though not recommended) or adding new resources
! (like files or registry keys).&nbsp; Instructions for performing these tasks
! are below.</p>
! 
! <h3><a name="_Toc115416163"></a><a name="_Toc139993155"></a><a
! name="_Toc126872232"></a><span style='mso-bookmark:_Toc115416163'>7.2.1
! Configurable Properties</span></h3>
  
  <p class=MsoNormal>Most configurable properties correspond to registry keys or
! values.&nbsp; Due to the logic invoked based on the existence of these registry
! keys or values, they are only set if the associated property is defined to have
! a non null value.&nbsp; If the associated property is not defined in the MSI,
! the registry key or value will not be touched.&nbsp; By default, the MSI does
! not contain these properties and hence will not set the registry keys.&nbsp;
! You will need to add properties as needed to the MSI.</p>
  
  <p class=MsoNormal>When one of the configurable properties is set, the
  installer will use the property value to set the corresponding setting in the
! HKEY_LOCAL_MACHINE registry hive.&nbsp; The HKEY_CURRENT_USER hive is not
! touched by the installer.</p>
  
  <p class=MsoNormal>For each property, the associated registry setting is
! referenced by the same text used in <a href="#_Appendix_A:_Registry_Values">Appendix
! A</a>.</p>
  
  <p class=MsoNormal>Strings are quoted using single quotes (e.g. 'a string'). An
! empty string is denoted as ''.&nbsp; Note that you can't author null values
! into the 'Property' table.</p>
  
  <p class=MsoNormal>Numeric values should be authored as decimal strings.</p>
  
! <h4><a name="_Toc115416164"></a><a name="_Toc139993156"></a><a
! name="_Toc126872233"></a><span style='mso-bookmark:_Toc115416164'>7.2.1.1
! Setting Properties</span></h4>
  
  <p class=MsoNormal>In order to set a property,</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt'><span style='font-size:9.0pt'>1.</span><span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span>Open the MSI in ORCA.EXE</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt'><span style='font-size:9.0pt'>2.</span><span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span>Select the 'Property' table from the list of tables on the left.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt'><span style='font-size:9.0pt'>3.</span><span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span>Find the property in the list of properties on the right, double click
! the value and type the new value.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt'><span style='font-size:9.0pt'>4.</span><span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span>If the property does not exist in the property list, right click the
! list and select 'Add Row', type the property name and the desired value.</p>
! 
! <h4><a name="_Toc115416165"></a><a name="_Toc139993157"></a><a
! name="_Toc126872234"></a><span style='mso-bookmark:_Toc115416165'>7.2.1.2
! OpenAFS for Windows Properties</span></h4>
! 
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
    <h5><a name="_Toc139993158"></a><a name="_Toc126872235"></a><a
!   name="_Toc115416166"></a><a name="_(Service_parameters):"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>(Service parameters):<o:p></o:p></span></h5>
!   <p class=listcontents style='margin-left:0pt'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:1'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
    <h5><a name="_Toc139993159"></a><a name="_Toc126872236"></a><a
!   name="_Toc115416167"></a><a name="_(Network_provider):"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>(Network provider):<o:p></o:p></span></h5>
!   <p class=listcontents style='margin-left:0pt'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:2;mso-yfti-lastrow:yes'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
    <h5><a name="_Toc139993160"></a><a name="_Toc126872237"></a><a
!   name="_Toc115416168"></a><a name="_(OpenAFS_Client):"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>(OpenAFS Client):<o:p></o:p></span></h5>
!   <p class=listcontents style='margin-left:0pt'>[HKLM\SOFTWARE\OpenAFS\Client]</p>
    </td>
   </tr>
  </table>
  
! <h5><a name="_Toc115416169"></a><a name="_Toc139993161"></a><a
! name="_Toc126872238"></a><span style='mso-bookmark:_Toc115416169'>7.2.1.2.1
! Registry Properties</span></h5>
  
  <p class=MsoNormal>These properties are used to set the values of registry
  entries associated with OpenAFS for Windows.</p>
  
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416170"></a><a name="_Toc139993162"></a><a
!   name="_Toc126872239"></a><span style='mso-bookmark:_Toc115416170'><span
!   style='mso-fareast-font-family:"Times New Roman"'>AFSCACHEPATH</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
!   <p class=MsoList>Registry value : <a href="#_Value_:_CachePath">CachePath</a></p>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : string .</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:1'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416171"></a><a name="_Toc139993163"></a><a
!   name="_Toc126872240"></a><span style='mso-bookmark:_Toc115416171'><span
!   style='mso-fareast-font-family:"Times New Roman"'>AFSCACHESIZE</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
!   <p class=MsoList>Registry value : <a href="#_Value___:_CacheSize">CacheSize</a></p>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : numeric</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:2'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416172"></a><a name="_Toc139993164"></a><a
!   name="_Toc126872241"></a><span style='mso-bookmark:_Toc115416172'><span
!   style='mso-fareast-font-family:"Times New Roman"'>AFSCELLNAME</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
!   <p class=MsoList>Registry value : <a href="#_Value_:_Cell">Cell</a></p>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : string</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:3'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416173"></a><a name="_Toc139993165"></a><a
!   name="_Toc126872242"></a><span style='mso-bookmark:_Toc115416173'><span
!   style='mso-fareast-font-family:"Times New Roman"'>FREELANCEMODE</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
!   <p class=MsoList>Registry value : <a href="#_Value_:_FreelanceClient">FreelanceClient</a></p>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '1' or '0'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:4'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416174"></a><a name="_Toc139993166"></a><a
!   name="_Toc126872243"></a><span style='mso-bookmark:_Toc115416174'><span
!   style='mso-fareast-font-family:"Times New Roman"'>HIDEDOTFILES</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
!   <p class=MsoList>Registry value : <a href="#_Value_:_HideDotFiles">HideDotFiles</a></p>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '1' or '0'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:5'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416175"></a><a name="_Toc139993167"></a><a
!   name="_Toc126872244"></a><span style='mso-bookmark:_Toc115416175'><span
!   style='mso-fareast-font-family:"Times New Roman"'>LOGONOPTIONS</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
!   href="#_(Network_provider):">(Network provider)</a></p>
!   <p class=MsoList>Registry value : <a href="#_Value___:_LogonOptions">LogonOptions</a></p>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '0', '1' or '3'</p>
!   <p class=MsoNormal>See <a href="#_Appendix_A:_Registry_Values">Appendix A</a>
!   <a href="#_A.2.1_Domain_specific_configuration">section 2.1 (Domain specific
!   configuration keys for Network Provider)</a> for more details.</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:6'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416176"></a><a name="_Toc139993168"></a><a
!   name="_Toc126872245"></a><span style='mso-bookmark:_Toc115416176'><span
!   style='mso-fareast-font-family:"Times New Roman"'>MOUNTROOT</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
!   <p class=MsoList>Registry value : <a href="#_Value_:_Mountroot">Mountroot</a></p>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : string</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:7'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416177"></a><a name="_Toc139993169"></a><a
!   name="_Toc126872246"></a><span style='mso-bookmark:_Toc115416177'><span
!   style='mso-fareast-font-family:"Times New Roman"'>NETBIOSNAME</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
!   <p class=MsoList>Registry value : <a href="#_Value___:_NetbiosName">NetbiosName</a></p>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : string (at most 15
!   characters)</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:8'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416178"></a><a name="_Toc139993170"></a><a
!   name="_Toc126872247"></a><span style='mso-bookmark:_Toc115416178'><span
!   style='mso-fareast-font-family:"Times New Roman"'>NOFINDLANABYNAME</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
!   <p class=MsoList>Registry value : <a href="#_Value___:_NoFindLanaByName">NoFindLanaByName</a></p>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '1' or '0'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:9'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416179"></a><a name="_Toc139993171"></a><a
!   name="_Toc126872248"></a><span style='mso-bookmark:_Toc115416179'><span
!   style='mso-fareast-font-family:"Times New Roman"'>RXMAXMTU</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
!   <p class=MsoList>Registry value : <a href="#_Value_:_RxMaxMTU">RxMaxMTU</a></p>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : numeric</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:10'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416180"></a><a name="_Toc139993172"></a><a
!   name="_Toc126872249"></a><span style='mso-bookmark:_Toc115416180'><span
!   style='mso-fareast-font-family:"Times New Roman"'>SECURITYLEVEL</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
!   <p class=MsoList>Registry value : <a href="#_Value_:_SecurityLevel">SecurityLevel</a></p>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '1' or '0'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:11'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416181"></a><a name="_Toc139993173"></a><a
!   name="_Toc126872250"></a><span style='mso-bookmark:_Toc115416181'><span
!   style='mso-fareast-font-family:"Times New Roman"'>SMBAUTHTYPE</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
!   <p class=MsoList>Registry value : <a href="#_Value___:_smbAuthType">SMBAuthType</a></p>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '0','1' or '2'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:12'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416182"></a><a name="_Toc139993174"></a><a
!   name="_Toc126872251"></a><span style='mso-bookmark:_Toc115416182'><span
!   style='mso-fareast-font-family:"Times New Roman"'>STOREANSIFILENAMES</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(OpenAFS_Client):">(OpenAFS Client)</a></p>
!   <p class=MsoList>Registry value : <a href="#_Value___:_StoreAnsiFilenames">StoreAnsiFilenames</a></p>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '0' or '1'</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:13;mso-yfti-lastrow:yes'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416183"></a><a name="_Toc139993175"></a><a
!   name="_Toc126872252"></a><span style='mso-bookmark:_Toc115416183'><span
!   style='mso-fareast-font-family:"Times New Roman"'>USEDNS</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
!   <p class=MsoList>Registry value : <a href="#_Value_:_UseDNS">UseDNS</a></p>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '1' or '0'</p>
    </td>
   </tr>
  </table>
***************
*** 2341,2998 ****
  name="_Toc115416184"></a><a name="_7.2.1.2.2_AFSCreds.exe_Properties"></a>7.2.1.2.2
  AFSCreds.exe Properties</h5>
  
! <p class=MsoNormal>These properties are combined to add a command line option
! to the shortcut that will be created in the Start:Programs:OpenAFS and
! Start:Programs:Startup folders (see CREDSSTARTUP).  The method of specifying
! the option was chosen for easy integration with the Windows Installer user
! interface.  Although other methods can be used to specify options to
! AFSCREDS.EXE, it is advised that they be avoided as transforms including such
! options may not apply to future releases of OpenAFS.</p>
! 
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993177"></a><a name="_Toc126872254"></a><a
!   name="_Toc115416185">CREDSSTARTUP</a></h6>
!   <p class=MsoList>Valid values    : '1' or '0'</p>
    <p class=MsoList>Controls whether AFSCreds.exe starts up automatically when
!   the user logs on.  When CREDSSTARTUP is '1' a shortcut is added to the
    'Startup' folder in the 'Program menu' which starts AFSCREDS.EXE with the
    options that are determined by the other CREDS* properties.</p>
    </td>
   </tr>
!  <tr>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993178"></a><a name="_Toc126872255"></a><a
!   name="_Toc115416186">CREDSAUTOINIT</a></h6>
!   <p class=MsoList>Valid values    : '-a' or ''</p>
    <p class=MsoList>Enables automatic initialization.</p>
    </td>
   </tr>
!  <tr>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993179"></a><a name="_Toc126872256"></a><a
!   name="_Toc115416187">CREDSIPCHDET</a></h6>
!   <p class=MsoList>Valid values    : '-n' or ''</p>
    <p class=MsoList>Enables IP address change detection.</p>
    </td>
   </tr>
!  <tr>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993180"></a><a name="_Toc126872257"></a><a
!   name="_Toc115416188">CREDSQUIET</a></h6>
!   <p class=MsoList>Valid values    : '-q' or ''</p>
    <p class=MsoList>Enables quiet mode.</p>
    </td>
   </tr>
!  <tr>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993181"></a><a name="_Toc126872258"></a><a
!   name="_Toc115416189">CREDSRENEWDRMAP</a></h6>
!   <p class=MsoList>Valid values    : '-m' or '’</p>
    <p class=MsoList>Enables renewing drive map at startup.</p>
    </td>
   </tr>
!  <tr>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc139993182"></a><a name="_Toc126872259"></a><a
!   name="_Toc115416190">CREDSSHOW</a></h6>
!   <p class=MsoList>Valid values    : '-s' or ''</p>
    <p class=MsoList>Enables displaying the credential manager window when
    AFSCREDS starts up.</p>
    </td>
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993183"></a><a
! name="_Toc126872260"></a><a name="_Toc115416191">7.2.2 Existing Registry
! Entries</a></h3>
  
  <p class=MsoNormal>You can change existing registry values subject to the
! restrictions mentioned in the Windows Platform SDK.  Pay special attention to
! component key paths and try to only change the 'Value' column in the 'Registry'
! table.  If you want to add additional registry keys please refer to section 3
! (Additional resources).</p>
! 
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993184"></a><a
! name="_Toc126872261"></a><a name="_Toc115416192">7.2.3 Replacing Configuration
! Files</a></h3>
  
  <p class=MsoNormal>The OpenAFS configuration files (CellServDB) can be replaced
! by your own configuration files.  These files are contained in separate MSI components
! so that you can disable them individually.</p>
  
  <p class=MsoNormal>The recommended method for replacing these files is to first
  disable the components containing the configuration files that you want to
! replace, and then add new components for the replacement files.  This is
  outlined below (assuming you are using ORCA.EXE to author the transform).</p>
  
  <p class=MsoNormal>Note that transforms are not a good way to add a new file as
! an embedded stream.  The method outlined here places the file in the same
  directory as the MSI for deployment.</p>
  
  <p class=MsoNormal>The walkthrough below is to add a custom 'CellServDB' file.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span>Disable the component that contains the configuration file that you want
! to replace.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:39.6pt;text-indent:-21.6pt'>1.1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;
! </span>Locate and select the 'Component' table in the 'Tables' list.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:39.6pt;text-indent:-21.6pt'>1.2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;
! </span>In the Component table, locate the component you need to change ( Ctrl-F
! invokes the 'Find' dialog).  The component names are listed below in section <a
! href="#_2.3.1_Components_for_Configuration ">7.2.3.1</a>. 
! For this example, the component name is 'elf_CellServDB'.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:39.6pt;text-indent:-21.6pt'>1.3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;
! </span>Go to the 'Condition' column of the component.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:39.6pt;text-indent:-21.6pt'>1.4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;
! </span>Enter a condition that evaluates to false. I.e. 'DONOTINSTALL'. (Note
! that an undefined property always evaluates to false).</p>
  
! <p class=MsoNormal>Note that you can also use this step to disable other
! configuration files without providing replacements.</p>
  
  <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt'>2.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Add
! a new component containing the new configuration file.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>2.1.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span>Select the 'Component'
! table in the 'Tables' list.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>2.2.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span>Select
  'Tables'-&gt;'Add Row' (Ctrl-R).</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>2.3.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span>Enter the following :</p>
  
! <table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
!  style='margin-left:39.35pt;border-collapse:collapse;border:none'>
!  <tr style='height:23.35pt'>
    <td width=115 valign=top style='width:86.25pt;border:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt;height:23.35pt'>
!   <p class=PreformattedText>Component</p>
    </td>
    <td width=475 valign=top style='width:356.55pt;border:solid windowtext 1.0pt;
    border-left:none;padding:0pt 5.4pt 0pt 5.4pt;height:23.35pt'>
!   <p class=PreformattedText>cmf_my_CellServDB</p>
    </td>
   </tr>
!  <tr>
    <td width=115 valign=top style='width:86.25pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>ComponentID</p>
    </td>
    <td width=475 valign=top style='width:356.55pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>{7019836F-BB2C-4AF6-9463-0D6EC9035CF1}</p>
    </td>
   </tr>
!  <tr>
    <td width=115 valign=top style='width:86.25pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>Directory_</p>
    </td>
    <td width=475 valign=top style='width:356.55pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>dirClient</p>
    </td>
   </tr>
!  <tr>
    <td width=115 valign=top style='width:86.25pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>Attributes</p>
    </td>
    <td width=475 valign=top style='width:356.55pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>144</p>
    </td>
   </tr>
!  <tr>
    <td width=115 valign=top style='width:86.25pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>Condition</p>
    </td>
    <td width=475 valign=top style='width:356.55pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>&nbsp;</p>
    </td>
   </tr>
!  <tr>
    <td width=115 valign=top style='width:86.25pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>KeyPath</p>
    </td>
    <td width=475 valign=top style='width:356.55pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>fil_my_CellServDB</p>
    </td>
   </tr>
  </table>
  
  <p class=MsoNormal style='margin-left:35.45pt'>Note that the ComponentId is an
! uppercase GUID.  You can generate one using GUIDGEN.EXE or UUIDGEN.EXE, both of
! which are included in the Platform SDK.</p>
  
  <p class=MsoNormal style='margin-left:35.45pt'>The Attributes value of 144 is a
  sum of msidbComponentAttributesPermanent (16) and
! msidbComponentAttributesNeverOverwrite (128).  This ensures that local
  modifications are not overwritten or lost during an installation or
! uninstallation.  These are the same settings used on the default configuration files.</p>
  
! <p class=MsoNormal>            'fil_my_CellServDB' is a key into the 'File'
! table which we will fill later.</p>
  
  <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt'>3.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Add
! a new feature to hold the new component.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>3.1.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span>Select the 'Feature'
! table.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>3.2.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span>Add a new row (Ctrl-R
! or 'Tables'-&gt;'Add Row') with the following values:</p>
  
! <table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
!  style='margin-left:40.1pt;border-collapse:collapse;border:none'>
!  <tr>
    <td width=126 valign=top style='width:94.8pt;border:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>Feature</p>
    </td>
    <td width=462 valign=top style='width:346.2pt;border:solid windowtext 1.0pt;
    border-left:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>fea_my_CellServDB</p>
    </td>
   </tr>
!  <tr>
    <td width=126 valign=top style='width:94.8pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>Feature_Parent</p>
    </td>
    <td width=462 valign=top style='width:346.2pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>feaClient</p>
    </td>
   </tr>
!  <tr>
    <td width=126 valign=top style='width:94.8pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>Title</p>
    </td>
    <td width=462 valign=top style='width:346.2pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>&nbsp;</p>
    </td>
   </tr>
!  <tr>
    <td width=126 valign=top style='width:94.8pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>Description</p>
    </td>
    <td width=462 valign=top style='width:346.2pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>&nbsp;</p>
    </td>
   </tr>
!  <tr>
    <td width=126 valign=top style='width:94.8pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>Display</p>
    </td>
    <td width=462 valign=top style='width:346.2pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>0</p>
    </td>
   </tr>
!  <tr>
    <td width=126 valign=top style='width:94.8pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>Level</p>
    </td>
    <td width=462 valign=top style='width:346.2pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>30</p>
    </td>
   </tr>
!  <tr>
    <td width=126 valign=top style='width:94.8pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>Directory_</p>
    </td>
    <td width=462 valign=top style='width:346.2pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>&nbsp;</p>
    </td>
   </tr>
!  <tr>
    <td width=126 valign=top style='width:94.8pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>Attributes</p>
    </td>
    <td width=462 valign=top style='width:346.2pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>8</p>
    </td>
   </tr>
  </table>
  
  <p class=MsoNormal style='margin-left:35.45pt'>It is important to create the
! new feature under the 'feaClient' feature, which will ensure that the configuration
! file will be installed when the client binaries are installed.</p>
  
  <p class=MsoNormal style='margin-left:35.45pt'>Setting 'Display' to 0 will hide
! this feature from the feature selection dialog during an interactive installation. 
! A value of 30 for 'Level' allows this feature to be installed by default (on a
! 'Typical' installation).</p>
! 
! <p class=MsoNormal style='margin-left:35.45pt'>The 'Attributes' value is msidbFeatureAttributesDisallowAdvertise
! (8), which is set on all features in the OpenAFS MSI.  The OpenAFS MSI is not designed
! for an advertised installation.</p>
  
  <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt'>4.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Join
! the component and the feature.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>4.1.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span>Select the
! 'FeatureComponents' table.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>4.2.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span>Add a new row with the
! following values:</p>
  
! <table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
!  style='margin-left:40.1pt;border-collapse:collapse;border:none'>
!  <tr>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>Feature</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border:solid windowtext 1.0pt;
    border-left:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>fea_my_CellServDB</p>
    </td>
   </tr>
!  <tr>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>Component</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>cmf_my_CellServDB</p>
    </td>
   </tr>
  </table>
  
  <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt'>5.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Add
! an entry to the 'File' table.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>5.1.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span>Select the 'File'
! table.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>5.2.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span>Add a new row with the
! following values:</p>
  
! <table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
!  style='margin-left:40.1pt;border-collapse:collapse;border:none'>
!  <tr>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>File</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border:solid windowtext 1.0pt;
    border-left:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>fil_my_CellServDB</p>
    </td>
   </tr>
!  <tr>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>Component_</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>cmf_my_CellServDB</p>
    </td>
   </tr>
!  <tr>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>FileName</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>CellServDB</p>
    </td>
   </tr>
!  <tr>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>FileSize</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>(enter file size here)</p>
    </td>
   </tr>
!  <tr>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>Attributes</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>8192</p>
    </td>
   </tr>
!  <tr>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>Sequence</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>1000</p>
    </td>
   </tr>
  </table>
  
! <p class=MsoNormal>                (leave other fields blank)</p>
  
  <p class=MsoNormal style='margin-left:35.45pt'>The 'Attributes' value is
! msidbFileAttributesNonCompressed (8192).  This is because we will be placing
! this file in the same directory as the MSI instead of embedding the file in
! it.  Transforms do not support updating compressed sources or adding new
! cabinet streams.</p>
  
  <p class=MsoNormal style='margin-left:35.45pt'>Finally, the 'Sequence' value of
! 1000 will be used later to distinguish the file as being in a separate source location
! than the other files in the MSI.</p>
  
  <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt'>6.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Set
! a media source for the file.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>6.1.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span>Select the 'Media'
! table.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>6.2.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span>Add a row with the
! following values :</p>
  
! <table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
!  style='margin-left:40.1pt;border-collapse:collapse;border:none'>
!  <tr>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>DiskId</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border:solid windowtext 1.0pt;
    border-left:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>2</p>
    </td>
   </tr>
!  <tr>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>LastSequence</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>1000</p>
    </td>
   </tr>
  </table>
  
! <p class=MsoNormal>                (leave other fields blank)</p>
  
  <p class=MsoNormal style='margin-left:35.45pt'>The sequence number of 1000
  designates this as the media source for the newly added file.</p>
  
  <h4><a name="_Toc139993185"></a><a name="_Toc126872262"></a><a
! name="_Toc115416193"></a><a name="_2.3.1_Components_for_Configuration "></a>7.2.3.1
  Components for Configuration Files</h4>
  
! <p class=PreformattedText style='text-indent:35.45pt'>CellServDB:
  'cpf_CellServDB' (ID {D5BA4C15-DBEC-4292-91FC-B54C30F24F2A})</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993186"></a><a
! name="_Toc126872263"></a><a name="_Toc115416194">7.2.4 Adding Domain Specific
! Registry Keys</a></h3>
  
  <p class=MsoNormal>Following is an example for adding domain specific registry
  keys.</p>
  
! <p class=MsoNormal>    Refer to <a
! href="#_Appendix_A:_Registry_Values">Appendix A</a>
! section 2.1 for more information.</p>
! 
! <p class=MsoNormal>    Columns that are unspecified should be left empty.</p>
! 
! <p class=MsoNormal>    We create a new feature and component to hold the new
! registry keys.</p>
! 
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>    'Feature' table:</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>            (new row)<br>
!             Feature            : 'feaDomainKeys'<br>
!             Feature Parent : 'feaClient'<br>
!             Display           : 0<br>
!             Level               : 30<br>
!             Attributes        : 10</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>    'Component' table:</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>            (new row)<br>
!               Component     : 'rcm_DomainKeys'<br>
!             ComponentId  : '{4E3FCBF4-8BE7-40B2-A108-C47CF743C627}'<br>
!             Directory         : 'TARGETDIR'<br>
!             Attributes        : 4<br>
!             KeyPath          : 'reg_domkey0'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>    'FeatureComponents' table:</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>            (new row)<br>
!             Feature            : 'feaDomainKeys'<br>
!             Component     : 'rcm_DomainKeys'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>    'Registry' table:</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>            (new row)<br>
!             Registry          : 'reg_domkey0'<br>
!             Root                : 2<br>
!             Key                 : 'SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain'<br>
!             Component     : 'rcm_DomainKeys'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>            (new row)<br>
!             Registry          : 'reg_domkey1'<br>
!             Root                : 2<br>
!             Key                 :
!   'SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain'<br>
!             Name              : '*'<br>
!             Component     : 'rcm_DomainKeys'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>            (new row)<br>
!             Registry          : 'reg_domkey2'<br>
!             Root                : 2<br>
!             Key                 :
    'SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\ATHENA.MIT.EDU'<br>
!             Name              : '*'<br>
!             Component     : 'rcm_DomainKeys'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>            (new row)<br>
!             Registry          : 'reg_domkey3'<br>
!             Root                : 2<br>
!             Key                 : 'SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\ATHENA.MIT.EDU'<br>
!             Name              : 'LogonOptions'<br>
!             Value              : 1<br>
!             Component     : 'rcm_DomainKeys'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>            (new row)<br>
!             Registry          : 'reg_domkey4'<br>
!             Root                : 2<br>
!             Key                 : SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST'<br>
!             Name              : '*'<br>
!             Component     : 'rcm_DomainKeys'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>            (new row)<br>
!             Registry          : 'reg_domkey5'<br>
!             Root                : 2<br>
!             Key                 :
    'SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST'<br>
!             Name              : 'LogonOptions'<br>
!             Value              : 0<br>
!             Component     : 'rcm_DomainKeys'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>            (new row)<br>
!             Registry          : 'reg_domkey6'<br>
!             Root                : 2<br>
!             Key                 :
!   'SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST'<br>
!             Name              : 'FailLoginsSilently'<br>
!             Value              : 1<br>
!             Component     : 'rcm_DomainKeys'<br>
!   <br>
!   </p>
    </td>
   </tr>
  </table>
--- 2734,3504 ----
  name="_Toc115416184"></a><a name="_7.2.1.2.2_AFSCreds.exe_Properties"></a>7.2.1.2.2
  AFSCreds.exe Properties</h5>
  
! <p class=MsoNormal>These properties are combined to add a command line option to
! the shortcut that will be created in the Start:Programs:OpenAFS and
! Start:Programs:Startup folders (see CREDSSTARTUP). &nbsp;The method of
! specifying the option was chosen for easy integration with the Windows
! Installer user interface.&nbsp; Although other methods can be used to specify
! options to AFSCREDS.EXE, it is advised that they be avoided as transforms
! including such options may not apply to future releases of OpenAFS.</p>
! 
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416185"></a><a name="_Toc139993177"></a><a
!   name="_Toc126872254"></a><span style='mso-bookmark:_Toc115416185'><span
!   style='mso-fareast-font-family:"Times New Roman"'>CREDSSTARTUP</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '1' or '0'</p>
    <p class=MsoList>Controls whether AFSCreds.exe starts up automatically when
!   the user logs on.&nbsp; When CREDSSTARTUP is '1' a shortcut is added to the
    'Startup' folder in the 'Program menu' which starts AFSCREDS.EXE with the
    options that are determined by the other CREDS* properties.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:1'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416186"></a><a name="_Toc139993178"></a><a
!   name="_Toc126872255"></a><span style='mso-bookmark:_Toc115416186'><span
!   style='mso-fareast-font-family:"Times New Roman"'>CREDSAUTOINIT</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '-a' or ''</p>
    <p class=MsoList>Enables automatic initialization.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:2'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416187"></a><a name="_Toc139993179"></a><a
!   name="_Toc126872256"></a><span style='mso-bookmark:_Toc115416187'><span
!   style='mso-fareast-font-family:"Times New Roman"'>CREDSIPCHDET</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '-n' or ''</p>
    <p class=MsoList>Enables IP address change detection.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:3'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416188"></a><a name="_Toc139993180"></a><a
!   name="_Toc126872257"></a><span style='mso-bookmark:_Toc115416188'><span
!   style='mso-fareast-font-family:"Times New Roman"'>CREDSQUIET</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '-q' or ''</p>
    <p class=MsoList>Enables quiet mode.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:4'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416189"></a><a name="_Toc139993181"></a><a
!   name="_Toc126872258"></a><span style='mso-bookmark:_Toc115416189'><span
!   style='mso-fareast-font-family:"Times New Roman"'>CREDSRENEWDRMAP</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '-m' or '’</p>
    <p class=MsoList>Enables renewing drive map at startup.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:5;mso-yfti-lastrow:yes'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416190"></a><a name="_Toc139993182"></a><a
!   name="_Toc126872259"></a><span style='mso-bookmark:_Toc115416190'><span
!   style='mso-fareast-font-family:"Times New Roman"'>CREDSSHOW</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h6>
!   <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '-s' or ''</p>
    <p class=MsoList>Enables displaying the credential manager window when
    AFSCREDS starts up.</p>
    </td>
   </tr>
  </table>
  
! <h3><a name="_Toc115416191"></a><a name="_Toc139993183"></a><a
! name="_Toc126872260"></a><span style='mso-bookmark:_Toc115416191'>7.2.2
! Existing Registry Entries</span></h3>
  
  <p class=MsoNormal>You can change existing registry values subject to the
! restrictions mentioned in the Windows Platform SDK.&nbsp; Pay special attention
! to component key paths and try to only change the 'Value' column in the
! 'Registry' table.&nbsp; If you want to add additional registry keys please
! refer to section 3 (Additional resources).</p>
! 
! <h3><a name="_Toc115416192"></a><a name="_Toc139993184"></a><a
! name="_Toc126872261"></a><span style='mso-bookmark:_Toc115416192'>7.2.3
! Replacing Configuration Files</span></h3>
  
  <p class=MsoNormal>The OpenAFS configuration files (CellServDB) can be replaced
! by your own configuration files.&nbsp; These files are contained in separate
! MSI components so that you can disable them individually.</p>
  
  <p class=MsoNormal>The recommended method for replacing these files is to first
  disable the components containing the configuration files that you want to
! replace, and then add new components for the replacement files.&nbsp; This is
  outlined below (assuming you are using ORCA.EXE to author the transform).</p>
  
  <p class=MsoNormal>Note that transforms are not a good way to add a new file as
! an embedded stream.&nbsp; The method outlined here places the file in the same
  directory as the MSI for deployment.</p>
  
  <p class=MsoNormal>The walkthrough below is to add a custom 'CellServDB' file.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt'>1.<span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Disable
! the component that contains the configuration file that you want to replace.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:39.6pt;text-indent:-21.6pt'>1.1.<span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp; </span>Locate and select the
! 'Component' table in the 'Tables' list.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:39.6pt;text-indent:-21.6pt'>1.2.<span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp; </span>In the Component table, locate
! the component you need to change ( Ctrl-F invokes the 'Find' dialog).&nbsp; The
! component names are listed below in section <a
! href="#_2.3.1_Components_for_Configuration_">7.2.3.1</a>.&nbsp; For this
! example, the component name is 'elf_CellServDB'.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:39.6pt;text-indent:-21.6pt'>1.3.<span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp; </span>Go to the 'Condition' column
! of the component.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:39.6pt;text-indent:-21.6pt'>1.4.<span style='font-size:7.0pt;
! font-family:"Times New Roman"'>&nbsp;&nbsp; </span>Enter a condition that
! evaluates to false. I.e. 'DONOTINSTALL'. (Note that an undefined property
! always evaluates to false).</p>
  
! <p class=MsoNormal>Note that you can also use this step to disable other configuration
! files without providing replacements.</p>
  
  <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt'>2.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span>Add a new component containing the new configuration file.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>2.1.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp; </span>Select
! the 'Component' table in the 'Tables' list.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>2.2.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp; </span>Select
  'Tables'-&gt;'Add Row' (Ctrl-R).</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>2.3.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp; </span>Enter
! the following :</p>
  
! <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
!  style='margin-left:39.35pt;border-collapse:collapse;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;height:23.35pt'>
    <td width=115 valign=top style='width:86.25pt;border:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt;height:23.35pt'>
!   <p class=preformattedtext>Component</p>
    </td>
    <td width=475 valign=top style='width:356.55pt;border:solid windowtext 1.0pt;
    border-left:none;padding:0pt 5.4pt 0pt 5.4pt;height:23.35pt'>
!   <p class=preformattedtext>cmf_my_CellServDB</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:1'>
    <td width=115 valign=top style='width:86.25pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>ComponentID</p>
    </td>
    <td width=475 valign=top style='width:356.55pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>{7019836F-BB2C-4AF6-9463-0D6EC9035CF1}</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:2'>
    <td width=115 valign=top style='width:86.25pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>Directory_</p>
    </td>
    <td width=475 valign=top style='width:356.55pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>dirClient</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:3'>
    <td width=115 valign=top style='width:86.25pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>Attributes</p>
    </td>
    <td width=475 valign=top style='width:356.55pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>144</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:4'>
    <td width=115 valign=top style='width:86.25pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>Condition</p>
    </td>
    <td width=475 valign=top style='width:356.55pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>&nbsp;</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:5;mso-yfti-lastrow:yes'>
    <td width=115 valign=top style='width:86.25pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>KeyPath</p>
    </td>
    <td width=475 valign=top style='width:356.55pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>fil_my_CellServDB</p>
    </td>
   </tr>
  </table>
  
  <p class=MsoNormal style='margin-left:35.45pt'>Note that the ComponentId is an
! uppercase GUID.&nbsp; You can generate one using GUIDGEN.EXE or UUIDGEN.EXE,
! both of which are included in the Platform SDK.</p>
  
  <p class=MsoNormal style='margin-left:35.45pt'>The Attributes value of 144 is a
  sum of msidbComponentAttributesPermanent (16) and
! msidbComponentAttributesNeverOverwrite (128).&nbsp; This ensures that local
  modifications are not overwritten or lost during an installation or
! uninstallation.&nbsp; These are the same settings used on the default
! configuration files.</p>
  
! <p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! 'fil_my_CellServDB' is a key into the 'File' table which we will fill later.</p>
  
  <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt'>3.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span>Add a new feature to hold the new component.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>3.1.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp; </span>Select
! the 'Feature' table.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>3.2.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp; </span>Add a
! new row (Ctrl-R or 'Tables'-&gt;'Add Row') with the following values:</p>
  
! <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
!  style='margin-left:40.1pt;border-collapse:collapse;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
    <td width=126 valign=top style='width:94.8pt;border:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>Feature</p>
    </td>
    <td width=462 valign=top style='width:346.2pt;border:solid windowtext 1.0pt;
    border-left:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>fea_my_CellServDB</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:1'>
    <td width=126 valign=top style='width:94.8pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>Feature_Parent</p>
    </td>
    <td width=462 valign=top style='width:346.2pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>feaClient</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:2'>
    <td width=126 valign=top style='width:94.8pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>Title</p>
    </td>
    <td width=462 valign=top style='width:346.2pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>&nbsp;</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:3'>
    <td width=126 valign=top style='width:94.8pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>Description</p>
    </td>
    <td width=462 valign=top style='width:346.2pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>&nbsp;</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:4'>
    <td width=126 valign=top style='width:94.8pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>Display</p>
    </td>
    <td width=462 valign=top style='width:346.2pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>0</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:5'>
    <td width=126 valign=top style='width:94.8pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>Level</p>
    </td>
    <td width=462 valign=top style='width:346.2pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>30</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:6'>
    <td width=126 valign=top style='width:94.8pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>Directory_</p>
    </td>
    <td width=462 valign=top style='width:346.2pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>&nbsp;</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:7;mso-yfti-lastrow:yes'>
    <td width=126 valign=top style='width:94.8pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>Attributes</p>
    </td>
    <td width=462 valign=top style='width:346.2pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>8</p>
    </td>
   </tr>
  </table>
  
  <p class=MsoNormal style='margin-left:35.45pt'>It is important to create the
! new feature under the 'feaClient' feature, which will ensure that the
! configuration file will be installed when the client binaries are installed.</p>
  
  <p class=MsoNormal style='margin-left:35.45pt'>Setting 'Display' to 0 will hide
! this feature from the feature selection dialog during an interactive
! installation.&nbsp; A value of 30 for 'Level' allows this feature to be
! installed by default (on a 'Typical' installation).</p>
! 
! <p class=MsoNormal style='margin-left:35.45pt'>The 'Attributes' value is
! msidbFeatureAttributesDisallowAdvertise (8), which is set on all features in
! the OpenAFS MSI.&nbsp; The OpenAFS MSI is not designed for an advertised
! installation.</p>
  
  <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt'>4.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span>Join the component and the feature.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>4.1.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp; </span>Select
! the 'FeatureComponents' table.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>4.2.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp; </span>Add a
! new row with the following values:</p>
  
! <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
!  style='margin-left:40.1pt;border-collapse:collapse;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>Feature</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border:solid windowtext 1.0pt;
    border-left:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>fea_my_CellServDB</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:1;mso-yfti-lastrow:yes'>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>Component</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>cmf_my_CellServDB</p>
    </td>
   </tr>
  </table>
  
  <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt'>5.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span>Add an entry to the 'File' table.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>5.1.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp; </span>Select
! the 'File' table.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>5.2.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp; </span>Add a
! new row with the following values:</p>
  
! <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
!  style='margin-left:40.1pt;border-collapse:collapse;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>File</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border:solid windowtext 1.0pt;
    border-left:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>fil_my_CellServDB</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:1'>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>Component_</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>cmf_my_CellServDB</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:2'>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>FileName</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>CellServDB</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:3'>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>FileSize</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>(enter file size here)</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:4'>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>Attributes</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>8192</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:5;mso-yfti-lastrow:yes'>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>Sequence</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>1000</p>
    </td>
   </tr>
  </table>
  
! <p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! &nbsp;&nbsp;&nbsp; (leave other fields blank)</p>
  
  <p class=MsoNormal style='margin-left:35.45pt'>The 'Attributes' value is
! msidbFileAttributesNonCompressed (8192).&nbsp; This is because we will be
! placing this file in the same directory as the MSI instead of embedding the
! file in it.&nbsp; Transforms do not support updating compressed sources or
! adding new cabinet streams.</p>
  
  <p class=MsoNormal style='margin-left:35.45pt'>Finally, the 'Sequence' value of
! 1000 will be used later to distinguish the file as being in a separate source
! location than the other files in the MSI.</p>
  
  <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt'>6.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span>Set a media source for the file.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>6.1.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp; </span>Select
! the 'Media' table.</p>
  
  <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt'>6.2.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp; </span>Add a
! row with the following values :</p>
  
! <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0
!  style='margin-left:40.1pt;border-collapse:collapse;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>DiskId</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border:solid windowtext 1.0pt;
    border-left:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>2</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:1;mso-yfti-lastrow:yes'>
    <td width=126 valign=top style='width:94.5pt;border:solid windowtext 1.0pt;
    border-top:none;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>LastSequence</p>
    </td>
    <td width=462 valign=top style='width:346.5pt;border-top:none;border-left:
    none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
    padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=preformattedtext>1000</p>
    </td>
   </tr>
  </table>
  
! <p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! &nbsp;&nbsp;&nbsp; (leave other fields blank)</p>
  
  <p class=MsoNormal style='margin-left:35.45pt'>The sequence number of 1000
  designates this as the media source for the newly added file.</p>
  
  <h4><a name="_Toc139993185"></a><a name="_Toc126872262"></a><a
! name="_Toc115416193"></a><a name="_2.3.1_Components_for_Configuration_"></a>7.2.3.1
  Components for Configuration Files</h4>
  
! <p class=preformattedtext style='text-indent:35.45pt'>CellServDB:
  'cpf_CellServDB' (ID {D5BA4C15-DBEC-4292-91FC-B54C30F24F2A})</p>
  
! <h3><a name="_Toc115416194"></a><a name="_Toc139993186"></a><a
! name="_Toc126872263"></a><span style='mso-bookmark:_Toc115416194'>7.2.4 Adding
! Domain Specific Registry Keys</span></h3>
  
  <p class=MsoNormal>Following is an example for adding domain specific registry
  keys.</p>
  
! <p class=MsoNormal>&nbsp;&nbsp;&nbsp; Refer to <a
! href="#_Appendix_A:_Registry_Values">Appendix A</a> section 2.1 for more
! information.</p>
! 
! <p class=MsoNormal>&nbsp;&nbsp;&nbsp; Columns that are unspecified should be left
! empty.</p>
! 
! <p class=MsoNormal>&nbsp;&nbsp;&nbsp; We create a new feature and component to
! hold the new registry keys.</p>
! 
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp; 'Feature' table:</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:1'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp;
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (new row)<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Feature&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
!   'feaDomainKeys'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Feature
!   Parent : 'feaClient'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Display&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Level&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 30<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Attributes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 10</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:2'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp; 'Component' table:</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:3'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp;
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (new row)<br>
!   &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Component&nbsp;&nbsp;&nbsp;&nbsp; : 'rcm_DomainKeys'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   ComponentId&nbsp; : '{4E3FCBF4-8BE7-40B2-A108-C47CF743C627}'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Directory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 'TARGETDIR'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Attributes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 4<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   KeyPath&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 'reg_domkey0'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:4'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp; 'FeatureComponents' table:</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:5'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp;
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (new row)<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Feature&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
!   'feaDomainKeys'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Component&nbsp;&nbsp;&nbsp;&nbsp; : 'rcm_DomainKeys'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:6'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp; 'Registry' table:</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:7'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   (new row)<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Registry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
!   'reg_domkey0'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 2<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 'SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Component&nbsp;&nbsp;&nbsp;&nbsp; : 'rcm_DomainKeys'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:8'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   (new row)<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Registry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
!   'reg_domkey1'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 2<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 'SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : '*'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Component&nbsp;&nbsp;&nbsp;&nbsp; : 'rcm_DomainKeys'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:9'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   (new row)<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Registry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
!   'reg_domkey2'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 2<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 'SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\ATHENA.MIT.EDU'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : '*'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Component&nbsp;&nbsp;&nbsp;&nbsp; : 'rcm_DomainKeys'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:10'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   (new row)<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Registry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
!   'reg_domkey3'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 2<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   :
    'SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\ATHENA.MIT.EDU'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 'LogonOptions'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 1<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Component&nbsp;&nbsp;&nbsp;&nbsp; : 'rcm_DomainKeys'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:11'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   (new row)<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Registry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
!   'reg_domkey4'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 2<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   :
!   SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : '*'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Component&nbsp;&nbsp;&nbsp;&nbsp; : 'rcm_DomainKeys'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:12'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   (new row)<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Registry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
!   'reg_domkey5'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 2<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 'SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 'LogonOptions'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 0<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Component&nbsp;&nbsp;&nbsp;&nbsp; : 'rcm_DomainKeys'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:13;mso-yfti-lastrow:yes'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal style='margin-bottom:12.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   (new row)<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Registry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
!   'reg_domkey6'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 2<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   :
    'SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 'FailLoginsSilently'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 1<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Component&nbsp;&nbsp;&nbsp;&nbsp; : 'rcm_DomainKeys'</p>
    </td>
   </tr>
  </table>
***************
*** 3003,3162 ****
  (enable integrated logon) and 'LOCALHOST' (disable integrated logon and fail
  logins silently).</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993187"></a><a
! name="_Toc126872264"></a><a name="_Toc115416195">7.2.5 Adding Site Specific
! Freelance Registry Keys</a></h3>
  
  <p class=MsoNormal>Following is an example for adding site specific Freelance
  registry keys to pre-populate the Mountpoints and Symlinks in the fake root.afs
  volume.</p>
  
! <p class=MsoNormal>    Columns that are unspecified should be left empty.</p>
  
! <p class=MsoNormal>    We create a new feature and component to hold the new
! registry keys.</p>
  
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>    'Feature' table:</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>            (new row)<br>
!             Feature            : 'feaFreelanceKeys'<br>
!             Feature Parent : 'feaClient'<br>
!             Display           : 0<br>
!             Level               : 30<br>
!             Attributes        : 10</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>    'Component' table:</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>            (new row)<br>
!               Component     : 'rcm_FreelanceKeys'<br>
!             ComponentId  : '{4E3B3CBF4-9AE7-40C3-7B09-C48CF842C583}'<br>
!             Directory         : 'TARGETDIR'<br>
!             Attributes        : 4<br>
!             KeyPath          : 'reg_freekey0'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>    'FeatureComponents' table:</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>            (new row)<br>
!             Feature            : 'feaFreelanceKeys'<br>
!             Component     : 'rcm_FreelanceKeys'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>    'Registry' table:</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>            (new row)<br>
!             Registry          : 'reg_freekey0'<br>
!             Root                : 2<br>
!             Key                 : 'SOFTWARE\OpenAFS\Client\Freelance'<br>
!             Component     : 'rcm_FreelanceKeys'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>            (new row)<br>
!             Registry          : 'reg_freekey1'<br>
!             Root                : 2<br>
!             Key                 : 'SOFTWARE\OpenAFS\Client\Freelance'<br>
!             Name              : '0'<br>
!               Value              : 'athena.mit.edu#athena.mit.edu:root.cell.'<br>
!             Component     : 'rcm_FreelanceKeys'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>            (new row)<br>
!             Registry          : 'reg_freekey2'<br>
!             Root                : 2<br>
!             Key                 : 'SOFTWARE\OpenAFS\Client\Freelance'<br>
!             Name              : '1'<br>
!               Value              : '.athena.mit.edu%athena.mit.edu:root.cell.'<br>
!             Component     : 'rcm_FreelanceKeys'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>            (new row)<br>
!             Registry          : 'reg_freekey3'<br>
!             Root                : 2<br>
!             Key                 : 'SOFTWARE\OpenAFS\Client\Freelance\Symlinks'<br>
!             Component     : 'rcm_FreelanceKeys'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>            (new row)<br>
!             Registry          : 'reg_freekey4'<br>
!             Root                : 2<br>
!             Key                 : 'SOFTWARE\OpenAFS\Client\Freelance\Symlinks'<br>
!             Name              : '0'<br>
!               Value              : 'athena:athena.mit.edu.'<br>
!             Component     : 'rcm_FreelanceKeys'</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>            (new row)<br>
!             Registry          : 'reg_freekey5'<br>
!             Root                : 2<br>
!             Key                 : 'SOFTWARE\OpenAFS\Client\Freelance\Symlinks'<br>
!             Name              : '1'<br>
!               Value              : '.athena:.athena.mit.edu.'<br>
!             Component     : 'rcm_FreelanceKeys'</p>
    </td>
   </tr>
  </table>
  
  <p class=MsoNormal>The example adds a read-only mountpoint to the
! athena.mit.edu cell's root.afs volume as well as a read-write mountpoint. 
  Aliases are also provided using symlinks.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993188"></a><a
! name="_Toc126872265"></a><a name="_Toc115417101"></a><a name="_Toc115416196"></a><a
! name="_Ref115275867">7.3 Additional Resources</a></h2>
  
  <p class=MsoNormal>If you want to add registry keys or files you need to create
! new components and features for those.  Refer to the Windows Platform SDK for
! details.</p>
  
  <p class=MsoNormal>It is beyond the scope of this document to provide a
! comprehensive overview of how to add new resources through a transform.  Please
! refer to the &quot;Windows Installer&quot; documentation for details.  The relevant
! section is at :</p>
  
  <p class=MsoNormal>http://msdn.microsoft.com/library/en-us/msi/setup/using_transforms_to_add_resources.asp</p>
  
  <p class=MsoNormal>A sample walkthrough of adding a new configuration file is
  in section 2.3.</p>
  
! <p class=MsoNormal>Add new features under the 'feaClient' or 'feaServer' as appropriate
! and set the 'Level' column for those features to equal the 'Level' for their
! parent features for consistency.  Note that none of the features in the OpenAFS
! for Windows MSI package are designed to be installed to run from 'source' or
! 'advertised'.  It is recommended that you set
  'msidbFeatureAttributesFavorLocal' (0), 'msidbFeatureAttributesFollowParent'
! (2) and 'msidbFeatureAttributesDisallowAdvertise' (8) attributes for new features.</p>
  
  <p class=MsoNormal>If you are creating new components, retain the same
  component GUID when creating new transforms against new releases of the OpenAFS
--- 3509,3752 ----
  (enable integrated logon) and 'LOCALHOST' (disable integrated logon and fail
  logins silently).</p>
  
! <h3><a name="_Toc115416195"></a><a name="_Toc139993187"></a><a
! name="_Toc126872264"></a><span style='mso-bookmark:_Toc115416195'>7.2.5 Adding
! Site Specific Freelance Registry Keys</span></h3>
  
  <p class=MsoNormal>Following is an example for adding site specific Freelance
  registry keys to pre-populate the Mountpoints and Symlinks in the fake root.afs
  volume.</p>
  
! <p class=MsoNormal>&nbsp;&nbsp;&nbsp; Columns that are unspecified should be
! left empty.</p>
  
! <p class=MsoNormal>&nbsp;&nbsp;&nbsp; We create a new feature and component to
! hold the new registry keys.</p>
  
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp; 'Feature' table:</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:1'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp;
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (new row)<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Feature&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
!   'feaFreelanceKeys'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Feature
!   Parent : 'feaClient'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Display&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 0<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Level&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 30<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Attributes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 10</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:2'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp; 'Component' table:</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:3'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp;
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (new row)<br>
!   &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Component&nbsp;&nbsp;&nbsp;&nbsp; : 'rcm_FreelanceKeys'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   ComponentId&nbsp; : '{4E3B3CBF4-9AE7-40C3-7B09-C48CF842C583}'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Directory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 'TARGETDIR'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Attributes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 4<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   KeyPath&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
!   'reg_freekey0'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:4'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp; 'FeatureComponents' table:</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:5'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp;
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (new row)<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Feature&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
!   'feaFreelanceKeys'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Component&nbsp;&nbsp;&nbsp;&nbsp; : 'rcm_FreelanceKeys'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:6'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp; 'Registry' table:</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:7'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   (new row)<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Registry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
!   'reg_freekey0'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 2<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 'SOFTWARE\OpenAFS\Client\Freelance'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Component&nbsp;&nbsp;&nbsp;&nbsp; : 'rcm_FreelanceKeys'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:8'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   (new row)<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Registry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
!   'reg_freekey1'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 2<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 'SOFTWARE\OpenAFS\Client\Freelance'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : '0'<br>
!   &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   &nbsp;&nbsp; : 'athena.mit.edu#athena.mit.edu:root.cell.'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Component&nbsp;&nbsp;&nbsp;&nbsp;
!   : 'rcm_FreelanceKeys'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:9'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   (new row)<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Registry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
!   'reg_freekey2'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 2<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 'SOFTWARE\OpenAFS\Client\Freelance'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : '1'<br>
!   &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   &nbsp;&nbsp; : '.athena.mit.edu%athena.mit.edu:root.cell.'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Component&nbsp;&nbsp;&nbsp;&nbsp; : 'rcm_FreelanceKeys'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:10'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   (new row)<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Registry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
!   'reg_freekey3'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 2<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 'SOFTWARE\OpenAFS\Client\Freelance\Symlinks'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Component&nbsp;&nbsp;&nbsp;&nbsp; : 'rcm_FreelanceKeys'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:11'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   (new row)<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Registry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :
!   'reg_freekey4'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 2<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 'SOFTWARE\OpenAFS\Client\Freelance\Symlinks'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : '0'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   &nbsp;&nbsp; : 'athena:athena.mit.edu.'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Component&nbsp;&nbsp;&nbsp;&nbsp; : 'rcm_FreelanceKeys'</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:12;mso-yfti-lastrow:yes'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   (new row)<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Registry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 'reg_freekey5'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 2<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : 'SOFTWARE\OpenAFS\Client\Freelance\Symlinks'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   : '1'<br>
!   &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Value&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   &nbsp;&nbsp; : '.athena:.athena.mit.edu.'<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   Component&nbsp;&nbsp;&nbsp;&nbsp; : 'rcm_FreelanceKeys'</p>
    </td>
   </tr>
  </table>
  
  <p class=MsoNormal>The example adds a read-only mountpoint to the
! athena.mit.edu cell's root.afs volume as well as a read-write mountpoint.&nbsp;
  Aliases are also provided using symlinks.</p>
  
! <h2><a name="_Ref115275867"></a><a name="_Toc139993188"></a><a
! name="_Toc126872265"></a><a name="_Toc115417101"></a><a name="_Toc115416196"></a><span
! style='mso-bookmark:_Ref115275867'>7.3 Additional Resources</span></h2>
  
  <p class=MsoNormal>If you want to add registry keys or files you need to create
! new components and features for those.&nbsp; Refer to the Windows Platform SDK
! for details.</p>
  
  <p class=MsoNormal>It is beyond the scope of this document to provide a
! comprehensive overview of how to add new resources through a transform.&nbsp;
! Please refer to the &quot;Windows Installer&quot; documentation for
! details.&nbsp; The relevant section is at :</p>
  
  <p class=MsoNormal>http://msdn.microsoft.com/library/en-us/msi/setup/using_transforms_to_add_resources.asp</p>
  
  <p class=MsoNormal>A sample walkthrough of adding a new configuration file is
  in section 2.3.</p>
  
! <p class=MsoNormal>Add new features under the 'feaClient' or 'feaServer' as
! appropriate and set the 'Level' column for those features to equal the 'Level'
! for their parent features for consistency.&nbsp; Note that none of the features
! in the OpenAFS for Windows MSI package are designed to be installed to run from
! 'source' or 'advertised'.&nbsp; It is recommended that you set
  'msidbFeatureAttributesFavorLocal' (0), 'msidbFeatureAttributesFollowParent'
! (2) and 'msidbFeatureAttributesDisallowAdvertise' (8) attributes for new
! features.</p>
  
  <p class=MsoNormal>If you are creating new components, retain the same
  component GUID when creating new transforms against new releases of the OpenAFS
***************
*** 3166,3271 ****
  ORCA.EXE you can generate a transform with MSITRAN.EXE as follows :</p>
  
  <p class=MsoNormal>(Modified MSI package is 'openafs-en_US_new.msi' and the
! original MSI package is 'openafs-en_US.msi'.  Generates transform 'openafs-transform.mst')</p>
  
! <p class=MsoNormal>    &gt; msitran.exe -g openafs-en_US.msi
  openafs-en_US_new.msi openafs-transform.mst</p>
  
  <p class=MsoNormal>See the Platform SDK documentation for information on
  command line options for MSITRAN.EXE.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993189"></a><a
! name="_Toc126872266"></a><a name="_Toc115417102"></a><a name="_Toc115416197">7.4.
! Upgrades</a></h2>
  
  <p class=MsoNormal>The MSI package is designed to uninstall previous versions
! of OpenAFS for Windows during installation.  Note that it doesn't directly
! upgrade an existing installation.  This is intentional and ensures that
  development releases which do not have strictly increasing version numbers are
  properly upgraded.</p>
  
! <p class=MsoNormal>Versions of OpenAFS that are upgraded by the MSI package are:</p>
  
  <p class=MsoNormal style='margin-left:36.0pt;text-indent:-18.0pt'>1)<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>OpenAFS
! MSI package<br>
  Upgrade code {6823EEDD-84FC-4204-ABB3-A80D25779833}<br>
  Up to current release</p>
  
  <p class=MsoNormal style='margin-left:36.0pt;text-indent:-18.0pt'>2)<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>MIT's
! Transarc AFS MSI package<br>
  Upgrade code {5332B94F-DE38-4927-9EAB-51F4A64193A7}<br>
  Up to version 3.6.2</p>
  
  <p class=MsoNormal style='margin-left:36.0pt;text-indent:-18.0pt'>3)<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>OpenAFS
! NSIS package<br>
  All versions</p>
  
  <p class=MsoNormal>Note that versions of the OpenAFS NSIS package prior to
! 1.3.65 had a bug where it couldn't be uninstalled properly in unattended mode. 
! Therefore the MSI package will not try to uninstall an OpenAFS NSIS package if
! running unattended.  This means that group policy based deployments will fail
! on machines that have the OpenAFS NSIS package installed.</p>
  
  <p class=MsoNormal>If you have used a different MSI package to install OpenAFS
! and wish to upgrade it you can author rows into the 'Upgrade' table as described
! in the Platform SDK.</p>
  
  <p class=MsoNormal>When performing an upgrade with msiexec.exe execute the MSI
  with the repair options &quot;vomus&quot;.</p>
  
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993190"></a><a
! name="_Toc126872267"></a><a name="_Toc115417116"></a><a name="_Toc115417103"></a><a
! name="_Toc115416198"></a><a name="_Appendix_A:_Registry_Values"></a>Appendix A:
! Registry Values</h1>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993191"></a><a
! name="_Toc126872268"></a><a name="_Toc115417104"></a><a name="_Toc115416199">A.1.
! Service parameters</a></h2>
  
  <p class=MsoBodyText>The service parameters primarily affect the behavior of
  the AFS client service (afsd_service.exe).</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993192"></a><a
! name="_Toc126872269"></a><a name="_Toc115416200">Regkey:<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></h3>
! 
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr style='height:145.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:145.25pt'>
!   <h5><a name="_Toc139993193"></a><a name="_Toc126872270"></a><a
!   name="_Toc115416201">Value: LANadapter</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: -1<br>
    Variable: LANadapter</p>
!   <p class=MsoBodyText>LAN adapter number to use.  This is the lana number of
!   the LAN adapter that the SMB server should bind to.  If unspecified or set to
!   -1, a LAN adapter with named 'AFS' or a loopback adapter will be selected. 
!   If neither are present, then all available adapters will be bound to.  When
!   binding to a non-loopback adapter, the NetBIOS name hostname%-AFS' will be
!   used (where %hostname% is the NetBIOS name of the host truncated to 11
!   characters). Otherwise, the NetBIOS name will be 'AFS'.</p>
    </td>
   </tr>
!  <tr style='height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
    <h5><a name="_Toc139993194"></a><a name="_Toc126872271"></a><a
!   name="_Toc115416202"></a><a name="_Value___: CacheSize"></a>Value: CacheSize</h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 98304 (CM_CONFIGDEFAULT_CACHESIZE)<br>
    Variable: cm_initParams.cacheSize</p>
    <p class=MsoBodyText>Size of the AFS cache in 1k blocks.</p>
    </td>
   </tr>
!  <tr style='height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc139993195"></a><a name="_Toc126872272"></a><a
!   name="_Toc115416203">Value: ChunkSize</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 17 (CM_CONFIGDEFAULT_CHUNKSIZE)<br>
    Variable: cm_logChunkSize (cm_chunkSize = 1 &lt;&lt; cm_logChunkSize)</p>
--- 3756,3868 ----
  ORCA.EXE you can generate a transform with MSITRAN.EXE as follows :</p>
  
  <p class=MsoNormal>(Modified MSI package is 'openafs-en_US_new.msi' and the
! original MSI package is 'openafs-en_US.msi'.&nbsp; Generates transform
! 'openafs-transform.mst')</p>
  
! <p class=MsoNormal>&nbsp;&nbsp;&nbsp; &gt; msitran.exe -g openafs-en_US.msi
  openafs-en_US_new.msi openafs-transform.mst</p>
  
  <p class=MsoNormal>See the Platform SDK documentation for information on
  command line options for MSITRAN.EXE.</p>
  
! <h2><a name="_Toc115416197"></a><a name="_Toc139993189"></a><a
! name="_Toc126872266"></a><a name="_Toc115417102"></a><span style='mso-bookmark:
! _Toc115416197'>7.4. Upgrades</span></h2>
  
  <p class=MsoNormal>The MSI package is designed to uninstall previous versions
! of OpenAFS for Windows during installation.&nbsp; Note that it doesn't directly
! upgrade an existing installation.&nbsp; This is intentional and ensures that
  development releases which do not have strictly increasing version numbers are
  properly upgraded.</p>
  
! <p class=MsoNormal>Versions of OpenAFS that are upgraded by the MSI package
! are:</p>
  
  <p class=MsoNormal style='margin-left:36.0pt;text-indent:-18.0pt'>1)<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span>OpenAFS MSI package<br>
  Upgrade code {6823EEDD-84FC-4204-ABB3-A80D25779833}<br>
  Up to current release</p>
  
  <p class=MsoNormal style='margin-left:36.0pt;text-indent:-18.0pt'>2)<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span>MIT's Transarc AFS MSI package<br>
  Upgrade code {5332B94F-DE38-4927-9EAB-51F4A64193A7}<br>
  Up to version 3.6.2</p>
  
  <p class=MsoNormal style='margin-left:36.0pt;text-indent:-18.0pt'>3)<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span>OpenAFS NSIS package<br>
  All versions</p>
  
  <p class=MsoNormal>Note that versions of the OpenAFS NSIS package prior to
! 1.3.65 had a bug where it couldn't be uninstalled properly in unattended
! mode.&nbsp; Therefore the MSI package will not try to uninstall an OpenAFS NSIS
! package if running unattended.&nbsp; This means that group policy based deployments
! will fail on machines that have the OpenAFS NSIS package installed.</p>
  
  <p class=MsoNormal>If you have used a different MSI package to install OpenAFS
! and wish to upgrade it you can author rows into the 'Upgrade' table as
! described in the Platform SDK.</p>
  
  <p class=MsoNormal>When performing an upgrade with msiexec.exe execute the MSI
  with the repair options &quot;vomus&quot;.</p>
  
! <h1><a name="_Toc139993190"></a><a name="_Toc126872267"></a><a
! name="_Toc115417116"></a><a name="_Toc115417103"></a><a name="_Toc115416198"></a><a
! name="_Appendix_A:_Registry_Values"></a>Appendix A: Registry Values</h1>
! 
! <h2><a name="_Toc115416199"></a><a name="_Toc139993191"></a><a
! name="_Toc126872268"></a><a name="_Toc115417104"></a><span style='mso-bookmark:
! _Toc115416199'>A.1. Service parameters</span></h2>
  
  <p class=MsoBodyText>The service parameters primarily affect the behavior of
  the AFS client service (afsd_service.exe).</p>
  
! <h3><a name="_Toc115416200"></a><a name="_Toc139993192"></a><a
! name="_Toc126872269"></a><span style='mso-bookmark:_Toc115416200'>Regkey:<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</span></h3>
! 
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;height:145.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:145.25pt'>
!   <h5><a name="_Toc115416201"></a><a name="_Toc139993193"></a><a
!   name="_Toc126872270"></a><span style='mso-bookmark:_Toc115416201'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: LANadapter</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: -1<br>
    Variable: LANadapter</p>
!   <p class=MsoBodyText>LAN adapter number to use.&nbsp; This is the lana number
!   of the LAN adapter that the SMB server should bind to.&nbsp; If unspecified
!   or set to -1, a LAN adapter with named 'AFS' or a loopback adapter will be
!   selected.&nbsp; If neither are present, then all available adapters will be
!   bound to.&nbsp; When binding to a non-loopback adapter, the NetBIOS name
!   hostname%-AFS' will be used (where %hostname% is the NetBIOS name of the host
!   truncated to 11 characters). Otherwise, the NetBIOS name will be 'AFS'.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:1;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
    <h5><a name="_Toc139993194"></a><a name="_Toc126872271"></a><a
!   name="_Toc115416202"></a><a name="_Value___:_CacheSize"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: CacheSize<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 98304 (CM_CONFIGDEFAULT_CACHESIZE)<br>
    Variable: cm_initParams.cacheSize</p>
    <p class=MsoBodyText>Size of the AFS cache in 1k blocks.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:2;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416203"></a><a name="_Toc139993195"></a><a
!   name="_Toc126872272"></a><span style='mso-bookmark:_Toc115416203'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: ChunkSize</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 17 (CM_CONFIGDEFAULT_CHUNKSIZE)<br>
    Variable: cm_logChunkSize (cm_chunkSize = 1 &lt;&lt; cm_logChunkSize)</p>
***************
*** 3273,3283 ****
    is 2^cm_logChunkSize.</p>
    </td>
   </tr>
!  <tr style='height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc139993196"></a><a name="_Toc126872273"></a><a
!   name="_Toc115416204">Value: Daemons</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 2 (CM_CONFIGDEFAULT_DAEMONS)<br>
    Variable: numBkgD</p>
--- 3870,3882 ----
    is 2^cm_logChunkSize.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:3;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416204"></a><a name="_Toc139993196"></a><a
!   name="_Toc126872273"></a><span style='mso-bookmark:_Toc115416204'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: Daemons</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 2 (CM_CONFIGDEFAULT_DAEMONS)<br>
    Variable: numBkgD</p>
***************
*** 3285,3295 ****
    cm_BkgDaemon). (see cm_BkgDaemon in cm_daemon.c)</p>
    </td>
   </tr>
!  <tr style='height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc139993197"></a><a name="_Toc126872274"></a><a
!   name="_Toc115416205">Value: ServerThreads</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 25 (CM_CONFIGDEFAULT_SVTHREADS)<br>
    Variable: numSvThreads</p>
--- 3884,3896 ----
    cm_BkgDaemon). (see cm_BkgDaemon in cm_daemon.c)</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:4;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416205"></a><a name="_Toc139993197"></a><a
!   name="_Toc126872274"></a><span style='mso-bookmark:_Toc115416205'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: ServerThreads</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 25 (CM_CONFIGDEFAULT_SVTHREADS)<br>
    Variable: numSvThreads</p>
***************
*** 3297,3387 ****
    smb_Server). (see smb_Server in smb.c).</p>
    </td>
   </tr>
!  <tr style='height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc139993198"></a><a name="_Toc126872275"></a><a
!   name="_Toc115416206">Value: Stats</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 10000 (CM_CONFIGDEFAULT_STATS)<br>
    Variable: cm_initParams.nStatCaches</p>
    <p class=MsoBodyText>Cache configuration.</p>
    </td>
   </tr>
!  <tr style='height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
    <h5><a name="_Toc139993199"></a><a name="_Toc126872276"></a><a
!   name="_Toc115416207"></a><a name="_Value_:_LogoffPreserveTokens"></a>Value:
!   LogoffPreserveTokens</h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default : 0</p>
    <p class=MsoBodyText>If enabled (set to 1), the Logoff Event handler will not
!   attempt to delete the user's tokens  if the user's profile is stored outside
!   of AFS.</p>
    </td>
   </tr>
!  <tr style='height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc139993200"></a><a name="_Toc126872277"></a><a
!   name="_Toc115416208">Value: RootVolume</a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;root.afs&quot;<br>
    Variable: cm_rootVolumeName</p>
    <p class=MsoBodyText>Root volume name.</p>
    </td>
   </tr>
!  <tr style='height:145.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:145.25pt'>
    <h5><a name="_Toc139993201"></a><a name="_Toc126872278"></a><a
!   name="_Toc115416209"></a><a name="_Value_:_Mountroot"></a>Value: Mountroot</h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;/afs&quot;<br>
    Variable: cm_mountRoot</p>
!   <p class=MsoBodyText>Name of root mount point.  In symlinks, if a path starts
!   with cm_mountRoot, it is assumed that the path is absolute (as opposed to
!   relative) and is adjusted accordingly. Eg: if a path is specified as
    /afs/athena.mit.edu/foo/bar/baz and cm_mountRoot is &quot;/afs&quot;, then
!   the path is interpreted as \\afs\all\athena.mit.edu\foo\bar\baz.  If a path
!   does not start with with cm_mountRoot, the path is assumed to be relative and
!   suffixed to the reference directory (i.e. directory where the symlink exists)</p>
    </td>
   </tr>
!  <tr style='height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
    <h5><a name="_Toc139993202"></a><a name="_Toc126872279"></a><a
!   name="_Toc115416210"></a><a name="_Value_:_CachePath"></a>Value: CachePath</h5>
    <p class=MsoBodyText>Type: REG_SZ or REG_EXPAND_SZ<br>
    Default: &quot;%TEMP%\AFSCache&quot;<br>
    Variable: cm_CachePath</p>
!   <p class=MsoBodyText>Location of on-disk cache file.  The default is the
!   SYSTEM account's TEMP directory.  The attributes assigned to the file are
!   HIDDEN and SYSTEM.</p>
    </td>
   </tr>
!  <tr style='height:119.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:119.0pt'>
!   <h5><a name="_Toc139993203"></a><a name="_Toc126872280"></a><a
!   name="_Toc115416211">Value: NonPersistentCaching</a></h5>
    <p class=MsoBodyText>Type: DWORD [0..1]<br>
    Default: 0<br>
    Variable: buf_CacheType</p>
    <p class=MsoBodyText>When this registry value is set to a non-zero value, the
    CachePath value is ignored and the cache data is stored in the windows paging
!   file.  This prevents the use of persistent caching (when available) as well
!   as the ability to alter the size of the cache at runtime using the &quot;fs
!   setcachesize&quot; command.</p>
    </td>
   </tr>
!  <tr style='height:125.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:125.5pt'>
!   <h5><a name="_Toc139993204"></a><a name="_Toc126872281"></a><a
!   name="_Toc115416212">Value: ValidateCache</a></h5>
    <p class=MsoBodyText>Type: DWORD [0..2]<br>
    Default: 1<br>
    Variable: buf_CacheType</p>
--- 3898,3999 ----
    smb_Server). (see smb_Server in smb.c).</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:5;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416206"></a><a name="_Toc139993198"></a><a
!   name="_Toc126872275"></a><span style='mso-bookmark:_Toc115416206'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: Stats</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 10000 (CM_CONFIGDEFAULT_STATS)<br>
    Variable: cm_initParams.nStatCaches</p>
    <p class=MsoBodyText>Cache configuration.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:6;height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
    <h5><a name="_Toc139993199"></a><a name="_Toc126872276"></a><a
!   name="_Toc115416207"></a><a name="_Value_:_LogoffPreserveTokens"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: LogoffPreserveTokens<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default : 0</p>
    <p class=MsoBodyText>If enabled (set to 1), the Logoff Event handler will not
!   attempt to delete the user's tokens&nbsp; if the user's profile is stored
!   outside of AFS.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:7;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416208"></a><a name="_Toc139993200"></a><a
!   name="_Toc126872277"></a><span style='mso-bookmark:_Toc115416208'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: RootVolume</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;root.afs&quot;<br>
    Variable: cm_rootVolumeName</p>
    <p class=MsoBodyText>Root volume name.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:8;height:145.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:145.25pt'>
    <h5><a name="_Toc139993201"></a><a name="_Toc126872278"></a><a
!   name="_Toc115416209"></a><a name="_Value_:_Mountroot"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: Mountroot<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;/afs&quot;<br>
    Variable: cm_mountRoot</p>
!   <p class=MsoBodyText>Name of root mount point.&nbsp; In symlinks, if a path
!   starts with cm_mountRoot, it is assumed that the path is absolute (as opposed
!   to relative) and is adjusted accordingly. Eg: if a path is specified as
    /afs/athena.mit.edu/foo/bar/baz and cm_mountRoot is &quot;/afs&quot;, then
!   the path is interpreted as \\afs\all\athena.mit.edu\foo\bar\baz.&nbsp; If a
!   path does not start with with cm_mountRoot, the path is assumed to be
!   relative and suffixed to the reference directory (i.e. directory where the
!   symlink exists)</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:9;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
    <h5><a name="_Toc139993202"></a><a name="_Toc126872279"></a><a
!   name="_Toc115416210"></a><a name="_Value_:_CachePath"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: CachePath<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_SZ or REG_EXPAND_SZ<br>
    Default: &quot;%TEMP%\AFSCache&quot;<br>
    Variable: cm_CachePath</p>
!   <p class=MsoBodyText>Location of on-disk cache file.&nbsp; The default is the
!   SYSTEM account's TEMP directory.&nbsp; The attributes assigned to the file
!   are HIDDEN and SYSTEM.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:10;height:119.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:119.0pt'>
!   <h5><a name="_Toc115416211"></a><a name="_Toc139993203"></a><a
!   name="_Toc126872280"></a><span style='mso-bookmark:_Toc115416211'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: NonPersistentCaching</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD [0..1]<br>
    Default: 0<br>
    Variable: buf_CacheType</p>
    <p class=MsoBodyText>When this registry value is set to a non-zero value, the
    CachePath value is ignored and the cache data is stored in the windows paging
!   file.&nbsp; This prevents the use of persistent caching (when available) as
!   well as the ability to alter the size of the cache at runtime using the
!   &quot;fs setcachesize&quot; command.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:11;height:125.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:125.5pt'>
!   <h5><a name="_Toc115416212"></a><a name="_Toc139993204"></a><a
!   name="_Toc126872281"></a><span style='mso-bookmark:_Toc115416212'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: ValidateCache</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD [0..2]<br>
    Default: 1<br>
    Variable: buf_CacheType</p>
***************
*** 3392,3402 ****
    2 - Validation is performed at shutdown</p>
    </td>
   </tr>
!  <tr style='height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc139993205"></a><a name="_Toc126872282"></a><a
!   name="_Toc115416213">Value: TrapOnPanic</a></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: traceOnPanic</p>
--- 4004,4016 ----
    2 - Validation is performed at shutdown</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:12;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416213"></a><a name="_Toc139993205"></a><a
!   name="_Toc126872282"></a><span style='mso-bookmark:_Toc115416213'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: TrapOnPanic</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: traceOnPanic</p>
***************
*** 3404,3536 ****
    (breakpoint: _asm int 3).</p>
    </td>
   </tr>
!  <tr style='height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
    <h5><a name="_Toc139993206"></a><a name="_Toc126872283"></a><a
!   name="_Toc115416214"></a><a name="_Value___: NetbiosName"></a>Value:
!   NetbiosName</h5>
    <p class=MsoBodyText>Type: REG_EXPAND_SZ<br>
    Default: &quot;AFS&quot;<br>
    Variable: cm_NetbiosName</p>
    <p class=MsoBodyText>Specifies the NetBIOS name to be used when binding to a
!   Loopback adapter.  To provide the old behavior specify a value of 
    &quot;%COMPUTERNAME%-AFS&quot;.</p>
    </td>
   </tr>
!  <tr style='height:152.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:152.0pt'>
!   <h5><a name="_Toc139993207"></a><a name="_Toc126872284"></a><a
!   name="_Toc115416215">Value: IsGateway</a></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: isGateway</p>
    <p class=MsoBodyText>Select whether or not this AFS client should act as a
!   gateway.  If set and the NetBIOS name hostname-AFS is bound to a physical
!   NIC, other machines in the subnet can access AFS via SMB connections to
!   hostname-AFS.</p>
    <p class=MsoBodyText>When IsGateway is non-zero, the LAN adapter detection
!   code will avoid binding to a loopback adapter.  This will ensure that the NetBIOS
!   name will be of the form hostname-AFS instead of the value set by the
!   &quot;NetbiosName&quot; registry value.</p>
    </td>
   </tr>
!  <tr style='height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc139993208"></a><a name="_Toc126872285"></a><a
!   name="_Toc115416216">Value: ReportSessionStartups</a></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: reportSessionStartups</p>
    <p class=MsoBodyText>If enabled, all SMB sessions created are recorded in the
!   Application event log.  This also enables other events such as drive mappings
!   or various error types to be logged.</p>
    </td>
   </tr>
!  <tr style='height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
    <h5><a name="_Toc139993209"></a><a name="_Toc126872286"></a><a
!   name="_Toc115416217"></a><a name="_Value_:_TraceBufferSize"></a>Value:
!   TraceBufferSize</h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 5000 (CM_CONFIGDEFAULT_TRACEBUFSIZE)<br>
    Variable: traceBufSize</p>
    <p class=MsoBodyText>Number of entries to keep in trace log.</p>
    </td>
   </tr>
!  <tr style='height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
    <h5><a name="_Toc139993210"></a><a name="_Toc126872287"></a><a
!   name="_Toc115416218"></a><a name="_Value_:_SysName"></a>Value: SysName</h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;i386_nt40&quot;<br>
    Variable: cm_sysName</p>
!   <p class=MsoBodyText>Provides an initial value for &quot;fs sysname&quot;. 
!   The string can contain one or more replacement values for @sys in order of
!   preference separated by whitespace.</p>
    </td>
   </tr>
!  <tr style='height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
    <h5><a name="_Toc139993211"></a><a name="_Toc126872288"></a><a
!   name="_Toc115416219"></a><a name="_Value_:_SecurityLevel"></a>Value:
!   SecurityLevel</h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: cryptall</p>
    <p class=MsoBodyText>Enables encryption on RX calls.</p>
    </td>
   </tr>
!  <tr style='height:112.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:112.25pt'>
    <h5><a name="_Toc139993212"></a><a name="_Toc126872289"></a><a
!   name="_Toc115416220"></a><a name="_Value_:_UseDNS"></a>Value: UseDNS</h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 1<br>
    Variable: cm_dnsEnabled</p>
    <p class=MsoBodyText>Enables resolving volservers using AFSDB DNS queries.</p>
!   <p class=MsoBodyText>As of 1.3.60, this value is ignored as the DNS query
!   support utilizes the Win32 DNSQuery API which is available on Win2000 and
!   above.</p>
    </td>
   </tr>
!  <tr style='height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
    <h5><a name="_Toc139993213"></a><a name="_Toc126872290"></a><a
!   name="_Toc115416221"></a><a name="_Value_:_FreelanceClient"></a>Value:
!   FreelanceClient</h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: cm_freelanceEnabled</p>
    <p class=MsoBodyText>Enables freelance client.</p>
    </td>
   </tr>
!  <tr style='height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
    <h5><a name="_Toc139993214"></a><a name="_Toc126872291"></a><a
!   name="_Toc115416222"></a><a name="_Value_:_HideDotFiles"></a>Value:
!   HideDotFiles</h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 1<br>
    Variable: smb_hideDotFiles</p>
!   <p class=MsoBodyText>Enables marking dotfiles with the hidden attribute.  Dot
!   files are files whose name starts with a period (excluding &quot;.&quot; and
!   &quot;..&quot;).</p>
    </td>
   </tr>
!  <tr style='height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc139993215"></a><a name="_Toc126872292"></a><a
!   name="_Toc115416223">Value: MaxMpxRequests</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 50<br>
    Variable: smb_maxMpxRequests</p>
--- 4018,4157 ----
    (breakpoint: _asm int 3).</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:13;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
    <h5><a name="_Toc139993206"></a><a name="_Toc126872283"></a><a
!   name="_Toc115416214"></a><a name="_Value___:_NetbiosName"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: NetbiosName<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_EXPAND_SZ<br>
    Default: &quot;AFS&quot;<br>
    Variable: cm_NetbiosName</p>
    <p class=MsoBodyText>Specifies the NetBIOS name to be used when binding to a
!   Loopback adapter.&nbsp; To provide the old behavior specify a value of&nbsp;
    &quot;%COMPUTERNAME%-AFS&quot;.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:14;height:152.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:152.0pt'>
!   <h5><a name="_Toc115416215"></a><a name="_Toc139993207"></a><a
!   name="_Toc126872284"></a><span style='mso-bookmark:_Toc115416215'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: IsGateway</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: isGateway</p>
    <p class=MsoBodyText>Select whether or not this AFS client should act as a
!   gateway.&nbsp; If set and the NetBIOS name hostname-AFS is bound to a
!   physical NIC, other machines in the subnet can access AFS via SMB connections
!   to hostname-AFS.</p>
    <p class=MsoBodyText>When IsGateway is non-zero, the LAN adapter detection
!   code will avoid binding to a loopback adapter.&nbsp; This will ensure that
!   the NetBIOS name will be of the form hostname-AFS instead of the value set by
!   the &quot;NetbiosName&quot; registry value.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:15;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416216"></a><a name="_Toc139993208"></a><a
!   name="_Toc126872285"></a><span style='mso-bookmark:_Toc115416216'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value:
!   ReportSessionStartups</span></span><span style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: reportSessionStartups</p>
    <p class=MsoBodyText>If enabled, all SMB sessions created are recorded in the
!   Application event log.&nbsp; This also enables other events such as drive
!   mappings or various error types to be logged.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:16;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
    <h5><a name="_Toc139993209"></a><a name="_Toc126872286"></a><a
!   name="_Toc115416217"></a><a name="_Value_:_TraceBufferSize"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: TraceBufferSize<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 5000 (CM_CONFIGDEFAULT_TRACEBUFSIZE)<br>
    Variable: traceBufSize</p>
    <p class=MsoBodyText>Number of entries to keep in trace log.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:17;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
    <h5><a name="_Toc139993210"></a><a name="_Toc126872287"></a><a
!   name="_Toc115416218"></a><a name="_Value_:_SysName"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: SysName<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;i386_nt40&quot;<br>
    Variable: cm_sysName</p>
!   <p class=MsoBodyText>Provides an initial value for &quot;fs
!   sysname&quot;.&nbsp; The string can contain one or more replacement values
!   for @sys in order of preference separated by whitespace.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:18;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
    <h5><a name="_Toc139993211"></a><a name="_Toc126872288"></a><a
!   name="_Toc115416219"></a><a name="_Value_:_SecurityLevel"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: SecurityLevel<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: cryptall</p>
    <p class=MsoBodyText>Enables encryption on RX calls.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:19;height:112.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:112.25pt'>
    <h5><a name="_Toc139993212"></a><a name="_Toc126872289"></a><a
!   name="_Toc115416220"></a><a name="_Value_:_UseDNS"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: UseDNS<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 1<br>
    Variable: cm_dnsEnabled</p>
    <p class=MsoBodyText>Enables resolving volservers using AFSDB DNS queries.</p>
!   <p class=MsoBodyText>As of 1.3.60, this value is ignored as the DNS query support
!   utilizes the Win32 DNSQuery API which is available on Win2000 and above.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:20;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
    <h5><a name="_Toc139993213"></a><a name="_Toc126872290"></a><a
!   name="_Toc115416221"></a><a name="_Value_:_FreelanceClient"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: FreelanceClient<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: cm_freelanceEnabled</p>
    <p class=MsoBodyText>Enables freelance client.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:21;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
    <h5><a name="_Toc139993214"></a><a name="_Toc126872291"></a><a
!   name="_Toc115416222"></a><a name="_Value_:_HideDotFiles"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: HideDotFiles<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 1<br>
    Variable: smb_hideDotFiles</p>
!   <p class=MsoBodyText>Enables marking dotfiles with the hidden
!   attribute.&nbsp; Dot files are files whose name starts with a period
!   (excluding &quot;.&quot; and &quot;..&quot;).</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:22;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416223"></a><a name="_Toc139993215"></a><a
!   name="_Toc126872292"></a><span style='mso-bookmark:_Toc115416223'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: MaxMpxRequests</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 50<br>
    Variable: smb_maxMpxRequests</p>
***************
*** 3538,3559 ****
    made.</p>
    </td>
   </tr>
!  <tr style='height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc139993216"></a><a name="_Toc126872293"></a><a
!   name="_Toc115416224">Value: MaxVCPerServer</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 100<br>
    Variable: smb_maxVCPerServer</p>
    <p class=MsoBodyText>Maximum number of SMB virtual circuits.</p>
    </td>
   </tr>
!  <tr style='height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
    <h5><a name="_Toc139993217"></a><a name="_Toc126872294"></a><a
!   name="_Toc115416225"></a><a name="_Value_:_Cell"></a>Value: Cell</h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;<br>
    Variable: rootCellName</p>
--- 4159,4183 ----
    made.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:23;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416224"></a><a name="_Toc139993216"></a><a
!   name="_Toc126872293"></a><span style='mso-bookmark:_Toc115416224'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: MaxVCPerServer</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 100<br>
    Variable: smb_maxVCPerServer</p>
    <p class=MsoBodyText>Maximum number of SMB virtual circuits.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:24;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
    <h5><a name="_Toc139993217"></a><a name="_Toc126872294"></a><a
!   name="_Toc115416225"></a><a name="_Value_:_Cell"></a><span style='mso-fareast-font-family:
!   "Times New Roman"'>Value: Cell<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;<br>
    Variable: rootCellName</p>
***************
*** 3561,3571 ****
    be mounted in \\afs\all).</p>
    </td>
   </tr>
!  <tr style='height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc139993218"></a><a name="_Toc126872295"></a><a
!   name="_Toc115416226">Value: RxNoJumbo</a></h5>
    <p class=MsoBodyText>Type: DWORD {0,1}<br>
    Default: 0<br>
    Variable: rx_nojumbo</p>
--- 4185,4197 ----
    be mounted in \\afs\all).</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:25;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416226"></a><a name="_Toc139993218"></a><a
!   name="_Toc126872295"></a><span style='mso-bookmark:_Toc115416226'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: RxNoJumbo</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {0,1}<br>
    Default: 0<br>
    Variable: rx_nojumbo</p>
***************
*** 3573,3583 ****
    to send or receive RX jumbograms.</p>
    </td>
   </tr>
!  <tr style='height:124.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:124.75pt'>
    <h5><a name="_Toc139993219"></a><a name="_Toc126872296"></a><a
!   name="_Toc115416227"></a><a name="_Value_:_RxMaxMTU"></a>Value: RxMaxMTU</h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: -1<br>
    Variable: rx_mtu</p>
--- 4199,4210 ----
    to send or receive RX jumbograms.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:26;height:124.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:124.75pt'>
    <h5><a name="_Toc139993219"></a><a name="_Toc126872296"></a><a
!   name="_Toc115416227"></a><a name="_Value_:_RxMaxMTU"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: RxMaxMTU<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: -1<br>
    Variable: rx_mtu</p>
***************
*** 3587,3598 ****
    IPSec VPN client, this value must be set to 1264 or smaller.</p>
    </td>
   </tr>
!  <tr style='height:151.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:151.75pt'>
    <h5><a name="_Toc139993220"></a><a name="_Toc126872297"></a><a
!   name="_Toc115416228"></a><a name="_Value:_ConnDeadTimeout"></a>Value:
!   ConnDeadTimeout</h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 60 (seconds)<br>
    Variable: ConnDeadtimeout</p>
--- 4214,4225 ----
    IPSec VPN client, this value must be set to 1264 or smaller.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:27;height:151.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:151.75pt'>
    <h5><a name="_Toc139993220"></a><a name="_Toc126872297"></a><a
!   name="_Toc115416228"></a><a name="_Value:_ConnDeadTimeout"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: ConnDeadTimeout<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 60 (seconds)<br>
    Variable: ConnDeadtimeout</p>
***************
*** 3601,3633 ****
    [HKLM\SYSTEM\CurrentControlSet\Services\lanmanworkstation\parameters]
    SessTimeout</p>
    <p class=MsoBodyText>If the minimum SMB timeout is not specified the value is
!   45 seconds.  See <a
    href="http://support.microsoft.com/support/kb/articles/Q102/0/67.asp">http://support.microsoft.com:80/support/kb/articles/Q102/0/67.asp</a></p>
    </td>
   </tr>
!  <tr style='height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc139993221"></a><a name="_Toc126872298"></a><a
!   name="_Toc115416229">Value: HardDeadTimeout</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 120 (seconds)<br>
    Variable: HardDeadtimeout</p>
    <p class=MsoBodyText>The Hard Dead Time is enforced to be at least double the
!   ConnDeadTimeout.  The provides an opportunity for at least one retry.</p>
    </td>
   </tr>
!  <tr style='height:158.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:158.5pt'>
    <h5><a name="_Toc139993222"></a><a name="_Toc126872299"></a><a
!   name="_Toc115416230"></a><a name="_Value__:_TraceOption"></a>Value:
!   TraceOption</h5>
    <p class=MsoBodyText>Type: DWORD {0-15}<br>
    Default: 0</p>
!   <p class=MsoBodyText>Enables logging of debug output to the Windows Event Log.</p>
    <p class=MsoBodyText>Bit 0 enables logging of &quot;Logon Events&quot;
!   processed by the Network Provider and Winlogon Event Notification Handler.  </p>
    <p class=MsoBodyText>Bit 1 enables logging of events captured by the AFS
    Client Service.</p>
    <p class=MsoBodyText>Bit 2 enables real-time viewing of &quot;fs trace&quot;
--- 4228,4264 ----
    [HKLM\SYSTEM\CurrentControlSet\Services\lanmanworkstation\parameters]
    SessTimeout</p>
    <p class=MsoBodyText>If the minimum SMB timeout is not specified the value is
!   45 seconds.&nbsp; See <a
    href="http://support.microsoft.com/support/kb/articles/Q102/0/67.asp">http://support.microsoft.com:80/support/kb/articles/Q102/0/67.asp</a></p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:28;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416229"></a><a name="_Toc139993221"></a><a
!   name="_Toc126872298"></a><span style='mso-bookmark:_Toc115416229'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: HardDeadTimeout</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 120 (seconds)<br>
    Variable: HardDeadtimeout</p>
    <p class=MsoBodyText>The Hard Dead Time is enforced to be at least double the
!   ConnDeadTimeout.&nbsp; The provides an opportunity for at least one retry.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:29;height:158.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:158.5pt'>
    <h5><a name="_Toc139993222"></a><a name="_Toc126872299"></a><a
!   name="_Toc115416230"></a><a name="_Value__:_TraceOption"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: TraceOption<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {0-15}<br>
    Default: 0</p>
!   <p class=MsoBodyText>Enables logging of debug output to the Windows Event
!   Log.</p>
    <p class=MsoBodyText>Bit 0 enables logging of &quot;Logon Events&quot;
!   processed by the Network Provider and Winlogon Event Notification
!   Handler.&nbsp; </p>
    <p class=MsoBodyText>Bit 1 enables logging of events captured by the AFS
    Client Service.</p>
    <p class=MsoBodyText>Bit 2 enables real-time viewing of &quot;fs trace&quot;
***************
*** 3635,3714 ****
    <p class=MsoBodyText>Bit 3 enables &quot;fs trace&quot; logging on startup.</p>
    </td>
   </tr>
!  <tr style='height:98.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:98.5pt'>
!   <h5><a name="_Toc139993223"></a><a name="_Toc126872300"></a><a
!   name="_Toc115416231">Value: AllSubmount</a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1</p>
    <p class=MsoBodyText>Variable: allSubmount (smb.c)</p>
!   <p class=MsoBodyText>By setting this value to 0, the
!   &quot;\\NetbiosName\all&quot; mount point will not be created.  This allows
!   the read-write versions of root.afs to be hidden.</p>
    </td>
   </tr>
!  <tr style='height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
    <h5><a name="_Toc139993224"></a><a name="_Toc126872301"></a><a
!   name="_Toc115416232"></a><a name="_Value___: NoFindLanaByName"></a>Value:
!   NoFindLanaByName</h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0</p>
!   <p class=MsoBodyText>Disables the attempt to identity the network adapter to
!   use by looking for an adapter with a display name of &quot;AFS&quot;.</p>
    </td>
   </tr>
!  <tr style='height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
!   <h5><a name="_Toc139993225"></a><a name="_Toc126872302"></a><a
!   name="_Toc115416233">Value: MaxCPUs</a></h5>
    <p class=MsoBodyText>Type: DWORD {1..32} or {1..64} depending on the
    architecture<br>
    Default: &lt;no default&gt;</p>
    <p class=MsoBodyText>If this value is specified, afsd_service.exe will
    restrict itself to executing on the specified number of CPUs if there are a
!   greater number installed in the machine.  </p>
    </td>
   </tr>
!  <tr style='height:151.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:151.75pt'>
    <h5><a name="_Toc139993226"></a><a name="_Toc126872303"></a><a
!   name="_Toc115416234"></a><a name="_Value___: smbAuthType"></a>Value:
!   smbAuthType</h5>
    <p class=MsoBodyText>Type: DWORD {0..2}<br>
    Default: 2</p>
    <p class=MsoBodyText>If this value is specified, it defines the type of SMB
    authentication which must be present in order for the Windows SMB client to
!   connect to the AFS Client Service's SMB server.  The values are:</p>
    <p class=MsoBodyText>0 = No authentication required<br>
    1 = NTLM authentication required<br>
    2 = Extended (GSS SPNEGO) authentication required<br>
    The default is Extended authentication</p>
    </td>
   </tr>
!  <tr style='height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
    <h5><a name="_Toc139993227"></a><a name="_Toc126872304"></a><a
!   name="_Toc115416235"></a><a name="_Value___: MaxLogSize"></a>Value:
!   MaxLogSize</h5>
    <p class=MsoBodyText>Type: DWORD {0 .. MAXDWORD}<br>
    Default: 100K</p>
    <p class=MsoBodyText>This entry determines the maximum size of the
!   %WINDIR%\TEMP\afsd_init.log file.  If the file is larger than this value when
!   afsd_service.exe starts the file will be reset to 0 bytes.  If this value is
!   0, it means the file should be allowed to grow indefinitely.</p>
    </td>
   </tr>
!  <tr style='height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5><a name="_Toc139993228"></a><a name="_Toc126872305"></a><a
!   name="_Toc115416236">Value: FlushOnHibernate</a></h5>
    <p class=MsoBodyText>Type: DWORD {0,1}<br>
    Default: 1</p>
    <p class=MsoBodyText>If set, flushes all volumes before the machine goes on
--- 4266,4351 ----
    <p class=MsoBodyText>Bit 3 enables &quot;fs trace&quot; logging on startup.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:30;height:98.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:98.5pt'>
!   <h5><a name="_Toc115416231"></a><a name="_Toc139993223"></a><a
!   name="_Toc126872300"></a><span style='mso-bookmark:_Toc115416231'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: AllSubmount</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1</p>
    <p class=MsoBodyText>Variable: allSubmount (smb.c)</p>
!   <p class=MsoBodyText>By setting this value to 0, the &quot;\\NetbiosName\all&quot;
!   mount point will not be created.&nbsp; This allows the read-write versions of
!   root.afs to be hidden.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:31;height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
    <h5><a name="_Toc139993224"></a><a name="_Toc126872301"></a><a
!   name="_Toc115416232"></a><a name="_Value___:_NoFindLanaByName"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: NoFindLanaByName<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0</p>
!   <p class=MsoBodyText>Disables the attempt to identity the network adapter to use
!   by looking for an adapter with a display name of &quot;AFS&quot;.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:32;height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
!   <h5><a name="_Toc115416233"></a><a name="_Toc139993225"></a><a
!   name="_Toc126872302"></a><span style='mso-bookmark:_Toc115416233'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: MaxCPUs</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {1..32} or {1..64} depending on the
    architecture<br>
    Default: &lt;no default&gt;</p>
    <p class=MsoBodyText>If this value is specified, afsd_service.exe will
    restrict itself to executing on the specified number of CPUs if there are a
!   greater number installed in the machine.&nbsp; </p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:33;height:151.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:151.75pt'>
    <h5><a name="_Toc139993226"></a><a name="_Toc126872303"></a><a
!   name="_Toc115416234"></a><a name="_Value___:_smbAuthType"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: smbAuthType<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {0..2}<br>
    Default: 2</p>
    <p class=MsoBodyText>If this value is specified, it defines the type of SMB
    authentication which must be present in order for the Windows SMB client to
!   connect to the AFS Client Service's SMB server.&nbsp; The values are:</p>
    <p class=MsoBodyText>0 = No authentication required<br>
    1 = NTLM authentication required<br>
    2 = Extended (GSS SPNEGO) authentication required<br>
    The default is Extended authentication</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:34;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
    <h5><a name="_Toc139993227"></a><a name="_Toc126872304"></a><a
!   name="_Toc115416235"></a><a name="_Value___:_MaxLogSize"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: MaxLogSize<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {0 .. MAXDWORD}<br>
    Default: 100K</p>
    <p class=MsoBodyText>This entry determines the maximum size of the
!   %WINDIR%\TEMP\afsd_init.log file.&nbsp; If the file is larger than this value
!   when afsd_service.exe starts the file will be reset to 0 bytes.&nbsp; If this
!   value is 0, it means the file should be allowed to grow indefinitely.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:35;mso-yfti-lastrow:yes;height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5><a name="_Toc115416236"></a><a name="_Toc139993228"></a><a
!   name="_Toc126872305"></a><span style='mso-bookmark:_Toc115416236'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: FlushOnHibernate</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {0,1}<br>
    Default: 1</p>
    <p class=MsoBodyText>If set, flushes all volumes before the machine goes on
***************
*** 3717,3732 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993229"></a><a
! name="_Toc126872306"></a><a name="_Toc115416237">Regkey:<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters\GlobalAutoMapper]</a></h3>
! 
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr style='height:65.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.0pt'>
!   <h5><a name="_Toc139993230"></a><a name="_Toc126872307"></a><a
!   name="_Toc115416238">Value: &lt;Drive Letter:&gt; for example &quot;G:&quot;</a></h5>
    <p class=MsoBodyText>Type: REG_SZ</p>
    <p class=MsoBodyText>Specifies the submount name to be mapped by
    afsd_service.exe at startup to the provided drive letter.</p>
--- 4354,4374 ----
   </tr>
  </table>
  
! <h3><a name="_Toc115416237"></a><a name="_Toc139993229"></a><a
! name="_Toc126872306"></a><span style='mso-bookmark:_Toc115416237'>Regkey:<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters\GlobalAutoMapper]</span></h3>
! 
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
!   height:65.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.0pt'>
!   <h5><a name="_Toc115416238"></a><a name="_Toc139993230"></a><a
!   name="_Toc126872307"></a><span style='mso-bookmark:_Toc115416238'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: &lt;Drive
!   Letter:&gt; for example &quot;G:&quot;</span></span><span style='mso-fareast-font-family:
!   "Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_SZ</p>
    <p class=MsoBodyText>Specifies the submount name to be mapped by
    afsd_service.exe at startup to the provided drive letter.</p>
***************
*** 3734,3793 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993231"></a><a
! name="_Toc126872308"></a><a name="_Toc115416239">Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client]</a></h3>
! 
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr style='height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
    <h5><a name="_Toc139993232"></a><a name="_Toc126872309"></a><a
!   name="_Toc115416240"></a><a name="_Value___: CellServDBDir"></a>Value:
!   CellServDBDir</h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;not defined&gt;</p>
!   <p class=MsoBodyText>Specifies the directory containing the CellServDB file. 
!   When this value is not specified, the AFS Client install directory is used.</p>
    </td>
   </tr>
!  <tr style='height:145.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:145.25pt'>
    <h5><a name="_Toc139993233"></a><a name="_Toc126872310"></a><a
!   name="_Toc115416241"></a><a name="_Value___: VerifyServiceSignature"></a>Value:
!   VerifyServiceSignature</h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x1</p>
    <p class=MsoBodyText>This value can be used to disable the runtime
    verification of the digital signatures applied to afsd_service.exe and the
!   OpenAFS DLLs it loads.  This test is performed to verify that   the DLLs
!   which are loaded by afsd_service.exe are from the same distribution as
!   afsd_service.exe.  This is to prevent random errors caused when DLLs from one
!   distribution of AFS are loaded by another one.  This is not a security test. 
!   The reason for disabling this test is to free up additional memory which can
!   be used for a large cache size.</p>
    </td>
   </tr>
!  <tr style='height:105.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:105.5pt'>
    <h5><a name="_Toc139993234"></a><a name="_Toc126872311"></a><a
!   name="_Toc115416242"></a><a name="_Value___: IoctlDebug"></a>Value:
!   IoctlDebug</h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x0</p>
    <p class=MsoBodyText>This value can be used to debug the cause of pioctl()
!   failures.  Set a non-zero value and the pioctl() library will output status
!   information to stdout.  Executing command line tools such as tokens.exe,
!   fs.exe, etc can then be used to determine why the pioctl() call is failing. </p>
    </td>
   </tr>
!  <tr style='height:330.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:330.75pt'>
!   <h5><a name="_Toc139993235"></a><a name="_Toc126872312"></a><a
!   name="_Toc115416243">Value: MiniDumpType</a></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x0 (MiniDumpNormal)</p>
    <p class=MsoBodyText>This value is used to specify the type of minidump
--- 4376,4442 ----
   </tr>
  </table>
  
! <h3><a name="_Toc115416239"></a><a name="_Toc139993231"></a><a
! name="_Toc126872308"></a><span style='mso-bookmark:_Toc115416239'>Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client]</span></h3>
! 
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
    <h5><a name="_Toc139993232"></a><a name="_Toc126872309"></a><a
!   name="_Toc115416240"></a><a name="_Value___:_CellServDBDir"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: CellServDBDir<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;not defined&gt;</p>
!   <p class=MsoBodyText>Specifies the directory containing the CellServDB
!   file.&nbsp; When this value is not specified, the AFS Client install
!   directory is used.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:1;height:145.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:145.25pt'>
    <h5><a name="_Toc139993233"></a><a name="_Toc126872310"></a><a
!   name="_Toc115416241"></a><a name="_Value___:_VerifyServiceSignature"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value:
!   VerifyServiceSignature<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x1</p>
    <p class=MsoBodyText>This value can be used to disable the runtime
    verification of the digital signatures applied to afsd_service.exe and the
!   OpenAFS DLLs it loads.&nbsp; This test is performed to verify
!   that&nbsp;&nbsp; the DLLs which are loaded by afsd_service.exe are from the
!   same distribution as afsd_service.exe.&nbsp; This is to prevent random errors
!   caused when DLLs from one distribution of AFS are loaded by another
!   one.&nbsp; This is not a security test.&nbsp; The reason for disabling this
!   test is to free up additional memory which can be used for a large cache
!   size.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:2;height:105.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:105.5pt'>
    <h5><a name="_Toc139993234"></a><a name="_Toc126872311"></a><a
!   name="_Toc115416242"></a><a name="_Value___:_IoctlDebug"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: IoctlDebug<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x0</p>
    <p class=MsoBodyText>This value can be used to debug the cause of pioctl()
!   failures.&nbsp; Set a non-zero value and the pioctl() library will output
!   status information to stdout.&nbsp; Executing command line tools such as
!   tokens.exe, fs.exe, etc can then be used to determine why the pioctl() call
!   is failing. </p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:3;height:330.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:330.75pt'>
!   <h5><a name="_Toc115416243"></a><a name="_Toc139993235"></a><a
!   name="_Toc126872312"></a><span style='mso-bookmark:_Toc115416243'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: MiniDumpType</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x0 (MiniDumpNormal)</p>
    <p class=MsoBodyText>This value is used to specify the type of minidump
***************
*** 3795,3802 ****
    initiated is dump file is generated with the &quot;fs.exe minidump&quot;
    command.</p>
    <p class=MsoBodyText>Valid values are dependent on the version of DbgHelp.dll
!   installed on the machine.  See the Microsoft Developer Library for further
!   information.</p>
    <p class=MsoBodyText>MiniDumpNormal = 0x00000000,<br>
    MiniDumpWithDataSegs = 0x00000001,<br>
    MiniDumpWithFullMemory = 0x00000002,<br>
--- 4444,4451 ----
    initiated is dump file is generated with the &quot;fs.exe minidump&quot;
    command.</p>
    <p class=MsoBodyText>Valid values are dependent on the version of DbgHelp.dll
!   installed on the machine.&nbsp; See the Microsoft Developer Library for
!   further information.</p>
    <p class=MsoBodyText>MiniDumpNormal = 0x00000000,<br>
    MiniDumpWithDataSegs = 0x00000001,<br>
    MiniDumpWithFullMemory = 0x00000002,<br>
***************
*** 3814,3871 ****
    MiniDumpWithCodeSegs = 0x00002000</p>
    </td>
   </tr>
!  <tr style='height:138.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:138.25pt'>
    <h5><a name="_Toc139993236"></a><a name="_Toc126872313"></a><a
!   name="_Toc115416244"></a><a name="_Value___: StoreAnsiFilenames"></a>Value:
!   StoreAnsiFilenames</h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x0</p>
    <p class=MsoBodyText>This value can be used to force the AFS Client Service
    to store filenames using the Windows system's ANSI character set instead of
    the OEM Code Page character set which has traditionally been used by SMB file
!   systems.  </p>
    <p class=MsoBodyText>Note: The use of ANSI characters will render access to
!   files with 8-bit OEM file names unaccessible from Windows.  This option is of
!   use primarily when you wish to allow file names produced on Windows to be
    accessible from Latin-1 UNIX systems and vice versa.</p>
    </td>
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993237"></a><a
! name="_Toc126872314"></a><a name="_Toc115416245">Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client\CSCPolicy]</a></h3>
! 
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr style='height:112.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:112.0pt'>
!   <h5><a name="_Toc139993238"></a><a name="_Toc126872315"></a><a
!   name="_Toc115416246">Value: &quot;smb/cifs share name&quot;</a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText>This key is used to map SMB/CIFS shares to Client Side
    Caching (off-line access) policies. For each share one of the following
    policies may be used: &quot;manual&quot;, &quot;programs&quot;,
!   &quot;documents&quot;, &quot;disable&quot;.  </p>
    <p class=MsoBodyText>These values used to be stored in afsdsbmt.ini</p>
    </td>
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993239"></a><a
! name="_Toc126872316"></a><a name="_Toc115416247"></a><a
! name="_Regkey:_[HKLM\SOFTWARE\OpenAFS\Clie"></a>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client\Freelance]</h3>
  
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr style='height:138.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:138.5pt'>
!   <h5><a name="_Toc139993240"></a><a name="_Toc126872317"></a><a
!   name="_Toc115416248">Value: &quot;numeric value&quot;</a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText>This key is used to store dot terminated mount point
--- 4463,4527 ----
    MiniDumpWithCodeSegs = 0x00002000</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:4;mso-yfti-lastrow:yes;height:138.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:138.25pt'>
    <h5><a name="_Toc139993236"></a><a name="_Toc126872313"></a><a
!   name="_Toc115416244"></a><a name="_Value___:_StoreAnsiFilenames"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: StoreAnsiFilenames<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x0</p>
    <p class=MsoBodyText>This value can be used to force the AFS Client Service
    to store filenames using the Windows system's ANSI character set instead of
    the OEM Code Page character set which has traditionally been used by SMB file
!   systems.&nbsp; </p>
    <p class=MsoBodyText>Note: The use of ANSI characters will render access to
!   files with 8-bit OEM file names unaccessible from Windows.&nbsp; This option is
!   of use primarily when you wish to allow file names produced on Windows to be
    accessible from Latin-1 UNIX systems and vice versa.</p>
    </td>
   </tr>
  </table>
  
! <h3><a name="_Toc115416245"></a><a name="_Toc139993237"></a><a
! name="_Toc126872314"></a><span style='mso-bookmark:_Toc115416245'>Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client\CSCPolicy]</span></h3>
! 
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
!   height:112.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:112.0pt'>
!   <h5><a name="_Toc115416246"></a><a name="_Toc139993238"></a><a
!   name="_Toc126872315"></a><span style='mso-bookmark:_Toc115416246'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: &quot;smb/cifs share
!   name&quot;</span></span><span style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText>This key is used to map SMB/CIFS shares to Client Side
    Caching (off-line access) policies. For each share one of the following
    policies may be used: &quot;manual&quot;, &quot;programs&quot;,
!   &quot;documents&quot;, &quot;disable&quot;.&nbsp; </p>
    <p class=MsoBodyText>These values used to be stored in afsdsbmt.ini</p>
    </td>
   </tr>
  </table>
  
! <h3><a name="_Toc139993239"></a><a name="_Toc126872316"></a><a
! name="_Toc115416247"></a><a name="_Regkey:_[HKLM\SOFTWARE\OpenAFS\Clie"></a>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client\Freelance]</h3>
  
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
!   height:138.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:138.5pt'>
!   <h5><a name="_Toc115416248"></a><a name="_Toc139993240"></a><a
!   name="_Toc126872317"></a><span style='mso-bookmark:_Toc115416248'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: &quot;numeric
!   value&quot;</span></span><span style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText>This key is used to store dot terminated mount point
***************
*** 3878,3894 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993241"></a><a
! name="_Toc126872318"></a><a name="_Toc115416249"></a><a
! name="_Regkey:_[HKLM\SOFTWARE\OpenAFS\Clie_1"></a>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client\Freelance\Symlinks]</h3>
  
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr style='height:145.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:145.0pt'>
!   <h5><a name="_Toc139993242"></a><a name="_Toc126872319"></a><a
!   name="_Toc115416250">Value: &quot;numeric value&quot;</a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText>This key is used to store a dot terminated symlink
--- 4534,4553 ----
   </tr>
  </table>
  
! <h3><a name="_Toc139993241"></a><a name="_Toc126872318"></a><a
! name="_Toc115416249"></a><a name="_Regkey:_[HKLM\SOFTWARE\OpenAFS\Clie_1"></a>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client\Freelance\Symlinks]</h3>
  
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
!   height:145.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:145.0pt'>
!   <h5><a name="_Toc115416250"></a><a name="_Toc139993242"></a><a
!   name="_Toc126872319"></a><span style='mso-bookmark:_Toc115416250'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: &quot;numeric
!   value&quot;</span></span><span style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText>This key is used to store a dot terminated symlink
***************
*** 3902,3924 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993243"></a><a
! name="_Toc126872320"></a><a name="_Toc115416251">Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client\Submounts]</a></h3>
! 
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr style='height:171.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:171.75pt'>
!   <h5><a name="_Toc139993244"></a><a name="_Toc126872321"></a><a
!   name="_Toc115416252">Value: &quot;submount name&quot;</a></h5>
    <p class=MsoBodyText>Type: REG_EXPAND_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText>This key is used to store mappings of UNIX style AFS
!   paths to submount names which can be referenced as UNC paths.  For example
    the submount string “/athena.mit.edu/user/j/a/jaltman&quot; can be associated
!   with the submount name &quot;jaltman.home&quot;.  This can then be referenced
!   as the UNC path \\AFS\jaltman.home.</p>
    <p class=MsoBodyText>These values used to be stored in afsdsbmt.ini</p>
    <p class=MsoBodyText>NOTE: Submounts should no longer be used with OpenAFS.
    Use the Windows Explorer to create drive mappings to AFS UNC paths instead of
--- 4561,4587 ----
   </tr>
  </table>
  
! <h3><a name="_Toc115416251"></a><a name="_Toc139993243"></a><a
! name="_Toc126872320"></a><span style='mso-bookmark:_Toc115416251'>Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client\Submounts]</span></h3>
! 
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
!   height:171.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:171.75pt'>
!   <h5><a name="_Toc115416252"></a><a name="_Toc139993244"></a><a
!   name="_Toc126872321"></a><span style='mso-bookmark:_Toc115416252'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: &quot;submount
!   name&quot;</span></span><span style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_EXPAND_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText>This key is used to store mappings of UNIX style AFS
!   paths to submount names which can be referenced as UNC paths.&nbsp; For example
    the submount string “/athena.mit.edu/user/j/a/jaltman&quot; can be associated
!   with the submount name &quot;jaltman.home&quot;.&nbsp; This can then be
!   referenced as the UNC path \\AFS\jaltman.home.</p>
    <p class=MsoBodyText>These values used to be stored in afsdsbmt.ini</p>
    <p class=MsoBodyText>NOTE: Submounts should no longer be used with OpenAFS.
    Use the Windows Explorer to create drive mappings to AFS UNC paths instead of
***************
*** 3927,3990 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993245"></a><a
! name="_Toc126872322"></a><a name="_Toc115416253"></a><a
! name="_Regkey:_[HKLM\SOFTWARE\OpenAFS\Clie_2"></a>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client\Server Preferences\VLDB]</h3>
  
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr style='height:105.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:105.5pt'>
!   <h5><a name="_Toc139993246"></a><a name="_Toc126872323"></a><a
!   name="_Toc115416254">Value: &quot;hostname or ip address&quot;</a></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText>This key is used to specify a default set of VLDB server
    preferences. For each entry the value name will be either the IP address of a
!   server or a fully qualified domain name.  The value will be the ranking.  The
!   ranking will be adjusted by a random value between 0 and 256 prior to the
!   preference being set.</p>
    </td>
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993247"></a><a
! name="_Toc126872324"></a><a name="_Toc115416255">Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client\Server Preferences\File]</a></h3>
! 
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr style='height:105.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:105.5pt'>
!   <h5><a name="_Toc139993248"></a><a name="_Toc126872325"></a><a
!   name="_Toc115416256">Value: &quot;hostname or ip address&quot;</a></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText>This key is used to specify a default set of File server
    preferences. For each entry the value name will be either the IP address of a
!   server or a fully qualified domain name.  The value will be the ranking.  The
!   ranking will be adjusted by a random value between 0 and 256 prior to the
!   preference being set.</p>
    </td>
   </tr>
  </table>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993249"></a><a
! name="_Toc126872326"></a><a name="_Toc115417105"></a><a name="_Toc115416257">A.2.
! Integrated Logon Network provider parameters</a></h2>
  
  <p class=MsoBodyText>Affects the network provider (afslogon.dll).</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993250"></a><a
! name="_Toc126872327"></a><a name="_Toc115416258">Regkey: [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></h3>
! 
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr style='height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5><a name="_Toc139993251"></a><a name="_Toc126872328"></a><a
!   name="_Toc115416259">Value: FailLoginsSilently</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 0</p>
    <p class=MsoBodyText>Do not display message boxes if the login fails.</p>
--- 4590,4665 ----
   </tr>
  </table>
  
! <h3><a name="_Toc139993245"></a><a name="_Toc126872322"></a><a
! name="_Toc115416253"></a><a name="_Regkey:_[HKLM\SOFTWARE\OpenAFS\Clie_2"></a>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client\Server Preferences\VLDB]</h3>
  
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
!   height:105.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:105.5pt'>
!   <h5><a name="_Toc115416254"></a><a name="_Toc139993246"></a><a
!   name="_Toc126872323"></a><span style='mso-bookmark:_Toc115416254'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: &quot;hostname or ip
!   address&quot;</span></span><span style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText>This key is used to specify a default set of VLDB server
    preferences. For each entry the value name will be either the IP address of a
!   server or a fully qualified domain name.&nbsp; The value will be the
!   ranking.&nbsp; The ranking will be adjusted by a random value between 0 and
!   256 prior to the preference being set.</p>
    </td>
   </tr>
  </table>
  
! <h3><a name="_Toc115416255"></a><a name="_Toc139993247"></a><a
! name="_Toc126872324"></a><span style='mso-bookmark:_Toc115416255'>Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client\Server Preferences\File]</span></h3>
! 
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
!   height:105.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:105.5pt'>
!   <h5><a name="_Toc115416256"></a><a name="_Toc139993248"></a><a
!   name="_Toc126872325"></a><span style='mso-bookmark:_Toc115416256'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: &quot;hostname or ip
!   address&quot;</span></span><span style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText>This key is used to specify a default set of File server
    preferences. For each entry the value name will be either the IP address of a
!   server or a fully qualified domain name.&nbsp; The value will be the
!   ranking.&nbsp; The ranking will be adjusted by a random value between 0 and
!   256 prior to the preference being set.</p>
    </td>
   </tr>
  </table>
  
! <h2><a name="_Toc115416257"></a><a name="_Toc139993249"></a><a
! name="_Toc126872326"></a><a name="_Toc115417105"></a><span style='mso-bookmark:
! _Toc115416257'>A.2. Integrated Logon Network provider parameters</span></h2>
  
  <p class=MsoBodyText>Affects the network provider (afslogon.dll).</p>
  
! <h3><a name="_Toc115416258"></a><a name="_Toc139993250"></a><a
! name="_Toc126872327"></a><span style='mso-bookmark:_Toc115416258'>Regkey:
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</span></h3>
! 
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
!   height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5><a name="_Toc115416259"></a><a name="_Toc139993251"></a><a
!   name="_Toc126872328"></a><span style='mso-bookmark:_Toc115416259'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: FailLoginsSilently</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 0</p>
    <p class=MsoBodyText>Do not display message boxes if the login fails.</p>
***************
*** 3992,4072 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993252"></a><a
! name="_Toc126872329"></a><a name="_Toc115416260">Regkey:<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</a></h3>
! 
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr style='height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5><a name="_Toc139993253"></a><a name="_Toc126872330"></a><a
!   name="_Toc115416261">Value: NoWarnings</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 0</p>
    <p class=MsoBodyText>Disables visible warnings during logon.</p>
    </td>
   </tr>
!  <tr style='height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5><a name="_Toc139993254"></a><a name="_Toc126872331"></a><a
!   name="_Toc115416262">Value: AuthentProviderPath</a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: %WINDIR%\SYSTEM32\afslogon.dll</p>
    <p class=MsoBodyText>Specifies the install location of the authentication
    provider dll.</p>
    </td>
   </tr>
!  <tr style='height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5><a name="_Toc139993255"></a><a name="_Toc126872332"></a><a
!   name="_Toc115416263">Value: Class</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    NSIS: 0x02</p>
    <p class=MsoBodyText>Specifies the class of network provider</p>
    </td>
   </tr>
!  <tr style='height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc139993256"></a><a name="_Toc126872333"></a><a
!   name="_Toc115416264">Value: DependOnGroup</a></h5>
    <p class=MsoBodyText>Type: REG_MULTI_SZ<br>
    NSIS: PNP_TDI</p>
    <p class=MsoBodyText>Specifies the service groups upon which the AFS Client
!   Service depends.  Windows should not attempt to start the AFS Client Service
!   until all of the services within these groups have successfully started.</p>
    </td>
   </tr>
!  <tr style='height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc139993257"></a><a name="_Toc126872334"></a><a
!   name="_Toc115416265">Value: DependOnService</a></h5>
    <p class=MsoBodyText>Type: REG_MULTI_SZ<br>
    NSIS: Tcpip NETBIOS RpcSs</p>
    <p class=MsoBodyText>Specifies a list of services upon which the AFS Client
!   Service depends.  Windows should not attempt to start the AFS Client Service
!   until all of the specified services have successfully started.</p>
    </td>
   </tr>
!  <tr style='height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5><a name="_Toc139993258"></a><a name="_Toc126872335"></a><a
!   name="_Toc115416266">Value: Name</a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: &quot;OpenAFSDaemon&quot;</p>
    <p class=MsoBodyText>Specifies the display name of the AFS Client Service</p>
    </td>
   </tr>
!  <tr style='height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5><a name="_Toc139993259"></a><a name="_Toc126872336"></a><a
!   name="_Toc115416267">Value: ProviderPath</a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: %WINDIR%\SYSTEM32\afslogon.dll</p>
    <p class=MsoBodyText>Specifies the DLL to use for the network provider</p>
--- 4667,4763 ----
   </tr>
  </table>
  
! <h3><a name="_Toc115416260"></a><a name="_Toc139993252"></a><a
! name="_Toc126872329"></a><span style='mso-bookmark:_Toc115416260'>Regkey:<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</span></h3>
! 
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5><a name="_Toc115416261"></a><a name="_Toc139993253"></a><a
!   name="_Toc126872330"></a><span style='mso-bookmark:_Toc115416261'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: NoWarnings</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 0</p>
    <p class=MsoBodyText>Disables visible warnings during logon.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:1;height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5><a name="_Toc115416262"></a><a name="_Toc139993254"></a><a
!   name="_Toc126872331"></a><span style='mso-bookmark:_Toc115416262'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: AuthentProviderPath</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: %WINDIR%\SYSTEM32\afslogon.dll</p>
    <p class=MsoBodyText>Specifies the install location of the authentication
    provider dll.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:2;height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5><a name="_Toc115416263"></a><a name="_Toc139993255"></a><a
!   name="_Toc126872332"></a><span style='mso-bookmark:_Toc115416263'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: Class</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    NSIS: 0x02</p>
    <p class=MsoBodyText>Specifies the class of network provider</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:3;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416264"></a><a name="_Toc139993256"></a><a
!   name="_Toc126872333"></a><span style='mso-bookmark:_Toc115416264'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: DependOnGroup</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_MULTI_SZ<br>
    NSIS: PNP_TDI</p>
    <p class=MsoBodyText>Specifies the service groups upon which the AFS Client
!   Service depends.&nbsp; Windows should not attempt to start the AFS Client
!   Service until all of the services within these groups have successfully
!   started.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:4;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416265"></a><a name="_Toc139993257"></a><a
!   name="_Toc126872334"></a><span style='mso-bookmark:_Toc115416265'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: DependOnService</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_MULTI_SZ<br>
    NSIS: Tcpip NETBIOS RpcSs</p>
    <p class=MsoBodyText>Specifies a list of services upon which the AFS Client
!   Service depends.&nbsp; Windows should not attempt to start the AFS Client
!   Service until all of the specified services have successfully started.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:5;height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5><a name="_Toc115416266"></a><a name="_Toc139993258"></a><a
!   name="_Toc126872335"></a><span style='mso-bookmark:_Toc115416266'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: Name</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: &quot;OpenAFSDaemon&quot;</p>
    <p class=MsoBodyText>Specifies the display name of the AFS Client Service</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:6;mso-yfti-lastrow:yes;height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5><a name="_Toc115416267"></a><a name="_Toc139993259"></a><a
!   name="_Toc126872336"></a><span style='mso-bookmark:_Toc115416267'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: ProviderPath</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: %WINDIR%\SYSTEM32\afslogon.dll</p>
    <p class=MsoBodyText>Specifies the DLL to use for the network provider</p>
***************
*** 4074,4152 ****
   </tr>
  </table>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993260"></a><a
! name="_Toc126872337"></a><a name="_Toc115417106"></a><a name="_Toc115416268"></a><a
  name="_A.2.1_Domain_specific_configuration"></a>A.2.1 Domain specific
  configuration keys for the Network Provider</h2>
  
  <p class=MsoBodyText>The network provider can be configured to have different
! behavior depending on the domain that the user logs into.  These settings are only
! relevant when using integrated login.  A domain refers to an Active Directory
! (AD) domain, a trusted Kerberos (non-AD) realm or the local machine (i.e. local
! account logins).  The domain name that is used for selecting the domain would
! be the domain that is passed into the NPLogonNotify function of the network
! provider.</p>
  
  <p class=MsoBodyText>Domain specific registry keys are:</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993261"></a><a
! name="_Toc126872338"></a><a name="_Toc115416269">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</a></h3>
  
! <p class=MsoBodyText>  (NP key)</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993262"></a><a
! name="_Toc126872339"></a><a name="_Toc115416270">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain]</a></h3>
  
! <p class=MsoBodyText>  (Domains key)</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993263"></a><a
! name="_Toc126872340"></a><a name="_Toc115416271">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\&quot;domain
! name&quot;]</a></h3>
  
! <p class=MsoBodyText>  (Specific domain key. One per domain.)</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993264"></a><a
! name="_Toc126872341"></a><a name="_Toc115416272">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST]</a></h3>
  
! <p class=MsoBodyText>  (Localhost key)</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993265"></a><a
! name="_Toc126872342"></a><a name="_Toc115416273">Example:</a></h3>
  
! <p class=PreformattedText> HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider</p>
  
! <p class=PreformattedText>  |</p>
  
! <p class=PreformattedText>  +- Domain</p>
  
! <p class=PreformattedText>     +-AD1.EXAMPLE.COM</p>
  
! <p class=PreformattedText>     +-AD2.EXAMPLE.NET</p>
  
! <p class=PreformattedText>     +-LOCALHOST</p>
  
  <p class=MsoBodyText>Each of the domain specific keys can have the set of
! values described in 2.1.1.  The effective values are chosen as described in
! 2.1.2.</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993266"></a><a
! name="_Toc126872343"></a><a name="_Toc115416274">A.2.1.1 Domain specific
! configuration values</a></h3>
  
! <h4><a name="_Toc139993267"></a><a name="_Toc126872344"></a><a
! name="_Toc115416275">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]<br>
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain]<br>
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\&quot;domain
  name&quot;]<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST]</a></h4>
  
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr style='height:191.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:191.0pt'>
    <h5><a name="_Toc139993268"></a><a name="_Toc126872345"></a><a
!   name="_Toc115416276"></a><a name="_Value___: LogonOptions"></a>Value:
!   LogonOptions</h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 0x01</p>
    <p class=MsoBodyText>NSIS/WiX: depends on user configuration</p>
--- 4765,4844 ----
   </tr>
  </table>
  
! <h2><a name="_Toc139993260"></a><a name="_Toc126872337"></a><a
! name="_Toc115417106"></a><a name="_Toc115416268"></a><a
  name="_A.2.1_Domain_specific_configuration"></a>A.2.1 Domain specific
  configuration keys for the Network Provider</h2>
  
  <p class=MsoBodyText>The network provider can be configured to have different
! behavior depending on the domain that the user logs into.&nbsp; These settings
! are only relevant when using integrated login.&nbsp; A domain refers to an
! Active Directory (AD) domain, a trusted Kerberos (non-AD) realm or the local
! machine (i.e. local account logins).&nbsp; The domain name that is used for
! selecting the domain would be the domain that is passed into the NPLogonNotify
! function of the network provider.</p>
  
  <p class=MsoBodyText>Domain specific registry keys are:</p>
  
! <h3><a name="_Toc115416269"></a><a name="_Toc139993261"></a><a
! name="_Toc126872338"></a><span style='mso-bookmark:_Toc115416269'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</span></h3>
  
! <p class=MsoBodyText>&nbsp; (NP key)</p>
  
! <h3><a name="_Toc115416270"></a><a name="_Toc139993262"></a><a
! name="_Toc126872339"></a><span style='mso-bookmark:_Toc115416270'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain]</span></h3>
  
! <p class=MsoBodyText>&nbsp; (Domains key)</p>
  
! <h3><a name="_Toc115416271"></a><a name="_Toc139993263"></a><a
! name="_Toc126872340"></a><span style='mso-bookmark:_Toc115416271'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\&quot;domain
! name&quot;]</span></h3>
  
! <p class=MsoBodyText>&nbsp; (Specific domain key. One per domain.)</p>
  
! <h3><a name="_Toc115416272"></a><a name="_Toc139993264"></a><a
! name="_Toc126872341"></a><span style='mso-bookmark:_Toc115416272'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST]</span></h3>
  
! <p class=MsoBodyText>&nbsp; (Localhost key)</p>
  
! <h3><a name="_Toc115416273"></a><a name="_Toc139993265"></a><a
! name="_Toc126872342"></a><span style='mso-bookmark:_Toc115416273'>Example:</span></h3>
  
! <p class=preformattedtext>&nbsp;HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider</p>
  
! <p class=preformattedtext>&nbsp; |</p>
  
! <p class=preformattedtext>&nbsp; +- Domain</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; +-AD1.EXAMPLE.COM</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; +-AD2.EXAMPLE.NET</p>
  
! <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp; +-LOCALHOST</p>
  
  <p class=MsoBodyText>Each of the domain specific keys can have the set of
! values described in 2.1.1.&nbsp; The effective values are chosen as described
! in 2.1.2.</p>
  
! <h3><a name="_Toc115416274"></a><a name="_Toc139993266"></a><a
! name="_Toc126872343"></a><span style='mso-bookmark:_Toc115416274'>A.2.1.1
! Domain specific configuration values</span></h3>
  
! <h4><a name="_Toc115416275"></a><a name="_Toc139993267"></a><a
! name="_Toc126872344"></a><span style='mso-bookmark:_Toc115416275'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]<br>
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain]<br>
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\&quot;domain
  name&quot;]<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST]</span></h4>
  
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;height:191.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:191.0pt'>
    <h5><a name="_Toc139993268"></a><a name="_Toc126872345"></a><a
!   name="_Toc115416276"></a><a name="_Value___:_LogonOptions"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: LogonOptions<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 0x01</p>
    <p class=MsoBodyText>NSIS/WiX: depends on user configuration</p>
***************
*** 4155,4172 ****
    0x02 - High Security Mode is used (deprecated)<br>
    0x03 - Integrated Logon with High Security Mode is used (deprecated)</p>
    <p class=MsoBodyText>High Security Mode generates random SMB names for the
!   creation of Drive Mappings.  This mode should not be used without Integrated
!   Logon.</p>
    <p class=MsoBodyText>As of 1.3.65 the SMB server supports SMB
!   authentication.  The High Security Mode should not be used when using SMB
!   authentication (SMBAuthType setting is non zero).</p>
    </td>
   </tr>
!  <tr style='height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc139993269"></a><a name="_Toc126872346"></a><a
!   name="_Toc115416277">Value: FailLoginsSilentl</a></h5>
    <p class=MsoBodyText>Type: DWORD (1|0)<br>
    Default: 0<br>
    NSIS/WiX: (not set)</p>
--- 4847,4866 ----
    0x02 - High Security Mode is used (deprecated)<br>
    0x03 - Integrated Logon with High Security Mode is used (deprecated)</p>
    <p class=MsoBodyText>High Security Mode generates random SMB names for the
!   creation of Drive Mappings.&nbsp; This mode should not be used without
!   Integrated Logon.</p>
    <p class=MsoBodyText>As of 1.3.65 the SMB server supports SMB
!   authentication.&nbsp; The High Security Mode should not be used when using
!   SMB authentication (SMBAuthType setting is non zero).</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:1;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416277"></a><a name="_Toc139993269"></a><a
!   name="_Toc126872346"></a><span style='mso-bookmark:_Toc115416277'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: FailLoginsSilentl</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD (1|0)<br>
    Default: 0<br>
    NSIS/WiX: (not set)</p>
***************
*** 4174,4201 ****
    event of an error during the integrated login process.</p>
    </td>
   </tr>
!  <tr style='height:139.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:139.0pt'>
!   <h5><a name="_Toc139993270"></a><a name="_Toc126872347"></a><a
!   name="_Toc115416278">Value: LogonScript</a></h5>
    <p class=MsoBodyText>Type: REG_SZ or REG_EXPAND_SZ<br>
    Default: (null)<br>
    NSIS/WiX: (only value under NP key) &lt;install path&gt;\afscreds.exe -:%s -x
    -a -m -n -q</p>
    <p class=MsoBodyText>A logon script that will be scheduled to be run after
!   the profile load is complete.  If using the REG_EXPAND_SZ type, you can use
!   any system environment variable as &quot;%varname%&quot; which would be
!   expanded at the time the network provider is run.  Optionally using a
    &quot;%s&quot; in the value would result in it being expanded into the AFS
    SMB username for the session.</p>
    </td>
   </tr>
!  <tr style='height:105.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:105.5pt'>
!   <h5><a name="_Toc139993271"></a><a name="_Toc126872348"></a><a
!   name="_Toc115416279">Value: LoginRetryInterval</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 30<br>
    NSIS/WiX: (not set)</p>
--- 4868,4899 ----
    event of an error during the integrated login process.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:2;height:139.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:139.0pt'>
!   <h5><a name="_Toc115416278"></a><a name="_Toc139993270"></a><a
!   name="_Toc126872347"></a><span style='mso-bookmark:_Toc115416278'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: LogonScript</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_SZ or REG_EXPAND_SZ<br>
    Default: (null)<br>
    NSIS/WiX: (only value under NP key) &lt;install path&gt;\afscreds.exe -:%s -x
    -a -m -n -q</p>
    <p class=MsoBodyText>A logon script that will be scheduled to be run after
!   the profile load is complete.&nbsp; If using the REG_EXPAND_SZ type, you can
!   use any system environment variable as &quot;%varname%&quot; which would be
!   expanded at the time the network provider is run.&nbsp; Optionally using a
    &quot;%s&quot; in the value would result in it being expanded into the AFS
    SMB username for the session.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:3;height:105.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:105.5pt'>
!   <h5><a name="_Toc115416279"></a><a name="_Toc139993271"></a><a
!   name="_Toc126872348"></a><span style='mso-bookmark:_Toc115416279'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: LoginRetryInterval</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 30<br>
    NSIS/WiX: (not set)</p>
***************
*** 4205,4226 ****
    if the service is up.</p>
    </td>
   </tr>
!  <tr style='height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc139993272"></a><a name="_Toc126872349"></a><a
!   name="_Toc115416280">Value: LoginSleepInterval</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 5<br>
    NSIS/WiX: (not set)</p>
    <p class=MsoBodyText>See description of LoginRetryInterval.</p>
    </td>
   </tr>
!  <tr style='height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
    <h5><a name="_Toc139993273"></a><a name="_Toc126872350"></a><a
!   name="_Toc115416281"></a><a name="_Value:_TheseCells"></a>Value: TheseCells</h5>
    <p class=MsoBodyText>Type: REG_MULTI_SZ<br>
    NSIS: &lt;not set&gt;</p>
    <p class=MsoBodyText>When Kerberos 5 is being used, TheseCells provides a
--- 4903,4927 ----
    if the service is up.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:4;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416280"></a><a name="_Toc139993272"></a><a
!   name="_Toc126872349"></a><span style='mso-bookmark:_Toc115416280'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: LoginSleepInterval</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 5<br>
    NSIS/WiX: (not set)</p>
    <p class=MsoBodyText>See description of LoginRetryInterval.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:5;mso-yfti-lastrow:yes;height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
    <h5><a name="_Toc139993273"></a><a name="_Toc126872350"></a><a
!   name="_Toc115416281"></a><a name="_Value:_TheseCells"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: TheseCells<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_MULTI_SZ<br>
    NSIS: &lt;not set&gt;</p>
    <p class=MsoBodyText>When Kerberos 5 is being used, TheseCells provides a
***************
*** 4230,4309 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993274"></a><a
! name="_Toc126872351"></a><a name="_Toc115416282">A.2.1.2 Selection of effective
! values for domain specific configuration</a></h3>
  
  <p class=MsoBodyText>During login to domain X, where X is the domain passed
! into NPLogonNotify as lpAuthentInfo-&gt;LogonDomainName or the string 'LOCALHOST'
! if lpAuthentInfo-&gt;LogonDomainName equals the name of the computer, the
! following keys will be looked up.</p>
  
  <p class=MsoBodyText style='margin-left:36.0pt;text-indent:-18.0pt'>1.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>NP
! key. (&quot;HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider&quot;)</p>
  
  <p class=MsoBodyText style='margin-left:36.0pt;text-indent:-18.0pt'>2.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Domains
! key. (NP key\&quot;Domain&quot;)</p>
  
  <p class=MsoBodyText style='margin-left:36.0pt;text-indent:-18.0pt'>3.<span
! style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Specific
! domain key. (Domains key\X)</p>
  
  <p class=MsoBodyText>If the specific domain key does not exist, then the
! domains key will be ignored.  All the configuration information in this case
! will come from the NP key.</p>
  
  <p class=MsoBodyText>If the specific domain key exists, then for each of the
! values metioned in (2), they will be looked up in the specific domain key, domains
! key and the NP key successively until the value is found. The first instance of
! the value found this way will be the effective for the login session.  If no
! such instance can be found, the default will be used.  To re-iterate, a value
! in a more specific key supercedes a value in a less specific key.  The
! exceptions to this rule are stated below.</p>
! 
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993275"></a><a
! name="_Toc126872352"></a><a name="_Toc115416283">A.2.1.3 Exceptions to A.2.1.2</a></h3>
  
  <p class=MsoBodyText>To retain backwards compatibility, the following
  exceptions are made to 2.1.2.</p>
  
! <h4><a name="_Toc139993276"></a><a name="_Toc126872353"></a><a
! name="_Toc115416284">2.1.3.1 'FailLoginsSilently'</a></h4>
! 
! <p class=MsoBodyText>Historically, the 'FailLoginsSilently' value was in HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters
! key and not in the NP key.  Therefore, for backwards compatibility, the value
! in the Parameters key will supercede all instances of this value in other
! keys.  In the absence of this value in the Parameters key, normal scope rules
! apply.</p>
  
! <h4><a name="_Toc139993277"></a><a name="_Toc126872354"></a><a
! name="_Toc115416285">2.1.3.2 'LogonScript'</a></h4>
  
  <p class=MsoBodyText>If a 'LogonScript' is not specified in the specific domain
  key nor in the domains key, the value in the NP key will only be checked if the
! effective 'LogonOptions' specify a high security integrated login.  If a logon
! script is specified in the specific domain key or the domains key, it will be
! used regardless of the high security setting.  Please be aware of this when
! setting this value.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993278"></a><a
! name="_Toc126872355"></a><a name="_Toc115417107"></a><a name="_Toc115416286">A.3.
! AFS Credentials System Tray Tool parameters</a></h2>
  
  <p class=MsoBodyText>Affects the behavior of afscreds.exe</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993279"></a><a
! name="_Toc126872356"></a><a name="_Toc115416287">Regkey:<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></h3>
! 
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr style='height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc139993280"></a><a name="_Toc126872357"></a><a
!   name="_Toc115416288">Value: Gateway</a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;&quot;<br>
    Function: GetGatewayName()</p>
--- 4931,5016 ----
   </tr>
  </table>
  
! <h3><a name="_Toc115416282"></a><a name="_Toc139993274"></a><a
! name="_Toc126872351"></a><span style='mso-bookmark:_Toc115416282'>A.2.1.2
! Selection of effective values for domain specific configuration</span></h3>
  
  <p class=MsoBodyText>During login to domain X, where X is the domain passed
! into NPLogonNotify as lpAuthentInfo-&gt;LogonDomainName or the string
! 'LOCALHOST' if lpAuthentInfo-&gt;LogonDomainName equals the name of the
! computer, the following keys will be looked up.</p>
  
  <p class=MsoBodyText style='margin-left:36.0pt;text-indent:-18.0pt'>1.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span>NP key.
! (&quot;HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider&quot;)</p>
  
  <p class=MsoBodyText style='margin-left:36.0pt;text-indent:-18.0pt'>2.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span>Domains key. (NP key\&quot;Domain&quot;)</p>
  
  <p class=MsoBodyText style='margin-left:36.0pt;text-indent:-18.0pt'>3.<span
! style='font-size:7.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span>Specific domain key. (Domains key\X)</p>
  
  <p class=MsoBodyText>If the specific domain key does not exist, then the
! domains key will be ignored.&nbsp; All the configuration information in this
! case will come from the NP key.</p>
  
  <p class=MsoBodyText>If the specific domain key exists, then for each of the
! values metioned in (2), they will be looked up in the specific domain key,
! domains key and the NP key successively until the value is found. The first
! instance of the value found this way will be the effective for the login
! session.&nbsp; If no such instance can be found, the default will be used.&nbsp;
! To re-iterate, a value in a more specific key supercedes a value in a less
! specific key.&nbsp; The exceptions to this rule are stated below.</p>
! 
! <h3><a name="_Toc115416283"></a><a name="_Toc139993275"></a><a
! name="_Toc126872352"></a><span style='mso-bookmark:_Toc115416283'>A.2.1.3
! Exceptions to A.2.1.2</span></h3>
  
  <p class=MsoBodyText>To retain backwards compatibility, the following
  exceptions are made to 2.1.2.</p>
  
! <h4><a name="_Toc115416284"></a><a name="_Toc139993276"></a><a
! name="_Toc126872353"></a><span style='mso-bookmark:_Toc115416284'>2.1.3.1 'FailLoginsSilently'</span></h4>
  
! <p class=MsoBodyText>Historically, the 'FailLoginsSilently' value was in
! HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters key and not
! in the NP key.&nbsp; Therefore, for backwards compatibility, the value in the
! Parameters key will supercede all instances of this value in other keys.&nbsp;
! In the absence of this value in the Parameters key, normal scope rules apply.</p>
! 
! <h4><a name="_Toc115416285"></a><a name="_Toc139993277"></a><a
! name="_Toc126872354"></a><span style='mso-bookmark:_Toc115416285'>2.1.3.2
! 'LogonScript'</span></h4>
  
  <p class=MsoBodyText>If a 'LogonScript' is not specified in the specific domain
  key nor in the domains key, the value in the NP key will only be checked if the
! effective 'LogonOptions' specify a high security integrated login.&nbsp; If a
! logon script is specified in the specific domain key or the domains key, it
! will be used regardless of the high security setting.&nbsp; Please be aware of
! this when setting this value.</p>
! 
! <h2><a name="_Toc115416286"></a><a name="_Toc139993278"></a><a
! name="_Toc126872355"></a><a name="_Toc115417107"></a><span style='mso-bookmark:
! _Toc115416286'>A.3. AFS Credentials System Tray Tool parameters</span></h2>
  
  <p class=MsoBodyText>Affects the behavior of afscreds.exe</p>
  
! <h3><a name="_Toc115416287"></a><a name="_Toc139993279"></a><a
! name="_Toc126872356"></a><span style='mso-bookmark:_Toc115416287'>Regkey:<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</span></h3>
! 
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416288"></a><a name="_Toc139993280"></a><a
!   name="_Toc126872357"></a><span style='mso-bookmark:_Toc115416288'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: Gateway</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;&quot;<br>
    Function: GetGatewayName()</p>
***************
*** 4311,4321 ****
    access, the name of the gateway is specified by this value.</p>
    </td>
   </tr>
!  <tr style='height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc139993281"></a><a name="_Toc126872358"></a><a
!   name="_Toc115416289">Value: Cell</a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;<br>
    Variable: IsServiceConfigured()</p>
--- 5018,5030 ----
    access, the name of the gateway is specified by this value.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:1;mso-yfti-lastrow:yes;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416289"></a><a name="_Toc139993281"></a><a
!   name="_Toc126872358"></a><span style='mso-bookmark:_Toc115416289'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: Cell</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;<br>
    Variable: IsServiceConfigured()</p>
***************
*** 4325,4341 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993282"></a><a
! name="_Toc126872359"></a><a name="_Toc115416290">Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client]<br>
! [HKCU\SOFTWARE\OpenAFS\Client]</a></h3>
  
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr style='height:157.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:157.5pt'>
!   <h5><a name="_Toc139993283"></a><a name="_Toc126872360"></a><a
!   name="_Toc115416291">Value: ShowTrayIcon</a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1<br>
    Function: InitApp(), Main_OnCheckTerminate()</p>
--- 5034,5053 ----
   </tr>
  </table>
  
! <h3><a name="_Toc115416290"></a><a name="_Toc139993282"></a><a
! name="_Toc126872359"></a><span style='mso-bookmark:_Toc115416290'>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client]<br>
! [HKCU\SOFTWARE\OpenAFS\Client]</span></h3>
  
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;height:157.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:157.5pt'>
!   <h5><a name="_Toc115416291"></a><a name="_Toc139993283"></a><a
!   name="_Toc126872360"></a><span style='mso-bookmark:_Toc115416291'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: ShowTrayIcon</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1<br>
    Function: InitApp(), Main_OnCheckTerminate()</p>
***************
*** 4348,4421 ****
    exist the local machine value is checked.</p>
    </td>
   </tr>
!  <tr style='height:119.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:119.0pt'>
!   <h5><a name="_Toc139993284"></a><a name="_Toc126872361"></a><a
!   name="_Toc115416292">Value: EnableKFW</a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1<br>
    Function: KFW_is_available()</p>
    <p class=MsoBodyText>When MIT Kerberos for Windows can be loaded, Kerberos 5
!   will be used to obtain AFS credentials.  By setting this value to 0, the
!   internal Kerberos 4 implementation will be used instead.  The current user
!   value is checked first; if it does not exist the local machine value is
    checked.</p>
    </td>
   </tr>
!  <tr style='height:119.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:119.0pt'>
    <h5><a name="_Toc139993285"></a><a name="_Toc126872362"></a><a
!   name="_Toc115416293"></a><a name="_Value___: Use524"></a>Value: Use524</h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0<br>
    Function: KFW_use_krb524()</p>
!   <p class=MsoBodyText>When MIT Kerberos for Windows can be loaded, Kerberos 5 will
!   be used to obtain AFS credentials.  By setting this value to 1, the Kerberos
!   5 tickets will be converted to Kerberos 4 tokens via a call to the krb524
!   daemon.  The current user value is checked first; if it does not exist the
!   local machine value is checked.</p>
    </td>
   </tr>
!  <tr style='height:251.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:251.5pt'>
    <h5><a name="_Toc139993286"></a><a name="_Toc126872363"></a><a
!   name="_Toc115416294"></a><a name="_Value___: AfscredsShortcutParams"></a>Value:
!   AfscredsShortcutParams</h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;-A -M -N -Q&quot;<br>
    Function: Shortcut_FixStartup</p>
    <p class=MsoBodyText>This value specifies the command line options which
!   should be set as part of the shortcut to afscreds.exe.  afscreds.exe rewrites
!   the shortcut each time it exits so as to ensure that the shortcut points to
!   the latest version of the program.  This value is used to determine which
!   values should be used for command line parameters.  The current user value is
!   checked first; if it does not exist the local machine value is checked.</p>
    <p class=MsoBodyText>The following subset of the command line options is
    appropriate for use in this registry setting:</p>
    <p class=MsoBodyText>-A = autoinit<br>
    -M = renew drive maps<br>
    -N = ip address change detection<br>
!   -Q = quiet mode.  do not display start service dialog if afsd_service is not
!   already running<br>
    -S = show tokens dialog on startup<br>
    -Z = unmap drives</p>
    </td>
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993287"></a><a
! name="_Toc126872364"></a><a name="_Toc115416295">Regkey:<br>
! [HKCU\SOFTWARE\OpenAFS\Client]</a></h3>
! 
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr style='height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc139993288"></a><a name="_Toc126872365"></a><a
!   name="_Toc115416296">Value: Authentication Cell</a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;<br>
    Function: Afscreds.exe GetDefaultCell()</p>
--- 5060,5142 ----
    exist the local machine value is checked.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:1;height:119.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:119.0pt'>
!   <h5><a name="_Toc115416292"></a><a name="_Toc139993284"></a><a
!   name="_Toc126872361"></a><span style='mso-bookmark:_Toc115416292'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: EnableKFW</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1<br>
    Function: KFW_is_available()</p>
    <p class=MsoBodyText>When MIT Kerberos for Windows can be loaded, Kerberos 5
!   will be used to obtain AFS credentials.&nbsp; By setting this value to 0, the
!   internal Kerberos 4 implementation will be used instead.&nbsp; The current
!   user value is checked first; if it does not exist the local machine value is
    checked.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:2;height:119.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:119.0pt'>
    <h5><a name="_Toc139993285"></a><a name="_Toc126872362"></a><a
!   name="_Toc115416293"></a><a name="_Value___:_Use524"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: Use524<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0<br>
    Function: KFW_use_krb524()</p>
!   <p class=MsoBodyText>When MIT Kerberos for Windows can be loaded, Kerberos 5
!   will be used to obtain AFS credentials.&nbsp; By setting this value to 1, the
!   Kerberos 5 tickets will be converted to Kerberos 4 tokens via a call to the
!   krb524 daemon.&nbsp; The current user value is checked first; if it does not
!   exist the local machine value is checked.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:3;mso-yfti-lastrow:yes;height:251.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:251.5pt'>
    <h5><a name="_Toc139993286"></a><a name="_Toc126872363"></a><a
!   name="_Toc115416294"></a><a name="_Value___:_AfscredsShortcutParams"></a><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value:
!   AfscredsShortcutParams<o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;-A -M -N -Q&quot;<br>
    Function: Shortcut_FixStartup</p>
    <p class=MsoBodyText>This value specifies the command line options which
!   should be set as part of the shortcut to afscreds.exe.&nbsp; afscreds.exe
!   rewrites the shortcut each time it exits so as to ensure that the shortcut
!   points to the latest version of the program.&nbsp; This value is used to
!   determine which values should be used for command line parameters.&nbsp; The
!   current user value is checked first; if it does not exist the local machine
!   value is checked.</p>
    <p class=MsoBodyText>The following subset of the command line options is
    appropriate for use in this registry setting:</p>
    <p class=MsoBodyText>-A = autoinit<br>
    -M = renew drive maps<br>
    -N = ip address change detection<br>
!   -Q = quiet mode.&nbsp; do not display start service dialog if afsd_service is
!   not already running<br>
    -S = show tokens dialog on startup<br>
    -Z = unmap drives</p>
    </td>
   </tr>
  </table>
  
! <h3><a name="_Toc115416295"></a><a name="_Toc139993287"></a><a
! name="_Toc126872364"></a><span style='mso-bookmark:_Toc115416295'>Regkey:<br>
! [HKCU\SOFTWARE\OpenAFS\Client]</span></h3>
! 
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
!   height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416296"></a><a name="_Toc139993288"></a><a
!   name="_Toc126872365"></a><span style='mso-bookmark:_Toc115416296'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: Authentication Cell</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;<br>
    Function: Afscreds.exe GetDefaultCell()</p>
***************
*** 4425,4440 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993289"></a><a
! name="_Toc126872366"></a><a name="_Toc115416297">Regkey:<br>
! [HKCU\SOFTWARE\OpenAFS\Client\Reminders]</a></h3>
! 
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr style='height:124.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:124.75pt'>
!   <h5><a name="_Toc139993290"></a><a name="_Toc126872367"></a><a
!   name="_Toc115416298">Value: &quot;afs cell name&quot;</a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: &lt;none&gt;<br>
    Function: LoadRemind(), SaveRemind()</p>
--- 5146,5165 ----
   </tr>
  </table>
  
! <h3><a name="_Toc115416297"></a><a name="_Toc139993289"></a><a
! name="_Toc126872366"></a><span style='mso-bookmark:_Toc115416297'>Regkey:<br>
! [HKCU\SOFTWARE\OpenAFS\Client\Reminders]</span></h3>
! 
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
!   height:124.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:124.75pt'>
!   <h5><a name="_Toc115416298"></a><a name="_Toc139993290"></a><a
!   name="_Toc126872367"></a><span style='mso-bookmark:_Toc115416298'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: &quot;afs cell
!   name&quot;</span></span><span style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: &lt;none&gt;<br>
    Function: LoadRemind(), SaveRemind()</p>
***************
*** 4446,4480 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993291"></a><a
! name="_Toc126872368"></a><a name="_Toc115416299">Regkey:<br>
! [HKCU\SOFTWARE\OpenAFS\Client\Active Maps]</a></h3>
! 
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr style='height:98.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:98.5pt'>
!   <h5><a name="_Toc139993292"></a><a name="_Toc126872369"></a><a
!   name="_Toc115416300">Value: &quot;upper case drive letter&quot;</a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: &lt;none&gt;</p>
!   <p class=MsoBodyText>These values are used to store the persistence state of
!   the AFS drive mappings as listed in the [...\Client\Mappings] key.</p>
    <p class=MsoBodyText>These values used to be stored in the afsdsbmt.ini file</p>
    </td>
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993293"></a><a
! name="_Toc126872370"></a><a name="_Toc115416301">Regkey:<br>
! [HKCU\SOFTWARE\OpenAFS\Client\Mappings]</a></h3>
! 
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr style='height:98.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:98.5pt'>
!   <h5><a name="_Toc139993294"></a><a name="_Toc126872371"></a><a
!   name="_Toc115416302">Value: &quot;upper case drive letter&quot;</a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText>These values are used to store the AFS path in UNIX
--- 5171,5213 ----
   </tr>
  </table>
  
! <h3><a name="_Toc115416299"></a><a name="_Toc139993291"></a><a
! name="_Toc126872368"></a><span style='mso-bookmark:_Toc115416299'>Regkey:<br>
! [HKCU\SOFTWARE\OpenAFS\Client\Active Maps]</span></h3>
! 
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
!   height:98.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:98.5pt'>
!   <h5><a name="_Toc115416300"></a><a name="_Toc139993292"></a><a
!   name="_Toc126872369"></a><span style='mso-bookmark:_Toc115416300'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: &quot;upper case
!   drive letter&quot;</span></span><span style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: &lt;none&gt;</p>
!   <p class=MsoBodyText>These values are used to store the persistence state of the
!   AFS drive mappings as listed in the [...\Client\Mappings] key.</p>
    <p class=MsoBodyText>These values used to be stored in the afsdsbmt.ini file</p>
    </td>
   </tr>
  </table>
  
! <h3><a name="_Toc115416301"></a><a name="_Toc139993293"></a><a
! name="_Toc126872370"></a><span style='mso-bookmark:_Toc115416301'>Regkey:<br>
! [HKCU\SOFTWARE\OpenAFS\Client\Mappings]</span></h3>
! 
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes;
!   height:98.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:98.5pt'>
!   <h5><a name="_Toc115416302"></a><a name="_Toc139993294"></a><a
!   name="_Toc126872371"></a><span style='mso-bookmark:_Toc115416302'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Value: &quot;upper case
!   drive letter&quot;</span></span><span style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText>These values are used to store the AFS path in UNIX
***************
*** 4484,4511 ****
   </tr>
  </table>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc139993295"></a><a
! name="_Toc126872372"></a><a name="_Toc115417108"></a><a name="_Toc115416303">A.4
! OpenAFS Client Service Environment Variables</a></h2>
! 
! <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h5><a name="_Toc139993296"></a><a name="_Toc126872373"></a><a
!   name="_Toc115416304">Variable: AFS_RPC_ENCRYPT</a></h5>
!   <p class=MsoBodyText>Values:   &quot;OFF&quot; disables the use of RPC
!   encryption any other value allows RPC encryption to be used<br>
!   Default:  RPC encryption is on</p>
!   </td>
!  </tr>
!  <tr>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h5><a name="_Toc139993297"></a><a name="_Toc126872374"></a><a
!   name="_Toc115416305">Variable: AFS_RPC_PROTSEQ</a></h5>
!   <p class=MsoBodyText>Values:            &quot;ncalrpc&quot;  - local RPC<br>
!                           &quot;ncacn_np&quot; - named pipes<br>
!                           &quot;ncacn_ip_tcp&quot; - tcp/ip<br>
!   Default:  local RPC</p>
    </td>
   </tr>
  </table>
--- 5217,5252 ----
   </tr>
  </table>
  
! <h2><a name="_Toc115416303"></a><a name="_Toc139993295"></a><a
! name="_Toc126872372"></a><a name="_Toc115417108"></a><span style='mso-bookmark:
! _Toc115416303'>A.4 OpenAFS Client Service Environment Variables</span></h2>
! 
! <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
!  style='mso-cellspacing:2.2pt;mso-padding-alt:0pt 0pt 0pt 0pt'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h5><a name="_Toc115416304"></a><a name="_Toc139993296"></a><a
!   name="_Toc126872373"></a><span style='mso-bookmark:_Toc115416304'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Variable: AFS_RPC_ENCRYPT</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
!   <p class=MsoBodyText>Values:&nbsp;&nbsp; &quot;OFF&quot; disables the use of
!   RPC encryption any other value allows RPC encryption to be used<br>
!   Default:&nbsp; RPC encryption is on</p>
!   </td>
!  </tr>
!  <tr style='mso-yfti-irow:1;mso-yfti-lastrow:yes'>
!   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h5><a name="_Toc115416305"></a><a name="_Toc139993297"></a><a
!   name="_Toc126872374"></a><span style='mso-bookmark:_Toc115416305'><span
!   style='mso-fareast-font-family:"Times New Roman"'>Variable: AFS_RPC_PROTSEQ</span></span><span
!   style='mso-fareast-font-family:"Times New Roman"'><o:p></o:p></span></h5>
!   <p class=MsoBodyText>Values:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   &quot;ncalrpc&quot;&nbsp; - local RPC<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   &quot;ncacn_np&quot; - named pipes<br>
!   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
!   &quot;ncacn_ip_tcp&quot; - tcp/ip<br>
!   Default:&nbsp; local RPC</p>
    </td>
   </tr>
  </table>
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.2 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm:1.2.6.3
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm:1.2.6.2	Thu Aug 10 00:07:05 2006
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm	Mon Oct 16 10:13:10 2006
***************
*** 1,794 ****
! <html>
  
  <head>
  <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
! <meta name=Generator content="Microsoft Word 11 (filtered)">
  <base target=Frame1>
  <style>
  <!--
   /* Font Definitions */
   @font-face
  	{font-family:"MS Mincho";
! 	panose-1:2 2 6 9 4 2 5 8 3 4;}
  @font-face
  	{font-family:"\@MS Mincho";
! 	panose-1:2 2 6 9 4 2 5 8 3 4;}
   /* Style Definitions */
   p.MsoNormal, li.MsoNormal, div.MsoNormal
! 	{margin:0pt;
  	margin-bottom:.0001pt;
  	font-size:12.0pt;
! 	font-family:"Times New Roman";}
  p.MsoToc1, li.MsoToc1, div.MsoToc1
  	{margin:0pt;
  	margin-bottom:.0001pt;
  	font-size:12.0pt;
! 	font-family:"Times New Roman";}
  p.MsoToc2, li.MsoToc2, div.MsoToc2
  	{margin-top:0pt;
  	margin-right:0pt;
  	margin-bottom:0pt;
  	margin-left:12.0pt;
  	margin-bottom:.0001pt;
  	font-size:12.0pt;
! 	font-family:"Times New Roman";}
  p.MsoToc3, li.MsoToc3, div.MsoToc3
  	{margin-top:0pt;
  	margin-right:0pt;
  	margin-bottom:0pt;
  	margin-left:24.0pt;
  	margin-bottom:.0001pt;
  	font-size:12.0pt;
! 	font-family:"Times New Roman";}
  p.MsoToc4, li.MsoToc4, div.MsoToc4
  	{margin-top:0pt;
  	margin-right:0pt;
  	margin-bottom:0pt;
  	margin-left:36.0pt;
  	margin-bottom:.0001pt;
  	font-size:12.0pt;
! 	font-family:"Times New Roman";}
  p.MsoToc5, li.MsoToc5, div.MsoToc5
  	{margin-top:0pt;
  	margin-right:0pt;
  	margin-bottom:0pt;
  	margin-left:48.0pt;
  	margin-bottom:.0001pt;
  	font-size:12.0pt;
! 	font-family:"Times New Roman";}
  p.MsoToc6, li.MsoToc6, div.MsoToc6
  	{margin-top:0pt;
  	margin-right:0pt;
  	margin-bottom:0pt;
  	margin-left:60.0pt;
  	margin-bottom:.0001pt;
  	font-size:12.0pt;
! 	font-family:"Times New Roman";}
  a:link, span.MsoHyperlink
  	{color:blue;
! 	text-decoration:underline;}
  a:visited, span.MsoHyperlinkFollowed
  	{color:purple;
! 	text-decoration:underline;}
  @page Section1
  	{size:612.0pt 792.0pt;
! 	margin:72.0pt 90.0pt 72.0pt 90.0pt;}
  div.Section1
  	{page:Section1;}
  -->
  </style>
! 
  </head>
  
! <body lang=EN-US link=blue vlink=purple>
  
  <div class=Section1>
  
! <p class=MsoNormal></p>
  
! <p class=MsoToc1><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993082">1. Installer Options</a></span></p>
  
! <p class=MsoToc1><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993083">2. System Requirements</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993084">2.1 Supported Operating Systems</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993085">2.1.1 Unsupported Operating Systems</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993086">2.2 Disk Space</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993087">2.3 Additional Software Packages</a></span></p>
  
! <p class=MsoToc1><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993088">3. Operational Notes</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993089">3.1. Requirements for Kerberos 5
! Authentication</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993090">3.1.1. Active Directory</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993091">3.1.2. Using the krb524 service</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993092">3.2. Use of the Microsoft Loopback Adapter</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993093">3.3. Using Freelance (Dynamic Root) Mode
! to Improve Mobility</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993094">3.4. Locating AFS Volume Database Servers</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993095">3.5. Obtaining AFS Tokens as a Part of
! Windows Logon</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993096">3.6. AFS System Tray Command Line Options</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993097">3.7. The “AFS Client Admins” Authorization
! Group</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993098">3.8. OpenAFS support for UNC paths</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993099">3.9. OpenAFS includes aklog.exe</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993100">3.10. OpenAFS Servers on Windows are
! Unsupported</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993101">3.11. OpenAFS Debugging Symbol files</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993102">3.12. Large Files (64-bit) Supported</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993103">3.13. Encrypted AFS File Access</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993104">3.14. Authenticated Access to the OpenAFS
! Client Service</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993105">3.15. No More INI Files</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993106">3.16. Microsoft Windows Internet
! Connection Firewall</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993107">3.17. Browsing AFS from the Explorer Shell
! and Office</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993108">3.18. Byte Range Locking</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993109">3.19. Automatic Discarding of AFS Tokens
! at Logoff</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993110">3.20. Terminal Server installations</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993111">3.21. Hidden Dot Files</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993112">3.22. Status Cache Limits</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993113">3.23. NETBIOS over TCP/IP must be enabled</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993114">3.24. OpenAFS binaries are digitally
! signed</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993115">3.25. Maximum Size of the AFSCache File</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993116">3.26. Filename Character Sets</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993117">3.27. Known Character Set Issues with
! Roaming Profiles</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993118">3.28. The AFSCache File</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993119">3.29. Restricting OpenAFS Client Service
! Start and Stop</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993120">3.30. The @sys Name List</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993121">3.31. Symlinks to AFS UNC paths</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993122">3.32. Cache Manager Debugging Now
! Supported</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993123">3.33. Windows Logon Caching vs. Kerberos
! Logons</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993124">3.34. Initial Server Preferences</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993125">3.35. File Timestamps</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993126">3.36. Windows RPC client support must be
! installed</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993127">3.37. Generating Minidumps of the OpenAFS
! Client Service</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993128">3.38. AFS Client Universally Unique
! Identifiers</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993129">3.39. Delayed Write Errors with Microsoft
! Office Applications</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993130">3.40. Global Drives (aka Service Drive
! Letters) are no longer supported by Microsoft</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993131">3.41. 64-bit Microsoft Windows
! Installations</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993132">3.42. Known Issues with Microsoft Windows
! Vista</a></span></p>
  
! <p class=MsoToc1><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993133">4. How to Debug Problems with OpenAFS for
! Windows:</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993134">4.1. pioctl debugging (IoctlDebug registry
! key)</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993135">4.2. afsd_service initialization log
! (%WinDir%\TEMP\afsd_init.log)</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993136">4.3. afsd_service debug logs (fs trace
! {-on, -off, -dump} -&gt;%WinDir%\TEMP\afsd.log)</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993137">4.4. Using SysInternal’s DbgView and
! FileMon Tools</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993138">4.5. Microsoft MiniDumps  (fs minidump
! -&gt; %WinDir%\TEMP\afsd.dmp)</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993139">4.6. Single Sign-on (Integrated Logon)
! debugging</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993140">4.7. RX (AFS RPC) debugging (rxdebug)</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993141">4.8. Cache Manager debugging (cmdebug)</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993142">4.9. Persistent Cache consistency check</a></span></p>
  
! <p class=MsoToc1><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993143">5. Reporting Bugs:</a></span></p>
  
! <p class=MsoToc1><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993144">6. How to Contribute to the Development of
! OpenAFS for Windows</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993145">6.1. The USENIX OpenAFS Fund</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993146">6.2. Secure Endpoints Inc.</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993147">6.3. The MIT Kerberos Account</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993148">6.4. Direct contributions of code and/or
! documentation</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993149">6.5. OpenAFS for Windows Mailing Lists</a></span></p>
  
! <p class=MsoToc1><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993150">7. MSI Deployment Guide</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993151">7.1. Introduction</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993152">7.1.1 Requirements</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993153">7.1.2 Authoring a Transform</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993154">7.2. Configuration Options</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993155">7.2.1 Configurable Properties</a></span></p>
  
! <p class=MsoToc4><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993156">7.2.1.1 Setting Properties</a></span></p>
  
! <p class=MsoToc4><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993157">7.2.1.2 OpenAFS for Windows Properties</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993158">(Service parameters):</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993159">(Network provider):</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993160">(OpenAFS Client):</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993161">7.2.1.2.1 Registry Properties</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993162">AFSCACHEPATH</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993163">AFSCACHESIZE</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993164">AFSCELLNAME</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993165">FREELANCEMODE</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993166">HIDEDOTFILES</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993167">LOGONOPTIONS</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993168">MOUNTROOT</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993169">NETBIOSNAME</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993170">NOFINDLANABYNAME</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993171">RXMAXMTU</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993172">SECURITYLEVEL</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993173">SMBAUTHTYPE</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993174">STOREANSIFILENAMES</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993175">USEDNS</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993176">7.2.1.2.2 AFSCreds.exe Properties</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993177">CREDSSTARTUP</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993178">CREDSAUTOINIT</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993179">CREDSIPCHDET</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993180">CREDSQUIET</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993181">CREDSRENEWDRMAP</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993182">CREDSSHOW</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993183">7.2.2 Existing Registry Entries</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993184">7.2.3 Replacing Configuration Files</a></span></p>
  
! <p class=MsoToc4><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993185">7.2.3.1 Components for Configuration Files</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993186">7.2.4 Adding Domain Specific Registry Keys</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993187">7.2.5 Adding Site Specific Freelance
! Registry Keys</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993188">7.3 Additional Resources</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993189">7.4. Upgrades</a></span></p>
  
! <p class=MsoToc1><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993190">Appendix A: Registry Values</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993191">A.1. Service parameters</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993192">Regkey:
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993193">Value: LANadapter</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993194">Value: CacheSize</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993195">Value: ChunkSize</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993196">Value: Daemons</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993197">Value: ServerThreads</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993198">Value: Stats</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993199">Value: LogoffPreserveTokens</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993200">Value: RootVolume</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993201">Value: Mountroot</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993202">Value: CachePath</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993203">Value: NonPersistentCaching</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993204">Value: ValidateCache</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993205">Value: TrapOnPanic</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993206">Value: NetbiosName</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993207">Value: IsGateway</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993208">Value: ReportSessionStartups</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993209">Value: TraceBufferSize</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993210">Value: SysName</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993211">Value: SecurityLevel</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993212">Value: UseDNS</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993213">Value: FreelanceClient</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993214">Value: HideDotFiles</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993215">Value: MaxMpxRequests</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993216">Value: MaxVCPerServer</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993217">Value: Cell</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993218">Value: RxNoJumbo</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993219">Value: RxMaxMTU</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993220">Value: ConnDeadTimeout</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993221">Value: HardDeadTimeout</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993222">Value: TraceOption</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993223">Value: AllSubmount</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993224">Value: NoFindLanaByName</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993225">Value: MaxCPUs</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993226">Value: smbAuthType</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993227">Value: MaxLogSize</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993228">Value: FlushOnHibernate</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993229">Regkey:
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters\GlobalAutoMapper]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993230">Value: &lt;Drive Letter:&gt; for example
! &quot;G:&quot;</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993231">Regkey: [HKLM\SOFTWARE\OpenAFS\Client]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993232">Value: CellServDBDir</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993233">Value: VerifyServiceSignature</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993234">Value: IoctlDebug</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993235">Value: MiniDumpType</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993236">Value: StoreAnsiFilenames</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993237">Regkey:
  [HKLM\SOFTWARE\OpenAFS\Client\CSCPolicy]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993238">Value: &quot;smb/cifs share name&quot;</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993239">Regkey:
  [HKLM\SOFTWARE\OpenAFS\Client\Freelance]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993240">Value: &quot;numeric value&quot;</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993241">Regkey:
  [HKLM\SOFTWARE\OpenAFS\Client\Freelance\Symlinks]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993242">Value: &quot;numeric value&quot;</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993243">Regkey:
  [HKLM\SOFTWARE\OpenAFS\Client\Submounts]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993244">Value: &quot;submount name&quot;</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993245">Regkey:
  [HKLM\SOFTWARE\OpenAFS\Client\Server Preferences\VLDB]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993246">Value: &quot;hostname or ip address&quot;</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993247">Regkey: [HKLM\SOFTWARE\OpenAFS\Client\Server
! Preferences\File]</a></span></p>
! 
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993248">Value: &quot;hostname or ip address&quot;</a></span></p>
! 
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993249">A.2. Integrated Logon Network provider
! parameters</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993250">Regkey:
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993251">Value: FailLoginsSilently</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993252">Regkey: [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993253">Value: NoWarnings</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993254">Value: AuthentProviderPath</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993255">Value: Class</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993256">Value: DependOnGroup</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993257">Value: DependOnService</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993258">Value: Name</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993259">Value: ProviderPath</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993260">A.2.1 Domain specific configuration keys
! for the Network Provider</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993261">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993262">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain]</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993263">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain&quot;domain
  name&quot;]</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993264">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST]</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993265">Example:</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993266">A.2.1.1 Domain specific configuration
! values</a></span></p>
  
! <p class=MsoToc4><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993267">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain]
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain&quot;domain
  name&quot;]
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993268">Value: LogonOptions</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993269">Value: FailLoginsSilentl</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993270">Value: LogonScript</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993271">Value: LoginRetryInterval</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993272">Value: LoginSleepInterval</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993273">Value: TheseCells</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993274">A.2.1.2 Selection of effective values for
! domain specific configuration</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993275">A.2.1.3 Exceptions to A.2.1.2</a></span></p>
  
! <p class=MsoToc4><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993276">2.1.3.1 'FailLoginsSilently'</a></span></p>
  
! <p class=MsoToc4><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993277">2.1.3.2 'LogonScript'</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993278">A.3. AFS Credentials System Tray Tool
! parameters</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993279">Regkey: [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993280">Value: Gateway</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993281">Value: Cell</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993282">Regkey: [HKLM\SOFTWARE\OpenAFS\Client]
! [HKCU\SOFTWARE\OpenAFS\Client]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993283">Value: ShowTrayIcon</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993284">Value: EnableKFW</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993285">Value: Use524</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993286">Value: AfscredsShortcutParams</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993287">Regkey: [HKCU\SOFTWARE\OpenAFS\Client]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993288">Value: Authentication Cell</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993289">Regkey:
  [HKCU\SOFTWARE\OpenAFS\Client\Reminders]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993290">Value: &quot;afs cell name&quot;</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993291">Regkey:
  [HKCU\SOFTWARE\OpenAFS\Client\Active Maps]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993292">Value: &quot;upper case drive letter&quot;</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993293">Regkey:
  [HKCU\SOFTWARE\OpenAFS\Client\Mappings]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993294">Value: &quot;upper case drive letter&quot;</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993295">A.4 OpenAFS Client Service Environment
! Variables</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993296">Variable: AFS_RPC_ENCRYPT</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a
! href="relnotes.htm#_Toc139993297">Variable: AFS_RPC_PROTSEQ</a></span></p>
  
  <p class=MsoNormal>&nbsp;</p>
  
--- 1,794 ----
! <html xmlns:v="urn:schemas-microsoft-com:vml"
! xmlns:o="urn:schemas-microsoft-com:office:office"
! xmlns:w="urn:schemas-microsoft-com:office:word"
! xmlns="http://www.w3.org/TR/REC-html40">
  
  <head>
  <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
! <meta name=ProgId content=Word.Document>
! <meta name=Generator content="Microsoft Word 11">
! <meta name=Originator content="Microsoft Word 11">
  <base target=Frame1>
+ <link rel=File-List href="toc_files/filelist.xml">
+ <!--[if gte mso 9]><xml>
+  <w:WordDocument>
+   <w:ValidateAgainstSchemas/>
+   <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
+   <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
+   <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
+   <w:Compatibility>
+    <w:UseFELayout/>
+   </w:Compatibility>
+   <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
+  </w:WordDocument>
+ </xml><![endif]--><!--[if gte mso 9]><xml>
+  <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
+  </w:LatentStyles>
+ </xml><![endif]-->
  <style>
  <!--
   /* Font Definitions */
   @font-face
  	{font-family:"MS Mincho";
! 	panose-1:2 2 6 9 4 2 5 8 3 4;
! 	mso-font-alt:"\FF2D\FF33 \660E\671D";
! 	mso-font-charset:128;
! 	mso-generic-font-family:roman;
! 	mso-font-format:other;
! 	mso-font-pitch:fixed;
! 	mso-font-signature:1 134676480 16 0 131072 0;}
  @font-face
  	{font-family:"\@MS Mincho";
! 	panose-1:2 2 6 9 4 2 5 8 3 4;
! 	mso-font-charset:128;
! 	mso-generic-font-family:auto;
! 	mso-font-pitch:auto;
! 	mso-font-signature:0 0 0 0 0 0;}
   /* Style Definitions */
   p.MsoNormal, li.MsoNormal, div.MsoNormal
! 	{mso-style-parent:"";
! 	margin:0pt;
  	margin-bottom:.0001pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:"Times New Roman";
! 	mso-fareast-font-family:"MS Mincho";}
  p.MsoToc1, li.MsoToc1, div.MsoToc1
  	{margin:0pt;
  	margin-bottom:.0001pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:"Times New Roman";
! 	mso-fareast-font-family:"MS Mincho";}
  p.MsoToc2, li.MsoToc2, div.MsoToc2
  	{margin-top:0pt;
  	margin-right:0pt;
  	margin-bottom:0pt;
  	margin-left:12.0pt;
  	margin-bottom:.0001pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:"Times New Roman";
! 	mso-fareast-font-family:"MS Mincho";}
  p.MsoToc3, li.MsoToc3, div.MsoToc3
  	{margin-top:0pt;
  	margin-right:0pt;
  	margin-bottom:0pt;
  	margin-left:24.0pt;
  	margin-bottom:.0001pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:"Times New Roman";
! 	mso-fareast-font-family:"MS Mincho";}
  p.MsoToc4, li.MsoToc4, div.MsoToc4
  	{margin-top:0pt;
  	margin-right:0pt;
  	margin-bottom:0pt;
  	margin-left:36.0pt;
  	margin-bottom:.0001pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:"Times New Roman";
! 	mso-fareast-font-family:"MS Mincho";}
  p.MsoToc5, li.MsoToc5, div.MsoToc5
  	{margin-top:0pt;
  	margin-right:0pt;
  	margin-bottom:0pt;
  	margin-left:48.0pt;
  	margin-bottom:.0001pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:"Times New Roman";
! 	mso-fareast-font-family:"MS Mincho";}
  p.MsoToc6, li.MsoToc6, div.MsoToc6
  	{margin-top:0pt;
  	margin-right:0pt;
  	margin-bottom:0pt;
  	margin-left:60.0pt;
  	margin-bottom:.0001pt;
+ 	mso-pagination:widow-orphan;
  	font-size:12.0pt;
! 	font-family:"Times New Roman";
! 	mso-fareast-font-family:"MS Mincho";}
  a:link, span.MsoHyperlink
  	{color:blue;
! 	text-decoration:underline;
! 	text-underline:single;}
  a:visited, span.MsoHyperlinkFollowed
  	{color:purple;
! 	text-decoration:underline;
! 	text-underline:single;}
  @page Section1
  	{size:612.0pt 792.0pt;
! 	margin:72.0pt 90.0pt 72.0pt 90.0pt;
! 	mso-header-margin:36.0pt;
! 	mso-footer-margin:36.0pt;
! 	mso-paper-source:0;}
  div.Section1
  	{page:Section1;}
  -->
  </style>
! <!--[if gte mso 10]>
! <style>
!  /* Style Definitions */
!  table.MsoNormalTable
! 	{mso-style-name:"Table Normal";
! 	mso-tstyle-rowband-size:0;
! 	mso-tstyle-colband-size:0;
! 	mso-style-noshow:yes;
! 	mso-style-parent:"";
! 	mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
! 	mso-para-margin:0pt;
! 	mso-para-margin-bottom:.0001pt;
! 	mso-pagination:widow-orphan;
! 	font-size:10.0pt;
! 	font-family:"Times New Roman";
! 	mso-fareast-font-family:"Times New Roman";
! 	mso-ansi-language:#0400;
! 	mso-fareast-language:#0400;
! 	mso-bidi-language:#0400;}
! </style>
! <![endif]--><!--[if gte mso 9]><xml>
!  <o:shapedefaults v:ext="edit" spidmax="2050"/>
! </xml><![endif]--><!--[if gte mso 9]><xml>
!  <o:shapelayout v:ext="edit">
!   <o:idmap v:ext="edit" data="1"/>
!  </o:shapelayout></xml><![endif]-->
  </head>
  
! <body lang=EN-US link=blue vlink=purple style='tab-interval:36.0pt'>
  
  <div class=Section1>
  
! <p class=MsoToc1><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993082">1.
! Installer Options</a></span></p>
  
! <p class=MsoToc1><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993083">2.
! System Requirements</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993084">2.1
! Supported Operating Systems</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993085">2.1.1
! Unsupported Operating Systems</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993086">2.2
! Disk Space</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993087">2.3
! Additional Software Packages</a></span></p>
  
! <p class=MsoToc1><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993088">3.
! Operational Notes</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993089">3.1.
! Requirements for Kerberos 5 Authentication</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993090">3.1.1.
! Active Directory</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993091">3.1.2.
! Using the krb524 service</a><o:p></o:p></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993091">3.1.3.
! Network Identity Manager Plug-in</a></span><u><span style='color:blue'><o:p></o:p></span></u></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993092">3.2.
! Use of the Microsoft Loopback Adapter</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993093">3.3.
! Using Freelance (Dynamic Root) Mode to Improve Mobility</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993094">3.4.
! Locating AFS Volume Database Servers</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993095">3.5.
! Obtaining AFS Tokens as a Part of Windows Logon</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993096">3.6.
! AFS System Tray Command Line Options</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993097">3.7.
! The “AFS Client Admins” Authorization Group</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993098">3.8.
! OpenAFS support for UNC paths</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993099">3.9.
! OpenAFS includes aklog.exe</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993100">3.10.
! OpenAFS Servers on Windows are Unsupported</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993101">3.11.
! OpenAFS Debugging Symbol files</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993102">3.12.
! Large Files (64-bit) Supported</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993103">3.13.
! Encrypted AFS File Access</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993104">3.14.
! Authenticated Access to the OpenAFS Client Service</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993105">3.15.
! No More INI Files</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993106">3.16.
! Microsoft Windows Internet Connection Firewall</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993107">3.17.
! Browsing AFS from the Explorer Shell and Office</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993108">3.18.
! Byte Range Locking</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993109">3.19.
! Automatic Discarding of AFS Tokens at Logoff</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993110">3.20.
! Terminal Server installations</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993111">3.21.
! Hidden Dot Files</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993112">3.22.
! Status Cache Limits</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993113">3.23.
! NETBIOS over TCP/IP must be enabled</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993114">3.24.
! OpenAFS binaries are digitally signed</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993115">3.25.
! Maximum Size of the AFSCache File</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993116">3.26.
! Filename Character Sets</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993117">3.27.
! Known Character Set Issues with Roaming Profiles</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993118">3.28.
! The AFSCache File</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993119">3.29.
! Restricting OpenAFS Client Service Start and Stop</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993120">3.30.
! The @sys Name List</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993121">3.31.
! Symlinks to AFS UNC paths</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993122">3.32.
! Cache Manager Debugging Now Supported</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993123">3.33.
! Windows Logon Caching vs. Kerberos Logons</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993124">3.34.
! Initial Server Preferences</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993125">3.35.
! File Timestamps</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993126">3.36.
! Windows RPC client support must be installed</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993127">3.37.
! Generating Minidumps of the OpenAFS Client Service</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993128">3.38.
! AFS Client Universally Unique Identifiers</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993129">3.39.
! Delayed Write Errors with Microsoft Office Applications</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993130">3.40.
! Global Drives (aka Service Drive Letters) are no longer supported by Microsoft</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993131">3.41.
! 64-bit Microsoft Windows Installations</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993132">3.42.
! Known Issues with Microsoft Windows Vista</a></span></p>
  
! <p class=MsoToc1><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993133">4.
! How to Debug Problems with OpenAFS for Windows:</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993134">4.1.
! pioctl debugging (IoctlDebug registry key)</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993135">4.2.
! afsd_service initialization log (%WinDir%\TEMP\afsd_init.log)</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993136">4.3.
! afsd_service debug logs (fs trace {-on, -off, -dump} -&gt;%WinDir%\TEMP\afsd.log)</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993137">4.4.
! Using SysInternal’s DbgView and FileMon Tools</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993138">4.5.
! Microsoft MiniDumps&nbsp; (fs minidump -&gt; %WinDir%\TEMP\afsd.dmp)</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993139">4.6.
! Single Sign-on (Integrated Logon) debugging</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993140">4.7.
! RX (AFS RPC) debugging (rxdebug)</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993141">4.8.
! Cache Manager debugging (cmdebug)</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993142">4.9.
! Persistent Cache consistency check</a></span></p>
  
! <p class=MsoToc1><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993143">5.
! Reporting Bugs:</a></span></p>
  
! <p class=MsoToc1><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993144">6.
! How to Contribute to the Development of OpenAFS for Windows</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993145">6.1.
! The USENIX OpenAFS Fund</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993146">6.2.
! Secure Endpoints Inc.</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993147">6.3.
! The MIT Kerberos Account</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993148">6.4.
! Direct contributions of code and/or documentation</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993149">6.5.
! OpenAFS for Windows Mailing Lists</a></span></p>
  
! <p class=MsoToc1><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993150">7.
! MSI Deployment Guide</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993151">7.1.
! Introduction</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993152">7.1.1
! Requirements</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993153">7.1.2
! Authoring a Transform</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993154">7.2.
! Configuration Options</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993155">7.2.1
! Configurable Properties</a></span></p>
  
! <p class=MsoToc4><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993156">7.2.1.1
! Setting Properties</a></span></p>
  
! <p class=MsoToc4><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993157">7.2.1.2
! OpenAFS for Windows Properties</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993158">(Service
! parameters):</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993159">(Network
! provider):</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993160">(OpenAFS
! Client):</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993161">7.2.1.2.1
! Registry Properties</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993162">AFSCACHEPATH</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993163">AFSCACHESIZE</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993164">AFSCELLNAME</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993165">FREELANCEMODE</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993166">HIDEDOTFILES</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993167">LOGONOPTIONS</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993168">MOUNTROOT</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993169">NETBIOSNAME</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993170">NOFINDLANABYNAME</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993171">RXMAXMTU</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993172">SECURITYLEVEL</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993173">SMBAUTHTYPE</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993174">STOREANSIFILENAMES</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993175">USEDNS</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993176">7.2.1.2.2
! AFSCreds.exe Properties</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993177">CREDSSTARTUP</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993178">CREDSAUTOINIT</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993179">CREDSIPCHDET</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993180">CREDSQUIET</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993181">CREDSRENEWDRMAP</a></span></p>
  
! <p class=MsoToc6><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993182">CREDSSHOW</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993183">7.2.2
! Existing Registry Entries</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993184">7.2.3
! Replacing Configuration Files</a></span></p>
  
! <p class=MsoToc4><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993185">7.2.3.1
! Components for Configuration Files</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993186">7.2.4
! Adding Domain Specific Registry Keys</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993187">7.2.5
! Adding Site Specific Freelance Registry Keys</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993188">7.3
! Additional Resources</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993189">7.4.
! Upgrades</a></span></p>
  
! <p class=MsoToc1><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993190">Appendix
! A: Registry Values</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993191">A.1.
! Service parameters</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993192">Regkey:
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993193">Value:
! LANadapter</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993194">Value:
! CacheSize</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993195">Value:
! ChunkSize</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993196">Value:
! Daemons</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993197">Value:
! ServerThreads</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993198">Value:
! Stats</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993199">Value:
! LogoffPreserveTokens</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993200">Value:
! RootVolume</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993201">Value:
! Mountroot</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993202">Value:
! CachePath</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993203">Value:
! NonPersistentCaching</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993204">Value:
! ValidateCache</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993205">Value:
! TrapOnPanic</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993206">Value:
! NetbiosName</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993207">Value:
! IsGateway</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993208">Value:
! ReportSessionStartups</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993209">Value:
! TraceBufferSize</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993210">Value:
! SysName</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993211">Value:
! SecurityLevel</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993212">Value:
! UseDNS</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993213">Value:
! FreelanceClient</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993214">Value:
! HideDotFiles</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993215">Value:
! MaxMpxRequests</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993216">Value:
! MaxVCPerServer</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993217">Value:
! Cell</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993218">Value:
! RxNoJumbo</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993219">Value:
! RxMaxMTU</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993220">Value:
! ConnDeadTimeout</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993221">Value:
! HardDeadTimeout</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993222">Value:
! TraceOption</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993223">Value:
! AllSubmount</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993224">Value:
! NoFindLanaByName</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993225">Value:
! MaxCPUs</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993226">Value:
! smbAuthType</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993227">Value:
! MaxLogSize</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993228">Value:
! FlushOnHibernate</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993229">Regkey:
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters\GlobalAutoMapper]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993230">Value:
! &lt;Drive Letter:&gt; for example &quot;G:&quot;</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993231">Regkey:
! [HKLM\SOFTWARE\OpenAFS\Client]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993232">Value:
! CellServDBDir</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993233">Value:
! VerifyServiceSignature</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993234">Value:
! IoctlDebug</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993235">Value:
! MiniDumpType</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993236">Value:
! StoreAnsiFilenames</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993237">Regkey:
  [HKLM\SOFTWARE\OpenAFS\Client\CSCPolicy]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993238">Value:
! &quot;smb/cifs share name&quot;</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993239">Regkey:
  [HKLM\SOFTWARE\OpenAFS\Client\Freelance]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993240">Value:
! &quot;numeric value&quot;</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993241">Regkey:
  [HKLM\SOFTWARE\OpenAFS\Client\Freelance\Symlinks]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993242">Value:
! &quot;numeric value&quot;</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993243">Regkey:
  [HKLM\SOFTWARE\OpenAFS\Client\Submounts]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993244">Value:
! &quot;submount name&quot;</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993245">Regkey:
  [HKLM\SOFTWARE\OpenAFS\Client\Server Preferences\VLDB]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993246">Value:
! &quot;hostname or ip address&quot;</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993247">Regkey:
! [HKLM\SOFTWARE\OpenAFS\Client\Server Preferences\File]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993248">Value:
! &quot;hostname or ip address&quot;</a></span></p>
! 
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993249">A.2.
! Integrated Logon Network provider parameters</a></span></p>
! 
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993250">Regkey:
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993251">Value:
! FailLoginsSilently</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993252">Regkey:
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993253">Value:
! NoWarnings</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993254">Value:
! AuthentProviderPath</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993255">Value:
! Class</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993256">Value:
! DependOnGroup</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993257">Value:
! DependOnService</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993258">Value:
! Name</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993259">Value:
! ProviderPath</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993260">A.2.1
! Domain specific configuration keys for the Network Provider</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993261">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993262">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain]</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993263">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain&quot;domain
  name&quot;]</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993264">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST]</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993265">Example:</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993266">A.2.1.1
! Domain specific configuration values</a></span></p>
  
! <p class=MsoToc4><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993267">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain]
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain&quot;domain
  name&quot;]
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993268">Value:
! LogonOptions</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993269">Value:
! FailLoginsSilentl</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993270">Value:
! LogonScript</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993271">Value:
! LoginRetryInterval</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993272">Value:
! LoginSleepInterval</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993273">Value:
! TheseCells</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993274">A.2.1.2
! Selection of effective values for domain specific configuration</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993275">A.2.1.3
! Exceptions to A.2.1.2</a></span></p>
  
! <p class=MsoToc4><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993276">2.1.3.1
! 'FailLoginsSilently'</a></span></p>
  
! <p class=MsoToc4><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993277">2.1.3.2
! 'LogonScript'</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993278">A.3.
! AFS Credentials System Tray Tool parameters</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993279">Regkey:
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993280">Value:
! Gateway</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993281">Value:
! Cell</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993282">Regkey:
! [HKLM\SOFTWARE\OpenAFS\Client] [HKCU\SOFTWARE\OpenAFS\Client]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993283">Value:
! ShowTrayIcon</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993284">Value:
! EnableKFW</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993285">Value:
! Use524</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993286">Value:
! AfscredsShortcutParams</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993287">Regkey:
! [HKCU\SOFTWARE\OpenAFS\Client]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993288">Value:
! Authentication Cell</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993289">Regkey:
  [HKCU\SOFTWARE\OpenAFS\Client\Reminders]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993290">Value:
! &quot;afs cell name&quot;</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993291">Regkey:
  [HKCU\SOFTWARE\OpenAFS\Client\Active Maps]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993292">Value:
! &quot;upper case drive letter&quot;</a></span></p>
  
! <p class=MsoToc3><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993293">Regkey:
  [HKCU\SOFTWARE\OpenAFS\Client\Mappings]</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993294">Value:
! &quot;upper case drive letter&quot;</a></span></p>
  
! <p class=MsoToc2><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993295">A.4
! OpenAFS Client Service Environment Variables</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993296">Variable:
! AFS_RPC_ENCRYPT</a></span></p>
  
! <p class=MsoToc5><span class=MsoHyperlink><a href="relnotes.htm#_Toc139993297">Variable:
! AFS_RPC_PROTSEQ</a></span></p>
  
  <p class=MsoNormal>&nbsp;</p>
  
Index: openafs/src/WINNT/install/NSIS/CellServDB
diff -c openafs/src/WINNT/install/NSIS/CellServDB:1.6 openafs/src/WINNT/install/NSIS/CellServDB:1.6.4.1
*** openafs/src/WINNT/install/NSIS/CellServDB:1.6	Sat Oct 15 20:55:59 2005
--- openafs/src/WINNT/install/NSIS/CellServDB	Sun Oct  8 23:15:07 2006
***************
*** 1,15 ****
! >grand.central.org      #GCO Public CellServDB 15 Oct 2005
  18.7.14.88                      #grand-opening.mit.edu
  128.2.191.224                   #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
  >wu-wien.ac.at          #University of Economics, Vienna, Austria
! 137.208.3.33                    #afsdb1.wu-wien.ac.at
! 137.208.8.12                    #caesar.wu-wien.ac.at
! 137.208.127.33                  #buddy.wu-wien.ac.at
  >hephy.at               #hephy-vienna
  193.170.243.10                  #mowgli.oeaw.ac.at
  193.170.243.12                  #baloo.oeaw.ac.at
  193.170.243.14                  #akela.oeaw.ac.at
  >itp.tugraz.at          #Institute for Theoretical Physics, TU Graz, Austria
  129.27.157.6                    #fubphsv2.tu-graz.ac.at
  129.27.161.7                    #faepsv01.tu-graz.ac.at
--- 1,19 ----
! >grand.central.org      #GCO Public CellServDB 08 Oct 2006
  18.7.14.88                      #grand-opening.mit.edu
  128.2.191.224                   #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
  >wu-wien.ac.at          #University of Economics, Vienna, Austria
! 137.208.3.33                    #goya.wu-wien.ac.at
! 137.208.7.57                    #caravaggio.wu-wien.ac.at
! 137.208.127.57                  #vermeer.wu-wien.ac.at
  >hephy.at               #hephy-vienna
  193.170.243.10                  #mowgli.oeaw.ac.at
  193.170.243.12                  #baloo.oeaw.ac.at
  193.170.243.14                  #akela.oeaw.ac.at
+ >cgv.tugraz.at          #CGV cell
+ 129.27.224.133                  #phobos.cgv.tugraz.at
+ 129.27.224.134                  #deimos.cgv.tugraz.at
+ 129.27.224.210                  #trinculo.cgv.tugraz.at
  >itp.tugraz.at          #Institute for Theoretical Physics, TU Graz, Austria
  129.27.157.6                    #fubphsv2.tu-graz.ac.at
  129.27.161.7                    #faepsv01.tu-graz.ac.at
***************
*** 22,30 ****
  137.138.206.77                  #pcamsf2.cern.ch
  137.138.206.123                 #pcamsf4.cern.ch
  >epfl.ch                #Swiss Federal Institute of Technology at Lausanne
! 128.178.2.6                     #kd1.epfl.ch
! 128.178.2.7                     #kd2.epfl.ch
! 128.178.2.8                     #kd3.epfl.ch
  >ethz.ch                #Swiss Federal Inst. of Tech. - Zurich, Switzerland
  129.132.97.19                   #amalthea.ethz.ch
  129.132.97.27                   #nethzafs-001.ethz.ch
--- 26,34 ----
  137.138.206.77                  #pcamsf2.cern.ch
  137.138.206.123                 #pcamsf4.cern.ch
  >epfl.ch                #Swiss Federal Institute of Technology at Lausanne
! 128.178.109.111                 #kd1.epfl.ch
! 128.178.109.112                 #kd2.epfl.ch
! 128.178.109.113                 #kd3.epfl.ch
  >ethz.ch                #Swiss Federal Inst. of Tech. - Zurich, Switzerland
  129.132.97.19                   #amalthea.ethz.ch
  129.132.97.27                   #nethzafs-001.ethz.ch
***************
*** 37,44 ****
  129.129.190.142                 #afs02.psi.ch
  >extundo.com            #Simon Josefsson's cell
  195.42.214.241                  #slipsten.extundo.com
- >mekinok.com            #Mekinok, Inc.
- 4.36.43.98                      #loggerhead.mekinok.com
  >membrain.com           #membrain.com
  66.93.118.125                   #stormy
  130.85.24.11                    #weasel
--- 41,46 ----
***************
*** 105,121 ****
  144.41.2.3                      #rs14.serv.uni-hohenheim.de
  144.41.2.4                      #rs15.serv.uni-hohenheim.de
  >rz.uni-jena.de         #Rechenzentrum University of Jena, Germany
! 141.35.2.160                    #lc00.rz.uni-jena.de
! 141.35.7.9                      #fsuj01.rz.uni-jena.de
! 141.35.7.10                     #zaphod.rz.uni-jena
  >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
  134.95.144.22                   #afs1.meteo.uni-koeln.de
  134.95.144.24                   #afs2.meteo.uni-koeln.de
  >rrz.uni-koeln.de       #University of Cologne - Reg Comp Center
  134.95.19.3                     #afsdb1.rrz.uni-koeln.de
! 134.95.19.30                    #fileserv3.rrz.uni-koeln.de
  134.95.67.97                    #afs.thp.uni-koeln.de
! 134.95.140.190                  #rzkbserv.rrz.uni-koeln.de
  >physik.uni-mainz.de    #institute of physics, university Mainz, Germany
  134.93.130.93                   #hardy.physik.uni-mainz.de
  >uni-mannheim.de        #Uni Mannheim (Rechenzentrum)
--- 107,123 ----
  144.41.2.3                      #rs14.serv.uni-hohenheim.de
  144.41.2.4                      #rs15.serv.uni-hohenheim.de
  >rz.uni-jena.de         #Rechenzentrum University of Jena, Germany
! 141.35.2.180                    #afs00.rz.uni-jena.de
! 141.35.2.181                    #afs01.rz.uni-jena.de
! 141.35.2.182                    #afs02.rz.uni-jena.de
  >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
  134.95.144.22                   #afs1.meteo.uni-koeln.de
  134.95.144.24                   #afs2.meteo.uni-koeln.de
  >rrz.uni-koeln.de       #University of Cologne - Reg Comp Center
  134.95.19.3                     #afsdb1.rrz.uni-koeln.de
! 134.95.19.10                    #lyra.rrz.uni-koeln.de
  134.95.67.97                    #afs.thp.uni-koeln.de
! 134.95.141.243                  #agrippina.rrz.uni-koeln.de
  >physik.uni-mainz.de    #institute of physics, university Mainz, Germany
  134.93.130.93                   #hardy.physik.uni-mainz.de
  >uni-mannheim.de        #Uni Mannheim (Rechenzentrum)
***************
*** 172,179 ****
  204.194.25.7                    #afs1.qatar.cmu.edu
  204.194.25.8                    #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
! 128.2.56.129                    #nihao.sbp.ri.cmu.edu
! 128.2.56.136                    #youtheman.sbp.ri.cmu.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
--- 174,181 ----
  204.194.25.7                    #afs1.qatar.cmu.edu
  204.194.25.8                    #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
! 128.2.179.12                    #nihao.sbp.ri.cmu.edu
! 128.2.179.113                   #youtheman.sbp.ri.cmu.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
***************
*** 186,191 ****
--- 188,195 ----
  129.170.16.22                   #halley.dartmouth.edu
  129.170.16.42                   #oort.dartmouth.edu
  129.170.16.43                   #cygnusx1.dartmouth.edu
+ >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
***************
*** 261,266 ****
--- 265,280 ----
  134.79.18.25                    #afsdb1.slac.stanford.edu
  134.79.18.26                    #afsdb2.slac.stanford.edu
  134.79.18.27                    #afsdb3.slac.stanford.edu
+ >ucdavis.edu            #University of California at Davis
+ 169.237.104.100                 #afs1.ucdavis.edu
+ 169.237.235.176                 #afs2.ucdavis.edu
+ 169.237.247.91                  #afs3.ucdavis.edu
+ >home.ucdavis.edu       #University of California at Davis home directories
+ 169.237.105.91                  #home1.ucdavis.edu
+ 169.237.105.92                  #home2.ucdavis.edu
+ 169.237.105.93                  #home3.ucdavis.edu
+ >physics.ucsb.edu       #UC Santa Barbara, Physics Dept
+ 128.111.18.161                  #ledzeppelin.physics.ucsb.edu
  >cats.ucsc.edu          #UC Santa Cruz, Comm. and Tech. Services, California U.S.A
  128.114.129.14                  #elan.ucsc.edu
  128.114.129.15                  #ichabod.ucsc.edu
***************
*** 291,316 ****
  141.211.1.34                    #ruthless.ifs.umich.edu
  >atlas.umich.edu        #ATLAS group cell in physics at University of Michigan
  141.211.43.102                  #linat02.grid.umich.edu
! 141.211.43.106                  #linat06.grid.umich.edu
! 141.211.43.109                  #atgrid.grid.umich.edu
  >citi.umich.edu         #Center for Information Technology Integration
  141.211.133.5                   #babylon.citi.umich.edu
  >lsa.umich.edu          #University of Michigan - College of LS&A
  141.211.211.53                  #gerow.lsa.umich.edu
  141.211.211.72                  #collines.lsa.umich.edu
  141.211.211.153                 #hodges.lsa.umich.edu
! >umr.edu                #University of Missouri - Rolla
! 131.151.1.59                    #afsdb1.umr.edu
! 131.151.1.70                    #afsdb3.umr.edu
! 131.151.1.146                   #afsdb2.umr.edu
  >physics.unc.edu        #Univ. of NC at Chapel Hill, Dept. of Physics
  152.2.4.1                       #who.physics.unc.edu
  152.2.4.3                       #what.physics.unc.edu
  152.2.4.5                       #when.physics.unc.edu
  >uncc.edu               #University of NC at Charlotte Mosaic AFS Cell
  152.15.10.70                    #as-sm1.uncc.edu
! 152.15.13.7                     #as-sm2.uncc.edu
! 152.15.30.27                    #fs-kenn3.uncc.edu
  >eng.utah.edu           #University of Utah - Engineering
  155.99.222.9                    #lenny.eng.utah.edu
  155.99.222.10                   #carl.eng.utah.edu
--- 305,328 ----
  141.211.1.34                    #ruthless.ifs.umich.edu
  >atlas.umich.edu        #ATLAS group cell in physics at University of Michigan
  141.211.43.102                  #linat02.grid.umich.edu
! 141.211.43.103                  #linat03.grid.umich.edu
! 141.211.43.104                  #linat04.grid.umich.edu
  >citi.umich.edu         #Center for Information Technology Integration
  141.211.133.5                   #babylon.citi.umich.edu
  >lsa.umich.edu          #University of Michigan - College of LS&A
  141.211.211.53                  #gerow.lsa.umich.edu
  141.211.211.72                  #collines.lsa.umich.edu
  141.211.211.153                 #hodges.lsa.umich.edu
! >sph.umich.edu          #University of Michigan -- School of Public Health
! 141.211.50.41                   #afssph0.sph.umich.edu
  >physics.unc.edu        #Univ. of NC at Chapel Hill, Dept. of Physics
  152.2.4.1                       #who.physics.unc.edu
  152.2.4.3                       #what.physics.unc.edu
  152.2.4.5                       #when.physics.unc.edu
  >uncc.edu               #University of NC at Charlotte Mosaic AFS Cell
  152.15.10.70                    #as-sm1.uncc.edu
! 152.15.93.186                   #as-ece1.uncc.edu
! 152.15.181.175                  #as-me1.uncc.edu
  >eng.utah.edu           #University of Utah - Engineering
  155.99.222.9                    #lenny.eng.utah.edu
  155.99.222.10                   #carl.eng.utah.edu
***************
*** 344,349 ****
--- 356,363 ----
  >dapnia.saclay.cea.fr   #CEA DAPNIA
  132.166.32.7                    #dphrsg.saclay.cea.fr
  132.166.32.12                   #dphrsl.saclay.cea.fr
+ >grif.fr                #GRIF cell
+ 192.54.208.18                   #node03.datagrid.cea.fr
  >in2p3.fr               #IN2P3 production cell
  134.158.232.11                  #ccafsdb1.in2p3.fr
  134.158.232.12                  #ccafsdb2.in2p3.fr
***************
*** 401,406 ****
--- 415,421 ----
  192.84.134.75                   #afsna.na.infn.it
  >ba.infn.it             #INFN, Sezione di Bari
  193.206.185.235                 #baafsserver.ba.infn.it
+ 193.206.185.236                 #debsrv.ba.infn.it
  >kloe.infn.it           #INFN, KLOE experiment at Laboratori di Frascati
  192.135.25.111                  #kloeafs1.lnf.infn.it
  192.135.25.112                  #kloeafs2.lnf.infn.it
***************
*** 451,461 ****
  >laroia.net             #Laroia Networks
  66.66.102.254                   #supercore.laroia.net
  >sinenomine.net         #Sine Nomine Associates
! 66.92.236.139                   #afs.sinenomine.net
  >slackers.net           #The Slackers' Network
  63.201.48.27                    #alexandria.slackers.net
  >tproa.net              #The People's Republic of Ames
  209.234.76.70                   #service-3.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
--- 466,478 ----
  >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
  209.234.76.70                   #service-3.tproa.net
+ 209.234.76.75                   #service-4.tproa.net
+ 209.234.76.76                   #service-5.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
***************
*** 484,505 ****
  >oc7.org                #The OC7 Project
  128.2.122.140                   #knife.oc7.org
  207.22.77.170                   #spoon.oc7.org
! >openafs.org            #OpenAFS Project
! 18.7.14.88                      #grand-opening.mit.edu
! 128.2.191.224                   #penn.central.org
! 130.237.48.87                   #andrew.e.kth.se
! >e.kth.se               #Royal Institute of Technology, Elektro
  130.237.32.145                  #sonen.e.kth.se
  130.237.48.7                    #anden.e.kth.se
  130.237.48.244                  #fadern.e.kth.se
  >hallf.kth.se           #Royal Institute of Technology, HALLF
! 130.237.24.141                  #rasmus13.hallf.kth.se
! 130.237.24.152                  #rasmus3.hallf.kth.se
! 130.237.24.177                  #rasmus29.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
! 130.237.202.12                  #afsdb2.isk.kth.se
! 130.237.206.13                  #afsdb1.isk.kth.se
! 130.237.209.141                 #afsdb3.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
--- 501,516 ----
  >oc7.org                #The OC7 Project
  128.2.122.140                   #knife.oc7.org
  207.22.77.170                   #spoon.oc7.org
! >kth.se                 #Royal Institute of Technology, Stockholm, Sweden
  130.237.32.145                  #sonen.e.kth.se
  130.237.48.7                    #anden.e.kth.se
  130.237.48.244                  #fadern.e.kth.se
  >hallf.kth.se           #Royal Institute of Technology, HALLF
! 130.237.24.11                   #afs1.hallf.kth.se
! 130.237.24.104                  #afs2.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
! 130.237.202.3                   #afsdb1.isk.kth.se
! 130.237.209.39                  #ezri.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
***************
*** 543,548 ****
--- 554,566 ----
  193.2.120.2                     #solkan.p-ng.si
  >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
+ 129.215.64.16                   #afsdb0.inf.ed.ac.uk
+ 129.215.64.17                   #afsdb1.inf.ed.ac.uk
+ 129.215.64.18                   #afsdb2.inf.ed.ac.uk
+ >ic.ac.uk               #Imperial College London
+ 155.198.63.148                  #icafs2.cc.ic.ac.uk
+ 155.198.63.149                  #icafs1.cc.ic.ac.uk
  >hep.man.ac.uk          #Manchester HEP
  194.36.2.3                      #afs1.hep.man.ac.uk
  194.36.2.4                      #afs2.hep.man.ac.uk
Index: openafs/src/WINNT/install/NSIS/OpenAFS.nsi
diff -c openafs/src/WINNT/install/NSIS/OpenAFS.nsi:1.88.4.3 openafs/src/WINNT/install/NSIS/OpenAFS.nsi:1.88.4.4
*** openafs/src/WINNT/install/NSIS/OpenAFS.nsi:1.88.4.3	Wed Sep  6 01:10:48 2006
--- openafs/src/WINNT/install/NSIS/OpenAFS.nsi	Thu Oct 12 17:19:42 2006
***************
*** 85,90 ****
--- 85,91 ----
    !define AFS_COMPANY_NAME "OpenAFS"
    !define AFS_PRODUCT_NAME "OpenAFS"
    !define AFS_REGKEY_ROOT "Software\TransarcCorporation"
+   !define NID_PLUGIN_MGR  "Software\MIT\NetIDMgr\PluginManager"
    CRCCheck force
  
    ;Folder selection page
***************
*** 539,545 ****
    File "${AFS_CLIENT_BUILDDIR}\afsdacl.exe"
    File "${AFS_CLIENT_BUILDDIR}\cmdebug.exe"
    File "${AFS_CLIENT_BUILDDIR}\aklog.exe"
!   File "${AFS_CLIENT_BUILDDIR}\afscreds.exe"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.dll" "$INSTDIR\Client\Program\afs_shl_ext.dll" "$INSTDIR"
    File "${AFS_CLIENT_BUILDDIR}\afsd_service.exe"
    File "${AFS_CLIENT_BUILDDIR}\symlink.exe"
--- 540,546 ----
    File "${AFS_CLIENT_BUILDDIR}\afsdacl.exe"
    File "${AFS_CLIENT_BUILDDIR}\cmdebug.exe"
    File "${AFS_CLIENT_BUILDDIR}\aklog.exe"
!   !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds.exe"	   "$INSTDIR\Client\Program\afscreds.exe"    "$INSTDIR"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.dll" "$INSTDIR\Client\Program\afs_shl_ext.dll" "$INSTDIR"
    File "${AFS_CLIENT_BUILDDIR}\afsd_service.exe"
    File "${AFS_CLIENT_BUILDDIR}\symlink.exe"
***************
*** 553,558 ****
--- 554,562 ----
    File "${AFS_DESTDIR}\etc\rxdebug.exe"
    File "${AFS_DESTDIR}\etc\backup.exe"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa.cpl" "$INSTDIR\Client\Program\afs_cpa.cpl" "$INSTDIR"
+   !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscred.dll" "$INSTDIR\Client\Program\afscred.dll" "$INSTDIR"
+   !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscred_en_us.dll" "$INSTDIR\Client\Program\afscred_en_us.dll" "$INSTDIR"
+   File "${AFS_CLIENT_BUILDDIR}\afsplhlp.chm"
    
    SetOutPath "$SYSDIR"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afslogon.dll" "$SYSDIR\afslogon.dll" "$INSTDIR"
***************
*** 626,631 ****
--- 630,647 ----
     DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Debug"
  !endif
  
+   ;NetIDMgr Plug-in Reg Entries
+   WriteRegStr HKLM "${NID_PLUGIN_MGR}\Modules\OpenAFS" "ImagePath" "$INSTDIR\Client\Program\afscred.dll"
+   WriteRegStr HKLM "${NID_PLUGIN_MGR}\Modules\OpenAFS" "Description" "OpenAFS Module"
+   WriteRegStr HKLM "${NID_PLUGIN_MGR}\Modules\OpenAFS" "Vendor" "Secure Endpoints Inc."
+   WriteRegStr HKLM "${NID_PLUGIN_MGR}\Modules\OpenAFS" "PluginList" "AfsCred"
+   WriteRegDWORD HKLM "${NID_PLUGIN_MGR}\Modules\OpenAFS" "NoUnload" "1"
+   
+   WriteRegStr HKLM "${NID_PLUGIN_MGR}\Plugins\AfsCred" "Module" "OpenAFS"
+   WriteRegStr HKLM "${NID_PLUGIN_MGR}\Plugins\AfsCred" "Description" "AFS Credentials Provider"
+   WriteRegStr HKLM "${NID_PLUGIN_MGR}\Plugins\AfsCred" "Dependencies" "Krb5Cred"
+   WriteRegDWORD HKLM "${NID_PLUGIN_MGR}\Plugins\AfsCred" "Type" "1"
+ 
     ; On Windows 2000 work around KB301673.  This is fixed in Windows XP and 2003
     Call GetWindowsVersion
     Pop $R1
***************
*** 1133,1138 ****
--- 1149,1155 ----
    File "${AFS_DESTDIR}\etc\rxdebug.pdb"
    File "${AFS_DESTDIR}\etc\backup.pdb"
    File "${AFS_CLIENT_BUILDDIR}\afs_cpa.pdb"
+   File "${AFS_CLIENT_BUILDDIR}\afscred.pdb"
  
    SetOutPath "$SYSDIR"
    File "${AFS_CLIENT_BUILDDIR}\afslogon.pdb"
***************
*** 1998,2003 ****
--- 2015,2023 ----
    DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion"
    DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server"
    DeleteRegKey /ifempty HKLM "${AFS_REGKEY_ROOT}"
+   DeleteRegKey HKLM "${NID_PLUGIN_MGR}\Modules\OpenAFS"
+   DeleteRegKey HKLM "${NID_PLUGIN_MGR}\Plugins\AfsCred"
+   DeleteRegKey /ifempty HKLM "Software\MIT\NetIDMgr"
    DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS"
    DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled"
  
Index: openafs/src/WINNT/install/Win9x/CellServDB
diff -c openafs/src/WINNT/install/Win9x/CellServDB:1.6 openafs/src/WINNT/install/Win9x/CellServDB:1.6.4.1
*** openafs/src/WINNT/install/Win9x/CellServDB:1.6	Sat Oct 15 20:56:03 2005
--- openafs/src/WINNT/install/Win9x/CellServDB	Sun Oct  8 23:15:11 2006
***************
*** 1,15 ****
! >grand.central.org      #GCO Public CellServDB 15 Oct 2005
  18.7.14.88                      #grand-opening.mit.edu
  128.2.191.224                   #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
  >wu-wien.ac.at          #University of Economics, Vienna, Austria
! 137.208.3.33                    #afsdb1.wu-wien.ac.at
! 137.208.8.12                    #caesar.wu-wien.ac.at
! 137.208.127.33                  #buddy.wu-wien.ac.at
  >hephy.at               #hephy-vienna
  193.170.243.10                  #mowgli.oeaw.ac.at
  193.170.243.12                  #baloo.oeaw.ac.at
  193.170.243.14                  #akela.oeaw.ac.at
  >itp.tugraz.at          #Institute for Theoretical Physics, TU Graz, Austria
  129.27.157.6                    #fubphsv2.tu-graz.ac.at
  129.27.161.7                    #faepsv01.tu-graz.ac.at
--- 1,19 ----
! >grand.central.org      #GCO Public CellServDB 08 Oct 2006
  18.7.14.88                      #grand-opening.mit.edu
  128.2.191.224                   #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
  >wu-wien.ac.at          #University of Economics, Vienna, Austria
! 137.208.3.33                    #goya.wu-wien.ac.at
! 137.208.7.57                    #caravaggio.wu-wien.ac.at
! 137.208.127.57                  #vermeer.wu-wien.ac.at
  >hephy.at               #hephy-vienna
  193.170.243.10                  #mowgli.oeaw.ac.at
  193.170.243.12                  #baloo.oeaw.ac.at
  193.170.243.14                  #akela.oeaw.ac.at
+ >cgv.tugraz.at          #CGV cell
+ 129.27.224.133                  #phobos.cgv.tugraz.at
+ 129.27.224.134                  #deimos.cgv.tugraz.at
+ 129.27.224.210                  #trinculo.cgv.tugraz.at
  >itp.tugraz.at          #Institute for Theoretical Physics, TU Graz, Austria
  129.27.157.6                    #fubphsv2.tu-graz.ac.at
  129.27.161.7                    #faepsv01.tu-graz.ac.at
***************
*** 22,30 ****
  137.138.206.77                  #pcamsf2.cern.ch
  137.138.206.123                 #pcamsf4.cern.ch
  >epfl.ch                #Swiss Federal Institute of Technology at Lausanne
! 128.178.2.6                     #kd1.epfl.ch
! 128.178.2.7                     #kd2.epfl.ch
! 128.178.2.8                     #kd3.epfl.ch
  >ethz.ch                #Swiss Federal Inst. of Tech. - Zurich, Switzerland
  129.132.97.19                   #amalthea.ethz.ch
  129.132.97.27                   #nethzafs-001.ethz.ch
--- 26,34 ----
  137.138.206.77                  #pcamsf2.cern.ch
  137.138.206.123                 #pcamsf4.cern.ch
  >epfl.ch                #Swiss Federal Institute of Technology at Lausanne
! 128.178.109.111                 #kd1.epfl.ch
! 128.178.109.112                 #kd2.epfl.ch
! 128.178.109.113                 #kd3.epfl.ch
  >ethz.ch                #Swiss Federal Inst. of Tech. - Zurich, Switzerland
  129.132.97.19                   #amalthea.ethz.ch
  129.132.97.27                   #nethzafs-001.ethz.ch
***************
*** 37,44 ****
  129.129.190.142                 #afs02.psi.ch
  >extundo.com            #Simon Josefsson's cell
  195.42.214.241                  #slipsten.extundo.com
- >mekinok.com            #Mekinok, Inc.
- 4.36.43.98                      #loggerhead.mekinok.com
  >membrain.com           #membrain.com
  66.93.118.125                   #stormy
  130.85.24.11                    #weasel
--- 41,46 ----
***************
*** 105,121 ****
  144.41.2.3                      #rs14.serv.uni-hohenheim.de
  144.41.2.4                      #rs15.serv.uni-hohenheim.de
  >rz.uni-jena.de         #Rechenzentrum University of Jena, Germany
! 141.35.2.160                    #lc00.rz.uni-jena.de
! 141.35.7.9                      #fsuj01.rz.uni-jena.de
! 141.35.7.10                     #zaphod.rz.uni-jena
  >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
  134.95.144.22                   #afs1.meteo.uni-koeln.de
  134.95.144.24                   #afs2.meteo.uni-koeln.de
  >rrz.uni-koeln.de       #University of Cologne - Reg Comp Center
  134.95.19.3                     #afsdb1.rrz.uni-koeln.de
! 134.95.19.30                    #fileserv3.rrz.uni-koeln.de
  134.95.67.97                    #afs.thp.uni-koeln.de
! 134.95.140.190                  #rzkbserv.rrz.uni-koeln.de
  >physik.uni-mainz.de    #institute of physics, university Mainz, Germany
  134.93.130.93                   #hardy.physik.uni-mainz.de
  >uni-mannheim.de        #Uni Mannheim (Rechenzentrum)
--- 107,123 ----
  144.41.2.3                      #rs14.serv.uni-hohenheim.de
  144.41.2.4                      #rs15.serv.uni-hohenheim.de
  >rz.uni-jena.de         #Rechenzentrum University of Jena, Germany
! 141.35.2.180                    #afs00.rz.uni-jena.de
! 141.35.2.181                    #afs01.rz.uni-jena.de
! 141.35.2.182                    #afs02.rz.uni-jena.de
  >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
  134.95.144.22                   #afs1.meteo.uni-koeln.de
  134.95.144.24                   #afs2.meteo.uni-koeln.de
  >rrz.uni-koeln.de       #University of Cologne - Reg Comp Center
  134.95.19.3                     #afsdb1.rrz.uni-koeln.de
! 134.95.19.10                    #lyra.rrz.uni-koeln.de
  134.95.67.97                    #afs.thp.uni-koeln.de
! 134.95.141.243                  #agrippina.rrz.uni-koeln.de
  >physik.uni-mainz.de    #institute of physics, university Mainz, Germany
  134.93.130.93                   #hardy.physik.uni-mainz.de
  >uni-mannheim.de        #Uni Mannheim (Rechenzentrum)
***************
*** 172,179 ****
  204.194.25.7                    #afs1.qatar.cmu.edu
  204.194.25.8                    #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
! 128.2.56.129                    #nihao.sbp.ri.cmu.edu
! 128.2.56.136                    #youtheman.sbp.ri.cmu.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
--- 174,181 ----
  204.194.25.7                    #afs1.qatar.cmu.edu
  204.194.25.8                    #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
! 128.2.179.12                    #nihao.sbp.ri.cmu.edu
! 128.2.179.113                   #youtheman.sbp.ri.cmu.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
***************
*** 186,191 ****
--- 188,195 ----
  129.170.16.22                   #halley.dartmouth.edu
  129.170.16.42                   #oort.dartmouth.edu
  129.170.16.43                   #cygnusx1.dartmouth.edu
+ >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
***************
*** 261,266 ****
--- 265,280 ----
  134.79.18.25                    #afsdb1.slac.stanford.edu
  134.79.18.26                    #afsdb2.slac.stanford.edu
  134.79.18.27                    #afsdb3.slac.stanford.edu
+ >ucdavis.edu            #University of California at Davis
+ 169.237.104.100                 #afs1.ucdavis.edu
+ 169.237.235.176                 #afs2.ucdavis.edu
+ 169.237.247.91                  #afs3.ucdavis.edu
+ >home.ucdavis.edu       #University of California at Davis home directories
+ 169.237.105.91                  #home1.ucdavis.edu
+ 169.237.105.92                  #home2.ucdavis.edu
+ 169.237.105.93                  #home3.ucdavis.edu
+ >physics.ucsb.edu       #UC Santa Barbara, Physics Dept
+ 128.111.18.161                  #ledzeppelin.physics.ucsb.edu
  >cats.ucsc.edu          #UC Santa Cruz, Comm. and Tech. Services, California U.S.A
  128.114.129.14                  #elan.ucsc.edu
  128.114.129.15                  #ichabod.ucsc.edu
***************
*** 291,316 ****
  141.211.1.34                    #ruthless.ifs.umich.edu
  >atlas.umich.edu        #ATLAS group cell in physics at University of Michigan
  141.211.43.102                  #linat02.grid.umich.edu
! 141.211.43.106                  #linat06.grid.umich.edu
! 141.211.43.109                  #atgrid.grid.umich.edu
  >citi.umich.edu         #Center for Information Technology Integration
  141.211.133.5                   #babylon.citi.umich.edu
  >lsa.umich.edu          #University of Michigan - College of LS&A
  141.211.211.53                  #gerow.lsa.umich.edu
  141.211.211.72                  #collines.lsa.umich.edu
  141.211.211.153                 #hodges.lsa.umich.edu
! >umr.edu                #University of Missouri - Rolla
! 131.151.1.59                    #afsdb1.umr.edu
! 131.151.1.70                    #afsdb3.umr.edu
! 131.151.1.146                   #afsdb2.umr.edu
  >physics.unc.edu        #Univ. of NC at Chapel Hill, Dept. of Physics
  152.2.4.1                       #who.physics.unc.edu
  152.2.4.3                       #what.physics.unc.edu
  152.2.4.5                       #when.physics.unc.edu
  >uncc.edu               #University of NC at Charlotte Mosaic AFS Cell
  152.15.10.70                    #as-sm1.uncc.edu
! 152.15.13.7                     #as-sm2.uncc.edu
! 152.15.30.27                    #fs-kenn3.uncc.edu
  >eng.utah.edu           #University of Utah - Engineering
  155.99.222.9                    #lenny.eng.utah.edu
  155.99.222.10                   #carl.eng.utah.edu
--- 305,328 ----
  141.211.1.34                    #ruthless.ifs.umich.edu
  >atlas.umich.edu        #ATLAS group cell in physics at University of Michigan
  141.211.43.102                  #linat02.grid.umich.edu
! 141.211.43.103                  #linat03.grid.umich.edu
! 141.211.43.104                  #linat04.grid.umich.edu
  >citi.umich.edu         #Center for Information Technology Integration
  141.211.133.5                   #babylon.citi.umich.edu
  >lsa.umich.edu          #University of Michigan - College of LS&A
  141.211.211.53                  #gerow.lsa.umich.edu
  141.211.211.72                  #collines.lsa.umich.edu
  141.211.211.153                 #hodges.lsa.umich.edu
! >sph.umich.edu          #University of Michigan -- School of Public Health
! 141.211.50.41                   #afssph0.sph.umich.edu
  >physics.unc.edu        #Univ. of NC at Chapel Hill, Dept. of Physics
  152.2.4.1                       #who.physics.unc.edu
  152.2.4.3                       #what.physics.unc.edu
  152.2.4.5                       #when.physics.unc.edu
  >uncc.edu               #University of NC at Charlotte Mosaic AFS Cell
  152.15.10.70                    #as-sm1.uncc.edu
! 152.15.93.186                   #as-ece1.uncc.edu
! 152.15.181.175                  #as-me1.uncc.edu
  >eng.utah.edu           #University of Utah - Engineering
  155.99.222.9                    #lenny.eng.utah.edu
  155.99.222.10                   #carl.eng.utah.edu
***************
*** 344,349 ****
--- 356,363 ----
  >dapnia.saclay.cea.fr   #CEA DAPNIA
  132.166.32.7                    #dphrsg.saclay.cea.fr
  132.166.32.12                   #dphrsl.saclay.cea.fr
+ >grif.fr                #GRIF cell
+ 192.54.208.18                   #node03.datagrid.cea.fr
  >in2p3.fr               #IN2P3 production cell
  134.158.232.11                  #ccafsdb1.in2p3.fr
  134.158.232.12                  #ccafsdb2.in2p3.fr
***************
*** 401,406 ****
--- 415,421 ----
  192.84.134.75                   #afsna.na.infn.it
  >ba.infn.it             #INFN, Sezione di Bari
  193.206.185.235                 #baafsserver.ba.infn.it
+ 193.206.185.236                 #debsrv.ba.infn.it
  >kloe.infn.it           #INFN, KLOE experiment at Laboratori di Frascati
  192.135.25.111                  #kloeafs1.lnf.infn.it
  192.135.25.112                  #kloeafs2.lnf.infn.it
***************
*** 451,461 ****
  >laroia.net             #Laroia Networks
  66.66.102.254                   #supercore.laroia.net
  >sinenomine.net         #Sine Nomine Associates
! 66.92.236.139                   #afs.sinenomine.net
  >slackers.net           #The Slackers' Network
  63.201.48.27                    #alexandria.slackers.net
  >tproa.net              #The People's Republic of Ames
  209.234.76.70                   #service-3.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
--- 466,478 ----
  >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
  209.234.76.70                   #service-3.tproa.net
+ 209.234.76.75                   #service-4.tproa.net
+ 209.234.76.76                   #service-5.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
***************
*** 484,505 ****
  >oc7.org                #The OC7 Project
  128.2.122.140                   #knife.oc7.org
  207.22.77.170                   #spoon.oc7.org
! >openafs.org            #OpenAFS Project
! 18.7.14.88                      #grand-opening.mit.edu
! 128.2.191.224                   #penn.central.org
! 130.237.48.87                   #andrew.e.kth.se
! >e.kth.se               #Royal Institute of Technology, Elektro
  130.237.32.145                  #sonen.e.kth.se
  130.237.48.7                    #anden.e.kth.se
  130.237.48.244                  #fadern.e.kth.se
  >hallf.kth.se           #Royal Institute of Technology, HALLF
! 130.237.24.141                  #rasmus13.hallf.kth.se
! 130.237.24.152                  #rasmus3.hallf.kth.se
! 130.237.24.177                  #rasmus29.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
! 130.237.202.12                  #afsdb2.isk.kth.se
! 130.237.206.13                  #afsdb1.isk.kth.se
! 130.237.209.141                 #afsdb3.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
--- 501,516 ----
  >oc7.org                #The OC7 Project
  128.2.122.140                   #knife.oc7.org
  207.22.77.170                   #spoon.oc7.org
! >kth.se                 #Royal Institute of Technology, Stockholm, Sweden
  130.237.32.145                  #sonen.e.kth.se
  130.237.48.7                    #anden.e.kth.se
  130.237.48.244                  #fadern.e.kth.se
  >hallf.kth.se           #Royal Institute of Technology, HALLF
! 130.237.24.11                   #afs1.hallf.kth.se
! 130.237.24.104                  #afs2.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
! 130.237.202.3                   #afsdb1.isk.kth.se
! 130.237.209.39                  #ezri.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
***************
*** 543,548 ****
--- 554,566 ----
  193.2.120.2                     #solkan.p-ng.si
  >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
+ 129.215.64.16                   #afsdb0.inf.ed.ac.uk
+ 129.215.64.17                   #afsdb1.inf.ed.ac.uk
+ 129.215.64.18                   #afsdb2.inf.ed.ac.uk
+ >ic.ac.uk               #Imperial College London
+ 155.198.63.148                  #icafs2.cc.ic.ac.uk
+ 155.198.63.149                  #icafs1.cc.ic.ac.uk
  >hep.man.ac.uk          #Manchester HEP
  194.36.2.3                      #afs1.hep.man.ac.uk
  194.36.2.4                      #afs2.hep.man.ac.uk
Index: openafs/src/WINNT/install/loopback/wmi.cpp
diff -c openafs/src/WINNT/install/loopback/wmi.cpp:1.4 openafs/src/WINNT/install/loopback/wmi.cpp:1.4.4.1
*** openafs/src/WINNT/install/loopback/wmi.cpp:1.4	Wed Aug 31 21:55:01 2005
--- openafs/src/WINNT/install/loopback/wmi.cpp	Tue Sep 19 01:51:27 2006
***************
*** 1,6 ****
--- 1,7 ----
  /*
  
  Copyright 2004 by the Massachusetts Institute of Technology
+ Copyright 2006 by Secure Endpoints Inc.
  
  All rights reserved.
  
***************
*** 32,38 ****
  //
  // Note:
  //
! //	The EnableStatic method is notsupported on Win9x platforms.
  //
  //**************************************************************************
  
--- 33,39 ----
  //
  // Note:
  //
! //	The EnableStatic method is not supported on Win9x platforms.
  //
  //**************************************************************************
  
***************
*** 214,219 ****
--- 215,258 ----
      return hr;
  }
  
+ static BOOL
+ IsXP(void)
+ {
+     OSVERSIONINFOEX osInfoEx;
+     memset(&osInfoEx, 0, sizeof(osInfoEx));
+     osInfoEx.dwOSVersionInfoSize = sizeof(osInfoEx);
+ 
+     GetVersionEx((POSVERSIONINFO)&osInfoEx);
+ 
+     return(osInfoEx.dwMajorVersion == 5 && osInfoEx.dwMinorVersion == 1 && osInfoEx.wServicePackMajor < 2);
+ }
+ 
+ static VOID
+ FixupXPDNSRegistrations(LPCWSTR pCfgGuidString)
+ {
+     // As per http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B834440
+     // HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\<NetworkAdapterGUID>
+     HKEY hkInterfaces=NULL, hkAdapter=NULL;
+     DWORD dw = 0;
+ 
+     if (!IsXP())
+ 	return;		// Nothing to do
+ 
+     RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Interfaces"),
+ 		 0, KEY_READ, &hkInterfaces);
+ 
+     RegOpenKeyEx(hkInterfaces, pCfgGuidString, 0, KEY_READ|KEY_WRITE, &hkAdapter);
+ 
+     RegDeleteValue(hkAdapter, TEXT("DisableDynamicUpdate"));
+     RegDeleteValue(hkAdapter, TEXT("EnableAdapterDomainNameRegistration"));
+     RegSetValueEx(hkAdapter, TEXT("RegistrationEnabled"), 0, REG_DWORD, (BYTE *)&dw, sizeof(DWORD));
+     RegSetValueEx(hkAdapter, TEXT("RegisterAdapterName"), 0, REG_DWORD, (BYTE *)&dw, sizeof(DWORD));
+ 
+     if (hkInterfaces)
+ 	RegCloseKey(hkInterfaces);
+     if (hkAdapter)
+ 	RegCloseKey(hkAdapter);
+ }
  
  HRESULT
  WMIEnableStatic(
***************
*** 223,241 ****
      LPCWSTR mask
      )
  {
!     HRESULT hr = 0;
  
!     IWbemLocator* pLocator = 0;
!     IWbemServices* pNamespace = 0;
!     IWbemClassObject* pClass = 0;
!     IWbemClassObject* pOutInst = 0;
!     IWbemClassObject* pInClass = 0;
!     IWbemClassObject* pInInst = 0;
! 
!     BSTR NamespacePath = 0;
!     BSTR ClassPath = 0;
!     BSTR InstancePath = 0;
!     BSTR MethodName = 0; // needs to be BSTR for ExecMethod()
  
      BOOL comInitialized = FALSE;
  
--- 262,280 ----
      LPCWSTR mask
      )
  {
!     HRESULT hr = 0, hr2 = 0;
  
!     IWbemLocator* pLocator = NULL;
!     IWbemServices* pNamespace = NULL;
!     IWbemClassObject* pClass = NULL;
!     IWbemClassObject* pOutInst = NULL;
!     IWbemClassObject* pInClass = NULL;
!     IWbemClassObject* pInInst = NULL;
! 
!     BSTR NamespacePath = NULL;
!     BSTR ClassPath = NULL;
!     BSTR InstancePath = NULL;
!     BSTR MethodName = NULL; // needs to be BSTR for ExecMethod()
  
      BOOL comInitialized = FALSE;
  
***************
*** 248,253 ****
--- 287,298 ----
      VARIANT v_ret_value;
      VariantInit(&v_ret_value);
  
+     VARIANT v_reg_enabled;
+     VariantInit(&v_reg_enabled);
+ 
+     VARIANT v_netbios;
+     VariantInit(&v_netbios);
+ 
      int count;
  
      // end of declarations & NULL initialization
***************
*** 258,266 ****
      ClassPath = SysAllocString(L"Win32_NetWorkAdapterConfiguration");
      CLEANUP_ON_AND_SET(!ClassPath, hr, E_OUTOFMEMORY);
  
-     MethodName = SysAllocString(L"EnableStatic");
-     CLEANUP_ON_AND_SET(!MethodName, hr, E_OUTOFMEMORY);
- 
      // Initialize COM and connect up to CIMOM
  
      ReportMessage(0, "Intializing COM", NULL, NULL, 0);
--- 303,308 ----
***************
*** 328,333 ****
--- 370,378 ----
      }
  #endif
  
+     MethodName = SysAllocString(L"EnableStatic");
+     CLEANUP_ON_AND_SET(!MethodName, hr, E_OUTOFMEMORY);
+ 
      // Get the input argument and set the property
      hr = pClass->GetMethod(MethodName, 0, &pInClass, NULL);
      CLEANUP_ON_FAILURE(hr);
***************
*** 348,361 ****
      hr = pInInst->Put(L"SubNetMask", 0, &v_mask_list, 0);
      CLEANUP_ON_FAILURE(hr);
  
-     // Sleep for a twenty seconds
-     ReportMessage(0,"Calling ExecMethod in 20 seconds...",NULL,NULL,0);
-     Sleep(10000);
-     ReportMessage(0,"Calling ExecMethod in 10 seconds...",NULL,NULL,0);
-     Sleep(5000);  
-     ReportMessage(0,"Calling ExecMethod in  5 seconds...",NULL,NULL,0);
-     Sleep(2000);
- 
  //    printf("Skipping ExecMethod\n");
  //    hr = 0;
  //    goto cleanup;
--- 393,398 ----
***************
*** 363,388 ****
      // Try up to five times, sleeping 3 seconds between tries
      for (count=0; count<5; count++)
      {
!         if (count>0) ReportMessage(0,"Trying again in 3 seconds...",NULL,NULL,0);
! 
! 	Sleep(3000);
    
!         ReportMessage(0,"Calling ExecMethod NOW...          ",NULL,NULL,0);     
! 
!         // Call the method
! 
          hr = pNamespace->ExecMethod(InstancePath, MethodName, 0, NULL, pInInst,
                                    &pOutInst, NULL);   
- 
          if (!SUCCEEDED(hr))
          {
!            ReportMessage(0,"ExecMethod failed",NULL,NULL, hr);
             continue;
          }
  
          // Get the EnableStatic method return value
          hr = pOutInst->Get(L"ReturnValue", 0, &v_ret_value, 0, 0);
- 
          if (!SUCCEEDED(hr))
          {
            ReportMessage(0,"WARNING: Could not determine return value for EnableStatic ",NULL,NULL, hr);
--- 400,429 ----
      // Try up to five times, sleeping 3 seconds between tries
      for (count=0; count<5; count++)
      {
! 	if (count>1) {
! 	    ReportMessage(0,"Trying again in 3 seconds...",NULL,NULL,0);
! 	    Sleep(3000);
! 	} else if (count>0) {
! 	    ReportMessage(0,"Trying again in 20 seconds...",NULL,NULL,0);
! 	    Sleep(10000);
! 	    ReportMessage(0,"Trying again in 10 seconds...",NULL,NULL,0);
! 	    Sleep(5000);  
! 	    ReportMessage(0,"Trying again in  5 seconds...",NULL,NULL,0);
! 	    Sleep(2000);
! 	}
    
!         ReportMessage(0,"Calling ExecMethod EnableStatic NOW...          ",NULL,NULL,0);     
! 	// Call the method
          hr = pNamespace->ExecMethod(InstancePath, MethodName, 0, NULL, pInInst,
                                    &pOutInst, NULL);   
          if (!SUCCEEDED(hr))
          {
!            ReportMessage(0,"ExecMethod EnableStatic failed",NULL,NULL, hr);
             continue;
          }
  
          // Get the EnableStatic method return value
          hr = pOutInst->Get(L"ReturnValue", 0, &v_ret_value, 0, 0);
          if (!SUCCEEDED(hr))
          {
            ReportMessage(0,"WARNING: Could not determine return value for EnableStatic ",NULL,NULL, hr);
***************
*** 390,397 ****
          }
  
          hr = V_I4(&v_ret_value);                
- 
- 
          if(hr != 0)
              ReportMessage(0,"EnableStatic failed ", NULL,NULL,hr);
          else
--- 431,436 ----
***************
*** 399,414 ****
--- 438,563 ----
              ReportMessage(0,"EnableStatic succeeded",NULL,NULL,0);
              break;
          }
+     }
+ 
+     /* if failure, skip SetDynamicDNSRegistration */
+     if (hr)
+ 	goto cleanup;
+ 
+     /* Cleanup and Prepare for SetDynamicDNSRegistration */
+     if (pInClass) {
+ 	pInClass->Release();
+ 	pInClass = NULL;
+     }
+     if (pInInst) {
+ 	pInInst->Release();
+ 	pInInst = NULL;
+     }
+     SysFreeString(MethodName);
+     VariantClear(&v_ret_value);
+ 
+     MethodName = SysAllocString(L"SetDynamicDNSRegistration");
+     CLEANUP_ON_AND_SET(!MethodName, hr2, E_OUTOFMEMORY);
+ 
+     // Get the input argument and set the property
+     hr2 = pClass->GetMethod(MethodName, 0, &pInClass, NULL);
+     CLEANUP_ON_FAILURE(hr2);
+ 
+     hr2 = pInClass->SpawnInstance(0, &pInInst);
+     CLEANUP_ON_FAILURE(hr2);
  
+     // Set up parameters
+     V_VT(&v_reg_enabled) = VT_BOOL;
+     V_BOOL(&v_reg_enabled) = VARIANT_FALSE;
+ 
+     hr2 = pInInst->Put(L"FullDNSRegistrationEnabled", 0, &v_reg_enabled, 0);
+     CLEANUP_ON_FAILURE(hr2);
+ 
+     hr2 = pInInst->Put(L"DomainDNSRegistrationEnabled", 0, &v_reg_enabled, 0);
+     CLEANUP_ON_FAILURE(hr2);
+ 
+     // Call the method
+     hr2 = pNamespace->ExecMethod(InstancePath, MethodName, 0, NULL, pInInst,
+ 				 &pOutInst, NULL);   
+     if (!SUCCEEDED(hr2))	{
+ 	ReportMessage(0,"ExecMethod SetDynamicDNSRegistration failed",NULL,NULL, hr2);
+ 	goto cleanup;
+     }
+ 
+     // Get the EnableStatic method return value
+     hr2 = pOutInst->Get(L"ReturnValue", 0, &v_ret_value, 0, 0);
+     if (!SUCCEEDED(hr2)) {
+ 	ReportMessage(0,"WARNING: Could not determine return value for SetDynamicDNSRegistration ",NULL,NULL, hr2);
+     } else {
+ 	hr2 = V_I4(&v_ret_value);                
+ 	if(hr2 != 0)
+ 	    ReportMessage(0,"SetDynamicDNSRegistration failed ", NULL,NULL,hr2);
+ 	else
+ 	    ReportMessage(0,"SetDynamicDNSRegistration succeeded",NULL,NULL,0);
+     }
+ 
+     /* if failure, skip SetTcpipNetbios */
+     if (hr)
+ 	goto cleanup;
+ 
+     /* Cleanup and Prepare for SetTcpipNetbios */
+     if (pInClass) {
+ 	pInClass->Release();
+ 	pInClass = NULL;
+     }
+     if (pInInst) {
+ 	pInInst->Release();
+ 	pInInst = NULL;
      }
+     SysFreeString(MethodName);
+     VariantClear(&v_ret_value);
  
+     ReportMessage(0,"Preparing for SetTcpipNetbios",NULL,NULL,0);
  
+     MethodName = SysAllocString(L"SetTcpipNetbios");
+     CLEANUP_ON_AND_SET(!MethodName, hr2, E_OUTOFMEMORY);
+ 
+     // Get the input argument and set the property
+     hr2 = pClass->GetMethod(MethodName, 0, &pInClass, NULL);
+     CLEANUP_ON_FAILURE(hr2);
+ 
+     hr2 = pInClass->SpawnInstance(0, &pInInst);
+     CLEANUP_ON_FAILURE(hr2);
+ 
+     // Set up parameters
+     V_VT(&v_netbios) = VT_BSTR;
+     V_BSTR(&v_netbios) = SysAllocString(L"1");	/* Use Netbios */
+ 
+     hr2 = pInInst->Put(L"TcpipNetbiosOptions", 0, &v_netbios, 0);
+     CLEANUP_ON_FAILURE(hr2);
+ 
+     // Call the method
+     hr2 = pNamespace->ExecMethod(InstancePath, MethodName, 0, NULL, pInInst,
+ 				 &pOutInst, NULL);   
+     if (!SUCCEEDED(hr2)) {
+ 	ReportMessage(0,"ExecMethod SetTcpipNetbios failed",NULL,NULL, hr2);
+ 	goto cleanup;
+     }
+ 
+     // Get the EnableStatic method return value
+     hr2 = pOutInst->Get(L"ReturnValue", 0, &v_ret_value, 0, 0);
+     if (!SUCCEEDED(hr2)) {
+ 	ReportMessage(0,"WARNING: Could not determine return value for SetTcpipNetbios ",NULL,NULL, hr2);
+     } else {
+ 	hr2 = V_I4(&v_ret_value);                
+ 	if(hr2 != 0)
+ 	    ReportMessage(0,"SetTcpipNetbios failed ", NULL,NULL,hr2);
+ 	else
+ 	    ReportMessage(0,"SetTcpipNetbios succeeded",NULL,NULL,0);
+     }
  
   cleanup:
      // Free up resources
      VariantClear(&v_ret_value);
      VariantClear(&v_ip_list);
      VariantClear(&v_mask_list);
+     VariantClear(&v_reg_enabled);
+     VariantClear(&v_netbios);
  
      // SysFreeString is NULL safe
      SysFreeString(NamespacePath);
***************
*** 447,453 ****
      LPWSTR			swName = NULL;
      GUID            g;
      wchar_t         device_guid[100];
-     DWORD			lenDeviceId;    
      
      ReportMessage(0,"Running LoopbackBindings()...",NULL,NULL,0);
      
--- 596,601 ----
***************
*** 471,477 ****
      hr = pCfg->EnumComponents( &GUID_DEVCLASS_NET, &pEnumComponent );
      CLEANUP_ON_FAILURE(hr);
      
-     
      while( pEnumComponent->Next( 1, &pAdapter, NULL ) == S_OK )
      {
          pAdapter->GetDisplayName( &swName );
--- 619,624 ----
***************
*** 581,599 ****
  }
  
          
!         extern "C"
!             DWORD
! SetIpAddress(
!     LPCWSTR guid,
!     LPCWSTR ip,
!     LPCWSTR mask
!     )
  {
      ReportMessage(0,"Running SetIpAddress()...",0,0,0);
      HRESULT hr = 0;
  
      hr = WMIEnableStatic(FindNetworkAdapterConfigurationInstanceByGUID,
                          (PVOID)guid, ip, mask);
      return hr;
  }
  
--- 728,742 ----
  }
  
          
! extern "C" DWORD SetIpAddress(LPCWSTR guid, LPCWSTR ip, LPCWSTR mask)
  {
      ReportMessage(0,"Running SetIpAddress()...",0,0,0);
      HRESULT hr = 0;
  
      hr = WMIEnableStatic(FindNetworkAdapterConfigurationInstanceByGUID,
                          (PVOID)guid, ip, mask);
+     if (hr == 0)
+ 	FixupXPDNSRegistrations(guid);
      return hr;
  }
  
Index: openafs/src/WINNT/install/wix/CellServDB
diff -c openafs/src/WINNT/install/wix/CellServDB:1.6 openafs/src/WINNT/install/wix/CellServDB:1.6.4.1
*** openafs/src/WINNT/install/wix/CellServDB:1.6	Sat Oct 15 20:56:04 2005
--- openafs/src/WINNT/install/wix/CellServDB	Sun Oct  8 23:15:12 2006
***************
*** 1,15 ****
! >grand.central.org      #GCO Public CellServDB 15 Oct 2005
  18.7.14.88                      #grand-opening.mit.edu
  128.2.191.224                   #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
  >wu-wien.ac.at          #University of Economics, Vienna, Austria
! 137.208.3.33                    #afsdb1.wu-wien.ac.at
! 137.208.8.12                    #caesar.wu-wien.ac.at
! 137.208.127.33                  #buddy.wu-wien.ac.at
  >hephy.at               #hephy-vienna
  193.170.243.10                  #mowgli.oeaw.ac.at
  193.170.243.12                  #baloo.oeaw.ac.at
  193.170.243.14                  #akela.oeaw.ac.at
  >itp.tugraz.at          #Institute for Theoretical Physics, TU Graz, Austria
  129.27.157.6                    #fubphsv2.tu-graz.ac.at
  129.27.161.7                    #faepsv01.tu-graz.ac.at
--- 1,19 ----
! >grand.central.org      #GCO Public CellServDB 08 Oct 2006
  18.7.14.88                      #grand-opening.mit.edu
  128.2.191.224                   #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
  >wu-wien.ac.at          #University of Economics, Vienna, Austria
! 137.208.3.33                    #goya.wu-wien.ac.at
! 137.208.7.57                    #caravaggio.wu-wien.ac.at
! 137.208.127.57                  #vermeer.wu-wien.ac.at
  >hephy.at               #hephy-vienna
  193.170.243.10                  #mowgli.oeaw.ac.at
  193.170.243.12                  #baloo.oeaw.ac.at
  193.170.243.14                  #akela.oeaw.ac.at
+ >cgv.tugraz.at          #CGV cell
+ 129.27.224.133                  #phobos.cgv.tugraz.at
+ 129.27.224.134                  #deimos.cgv.tugraz.at
+ 129.27.224.210                  #trinculo.cgv.tugraz.at
  >itp.tugraz.at          #Institute for Theoretical Physics, TU Graz, Austria
  129.27.157.6                    #fubphsv2.tu-graz.ac.at
  129.27.161.7                    #faepsv01.tu-graz.ac.at
***************
*** 22,30 ****
  137.138.206.77                  #pcamsf2.cern.ch
  137.138.206.123                 #pcamsf4.cern.ch
  >epfl.ch                #Swiss Federal Institute of Technology at Lausanne
! 128.178.2.6                     #kd1.epfl.ch
! 128.178.2.7                     #kd2.epfl.ch
! 128.178.2.8                     #kd3.epfl.ch
  >ethz.ch                #Swiss Federal Inst. of Tech. - Zurich, Switzerland
  129.132.97.19                   #amalthea.ethz.ch
  129.132.97.27                   #nethzafs-001.ethz.ch
--- 26,34 ----
  137.138.206.77                  #pcamsf2.cern.ch
  137.138.206.123                 #pcamsf4.cern.ch
  >epfl.ch                #Swiss Federal Institute of Technology at Lausanne
! 128.178.109.111                 #kd1.epfl.ch
! 128.178.109.112                 #kd2.epfl.ch
! 128.178.109.113                 #kd3.epfl.ch
  >ethz.ch                #Swiss Federal Inst. of Tech. - Zurich, Switzerland
  129.132.97.19                   #amalthea.ethz.ch
  129.132.97.27                   #nethzafs-001.ethz.ch
***************
*** 37,44 ****
  129.129.190.142                 #afs02.psi.ch
  >extundo.com            #Simon Josefsson's cell
  195.42.214.241                  #slipsten.extundo.com
- >mekinok.com            #Mekinok, Inc.
- 4.36.43.98                      #loggerhead.mekinok.com
  >membrain.com           #membrain.com
  66.93.118.125                   #stormy
  130.85.24.11                    #weasel
--- 41,46 ----
***************
*** 105,121 ****
  144.41.2.3                      #rs14.serv.uni-hohenheim.de
  144.41.2.4                      #rs15.serv.uni-hohenheim.de
  >rz.uni-jena.de         #Rechenzentrum University of Jena, Germany
! 141.35.2.160                    #lc00.rz.uni-jena.de
! 141.35.7.9                      #fsuj01.rz.uni-jena.de
! 141.35.7.10                     #zaphod.rz.uni-jena
  >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
  134.95.144.22                   #afs1.meteo.uni-koeln.de
  134.95.144.24                   #afs2.meteo.uni-koeln.de
  >rrz.uni-koeln.de       #University of Cologne - Reg Comp Center
  134.95.19.3                     #afsdb1.rrz.uni-koeln.de
! 134.95.19.30                    #fileserv3.rrz.uni-koeln.de
  134.95.67.97                    #afs.thp.uni-koeln.de
! 134.95.140.190                  #rzkbserv.rrz.uni-koeln.de
  >physik.uni-mainz.de    #institute of physics, university Mainz, Germany
  134.93.130.93                   #hardy.physik.uni-mainz.de
  >uni-mannheim.de        #Uni Mannheim (Rechenzentrum)
--- 107,123 ----
  144.41.2.3                      #rs14.serv.uni-hohenheim.de
  144.41.2.4                      #rs15.serv.uni-hohenheim.de
  >rz.uni-jena.de         #Rechenzentrum University of Jena, Germany
! 141.35.2.180                    #afs00.rz.uni-jena.de
! 141.35.2.181                    #afs01.rz.uni-jena.de
! 141.35.2.182                    #afs02.rz.uni-jena.de
  >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
  134.95.144.22                   #afs1.meteo.uni-koeln.de
  134.95.144.24                   #afs2.meteo.uni-koeln.de
  >rrz.uni-koeln.de       #University of Cologne - Reg Comp Center
  134.95.19.3                     #afsdb1.rrz.uni-koeln.de
! 134.95.19.10                    #lyra.rrz.uni-koeln.de
  134.95.67.97                    #afs.thp.uni-koeln.de
! 134.95.141.243                  #agrippina.rrz.uni-koeln.de
  >physik.uni-mainz.de    #institute of physics, university Mainz, Germany
  134.93.130.93                   #hardy.physik.uni-mainz.de
  >uni-mannheim.de        #Uni Mannheim (Rechenzentrum)
***************
*** 172,179 ****
  204.194.25.7                    #afs1.qatar.cmu.edu
  204.194.25.8                    #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
! 128.2.56.129                    #nihao.sbp.ri.cmu.edu
! 128.2.56.136                    #youtheman.sbp.ri.cmu.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
--- 174,181 ----
  204.194.25.7                    #afs1.qatar.cmu.edu
  204.194.25.8                    #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
! 128.2.179.12                    #nihao.sbp.ri.cmu.edu
! 128.2.179.113                   #youtheman.sbp.ri.cmu.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
***************
*** 186,191 ****
--- 188,195 ----
  129.170.16.22                   #halley.dartmouth.edu
  129.170.16.42                   #oort.dartmouth.edu
  129.170.16.43                   #cygnusx1.dartmouth.edu
+ >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
***************
*** 261,266 ****
--- 265,280 ----
  134.79.18.25                    #afsdb1.slac.stanford.edu
  134.79.18.26                    #afsdb2.slac.stanford.edu
  134.79.18.27                    #afsdb3.slac.stanford.edu
+ >ucdavis.edu            #University of California at Davis
+ 169.237.104.100                 #afs1.ucdavis.edu
+ 169.237.235.176                 #afs2.ucdavis.edu
+ 169.237.247.91                  #afs3.ucdavis.edu
+ >home.ucdavis.edu       #University of California at Davis home directories
+ 169.237.105.91                  #home1.ucdavis.edu
+ 169.237.105.92                  #home2.ucdavis.edu
+ 169.237.105.93                  #home3.ucdavis.edu
+ >physics.ucsb.edu       #UC Santa Barbara, Physics Dept
+ 128.111.18.161                  #ledzeppelin.physics.ucsb.edu
  >cats.ucsc.edu          #UC Santa Cruz, Comm. and Tech. Services, California U.S.A
  128.114.129.14                  #elan.ucsc.edu
  128.114.129.15                  #ichabod.ucsc.edu
***************
*** 291,316 ****
  141.211.1.34                    #ruthless.ifs.umich.edu
  >atlas.umich.edu        #ATLAS group cell in physics at University of Michigan
  141.211.43.102                  #linat02.grid.umich.edu
! 141.211.43.106                  #linat06.grid.umich.edu
! 141.211.43.109                  #atgrid.grid.umich.edu
  >citi.umich.edu         #Center for Information Technology Integration
  141.211.133.5                   #babylon.citi.umich.edu
  >lsa.umich.edu          #University of Michigan - College of LS&A
  141.211.211.53                  #gerow.lsa.umich.edu
  141.211.211.72                  #collines.lsa.umich.edu
  141.211.211.153                 #hodges.lsa.umich.edu
! >umr.edu                #University of Missouri - Rolla
! 131.151.1.59                    #afsdb1.umr.edu
! 131.151.1.70                    #afsdb3.umr.edu
! 131.151.1.146                   #afsdb2.umr.edu
  >physics.unc.edu        #Univ. of NC at Chapel Hill, Dept. of Physics
  152.2.4.1                       #who.physics.unc.edu
  152.2.4.3                       #what.physics.unc.edu
  152.2.4.5                       #when.physics.unc.edu
  >uncc.edu               #University of NC at Charlotte Mosaic AFS Cell
  152.15.10.70                    #as-sm1.uncc.edu
! 152.15.13.7                     #as-sm2.uncc.edu
! 152.15.30.27                    #fs-kenn3.uncc.edu
  >eng.utah.edu           #University of Utah - Engineering
  155.99.222.9                    #lenny.eng.utah.edu
  155.99.222.10                   #carl.eng.utah.edu
--- 305,328 ----
  141.211.1.34                    #ruthless.ifs.umich.edu
  >atlas.umich.edu        #ATLAS group cell in physics at University of Michigan
  141.211.43.102                  #linat02.grid.umich.edu
! 141.211.43.103                  #linat03.grid.umich.edu
! 141.211.43.104                  #linat04.grid.umich.edu
  >citi.umich.edu         #Center for Information Technology Integration
  141.211.133.5                   #babylon.citi.umich.edu
  >lsa.umich.edu          #University of Michigan - College of LS&A
  141.211.211.53                  #gerow.lsa.umich.edu
  141.211.211.72                  #collines.lsa.umich.edu
  141.211.211.153                 #hodges.lsa.umich.edu
! >sph.umich.edu          #University of Michigan -- School of Public Health
! 141.211.50.41                   #afssph0.sph.umich.edu
  >physics.unc.edu        #Univ. of NC at Chapel Hill, Dept. of Physics
  152.2.4.1                       #who.physics.unc.edu
  152.2.4.3                       #what.physics.unc.edu
  152.2.4.5                       #when.physics.unc.edu
  >uncc.edu               #University of NC at Charlotte Mosaic AFS Cell
  152.15.10.70                    #as-sm1.uncc.edu
! 152.15.93.186                   #as-ece1.uncc.edu
! 152.15.181.175                  #as-me1.uncc.edu
  >eng.utah.edu           #University of Utah - Engineering
  155.99.222.9                    #lenny.eng.utah.edu
  155.99.222.10                   #carl.eng.utah.edu
***************
*** 344,349 ****
--- 356,363 ----
  >dapnia.saclay.cea.fr   #CEA DAPNIA
  132.166.32.7                    #dphrsg.saclay.cea.fr
  132.166.32.12                   #dphrsl.saclay.cea.fr
+ >grif.fr                #GRIF cell
+ 192.54.208.18                   #node03.datagrid.cea.fr
  >in2p3.fr               #IN2P3 production cell
  134.158.232.11                  #ccafsdb1.in2p3.fr
  134.158.232.12                  #ccafsdb2.in2p3.fr
***************
*** 401,406 ****
--- 415,421 ----
  192.84.134.75                   #afsna.na.infn.it
  >ba.infn.it             #INFN, Sezione di Bari
  193.206.185.235                 #baafsserver.ba.infn.it
+ 193.206.185.236                 #debsrv.ba.infn.it
  >kloe.infn.it           #INFN, KLOE experiment at Laboratori di Frascati
  192.135.25.111                  #kloeafs1.lnf.infn.it
  192.135.25.112                  #kloeafs2.lnf.infn.it
***************
*** 451,461 ****
  >laroia.net             #Laroia Networks
  66.66.102.254                   #supercore.laroia.net
  >sinenomine.net         #Sine Nomine Associates
! 66.92.236.139                   #afs.sinenomine.net
  >slackers.net           #The Slackers' Network
  63.201.48.27                    #alexandria.slackers.net
  >tproa.net              #The People's Republic of Ames
  209.234.76.70                   #service-3.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
--- 466,478 ----
  >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
  209.234.76.70                   #service-3.tproa.net
+ 209.234.76.75                   #service-4.tproa.net
+ 209.234.76.76                   #service-5.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
***************
*** 484,505 ****
  >oc7.org                #The OC7 Project
  128.2.122.140                   #knife.oc7.org
  207.22.77.170                   #spoon.oc7.org
! >openafs.org            #OpenAFS Project
! 18.7.14.88                      #grand-opening.mit.edu
! 128.2.191.224                   #penn.central.org
! 130.237.48.87                   #andrew.e.kth.se
! >e.kth.se               #Royal Institute of Technology, Elektro
  130.237.32.145                  #sonen.e.kth.se
  130.237.48.7                    #anden.e.kth.se
  130.237.48.244                  #fadern.e.kth.se
  >hallf.kth.se           #Royal Institute of Technology, HALLF
! 130.237.24.141                  #rasmus13.hallf.kth.se
! 130.237.24.152                  #rasmus3.hallf.kth.se
! 130.237.24.177                  #rasmus29.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
! 130.237.202.12                  #afsdb2.isk.kth.se
! 130.237.206.13                  #afsdb1.isk.kth.se
! 130.237.209.141                 #afsdb3.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
--- 501,516 ----
  >oc7.org                #The OC7 Project
  128.2.122.140                   #knife.oc7.org
  207.22.77.170                   #spoon.oc7.org
! >kth.se                 #Royal Institute of Technology, Stockholm, Sweden
  130.237.32.145                  #sonen.e.kth.se
  130.237.48.7                    #anden.e.kth.se
  130.237.48.244                  #fadern.e.kth.se
  >hallf.kth.se           #Royal Institute of Technology, HALLF
! 130.237.24.11                   #afs1.hallf.kth.se
! 130.237.24.104                  #afs2.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
! 130.237.202.3                   #afsdb1.isk.kth.se
! 130.237.209.39                  #ezri.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
***************
*** 543,548 ****
--- 554,566 ----
  193.2.120.2                     #solkan.p-ng.si
  >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
+ 129.215.64.16                   #afsdb0.inf.ed.ac.uk
+ 129.215.64.17                   #afsdb1.inf.ed.ac.uk
+ 129.215.64.18                   #afsdb2.inf.ed.ac.uk
+ >ic.ac.uk               #Imperial College London
+ 155.198.63.148                  #icafs2.cc.ic.ac.uk
+ 155.198.63.149                  #icafs1.cc.ic.ac.uk
  >hep.man.ac.uk          #Manchester HEP
  194.36.2.3                      #afs1.hep.man.ac.uk
  194.36.2.4                      #afs2.hep.man.ac.uk
Index: openafs/src/WINNT/install/wix/feature.wxi
diff -c openafs/src/WINNT/install/wix/feature.wxi:1.14.2.2 openafs/src/WINNT/install/wix/feature.wxi:1.14.2.3
*** openafs/src/WINNT/install/wix/feature.wxi:1.14.2.2	Wed Sep  6 19:14:01 2006
--- openafs/src/WINNT/install/wix/feature.wxi	Thu Oct 12 17:19:42 2006
***************
*** 24,56 ****
                      <ComponentRef Id="rcm_Loopback"/>
                  </Feature>
  
! 				<Feature Id="feaKB301673" AllowAdvertise="no" Absent="disallow" Display="hidden" InstallDefault="followParent" Level="0">
! 					<ComponentRef Id="rcm_KB301673" />
! 					<Condition Level="30">VersionNT = 500 And ServicePackLevel &lt; 3</Condition>
! 				</Feature>
  				
! 				<Feature Id="feaCredsStartup" AllowAdvertise="no" Display="hidden" InstallDefault="followParent" Level="30">
! 					<ComponentRef Id="cmp_credsStartup" />
! 					<Condition Level="130">CREDSSTARTUP = 0</Condition>
! 				</Feature>
  				
! 			<?ifdef DebugSyms?>
! 				<Feature Id="feaClientDebug" AllowAdvertise="no" Description="$(loc.StrAFSClientDebugLongDesc)" Display="expand"
! 					InstallDefault="$(var.DebugSymInstallDefault)" Level="$(var.DebugSymLowLevel)" Title="$(loc.StrAFSClientDebugDesc)">
!                     <ComponentRef Id="cmp_ClientProgramDebug" />
!                     <ComponentRef Id="cmp_CommonCommonDebug" />
!                     <ComponentRef Id="cmp_ClientCommonDebug" />
!                     <ComponentRef Id="cmp_ClientSystemDebug" />
!                     <?include runtime_debug.wxi?>
! 				</Feature>
! 			<?endif?>
  
! 				<ComponentRef Id="rcm_Client" />
                  <ComponentRef Id="rcm_ClientCacheSize" />
                  <ComponentRef Id="rcm_ClientCachePath" />
                  <ComponentRef Id="rcm_StoreAnsiFilenames" />
  
! 				<ComponentRef Id="cmp_CommonDir" />
  
                  <ComponentRef Id="efl_Readme_TXT_$(var.Language)" />
                  <ComponentRef Id="efl_CellServDB" />
--- 24,71 ----
                      <ComponentRef Id="rcm_Loopback"/>
                  </Feature>
  
!   <?if $(env.CPU) = "i386"?>
!             <Feature Id="feaNetIDMgrPlugin" AllowAdvertise="no" Description="$(loc.StrNIDMPluginLongDesc)"
!                     Display="expand" InstallDefault="followParent" Level="30" Title="$(loc.StrNIDMPluginDesc)">
!                     <ComponentRef Id="_afscreds_plugin" />
!                     <ComponentRef Id="_afscreds_en_us" />
!                     <ComponentRef Id="_afscreds_chm" />
!    	    <?ifdef DebugSyms?>
!                     <Feature Id="DebugSyms" Title="$(loc.StrNIDMDebugDesc)" InstallDefault="$(var.DebugSymInstallDefault)"
!                     	Level="$(var.DebugSymLowLevel)" Display="expand" Description="$(loc.StrNIDMDebugLongDesc)">
!                     	<ComponentRef Id="_afscreds_debugsym" />
!                     </Feature>
! 	    <?endif?>
!             </Feature>
!   <?endif?>
! 
! 		<Feature Id="feaKB301673" AllowAdvertise="no" Absent="disallow" Display="hidden" InstallDefault="followParent" Level="0">
! 			<ComponentRef Id="rcm_KB301673" />
! 			<Condition Level="30">VersionNT = 500 And ServicePackLevel &lt; 3</Condition>
! 		</Feature>
  				
! 		<Feature Id="feaCredsStartup" AllowAdvertise="no" Display="hidden" InstallDefault="followParent" Level="30">
! 			<ComponentRef Id="cmp_credsStartup" />
! 			<Condition Level="130">CREDSSTARTUP = 0</Condition>
! 		</Feature>
  				
! 		<?ifdef DebugSyms?>
! 			<Feature Id="feaClientDebug" AllowAdvertise="no" Description="$(loc.StrAFSClientDebugLongDesc)" Display="expand"
! 				InstallDefault="$(var.DebugSymInstallDefault)" Level="$(var.DebugSymLowLevel)" Title="$(loc.StrAFSClientDebugDesc)">
!                 	        <ComponentRef Id="cmp_ClientProgramDebug" />
!                     		<ComponentRef Id="cmp_CommonCommonDebug" />
!                     		<ComponentRef Id="cmp_ClientCommonDebug" />
!                     		<ComponentRef Id="cmp_ClientSystemDebug" />
!                     		<?include runtime_debug.wxi?>
! 			</Feature>
! 		<?endif?>
  
! 		<ComponentRef Id="rcm_Client" />
                  <ComponentRef Id="rcm_ClientCacheSize" />
                  <ComponentRef Id="rcm_ClientCachePath" />
                  <ComponentRef Id="rcm_StoreAnsiFilenames" />
  
! 		<ComponentRef Id="cmp_CommonDir" />
  
                  <ComponentRef Id="efl_Readme_TXT_$(var.Language)" />
                  <ComponentRef Id="efl_CellServDB" />
***************
*** 263,278 ****
              <Feature Id="feaBinaries" AllowAdvertise="no" Description="$(loc.StrBinsOnlyLongDesc)"
                  Display="expand" InstallDefault="followParent" Level="100" Title="$(loc.StrBinsOnlyDesc)">
  
! 			<?ifdef DebugSyms?>
! 				<Feature Id="feaClientDebug" AllowAdvertise="no" Description="$(loc.StrAFSClientDebugLongDesc)" Display="expand"
! 					InstallDefault="$(var.DebugSymInstallDefault)" Level="$(var.DebugSymLowLevel)" Title="$(loc.StrAFSClientDebugDesc)">
                      <ComponentRef Id="cmp_ClientProgramDebug" />
                      <ComponentRef Id="cmp_CommonCommonDebug" />
                      <?include runtime_debug.wxi?>
  				</Feature>
  			<?endif?>
  
! 				<ComponentRef Id="cmp_CommonDir" />
  
                  <ComponentRef Id="cmf_afsrpc_DLL" />
                  <ComponentRef Id="cmf_afsauthent2_DLL" />
--- 278,308 ----
              <Feature Id="feaBinaries" AllowAdvertise="no" Description="$(loc.StrBinsOnlyLongDesc)"
                  Display="expand" InstallDefault="followParent" Level="100" Title="$(loc.StrBinsOnlyDesc)">
  
! 		<?ifdef DebugSyms?>
! 			<Feature Id="feaClientDebug" AllowAdvertise="no" Description="$(loc.StrAFSClientDebugLongDesc)" Display="expand"
! 				InstallDefault="$(var.DebugSymInstallDefault)" Level="$(var.DebugSymLowLevel)" Title="$(loc.StrAFSClientDebugDesc)">
                      <ComponentRef Id="cmp_ClientProgramDebug" />
                      <ComponentRef Id="cmp_CommonCommonDebug" />
                      <?include runtime_debug.wxi?>
  				</Feature>
  			<?endif?>
  
!   <?if $(env.CPU) = "i386"?>
!             <Feature Id="feaNetIDMgrPlugin" AllowAdvertise="no" Description="$(loc.StrNIDMPluginLongDesc)"
!                     Display="expand" InstallDefault="followParent" Level="30" Title="$(loc.StrNIDMPluginDesc)">
!                     <ComponentRef Id="_afscreds_plugin" />
!                     <ComponentRef Id="_afscreds_en_us" />
!                     <ComponentRef Id="_afscreds_chm" />
!    	    <?ifdef DebugSyms?>
!                     <Feature Id="DebugSyms" Title="$(loc.StrNIDMDebugDesc)" InstallDefault="$(var.DebugSymInstallDefault)"
!                     	Level="$(var.DebugSymLowLevel)" Display="expand" Description="$(loc.StrNIDMDebugLongDesc)">
!                     	<ComponentRef Id="_afscreds_debugsym" />
!                     </Feature>
! 	    <?endif?>
!             </Feature>
!   <?endif?>
! 
! 		<ComponentRef Id="cmp_CommonDir" />
  
                  <ComponentRef Id="cmf_afsrpc_DLL" />
                  <ComponentRef Id="cmf_afsauthent2_DLL" />
Index: openafs/src/WINNT/install/wix/files.wxi
diff -c openafs/src/WINNT/install/wix/files.wxi:1.22.2.7 openafs/src/WINNT/install/wix/files.wxi:1.22.2.8
*** openafs/src/WINNT/install/wix/files.wxi:1.22.2.7	Wed Sep  6 19:14:01 2006
--- openafs/src/WINNT/install/wix/files.wxi	Thu Oct 12 17:19:42 2006
***************
*** 851,856 ****
--- 851,892 ----
                          <File Id="fileafs_shl_ext_1033_DLL" Name="ashl1033.dll" LongName="afs_shl_ext_1033.dll" KeyPath="yes" DiskId="1" src="$(var.ClientDir)\afs_shl_ext_1033.dll"/>
                      </Component>
  
+   <?if $(env.CPU)="i386"?>
+                     <Component Win64="$(var.Win64)" Id="_afscreds_en_us"
+                         Guid="$(var._afscreds_en_us_guid)" DiskId="1">
+                         <File Id="file_afscred_en_us_dll" Name="afscenu.dll" LongName="afscred_en_us.dll" KeyPath="yes"/>
+                     </Component>
+ 
+                     <Component Win64="$(var.Win64)" Id="_afscreds_plugin" 
+                         Guid="$(var._afscreds_plugin_guid)" DiskId="1">
+                         <File Id="file_afscred_dll" Name="afscred.dll" LongName="afscred.dll" KeyPath="yes"/>
+                         <Registry Id="reg_mod_01" Root="HKLM" Key="SOFTWARE\MIT\NetIDMgr\PluginManager\Modules\OpenAFS" Action="createKeyAndRemoveKeyOnUninstall" />
+                         <Registry Id="reg_mod_02" Root="HKLM" Key="SOFTWARE\MIT\NetIDMgr\PluginManager\Modules\OpenAFS" />
+                         <Registry Id="reg_mod_03" Root="HKLM" Key="SOFTWARE\MIT\NetIDMgr\PluginManager\Modules\OpenAFS" Name="ImagePath" Type="string" Value="[#file_afscred_dll]" />
+                         <Registry Id="reg_mod_04" Root="HKLM" Key="SOFTWARE\MIT\NetIDMgr\PluginManager\Modules\OpenAFS" Name="Description" Type="string" Value="OpenAFS Module" />
+                         <Registry Id="reg_mod_05" Root="HKLM" Key="SOFTWARE\MIT\NetIDMgr\PluginManager\Modules\OpenAFS" Name="Vendor" Type="string" Value="Secure Endpoints Inc." />
+                         <Registry Id="reg_mod_06" Root="HKLM" Key="SOFTWARE\MIT\NetIDMgr\PluginManager\Modules\OpenAFS" Name="PluginList" Type="string" Value="AfsCred" />
+                         <Registry Id="reg_mod_07" Root="HKLM" Key="SOFTWARE\MIT\NetIDMgr\PluginManager\Modules\OpenAFS" Name="NoUnload" Type="integer" Value="1" />
+                         <Registry Id="reg_plg_01" Root="HKLM" Key="SOFTWARE\MIT\NetIDMgr\PluginManager\Plugins\AfsCred" Action="createKeyAndRemoveKeyOnUninstall" />
+                         <Registry Id="reg_plg_02" Root="HKLM" Key="SOFTWARE\MIT\NetIDMgr\PluginManager\Plugins\AfsCred" />
+                         <Registry Id="reg_plg_03" Root="HKLM" Key="SOFTWARE\MIT\NetIDMgr\PluginManager\Plugins\AfsCred" Name="Module" Type="string" Value="OpenAFS" />
+                         <Registry Id="reg_plg_04" Root="HKLM" Key="SOFTWARE\MIT\NetIDMgr\PluginManager\Plugins\AfsCred" Name="Description" Type="string" Value="AFS Credentials Provider" />
+                         <Registry Id="reg_plg_05" Root="HKLM" Key="SOFTWARE\MIT\NetIDMgr\PluginManager\Plugins\AfsCred" Name="Dependencies" Type="string" Value="Krb5Cred" />
+                         <Registry Id="reg_plg_06" Root="HKLM" Key="SOFTWARE\MIT\NetIDMgr\PluginManager\Plugins\AfsCred" Name="Type" Type="integer" Value="1" />
+                     </Component>
+   
+      <?ifdef DebugSyms?>            
+                     <Component Win64="$(var.Win64)" Id="_afscreds_debugsym"
+                         Guid="$(var._afscreds_debugsym_guid)" DiskId="1">
+                         <File Id="file_afscred_pdb" Name="afscred.pdb" LongName="afscred.pdb" KeyPath="yes"/>
+                     </Component>
+      <?endif?>
+                     <Component Id="_afscreds_chm"
+                         Guid="$(var._afscreds_chm_guid)" DiskId="1">
+                         <File Id="file_afsplhlp_chm" Name="afsplhlp.chm" LongName="afsplhlp.chm" KeyPath="yes" />
+                     </Component>
+   <?endif?>
+ 
    <?ifndef BinsOnly ?>
                      <Component Win64="$(var.Win64)" Id="cmf_afsd_service_EXE" Guid="$(var.cmf_afsd_service_EXE_guid)">
                          <File Id="fileafsd_service_EXE" Name="afsd_svc.exe" LongName="afsd_service.exe" KeyPath="yes" DiskId="1" />
Index: openafs/src/WINNT/install/wix/openafs.wxs
diff -c openafs/src/WINNT/install/wix/openafs.wxs:1.13 openafs/src/WINNT/install/wix/openafs.wxs:1.13.4.1
*** openafs/src/WINNT/install/wix/openafs.wxs:1.13	Fri Dec 30 17:40:15 2005
--- openafs/src/WINNT/install/wix/openafs.wxs	Thu Oct 12 17:19:42 2006
***************
*** 207,213 ****
          <AdvertiseExecuteSequence />
          <AdminExecuteSequence />
          <InstallExecuteSequence>
! 			<RemoveExistingProducts After="InstallValidate">IBMAFS_UPGRADE OR OPENAFS_UPGRADE</RemoveExistingProducts>
  			<Custom Action="RemoveNsisInstallation" Before="AbortInstallationA">NSISUNINSTALL &lt;&gt; "" AND UILevel &gt;= 4</Custom>
  			<Custom Action="AbortInstallationA" Before="CostInitialize">NSISUNINSTALL &lt;&gt; "" AND UILevel &lt; 4</Custom>
  			<!-- Assert that if the server is going to be installed locally after this session, control center and client are also local -->
--- 207,213 ----
          <AdvertiseExecuteSequence />
          <AdminExecuteSequence />
          <InstallExecuteSequence>
! 			<RemoveExistingProducts After="InstallValidate">IBMAFS_UPGRADE OR OPENAFS_UPGRADE OR AFSPLUGIN_UPGRADE</RemoveExistingProducts>
  			<Custom Action="RemoveNsisInstallation" Before="AbortInstallationA">NSISUNINSTALL &lt;&gt; "" AND UILevel &gt;= 4</Custom>
  			<Custom Action="AbortInstallationA" Before="CostInitialize">NSISUNINSTALL &lt;&gt; "" AND UILevel &lt; 4</Custom>
  			<!-- Assert that if the server is going to be installed locally after this session, control center and client are also local -->
***************
*** 243,248 ****
--- 243,255 ----
              <UpgradeVersion IgnoreRemoveFailure="no" IncludeMaximum="yes" Maximum="3.6.2" MigrateFeatures="no" Property="IBMAFS_UPGRADE" />
          </Upgrade>
          
+   <?if $(env.CPU) = "i386" ?>
+         <!-- Secure-Endpoints OpenAFS NetIDMgr plug-in -->
+         <Upgrade Id="646D643A-73E3-4C77-AE4A-EDBE313DD45D">
+             <UpgradeVersion IgnoreRemoveFailure="no" IncludeMaximum="no" Maximum="$(var.NumericVersion)" MigrateFeatures="no" Property="AFSPLUGIN_UPGRADE" />
+         </Upgrade>
+   <?endif?>
+         
          <!-- openafs.org NSIS installer is detected using other means -->
          <!-- Please let us know if you want other Installers to be detected and upgraded/removed -->
  
Index: openafs/src/WINNT/install/wix/platform.wxi
diff -c openafs/src/WINNT/install/wix/platform.wxi:1.2.2.1 openafs/src/WINNT/install/wix/platform.wxi:1.2.2.2
*** openafs/src/WINNT/install/wix/platform.wxi:1.2.2.1	Wed Sep  6 19:14:02 2006
--- openafs/src/WINNT/install/wix/platform.wxi	Thu Oct 12 17:19:42 2006
***************
*** 198,204 ****
  	<?define cmp_Server_Program_Debug_guid="5F7BA9F7-E9BD-4AC3-9232-5EFBF6B740F8"?>
          <?define rcm_binsonly_parm_guid="4DFE834A-F129-4FDD-91AD-8A31A849AF0B"?>
          <?define clsid_afs_shl_ext="DC515C27-6CAC-11D1-BAE7-00C04FD140D2"?>
! 
  <?else?>
  	<?error Unknown platform?>
  <?endif?>
--- 198,207 ----
  	<?define cmp_Server_Program_Debug_guid="5F7BA9F7-E9BD-4AC3-9232-5EFBF6B740F8"?>
          <?define rcm_binsonly_parm_guid="4DFE834A-F129-4FDD-91AD-8A31A849AF0B"?>
          <?define clsid_afs_shl_ext="DC515C27-6CAC-11D1-BAE7-00C04FD140D2"?>
!         <?define _afscreds_en_us_guid="B7F72D5F-B8A2-4FE8-B675-71BA4D04FA5C"?>
!         <?define _afscreds_plugin_guid="3477A7C4-9BC9-4AF9-B97D-C96455CC3AF6"?>
!         <?define _afscreds_debugsym_guid="DCBE9170-746F-4894-96FA-B8441A133133"?>
!         <?define _afscreds_chm_guid="11657F75-67AD-4DBA-8344-BF65B7CCAAD2"?>
  <?else?>
  	<?error Unknown platform?>
  <?endif?>
Index: openafs/src/WINNT/install/wix/lang/en_US/strings.wxl
diff -c openafs/src/WINNT/install/wix/lang/en_US/strings.wxl:1.6 openafs/src/WINNT/install/wix/lang/en_US/strings.wxl:1.6.2.1
*** openafs/src/WINNT/install/wix/lang/en_US/strings.wxl:1.6	Mon Mar 20 12:20:06 2006
--- openafs/src/WINNT/install/wix/lang/en_US/strings.wxl	Thu Oct 12 17:19:42 2006
***************
*** 27,32 ****
--- 27,36 ----
      <String Id="StrLoopbackLongDesc">Loopback adapter for AFS.  It is recommended that you install the loopback adapter if you are installing the client components.</String>
      <String Id="StrBinsOnlyLongDesc">OpenAFS command-line utilities and libraries.</String>
      <String Id="StrBinsOnlyDesc">Tools and libraries</String>
+     <String Id="StrNIDMPluginDesc">NetIDMgr Plug-in</String>
+     <String Id="StrNIDMPluginLongDesc">OpenAFS plug-in for Network Identity Manager. Adds AFS token management capabilities to Network Identity Manager.</String>
+     <String Id="StrNIDMDebugDesc">Debug symbols for NetIDMgr plug-in</String>
+     <String Id="StrNIDMDebugLongDesc">Debugging symbols for the OpenAFS NetIDMgr plug-in.</String>
  
      <String Id="StrShlExtDesc">AFS Context Menu Shell Extension</String>
      <String Id="StrAfsCredsDesc">Authentication for AFS</String>
Index: openafs/src/WINNT/kfw/inc/krb5/krb5.h
diff -c openafs/src/WINNT/kfw/inc/krb5/krb5.h:1.1 openafs/src/WINNT/kfw/inc/krb5/krb5.h:1.1.14.1
*** openafs/src/WINNT/kfw/inc/krb5/krb5.h:1.1	Thu Feb 26 14:22:53 2004
--- openafs/src/WINNT/kfw/inc/krb5/krb5.h	Thu Oct 12 17:42:20 2006
***************
*** 1,3063 ****
! /*
!  * include/krb5.h
!  *
!  * Copyright 1989,1990,1995,2001, 2003  by the Massachusetts Institute of Technology.
!  * All Rights Reserved.
!  *
!  * Export of this software from the United States of America may
!  *   require a specific license from the United States Government.
!  *   It is the responsibility of any person or organization contemplating
!  *   export to obtain such a license before exporting.
!  * 
!  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
!  * distribute this software and its documentation for any purpose and
!  * without fee is hereby granted, provided that the above copyright
!  * notice appear in all copies and that both that copyright notice and
!  * this permission notice appear in supporting documentation, and that
!  * the name of M.I.T. not be used in advertising or publicity pertaining
!  * to distribution of the software without specific, written prior
!  * permission.	Furthermore if you modify this software you must label
!  * your software as modified software and not distribute it in such a
!  * fashion that it might be confused with the original M.I.T. software.
!  * M.I.T. makes no representations about the suitability of
!  * this software for any purpose.  It is provided "as is" without express
!  * or implied warranty.
!  * 
!  *
!  * General definitions for Kerberos version 5.
!  */
  
! /*
!  * Copyright (C) 1998 by the FundsXpress, INC.
!  * 
!  * All rights reserved.
!  * 
!  * Export of this software from the United States of America may require
!  * a specific license from the United States Government.  It is the
!  * responsibility of any person or organization contemplating export to
!  * obtain such a license before exporting.
!  * 
!  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
!  * distribute this software and its documentation for any purpose and
!  * without fee is hereby granted, provided that the above copyright
!  * notice appear in all copies and that both that copyright notice and
!  * this permission notice appear in supporting documentation, and that
!  * the name of FundsXpress. not be used in advertising or publicity pertaining
!  * to distribution of the software without specific, written prior
!  * permission.  FundsXpress makes no representations about the suitability of
!  * this software for any purpose.  It is provided "as is" without express
!  * or implied warranty.
!  * 
!  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
!  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
!  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
!  */
! 
! #ifndef KRB5_GENERAL__
! #define KRB5_GENERAL__
! 
! /* By default, do not expose deprecated interfaces. */
! #ifndef KRB5_DEPRECATED
! #define KRB5_DEPRECATED 0
! #endif
! /* Do not expose private interfaces.  Build system will override. */
! #ifndef KRB5_PRIVATE
! #define KRB5_PRIVATE 0
! #endif
! 
! #if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
! #	include <TargetConditionals.h>
! #    if TARGET_RT_MAC_CFM
! #	error "Use KfM 4.0 SDK headers for CFM compilation."
! #    endif
! #endif
! 
! #if defined(_MSDOS) || defined(_WIN32)
! #include <win-mac.h>
! #endif
! 
! #ifndef KRB5_CONFIG__
! #ifndef KRB5_CALLCONV
! #define KRB5_CALLCONV
! #define KRB5_CALLCONV_C
! #endif /* !KRB5_CALLCONV */
! #endif /* !KRB5_CONFIG__ */
! 
! #ifndef KRB5_CALLCONV_WRONG
! #define KRB5_CALLCONV_WRONG
! #endif
! 
! #ifndef THREEPARAMOPEN
! #define THREEPARAMOPEN(x,y,z) open(x,y,z)
! #endif
! 
! #define KRB5_OLD_CRYPTO
! 
! #include <stdlib.h>
! #include <limits.h>		/* for *_MAX */
! 
! #ifndef KRB5INT_BEGIN_DECLS
! #if defined(__cplusplus)
! #define KRB5INT_BEGIN_DECLS	extern "C" {
! #define KRB5INT_END_DECLS	}
! #else
! #define KRB5INT_BEGIN_DECLS
! #define KRB5INT_END_DECLS
! #endif
! #endif
! 
! KRB5INT_BEGIN_DECLS
! 
! #if TARGET_OS_MAC
! #    if defined(__MWERKS__)
! #        pragma import on
! #    endif
! #    pragma options align=mac68k
! #endif
! 
! /* from profile.h */
! struct _profile_t;
! /* typedef struct _profile_t *profile_t; */
! 
! /*
!  * begin wordsize.h
!  */
! 
! /*
!  * Word-size related definition.
!  */
! 
! typedef	unsigned char	krb5_octet;
! 
! #if INT_MAX == 0x7fff
! typedef	int	krb5_int16;
! typedef	unsigned int	krb5_ui_2;
! #elif SHRT_MAX == 0x7fff
! typedef	short	krb5_int16;
! typedef	unsigned short	krb5_ui_2;
! #else
! #error undefined 16 bit type
! #endif
! 
! #if INT_MAX == 0x7fffffffL
! typedef	int	krb5_int32;
! typedef	unsigned int	krb5_ui_4;
! #elif LONG_MAX == 0x7fffffffL
! typedef	long	krb5_int32;
! typedef	unsigned long	krb5_ui_4;
! #elif SHRT_MAX == 0x7fffffffL
! typedef	short	krb5_int32;
! typedef	unsigned short	krb5_ui_4;
! #else
! #error: undefined 32 bit type
! #endif
! 
! #define VALID_INT_BITS	  INT_MAX
! #define VALID_UINT_BITS	  UINT_MAX
! 
! #define KRB5_INT32_MAX	2147483647
! /* this strange form is necessary since - is a unary operator, not a sign
!    indicator */
! #define KRB5_INT32_MIN	(-KRB5_INT32_MAX-1)
! 
! #define KRB5_INT16_MAX 65535	
! /* this strange form is necessary since - is a unary operator, not a sign
!    indicator */
! #define KRB5_INT16_MIN	(-KRB5_INT16_MAX-1)
! 
! /*
!  * end wordsize.h
!  */
! 
! /*
!  * begin "base-defs.h"
!  */
! 
! /*
!  * Basic definitions for Kerberos V5 library
!  */
! 
! #ifndef FALSE
! #define	FALSE	0
! #endif
! #ifndef TRUE
! #define	TRUE	1
! #endif
! 
! typedef	unsigned int krb5_boolean;
! typedef	unsigned int krb5_msgtype;	
! typedef	unsigned int krb5_kvno;	
! 
! typedef	krb5_int32 krb5_addrtype;
! typedef krb5_int32 krb5_enctype;
! typedef krb5_int32 krb5_cksumtype;
! typedef krb5_int32 krb5_authdatatype;
! typedef krb5_int32 krb5_keyusage;
! 
! typedef krb5_int32	krb5_preauthtype; /* This may change, later on */
! typedef	krb5_int32	krb5_flags;
! typedef krb5_int32	krb5_timestamp;
! typedef	krb5_int32	krb5_error_code;
! typedef krb5_int32	krb5_deltat;
! 
! typedef krb5_error_code	krb5_magic;
! 
! typedef struct _krb5_data {
! 	krb5_magic magic;
! 	unsigned int length;
! 	char *data;
! } krb5_data;
! 
! /* 
!  * Hack length for crypto library to use the afs_string_to_key It is
!  * equivalent to -1 without possible sign extension 
!  * We also overload for an unset salt type length - which is also -1, but
!  * hey, why not....
! */
! #define SALT_TYPE_AFS_LENGTH UINT_MAX
! #define SALT_TYPE_NO_LENGTH  UINT_MAX
! 
! typedef	void * krb5_pointer;
! typedef void const * krb5_const_pointer;
! 
! typedef struct krb5_principal_data {
!     krb5_magic magic;
!     krb5_data realm;
!     krb5_data *data;		/* An array of strings */
!     krb5_int32 length;
!     krb5_int32 type;
! } krb5_principal_data;
! 
! typedef	krb5_principal_data * krb5_principal;
! 
! /*
!  * Per V5 spec on definition of principal types
!  */
! 
! /* Name type not known */
! #define KRB5_NT_UNKNOWN		0
! /* Just the name of the principal as in DCE, or for users */
! #define KRB5_NT_PRINCIPAL	1
! /* Service and other unique instance (krbtgt) */
! #define KRB5_NT_SRV_INST	2
! /* Service with host name as instance (telnet, rcommands) */
! #define KRB5_NT_SRV_HST		3
! /* Service with host as remaining components */
! #define KRB5_NT_SRV_XHST	4
! /* Unique ID */
! #define KRB5_NT_UID		5
! 
! /* constant version thereof: */
! typedef const krb5_principal_data *krb5_const_principal;
! 
! #define krb5_princ_realm(context, princ) (&(princ)->realm)
! #define krb5_princ_set_realm(context, princ,value) ((princ)->realm = *(value))
! #define krb5_princ_set_realm_length(context, princ,value) (princ)->realm.length = (value)
! #define krb5_princ_set_realm_data(context, princ,value) (princ)->realm.data = (value)
! #define	krb5_princ_size(context, princ) (princ)->length
! #define	krb5_princ_type(context, princ) (princ)->type
! #define	krb5_princ_name(context, princ) (princ)->data
! #define	krb5_princ_component(context, princ,i)		\
! 	    (((i) < krb5_princ_size(context, princ))	\
! 	     ? (princ)->data + (i)			\
! 	     : NULL)
! 
! /*
!  * end "base-defs.h"
!  */
! 
! /*
!  * begin "hostaddr.h"
!  */
! 
! /* structure for address */
! typedef struct _krb5_address {
!     krb5_magic magic;
!     krb5_addrtype addrtype;
!     unsigned int length;
!     krb5_octet *contents;
! } krb5_address;
! 
! /* per Kerberos v5 protocol spec */
! #define	ADDRTYPE_INET		0x0002
! #define	ADDRTYPE_CHAOS		0x0005
! #define	ADDRTYPE_XNS		0x0006
! #define	ADDRTYPE_ISO		0x0007
! #define ADDRTYPE_DDP		0x0010
! #define ADDRTYPE_INET6		0x0018
! /* not yet in the spec... */
! #define ADDRTYPE_ADDRPORT	0x0100
! #define ADDRTYPE_IPPORT		0x0101
! 
! /* macros to determine if a type is a local type */
! #define ADDRTYPE_IS_LOCAL(addrtype) (addrtype & 0x8000)
! 
! /*
!  * end "hostaddr.h"
!  */
! 
! 
! struct _krb5_context;
! typedef struct _krb5_context * krb5_context;
! 
! struct _krb5_auth_context;
! typedef struct _krb5_auth_context * krb5_auth_context;
! 
! struct _krb5_cryptosystem_entry;
! 
! /*
!  * begin "encryption.h"
!  */
! 
! typedef struct _krb5_keyblock {
!     krb5_magic magic;
!     krb5_enctype enctype;
!     unsigned int length;
!     krb5_octet *contents;
! } krb5_keyblock;
! 
! #ifdef KRB5_OLD_CRYPTO
! typedef struct _krb5_encrypt_block {
!     krb5_magic magic;
!     krb5_enctype crypto_entry;		/* to call krb5_encrypt_size, you need
! 					   this.  it was a pointer, but it
! 					   doesn't have to be.  gross. */
!     krb5_keyblock *key;
! } krb5_encrypt_block;
! #endif
! 
! typedef struct _krb5_checksum {
!     krb5_magic magic;
!     krb5_cksumtype checksum_type;	/* checksum type */
!     unsigned int length;
!     krb5_octet *contents;
! } krb5_checksum;
! 
! typedef struct _krb5_enc_data {
!     krb5_magic magic;
!     krb5_enctype enctype;
!     krb5_kvno kvno;
!     krb5_data ciphertext;
! } krb5_enc_data;
! 
! /* per Kerberos v5 protocol spec */
! #define	ENCTYPE_NULL		0x0000
! #define	ENCTYPE_DES_CBC_CRC	0x0001	/* DES cbc mode with CRC-32 */
! #define	ENCTYPE_DES_CBC_MD4	0x0002	/* DES cbc mode with RSA-MD4 */
! #define	ENCTYPE_DES_CBC_MD5	0x0003	/* DES cbc mode with RSA-MD5 */
! #define	ENCTYPE_DES_CBC_RAW	0x0004	/* DES cbc mode raw */
! /* XXX deprecated? */
! #define	ENCTYPE_DES3_CBC_SHA	0x0005	/* DES-3 cbc mode with NIST-SHA */
! #define	ENCTYPE_DES3_CBC_RAW	0x0006	/* DES-3 cbc mode raw */
! #define ENCTYPE_DES_HMAC_SHA1	0x0008
! #define ENCTYPE_DES3_CBC_SHA1	0x0010
! #define ENCTYPE_AES128_CTS_HMAC_SHA1_96	0x0011
! #define ENCTYPE_AES256_CTS_HMAC_SHA1_96	0x0012
! #define ENCTYPE_ARCFOUR_HMAC	0x0017
! #define ENCTYPE_ARCFOUR_HMAC_EXP 0x0018
! #define ENCTYPE_UNKNOWN		0x01ff
! /* local crud */
! /* marc's DES-3 with 32-bit length */
! #define ENCTYPE_LOCAL_DES3_HMAC_SHA1 0x7007
! 
! #define	CKSUMTYPE_CRC32		0x0001
! #define	CKSUMTYPE_RSA_MD4	0x0002
! #define	CKSUMTYPE_RSA_MD4_DES	0x0003
! #define	CKSUMTYPE_DESCBC	0x0004
! /* des-mac-k */
! /* rsa-md4-des-k */
! #define	CKSUMTYPE_RSA_MD5	0x0007
! #define	CKSUMTYPE_RSA_MD5_DES	0x0008
! #define CKSUMTYPE_NIST_SHA	0x0009
! #define CKSUMTYPE_HMAC_SHA1_DES3	0x000c
! #define CKSUMTYPE_HMAC_SHA1_96_AES128	0x000f
! #define CKSUMTYPE_HMAC_SHA1_96_AES256	0x0010
! #define CKSUMTYPE_HMAC_MD5_ARCFOUR -138 /*Microsoft md5 hmac cksumtype*/
! 
! /* The following are entropy source designations. Whenever
!  * krb5_C_random_add_entropy is called, one of these source  ids is passed
!  * in.  This  allows the library  to better estimate bits of
!  * entropy in the sample and to keep track of what sources of entropy have
!  * contributed enough entropy.  Sources marked internal MUST NOT be
!  * used by applications outside the Kerberos library
! */
! 
! enum {
!   KRB5_C_RANDSOURCE_OLDAPI = 0, /*calls to krb5_C_RANDOM_SEED (INTERNAL)*/
!   KRB5_C_RANDSOURCE_OSRAND = 1, /* /dev/random or equivalent (internal)*/
!   KRB5_C_RANDSOURCE_TRUSTEDPARTY = 2, /* From KDC or other trusted party*/
!   /*This source should be used carefully; data in this category
!    * should be from a third party trusted to give random bits
!    * For example keys issued by the KDC in the application server.
!    */
!   KRB5_C_RANDSOURCE_TIMING = 3, /* Timing of operations*/
!   KRB5_C_RANDSOURCE_EXTERNAL_PROTOCOL = 4, /*Protocol data possibly from attacker*/
!   KRB5_C_RANDSOURCE_MAX = 5 /*Do not use; maximum source ID*/
! };
! 
! #ifndef krb5_roundup
! /* round x up to nearest multiple of y */
! #define krb5_roundup(x, y) ((((x) + (y) - 1)/(y))*(y))
! #endif /* roundup */
! 
! /* macro function definitions to help clean up code */
! 
! #if 1
! #define krb5_x(ptr,args) ((ptr)?((*(ptr)) args):(abort(),1))
! #define krb5_xc(ptr,args) ((ptr)?((*(ptr)) args):(abort(),(char*)0))
! #else
! #define krb5_x(ptr,args) ((*(ptr)) args)
! #define krb5_xc(ptr,args) ((*(ptr)) args)
! #endif
! 
! krb5_error_code KRB5_CALLCONV
!     krb5_c_encrypt
!     (krb5_context context, const krb5_keyblock *key,
! 		    krb5_keyusage usage, const krb5_data *cipher_state,
! 		    const krb5_data *input, krb5_enc_data *output);
! 
! krb5_error_code KRB5_CALLCONV
!     krb5_c_decrypt
!     (krb5_context context, const krb5_keyblock *key,
! 		    krb5_keyusage usage, const krb5_data *cipher_state,
! 		    const krb5_enc_data *input, krb5_data *output);
! 
! krb5_error_code KRB5_CALLCONV
!     krb5_c_encrypt_length
!     (krb5_context context, krb5_enctype enctype,
! 		    size_t inputlen, size_t *length);
! 
! krb5_error_code KRB5_CALLCONV
!     krb5_c_block_size
!     (krb5_context context, krb5_enctype enctype,
! 		    size_t *blocksize);
! 
! krb5_error_code KRB5_CALLCONV
! 	krb5_c_init_state
! (krb5_context context,
! const krb5_keyblock *key, krb5_keyusage usage,
! krb5_data *new_state);
! 
! krb5_error_code KRB5_CALLCONV
! 	krb5_c_free_state
! (krb5_context context, const krb5_keyblock *key, krb5_data *state);
! 
! krb5_error_code KRB5_CALLCONV
!     krb5_c_make_random_key
!     (krb5_context context, krb5_enctype enctype,
! 		    krb5_keyblock *k5_random_key);
! 
! /* Register a new entropy sample  with the PRNG. may cause
! * the PRNG to be reseeded, although this is not guaranteed.  See previous randsource definitions
! * for information on how each source should be used.
! */
! krb5_error_code KRB5_CALLCONV
! 	krb5_c_random_add_entropy
! (krb5_context context, unsigned int  randsource_id, const krb5_data *data);
! 
! 
! krb5_error_code KRB5_CALLCONV
!     krb5_c_random_make_octets
!     (krb5_context context, krb5_data *data);
! 
! /*
! * Collect entropy from the OS if possible. strong requests that as strong 
! * of a source of entropy  as available be used.  Setting strong may 
! * increase the probability of blocking and should not  be used for normal 
! * applications.  Good uses include seeding the PRNG for kadmind
! * and realm setup.
! * If successful is non-null, then successful is set to 1 if the OS provided
! * entropy else zero.
! */
! krb5_error_code KRB5_CALLCONV
! krb5_c_random_os_entropy
! (krb5_context context, int strong, int *success);
! 
! /*deprecated*/ krb5_error_code KRB5_CALLCONV
!     krb5_c_random_seed
!     (krb5_context context, krb5_data *data);
! 
! krb5_error_code KRB5_CALLCONV
!     krb5_c_string_to_key
!     (krb5_context context, krb5_enctype enctype,
! 		    const krb5_data *string, const krb5_data *salt,
! 		    krb5_keyblock *key);
! krb5_error_code KRB5_CALLCONV
! krb5_c_string_to_key_with_params(krb5_context context,
! 				 krb5_enctype enctype,
! 				 const krb5_data *string,
! 				 const krb5_data *salt,
! 				 const krb5_data *params,
! 				 krb5_keyblock *key);
! 
! krb5_error_code KRB5_CALLCONV
!     krb5_c_enctype_compare
!     (krb5_context context, krb5_enctype e1, krb5_enctype e2,
! 		    krb5_boolean *similar);
! 
! krb5_error_code KRB5_CALLCONV
!     krb5_c_make_checksum
!     (krb5_context context, krb5_cksumtype cksumtype,
! 		    const krb5_keyblock *key, krb5_keyusage usage,
! 		    const krb5_data *input, krb5_checksum *cksum);
!     
! krb5_error_code KRB5_CALLCONV
!     krb5_c_verify_checksum
!     (krb5_context context, 
! 		    const krb5_keyblock *key, krb5_keyusage usage,
! 		    const krb5_data *data,
! 		    const krb5_checksum *cksum,
! 		    krb5_boolean *valid);
!     
! krb5_error_code KRB5_CALLCONV
!     krb5_c_checksum_length
!     (krb5_context context, krb5_cksumtype cksumtype,
! 		    size_t *length);
! 
! krb5_error_code KRB5_CALLCONV
!     krb5_c_keyed_checksum_types
!     (krb5_context context, krb5_enctype enctype, 
! 		    unsigned int *count, krb5_cksumtype **cksumtypes);
! 
! #define KRB5_KEYUSAGE_AS_REQ_PA_ENC_TS		1
! #define KRB5_KEYUSAGE_KDC_REP_TICKET		2
! #define KRB5_KEYUSAGE_AS_REP_ENCPART		3
! #define KRB5_KEYUSAGE_TGS_REQ_AD_SESSKEY	4
! #define KRB5_KEYUSAGE_TGS_REQ_AD_SUBKEY		5
! #define KRB5_KEYUSAGE_TGS_REQ_AUTH_CKSUM	6
! #define KRB5_KEYUSAGE_TGS_REQ_AUTH		7
! #define KRB5_KEYUSAGE_TGS_REP_ENCPART_SESSKEY	8
! #define KRB5_KEYUSAGE_TGS_REP_ENCPART_SUBKEY	9
! #define KRB5_KEYUSAGE_AP_REQ_AUTH_CKSUM		10
! #define KRB5_KEYUSAGE_AP_REQ_AUTH		11
! #define KRB5_KEYUSAGE_AP_REP_ENCPART		12
! #define KRB5_KEYUSAGE_KRB_PRIV_ENCPART		13
! #define KRB5_KEYUSAGE_KRB_CRED_ENCPART		14
! #define KRB5_KEYUSAGE_KRB_SAFE_CKSUM		15
! #define KRB5_KEYUSAGE_APP_DATA_ENCRYPT		16
! #define KRB5_KEYUSAGE_APP_DATA_CKSUM		17
! #define KRB5_KEYUSAGE_KRB_ERROR_CKSUM		18
! #define KRB5_KEYUSAGE_AD_KDCISSUED_CKSUM	19
! #define KRB5_KEYUSAGE_AD_MTE			20
! #define KRB5_KEYUSAGE_AD_ITE			21
! 
! /* XXX need to register these */
! 
! #define KRB5_KEYUSAGE_GSS_TOK_MIC		22
! #define KRB5_KEYUSAGE_GSS_TOK_WRAP_INTEG	23
! #define KRB5_KEYUSAGE_GSS_TOK_WRAP_PRIV		24
! 
! /* Defined in hardware preauth draft */
! 
! #define KRB5_KEYUSAGE_PA_SAM_CHALLENGE_CKSUM	25
! #define KRB5_KEYUSAGE_PA_SAM_CHALLENGE_TRACKID	26
! #define KRB5_KEYUSAGE_PA_SAM_RESPONSE		27
! 
! krb5_boolean KRB5_CALLCONV krb5_c_valid_enctype
! 	(krb5_enctype ktype);
! krb5_boolean KRB5_CALLCONV krb5_c_valid_cksumtype
! 	(krb5_cksumtype ctype);
! krb5_boolean KRB5_CALLCONV krb5_c_is_coll_proof_cksum
! 	(krb5_cksumtype ctype);
! krb5_boolean KRB5_CALLCONV krb5_c_is_keyed_cksum
! 	(krb5_cksumtype ctype);
! 
! #if KRB5_PRIVATE
! /* Use the above four instead.  */
! krb5_boolean KRB5_CALLCONV valid_enctype
! 	(krb5_enctype ktype);
! krb5_boolean KRB5_CALLCONV valid_cksumtype
! 	(krb5_cksumtype ctype);
! krb5_boolean KRB5_CALLCONV is_coll_proof_cksum
! 	(krb5_cksumtype ctype);
! krb5_boolean KRB5_CALLCONV is_keyed_cksum
! 	(krb5_cksumtype ctype);
! #endif
! 
! #ifdef KRB5_OLD_CRYPTO
! /*
!  * old cryptosystem routine prototypes.  These are now layered
!  * on top of the functions above.
!  */
! krb5_error_code KRB5_CALLCONV krb5_encrypt
! 	(krb5_context context,
! 		krb5_const_pointer inptr,
! 		krb5_pointer outptr,
! 		size_t size,
! 		krb5_encrypt_block * eblock,
! 		krb5_pointer ivec);
! krb5_error_code KRB5_CALLCONV krb5_decrypt
! 	(krb5_context context,
! 		krb5_const_pointer inptr,
! 		krb5_pointer outptr,
! 		size_t size,
! 		krb5_encrypt_block * eblock,
! 		krb5_pointer ivec);
! krb5_error_code KRB5_CALLCONV krb5_process_key
! 	(krb5_context context,
! 		krb5_encrypt_block * eblock,
! 		const krb5_keyblock * key);
! krb5_error_code KRB5_CALLCONV krb5_finish_key
! 	(krb5_context context,
! 		krb5_encrypt_block * eblock);
! krb5_error_code KRB5_CALLCONV krb5_string_to_key
! 	(krb5_context context,
! 		const krb5_encrypt_block * eblock,
! 		krb5_keyblock * keyblock,
! 		const krb5_data * data,
! 		const krb5_data * salt);
! krb5_error_code KRB5_CALLCONV krb5_init_random_key
! 	(krb5_context context,
! 		const krb5_encrypt_block * eblock,
! 		const krb5_keyblock * keyblock,
! 		krb5_pointer * ptr);
! krb5_error_code KRB5_CALLCONV krb5_finish_random_key
! 	(krb5_context context,
! 		const krb5_encrypt_block * eblock,
! 		krb5_pointer * ptr);
! krb5_error_code KRB5_CALLCONV krb5_random_key
! 	(krb5_context context,
! 		const krb5_encrypt_block * eblock,
! 		krb5_pointer ptr,
! 		krb5_keyblock ** keyblock);
! krb5_enctype KRB5_CALLCONV krb5_eblock_enctype
! 	(krb5_context context,
! 		const krb5_encrypt_block * eblock);
! krb5_error_code KRB5_CALLCONV krb5_use_enctype
! 	(krb5_context context,
! 		krb5_encrypt_block * eblock,
! 		krb5_enctype enctype);
! size_t KRB5_CALLCONV krb5_encrypt_size
! 	(size_t length,
! 		krb5_enctype crypto);
! size_t KRB5_CALLCONV krb5_checksum_size
! 	(krb5_context context,
! 		krb5_cksumtype ctype);
! krb5_error_code KRB5_CALLCONV krb5_calculate_checksum
! 	(krb5_context context,
! 		krb5_cksumtype ctype,
! 		krb5_const_pointer in, size_t in_length,
! 		krb5_const_pointer seed, size_t seed_length,
! 		krb5_checksum * outcksum);
! krb5_error_code KRB5_CALLCONV krb5_verify_checksum
! 	(krb5_context context,
! 		krb5_cksumtype ctype,
! 		const krb5_checksum * cksum,
! 		krb5_const_pointer in, size_t in_length,
! 		krb5_const_pointer seed, size_t seed_length);
! 
! #if KRB5_PRIVATE
! krb5_error_code KRB5_CALLCONV krb5_random_confounder
! 	(size_t, krb5_pointer);
! 
! krb5_error_code krb5_encrypt_data
! 	(krb5_context context, krb5_keyblock *key, 
! 		krb5_pointer ivec, krb5_data *data, 
! 		krb5_enc_data *enc_data);
! 
! krb5_error_code krb5_decrypt_data
! 	(krb5_context context, krb5_keyblock *key, 
! 		krb5_pointer ivec, krb5_enc_data *data, 
! 		krb5_data *enc_data);
! #endif
! 
! #endif /* KRB5_OLD_CRYPTO */
! 
! /*
!  * end "encryption.h"
!  */
! 
! /*
!  * begin "fieldbits.h"
!  */
! 
! /* kdc_options for kdc_request */
! /* options is 32 bits; each host is responsible to put the 4 bytes
!    representing these bits into net order before transmission */
! /* #define	KDC_OPT_RESERVED	0x80000000 */
! #define	KDC_OPT_FORWARDABLE		0x40000000
! #define	KDC_OPT_FORWARDED		0x20000000
! #define	KDC_OPT_PROXIABLE		0x10000000
! #define	KDC_OPT_PROXY			0x08000000
! #define	KDC_OPT_ALLOW_POSTDATE		0x04000000
! #define	KDC_OPT_POSTDATED		0x02000000
! /* #define	KDC_OPT_UNUSED		0x01000000 */
! #define	KDC_OPT_RENEWABLE		0x00800000
! /* #define	KDC_OPT_UNUSED		0x00400000 */
! /* #define	KDC_OPT_RESERVED	0x00200000 */
! /* #define	KDC_OPT_RESERVED	0x00100000 */
! /* #define	KDC_OPT_RESERVED	0x00080000 */
! /* #define	KDC_OPT_RESERVED	0x00040000 */
! #define	KDC_OPT_REQUEST_ANONYMOUS	0x00020000
! /* #define	KDC_OPT_RESERVED	0x00010000 */
! /* #define	KDC_OPT_RESERVED	0x00008000 */
! /* #define	KDC_OPT_RESERVED	0x00004000 */
! /* #define	KDC_OPT_RESERVED	0x00002000 */
! /* #define	KDC_OPT_RESERVED	0x00001000 */
! /* #define	KDC_OPT_RESERVED	0x00000800 */
! /* #define	KDC_OPT_RESERVED	0x00000400 */
! /* #define	KDC_OPT_RESERVED	0x00000200 */
! /* #define	KDC_OPT_RESERVED	0x00000100 */
! /* #define	KDC_OPT_RESERVED	0x00000080 */
! /* #define	KDC_OPT_RESERVED	0x00000040 */
! #define	KDC_OPT_DISABLE_TRANSITED_CHECK	0x00000020
! #define	KDC_OPT_RENEWABLE_OK		0x00000010
! #define	KDC_OPT_ENC_TKT_IN_SKEY		0x00000008
! /* #define	KDC_OPT_UNUSED		0x00000004 */
! #define	KDC_OPT_RENEW			0x00000002
! #define	KDC_OPT_VALIDATE		0x00000001
! 
! /*
!  * Mask of ticket flags in the TGT which should be converted into KDC
!  * options when using the TGT to get derivitive tickets.
!  * 
!  *  New mask = KDC_OPT_FORWARDABLE | KDC_OPT_PROXIABLE |
!  *	       KDC_OPT_ALLOW_POSTDATE | KDC_OPT_RENEWABLE
!  */
! #define KDC_TKT_COMMON_MASK		0x54800000
! 
! /* definitions for ap_options fields */
! /* ap_options are 32 bits; each host is responsible to put the 4 bytes
!    representing these bits into net order before transmission */
! #define	AP_OPTS_RESERVED		0x80000000
! #define	AP_OPTS_USE_SESSION_KEY		0x40000000
! #define	AP_OPTS_MUTUAL_REQUIRED		0x20000000
! /* #define	AP_OPTS_RESERVED	0x10000000 */
! /* #define	AP_OPTS_RESERVED	0x08000000 */
! /* #define	AP_OPTS_RESERVED	0x04000000 */
! /* #define	AP_OPTS_RESERVED	0x02000000 */
! /* #define	AP_OPTS_RESERVED	0x01000000 */
! /* #define	AP_OPTS_RESERVED	0x00800000 */
! /* #define	AP_OPTS_RESERVED	0x00400000 */
! /* #define	AP_OPTS_RESERVED	0x00200000 */
! /* #define	AP_OPTS_RESERVED	0x00100000 */
! /* #define	AP_OPTS_RESERVED	0x00080000 */
! /* #define	AP_OPTS_RESERVED	0x00040000 */
! /* #define	AP_OPTS_RESERVED	0x00020000 */
! /* #define	AP_OPTS_RESERVED	0x00010000 */
! /* #define	AP_OPTS_RESERVED	0x00008000 */
! /* #define	AP_OPTS_RESERVED	0x00004000 */
! /* #define	AP_OPTS_RESERVED	0x00002000 */
! /* #define	AP_OPTS_RESERVED	0x00001000 */
! /* #define	AP_OPTS_RESERVED	0x00000800 */
! /* #define	AP_OPTS_RESERVED	0x00000400 */
! /* #define	AP_OPTS_RESERVED	0x00000200 */
! /* #define	AP_OPTS_RESERVED	0x00000100 */
! /* #define	AP_OPTS_RESERVED	0x00000080 */
! /* #define	AP_OPTS_RESERVED	0x00000040 */
! /* #define	AP_OPTS_RESERVED	0x00000020 */
! /* #define	AP_OPTS_RESERVED	0x00000010 */
! /* #define	AP_OPTS_RESERVED	0x00000008 */
! /* #define	AP_OPTS_RESERVED	0x00000004 */
! /* #define	AP_OPTS_RESERVED	0x00000002 */
! #define AP_OPTS_USE_SUBKEY	0x00000001
! 
! #define AP_OPTS_WIRE_MASK	0xfffffff0
! 
! /* definitions for ad_type fields. */
! #define	AD_TYPE_RESERVED	0x8000
! #define	AD_TYPE_EXTERNAL	0x4000
! #define	AD_TYPE_REGISTERED	0x2000
! 
! #define AD_TYPE_FIELD_TYPE_MASK	0x1fff
! 
! /* Ticket flags */
! /* flags are 32 bits; each host is responsible to put the 4 bytes
!    representing these bits into net order before transmission */
! /* #define	TKT_FLG_RESERVED	0x80000000 */
! #define	TKT_FLG_FORWARDABLE		0x40000000
! #define	TKT_FLG_FORWARDED		0x20000000
! #define	TKT_FLG_PROXIABLE		0x10000000
! #define	TKT_FLG_PROXY			0x08000000
! #define	TKT_FLG_MAY_POSTDATE		0x04000000
! #define	TKT_FLG_POSTDATED		0x02000000
! #define	TKT_FLG_INVALID			0x01000000
! #define	TKT_FLG_RENEWABLE		0x00800000
! #define	TKT_FLG_INITIAL			0x00400000
! #define	TKT_FLG_PRE_AUTH		0x00200000
! #define	TKT_FLG_HW_AUTH			0x00100000
! #define	TKT_FLG_TRANSIT_POLICY_CHECKED	0x00080000
! #define	TKT_FLG_OK_AS_DELEGATE		0x00040000
! #define	TKT_FLG_ANONYMOUS		0x00020000
! /* #define	TKT_FLG_RESERVED	0x00010000 */
! /* #define	TKT_FLG_RESERVED	0x00008000 */
! /* #define	TKT_FLG_RESERVED	0x00004000 */
! /* #define	TKT_FLG_RESERVED	0x00002000 */
! /* #define	TKT_FLG_RESERVED	0x00001000 */
! /* #define	TKT_FLG_RESERVED	0x00000800 */
! /* #define	TKT_FLG_RESERVED	0x00000400 */
! /* #define	TKT_FLG_RESERVED	0x00000200 */
! /* #define	TKT_FLG_RESERVED	0x00000100 */
! /* #define	TKT_FLG_RESERVED	0x00000080 */
! /* #define	TKT_FLG_RESERVED	0x00000040 */
! /* #define	TKT_FLG_RESERVED	0x00000020 */
! /* #define	TKT_FLG_RESERVED	0x00000010 */
! /* #define	TKT_FLG_RESERVED	0x00000008 */
! /* #define	TKT_FLG_RESERVED	0x00000004 */
! /* #define	TKT_FLG_RESERVED	0x00000002 */
! /* #define	TKT_FLG_RESERVED	0x00000001 */
! 
! /* definitions for lr_type fields. */
! #define	LR_TYPE_THIS_SERVER_ONLY	0x8000
! 
! #define LR_TYPE_INTERPRETATION_MASK	0x7fff
! 
! /* definitions for ad_type fields. */
! #define	AD_TYPE_EXTERNAL	0x4000
! #define	AD_TYPE_REGISTERED	0x2000
! 
! #define AD_TYPE_FIELD_TYPE_MASK	0x1fff
! #define AD_TYPE_INTERNAL_MASK	0x3fff
! 
! /* definitions for msec direction bit for KRB_SAFE, KRB_PRIV */
! #define	MSEC_DIRBIT		0x8000
! #define	MSEC_VAL_MASK		0x7fff
! 
! /*
!  * end "fieldbits.h"
!  */
! 
! /*
!  * begin "proto.h"
!  */
! 
! /* Protocol version number */
! #define	KRB5_PVNO	5
! 
! /* Message types */
! 
! #define	KRB5_AS_REQ	((krb5_msgtype)10) /* Req for initial authentication */
! #define	KRB5_AS_REP	((krb5_msgtype)11) /* Response to KRB_AS_REQ request */
! #define	KRB5_TGS_REQ	((krb5_msgtype)12) /* TGS request to server */
! #define	KRB5_TGS_REP	((krb5_msgtype)13) /* Response to KRB_TGS_REQ req */
! #define	KRB5_AP_REQ	((krb5_msgtype)14) /* application request to server */
! #define	KRB5_AP_REP	((krb5_msgtype)15) /* Response to KRB_AP_REQ_MUTUAL */
! #define	KRB5_SAFE	((krb5_msgtype)20) /* Safe application message */
! #define	KRB5_PRIV	((krb5_msgtype)21) /* Private application message */
! #define	KRB5_CRED	((krb5_msgtype)22) /* Credential forwarding message */
! #define	KRB5_ERROR	((krb5_msgtype)30) /* Error response */
! 
! /* LastReq types */
! #define KRB5_LRQ_NONE			0
! #define KRB5_LRQ_ALL_LAST_TGT		1
! #define KRB5_LRQ_ONE_LAST_TGT		(-1)
! #define KRB5_LRQ_ALL_LAST_INITIAL	2
! #define KRB5_LRQ_ONE_LAST_INITIAL	(-2)
! #define KRB5_LRQ_ALL_LAST_TGT_ISSUED	3
! #define KRB5_LRQ_ONE_LAST_TGT_ISSUED	(-3)
! #define KRB5_LRQ_ALL_LAST_RENEWAL	4
! #define KRB5_LRQ_ONE_LAST_RENEWAL	(-4)
! #define KRB5_LRQ_ALL_LAST_REQ		5
! #define KRB5_LRQ_ONE_LAST_REQ		(-5)
! #define KRB5_LRQ_ALL_PW_EXPTIME		6
! #define KRB5_LRQ_ONE_PW_EXPTIME		(-6)
! 
! /* PADATA types */
! #define KRB5_PADATA_NONE		0
! #define	KRB5_PADATA_AP_REQ		1
! #define	KRB5_PADATA_TGS_REQ		KRB5_PADATA_AP_REQ
! #define KRB5_PADATA_ENC_TIMESTAMP	2
! #define	KRB5_PADATA_PW_SALT		3
! #if 0				/* Not used */
! #define KRB5_PADATA_ENC_ENCKEY		4  /* Key encrypted within itself */
! #endif
! #define KRB5_PADATA_ENC_UNIX_TIME	5  /* timestamp encrypted in key */
! #define KRB5_PADATA_ENC_SANDIA_SECURID	6  /* SecurId passcode */
! #define KRB5_PADATA_SESAME		7  /* Sesame project */
! #define KRB5_PADATA_OSF_DCE		8  /* OSF DCE */
! #define KRB5_CYBERSAFE_SECUREID		9  /* Cybersafe */
! #define	KRB5_PADATA_AFS3_SALT		10 /* Cygnus */
! #define KRB5_PADATA_ETYPE_INFO		11 /* Etype info for preauth */
! #define KRB5_PADATA_SAM_CHALLENGE	12 /* draft challenge system */
! #define KRB5_PADATA_SAM_RESPONSE	13 /* draft challenge system response */
! #define KRB5_PADATA_PK_AS_REQ		14 /* PKINIT */
! #define KRB5_PADATA_PK_AS_REP		15 /* PKINIT */
! #define KRB5_PADATA_ETYPE_INFO2 19
! #define KRB5_PADATA_SAM_CHALLENGE_2	30 /* draft challenge system, updated */
! #define KRB5_PADATA_SAM_RESPONSE_2	31 /* draft challenge system, updated */
!     
! #define	KRB5_SAM_USE_SAD_AS_KEY		0x80000000
! #define	KRB5_SAM_SEND_ENCRYPTED_SAD	0x40000000
! #define	KRB5_SAM_MUST_PK_ENCRYPT_SAD	0x20000000 /* currently must be zero */
! 
! /* Reserved for SPX pre-authentication. */
! #define KRB5_PADATA_DASS		16
! 
! /* Transited encoding types */
! #define	KRB5_DOMAIN_X500_COMPRESS	1
! 
! /* alternate authentication types */
! #define	KRB5_ALTAUTH_ATT_CHALLENGE_RESPONSE	64
! 
! /* authorization data types */
! #define	KRB5_AUTHDATA_OSF_DCE	64
! #define KRB5_AUTHDATA_SESAME	65
! 
! /* password change constants */
! 
! #define KRB5_KPASSWD_SUCCESS		0
! #define KRB5_KPASSWD_MALFORMED		1
! #define KRB5_KPASSWD_HARDERROR		2
! #define KRB5_KPASSWD_AUTHERROR		3
! #define KRB5_KPASSWD_SOFTERROR		4
! /* These are Microsoft's extensions in RFC 3244, and it looks like
!    they'll become standardized, possibly with other additions.  */
! #define KRB5_KPASSWD_ACCESSDENIED	5	/* unused */
! #define KRB5_KPASSWD_BAD_VERSION	6
! #define KRB5_KPASSWD_INITIAL_FLAG_NEEDED 7	/* unused */
! 
! /*
!  * end "proto.h"
!  */
! 
! /* Time set */
! typedef struct _krb5_ticket_times {
!     krb5_timestamp authtime; /* XXX ? should ktime in KDC_REP == authtime
! 				in ticket? otherwise client can't get this */ 
!     krb5_timestamp starttime;		/* optional in ticket, if not present,
! 					   use authtime */
!     krb5_timestamp endtime;
!     krb5_timestamp renew_till;
! } krb5_ticket_times;
! 
! /* structure for auth data */
! typedef struct _krb5_authdata {
!     krb5_magic magic;
!     krb5_authdatatype ad_type;
!     unsigned int length;
!     krb5_octet *contents;
! } krb5_authdata;
! 
! /* structure for transited encoding */
! typedef struct _krb5_transited {
!     krb5_magic magic;
!     krb5_octet tr_type;
!     krb5_data tr_contents;
! } krb5_transited;
! 
! typedef struct _krb5_enc_tkt_part {
!     krb5_magic magic;
!     /* to-be-encrypted portion */
!     krb5_flags flags;			/* flags */
!     krb5_keyblock *session;		/* session key: includes enctype */
!     krb5_principal client;		/* client name/realm */
!     krb5_transited transited;		/* list of transited realms */
!     krb5_ticket_times times;		/* auth, start, end, renew_till */
!     krb5_address **caddrs;	/* array of ptrs to addresses */
!     krb5_authdata **authorization_data; /* auth data */
! } krb5_enc_tkt_part;
! 
! typedef struct _krb5_ticket {
!     krb5_magic magic;
!     /* cleartext portion */
!     krb5_principal server;		/* server name/realm */
!     krb5_enc_data enc_part;		/* encryption type, kvno, encrypted
! 					   encoding */
!     krb5_enc_tkt_part *enc_part2;	/* ptr to decrypted version, if
! 					   available */
! } krb5_ticket;
! 
! /* the unencrypted version */
! typedef struct _krb5_authenticator {
!     krb5_magic magic;
!     krb5_principal client;		/* client name/realm */
!     krb5_checksum *checksum;	/* checksum, includes type, optional */
!     krb5_int32 cusec;			/* client usec portion */
!     krb5_timestamp ctime;		/* client sec portion */
!     krb5_keyblock *subkey;		/* true session key, optional */
!     krb5_ui_4 seq_number;		/* sequence #, optional */
!     krb5_authdata **authorization_data; /* New add by Ari, auth data */
! } krb5_authenticator;
! 
! typedef struct _krb5_tkt_authent {
!     krb5_magic magic;
!     krb5_ticket *ticket;
!     krb5_authenticator *authenticator;
!     krb5_flags ap_options;
! } krb5_tkt_authent;
! 
! /* credentials:	 Ticket, session key, etc. */
! typedef struct _krb5_creds {
!     krb5_magic magic;
!     krb5_principal client;		/* client's principal identifier */
!     krb5_principal server;		/* server's principal identifier */
!     krb5_keyblock keyblock;		/* session encryption key info */
!     krb5_ticket_times times;		/* lifetime info */
!     krb5_boolean is_skey;		/* true if ticket is encrypted in
! 					   another ticket's skey */
!     krb5_flags ticket_flags;		/* flags in ticket */
!     krb5_address **addresses;	/* addrs in ticket */
!     krb5_data ticket;			/* ticket string itself */
!     krb5_data second_ticket;		/* second ticket, if related to
! 					   ticket (via DUPLICATE-SKEY or
! 					   ENC-TKT-IN-SKEY) */
!     krb5_authdata **authdata;	/* authorization data */
! } krb5_creds;
! 
! /* Last request fields */
! typedef struct _krb5_last_req_entry {
!     krb5_magic magic;
!     krb5_int32 lr_type;
!     krb5_timestamp value;
! } krb5_last_req_entry;
! 
! /* pre-authentication data */
! typedef struct _krb5_pa_data {
!     krb5_magic magic;
!     krb5_preauthtype  pa_type;
!     unsigned int length;
!     krb5_octet *contents;
! } krb5_pa_data;
! 
! typedef struct _krb5_kdc_req {
!     krb5_magic magic;
!     krb5_msgtype msg_type;		/* AS_REQ or TGS_REQ? */
!     krb5_pa_data **padata;	/* e.g. encoded AP_REQ */
!     /* real body */
!     krb5_flags kdc_options;		/* requested options */
!     krb5_principal client;		/* includes realm; optional */
!     krb5_principal server;		/* includes realm (only used if no
! 					   client) */
!     krb5_timestamp from;		/* requested starttime */
!     krb5_timestamp till;		/* requested endtime */
!     krb5_timestamp rtime;		/* (optional) requested renew_till */
!     krb5_int32 nonce;			/* nonce to match request/response */
!     int nktypes;			/* # of ktypes, must be positive */
!     krb5_enctype *ktype;		/* requested enctype(s) */
!     krb5_address **addresses;	/* requested addresses, optional */
!     krb5_enc_data authorization_data;	/* encrypted auth data; OPTIONAL */
!     krb5_authdata **unenc_authdata; /* unencrypted auth data,
! 					   if available */
!     krb5_ticket **second_ticket;/* second ticket array; OPTIONAL */
! } krb5_kdc_req;
! 
! typedef struct _krb5_enc_kdc_rep_part {
!     krb5_magic magic;
!     /* encrypted part: */
!     krb5_msgtype msg_type;		/* krb5 message type */
!     krb5_keyblock *session;		/* session key */
!     krb5_last_req_entry **last_req; /* array of ptrs to entries */
!     krb5_int32 nonce;			/* nonce from request */
!     krb5_timestamp key_exp;		/* expiration date */
!     krb5_flags flags;			/* ticket flags */
!     krb5_ticket_times times;		/* lifetime info */
!     krb5_principal server;		/* server's principal identifier */
!     krb5_address **caddrs;	/* array of ptrs to addresses,
! 					   optional */
! } krb5_enc_kdc_rep_part;
! 
! typedef struct _krb5_kdc_rep {
!     krb5_magic magic;
!     /* cleartext part: */
!     krb5_msgtype msg_type;		/* AS_REP or KDC_REP? */
!     krb5_pa_data **padata;	/* preauthentication data from KDC */
!     krb5_principal client;		/* client's principal identifier */
!     krb5_ticket *ticket;		/* ticket */
!     krb5_enc_data enc_part;		/* encryption type, kvno, encrypted
! 					   encoding */
!     krb5_enc_kdc_rep_part *enc_part2;/* unencrypted version, if available */
! } krb5_kdc_rep;
! 
! /* error message structure */
! typedef struct _krb5_error {
!     krb5_magic magic;
!     /* some of these may be meaningless in certain contexts */
!     krb5_timestamp ctime;		/* client sec portion; optional */
!     krb5_int32 cusec;			/* client usec portion; optional */
!     krb5_int32 susec;			/* server usec portion */
!     krb5_timestamp stime;		/* server sec portion */
!     krb5_ui_4 error;			/* error code (protocol error #'s) */
!     krb5_principal client;		/* client's principal identifier;
! 					   optional */
!     krb5_principal server;		/* server's principal identifier */
!     krb5_data text;			/* descriptive text */
!     krb5_data e_data;			/* additional error-describing data */
! } krb5_error;
! 
! typedef struct _krb5_ap_req {
!     krb5_magic magic;
!     krb5_flags ap_options;		/* requested options */
!     krb5_ticket *ticket;		/* ticket */
!     krb5_enc_data authenticator;	/* authenticator (already encrypted) */
! } krb5_ap_req;
! 
! typedef struct _krb5_ap_rep {
!     krb5_magic magic;
!     krb5_enc_data enc_part;
! } krb5_ap_rep;
! 
! typedef struct _krb5_ap_rep_enc_part {
!     krb5_magic magic;
!     krb5_timestamp ctime;		/* client time, seconds portion */
!     krb5_int32 cusec;			/* client time, microseconds portion */
!     krb5_keyblock *subkey;		/* true session key, optional */
!     krb5_ui_4 seq_number;		/* sequence #, optional */
! } krb5_ap_rep_enc_part;
! 
! typedef struct _krb5_response {
!     krb5_magic magic;
!     krb5_octet message_type;
!     krb5_data response;
!     krb5_int32 expected_nonce;	/* The expected nonce for KDC_REP messages */
!     krb5_timestamp request_time;   /* When we made the request */
! } krb5_response;
! 
! typedef struct _krb5_cred_info {
!     krb5_magic magic;
!     krb5_keyblock *session;		/* session key used to encrypt */
! 					/* ticket */
!     krb5_principal client;		/* client name/realm, optional */
!     krb5_principal server;		/* server name/realm, optional */
!     krb5_flags flags;			/* ticket flags, optional */
!     krb5_ticket_times times;		/* auth, start, end, renew_till, */
! 					/* optional */
!     krb5_address **caddrs;	/* array of ptrs to addresses */
! } krb5_cred_info;
! 
! typedef struct _krb5_cred_enc_part {
!     krb5_magic magic;
!     krb5_int32 nonce;			/* nonce, optional */
!     krb5_timestamp timestamp;		/* client time */
!     krb5_int32 usec;			/* microsecond portion of time */
!     krb5_address *s_address;	/* sender address, optional */
!     krb5_address *r_address;	/* recipient address, optional */
!     krb5_cred_info **ticket_info;
! } krb5_cred_enc_part;	 
! 
! typedef struct _krb5_cred {
!     krb5_magic magic;
!     krb5_ticket **tickets;	/* tickets */
!     krb5_enc_data enc_part;		/* encrypted part */
!     krb5_cred_enc_part *enc_part2;	/* unencrypted version, if available*/
! } krb5_cred;
! 
! /* Sandia password generation structures */
! typedef struct _passwd_phrase_element {
!     krb5_magic magic;
!     krb5_data *passwd;
!     krb5_data *phrase;
! } passwd_phrase_element;
! 
! typedef struct _krb5_pwd_data {
!     krb5_magic magic;
!     int sequence_count;
!     passwd_phrase_element **element;
! } krb5_pwd_data;
! 
! /* these need to be here so the typedefs are available for the prototypes */
! 
! /*
!  * begin "safepriv.h"
!  */
! 
! #define KRB5_AUTH_CONTEXT_DO_TIME	0x00000001
! #define KRB5_AUTH_CONTEXT_RET_TIME	0x00000002
! #define KRB5_AUTH_CONTEXT_DO_SEQUENCE	0x00000004
! #define KRB5_AUTH_CONTEXT_RET_SEQUENCE	0x00000008
! #define KRB5_AUTH_CONTEXT_PERMIT_ALL	0x00000010
! #define KRB5_AUTH_CONTEXT_USE_SUBKEY	0x00000020
!  
! typedef struct krb5_replay_data { 
!     krb5_timestamp	timestamp; 
!     krb5_int32		usec;
!     krb5_ui_4		seq; 
! } krb5_replay_data;
! 
! /* flags for krb5_auth_con_genaddrs() */
! #define KRB5_AUTH_CONTEXT_GENERATE_LOCAL_ADDR		0x00000001
! #define KRB5_AUTH_CONTEXT_GENERATE_REMOTE_ADDR		0x00000002
! #define KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR	0x00000004
! #define KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR	0x00000008
! 
! /* type of function used as a callback to generate checksum data for
!  * mk_req */
! 
! typedef krb5_error_code 
! (KRB5_CALLCONV * krb5_mk_req_checksum_func) (krb5_context, krb5_auth_context , void *,
! 			       krb5_data **);
! 
! /*
!  * end "safepriv.h"
!  */
! 
! 
! /*
!  * begin "ccache.h"
!  */
! 
! typedef	krb5_pointer	krb5_cc_cursor;	/* cursor for sequential lookup */
! 
! struct _krb5_ccache;
! typedef struct _krb5_ccache *krb5_ccache;
! struct _krb5_cc_ops;
! typedef struct _krb5_cc_ops krb5_cc_ops;
! 
! /* for retrieve_cred */
! #define	KRB5_TC_MATCH_TIMES		0x00000001
! #define	KRB5_TC_MATCH_IS_SKEY		0x00000002
! #define	KRB5_TC_MATCH_FLAGS		0x00000004
! #define	KRB5_TC_MATCH_TIMES_EXACT	0x00000008
! #define	KRB5_TC_MATCH_FLAGS_EXACT	0x00000010
! #define	KRB5_TC_MATCH_AUTHDATA		0x00000020
! #define	KRB5_TC_MATCH_SRV_NAMEONLY	0x00000040
! #define	KRB5_TC_MATCH_2ND_TKT		0x00000080
! #define	KRB5_TC_MATCH_KTYPE		0x00000100
! #define KRB5_TC_SUPPORTED_KTYPES	0x00000200
! 
! /* for set_flags and other functions */
! #define KRB5_TC_OPENCLOSE		0x00000001
! 
! const char * KRB5_CALLCONV
! krb5_cc_get_name (krb5_context context, krb5_ccache cache);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_cc_gen_new (krb5_context context, krb5_ccache *cache);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_cc_initialize(krb5_context context, krb5_ccache cache,
! 		   krb5_principal principal);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_cc_destroy (krb5_context context, krb5_ccache cache);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_cc_close (krb5_context context, krb5_ccache cache);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_cc_store_cred (krb5_context context, krb5_ccache cache,
! 		    krb5_creds *creds);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_cc_retrieve_cred (krb5_context context, krb5_ccache cache,
! 		       krb5_flags flags, krb5_creds *mcreds,
! 		       krb5_creds *creds);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_cc_get_principal (krb5_context context, krb5_ccache cache,
! 		       krb5_principal *principal);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_cc_start_seq_get (krb5_context context, krb5_ccache cache,
! 		       krb5_cc_cursor *cursor);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_cc_next_cred (krb5_context context, krb5_ccache cache,
! 		   krb5_cc_cursor *cursor, krb5_creds *creds);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_cc_end_seq_get (krb5_context context, krb5_ccache cache,
! 		     krb5_cc_cursor *cursor);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_cc_remove_cred (krb5_context context, krb5_ccache cache, krb5_flags flags,
! 		     krb5_creds *creds);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_cc_set_flags (krb5_context context, krb5_ccache cache, krb5_flags flags);
! 
! const char * KRB5_CALLCONV
! krb5_cc_get_type (krb5_context context, krb5_ccache cache);
! 
! /*
!  * end "ccache.h"
!  */
! 
! /*
!  * begin "rcache.h"
!  */
! 
! struct krb5_rc_st;
! typedef struct krb5_rc_st *krb5_rcache;
! 
! #if KRB5_PRIVATE
! typedef struct _krb5_donot_replay {
!     krb5_magic magic;
!     char *server;			/* null-terminated */
!     char *client;			/* null-terminated */
!     krb5_int32 cusec;
!     krb5_timestamp ctime;
! } krb5_donot_replay;
! 
! krb5_error_code krb5_rc_default 
! 	(krb5_context,
! 		krb5_rcache *);
! krb5_error_code krb5_rc_resolve_type 
! 	(krb5_context,
! 		krb5_rcache *,char *);
! krb5_error_code krb5_rc_resolve_full 
! 	(krb5_context,
! 		krb5_rcache *,char *);
! char * krb5_rc_get_type 
! 	(krb5_context,
! 		krb5_rcache);
! char * krb5_rc_default_type 
! 	(krb5_context);
! char * krb5_rc_default_name 
! 	(krb5_context);
! krb5_error_code krb5_auth_to_rep 
! 	(krb5_context,
! 		krb5_tkt_authent *,
! 		krb5_donot_replay *);
! 
! 
! krb5_error_code KRB5_CALLCONV krb5_rc_initialize
! 	(krb5_context, krb5_rcache,krb5_deltat);
! krb5_error_code KRB5_CALLCONV krb5_rc_recover
! 	(krb5_context, krb5_rcache);
! krb5_error_code KRB5_CALLCONV krb5_rc_destroy
! 	(krb5_context, krb5_rcache);
! krb5_error_code KRB5_CALLCONV krb5_rc_close
! 	(krb5_context, krb5_rcache);
! krb5_error_code KRB5_CALLCONV krb5_rc_store
! 	(krb5_context, krb5_rcache,krb5_donot_replay *);
! krb5_error_code KRB5_CALLCONV krb5_rc_expunge
! 	(krb5_context, krb5_rcache);
! krb5_error_code KRB5_CALLCONV krb5_rc_get_lifespan
! 	(krb5_context, krb5_rcache,krb5_deltat *);
! char *KRB5_CALLCONV krb5_rc_get_name
! 	(krb5_context, krb5_rcache);
! krb5_error_code KRB5_CALLCONV krb5_rc_resolve
! 	(krb5_context, krb5_rcache, char *);
! #endif /* KRB5_PRIVATE */
! /*
!  * end "rcache.h"
!  */
! 
! /*
!  * begin "keytab.h"
!  */
! 
! 
! /* XXX */
! #define MAX_KEYTAB_NAME_LEN 1100 /* Long enough for MAXPATHLEN + some extra */
! 
! typedef krb5_pointer krb5_kt_cursor;	/* XXX */
! 
! typedef struct krb5_keytab_entry_st {
!     krb5_magic magic;
!     krb5_principal principal;	/* principal of this key */
!     krb5_timestamp timestamp;	/* time entry written to keytable */
!     krb5_kvno vno;		/* key version number */
!     krb5_keyblock key;		/* the secret key */
! } krb5_keytab_entry;
! 
! #if KRB5_PRIVATE
! struct _krb5_kt_ops;
! typedef struct _krb5_kt {	/* should move into k5-int.h */
!     krb5_magic magic;
!     const struct _krb5_kt_ops *ops;
!     krb5_pointer data;
! } *krb5_keytab;
! #else
! struct _krb5_kt;
! typedef struct _krb5_kt *krb5_keytab;
! #endif
! 
! char * KRB5_CALLCONV
! krb5_kt_get_type (krb5_context, krb5_keytab keytab);
! krb5_error_code KRB5_CALLCONV
! krb5_kt_get_name(krb5_context context, krb5_keytab keytab, char *name,
! 		 unsigned int namelen);
! krb5_error_code KRB5_CALLCONV
! krb5_kt_close(krb5_context context, krb5_keytab keytab);
! krb5_error_code KRB5_CALLCONV
! krb5_kt_get_entry(krb5_context context, krb5_keytab keytab,
! 		  krb5_const_principal principal, krb5_kvno vno,
! 		  krb5_enctype enctype, krb5_keytab_entry *entry);
! krb5_error_code KRB5_CALLCONV
! krb5_kt_start_seq_get(krb5_context context, krb5_keytab keytab,
! 		      krb5_kt_cursor *cursor);
! krb5_error_code KRB5_CALLCONV
! krb5_kt_next_entry(krb5_context context, krb5_keytab keytab,
! 		   krb5_keytab_entry *entry, krb5_kt_cursor *cursor);
! krb5_error_code KRB5_CALLCONV
! krb5_kt_end_seq_get(krb5_context context, krb5_keytab keytab,
! 		    krb5_kt_cursor *cursor);
! 
! /*
!  * end "keytab.h"
!  */
! 
! /*
!  * begin "func-proto.h"
!  */
! 
! krb5_error_code KRB5_CALLCONV krb5_init_context
! 	(krb5_context *);
! krb5_error_code KRB5_CALLCONV krb5_init_secure_context
! 	(krb5_context *);
! void KRB5_CALLCONV krb5_free_context
! 	(krb5_context);
! 
! #if KRB5_PRIVATE
! krb5_error_code krb5_set_default_in_tkt_ktypes
! 	(krb5_context,
! 		const krb5_enctype *);
! krb5_error_code krb5_get_default_in_tkt_ktypes
! 	(krb5_context,
! 		krb5_enctype **);
! 
! krb5_error_code krb5_set_default_tgs_ktypes
! 	(krb5_context,
! 		const krb5_enctype *);
! #endif
! 
! krb5_error_code KRB5_CALLCONV 
! krb5_set_default_tgs_enctypes
! 	(krb5_context,
! 		const krb5_enctype *);
! #if KRB5_PRIVATE
! krb5_error_code KRB5_CALLCONV krb5_get_tgs_ktypes
! 	(krb5_context,
! 		krb5_const_principal,
! 		krb5_enctype **);
! #endif
! 
! krb5_error_code KRB5_CALLCONV krb5_get_permitted_enctypes
! 	(krb5_context, krb5_enctype **);
! 
! #if KRB5_PRIVATE
! void KRB5_CALLCONV krb5_free_ktypes
! 	(krb5_context, krb5_enctype *);
! 
! krb5_boolean krb5_is_permitted_enctype
! 	(krb5_context, krb5_enctype);
! #endif
! 
! /* libkrb.spec */
! #if KRB5_PRIVATE
! krb5_error_code krb5_kdc_rep_decrypt_proc
! 	(krb5_context,
! 		const krb5_keyblock *,
! 		krb5_const_pointer,
! 		krb5_kdc_rep * );
! krb5_error_code KRB5_CALLCONV krb5_decrypt_tkt_part
! 	(krb5_context,
! 		const krb5_keyblock *,
! 		krb5_ticket * );
! krb5_error_code krb5_get_cred_from_kdc
! 	(krb5_context,
! 		krb5_ccache,		/* not const, as reading may save
! 					   state */
! 		krb5_creds *,
! 		krb5_creds **,
! 		krb5_creds *** );
! krb5_error_code krb5_get_cred_from_kdc_validate
! 	(krb5_context,
! 		krb5_ccache,		/* not const, as reading may save
! 					   state */
! 		krb5_creds *,
! 		krb5_creds **,
! 		krb5_creds *** );
! krb5_error_code krb5_get_cred_from_kdc_renew
! 	(krb5_context,
! 		krb5_ccache,		/* not const, as reading may save
! 					   state */
! 		krb5_creds *,
! 		krb5_creds **,
! 		krb5_creds *** );
! #endif
! 
! void KRB5_CALLCONV krb5_free_tgt_creds
! 	(krb5_context,
! 	 krb5_creds **); /* XXX too hard to do with const */
! 
! #define	KRB5_GC_USER_USER	1	/* want user-user ticket */
! #define	KRB5_GC_CACHED		2	/* want cached ticket only */
! 
! krb5_error_code KRB5_CALLCONV krb5_get_credentials
! 	(krb5_context,
! 		krb5_flags,
! 		krb5_ccache,
! 		krb5_creds *,
! 		krb5_creds **);
! krb5_error_code KRB5_CALLCONV krb5_get_credentials_validate
! 	(krb5_context,
! 		krb5_flags,
! 		krb5_ccache,
! 		krb5_creds *,
! 		krb5_creds **);
! krb5_error_code KRB5_CALLCONV krb5_get_credentials_renew
! 	(krb5_context,
! 		krb5_flags,
! 		krb5_ccache,
! 		krb5_creds *,
! 		krb5_creds **);
! #if KRB5_PRIVATE
! krb5_error_code krb5_get_cred_via_tkt
! 	(krb5_context,
! 		   krb5_creds *,
! 		   krb5_flags,
! 		   krb5_address * const *,
! 		   krb5_creds *,
! 		   krb5_creds **);
! #endif
! krb5_error_code KRB5_CALLCONV krb5_mk_req
! 	(krb5_context,
! 		krb5_auth_context *,
! 		krb5_flags,
! 		char *,
! 		char *,
! 		krb5_data *,
! 		krb5_ccache,
! 		krb5_data * );
! krb5_error_code KRB5_CALLCONV krb5_mk_req_extended
! 	(krb5_context,
! 		krb5_auth_context *,
! 		krb5_flags,
! 		krb5_data *,
! 		krb5_creds *,
! 		krb5_data * );
! krb5_error_code KRB5_CALLCONV krb5_mk_rep
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_data *);
! krb5_error_code KRB5_CALLCONV krb5_rd_rep
! 	(krb5_context,
! 		krb5_auth_context,
! 		const krb5_data *,
! 		krb5_ap_rep_enc_part **);
! krb5_error_code KRB5_CALLCONV krb5_mk_error
! 	(krb5_context,
! 		const krb5_error *,
! 		krb5_data * );
! krb5_error_code KRB5_CALLCONV krb5_rd_error
! 	(krb5_context,
! 		const krb5_data *,
! 		krb5_error ** );
! krb5_error_code KRB5_CALLCONV krb5_rd_safe
! 	(krb5_context,
! 		krb5_auth_context,
! 		const krb5_data *,
! 		krb5_data *,
! 		krb5_replay_data *);
! krb5_error_code KRB5_CALLCONV krb5_rd_priv
! 	(krb5_context,
! 		krb5_auth_context,
! 		const krb5_data *,
! 		krb5_data *,
! 		krb5_replay_data *);
! krb5_error_code KRB5_CALLCONV krb5_parse_name
! 	(krb5_context,
! 		const char *,
! 		krb5_principal * );
! krb5_error_code KRB5_CALLCONV krb5_unparse_name
! 	(krb5_context,
! 		krb5_const_principal,
! 		char ** );
! krb5_error_code KRB5_CALLCONV krb5_unparse_name_ext
! 	(krb5_context,
! 		krb5_const_principal,
! 		char **,
! 		unsigned int *);
! 
! krb5_error_code KRB5_CALLCONV krb5_set_principal_realm
! 	(krb5_context, krb5_principal, const char *);
! 
! krb5_boolean KRB5_CALLCONV_WRONG krb5_address_search
! 	(krb5_context,
! 		const krb5_address *,
! 		krb5_address * const *);
! krb5_boolean KRB5_CALLCONV krb5_address_compare
! 	(krb5_context,
! 		const krb5_address *,
! 		const krb5_address *);
! int KRB5_CALLCONV krb5_address_order
! 	(krb5_context,
! 		const krb5_address *,
! 		const krb5_address *);
! krb5_boolean KRB5_CALLCONV krb5_realm_compare
! 	(krb5_context,
! 		krb5_const_principal,
! 		krb5_const_principal);
! krb5_boolean KRB5_CALLCONV krb5_principal_compare
! 	(krb5_context,
! 		krb5_const_principal,
! 		krb5_const_principal);
! krb5_error_code KRB5_CALLCONV  krb5_init_keyblock
! 		(krb5_context, krb5_enctype enctype,
! 		size_t length, krb5_keyblock **out); 
!   		/* Initialize a new keyblock and allocate storage
! 		 * for the contents of the key, which will be freed along
! 		 * with the keyblock when krb5_free_keyblock is called.
! 		 * It is legal to pass in a length of 0, in which
! 		 * case contents are left unallocated.
! 		 */
! krb5_error_code KRB5_CALLCONV krb5_copy_keyblock
! 	(krb5_context,
! 		const krb5_keyblock *,
! 		krb5_keyblock **);
! krb5_error_code KRB5_CALLCONV krb5_copy_keyblock_contents
! 	(krb5_context,
! 		const krb5_keyblock *,
! 		krb5_keyblock *);
! krb5_error_code KRB5_CALLCONV krb5_copy_creds
! 	(krb5_context,
! 		const krb5_creds *,
! 		krb5_creds **);
! krb5_error_code KRB5_CALLCONV krb5_copy_data
! 	(krb5_context,
! 		const krb5_data *,
! 		krb5_data **);
! krb5_error_code KRB5_CALLCONV krb5_copy_principal
! 	(krb5_context,
! 		krb5_const_principal,
! 		krb5_principal *);
! #if KRB5_PRIVATE
! krb5_error_code KRB5_CALLCONV krb5_copy_addr
! 	(krb5_context,
! 		const krb5_address *,
! 		krb5_address **);
! #endif
! krb5_error_code KRB5_CALLCONV krb5_copy_addresses
! 	(krb5_context,
! 		krb5_address * const *,
! 		krb5_address ***);
! krb5_error_code KRB5_CALLCONV krb5_copy_ticket
! 	(krb5_context,
! 		const krb5_ticket *,
! 		krb5_ticket **);
! krb5_error_code KRB5_CALLCONV krb5_copy_authdata
! 	(krb5_context,
! 		krb5_authdata * const *,
! 		krb5_authdata ***);
! krb5_error_code KRB5_CALLCONV krb5_copy_authenticator
! 	(krb5_context,
! 		const krb5_authenticator *,
! 		krb5_authenticator **);
! krb5_error_code KRB5_CALLCONV krb5_copy_checksum
! 	(krb5_context,
! 		const krb5_checksum *,
! 		krb5_checksum **);
! #if KRB5_PRIVATE
! void krb5_init_ets
! 	(krb5_context);
! void krb5_free_ets
! 	(krb5_context);
! krb5_error_code krb5_generate_subkey
! 	(krb5_context,
! 		const krb5_keyblock *, krb5_keyblock **);
! krb5_error_code krb5_generate_seq_number
! 	(krb5_context,
! 		const krb5_keyblock *, krb5_ui_4 *);
! #endif
! krb5_error_code KRB5_CALLCONV krb5_get_server_rcache
! 	(krb5_context,
! 		const krb5_data *, krb5_rcache *);
! krb5_error_code KRB5_CALLCONV_C krb5_build_principal_ext
! 	(krb5_context, krb5_principal *, unsigned int, const char *, ...);
! krb5_error_code KRB5_CALLCONV_C krb5_build_principal
! 	(krb5_context, krb5_principal *, unsigned int, const char *, ...);
! #ifdef va_start
! /* XXX depending on varargs include file defining va_start... */
! krb5_error_code KRB5_CALLCONV krb5_build_principal_va
! 	(krb5_context,
! 		krb5_principal, unsigned int, const char *, va_list);
! #endif
! 
! krb5_error_code KRB5_CALLCONV krb5_425_conv_principal
! 	(krb5_context,
! 		const char *name,
! 		const char *instance, const char *realm,
! 		krb5_principal *princ);
! 
! krb5_error_code KRB5_CALLCONV krb5_524_conv_principal
! 	(krb5_context context, krb5_const_principal princ, 
! 		char *name, char *inst, char *realm);
! 
! struct credentials;
! int KRB5_CALLCONV krb5_524_convert_creds
! 	(krb5_context context, krb5_creds *v5creds,
! 	 struct credentials *v4creds);
! #if KRB5_DEPRECATED
! #define krb524_convert_creds_kdc krb5_524_convert_creds
! #define krb524_init_ets(x) (0)
! #endif
! 
! /* libkt.spec */
! #if KRB5_PRIVATE
! krb5_error_code KRB5_CALLCONV krb5_kt_register
! 	(krb5_context,
! 		struct _krb5_kt_ops * );
! #endif
! 
! krb5_error_code KRB5_CALLCONV krb5_kt_resolve
! 	(krb5_context,
! 		const char *,
! 		krb5_keytab * );
! krb5_error_code KRB5_CALLCONV krb5_kt_default_name
! 	(krb5_context,
! 		char *,
! 		int );
! krb5_error_code KRB5_CALLCONV krb5_kt_default
! 	(krb5_context,
! 		krb5_keytab * );
! krb5_error_code KRB5_CALLCONV krb5_free_keytab_entry_contents
! 	(krb5_context,
! 		krb5_keytab_entry * );
! #if KRB5_PRIVATE
! /* use krb5_free_keytab_entry_contents instead */
! krb5_error_code KRB5_CALLCONV krb5_kt_free_entry
! 	(krb5_context,
! 		krb5_keytab_entry * );
! #endif
! /* remove and add are functions, so that they can return NOWRITE
!    if not a writable keytab */
! krb5_error_code KRB5_CALLCONV krb5_kt_remove_entry
! 	(krb5_context,
! 		krb5_keytab,
! 		krb5_keytab_entry * );
! krb5_error_code KRB5_CALLCONV krb5_kt_add_entry
! 	(krb5_context,
! 		krb5_keytab,
! 		krb5_keytab_entry * );
! krb5_error_code krb5_principal2salt
! 	(krb5_context,
! 		krb5_const_principal, krb5_data *);
! #if KRB5_PRIVATE
! krb5_error_code krb5_principal2salt_norealm
! 	(krb5_context,
! 		krb5_const_principal, krb5_data *);
! #endif
! /* librc.spec--see rcache.h */
! 
! /* libcc.spec */
! krb5_error_code KRB5_CALLCONV krb5_cc_resolve
! 	(krb5_context,
! 		const char *,
! 		krb5_ccache * );
! const char * KRB5_CALLCONV krb5_cc_default_name
! 	(krb5_context);
! krb5_error_code KRB5_CALLCONV krb5_cc_set_default_name
! 	(krb5_context, const char *);
! krb5_error_code KRB5_CALLCONV krb5_cc_default
! 	(krb5_context,
! 		krb5_ccache *);
! #if KRB5_PRIVATE
! unsigned int KRB5_CALLCONV krb5_get_notification_message
! 	(void);
! #endif
! 
! krb5_error_code KRB5_CALLCONV krb5_cc_copy_creds
! 	(krb5_context context,
! 			krb5_ccache incc,
! 			krb5_ccache outcc);
! 
! 
! /* chk_trans.c */
! #if KRB5_PRIVATE
! krb5_error_code krb5_check_transited_list
! 	(krb5_context, const krb5_data *trans,
! 	 const krb5_data *realm1, const krb5_data *realm2);
! #endif
! 
! /* free_rtree.c */
! #if KRB5_PRIVATE
! void krb5_free_realm_tree
! 	(krb5_context,
! 		krb5_principal *);
! #endif
! 
! /* krb5_free.c */
! void KRB5_CALLCONV krb5_free_principal
! 	(krb5_context, krb5_principal );
! void KRB5_CALLCONV krb5_free_authenticator
! 	(krb5_context, krb5_authenticator * );
! #if KRB5_PRIVATE
! void KRB5_CALLCONV krb5_free_authenticator_contents
! 	(krb5_context, krb5_authenticator * );
! #endif
! void KRB5_CALLCONV krb5_free_addresses
! 	(krb5_context, krb5_address ** );
! #if KRB5_PRIVATE
! void KRB5_CALLCONV krb5_free_address
! 	(krb5_context, krb5_address * );
! #endif
! void KRB5_CALLCONV krb5_free_authdata
! 	(krb5_context, krb5_authdata ** );
! #if KRB5_PRIVATE
! void KRB5_CALLCONV krb5_free_enc_tkt_part
! 	(krb5_context, krb5_enc_tkt_part * );
! #endif
! void KRB5_CALLCONV krb5_free_ticket
! 	(krb5_context, krb5_ticket * );
! #if KRB5_PRIVATE
! void KRB5_CALLCONV krb5_free_tickets
! 	(krb5_context, krb5_ticket ** );
! void KRB5_CALLCONV krb5_free_kdc_req
! 	(krb5_context, krb5_kdc_req * );
! void KRB5_CALLCONV krb5_free_kdc_rep
! 	(krb5_context, krb5_kdc_rep * );
! void KRB5_CALLCONV krb5_free_last_req
! 	(krb5_context, krb5_last_req_entry ** );
! void KRB5_CALLCONV krb5_free_enc_kdc_rep_part
! 	(krb5_context, krb5_enc_kdc_rep_part * );
! #endif
! void KRB5_CALLCONV krb5_free_error
! 	(krb5_context, krb5_error * );
! #if KRB5_PRIVATE
! void KRB5_CALLCONV krb5_free_ap_req
! 	(krb5_context, krb5_ap_req * );
! void KRB5_CALLCONV krb5_free_ap_rep
! 	(krb5_context, krb5_ap_rep * );
! void KRB5_CALLCONV krb5_free_cred
! 	(krb5_context, krb5_cred *);
! #endif
! void KRB5_CALLCONV krb5_free_creds
! 	(krb5_context, krb5_creds *);
! void KRB5_CALLCONV krb5_free_cred_contents
! 	(krb5_context, krb5_creds *);
! #if KRB5_PRIVATE
! void KRB5_CALLCONV krb5_free_cred_enc_part
! 	(krb5_context, krb5_cred_enc_part *);
! #endif
! void KRB5_CALLCONV krb5_free_checksum
! 	(krb5_context, krb5_checksum *);
! void KRB5_CALLCONV krb5_free_checksum_contents
! 	(krb5_context, krb5_checksum *);
! void KRB5_CALLCONV krb5_free_keyblock
! 	(krb5_context, krb5_keyblock *);
! void KRB5_CALLCONV krb5_free_keyblock_contents
! 	(krb5_context, krb5_keyblock *);
! #if KRB5_PRIVATE
! void KRB5_CALLCONV krb5_free_pa_data
! 	(krb5_context, krb5_pa_data **);
! #endif
! void KRB5_CALLCONV krb5_free_ap_rep_enc_part
! 	(krb5_context, krb5_ap_rep_enc_part *);
! #if KRB5_PRIVATE
! void KRB5_CALLCONV krb5_free_tkt_authent
! 	(krb5_context, krb5_tkt_authent *);
! void KRB5_CALLCONV krb5_free_pwd_data
! 	(krb5_context, krb5_pwd_data *);
! void KRB5_CALLCONV krb5_free_pwd_sequences
! 	(krb5_context, passwd_phrase_element **);
! #endif
! void KRB5_CALLCONV krb5_free_data
! 	(krb5_context, krb5_data *);
! void KRB5_CALLCONV krb5_free_data_contents
! 	(krb5_context, krb5_data *);
! void KRB5_CALLCONV krb5_free_unparsed_name
! 	(krb5_context, char *);
! void KRB5_CALLCONV krb5_free_cksumtypes
! 	(krb5_context, krb5_cksumtype *);
! 
! /* From krb5/os but needed but by the outside world */
! krb5_error_code KRB5_CALLCONV krb5_us_timeofday
! 	(krb5_context,
! 		krb5_int32 *,
! 		krb5_int32 * );
! krb5_error_code KRB5_CALLCONV krb5_timeofday
! 	(krb5_context,
! 		krb5_int32 * );
! 		 /* get all the addresses of this host */
! krb5_error_code KRB5_CALLCONV krb5_os_localaddr
! 	(krb5_context,
! 		krb5_address ***);
! krb5_error_code KRB5_CALLCONV krb5_get_default_realm
! 	(krb5_context,
! 		 char ** );
! krb5_error_code KRB5_CALLCONV krb5_set_default_realm
! 	(krb5_context,
! 		   const char * );
! void KRB5_CALLCONV krb5_free_default_realm
! 	(krb5_context,
! 		   char * );
! krb5_error_code KRB5_CALLCONV krb5_sname_to_principal
! 	(krb5_context,
! 		const char *,
! 		   const char *,
! 		   krb5_int32,
! 		   krb5_principal *);
! krb5_error_code KRB5_CALLCONV
! krb5_change_password
! 	(krb5_context context, krb5_creds *creds, char *newpw,
! 			int *result_code, krb5_data *result_code_string,
! 			krb5_data *result_string);
! krb5_error_code KRB5_CALLCONV
! krb5_set_password
! 	(krb5_context context, krb5_creds *creds, char *newpw, krb5_principal change_password_for,
! 			int *result_code, krb5_data *result_code_string, krb5_data *result_string);
! krb5_error_code KRB5_CALLCONV
! krb5_set_password_using_ccache
! 	(krb5_context context, krb5_ccache ccache, char *newpw, krb5_principal change_password_for,
! 			int *result_code, krb5_data *result_code_string, krb5_data *result_string);
! 
! #if KRB5_PRIVATE
! #ifndef macintosh
! krb5_error_code krb5_set_config_files
! 	(krb5_context, const char **);
! 
! krb5_error_code KRB5_CALLCONV krb5_get_default_config_files
! 	(char ***filenames);
! 
! void KRB5_CALLCONV krb5_free_config_files
! 	(char **filenames);
! 
! #endif
! #endif
! 
! krb5_error_code KRB5_CALLCONV
! krb5_get_profile
! 	(krb5_context, struct _profile_t * /* profile_t */ *);
! 
! #if KRB5_PRIVATE
! krb5_error_code krb5_send_tgs
! 	(krb5_context,
! 		krb5_flags,
! 		const krb5_ticket_times *,
! 		const krb5_enctype *,
! 		krb5_const_principal,
! 		krb5_address * const *,
! 		krb5_authdata * const *,
! 		krb5_pa_data * const *,
! 		const krb5_data *,
! 		krb5_creds *,
! 		krb5_response * );
! #endif
! 
! #if KRB5_DEPRECATED
! krb5_error_code KRB5_CALLCONV krb5_get_in_tkt
! 	(krb5_context,
! 		krb5_flags,
! 		krb5_address * const *,
! 		krb5_enctype *,
! 		krb5_preauthtype *,
! 		krb5_error_code ( * )(krb5_context,
! 					krb5_enctype,
! 					krb5_data *,
! 					krb5_const_pointer,
! 					krb5_keyblock **),
! 		krb5_const_pointer,
! 		krb5_error_code ( * )(krb5_context,
! 					const krb5_keyblock *,
! 					krb5_const_pointer,
! 					krb5_kdc_rep * ),
! 		krb5_const_pointer,
! 		krb5_creds *,
! 		krb5_ccache,
! 		krb5_kdc_rep ** );
! 
! krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_password
! 	(krb5_context,
! 		krb5_flags,
! 		krb5_address * const *,
! 		krb5_enctype *,
! 		krb5_preauthtype *,
! 		const char *,
! 		krb5_ccache,
! 		krb5_creds *,
! 		krb5_kdc_rep ** );
! 
! krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_skey
! 	(krb5_context,
! 		krb5_flags,
! 		krb5_address * const *,
! 		krb5_enctype *,
! 		krb5_preauthtype *,
! 		const krb5_keyblock *,
! 		krb5_ccache,
! 		krb5_creds *,
! 		krb5_kdc_rep ** );
! 
! krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_keytab
! 	(krb5_context,
! 		krb5_flags,
! 		krb5_address * const *,
! 		krb5_enctype *,
! 		krb5_preauthtype *,
! 		krb5_keytab,
! 		krb5_ccache,
! 		krb5_creds *,
! 		krb5_kdc_rep ** );
! #endif /* KRB5_DEPRECATED */
! 
! #if KRB5_PRIVATE
! krb5_error_code krb5_decode_kdc_rep
! 	(krb5_context,
! 		krb5_data *,
! 		const krb5_keyblock *,
! 		krb5_kdc_rep ** );
! #endif
! 
! krb5_error_code KRB5_CALLCONV krb5_rd_req
! 	(krb5_context,
! 		krb5_auth_context *,
! 		const krb5_data *,
! 		krb5_const_principal,
! 		krb5_keytab,
! 		krb5_flags *,
! 		krb5_ticket **);
! 
! #if KRB5_PRIVATE
! krb5_error_code krb5_rd_req_decoded
! 	(krb5_context,
! 		krb5_auth_context *,
! 		const krb5_ap_req *,
! 		krb5_const_principal,
! 		krb5_keytab,
! 		krb5_flags *,
! 		krb5_ticket **);
! 
! krb5_error_code krb5_rd_req_decoded_anyflag
! 	(krb5_context,
! 		krb5_auth_context *,
! 		const krb5_ap_req *,
! 		krb5_const_principal,
! 		krb5_keytab,
! 		krb5_flags *,
! 		krb5_ticket **);
! #endif
! 
! krb5_error_code KRB5_CALLCONV krb5_kt_read_service_key
! 	(krb5_context,
! 		krb5_pointer,
! 		krb5_principal,
! 		krb5_kvno,
! 		krb5_enctype,
! 		krb5_keyblock **);
! krb5_error_code KRB5_CALLCONV krb5_mk_safe
! 	(krb5_context,
! 		krb5_auth_context,
! 		const krb5_data *,
! 		krb5_data *,
! 		krb5_replay_data *);
! krb5_error_code KRB5_CALLCONV krb5_mk_priv
! 	(krb5_context,
! 		krb5_auth_context,
! 		const krb5_data *,
! 		krb5_data *,
! 		krb5_replay_data *);
! #if KRB5_PRIVATE
! krb5_error_code KRB5_CALLCONV krb5_cc_register
! 	(krb5_context,
! 		krb5_cc_ops *,
! 		krb5_boolean );
! #endif
! 
! krb5_error_code KRB5_CALLCONV krb5_sendauth 
! 	(krb5_context,
! 		krb5_auth_context *,
! 		krb5_pointer,
! 		char *,
! 		krb5_principal,
! 		krb5_principal,
! 		krb5_flags,
! 		krb5_data *,
! 		krb5_creds *,
! 		krb5_ccache,
! 		krb5_error **,
! 		krb5_ap_rep_enc_part **,
! 		krb5_creds **);
! 	
! krb5_error_code KRB5_CALLCONV krb5_recvauth
! 	(krb5_context,
! 		krb5_auth_context *,
! 		krb5_pointer,
! 		char *,
! 		krb5_principal,
! 		krb5_int32, 
! 		krb5_keytab,
! 		krb5_ticket **);
! krb5_error_code KRB5_CALLCONV krb5_recvauth_version
! 	(krb5_context,
! 		krb5_auth_context *,
! 		krb5_pointer,
! 		krb5_principal,
! 		krb5_int32, 
! 		krb5_keytab,
! 		krb5_ticket **,
! 		krb5_data *);
! 
! #if KRB5_PRIVATE
! krb5_error_code krb5_walk_realm_tree
! 	(krb5_context,
! 		const krb5_data *,
! 		const krb5_data *,
! 		krb5_principal **,
! 		int);
! #endif
! 
! krb5_error_code KRB5_CALLCONV krb5_mk_ncred
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_creds **,
! 		krb5_data **,
! 		krb5_replay_data *);
! 
! krb5_error_code KRB5_CALLCONV krb5_mk_1cred
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_creds *,
! 		krb5_data **,
! 		krb5_replay_data *);
! 
! krb5_error_code KRB5_CALLCONV krb5_rd_cred
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_data *,
! 		krb5_creds ***,
! 		krb5_replay_data *);
! 
! krb5_error_code KRB5_CALLCONV krb5_fwd_tgt_creds
! 	(krb5_context, 
! 		krb5_auth_context,
! 		char *,
! 		krb5_principal, 
! 		krb5_principal, 
! 		krb5_ccache,
! 		int forwardable,
! 		krb5_data *);	
! 
! krb5_error_code KRB5_CALLCONV krb5_auth_con_init
! 	(krb5_context,
! 		krb5_auth_context *);
! 
! krb5_error_code KRB5_CALLCONV krb5_auth_con_free
! 	(krb5_context,
! 		krb5_auth_context);
! 
! krb5_error_code KRB5_CALLCONV krb5_auth_con_setflags
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_int32);
! 
! krb5_error_code KRB5_CALLCONV krb5_auth_con_getflags
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_int32 *);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_auth_con_set_checksum_func (krb5_context, krb5_auth_context,
! 				 krb5_mk_req_checksum_func, void *);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_auth_con_get_checksum_func( krb5_context, krb5_auth_context,
! 				 krb5_mk_req_checksum_func *, void **);
! 
! krb5_error_code KRB5_CALLCONV_WRONG krb5_auth_con_setaddrs
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_address *,
! 		krb5_address *);
! 
! krb5_error_code KRB5_CALLCONV krb5_auth_con_getaddrs
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_address **,
! 		krb5_address **);
! 
! krb5_error_code KRB5_CALLCONV krb5_auth_con_setports
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_address *,
! 		krb5_address *);
! 
! krb5_error_code KRB5_CALLCONV krb5_auth_con_setuseruserkey
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_keyblock *);
! 
! krb5_error_code KRB5_CALLCONV krb5_auth_con_getkey
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_keyblock **);
! 
! krb5_error_code KRB5_CALLCONV krb5_auth_con_getsendsubkey(
!     krb5_context, krb5_auth_context, krb5_keyblock **);
! 
! krb5_error_code KRB5_CALLCONV krb5_auth_con_getrecvsubkey(
!     krb5_context, krb5_auth_context, krb5_keyblock **);
! 
! krb5_error_code KRB5_CALLCONV krb5_auth_con_setsendsubkey(
!     krb5_context, krb5_auth_context, krb5_keyblock *);
! 
! krb5_error_code KRB5_CALLCONV krb5_auth_con_setrecvsubkey(
!     krb5_context, krb5_auth_context, krb5_keyblock *);
! 
! #if KRB5_DEPRECATED
! krb5_error_code KRB5_CALLCONV krb5_auth_con_getlocalsubkey
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_keyblock **);
! 
! krb5_error_code KRB5_CALLCONV krb5_auth_con_getremotesubkey
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_keyblock **);
! #endif
! 
! #if KRB5_PRIVATE
! krb5_error_code KRB5_CALLCONV krb5_auth_con_set_req_cksumtype
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_cksumtype);
! 
! krb5_error_code krb5_auth_con_set_safe_cksumtype
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_cksumtype);
! #endif
! 
! krb5_error_code KRB5_CALLCONV krb5_auth_con_getlocalseqnumber
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_int32 *);
! 
! krb5_error_code KRB5_CALLCONV krb5_auth_con_getremoteseqnumber
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_int32 *);
! 
! #if KRB5_DEPRECATED
! krb5_error_code KRB5_CALLCONV krb5_auth_con_initivector
! 	(krb5_context,
! 		krb5_auth_context);
! #endif
! 
! #if KRB5_PRIVATE
! krb5_error_code krb5_auth_con_setivector
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_pointer);
! 
! krb5_error_code krb5_auth_con_getivector
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_pointer *);
! #endif
! 
! krb5_error_code KRB5_CALLCONV krb5_auth_con_setrcache
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_rcache);
! 
! krb5_error_code KRB5_CALLCONV_WRONG krb5_auth_con_getrcache
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_rcache *);
! 
! #if KRB5_PRIVATE
! krb5_error_code krb5_auth_con_setpermetypes
! 	(krb5_context,
! 	    krb5_auth_context,
! 	    const krb5_enctype *);
! 
! krb5_error_code krb5_auth_con_getpermetypes
! 	(krb5_context,
! 	    krb5_auth_context,
! 	    krb5_enctype **);
! #endif
! 
! krb5_error_code KRB5_CALLCONV krb5_auth_con_getauthenticator
! 	(krb5_context,
! 		krb5_auth_context,
! 		krb5_authenticator **);
! 
! #define KRB5_REALM_BRANCH_CHAR '.'
! 
! /*
!  * end "func-proto.h"
!  */
! 
! /*
!  * begin stuff from libos.h
!  */
! 
! #if KRB5_PRIVATE
! krb5_error_code krb5_read_message (krb5_context, krb5_pointer, krb5_data *);
! krb5_error_code krb5_write_message (krb5_context, krb5_pointer, krb5_data *);
! int krb5_net_read (krb5_context, int , char *, int);
! int krb5_net_write (krb5_context, int , const char *, int);
! #endif
! 
! krb5_error_code KRB5_CALLCONV krb5_read_password
! 	(krb5_context,
! 		const char *,
! 		const char *,
! 		char *,
! 		unsigned int * );
! krb5_error_code KRB5_CALLCONV krb5_aname_to_localname
! 	(krb5_context,
! 		krb5_const_principal,
! 		int,
! 		char * );
! krb5_error_code KRB5_CALLCONV krb5_get_host_realm
! 	(krb5_context,
! 		const char *,
! 		char *** );
! krb5_error_code KRB5_CALLCONV krb5_free_host_realm
! 	(krb5_context,
! 		char * const * );
! #if KRB5_PRIVATE
! krb5_error_code KRB5_CALLCONV krb5_get_realm_domain
! 	(krb5_context,
! 		const char *,
! 		char ** );
! #endif
! krb5_boolean KRB5_CALLCONV krb5_kuserok
! 	(krb5_context,
! 		krb5_principal, const char *);
! krb5_error_code KRB5_CALLCONV krb5_auth_con_genaddrs
! 	(krb5_context,
! 		krb5_auth_context,
! 		int, int);
! #if KRB5_PRIVATE
! krb5_error_code krb5_gen_portaddr
! 	(krb5_context,
! 		const krb5_address *,
! 		krb5_const_pointer,
! 		krb5_address **);
! krb5_error_code krb5_gen_replay_name
! 	(krb5_context,
! 		const krb5_address *,
! 		const char *,
! 		char **);
! krb5_error_code krb5_make_fulladdr
! 	(krb5_context,
! 		krb5_address *,
! 		krb5_address *,
! 		krb5_address *);
! #endif
! 
! krb5_error_code KRB5_CALLCONV krb5_set_real_time
! 	(krb5_context, krb5_int32, krb5_int32);
! 
! #if KRB5_PRIVATE
! krb5_error_code krb5_set_debugging_time
! 	(krb5_context, krb5_int32, krb5_int32);
! krb5_error_code krb5_use_natural_time
! 	(krb5_context);
! #endif
! krb5_error_code KRB5_CALLCONV krb5_get_time_offsets
! 	(krb5_context, krb5_int32 *, krb5_int32 *);
! #if KRB5_PRIVATE
! krb5_error_code krb5_set_time_offsets
! 	(krb5_context, krb5_int32, krb5_int32);
! #endif
! 
! /* str_conv.c */
! krb5_error_code KRB5_CALLCONV krb5_string_to_enctype
! 	(char *, krb5_enctype *);
! krb5_error_code KRB5_CALLCONV krb5_string_to_salttype
! 	(char *, krb5_int32 *);
! krb5_error_code KRB5_CALLCONV krb5_string_to_cksumtype
! 	(char *, krb5_cksumtype *);
! krb5_error_code KRB5_CALLCONV krb5_string_to_timestamp
! 	(char *, krb5_timestamp *);
! krb5_error_code KRB5_CALLCONV krb5_string_to_deltat
! 	(char *, krb5_deltat *);
! krb5_error_code KRB5_CALLCONV krb5_enctype_to_string
! 	(krb5_enctype, char *, size_t);
! krb5_error_code KRB5_CALLCONV krb5_salttype_to_string
! 	(krb5_int32, char *, size_t);
! krb5_error_code KRB5_CALLCONV krb5_cksumtype_to_string
! 	(krb5_cksumtype, char *, size_t);
! krb5_error_code KRB5_CALLCONV krb5_timestamp_to_string
! 	(krb5_timestamp, char *, size_t);
! krb5_error_code KRB5_CALLCONV krb5_timestamp_to_sfstring
! 	(krb5_timestamp, char *, size_t, char *);
! krb5_error_code KRB5_CALLCONV krb5_deltat_to_string
! 	(krb5_deltat, char *, size_t);
! 
! 
! 
! /* The name of the Kerberos ticket granting service... and its size */
! #define	KRB5_TGS_NAME		"krbtgt"
! #define KRB5_TGS_NAME_SIZE	6
! 
! /* flags for recvauth */
! #define KRB5_RECVAUTH_SKIP_VERSION	0x0001
! #define KRB5_RECVAUTH_BADAUTHVERS	0x0002
! /* initial ticket api functions */
! 
! typedef struct _krb5_prompt {
!     char *prompt;
!     int hidden;
!     krb5_data *reply;
! } krb5_prompt;
! 
! typedef krb5_error_code (KRB5_CALLCONV *krb5_prompter_fct)(krb5_context context,
! 					     void *data,
! 					     const char *name,
! 					     const char *banner,
! 					     int num_prompts,
! 					     krb5_prompt prompts[]);
! 
! 
! krb5_error_code KRB5_CALLCONV
! krb5_prompter_posix (krb5_context context,
! 		void *data,
! 		const char *name,
! 		const char *banner,
! 		int num_prompts,
! 		krb5_prompt prompts[]);
! 
! typedef struct _krb5_get_init_creds_opt {
!     krb5_flags flags;
!     krb5_deltat tkt_life;
!     krb5_deltat renew_life;
!     int forwardable;
!     int proxiable;
!     krb5_enctype *etype_list;
!     int etype_list_length;
!     krb5_address **address_list;
!     krb5_preauthtype *preauth_list;
!     int preauth_list_length;
!     krb5_data *salt;
! } krb5_get_init_creds_opt;
! 
! #define KRB5_GET_INIT_CREDS_OPT_TKT_LIFE	0x0001
! #define KRB5_GET_INIT_CREDS_OPT_RENEW_LIFE	0x0002
! #define KRB5_GET_INIT_CREDS_OPT_FORWARDABLE	0x0004
! #define KRB5_GET_INIT_CREDS_OPT_PROXIABLE	0x0008
! #define KRB5_GET_INIT_CREDS_OPT_ETYPE_LIST	0x0010
! #define KRB5_GET_INIT_CREDS_OPT_ADDRESS_LIST	0x0020
! #define KRB5_GET_INIT_CREDS_OPT_PREAUTH_LIST	0x0040
! #define KRB5_GET_INIT_CREDS_OPT_SALT		0x0080
! 
! 
! void KRB5_CALLCONV
! krb5_get_init_creds_opt_init
! (krb5_get_init_creds_opt *opt);
! 
! void KRB5_CALLCONV
! krb5_get_init_creds_opt_set_tkt_life
! (krb5_get_init_creds_opt *opt,
! 		krb5_deltat tkt_life);
! 
! void KRB5_CALLCONV
! krb5_get_init_creds_opt_set_renew_life
! (krb5_get_init_creds_opt *opt,
! 		krb5_deltat renew_life);
! 
! void KRB5_CALLCONV
! krb5_get_init_creds_opt_set_forwardable
! (krb5_get_init_creds_opt *opt,
! 		int forwardable);
! 
! void KRB5_CALLCONV
! krb5_get_init_creds_opt_set_proxiable
! (krb5_get_init_creds_opt *opt,
! 		int proxiable);
! 
! void KRB5_CALLCONV
! krb5_get_init_creds_opt_set_etype_list
! (krb5_get_init_creds_opt *opt,
! 		krb5_enctype *etype_list,
! 		int etype_list_length);
! 
! void KRB5_CALLCONV
! krb5_get_init_creds_opt_set_address_list
! (krb5_get_init_creds_opt *opt,
! 		krb5_address **addresses);
! 
! void KRB5_CALLCONV
! krb5_get_init_creds_opt_set_preauth_list
! (krb5_get_init_creds_opt *opt,
! 		krb5_preauthtype *preauth_list,
! 		int preauth_list_length);
! 
! void KRB5_CALLCONV
! krb5_get_init_creds_opt_set_salt
! (krb5_get_init_creds_opt *opt,
! 		krb5_data *salt);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_get_init_creds_password
! (krb5_context context,
! 		krb5_creds *creds,
! 		krb5_principal client,
! 		char *password,
! 		krb5_prompter_fct prompter,
! 		void *data,
! 		krb5_deltat start_time,
! 		char *in_tkt_service,
! 		krb5_get_init_creds_opt *k5_gic_options);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_get_init_creds_keytab
! (krb5_context context,
! 		krb5_creds *creds,
! 		krb5_principal client,
! 		krb5_keytab arg_keytab,
! 		krb5_deltat start_time,
! 		char *in_tkt_service,
! 		krb5_get_init_creds_opt *k5_gic_options);
! 
! typedef struct _krb5_verify_init_creds_opt {
!     krb5_flags flags;
!     int ap_req_nofail;
! } krb5_verify_init_creds_opt;
! 
! #define KRB5_VERIFY_INIT_CREDS_OPT_AP_REQ_NOFAIL	0x0001
! 
! void KRB5_CALLCONV
! krb5_verify_init_creds_opt_init
! (krb5_verify_init_creds_opt *k5_vic_options);
! void KRB5_CALLCONV
! krb5_verify_init_creds_opt_set_ap_req_nofail
! (krb5_verify_init_creds_opt *k5_vic_options,
! 		int ap_req_nofail);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_verify_init_creds
! (krb5_context context,
! 		krb5_creds *creds,
! 		krb5_principal ap_req_server,
! 		krb5_keytab ap_req_keytab,
! 		krb5_ccache *ccache,
! 		krb5_verify_init_creds_opt *k5_vic_options);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_get_validated_creds
! (krb5_context context,
! 		krb5_creds *creds,
! 		krb5_principal client,
! 		krb5_ccache ccache,
! 		char *in_tkt_service);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_get_renewed_creds
! (krb5_context context,
! 		krb5_creds *creds,
! 		krb5_principal client,
! 		krb5_ccache ccache,
! 		char *in_tkt_service);
! 
! krb5_error_code KRB5_CALLCONV
! krb5_decode_ticket
! (const krb5_data *code, 
! 		krb5_ticket **rep);
! 
! void KRB5_CALLCONV
! krb5_appdefault_string
! (krb5_context context,
! 		const char *appname,  
! 	        const krb5_data *realm,
!  		const char *option,
! 		const char *default_value,
! 		char ** ret_value);
! 
! void KRB5_CALLCONV
! krb5_appdefault_boolean
! (krb5_context context,
! 		const char *appname,  
! 	        const krb5_data *realm,
!  		const char *option,
! 		int default_value,
! 		int *ret_value);
! 
! #if KRB5_PRIVATE
! /*
!  * The realm iterator functions
!  */
! 
! krb5_error_code KRB5_CALLCONV krb5_realm_iterator_create
! 	(krb5_context context, void **iter_p);
! 
! krb5_error_code KRB5_CALLCONV krb5_realm_iterator
! 	(krb5_context context, void **iter_p, char **ret_realm);
! 
! void KRB5_CALLCONV krb5_realm_iterator_free
! 	(krb5_context context, void **iter_p);
! 
! void KRB5_CALLCONV krb5_free_realm_string
! 	(krb5_context context, char *str);
! #endif
! 
! /*
!  * Prompter enhancements
!  */
! 
! #define KRB5_PROMPT_TYPE_PASSWORD            0x1
! #define KRB5_PROMPT_TYPE_NEW_PASSWORD        0x2
! #define KRB5_PROMPT_TYPE_NEW_PASSWORD_AGAIN  0x3
! #define KRB5_PROMPT_TYPE_PREAUTH             0x4
! 
! typedef krb5_int32 krb5_prompt_type;
! 
! krb5_prompt_type* KRB5_CALLCONV krb5_get_prompt_types
! 	(krb5_context context);
! 
! #if TARGET_OS_MAC
! #    if defined(__MWERKS__)
! #        pragma import reset
! #    endif
! #    pragma options align=reset
! #endif
! 
! KRB5INT_END_DECLS
! 
! /* Don't use this!  We're going to phase it out.  It's just here to keep
!    applications from breaking right away.  */
! #define krb5_const const
! 
! #endif /* KRB5_GENERAL__ */
! 
! /*
!  * include/krb5_err.h:
!  * This file is automatically generated; please do not edit it.
!  */
! 
! #include <com_err.h>
! 
! #define KRB5KDC_ERR_NONE                         (-1765328384L)
! #define KRB5KDC_ERR_NAME_EXP                     (-1765328383L)
! #define KRB5KDC_ERR_SERVICE_EXP                  (-1765328382L)
! #define KRB5KDC_ERR_BAD_PVNO                     (-1765328381L)
! #define KRB5KDC_ERR_C_OLD_MAST_KVNO              (-1765328380L)
! #define KRB5KDC_ERR_S_OLD_MAST_KVNO              (-1765328379L)
! #define KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN          (-1765328378L)
! #define KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN          (-1765328377L)
! #define KRB5KDC_ERR_PRINCIPAL_NOT_UNIQUE         (-1765328376L)
! #define KRB5KDC_ERR_NULL_KEY                     (-1765328375L)
! #define KRB5KDC_ERR_CANNOT_POSTDATE              (-1765328374L)
! #define KRB5KDC_ERR_NEVER_VALID                  (-1765328373L)
! #define KRB5KDC_ERR_POLICY                       (-1765328372L)
! #define KRB5KDC_ERR_BADOPTION                    (-1765328371L)
! #define KRB5KDC_ERR_ETYPE_NOSUPP                 (-1765328370L)
! #define KRB5KDC_ERR_SUMTYPE_NOSUPP               (-1765328369L)
! #define KRB5KDC_ERR_PADATA_TYPE_NOSUPP           (-1765328368L)
! #define KRB5KDC_ERR_TRTYPE_NOSUPP                (-1765328367L)
! #define KRB5KDC_ERR_CLIENT_REVOKED               (-1765328366L)
! #define KRB5KDC_ERR_SERVICE_REVOKED              (-1765328365L)
! #define KRB5KDC_ERR_TGT_REVOKED                  (-1765328364L)
! #define KRB5KDC_ERR_CLIENT_NOTYET                (-1765328363L)
! #define KRB5KDC_ERR_SERVICE_NOTYET               (-1765328362L)
! #define KRB5KDC_ERR_KEY_EXP                      (-1765328361L)
! #define KRB5KDC_ERR_PREAUTH_FAILED               (-1765328360L)
! #define KRB5KDC_ERR_PREAUTH_REQUIRED             (-1765328359L)
! #define KRB5KDC_ERR_SERVER_NOMATCH               (-1765328358L)
! #define KRB5PLACEHOLD_27                         (-1765328357L)
! #define KRB5PLACEHOLD_28                         (-1765328356L)
! #define KRB5PLACEHOLD_29                         (-1765328355L)
! #define KRB5PLACEHOLD_30                         (-1765328354L)
! #define KRB5KRB_AP_ERR_BAD_INTEGRITY             (-1765328353L)
! #define KRB5KRB_AP_ERR_TKT_EXPIRED               (-1765328352L)
! #define KRB5KRB_AP_ERR_TKT_NYV                   (-1765328351L)
! #define KRB5KRB_AP_ERR_REPEAT                    (-1765328350L)
! #define KRB5KRB_AP_ERR_NOT_US                    (-1765328349L)
! #define KRB5KRB_AP_ERR_BADMATCH                  (-1765328348L)
! #define KRB5KRB_AP_ERR_SKEW                      (-1765328347L)
! #define KRB5KRB_AP_ERR_BADADDR                   (-1765328346L)
! #define KRB5KRB_AP_ERR_BADVERSION                (-1765328345L)
! #define KRB5KRB_AP_ERR_MSG_TYPE                  (-1765328344L)
! #define KRB5KRB_AP_ERR_MODIFIED                  (-1765328343L)
! #define KRB5KRB_AP_ERR_BADORDER                  (-1765328342L)
! #define KRB5KRB_AP_ERR_ILL_CR_TKT                (-1765328341L)
! #define KRB5KRB_AP_ERR_BADKEYVER                 (-1765328340L)
! #define KRB5KRB_AP_ERR_NOKEY                     (-1765328339L)
! #define KRB5KRB_AP_ERR_MUT_FAIL                  (-1765328338L)
! #define KRB5KRB_AP_ERR_BADDIRECTION              (-1765328337L)
! #define KRB5KRB_AP_ERR_METHOD                    (-1765328336L)
! #define KRB5KRB_AP_ERR_BADSEQ                    (-1765328335L)
! #define KRB5KRB_AP_ERR_INAPP_CKSUM               (-1765328334L)
! #define KRB5KRB_AP_PATH_NOT_ACCEPTED             (-1765328333L)
! #define KRB5KRB_ERR_RESPONSE_TOO_BIG             (-1765328332L)
! #define KRB5PLACEHOLD_53                         (-1765328331L)
! #define KRB5PLACEHOLD_54                         (-1765328330L)
! #define KRB5PLACEHOLD_55                         (-1765328329L)
! #define KRB5PLACEHOLD_56                         (-1765328328L)
! #define KRB5PLACEHOLD_57                         (-1765328327L)
! #define KRB5PLACEHOLD_58                         (-1765328326L)
! #define KRB5PLACEHOLD_59                         (-1765328325L)
! #define KRB5KRB_ERR_GENERIC                      (-1765328324L)
! #define KRB5KRB_ERR_FIELD_TOOLONG                (-1765328323L)
! #define KRB5PLACEHOLD_62                         (-1765328322L)
! #define KRB5PLACEHOLD_63                         (-1765328321L)
! #define KRB5PLACEHOLD_64                         (-1765328320L)
! #define KRB5PLACEHOLD_65                         (-1765328319L)
! #define KRB5PLACEHOLD_66                         (-1765328318L)
! #define KRB5PLACEHOLD_67                         (-1765328317L)
! #define KRB5PLACEHOLD_68                         (-1765328316L)
! #define KRB5PLACEHOLD_69                         (-1765328315L)
! #define KRB5PLACEHOLD_70                         (-1765328314L)
! #define KRB5PLACEHOLD_71                         (-1765328313L)
! #define KRB5PLACEHOLD_72                         (-1765328312L)
! #define KRB5PLACEHOLD_73                         (-1765328311L)
! #define KRB5PLACEHOLD_74                         (-1765328310L)
! #define KRB5PLACEHOLD_75                         (-1765328309L)
! #define KRB5PLACEHOLD_76                         (-1765328308L)
! #define KRB5PLACEHOLD_77                         (-1765328307L)
! #define KRB5PLACEHOLD_78                         (-1765328306L)
! #define KRB5PLACEHOLD_79                         (-1765328305L)
! #define KRB5PLACEHOLD_80                         (-1765328304L)
! #define KRB5PLACEHOLD_81                         (-1765328303L)
! #define KRB5PLACEHOLD_82                         (-1765328302L)
! #define KRB5PLACEHOLD_83                         (-1765328301L)
! #define KRB5PLACEHOLD_84                         (-1765328300L)
! #define KRB5PLACEHOLD_85                         (-1765328299L)
! #define KRB5PLACEHOLD_86                         (-1765328298L)
! #define KRB5PLACEHOLD_87                         (-1765328297L)
! #define KRB5PLACEHOLD_88                         (-1765328296L)
! #define KRB5PLACEHOLD_89                         (-1765328295L)
! #define KRB5PLACEHOLD_90                         (-1765328294L)
! #define KRB5PLACEHOLD_91                         (-1765328293L)
! #define KRB5PLACEHOLD_92                         (-1765328292L)
! #define KRB5PLACEHOLD_93                         (-1765328291L)
! #define KRB5PLACEHOLD_94                         (-1765328290L)
! #define KRB5PLACEHOLD_95                         (-1765328289L)
! #define KRB5PLACEHOLD_96                         (-1765328288L)
! #define KRB5PLACEHOLD_97                         (-1765328287L)
! #define KRB5PLACEHOLD_98                         (-1765328286L)
! #define KRB5PLACEHOLD_99                         (-1765328285L)
! #define KRB5PLACEHOLD_100                        (-1765328284L)
! #define KRB5PLACEHOLD_101                        (-1765328283L)
! #define KRB5PLACEHOLD_102                        (-1765328282L)
! #define KRB5PLACEHOLD_103                        (-1765328281L)
! #define KRB5PLACEHOLD_104                        (-1765328280L)
! #define KRB5PLACEHOLD_105                        (-1765328279L)
! #define KRB5PLACEHOLD_106                        (-1765328278L)
! #define KRB5PLACEHOLD_107                        (-1765328277L)
! #define KRB5PLACEHOLD_108                        (-1765328276L)
! #define KRB5PLACEHOLD_109                        (-1765328275L)
! #define KRB5PLACEHOLD_110                        (-1765328274L)
! #define KRB5PLACEHOLD_111                        (-1765328273L)
! #define KRB5PLACEHOLD_112                        (-1765328272L)
! #define KRB5PLACEHOLD_113                        (-1765328271L)
! #define KRB5PLACEHOLD_114                        (-1765328270L)
! #define KRB5PLACEHOLD_115                        (-1765328269L)
! #define KRB5PLACEHOLD_116                        (-1765328268L)
! #define KRB5PLACEHOLD_117                        (-1765328267L)
! #define KRB5PLACEHOLD_118                        (-1765328266L)
! #define KRB5PLACEHOLD_119                        (-1765328265L)
! #define KRB5PLACEHOLD_120                        (-1765328264L)
! #define KRB5PLACEHOLD_121                        (-1765328263L)
! #define KRB5PLACEHOLD_122                        (-1765328262L)
! #define KRB5PLACEHOLD_123                        (-1765328261L)
! #define KRB5PLACEHOLD_124                        (-1765328260L)
! #define KRB5PLACEHOLD_125                        (-1765328259L)
! #define KRB5PLACEHOLD_126                        (-1765328258L)
! #define KRB5PLACEHOLD_127                        (-1765328257L)
! #define KRB5_ERR_RCSID                           (-1765328256L)
! #define KRB5_LIBOS_BADLOCKFLAG                   (-1765328255L)
! #define KRB5_LIBOS_CANTREADPWD                   (-1765328254L)
! #define KRB5_LIBOS_BADPWDMATCH                   (-1765328253L)
! #define KRB5_LIBOS_PWDINTR                       (-1765328252L)
! #define KRB5_PARSE_ILLCHAR                       (-1765328251L)
! #define KRB5_PARSE_MALFORMED                     (-1765328250L)
! #define KRB5_CONFIG_CANTOPEN                     (-1765328249L)
! #define KRB5_CONFIG_BADFORMAT                    (-1765328248L)
! #define KRB5_CONFIG_NOTENUFSPACE                 (-1765328247L)
! #define KRB5_BADMSGTYPE                          (-1765328246L)
! #define KRB5_CC_BADNAME                          (-1765328245L)
! #define KRB5_CC_UNKNOWN_TYPE                     (-1765328244L)
! #define KRB5_CC_NOTFOUND                         (-1765328243L)
! #define KRB5_CC_END                              (-1765328242L)
! #define KRB5_NO_TKT_SUPPLIED                     (-1765328241L)
! #define KRB5KRB_AP_WRONG_PRINC                   (-1765328240L)
! #define KRB5KRB_AP_ERR_TKT_INVALID               (-1765328239L)
! #define KRB5_PRINC_NOMATCH                       (-1765328238L)
! #define KRB5_KDCREP_MODIFIED                     (-1765328237L)
! #define KRB5_KDCREP_SKEW                         (-1765328236L)
! #define KRB5_IN_TKT_REALM_MISMATCH               (-1765328235L)
! #define KRB5_PROG_ETYPE_NOSUPP                   (-1765328234L)
! #define KRB5_PROG_KEYTYPE_NOSUPP                 (-1765328233L)
! #define KRB5_WRONG_ETYPE                         (-1765328232L)
! #define KRB5_PROG_SUMTYPE_NOSUPP                 (-1765328231L)
! #define KRB5_REALM_UNKNOWN                       (-1765328230L)
! #define KRB5_SERVICE_UNKNOWN                     (-1765328229L)
! #define KRB5_KDC_UNREACH                         (-1765328228L)
! #define KRB5_NO_LOCALNAME                        (-1765328227L)
! #define KRB5_MUTUAL_FAILED                       (-1765328226L)
! #define KRB5_RC_TYPE_EXISTS                      (-1765328225L)
! #define KRB5_RC_MALLOC                           (-1765328224L)
! #define KRB5_RC_TYPE_NOTFOUND                    (-1765328223L)
! #define KRB5_RC_UNKNOWN                          (-1765328222L)
! #define KRB5_RC_REPLAY                           (-1765328221L)
! #define KRB5_RC_IO                               (-1765328220L)
! #define KRB5_RC_NOIO                             (-1765328219L)
! #define KRB5_RC_PARSE                            (-1765328218L)
! #define KRB5_RC_IO_EOF                           (-1765328217L)
! #define KRB5_RC_IO_MALLOC                        (-1765328216L)
! #define KRB5_RC_IO_PERM                          (-1765328215L)
! #define KRB5_RC_IO_IO                            (-1765328214L)
! #define KRB5_RC_IO_UNKNOWN                       (-1765328213L)
! #define KRB5_RC_IO_SPACE                         (-1765328212L)
! #define KRB5_TRANS_CANTOPEN                      (-1765328211L)
! #define KRB5_TRANS_BADFORMAT                     (-1765328210L)
! #define KRB5_LNAME_CANTOPEN                      (-1765328209L)
! #define KRB5_LNAME_NOTRANS                       (-1765328208L)
! #define KRB5_LNAME_BADFORMAT                     (-1765328207L)
! #define KRB5_CRYPTO_INTERNAL                     (-1765328206L)
! #define KRB5_KT_BADNAME                          (-1765328205L)
! #define KRB5_KT_UNKNOWN_TYPE                     (-1765328204L)
! #define KRB5_KT_NOTFOUND                         (-1765328203L)
! #define KRB5_KT_END                              (-1765328202L)
! #define KRB5_KT_NOWRITE                          (-1765328201L)
! #define KRB5_KT_IOERR                            (-1765328200L)
! #define KRB5_NO_TKT_IN_RLM                       (-1765328199L)
! #define KRB5DES_BAD_KEYPAR                       (-1765328198L)
! #define KRB5DES_WEAK_KEY                         (-1765328197L)
! #define KRB5_BAD_ENCTYPE                         (-1765328196L)
! #define KRB5_BAD_KEYSIZE                         (-1765328195L)
! #define KRB5_BAD_MSIZE                           (-1765328194L)
! #define KRB5_CC_TYPE_EXISTS                      (-1765328193L)
! #define KRB5_KT_TYPE_EXISTS                      (-1765328192L)
! #define KRB5_CC_IO                               (-1765328191L)
! #define KRB5_FCC_PERM                            (-1765328190L)
! #define KRB5_FCC_NOFILE                          (-1765328189L)
! #define KRB5_FCC_INTERNAL                        (-1765328188L)
! #define KRB5_CC_WRITE                            (-1765328187L)
! #define KRB5_CC_NOMEM                            (-1765328186L)
! #define KRB5_CC_FORMAT                           (-1765328185L)
! #define KRB5_CC_NOT_KTYPE                        (-1765328184L)
! #define KRB5_INVALID_FLAGS                       (-1765328183L)
! #define KRB5_NO_2ND_TKT                          (-1765328182L)
! #define KRB5_NOCREDS_SUPPLIED                    (-1765328181L)
! #define KRB5_SENDAUTH_BADAUTHVERS                (-1765328180L)
! #define KRB5_SENDAUTH_BADAPPLVERS                (-1765328179L)
! #define KRB5_SENDAUTH_BADRESPONSE                (-1765328178L)
! #define KRB5_SENDAUTH_REJECTED                   (-1765328177L)
! #define KRB5_PREAUTH_BAD_TYPE                    (-1765328176L)
! #define KRB5_PREAUTH_NO_KEY                      (-1765328175L)
! #define KRB5_PREAUTH_FAILED                      (-1765328174L)
! #define KRB5_RCACHE_BADVNO                       (-1765328173L)
! #define KRB5_CCACHE_BADVNO                       (-1765328172L)
! #define KRB5_KEYTAB_BADVNO                       (-1765328171L)
! #define KRB5_PROG_ATYPE_NOSUPP                   (-1765328170L)
! #define KRB5_RC_REQUIRED                         (-1765328169L)
! #define KRB5_ERR_BAD_HOSTNAME                    (-1765328168L)
! #define KRB5_ERR_HOST_REALM_UNKNOWN              (-1765328167L)
! #define KRB5_SNAME_UNSUPP_NAMETYPE               (-1765328166L)
! #define KRB5KRB_AP_ERR_V4_REPLY                  (-1765328165L)
! #define KRB5_REALM_CANT_RESOLVE                  (-1765328164L)
! #define KRB5_TKT_NOT_FORWARDABLE                 (-1765328163L)
! #define KRB5_FWD_BAD_PRINCIPAL                   (-1765328162L)
! #define KRB5_GET_IN_TKT_LOOP                     (-1765328161L)
! #define KRB5_CONFIG_NODEFREALM                   (-1765328160L)
! #define KRB5_SAM_UNSUPPORTED                     (-1765328159L)
! #define KRB5_SAM_INVALID_ETYPE                   (-1765328158L)
! #define KRB5_SAM_NO_CHECKSUM                     (-1765328157L)
! #define KRB5_SAM_BAD_CHECKSUM                    (-1765328156L)
! #define KRB5_KT_NAME_TOOLONG                     (-1765328155L)
! #define KRB5_KT_KVNONOTFOUND                     (-1765328154L)
! #define KRB5_APPL_EXPIRED                        (-1765328153L)
! #define KRB5_LIB_EXPIRED                         (-1765328152L)
! #define KRB5_CHPW_PWDNULL                        (-1765328151L)
! #define KRB5_CHPW_FAIL                           (-1765328150L)
! #define KRB5_KT_FORMAT                           (-1765328149L)
! #define KRB5_NOPERM_ETYPE                        (-1765328148L)
! #define KRB5_CONFIG_ETYPE_NOSUPP                 (-1765328147L)
! #define KRB5_OBSOLETE_FN                         (-1765328146L)
! #define KRB5_EAI_FAIL                            (-1765328145L)
! #define KRB5_EAI_NODATA                          (-1765328144L)
! #define KRB5_EAI_NONAME                          (-1765328143L)
! #define KRB5_EAI_SERVICE                         (-1765328142L)
! #define KRB5_ERR_NUMERIC_REALM                   (-1765328141L)
! #define KRB5_ERR_BAD_S2K_PARAMS                  (-1765328140L)
! #define KRB5_ERR_NO_SERVICE                      (-1765328139L)
! #define KRB5_CC_READONLY                         (-1765328138L)
! #define KRB5_CC_NOSUPP                           (-1765328137L)
! #define ERROR_TABLE_BASE_krb5 (-1765328384L)
! 
! extern const struct error_table et_krb5_error_table;
! 
! #if !defined(_WIN32)
! /* for compatibility with older versions... */
! extern void initialize_krb5_error_table () /*@modifies internalState@*/;
! #else
! #define initialize_krb5_error_table()
! #endif
! 
! #if !defined(_WIN32)
! #define init_krb5_err_tbl initialize_krb5_error_table
! #define krb5_err_base ERROR_TABLE_BASE_krb5
! #endif
! /*
!  * include/kdb5_err.h:
!  * This file is automatically generated; please do not edit it.
!  */
! 
! #include <com_err.h>
! 
! #define KRB5_KDB_RCSID                           (-1780008448L)
! #define KRB5_KDB_INUSE                           (-1780008447L)
! #define KRB5_KDB_UK_SERROR                       (-1780008446L)
! #define KRB5_KDB_UK_RERROR                       (-1780008445L)
! #define KRB5_KDB_UNAUTH                          (-1780008444L)
! #define KRB5_KDB_NOENTRY                         (-1780008443L)
! #define KRB5_KDB_ILL_WILDCARD                    (-1780008442L)
! #define KRB5_KDB_DB_INUSE                        (-1780008441L)
! #define KRB5_KDB_DB_CHANGED                      (-1780008440L)
! #define KRB5_KDB_TRUNCATED_RECORD                (-1780008439L)
! #define KRB5_KDB_RECURSIVELOCK                   (-1780008438L)
! #define KRB5_KDB_NOTLOCKED                       (-1780008437L)
! #define KRB5_KDB_BADLOCKMODE                     (-1780008436L)
! #define KRB5_KDB_DBNOTINITED                     (-1780008435L)
! #define KRB5_KDB_DBINITED                        (-1780008434L)
! #define KRB5_KDB_ILLDIRECTION                    (-1780008433L)
! #define KRB5_KDB_NOMASTERKEY                     (-1780008432L)
! #define KRB5_KDB_BADMASTERKEY                    (-1780008431L)
! #define KRB5_KDB_INVALIDKEYSIZE                  (-1780008430L)
! #define KRB5_KDB_CANTREAD_STORED                 (-1780008429L)
! #define KRB5_KDB_BADSTORED_MKEY                  (-1780008428L)
! #define KRB5_KDB_CANTLOCK_DB                     (-1780008427L)
! #define KRB5_KDB_DB_CORRUPT                      (-1780008426L)
! #define KRB5_KDB_BAD_VERSION                     (-1780008425L)
! #define KRB5_KDB_BAD_SALTTYPE                    (-1780008424L)
! #define KRB5_KDB_BAD_ENCTYPE                     (-1780008423L)
! #define KRB5_KDB_BAD_CREATEFLAGS                 (-1780008422L)
! #define KRB5_KDB_NO_PERMITTED_KEY                (-1780008421L)
! #define KRB5_KDB_NO_MATCHING_KEY                 (-1780008420L)
! #define ERROR_TABLE_BASE_kdb5 (-1780008448L)
! 
! extern const struct error_table et_kdb5_error_table;
! 
! #if !defined(_WIN32)
! /* for compatibility with older versions... */
! extern void initialize_kdb5_error_table () /*@modifies internalState@*/;
! #else
! #define initialize_kdb5_error_table()
! #endif
! 
! #if !defined(_WIN32)
! #define init_kdb5_err_tbl initialize_kdb5_error_table
! #define kdb5_err_base ERROR_TABLE_BASE_kdb5
! #endif
! /*
!  * include/kv5m_err.h:
!  * This file is automatically generated; please do not edit it.
!  */
! 
! #include <com_err.h>
! 
! #define KV5M_NONE                                (-1760647424L)
! #define KV5M_PRINCIPAL                           (-1760647423L)
! #define KV5M_DATA                                (-1760647422L)
! #define KV5M_KEYBLOCK                            (-1760647421L)
! #define KV5M_CHECKSUM                            (-1760647420L)
! #define KV5M_ENCRYPT_BLOCK                       (-1760647419L)
! #define KV5M_ENC_DATA                            (-1760647418L)
! #define KV5M_CRYPTOSYSTEM_ENTRY                  (-1760647417L)
! #define KV5M_CS_TABLE_ENTRY                      (-1760647416L)
! #define KV5M_CHECKSUM_ENTRY                      (-1760647415L)
! #define KV5M_AUTHDATA                            (-1760647414L)
! #define KV5M_TRANSITED                           (-1760647413L)
! #define KV5M_ENC_TKT_PART                        (-1760647412L)
! #define KV5M_TICKET                              (-1760647411L)
! #define KV5M_AUTHENTICATOR                       (-1760647410L)
! #define KV5M_TKT_AUTHENT                         (-1760647409L)
! #define KV5M_CREDS                               (-1760647408L)
! #define KV5M_LAST_REQ_ENTRY                      (-1760647407L)
! #define KV5M_PA_DATA                             (-1760647406L)
! #define KV5M_KDC_REQ                             (-1760647405L)
! #define KV5M_ENC_KDC_REP_PART                    (-1760647404L)
! #define KV5M_KDC_REP                             (-1760647403L)
! #define KV5M_ERROR                               (-1760647402L)
! #define KV5M_AP_REQ                              (-1760647401L)
! #define KV5M_AP_REP                              (-1760647400L)
! #define KV5M_AP_REP_ENC_PART                     (-1760647399L)
! #define KV5M_RESPONSE                            (-1760647398L)
! #define KV5M_SAFE                                (-1760647397L)
! #define KV5M_PRIV                                (-1760647396L)
! #define KV5M_PRIV_ENC_PART                       (-1760647395L)
! #define KV5M_CRED                                (-1760647394L)
! #define KV5M_CRED_INFO                           (-1760647393L)
! #define KV5M_CRED_ENC_PART                       (-1760647392L)
! #define KV5M_PWD_DATA                            (-1760647391L)
! #define KV5M_ADDRESS                             (-1760647390L)
! #define KV5M_KEYTAB_ENTRY                        (-1760647389L)
! #define KV5M_CONTEXT                             (-1760647388L)
! #define KV5M_OS_CONTEXT                          (-1760647387L)
! #define KV5M_ALT_METHOD                          (-1760647386L)
! #define KV5M_ETYPE_INFO_ENTRY                    (-1760647385L)
! #define KV5M_DB_CONTEXT                          (-1760647384L)
! #define KV5M_AUTH_CONTEXT                        (-1760647383L)
! #define KV5M_KEYTAB                              (-1760647382L)
! #define KV5M_RCACHE                              (-1760647381L)
! #define KV5M_CCACHE                              (-1760647380L)
! #define KV5M_PREAUTH_OPS                         (-1760647379L)
! #define KV5M_SAM_CHALLENGE                       (-1760647378L)
! #define KV5M_SAM_CHALLENGE_2                     (-1760647377L)
! #define KV5M_SAM_KEY                             (-1760647376L)
! #define KV5M_ENC_SAM_RESPONSE_ENC                (-1760647375L)
! #define KV5M_ENC_SAM_RESPONSE_ENC_2              (-1760647374L)
! #define KV5M_SAM_RESPONSE                        (-1760647373L)
! #define KV5M_SAM_RESPONSE_2                      (-1760647372L)
! #define KV5M_PREDICTED_SAM_RESPONSE              (-1760647371L)
! #define KV5M_PASSWD_PHRASE_ELEMENT               (-1760647370L)
! #define KV5M_GSS_OID                             (-1760647369L)
! #define KV5M_GSS_QUEUE                           (-1760647368L)
! #define ERROR_TABLE_BASE_kv5m (-1760647424L)
! 
! extern const struct error_table et_kv5m_error_table;
! 
! #if !defined(_WIN32)
! /* for compatibility with older versions... */
! extern void initialize_kv5m_error_table () /*@modifies internalState@*/;
! #else
! #define initialize_kv5m_error_table()
! #endif
! 
! #if !defined(_WIN32)
! #define init_kv5m_err_tbl initialize_kv5m_error_table
! #define kv5m_err_base ERROR_TABLE_BASE_kv5m
! #endif
! /*
!  * include/krb524_err.h:
!  * This file is automatically generated; please do not edit it.
!  */
! 
! #include <com_err.h>
! 
! #define KRB524_BADKEY                            (-1750206208L)
! #define KRB524_BADADDR                           (-1750206207L)
! #define KRB524_BADPRINC                          (-1750206206L)
! #define KRB524_BADREALM                          (-1750206205L)
! #define KRB524_V4ERR                             (-1750206204L)
! #define KRB524_ENCFULL                           (-1750206203L)
! #define KRB524_DECEMPTY                          (-1750206202L)
! #define KRB524_NOTRESP                           (-1750206201L)
! #define KRB524_KRB4_DISABLED                     (-1750206200L)
! #define ERROR_TABLE_BASE_k524 (-1750206208L)
! 
! extern const struct error_table et_k524_error_table;
! 
! #if !defined(_WIN32)
! /* for compatibility with older versions... */
! extern void initialize_k524_error_table () /*@modifies internalState@*/;
! #else
! #define initialize_k524_error_table()
! #endif
! 
! #if !defined(_WIN32)
! #define init_k524_err_tbl initialize_k524_error_table
! #define k524_err_base ERROR_TABLE_BASE_k524
! #endif
! /*
!  * include/asn1_err.h:
!  * This file is automatically generated; please do not edit it.
!  */
! 
! #include <com_err.h>
! 
! #define ASN1_BAD_TIMEFORMAT                      (1859794432L)
! #define ASN1_MISSING_FIELD                       (1859794433L)
! #define ASN1_MISPLACED_FIELD                     (1859794434L)
! #define ASN1_TYPE_MISMATCH                       (1859794435L)
! #define ASN1_OVERFLOW                            (1859794436L)
! #define ASN1_OVERRUN                             (1859794437L)
! #define ASN1_BAD_ID                              (1859794438L)
! #define ASN1_BAD_LENGTH                          (1859794439L)
! #define ASN1_BAD_FORMAT                          (1859794440L)
! #define ASN1_PARSE_ERROR                         (1859794441L)
! #define ASN1_BAD_GMTIME                          (1859794442L)
! #define ASN1_MISMATCH_INDEF                      (1859794443L)
! #define ASN1_MISSING_EOC                         (1859794444L)
! #define ERROR_TABLE_BASE_asn1 (1859794432L)
! 
! extern const struct error_table et_asn1_error_table;
! 
! #if !defined(_WIN32)
! /* for compatibility with older versions... */
! extern void initialize_asn1_error_table () /*@modifies internalState@*/;
! #else
! #define initialize_asn1_error_table()
! #endif
! 
! #if !defined(_WIN32)
! #define init_asn1_err_tbl initialize_asn1_error_table
! #define asn1_err_base ERROR_TABLE_BASE_asn1
! #endif
--- 1,7 ----
! /* The MIT Kerberos header file krb5.h used to live here.
  
!    As of the 1.5 release, we're installing multiple Kerberos headers,
!    so they're all moving to a krb5/ subdirectory.  This file is
!    present just to keep old software still compiling.  Please update
!    your code to use the new path for the header.  */
! #include <krb5/krb5.h>
Index: openafs/src/WINNT/kfw/inc/krb5/profile.h
diff -c openafs/src/WINNT/kfw/inc/krb5/profile.h:1.1 openafs/src/WINNT/kfw/inc/krb5/profile.h:1.1.14.1
*** openafs/src/WINNT/kfw/inc/krb5/profile.h:1.1	Thu Feb 26 14:22:53 2004
--- openafs/src/WINNT/kfw/inc/krb5/profile.h	Thu Oct 12 17:42:20 2006
***************
*** 9,15 ****
  #include <win-mac.h>
  #endif
  
! #if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
  #    include <TargetConditionals.h>
  #    if TARGET_RT_MAC_CFM
  #        error "Use KfM 4.0 SDK headers for CFM compilation."
--- 9,15 ----
  #include <win-mac.h>
  #endif
  
! #if defined(__MACH__) && defined(__APPLE__)
  #    include <TargetConditionals.h>
  #    if TARGET_RT_MAC_CFM
  #        error "Use KfM 4.0 SDK headers for CFM compilation."
***************
*** 34,45 ****
  extern "C" {
  #endif /* __cplusplus */
  
- #if TARGET_OS_MAC
- #    if defined(__MWERKS__)
- #        pragma import on
- #    endif
- #endif
- 
  typedef char* profile_filespec_t;	/* path as C string */
  typedef char* profile_filespec_list_t;	/* list of : separated paths, C string */
  typedef const char * const_profile_filespec_t;	/* path as C string */
--- 34,39 ----
***************
*** 53,58 ****
--- 47,63 ----
  
  long KRB5_CALLCONV profile_flush
  	(profile_t profile);
+ long KRB5_CALLCONV profile_flush_to_file
+ 	(profile_t profile, const_profile_filespec_t outfile);
+ long KRB5_CALLCONV profile_flush_to_buffer
+ 	(profile_t profile, char **bufp);
+ void KRB5_CALLCONV profile_free_buffer
+ 	(profile_t profile, char *buf);
+ 
+ long KRB5_CALLCONV profile_is_writable
+ 	(profile_t profile, int *writable);
+ long KRB5_CALLCONV profile_is_modified
+ 	(profile_t profile, int *modified);
  
  void KRB5_CALLCONV profile_abandon
  	(profile_t profile);
***************
*** 87,93 ****
  	(profile_t profile, const char **names, char ***ret_names);
  
  long KRB5_CALLCONV profile_iterator_create
! 	(profile_t profile, const char **names,
  		   int flags, void **ret_iter);
  
  void KRB5_CALLCONV profile_iterator_free
--- 92,98 ----
  	(profile_t profile, const char **names, char ***ret_names);
  
  long KRB5_CALLCONV profile_iterator_create
! 	(profile_t profile, const char *const *names,
  		   int flags, void **ret_iter);
  
  void KRB5_CALLCONV profile_iterator_free
***************
*** 113,124 ****
  	(profile_t profile, const char **names, 
  		   const char *new_value);
  
- #if TARGET_OS_MAC
- #    if defined(__MWERKS__)
- #        pragma import reset
- #    endif
- #endif
- 
  #ifdef __cplusplus
  }
  #endif /* __cplusplus */
--- 118,123 ----
***************
*** 168,174 ****
  
  #if !defined(_WIN32)
  /* for compatibility with older versions... */
! extern void initialize_prof_error_table () /*@modifies internalState@*/;
  #else
  #define initialize_prof_error_table()
  #endif
--- 167,173 ----
  
  #if !defined(_WIN32)
  /* for compatibility with older versions... */
! extern void initialize_prof_error_table (void) /*@modifies internalState@*/;
  #else
  #define initialize_prof_error_table()
  #endif
Index: openafs/src/WINNT/kfw/inc/krb5/win-mac.h
diff -c openafs/src/WINNT/kfw/inc/krb5/win-mac.h:1.1 openafs/src/WINNT/kfw/inc/krb5/win-mac.h:1.1.14.1
*** openafs/src/WINNT/kfw/inc/krb5/win-mac.h:1.1	Thu Feb 26 14:22:53 2004
--- openafs/src/WINNT/kfw/inc/krb5/win-mac.h	Thu Oct 12 17:42:20 2006
***************
*** 25,30 ****
--- 25,45 ----
  
  #else /* ! RES_ONLY */
  
+ /* To ensure backward compatibility of the ABI use 32-bit time_t on 
+  * 32-bit Windows. 
+  */
+ #ifdef _KRB5_INT_H
+ #ifdef KRB5_GENERAL__
+ #error krb5.h included before k5-int.h
+ #endif /* KRB5_GENERAL__ */
+ #if _INTEGRAL_MAX_BITS >= 64 && _MSC_VER >= 1400 && !defined(_WIN64) && !defined(_USE_32BIT_TIME_T)
+ #if defined(_TIME_T_DEFINED) || defined(_INC_IO) || defined(_INC_TIME) || defined(_INC_WCHAR)
+ #error time_t has been defined as a 64-bit integer which is incompatible with Kerberos on this platform.
+ #endif /* _TIME_T_DEFINED */
+ #define _USE_32BIT_TIME_T
+ #endif 
+ #endif
+ 
  #define SIZEOF_INT      4
  #define SIZEOF_SHORT    2
  #define SIZEOF_LONG     4
***************
*** 32,42 ****
  #include <windows.h>
  #include <limits.h>
  
- #define HAVE_LABS
- 
  #ifndef SIZE_MAX    /* in case Microsoft defines max size of size_t */
  #define SIZE_MAX UINT_MAX
  #endif
  
  #ifndef KRB5_CALLCONV
  #  define KRB5_CALLCONV __stdcall
--- 47,59 ----
  #include <windows.h>
  #include <limits.h>
  
  #ifndef SIZE_MAX    /* in case Microsoft defines max size of size_t */
+ #ifdef  MAX_SIZE    /* Microsoft defines MAX_SIZE as max size of size_t */
+ #define SIZE_MAX MAX_SIZE
+ #else
  #define SIZE_MAX UINT_MAX
  #endif
+ #endif
  
  #ifndef KRB5_CALLCONV
  #  define KRB5_CALLCONV __stdcall
***************
*** 55,64 ****
  #ifndef KRB5_SYSTYPES__
  #define KRB5_SYSTYPES__
  #include <sys/types.h>
! typedef unsigned long	u_long;      /* Not part of sys/types.h on the pc */
! typedef unsigned int	u_int;
! typedef unsigned short	u_short;
! typedef unsigned char	u_char;
  #endif /* KRB5_SYSTYPES__ */
  
  #define MAXHOSTNAMELEN  512
--- 72,87 ----
  #ifndef KRB5_SYSTYPES__
  #define KRB5_SYSTYPES__
  #include <sys/types.h>
! typedef unsigned long	 u_long;      /* Not part of sys/types.h on the pc */
! typedef unsigned int	 u_int;
! typedef unsigned short	 u_short;
! typedef unsigned char	 u_char;
! typedef unsigned int     uint32_t;
! typedef int              int32_t;
! #if _INTEGRAL_MAX_BITS >= 64
! typedef unsigned __int64 uint64_t;
! typedef __int64          int64_t;
! #endif
  #endif /* KRB5_SYSTYPES__ */
  
  #define MAXHOSTNAMELEN  512
***************
*** 72,79 ****
--- 95,111 ----
  #define HAVE_SRAND
  #define HAVE_ERRNO
  #define HAVE_STRDUP
+ #define HAVE_GETADDRINFO
+ #define HAVE_GETNAMEINFO
  #define NO_USERID
  #define NO_PASSWORD
+ #define HAVE_STRERROR
+ #define SYS_ERRLIST_DECLARED
+ /* if __STDC_VERSION__ >= 199901L this shouldn't be needed */
+ #define inline __inline
+ #define KRB5_USE_INET6
+ #define NEED_INSIXADDR_ANY
+ #define ENABLE_THREADS
  
  #define WM_KERBEROS5_CHANGED "Kerberos5 Changed"
  #ifdef KRB4
***************
*** 159,164 ****
--- 191,201 ----
  
  HINSTANCE get_lib_instance(void);
  
+ #define GETSOCKNAME_ARG2_TYPE	struct sockaddr
+ #define GETSOCKNAME_ARG3_TYPE	size_t
+ #define GETPEERNAME_ARG2_TYPE	GETSOCKNAME_ARG2_TYPE
+ #define GETPEERNAME_ARG3_TYPE	GETSOCKNAME_ARG3_TYPE
+ 
  #endif /* !RES_ONLY */
  
  #endif /* _WIN32 */
Index: openafs/src/WINNT/kfw/inc/krb5/KerberosIV/des.h
diff -c openafs/src/WINNT/kfw/inc/krb5/KerberosIV/des.h:1.1 openafs/src/WINNT/kfw/inc/krb5/KerberosIV/des.h:1.1.14.1
*** openafs/src/WINNT/kfw/inc/krb5/KerberosIV/des.h:1.1	Thu Feb 26 14:22:53 2004
--- openafs/src/WINNT/kfw/inc/krb5/KerberosIV/des.h	Thu Oct 12 17:42:39 2006
***************
*** 26,32 ****
   * Include file for the Data Encryption Standard library.
   */
  
! #if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
  #	include <TargetConditionals.h>
  #	if TARGET_RT_MAC_CFM
  #		error "Use KfM 4.0 SDK headers for CFM compilation."
--- 26,32 ----
   * Include file for the Data Encryption Standard library.
   */
  
! #if defined(__MACH__) && defined(__APPLE__)
  #	include <TargetConditionals.h>
  #	if TARGET_RT_MAC_CFM
  #		error "Use KfM 4.0 SDK headers for CFM compilation."
***************
*** 51,60 ****
  KRBINT_BEGIN_DECLS
  
  #if TARGET_OS_MAC
! #	if defined(__MWERKS__)
! #		pragma import on
! #	endif
! #	pragma options align=mac68k
  #endif
  
  #if UINT_MAX >= 0xFFFFFFFFUL
--- 51,57 ----
  KRBINT_BEGIN_DECLS
  
  #if TARGET_OS_MAC
! #	pragma pack(push,2)
  #endif
  
  #if UINT_MAX >= 0xFFFFFFFFUL
***************
*** 87,97 ****
  typedef struct des_ks_struct {  DES_INT32 _[2]; } des_key_schedule[16];
  
  #if TARGET_OS_MAC
! #	if defined(__MWERKS__)
! #		pragma enumsalwaysint reset
! #		pragma import reset
! #	endif
! #	pragma options align=reset
  #endif
  
  KRBINT_END_DECLS
--- 84,90 ----
  typedef struct des_ks_struct {  DES_INT32 _[2]; } des_key_schedule[16];
  
  #if TARGET_OS_MAC
! #	pragma pack(pop)
  #endif
  
  KRBINT_END_DECLS
***************
*** 120,130 ****
  KRBINT_BEGIN_DECLS
  
  #if TARGET_OS_MAC
! #	if defined(__MWERKS__)
! #		pragma import on
! #		pragma enumsalwaysint on
! #	endif
! #	pragma options align=mac68k
  #endif
  
  /* Windows declarations */
--- 113,119 ----
  KRBINT_BEGIN_DECLS
  
  #if TARGET_OS_MAC
! #	pragma pack(push,2)
  #endif
  
  /* Windows declarations */
***************
*** 197,206 ****
  void des_cblock_print_file(des_cblock *, FILE *fp);
  
  #if TARGET_OS_MAC
! #	if defined(__MWERKS__)
! #		pragma import reset
! #	endif
! #	pragma options align=reset
  #endif
  
  KRBINT_END_DECLS
--- 186,192 ----
  void des_cblock_print_file(des_cblock *, FILE *fp);
  
  #if TARGET_OS_MAC
! #	pragma pack(pop)
  #endif
  
  KRBINT_END_DECLS
Index: openafs/src/WINNT/kfw/inc/krb5/KerberosIV/kadm_err.h
diff -c openafs/src/WINNT/kfw/inc/krb5/KerberosIV/kadm_err.h:1.1 openafs/src/WINNT/kfw/inc/krb5/KerberosIV/kadm_err.h:1.1.14.1
*** openafs/src/WINNT/kfw/inc/krb5/KerberosIV/kadm_err.h:1.1	Thu Feb 26 14:22:53 2004
--- openafs/src/WINNT/kfw/inc/krb5/KerberosIV/kadm_err.h	Thu Oct 12 17:42:39 2006
***************
*** 47,53 ****
  
  #if !defined(_WIN32)
  /* for compatibility with older versions... */
! extern void initialize_kadm_error_table () /*@modifies internalState@*/;
  #else
  #define initialize_kadm_error_table()
  #endif
--- 47,53 ----
  
  #if !defined(_WIN32)
  /* for compatibility with older versions... */
! extern void initialize_kadm_error_table (void) /*@modifies internalState@*/;
  #else
  #define initialize_kadm_error_table()
  #endif
Index: openafs/src/WINNT/kfw/inc/krb5/KerberosIV/krb.h
diff -c openafs/src/WINNT/kfw/inc/krb5/KerberosIV/krb.h:1.1 openafs/src/WINNT/kfw/inc/krb5/KerberosIV/krb.h:1.1.14.1
*** openafs/src/WINNT/kfw/inc/krb5/KerberosIV/krb.h:1.1	Thu Feb 26 14:22:53 2004
--- openafs/src/WINNT/kfw/inc/krb5/KerberosIV/krb.h	Thu Oct 12 17:42:39 2006
***************
*** 34,40 ****
   * For MacOS, don't expose prototypes of various private functions.
   * Unfortuantely, they've leaked out everywhere else.
   */
! #if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
  #	include <TargetConditionals.h>
  #	if TARGET_RT_MAC_CFM
  #		error "Use KfM 4.0 SDK headers for CFM compilation."
--- 34,40 ----
   * For MacOS, don't expose prototypes of various private functions.
   * Unfortuantely, they've leaked out everywhere else.
   */
! #if defined(__MACH__) && defined(__APPLE__)
  #	include <TargetConditionals.h>
  #	if TARGET_RT_MAC_CFM
  #		error "Use KfM 4.0 SDK headers for CFM compilation."
***************
*** 73,83 ****
  KRBINT_BEGIN_DECLS
  
  #if TARGET_OS_MAC
! #	if defined(__MWERKS__)
! #		pragma import on
! #		pragma enumsalwaysint on
! #	endif
! #	pragma options align=mac68k
  #endif
  
  #define KRB4_32		DES_INT32
--- 73,79 ----
  KRBINT_BEGIN_DECLS
  
  #if TARGET_OS_MAC
! #	pragma pack(push,2)
  #endif
  
  #define KRB4_32		DES_INT32
***************
*** 783,792 ****
  #endif
  
  #if TARGET_OS_MAC
! #	if defined(__MWERKS__)
! #		pragma import reset
! #	endif
! #	pragma options align=reset
  #endif
  
  KRBINT_END_DECLS
--- 779,785 ----
  #endif
  
  #if TARGET_OS_MAC
! #	pragma pack(pop)
  #endif
  
  KRBINT_END_DECLS
Index: openafs/src/WINNT/kfw/inc/krb5/KerberosIV/krb_err.h
diff -c openafs/src/WINNT/kfw/inc/krb5/KerberosIV/krb_err.h:1.1 openafs/src/WINNT/kfw/inc/krb5/KerberosIV/krb_err.h:1.1.14.1
*** openafs/src/WINNT/kfw/inc/krb5/KerberosIV/krb_err.h:1.1	Thu Feb 26 14:22:53 2004
--- openafs/src/WINNT/kfw/inc/krb5/KerberosIV/krb_err.h	Thu Oct 12 17:42:39 2006
***************
*** 267,273 ****
  
  #if !defined(_WIN32)
  /* for compatibility with older versions... */
! extern void initialize_krb_error_table () /*@modifies internalState@*/;
  #else
  #define initialize_krb_error_table()
  #endif
--- 267,273 ----
  
  #if !defined(_WIN32)
  /* for compatibility with older versions... */
! extern void initialize_krb_error_table (void) /*@modifies internalState@*/;
  #else
  #define initialize_krb_error_table()
  #endif
Index: openafs/src/WINNT/kfw/inc/krb5/gssapi/gssapi.h
diff -c openafs/src/WINNT/kfw/inc/krb5/gssapi/gssapi.h:1.2 openafs/src/WINNT/kfw/inc/krb5/gssapi/gssapi.h:1.2.6.1
*** openafs/src/WINNT/kfw/inc/krb5/gssapi/gssapi.h:1.2	Fri Mar 11 00:37:54 2005
--- openafs/src/WINNT/kfw/inc/krb5/gssapi/gssapi.h	Thu Oct 12 17:42:39 2006
***************
*** 27,33 ****
   * Determine platform-dependent configuration.
   */
  
! #if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
  #	include <TargetConditionals.h>
  #	if TARGET_RT_MAC_CFM
  #		error "Use KfM 4.0 SDK headers for CFM compilation."
--- 27,33 ----
   * Determine platform-dependent configuration.
   */
  
! #if defined(__MACH__) && defined(__APPLE__)
  #	include <TargetConditionals.h>
  #	if TARGET_RT_MAC_CFM
  #		error "Use KfM 4.0 SDK headers for CFM compilation."
***************
*** 39,47 ****
  #endif /* __cplusplus */
  
  #if TARGET_OS_MAC
- #	if defined(__MWERKS__)
- #		pragma import on
- #	endif
  #	pragma options align=mac68k
  #endif
  
--- 39,44 ----
***************
*** 54,69 ****
  #define KRB5_CALLCONV_C
  #endif
  
- #define	GSS_SIZEOF_INT		SIZEOF_INT
- #define	GSS_SIZEOF_LONG		SIZEOF_LONG
- #define	GSS_SIZEOF_SHORT	SIZEOF_SHORT
- 
  /*
   * First, include stddef.h to get size_t defined.
   */
- #if	HAVE_STDDEF_H
  #include <stddef.h>
- #endif	/* HAVE_STDDEF_H */
  
  /*
   * POSIX says that sys/types.h is where size_t is defined.
--- 51,60 ----
***************
*** 71,84 ****
  #include <sys/types.h>
  
  /*
!  * If the platform supports the xom.h header file, it should be included here.
!  */
! #if	HAVE_XOM_H
! #include <xom.h>
! #endif	/* HAVE_XOM_H */
! 
! /*
!  * $Id: gssapi.h,v 1.2 2005/03/11 05:37:54 jaltman Exp $
   */
  
  /*
--- 62,68 ----
  #include <sys/types.h>
  
  /*
!  * $Id: gssapi.h,v 1.2.6.1 2006/10/12 21:42:39 jaltman Exp $
   */
  
  /*
***************
*** 93,108 ****
   * The following type must be defined as the smallest natural unsigned integer
   * supported by the platform that has at least 32 bits of precision.
   */
! #if (GSS_SIZEOF_SHORT == 4)
! typedef unsigned short gss_uint32;
! typedef short gss_int32;
! #elif (GSS_SIZEOF_INT == 4)
! typedef unsigned int gss_uint32;
! typedef int gss_int32;
! #elif (GSS_SIZEOF_LONG == 4)
! typedef unsigned long gss_uint32;
! typedef long gss_int32;
! #endif
  
  #ifdef	OM_STRING
  /*
--- 77,84 ----
   * The following type must be defined as the smallest natural unsigned integer
   * supported by the platform that has at least 32 bits of precision.
   */
! typedef uint32_t gss_uint32;
! typedef int32_t gss_int32;
  
  #ifdef	OM_STRING
  /*
***************
*** 715,720 ****
--- 691,703 ----
  	    gss_OID_set *		/* name_types */
  	   );
  
+ /* New for V2 */
+ OM_uint32 KRB5_CALLCONV gss_inquire_mechs_for_name(
+     OM_uint32 *,		/* minor_status */
+     const gss_name_t,		/* input_name */
+     gss_OID_set *		/* mech_types */
+ );
+ 
  /*
   * The following routines are obsolete variants of gss_get_mic, gss_wrap,
   * gss_verify_mic and gss_unwrap.  They should be provided by GSSAPI V2
***************
*** 780,788 ****
  	);
  
  #if TARGET_OS_MAC
- #  if defined(__MWERKS__)
- #    pragma import reset
- #  endif
  #  pragma options align=reset
  #endif
  
--- 763,768 ----
Index: openafs/src/WINNT/kfw/inc/krb5/gssapi/gssapi_generic.h
diff -c openafs/src/WINNT/kfw/inc/krb5/gssapi/gssapi_generic.h:1.2 openafs/src/WINNT/kfw/inc/krb5/gssapi/gssapi_generic.h:1.2.6.1
*** openafs/src/WINNT/kfw/inc/krb5/gssapi/gssapi_generic.h:1.2	Fri Mar 11 00:37:54 2005
--- openafs/src/WINNT/kfw/inc/krb5/gssapi/gssapi_generic.h	Thu Oct 12 17:42:39 2006
***************
*** 24,30 ****
  #define _GSSAPI_GENERIC_H_
  
  /*
!  * $Id: gssapi_generic.h,v 1.2 2005/03/11 05:37:54 jaltman Exp $
   */
  
  #include <gssapi/gssapi.h>
--- 24,30 ----
  #define _GSSAPI_GENERIC_H_
  
  /*
!  * $Id: gssapi_generic.h,v 1.2.6.1 2006/10/12 21:42:39 jaltman Exp $
   */
  
  #include <gssapi/gssapi.h>
Index: openafs/src/WINNT/kfw/inc/krb5/gssapi/gssapi_krb5.h
diff -c openafs/src/WINNT/kfw/inc/krb5/gssapi/gssapi_krb5.h:1.1 openafs/src/WINNT/kfw/inc/krb5/gssapi/gssapi_krb5.h:1.1.14.1
*** openafs/src/WINNT/kfw/inc/krb5/gssapi/gssapi_krb5.h:1.1	Thu Feb 26 14:22:54 2004
--- openafs/src/WINNT/kfw/inc/krb5/gssapi/gssapi_krb5.h	Thu Oct 12 17:42:39 2006
***************
*** 70,85 ****
   * generic(1) string_uid_name(3)}.  The recommended symbolic name for
   * this type is "GSS_KRB5_NT_STRING_UID_NAME". */ 
  
! extern const gss_OID_desc * const gss_mech_krb5;
! extern const gss_OID_desc * const gss_mech_krb5_old;
! extern const gss_OID_set_desc * const gss_mech_set_krb5;
! extern const gss_OID_set_desc * const gss_mech_set_krb5_old;
! extern const gss_OID_set_desc * const gss_mech_set_krb5_both;
  
! extern const gss_OID_desc * const gss_nt_krb5_name;
! extern const gss_OID_desc * const gss_nt_krb5_principal;
  
! extern const gss_OID_desc krb5_gss_oid_array[];
  
  #define gss_krb5_nt_general_name	gss_nt_krb5_name
  #define gss_krb5_nt_principal		gss_nt_krb5_principal
--- 70,86 ----
   * generic(1) string_uid_name(3)}.  The recommended symbolic name for
   * this type is "GSS_KRB5_NT_STRING_UID_NAME". */ 
  
! GSS_DLLIMP extern const gss_OID_desc * const gss_mech_krb5;
! GSS_DLLIMP extern const gss_OID_desc * const gss_mech_krb5_old;
! GSS_DLLIMP extern const gss_OID_desc * const gss_mech_krb5_wrong;
! GSS_DLLIMP extern const gss_OID_set_desc * const gss_mech_set_krb5;
! GSS_DLLIMP extern const gss_OID_set_desc * const gss_mech_set_krb5_old;
! GSS_DLLIMP extern const gss_OID_set_desc * const gss_mech_set_krb5_both;
  
! GSS_DLLIMP extern const gss_OID_desc * const gss_nt_krb5_name;
! GSS_DLLIMP extern const gss_OID_desc * const gss_nt_krb5_principal;
  
! GSS_DLLIMP extern const gss_OID_desc krb5_gss_oid_array[];
  
  #define gss_krb5_nt_general_name	gss_nt_krb5_name
  #define gss_krb5_nt_principal		gss_nt_krb5_principal
***************
*** 88,93 ****
--- 89,159 ----
  #define gss_krb5_nt_machine_uid_name	gss_nt_machine_uid_name
  #define gss_krb5_nt_string_uid_name	gss_nt_string_uid_name
  
+ 
+ #if defined(_WIN32)
+ typedef  unsigned __int64 gss_uint64;
+ #else /*windows*/
+ #include <inttypes.h>
+ typedef  uint64_t gss_uint64;
+ #endif
+ 
+ 
+ typedef struct gss_krb5_lucid_key {
+ 	OM_uint32	type;		/* key encryption type */
+ 	OM_uint32	length;		/* length of key data */
+ 	void *		data;		/* actual key data */
+ } gss_krb5_lucid_key_t;
+ 
+ typedef struct gss_krb5_rfc1964_keydata {
+ 	OM_uint32	sign_alg;	/* signing algorthm */
+ 	OM_uint32	seal_alg;	/* seal/encrypt algorthm */
+ 	gss_krb5_lucid_key_t	ctx_key;
+ 					/* Context key
+ 					   (Kerberos session key or subkey) */
+ } gss_krb5_rfc1964_keydata_t;
+ 
+ typedef struct gss_krb5_cfx_keydata {
+ 	OM_uint32		have_acceptor_subkey;
+ 					/* 1 if there is an acceptor_subkey
+ 					   present, 0 otherwise */
+ 	gss_krb5_lucid_key_t	ctx_key;
+ 					/* Context key
+ 					   (Kerberos session key or subkey) */
+ 	gss_krb5_lucid_key_t	acceptor_subkey;
+ 					/* acceptor-asserted subkey or
+ 					   0's if no acceptor subkey */
+ } gss_krb5_cfx_keydata_t;
+ 
+ typedef struct gss_krb5_lucid_context_v1 {
+ 	OM_uint32	version;	/* Structure version number (1)
+ 					   MUST be at beginning of struct! */
+ 	OM_uint32	initiate;	/* Are we the initiator? */
+ 	OM_uint32	endtime;	/* expiration time of context */
+ 	gss_uint64	send_seq;	/* sender sequence number */
+ 	gss_uint64	recv_seq;	/* receive sequence number */
+ 	OM_uint32	protocol;	/* 0: rfc1964,
+ 					   1: draft-ietf-krb-wg-gssapi-cfx-07 */
+ 	/*
+ 	 * if (protocol == 0) rfc1964_kd should be used
+ 	 * and cfx_kd contents are invalid and should be zero
+ 	 * if (protocol == 1) cfx_kd should be used
+ 	 * and rfc1964_kd contents are invalid and should be zero
+ 	 */
+ 	gss_krb5_rfc1964_keydata_t rfc1964_kd;
+ 	gss_krb5_cfx_keydata_t	   cfx_kd;
+ } gss_krb5_lucid_context_v1_t;
+ 
+ /*
+  * Mask for determining the returned structure version.
+  * See example below for usage.
+  */
+ typedef struct gss_krb5_lucid_context_version {
+ 	OM_uint32	version;	/* Structure version number */
+ } gss_krb5_lucid_context_version_t;
+ 
+ 
+ 
+ 
  /* Alias for Heimdal compat. */
  #define gsskrb5_register_acceptor_identity krb5_gss_register_acceptor_identity
  
***************
*** 107,112 ****
--- 173,270 ----
  	(OM_uint32 *minor_status, const char *name,
  		   const char **out_name);
  
+ /*
+  * gss_krb5_set_allowable_enctypes
+  *
+  * This function may be called by a context initiator after calling
+  * gss_acquire_cred(), but before calling gss_init_sec_context(),
+  * to restrict the set of enctypes which will be negotiated during
+  * context establishment to those in the provided array.
+  *
+  * 'cred' must be a valid credential handle obtained via
+  * gss_acquire_cred().  It may not be GSS_C_NO_CREDENTIAL.
+  * gss_acquire_cred() may have been called to get a handle to
+  * the default credential.
+  *
+  * The purpose of this function is to limit the keys that may
+  * be exported via gss_krb5_export_lucid_sec_context(); thus it
+  * should limit the enctypes of all keys that will be needed
+  * after the security context has been established.
+  * (i.e. context establishment may use a session key with a
+  * stronger enctype than in the provided array, however a
+  * subkey must be established within the enctype limits
+  * established by this function.)
+  *
+  */
+ OM_uint32 KRB5_CALLCONV
+ gss_krb5_set_allowable_enctypes(OM_uint32 *minor_status, 
+ 				gss_cred_id_t cred,
+ 				OM_uint32 num_ktypes,
+ 				krb5_enctype *ktypes);
+ 
+ /*
+  * Returns a non-opaque (lucid) version of the internal context
+  * information.  
+  *
+  * Note that context_handle must not be used again by the caller
+  * after this call.  The GSS implementation is free to release any
+  * resources associated with the original context.  It is up to the
+  * GSS implementation whether it returns pointers to existing data,
+  * or copies of the data.  The caller should treat the returned
+  * lucid context as read-only.
+  * 
+  * The caller must call gss_krb5_free_lucid_context() to free
+  * the context and allocated resources when it is finished with it.
+  *
+  * 'version' is an integer indicating the highest version of lucid
+  * context understood by the caller.  The highest version
+  * understood by both the caller and the GSS implementation must
+  * be returned.  The caller can determine which version of the
+  * structure was actually returned by examining the version field
+  * of the returned structure.  gss_krb5_lucid_context_version_t
+  * may be used as a mask to examine the returned structure version.
+  *
+  * If there are no common versions, an error should be returned.
+  * (XXX Need error definition(s))
+  *
+  * For example:
+  *	void *return_ctx;
+  *	gss_krb5_lucid_context_v1_t *ctx;
+  *	OM_uint32 min_stat, maj_stat;
+  *	OM_uint32 vers;
+  *	gss_ctx_id_t *ctx_handle;
+  *
+  *	maj_stat = gss_krb5_export_lucid_sec_context(&min_stat,
+  *			ctx_handle, 1, &return_ctx);
+  *	// Verify success 
+  *
+  *	vers = ((gss_krb5_lucid_context_version_t *)return_ctx)->version;
+  *	switch (vers) {
+  *	case 1:
+  *		ctx = (gss_krb5_lucid_context_v1_t *) return_ctx;
+  *		break;
+  *	default:
+  *		// Error, unknown version returned
+  *		break;
+  *	}
+  *
+  */
+ 
+ OM_uint32 KRB5_CALLCONV
+ gss_krb5_export_lucid_sec_context(OM_uint32 *minor_status,
+ 				  gss_ctx_id_t *context_handle,
+ 				  OM_uint32 version,
+ 				  void **kctx);
+ 
+ /*
+  * Frees the allocated storage associated with an
+  * exported struct gss_krb5_lucid_context.
+  */
+ OM_uint32 KRB5_CALLCONV
+ gss_krb5_free_lucid_sec_context(OM_uint32 *minor_status,
+ 				void *kctx);
+ 
+ 
  #ifdef __cplusplus
  }
  #endif /* __cplusplus */
Index: openafs/src/WINNT/kfw/inc/krb5/krb5/krb5.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/krb5/krb5/krb5.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:24 2006
--- openafs/src/WINNT/kfw/inc/krb5/krb5/krb5.h	Thu Oct 12 17:42:40 2006
***************
*** 0 ****
--- 1,3052 ----
+ /*
+  * include/krb5.h
+  *
+  * Copyright 1989,1990,1995,2001, 2003  by the Massachusetts Institute of Technology.
+  * All Rights Reserved.
+  *
+  * Export of this software from the United States of America may
+  *   require a specific license from the United States Government.
+  *   It is the responsibility of any person or organization contemplating
+  *   export to obtain such a license before exporting.
+  * 
+  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+  * distribute this software and its documentation for any purpose and
+  * without fee is hereby granted, provided that the above copyright
+  * notice appear in all copies and that both that copyright notice and
+  * this permission notice appear in supporting documentation, and that
+  * the name of M.I.T. not be used in advertising or publicity pertaining
+  * to distribution of the software without specific, written prior
+  * permission.	Furthermore if you modify this software you must label
+  * your software as modified software and not distribute it in such a
+  * fashion that it might be confused with the original M.I.T. software.
+  * M.I.T. makes no representations about the suitability of
+  * this software for any purpose.  It is provided "as is" without express
+  * or implied warranty.
+  * 
+  *
+  * General definitions for Kerberos version 5.
+  */
+ 
+ /*
+  * Copyright (C) 1998 by the FundsXpress, INC.
+  * 
+  * All rights reserved.
+  * 
+  * Export of this software from the United States of America may require
+  * a specific license from the United States Government.  It is the
+  * responsibility of any person or organization contemplating export to
+  * obtain such a license before exporting.
+  * 
+  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+  * distribute this software and its documentation for any purpose and
+  * without fee is hereby granted, provided that the above copyright
+  * notice appear in all copies and that both that copyright notice and
+  * this permission notice appear in supporting documentation, and that
+  * the name of FundsXpress. not be used in advertising or publicity pertaining
+  * to distribution of the software without specific, written prior
+  * permission.  FundsXpress makes no representations about the suitability of
+  * this software for any purpose.  It is provided "as is" without express
+  * or implied warranty.
+  * 
+  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+  */
+ 
+ #ifndef KRB5_GENERAL__
+ #define KRB5_GENERAL__
+ 
+ /* By default, do not expose deprecated interfaces. */
+ #ifndef KRB5_DEPRECATED
+ #define KRB5_DEPRECATED 0
+ #endif
+ /* Do not expose private interfaces.  Build system will override. */
+ #ifndef KRB5_PRIVATE
+ #define KRB5_PRIVATE 0
+ #endif
+ 
+ #if defined(__MACH__) && defined(__APPLE__)
+ #	include <TargetConditionals.h>
+ #    if TARGET_RT_MAC_CFM
+ #	error "Use KfM 4.0 SDK headers for CFM compilation."
+ #    endif
+ #endif
+ 
+ #if defined(_MSDOS) || defined(_WIN32)
+ #include <win-mac.h>
+ #endif
+ 
+ #ifndef KRB5_CONFIG__
+ #ifndef KRB5_CALLCONV
+ #define KRB5_CALLCONV
+ #define KRB5_CALLCONV_C
+ #endif /* !KRB5_CALLCONV */
+ #endif /* !KRB5_CONFIG__ */
+ 
+ #ifndef KRB5_CALLCONV_WRONG
+ #define KRB5_CALLCONV_WRONG
+ #endif
+ 
+ #ifndef THREEPARAMOPEN
+ #define THREEPARAMOPEN(x,y,z) open(x,y,z)
+ #endif
+ 
+ #define KRB5_OLD_CRYPTO
+ 
+ #include <stdlib.h>
+ #include <limits.h>		/* for *_MAX */
+ 
+ #ifndef KRB5INT_BEGIN_DECLS
+ #if defined(__cplusplus)
+ #define KRB5INT_BEGIN_DECLS	extern "C" {
+ #define KRB5INT_END_DECLS	}
+ #else
+ #define KRB5INT_BEGIN_DECLS
+ #define KRB5INT_END_DECLS
+ #endif
+ #endif
+ 
+ KRB5INT_BEGIN_DECLS
+ 
+ #if TARGET_OS_MAC
+ #    pragma options align=mac68k
+ #endif
+ 
+ /* from profile.h */
+ struct _profile_t;
+ /* typedef struct _profile_t *profile_t; */
+ 
+ /*
+  * begin wordsize.h
+  */
+ 
+ /*
+  * Word-size related definition.
+  */
+ 
+ typedef	unsigned char	krb5_octet;
+ 
+ #if INT_MAX == 0x7fff
+ typedef	int	krb5_int16;
+ typedef	unsigned int	krb5_ui_2;
+ #elif SHRT_MAX == 0x7fff
+ typedef	short	krb5_int16;
+ typedef	unsigned short	krb5_ui_2;
+ #else
+ #error undefined 16 bit type
+ #endif
+ 
+ #if INT_MAX == 0x7fffffffL
+ typedef	int	krb5_int32;
+ typedef	unsigned int	krb5_ui_4;
+ #elif LONG_MAX == 0x7fffffffL
+ typedef	long	krb5_int32;
+ typedef	unsigned long	krb5_ui_4;
+ #elif SHRT_MAX == 0x7fffffffL
+ typedef	short	krb5_int32;
+ typedef	unsigned short	krb5_ui_4;
+ #else
+ #error: undefined 32 bit type
+ #endif
+ 
+ #define VALID_INT_BITS	  INT_MAX
+ #define VALID_UINT_BITS	  UINT_MAX
+ 
+ #define KRB5_INT32_MAX	2147483647
+ /* this strange form is necessary since - is a unary operator, not a sign
+    indicator */
+ #define KRB5_INT32_MIN	(-KRB5_INT32_MAX-1)
+ 
+ #define KRB5_INT16_MAX 65535	
+ /* this strange form is necessary since - is a unary operator, not a sign
+    indicator */
+ #define KRB5_INT16_MIN	(-KRB5_INT16_MAX-1)
+ 
+ /*
+  * end wordsize.h
+  */
+ 
+ /*
+  * begin "base-defs.h"
+  */
+ 
+ /*
+  * Basic definitions for Kerberos V5 library
+  */
+ 
+ #ifndef FALSE
+ #define	FALSE	0
+ #endif
+ #ifndef TRUE
+ #define	TRUE	1
+ #endif
+ 
+ typedef	unsigned int krb5_boolean;
+ typedef	unsigned int krb5_msgtype;	
+ typedef	unsigned int krb5_kvno;	
+ 
+ typedef	krb5_int32 krb5_addrtype;
+ typedef krb5_int32 krb5_enctype;
+ typedef krb5_int32 krb5_cksumtype;
+ typedef krb5_int32 krb5_authdatatype;
+ typedef krb5_int32 krb5_keyusage;
+ 
+ typedef krb5_int32	krb5_preauthtype; /* This may change, later on */
+ typedef	krb5_int32	krb5_flags;
+ typedef krb5_int32	krb5_timestamp;
+ typedef	krb5_int32	krb5_error_code;
+ typedef krb5_int32	krb5_deltat;
+ 
+ typedef krb5_error_code	krb5_magic;
+ 
+ typedef struct _krb5_data {
+ 	krb5_magic magic;
+ 	unsigned int length;
+ 	char *data;
+ } krb5_data;
+ 
+ /* 
+  * Hack length for crypto library to use the afs_string_to_key It is
+  * equivalent to -1 without possible sign extension 
+  * We also overload for an unset salt type length - which is also -1, but
+  * hey, why not....
+ */
+ #define SALT_TYPE_AFS_LENGTH UINT_MAX
+ #define SALT_TYPE_NO_LENGTH  UINT_MAX
+ 
+ typedef	void * krb5_pointer;
+ typedef void const * krb5_const_pointer;
+ 
+ typedef struct krb5_principal_data {
+     krb5_magic magic;
+     krb5_data realm;
+     krb5_data *data;		/* An array of strings */
+     krb5_int32 length;
+     krb5_int32 type;
+ } krb5_principal_data;
+ 
+ typedef	krb5_principal_data * krb5_principal;
+ 
+ /*
+  * Per V5 spec on definition of principal types
+  */
+ 
+ /* Name type not known */
+ #define KRB5_NT_UNKNOWN		0
+ /* Just the name of the principal as in DCE, or for users */
+ #define KRB5_NT_PRINCIPAL	1
+ /* Service and other unique instance (krbtgt) */
+ #define KRB5_NT_SRV_INST	2
+ /* Service with host name as instance (telnet, rcommands) */
+ #define KRB5_NT_SRV_HST		3
+ /* Service with host as remaining components */
+ #define KRB5_NT_SRV_XHST	4
+ /* Unique ID */
+ #define KRB5_NT_UID		5
+ 
+ /* constant version thereof: */
+ typedef const krb5_principal_data *krb5_const_principal;
+ 
+ #define krb5_princ_realm(context, princ) (&(princ)->realm)
+ #define krb5_princ_set_realm(context, princ,value) ((princ)->realm = *(value))
+ #define krb5_princ_set_realm_length(context, princ,value) (princ)->realm.length = (value)
+ #define krb5_princ_set_realm_data(context, princ,value) (princ)->realm.data = (value)
+ #define	krb5_princ_size(context, princ) (princ)->length
+ #define	krb5_princ_type(context, princ) (princ)->type
+ #define	krb5_princ_name(context, princ) (princ)->data
+ #define	krb5_princ_component(context, princ,i)		\
+ 	    (((i) < krb5_princ_size(context, princ))	\
+ 	     ? (princ)->data + (i)			\
+ 	     : NULL)
+ 
+ /*
+  * end "base-defs.h"
+  */
+ 
+ /*
+  * begin "hostaddr.h"
+  */
+ 
+ /* structure for address */
+ typedef struct _krb5_address {
+     krb5_magic magic;
+     krb5_addrtype addrtype;
+     unsigned int length;
+     krb5_octet *contents;
+ } krb5_address;
+ 
+ /* per Kerberos v5 protocol spec */
+ #define	ADDRTYPE_INET		0x0002
+ #define	ADDRTYPE_CHAOS		0x0005
+ #define	ADDRTYPE_XNS		0x0006
+ #define	ADDRTYPE_ISO		0x0007
+ #define ADDRTYPE_DDP		0x0010
+ #define ADDRTYPE_INET6		0x0018
+ /* not yet in the spec... */
+ #define ADDRTYPE_ADDRPORT	0x0100
+ #define ADDRTYPE_IPPORT		0x0101
+ 
+ /* macros to determine if a type is a local type */
+ #define ADDRTYPE_IS_LOCAL(addrtype) (addrtype & 0x8000)
+ 
+ /*
+  * end "hostaddr.h"
+  */
+ 
+ 
+ struct _krb5_context;
+ typedef struct _krb5_context * krb5_context;
+ 
+ struct _krb5_auth_context;
+ typedef struct _krb5_auth_context * krb5_auth_context;
+ 
+ struct _krb5_cryptosystem_entry;
+ 
+ /*
+  * begin "encryption.h"
+  */
+ 
+ typedef struct _krb5_keyblock {
+     krb5_magic magic;
+     krb5_enctype enctype;
+     unsigned int length;
+     krb5_octet *contents;
+ } krb5_keyblock;
+ 
+ #ifdef KRB5_OLD_CRYPTO
+ typedef struct _krb5_encrypt_block {
+     krb5_magic magic;
+     krb5_enctype crypto_entry;		/* to call krb5_encrypt_size, you need
+ 					   this.  it was a pointer, but it
+ 					   doesn't have to be.  gross. */
+     krb5_keyblock *key;
+ } krb5_encrypt_block;
+ #endif
+ 
+ typedef struct _krb5_checksum {
+     krb5_magic magic;
+     krb5_cksumtype checksum_type;	/* checksum type */
+     unsigned int length;
+     krb5_octet *contents;
+ } krb5_checksum;
+ 
+ typedef struct _krb5_enc_data {
+     krb5_magic magic;
+     krb5_enctype enctype;
+     krb5_kvno kvno;
+     krb5_data ciphertext;
+ } krb5_enc_data;
+ 
+ /* per Kerberos v5 protocol spec */
+ #define	ENCTYPE_NULL		0x0000
+ #define	ENCTYPE_DES_CBC_CRC	0x0001	/* DES cbc mode with CRC-32 */
+ #define	ENCTYPE_DES_CBC_MD4	0x0002	/* DES cbc mode with RSA-MD4 */
+ #define	ENCTYPE_DES_CBC_MD5	0x0003	/* DES cbc mode with RSA-MD5 */
+ #define	ENCTYPE_DES_CBC_RAW	0x0004	/* DES cbc mode raw */
+ /* XXX deprecated? */
+ #define	ENCTYPE_DES3_CBC_SHA	0x0005	/* DES-3 cbc mode with NIST-SHA */
+ #define	ENCTYPE_DES3_CBC_RAW	0x0006	/* DES-3 cbc mode raw */
+ #define ENCTYPE_DES_HMAC_SHA1	0x0008
+ #define ENCTYPE_DES3_CBC_SHA1	0x0010
+ #define ENCTYPE_AES128_CTS_HMAC_SHA1_96	0x0011
+ #define ENCTYPE_AES256_CTS_HMAC_SHA1_96	0x0012
+ #define ENCTYPE_ARCFOUR_HMAC	0x0017
+ #define ENCTYPE_ARCFOUR_HMAC_EXP 0x0018
+ #define ENCTYPE_UNKNOWN		0x01ff
+ 
+ #define	CKSUMTYPE_CRC32		0x0001
+ #define	CKSUMTYPE_RSA_MD4	0x0002
+ #define	CKSUMTYPE_RSA_MD4_DES	0x0003
+ #define	CKSUMTYPE_DESCBC	0x0004
+ /* des-mac-k */
+ /* rsa-md4-des-k */
+ #define	CKSUMTYPE_RSA_MD5	0x0007
+ #define	CKSUMTYPE_RSA_MD5_DES	0x0008
+ #define CKSUMTYPE_NIST_SHA	0x0009
+ #define CKSUMTYPE_HMAC_SHA1_DES3	0x000c
+ #define CKSUMTYPE_HMAC_SHA1_96_AES128	0x000f
+ #define CKSUMTYPE_HMAC_SHA1_96_AES256	0x0010
+ #define CKSUMTYPE_HMAC_MD5_ARCFOUR -138 /*Microsoft md5 hmac cksumtype*/
+ 
+ /* The following are entropy source designations. Whenever
+  * krb5_C_random_add_entropy is called, one of these source  ids is passed
+  * in.  This  allows the library  to better estimate bits of
+  * entropy in the sample and to keep track of what sources of entropy have
+  * contributed enough entropy.  Sources marked internal MUST NOT be
+  * used by applications outside the Kerberos library
+ */
+ 
+ enum {
+   KRB5_C_RANDSOURCE_OLDAPI = 0, /*calls to krb5_C_RANDOM_SEED (INTERNAL)*/
+   KRB5_C_RANDSOURCE_OSRAND = 1, /* /dev/random or equivalent (internal)*/
+   KRB5_C_RANDSOURCE_TRUSTEDPARTY = 2, /* From KDC or other trusted party*/
+   /*This source should be used carefully; data in this category
+    * should be from a third party trusted to give random bits
+    * For example keys issued by the KDC in the application server.
+    */
+   KRB5_C_RANDSOURCE_TIMING = 3, /* Timing of operations*/
+   KRB5_C_RANDSOURCE_EXTERNAL_PROTOCOL = 4, /*Protocol data possibly from attacker*/
+   KRB5_C_RANDSOURCE_MAX = 5 /*Do not use; maximum source ID*/
+ };
+ 
+ #ifndef krb5_roundup
+ /* round x up to nearest multiple of y */
+ #define krb5_roundup(x, y) ((((x) + (y) - 1)/(y))*(y))
+ #endif /* roundup */
+ 
+ /* macro function definitions to help clean up code */
+ 
+ #if 1
+ #define krb5_x(ptr,args) ((ptr)?((*(ptr)) args):(abort(),1))
+ #define krb5_xc(ptr,args) ((ptr)?((*(ptr)) args):(abort(),(char*)0))
+ #else
+ #define krb5_x(ptr,args) ((*(ptr)) args)
+ #define krb5_xc(ptr,args) ((*(ptr)) args)
+ #endif
+ 
+ krb5_error_code KRB5_CALLCONV
+     krb5_c_encrypt
+     (krb5_context context, const krb5_keyblock *key,
+ 		    krb5_keyusage usage, const krb5_data *cipher_state,
+ 		    const krb5_data *input, krb5_enc_data *output);
+ 
+ krb5_error_code KRB5_CALLCONV
+     krb5_c_decrypt
+     (krb5_context context, const krb5_keyblock *key,
+ 		    krb5_keyusage usage, const krb5_data *cipher_state,
+ 		    const krb5_enc_data *input, krb5_data *output);
+ 
+ krb5_error_code KRB5_CALLCONV
+     krb5_c_encrypt_length
+     (krb5_context context, krb5_enctype enctype,
+ 		    size_t inputlen, size_t *length);
+ 
+ krb5_error_code KRB5_CALLCONV
+     krb5_c_block_size
+     (krb5_context context, krb5_enctype enctype,
+ 		    size_t *blocksize);
+ 
+ krb5_error_code KRB5_CALLCONV
+ 	krb5_c_init_state
+ (krb5_context context,
+ const krb5_keyblock *key, krb5_keyusage usage,
+ krb5_data *new_state);
+ 
+ krb5_error_code KRB5_CALLCONV
+ 	krb5_c_free_state
+ (krb5_context context, const krb5_keyblock *key, krb5_data *state);
+ 
+ krb5_error_code KRB5_CALLCONV
+     krb5_c_prf (krb5_context, const krb5_keyblock *,
+ 		krb5_data *in, krb5_data *out);
+ 
+ krb5_error_code KRB5_CALLCONV
+     krb5_c_prf_length (krb5_context, krb5_enctype, size_t *outlen);
+ 
+ krb5_error_code KRB5_CALLCONV
+     krb5_c_make_random_key
+     (krb5_context context, krb5_enctype enctype,
+ 		    krb5_keyblock *k5_random_key);
+ 
+ /* Register a new entropy sample  with the PRNG. may cause
+ * the PRNG to be reseeded, although this is not guaranteed.  See previous randsource definitions
+ * for information on how each source should be used.
+ */
+ krb5_error_code KRB5_CALLCONV
+ 	krb5_c_random_add_entropy
+ (krb5_context context, unsigned int  randsource_id, const krb5_data *data);
+ 
+ 
+ krb5_error_code KRB5_CALLCONV
+     krb5_c_random_make_octets
+     (krb5_context context, krb5_data *data);
+ 
+ /*
+ * Collect entropy from the OS if possible. strong requests that as strong 
+ * of a source of entropy  as available be used.  Setting strong may 
+ * increase the probability of blocking and should not  be used for normal 
+ * applications.  Good uses include seeding the PRNG for kadmind
+ * and realm setup.
+ * If successful is non-null, then successful is set to 1 if the OS provided
+ * entropy else zero.
+ */
+ krb5_error_code KRB5_CALLCONV
+ krb5_c_random_os_entropy
+ (krb5_context context, int strong, int *success);
+ 
+ /*deprecated*/ krb5_error_code KRB5_CALLCONV
+     krb5_c_random_seed
+     (krb5_context context, krb5_data *data);
+ 
+ krb5_error_code KRB5_CALLCONV
+     krb5_c_string_to_key
+     (krb5_context context, krb5_enctype enctype,
+ 		    const krb5_data *string, const krb5_data *salt,
+ 		    krb5_keyblock *key);
+ krb5_error_code KRB5_CALLCONV
+ krb5_c_string_to_key_with_params(krb5_context context,
+ 				 krb5_enctype enctype,
+ 				 const krb5_data *string,
+ 				 const krb5_data *salt,
+ 				 const krb5_data *params,
+ 				 krb5_keyblock *key);
+ 
+ krb5_error_code KRB5_CALLCONV
+     krb5_c_enctype_compare
+     (krb5_context context, krb5_enctype e1, krb5_enctype e2,
+ 		    krb5_boolean *similar);
+ 
+ krb5_error_code KRB5_CALLCONV
+     krb5_c_make_checksum
+     (krb5_context context, krb5_cksumtype cksumtype,
+ 		    const krb5_keyblock *key, krb5_keyusage usage,
+ 		    const krb5_data *input, krb5_checksum *cksum);
+     
+ krb5_error_code KRB5_CALLCONV
+     krb5_c_verify_checksum
+     (krb5_context context, 
+ 		    const krb5_keyblock *key, krb5_keyusage usage,
+ 		    const krb5_data *data,
+ 		    const krb5_checksum *cksum,
+ 		    krb5_boolean *valid);
+     
+ krb5_error_code KRB5_CALLCONV
+     krb5_c_checksum_length
+     (krb5_context context, krb5_cksumtype cksumtype,
+ 		    size_t *length);
+ 
+ krb5_error_code KRB5_CALLCONV
+     krb5_c_keyed_checksum_types
+     (krb5_context context, krb5_enctype enctype, 
+ 		    unsigned int *count, krb5_cksumtype **cksumtypes);
+ 
+ #define KRB5_KEYUSAGE_AS_REQ_PA_ENC_TS		1
+ #define KRB5_KEYUSAGE_KDC_REP_TICKET		2
+ #define KRB5_KEYUSAGE_AS_REP_ENCPART		3
+ #define KRB5_KEYUSAGE_TGS_REQ_AD_SESSKEY	4
+ #define KRB5_KEYUSAGE_TGS_REQ_AD_SUBKEY		5
+ #define KRB5_KEYUSAGE_TGS_REQ_AUTH_CKSUM	6
+ #define KRB5_KEYUSAGE_TGS_REQ_AUTH		7
+ #define KRB5_KEYUSAGE_TGS_REP_ENCPART_SESSKEY	8
+ #define KRB5_KEYUSAGE_TGS_REP_ENCPART_SUBKEY	9
+ #define KRB5_KEYUSAGE_AP_REQ_AUTH_CKSUM		10
+ #define KRB5_KEYUSAGE_AP_REQ_AUTH		11
+ #define KRB5_KEYUSAGE_AP_REP_ENCPART		12
+ #define KRB5_KEYUSAGE_KRB_PRIV_ENCPART		13
+ #define KRB5_KEYUSAGE_KRB_CRED_ENCPART		14
+ #define KRB5_KEYUSAGE_KRB_SAFE_CKSUM		15
+ #define KRB5_KEYUSAGE_APP_DATA_ENCRYPT		16
+ #define KRB5_KEYUSAGE_APP_DATA_CKSUM		17
+ #define KRB5_KEYUSAGE_KRB_ERROR_CKSUM		18
+ #define KRB5_KEYUSAGE_AD_KDCISSUED_CKSUM	19
+ #define KRB5_KEYUSAGE_AD_MTE			20
+ #define KRB5_KEYUSAGE_AD_ITE			21
+ 
+ /* XXX need to register these */
+ 
+ #define KRB5_KEYUSAGE_GSS_TOK_MIC		22
+ #define KRB5_KEYUSAGE_GSS_TOK_WRAP_INTEG	23
+ #define KRB5_KEYUSAGE_GSS_TOK_WRAP_PRIV		24
+ 
+ /* Defined in hardware preauth draft */
+ 
+ #define KRB5_KEYUSAGE_PA_SAM_CHALLENGE_CKSUM	25
+ #define KRB5_KEYUSAGE_PA_SAM_CHALLENGE_TRACKID	26
+ #define KRB5_KEYUSAGE_PA_SAM_RESPONSE		27
+ 
+ krb5_boolean KRB5_CALLCONV krb5_c_valid_enctype
+ 	(krb5_enctype ktype);
+ krb5_boolean KRB5_CALLCONV krb5_c_valid_cksumtype
+ 	(krb5_cksumtype ctype);
+ krb5_boolean KRB5_CALLCONV krb5_c_is_coll_proof_cksum
+ 	(krb5_cksumtype ctype);
+ krb5_boolean KRB5_CALLCONV krb5_c_is_keyed_cksum
+ 	(krb5_cksumtype ctype);
+ 
+ #if KRB5_PRIVATE
+ /* Use the above four instead.  */
+ krb5_boolean KRB5_CALLCONV valid_enctype
+ 	(krb5_enctype ktype);
+ krb5_boolean KRB5_CALLCONV valid_cksumtype
+ 	(krb5_cksumtype ctype);
+ krb5_boolean KRB5_CALLCONV is_coll_proof_cksum
+ 	(krb5_cksumtype ctype);
+ krb5_boolean KRB5_CALLCONV is_keyed_cksum
+ 	(krb5_cksumtype ctype);
+ #endif
+ 
+ #ifdef KRB5_OLD_CRYPTO
+ /*
+  * old cryptosystem routine prototypes.  These are now layered
+  * on top of the functions above.
+  */
+ krb5_error_code KRB5_CALLCONV krb5_encrypt
+ 	(krb5_context context,
+ 		krb5_const_pointer inptr,
+ 		krb5_pointer outptr,
+ 		size_t size,
+ 		krb5_encrypt_block * eblock,
+ 		krb5_pointer ivec);
+ krb5_error_code KRB5_CALLCONV krb5_decrypt
+ 	(krb5_context context,
+ 		krb5_const_pointer inptr,
+ 		krb5_pointer outptr,
+ 		size_t size,
+ 		krb5_encrypt_block * eblock,
+ 		krb5_pointer ivec);
+ krb5_error_code KRB5_CALLCONV krb5_process_key
+ 	(krb5_context context,
+ 		krb5_encrypt_block * eblock,
+ 		const krb5_keyblock * key);
+ krb5_error_code KRB5_CALLCONV krb5_finish_key
+ 	(krb5_context context,
+ 		krb5_encrypt_block * eblock);
+ krb5_error_code KRB5_CALLCONV krb5_string_to_key
+ 	(krb5_context context,
+ 		const krb5_encrypt_block * eblock,
+ 		krb5_keyblock * keyblock,
+ 		const krb5_data * data,
+ 		const krb5_data * salt);
+ krb5_error_code KRB5_CALLCONV krb5_init_random_key
+ 	(krb5_context context,
+ 		const krb5_encrypt_block * eblock,
+ 		const krb5_keyblock * keyblock,
+ 		krb5_pointer * ptr);
+ krb5_error_code KRB5_CALLCONV krb5_finish_random_key
+ 	(krb5_context context,
+ 		const krb5_encrypt_block * eblock,
+ 		krb5_pointer * ptr);
+ krb5_error_code KRB5_CALLCONV krb5_random_key
+ 	(krb5_context context,
+ 		const krb5_encrypt_block * eblock,
+ 		krb5_pointer ptr,
+ 		krb5_keyblock ** keyblock);
+ krb5_enctype KRB5_CALLCONV krb5_eblock_enctype
+ 	(krb5_context context,
+ 		const krb5_encrypt_block * eblock);
+ krb5_error_code KRB5_CALLCONV krb5_use_enctype
+ 	(krb5_context context,
+ 		krb5_encrypt_block * eblock,
+ 		krb5_enctype enctype);
+ size_t KRB5_CALLCONV krb5_encrypt_size
+ 	(size_t length,
+ 		krb5_enctype crypto);
+ size_t KRB5_CALLCONV krb5_checksum_size
+ 	(krb5_context context,
+ 		krb5_cksumtype ctype);
+ krb5_error_code KRB5_CALLCONV krb5_calculate_checksum
+ 	(krb5_context context,
+ 		krb5_cksumtype ctype,
+ 		krb5_const_pointer in, size_t in_length,
+ 		krb5_const_pointer seed, size_t seed_length,
+ 		krb5_checksum * outcksum);
+ krb5_error_code KRB5_CALLCONV krb5_verify_checksum
+ 	(krb5_context context,
+ 		krb5_cksumtype ctype,
+ 		const krb5_checksum * cksum,
+ 		krb5_const_pointer in, size_t in_length,
+ 		krb5_const_pointer seed, size_t seed_length);
+ 
+ #if KRB5_PRIVATE
+ krb5_error_code KRB5_CALLCONV krb5_random_confounder
+ 	(size_t, krb5_pointer);
+ 
+ krb5_error_code krb5_encrypt_data
+ 	(krb5_context context, krb5_keyblock *key, 
+ 		krb5_pointer ivec, krb5_data *data, 
+ 		krb5_enc_data *enc_data);
+ 
+ krb5_error_code krb5_decrypt_data
+ 	(krb5_context context, krb5_keyblock *key, 
+ 		krb5_pointer ivec, krb5_enc_data *data, 
+ 		krb5_data *enc_data);
+ #endif
+ 
+ #endif /* KRB5_OLD_CRYPTO */
+ 
+ /*
+  * end "encryption.h"
+  */
+ 
+ /*
+  * begin "fieldbits.h"
+  */
+ 
+ /* kdc_options for kdc_request */
+ /* options is 32 bits; each host is responsible to put the 4 bytes
+    representing these bits into net order before transmission */
+ /* #define	KDC_OPT_RESERVED	0x80000000 */
+ #define	KDC_OPT_FORWARDABLE		0x40000000
+ #define	KDC_OPT_FORWARDED		0x20000000
+ #define	KDC_OPT_PROXIABLE		0x10000000
+ #define	KDC_OPT_PROXY			0x08000000
+ #define	KDC_OPT_ALLOW_POSTDATE		0x04000000
+ #define	KDC_OPT_POSTDATED		0x02000000
+ /* #define	KDC_OPT_UNUSED		0x01000000 */
+ #define	KDC_OPT_RENEWABLE		0x00800000
+ /* #define	KDC_OPT_UNUSED		0x00400000 */
+ /* #define	KDC_OPT_RESERVED	0x00200000 */
+ /* #define	KDC_OPT_RESERVED	0x00100000 */
+ /* #define	KDC_OPT_RESERVED	0x00080000 */
+ /* #define	KDC_OPT_RESERVED	0x00040000 */
+ #define	KDC_OPT_REQUEST_ANONYMOUS	0x00020000
+ /* #define	KDC_OPT_RESERVED	0x00010000 */
+ /* #define	KDC_OPT_RESERVED	0x00008000 */
+ /* #define	KDC_OPT_RESERVED	0x00004000 */
+ /* #define	KDC_OPT_RESERVED	0x00002000 */
+ /* #define	KDC_OPT_RESERVED	0x00001000 */
+ /* #define	KDC_OPT_RESERVED	0x00000800 */
+ /* #define	KDC_OPT_RESERVED	0x00000400 */
+ /* #define	KDC_OPT_RESERVED	0x00000200 */
+ /* #define	KDC_OPT_RESERVED	0x00000100 */
+ /* #define	KDC_OPT_RESERVED	0x00000080 */
+ /* #define	KDC_OPT_RESERVED	0x00000040 */
+ #define	KDC_OPT_DISABLE_TRANSITED_CHECK	0x00000020
+ #define	KDC_OPT_RENEWABLE_OK		0x00000010
+ #define	KDC_OPT_ENC_TKT_IN_SKEY		0x00000008
+ /* #define	KDC_OPT_UNUSED		0x00000004 */
+ #define	KDC_OPT_RENEW			0x00000002
+ #define	KDC_OPT_VALIDATE		0x00000001
+ 
+ /*
+  * Mask of ticket flags in the TGT which should be converted into KDC
+  * options when using the TGT to get derivitive tickets.
+  * 
+  *  New mask = KDC_OPT_FORWARDABLE | KDC_OPT_PROXIABLE |
+  *	       KDC_OPT_ALLOW_POSTDATE | KDC_OPT_RENEWABLE
+  */
+ #define KDC_TKT_COMMON_MASK		0x54800000
+ 
+ /* definitions for ap_options fields */
+ /* ap_options are 32 bits; each host is responsible to put the 4 bytes
+    representing these bits into net order before transmission */
+ #define	AP_OPTS_RESERVED		0x80000000
+ #define	AP_OPTS_USE_SESSION_KEY		0x40000000
+ #define	AP_OPTS_MUTUAL_REQUIRED		0x20000000
+ /* #define	AP_OPTS_RESERVED	0x10000000 */
+ /* #define	AP_OPTS_RESERVED	0x08000000 */
+ /* #define	AP_OPTS_RESERVED	0x04000000 */
+ /* #define	AP_OPTS_RESERVED	0x02000000 */
+ /* #define	AP_OPTS_RESERVED	0x01000000 */
+ /* #define	AP_OPTS_RESERVED	0x00800000 */
+ /* #define	AP_OPTS_RESERVED	0x00400000 */
+ /* #define	AP_OPTS_RESERVED	0x00200000 */
+ /* #define	AP_OPTS_RESERVED	0x00100000 */
+ /* #define	AP_OPTS_RESERVED	0x00080000 */
+ /* #define	AP_OPTS_RESERVED	0x00040000 */
+ /* #define	AP_OPTS_RESERVED	0x00020000 */
+ /* #define	AP_OPTS_RESERVED	0x00010000 */
+ /* #define	AP_OPTS_RESERVED	0x00008000 */
+ /* #define	AP_OPTS_RESERVED	0x00004000 */
+ /* #define	AP_OPTS_RESERVED	0x00002000 */
+ /* #define	AP_OPTS_RESERVED	0x00001000 */
+ /* #define	AP_OPTS_RESERVED	0x00000800 */
+ /* #define	AP_OPTS_RESERVED	0x00000400 */
+ /* #define	AP_OPTS_RESERVED	0x00000200 */
+ /* #define	AP_OPTS_RESERVED	0x00000100 */
+ /* #define	AP_OPTS_RESERVED	0x00000080 */
+ /* #define	AP_OPTS_RESERVED	0x00000040 */
+ /* #define	AP_OPTS_RESERVED	0x00000020 */
+ /* #define	AP_OPTS_RESERVED	0x00000010 */
+ /* #define	AP_OPTS_RESERVED	0x00000008 */
+ /* #define	AP_OPTS_RESERVED	0x00000004 */
+ /* #define	AP_OPTS_RESERVED	0x00000002 */
+ #define AP_OPTS_USE_SUBKEY	0x00000001
+ 
+ #define AP_OPTS_WIRE_MASK	0xfffffff0
+ 
+ /* definitions for ad_type fields. */
+ #define	AD_TYPE_RESERVED	0x8000
+ #define	AD_TYPE_EXTERNAL	0x4000
+ #define	AD_TYPE_REGISTERED	0x2000
+ 
+ #define AD_TYPE_FIELD_TYPE_MASK	0x1fff
+ 
+ /* Ticket flags */
+ /* flags are 32 bits; each host is responsible to put the 4 bytes
+    representing these bits into net order before transmission */
+ /* #define	TKT_FLG_RESERVED	0x80000000 */
+ #define	TKT_FLG_FORWARDABLE		0x40000000
+ #define	TKT_FLG_FORWARDED		0x20000000
+ #define	TKT_FLG_PROXIABLE		0x10000000
+ #define	TKT_FLG_PROXY			0x08000000
+ #define	TKT_FLG_MAY_POSTDATE		0x04000000
+ #define	TKT_FLG_POSTDATED		0x02000000
+ #define	TKT_FLG_INVALID			0x01000000
+ #define	TKT_FLG_RENEWABLE		0x00800000
+ #define	TKT_FLG_INITIAL			0x00400000
+ #define	TKT_FLG_PRE_AUTH		0x00200000
+ #define	TKT_FLG_HW_AUTH			0x00100000
+ #define	TKT_FLG_TRANSIT_POLICY_CHECKED	0x00080000
+ #define	TKT_FLG_OK_AS_DELEGATE		0x00040000
+ #define	TKT_FLG_ANONYMOUS		0x00020000
+ /* #define	TKT_FLG_RESERVED	0x00010000 */
+ /* #define	TKT_FLG_RESERVED	0x00008000 */
+ /* #define	TKT_FLG_RESERVED	0x00004000 */
+ /* #define	TKT_FLG_RESERVED	0x00002000 */
+ /* #define	TKT_FLG_RESERVED	0x00001000 */
+ /* #define	TKT_FLG_RESERVED	0x00000800 */
+ /* #define	TKT_FLG_RESERVED	0x00000400 */
+ /* #define	TKT_FLG_RESERVED	0x00000200 */
+ /* #define	TKT_FLG_RESERVED	0x00000100 */
+ /* #define	TKT_FLG_RESERVED	0x00000080 */
+ /* #define	TKT_FLG_RESERVED	0x00000040 */
+ /* #define	TKT_FLG_RESERVED	0x00000020 */
+ /* #define	TKT_FLG_RESERVED	0x00000010 */
+ /* #define	TKT_FLG_RESERVED	0x00000008 */
+ /* #define	TKT_FLG_RESERVED	0x00000004 */
+ /* #define	TKT_FLG_RESERVED	0x00000002 */
+ /* #define	TKT_FLG_RESERVED	0x00000001 */
+ 
+ /* definitions for lr_type fields. */
+ #define	LR_TYPE_THIS_SERVER_ONLY	0x8000
+ 
+ #define LR_TYPE_INTERPRETATION_MASK	0x7fff
+ 
+ /* definitions for ad_type fields. */
+ #define	AD_TYPE_EXTERNAL	0x4000
+ #define	AD_TYPE_REGISTERED	0x2000
+ 
+ #define AD_TYPE_FIELD_TYPE_MASK	0x1fff
+ #define AD_TYPE_INTERNAL_MASK	0x3fff
+ 
+ /* definitions for msec direction bit for KRB_SAFE, KRB_PRIV */
+ #define	MSEC_DIRBIT		0x8000
+ #define	MSEC_VAL_MASK		0x7fff
+ 
+ /*
+  * end "fieldbits.h"
+  */
+ 
+ /*
+  * begin "proto.h"
+  */
+ 
+ /* Protocol version number */
+ #define	KRB5_PVNO	5
+ 
+ /* Message types */
+ 
+ #define	KRB5_AS_REQ	((krb5_msgtype)10) /* Req for initial authentication */
+ #define	KRB5_AS_REP	((krb5_msgtype)11) /* Response to KRB_AS_REQ request */
+ #define	KRB5_TGS_REQ	((krb5_msgtype)12) /* TGS request to server */
+ #define	KRB5_TGS_REP	((krb5_msgtype)13) /* Response to KRB_TGS_REQ req */
+ #define	KRB5_AP_REQ	((krb5_msgtype)14) /* application request to server */
+ #define	KRB5_AP_REP	((krb5_msgtype)15) /* Response to KRB_AP_REQ_MUTUAL */
+ #define	KRB5_SAFE	((krb5_msgtype)20) /* Safe application message */
+ #define	KRB5_PRIV	((krb5_msgtype)21) /* Private application message */
+ #define	KRB5_CRED	((krb5_msgtype)22) /* Credential forwarding message */
+ #define	KRB5_ERROR	((krb5_msgtype)30) /* Error response */
+ 
+ /* LastReq types */
+ #define KRB5_LRQ_NONE			0
+ #define KRB5_LRQ_ALL_LAST_TGT		1
+ #define KRB5_LRQ_ONE_LAST_TGT		(-1)
+ #define KRB5_LRQ_ALL_LAST_INITIAL	2
+ #define KRB5_LRQ_ONE_LAST_INITIAL	(-2)
+ #define KRB5_LRQ_ALL_LAST_TGT_ISSUED	3
+ #define KRB5_LRQ_ONE_LAST_TGT_ISSUED	(-3)
+ #define KRB5_LRQ_ALL_LAST_RENEWAL	4
+ #define KRB5_LRQ_ONE_LAST_RENEWAL	(-4)
+ #define KRB5_LRQ_ALL_LAST_REQ		5
+ #define KRB5_LRQ_ONE_LAST_REQ		(-5)
+ #define KRB5_LRQ_ALL_PW_EXPTIME		6
+ #define KRB5_LRQ_ONE_PW_EXPTIME		(-6)
+ 
+ /* PADATA types */
+ #define KRB5_PADATA_NONE		0
+ #define	KRB5_PADATA_AP_REQ		1
+ #define	KRB5_PADATA_TGS_REQ		KRB5_PADATA_AP_REQ
+ #define KRB5_PADATA_ENC_TIMESTAMP	2
+ #define	KRB5_PADATA_PW_SALT		3
+ #if 0				/* Not used */
+ #define KRB5_PADATA_ENC_ENCKEY		4  /* Key encrypted within itself */
+ #endif
+ #define KRB5_PADATA_ENC_UNIX_TIME	5  /* timestamp encrypted in key */
+ #define KRB5_PADATA_ENC_SANDIA_SECURID	6  /* SecurId passcode */
+ #define KRB5_PADATA_SESAME		7  /* Sesame project */
+ #define KRB5_PADATA_OSF_DCE		8  /* OSF DCE */
+ #define KRB5_CYBERSAFE_SECUREID		9  /* Cybersafe */
+ #define	KRB5_PADATA_AFS3_SALT		10 /* Cygnus */
+ #define KRB5_PADATA_ETYPE_INFO		11 /* Etype info for preauth */
+ #define KRB5_PADATA_SAM_CHALLENGE	12 /* draft challenge system */
+ #define KRB5_PADATA_SAM_RESPONSE	13 /* draft challenge system response */
+ #define KRB5_PADATA_PK_AS_REQ		14 /* PKINIT */
+ #define KRB5_PADATA_PK_AS_REP		15 /* PKINIT */
+ #define KRB5_PADATA_ETYPE_INFO2 19
+ #define KRB5_PADATA_SAM_CHALLENGE_2	30 /* draft challenge system, updated */
+ #define KRB5_PADATA_SAM_RESPONSE_2	31 /* draft challenge system, updated */
+     
+ #define	KRB5_SAM_USE_SAD_AS_KEY		0x80000000
+ #define	KRB5_SAM_SEND_ENCRYPTED_SAD	0x40000000
+ #define	KRB5_SAM_MUST_PK_ENCRYPT_SAD	0x20000000 /* currently must be zero */
+ 
+ /* Reserved for SPX pre-authentication. */
+ #define KRB5_PADATA_DASS		16
+ 
+ /* Transited encoding types */
+ #define	KRB5_DOMAIN_X500_COMPRESS	1
+ 
+ /* alternate authentication types */
+ #define	KRB5_ALTAUTH_ATT_CHALLENGE_RESPONSE	64
+ 
+ /* authorization data types */
+ #define	KRB5_AUTHDATA_OSF_DCE	64
+ #define KRB5_AUTHDATA_SESAME	65
+ 
+ /* password change constants */
+ 
+ #define KRB5_KPASSWD_SUCCESS		0
+ #define KRB5_KPASSWD_MALFORMED		1
+ #define KRB5_KPASSWD_HARDERROR		2
+ #define KRB5_KPASSWD_AUTHERROR		3
+ #define KRB5_KPASSWD_SOFTERROR		4
+ /* These are Microsoft's extensions in RFC 3244, and it looks like
+    they'll become standardized, possibly with other additions.  */
+ #define KRB5_KPASSWD_ACCESSDENIED	5	/* unused */
+ #define KRB5_KPASSWD_BAD_VERSION	6
+ #define KRB5_KPASSWD_INITIAL_FLAG_NEEDED 7	/* unused */
+ 
+ /*
+  * end "proto.h"
+  */
+ 
+ /* Time set */
+ typedef struct _krb5_ticket_times {
+     krb5_timestamp authtime; /* XXX ? should ktime in KDC_REP == authtime
+ 				in ticket? otherwise client can't get this */ 
+     krb5_timestamp starttime;		/* optional in ticket, if not present,
+ 					   use authtime */
+     krb5_timestamp endtime;
+     krb5_timestamp renew_till;
+ } krb5_ticket_times;
+ 
+ /* structure for auth data */
+ typedef struct _krb5_authdata {
+     krb5_magic magic;
+     krb5_authdatatype ad_type;
+     unsigned int length;
+     krb5_octet *contents;
+ } krb5_authdata;
+ 
+ /* structure for transited encoding */
+ typedef struct _krb5_transited {
+     krb5_magic magic;
+     krb5_octet tr_type;
+     krb5_data tr_contents;
+ } krb5_transited;
+ 
+ typedef struct _krb5_enc_tkt_part {
+     krb5_magic magic;
+     /* to-be-encrypted portion */
+     krb5_flags flags;			/* flags */
+     krb5_keyblock *session;		/* session key: includes enctype */
+     krb5_principal client;		/* client name/realm */
+     krb5_transited transited;		/* list of transited realms */
+     krb5_ticket_times times;		/* auth, start, end, renew_till */
+     krb5_address **caddrs;	/* array of ptrs to addresses */
+     krb5_authdata **authorization_data; /* auth data */
+ } krb5_enc_tkt_part;
+ 
+ typedef struct _krb5_ticket {
+     krb5_magic magic;
+     /* cleartext portion */
+     krb5_principal server;		/* server name/realm */
+     krb5_enc_data enc_part;		/* encryption type, kvno, encrypted
+ 					   encoding */
+     krb5_enc_tkt_part *enc_part2;	/* ptr to decrypted version, if
+ 					   available */
+ } krb5_ticket;
+ 
+ /* the unencrypted version */
+ typedef struct _krb5_authenticator {
+     krb5_magic magic;
+     krb5_principal client;		/* client name/realm */
+     krb5_checksum *checksum;	/* checksum, includes type, optional */
+     krb5_int32 cusec;			/* client usec portion */
+     krb5_timestamp ctime;		/* client sec portion */
+     krb5_keyblock *subkey;		/* true session key, optional */
+     krb5_ui_4 seq_number;		/* sequence #, optional */
+     krb5_authdata **authorization_data; /* New add by Ari, auth data */
+ } krb5_authenticator;
+ 
+ typedef struct _krb5_tkt_authent {
+     krb5_magic magic;
+     krb5_ticket *ticket;
+     krb5_authenticator *authenticator;
+     krb5_flags ap_options;
+ } krb5_tkt_authent;
+ 
+ /* credentials:	 Ticket, session key, etc. */
+ typedef struct _krb5_creds {
+     krb5_magic magic;
+     krb5_principal client;		/* client's principal identifier */
+     krb5_principal server;		/* server's principal identifier */
+     krb5_keyblock keyblock;		/* session encryption key info */
+     krb5_ticket_times times;		/* lifetime info */
+     krb5_boolean is_skey;		/* true if ticket is encrypted in
+ 					   another ticket's skey */
+     krb5_flags ticket_flags;		/* flags in ticket */
+     krb5_address **addresses;	/* addrs in ticket */
+     krb5_data ticket;			/* ticket string itself */
+     krb5_data second_ticket;		/* second ticket, if related to
+ 					   ticket (via DUPLICATE-SKEY or
+ 					   ENC-TKT-IN-SKEY) */
+     krb5_authdata **authdata;	/* authorization data */
+ } krb5_creds;
+ 
+ /* Last request fields */
+ typedef struct _krb5_last_req_entry {
+     krb5_magic magic;
+     krb5_int32 lr_type;
+     krb5_timestamp value;
+ } krb5_last_req_entry;
+ 
+ /* pre-authentication data */
+ typedef struct _krb5_pa_data {
+     krb5_magic magic;
+     krb5_preauthtype  pa_type;
+     unsigned int length;
+     krb5_octet *contents;
+ } krb5_pa_data;
+ 
+ typedef struct _krb5_kdc_req {
+     krb5_magic magic;
+     krb5_msgtype msg_type;		/* AS_REQ or TGS_REQ? */
+     krb5_pa_data **padata;	/* e.g. encoded AP_REQ */
+     /* real body */
+     krb5_flags kdc_options;		/* requested options */
+     krb5_principal client;		/* includes realm; optional */
+     krb5_principal server;		/* includes realm (only used if no
+ 					   client) */
+     krb5_timestamp from;		/* requested starttime */
+     krb5_timestamp till;		/* requested endtime */
+     krb5_timestamp rtime;		/* (optional) requested renew_till */
+     krb5_int32 nonce;			/* nonce to match request/response */
+     int nktypes;			/* # of ktypes, must be positive */
+     krb5_enctype *ktype;		/* requested enctype(s) */
+     krb5_address **addresses;	/* requested addresses, optional */
+     krb5_enc_data authorization_data;	/* encrypted auth data; OPTIONAL */
+     krb5_authdata **unenc_authdata; /* unencrypted auth data,
+ 					   if available */
+     krb5_ticket **second_ticket;/* second ticket array; OPTIONAL */
+ } krb5_kdc_req;
+ 
+ typedef struct _krb5_enc_kdc_rep_part {
+     krb5_magic magic;
+     /* encrypted part: */
+     krb5_msgtype msg_type;		/* krb5 message type */
+     krb5_keyblock *session;		/* session key */
+     krb5_last_req_entry **last_req; /* array of ptrs to entries */
+     krb5_int32 nonce;			/* nonce from request */
+     krb5_timestamp key_exp;		/* expiration date */
+     krb5_flags flags;			/* ticket flags */
+     krb5_ticket_times times;		/* lifetime info */
+     krb5_principal server;		/* server's principal identifier */
+     krb5_address **caddrs;	/* array of ptrs to addresses,
+ 					   optional */
+ } krb5_enc_kdc_rep_part;
+ 
+ typedef struct _krb5_kdc_rep {
+     krb5_magic magic;
+     /* cleartext part: */
+     krb5_msgtype msg_type;		/* AS_REP or KDC_REP? */
+     krb5_pa_data **padata;	/* preauthentication data from KDC */
+     krb5_principal client;		/* client's principal identifier */
+     krb5_ticket *ticket;		/* ticket */
+     krb5_enc_data enc_part;		/* encryption type, kvno, encrypted
+ 					   encoding */
+     krb5_enc_kdc_rep_part *enc_part2;/* unencrypted version, if available */
+ } krb5_kdc_rep;
+ 
+ /* error message structure */
+ typedef struct _krb5_error {
+     krb5_magic magic;
+     /* some of these may be meaningless in certain contexts */
+     krb5_timestamp ctime;		/* client sec portion; optional */
+     krb5_int32 cusec;			/* client usec portion; optional */
+     krb5_int32 susec;			/* server usec portion */
+     krb5_timestamp stime;		/* server sec portion */
+     krb5_ui_4 error;			/* error code (protocol error #'s) */
+     krb5_principal client;		/* client's principal identifier;
+ 					   optional */
+     krb5_principal server;		/* server's principal identifier */
+     krb5_data text;			/* descriptive text */
+     krb5_data e_data;			/* additional error-describing data */
+ } krb5_error;
+ 
+ typedef struct _krb5_ap_req {
+     krb5_magic magic;
+     krb5_flags ap_options;		/* requested options */
+     krb5_ticket *ticket;		/* ticket */
+     krb5_enc_data authenticator;	/* authenticator (already encrypted) */
+ } krb5_ap_req;
+ 
+ typedef struct _krb5_ap_rep {
+     krb5_magic magic;
+     krb5_enc_data enc_part;
+ } krb5_ap_rep;
+ 
+ typedef struct _krb5_ap_rep_enc_part {
+     krb5_magic magic;
+     krb5_timestamp ctime;		/* client time, seconds portion */
+     krb5_int32 cusec;			/* client time, microseconds portion */
+     krb5_keyblock *subkey;		/* true session key, optional */
+     krb5_ui_4 seq_number;		/* sequence #, optional */
+ } krb5_ap_rep_enc_part;
+ 
+ typedef struct _krb5_response {
+     krb5_magic magic;
+     krb5_octet message_type;
+     krb5_data response;
+     krb5_int32 expected_nonce;	/* The expected nonce for KDC_REP messages */
+     krb5_timestamp request_time;   /* When we made the request */
+ } krb5_response;
+ 
+ typedef struct _krb5_cred_info {
+     krb5_magic magic;
+     krb5_keyblock *session;		/* session key used to encrypt */
+ 					/* ticket */
+     krb5_principal client;		/* client name/realm, optional */
+     krb5_principal server;		/* server name/realm, optional */
+     krb5_flags flags;			/* ticket flags, optional */
+     krb5_ticket_times times;		/* auth, start, end, renew_till, */
+ 					/* optional */
+     krb5_address **caddrs;	/* array of ptrs to addresses */
+ } krb5_cred_info;
+ 
+ typedef struct _krb5_cred_enc_part {
+     krb5_magic magic;
+     krb5_int32 nonce;			/* nonce, optional */
+     krb5_timestamp timestamp;		/* client time */
+     krb5_int32 usec;			/* microsecond portion of time */
+     krb5_address *s_address;	/* sender address, optional */
+     krb5_address *r_address;	/* recipient address, optional */
+     krb5_cred_info **ticket_info;
+ } krb5_cred_enc_part;	 
+ 
+ typedef struct _krb5_cred {
+     krb5_magic magic;
+     krb5_ticket **tickets;	/* tickets */
+     krb5_enc_data enc_part;		/* encrypted part */
+     krb5_cred_enc_part *enc_part2;	/* unencrypted version, if available*/
+ } krb5_cred;
+ 
+ /* Sandia password generation structures */
+ typedef struct _passwd_phrase_element {
+     krb5_magic magic;
+     krb5_data *passwd;
+     krb5_data *phrase;
+ } passwd_phrase_element;
+ 
+ typedef struct _krb5_pwd_data {
+     krb5_magic magic;
+     int sequence_count;
+     passwd_phrase_element **element;
+ } krb5_pwd_data;
+ 
+ /* these need to be here so the typedefs are available for the prototypes */
+ 
+ /*
+  * begin "safepriv.h"
+  */
+ 
+ #define KRB5_AUTH_CONTEXT_DO_TIME	0x00000001
+ #define KRB5_AUTH_CONTEXT_RET_TIME	0x00000002
+ #define KRB5_AUTH_CONTEXT_DO_SEQUENCE	0x00000004
+ #define KRB5_AUTH_CONTEXT_RET_SEQUENCE	0x00000008
+ #define KRB5_AUTH_CONTEXT_PERMIT_ALL	0x00000010
+ #define KRB5_AUTH_CONTEXT_USE_SUBKEY	0x00000020
+  
+ typedef struct krb5_replay_data { 
+     krb5_timestamp	timestamp; 
+     krb5_int32		usec;
+     krb5_ui_4		seq; 
+ } krb5_replay_data;
+ 
+ /* flags for krb5_auth_con_genaddrs() */
+ #define KRB5_AUTH_CONTEXT_GENERATE_LOCAL_ADDR		0x00000001
+ #define KRB5_AUTH_CONTEXT_GENERATE_REMOTE_ADDR		0x00000002
+ #define KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR	0x00000004
+ #define KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR	0x00000008
+ 
+ /* type of function used as a callback to generate checksum data for
+  * mk_req */
+ 
+ typedef krb5_error_code 
+ (KRB5_CALLCONV * krb5_mk_req_checksum_func) (krb5_context, krb5_auth_context , void *,
+ 			       krb5_data **);
+ 
+ /*
+  * end "safepriv.h"
+  */
+ 
+ 
+ /*
+  * begin "ccache.h"
+  */
+ 
+ typedef	krb5_pointer	krb5_cc_cursor;	/* cursor for sequential lookup */
+ 
+ struct _krb5_ccache;
+ typedef struct _krb5_ccache *krb5_ccache;
+ struct _krb5_cc_ops;
+ typedef struct _krb5_cc_ops krb5_cc_ops;
+ 
+ /* for retrieve_cred */
+ #define	KRB5_TC_MATCH_TIMES		0x00000001
+ #define	KRB5_TC_MATCH_IS_SKEY		0x00000002
+ #define	KRB5_TC_MATCH_FLAGS		0x00000004
+ #define	KRB5_TC_MATCH_TIMES_EXACT	0x00000008
+ #define	KRB5_TC_MATCH_FLAGS_EXACT	0x00000010
+ #define	KRB5_TC_MATCH_AUTHDATA		0x00000020
+ #define	KRB5_TC_MATCH_SRV_NAMEONLY	0x00000040
+ #define	KRB5_TC_MATCH_2ND_TKT		0x00000080
+ #define	KRB5_TC_MATCH_KTYPE		0x00000100
+ #define KRB5_TC_SUPPORTED_KTYPES	0x00000200
+ 
+ /* for set_flags and other functions */
+ #define KRB5_TC_OPENCLOSE		0x00000001
+ #define KRB5_TC_NOTICKET                0x00000002
+ 
+ const char * KRB5_CALLCONV
+ krb5_cc_get_name (krb5_context context, krb5_ccache cache);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_cc_gen_new (krb5_context context, krb5_ccache *cache);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_cc_initialize(krb5_context context, krb5_ccache cache,
+ 		   krb5_principal principal);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_cc_destroy (krb5_context context, krb5_ccache cache);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_cc_close (krb5_context context, krb5_ccache cache);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_cc_store_cred (krb5_context context, krb5_ccache cache,
+ 		    krb5_creds *creds);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_cc_retrieve_cred (krb5_context context, krb5_ccache cache,
+ 		       krb5_flags flags, krb5_creds *mcreds,
+ 		       krb5_creds *creds);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_cc_get_principal (krb5_context context, krb5_ccache cache,
+ 		       krb5_principal *principal);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_cc_start_seq_get (krb5_context context, krb5_ccache cache,
+ 		       krb5_cc_cursor *cursor);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_cc_next_cred (krb5_context context, krb5_ccache cache,
+ 		   krb5_cc_cursor *cursor, krb5_creds *creds);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_cc_end_seq_get (krb5_context context, krb5_ccache cache,
+ 		     krb5_cc_cursor *cursor);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_cc_remove_cred (krb5_context context, krb5_ccache cache, krb5_flags flags,
+ 		     krb5_creds *creds);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_cc_set_flags (krb5_context context, krb5_ccache cache, krb5_flags flags);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_cc_get_flags (krb5_context context, krb5_ccache cache, krb5_flags *flags);
+ 
+ const char * KRB5_CALLCONV
+ krb5_cc_get_type (krb5_context context, krb5_ccache cache);
+ 
+ /*
+  * end "ccache.h"
+  */
+ 
+ /*
+  * begin "rcache.h"
+  */
+ 
+ struct krb5_rc_st;
+ typedef struct krb5_rc_st *krb5_rcache;
+ 
+ /*
+  * end "rcache.h"
+  */
+ 
+ /*
+  * begin "keytab.h"
+  */
+ 
+ 
+ /* XXX */
+ #define MAX_KEYTAB_NAME_LEN 1100 /* Long enough for MAXPATHLEN + some extra */
+ 
+ typedef krb5_pointer krb5_kt_cursor;	/* XXX */
+ 
+ typedef struct krb5_keytab_entry_st {
+     krb5_magic magic;
+     krb5_principal principal;	/* principal of this key */
+     krb5_timestamp timestamp;	/* time entry written to keytable */
+     krb5_kvno vno;		/* key version number */
+     krb5_keyblock key;		/* the secret key */
+ } krb5_keytab_entry;
+ 
+ #if KRB5_PRIVATE
+ struct _krb5_kt_ops;
+ typedef struct _krb5_kt {	/* should move into k5-int.h */
+     krb5_magic magic;
+     const struct _krb5_kt_ops *ops;
+     krb5_pointer data;
+ } *krb5_keytab;
+ #else
+ struct _krb5_kt;
+ typedef struct _krb5_kt *krb5_keytab;
+ #endif
+ 
+ char * KRB5_CALLCONV
+ krb5_kt_get_type (krb5_context, krb5_keytab keytab);
+ krb5_error_code KRB5_CALLCONV
+ krb5_kt_get_name(krb5_context context, krb5_keytab keytab, char *name,
+ 		 unsigned int namelen);
+ krb5_error_code KRB5_CALLCONV
+ krb5_kt_close(krb5_context context, krb5_keytab keytab);
+ krb5_error_code KRB5_CALLCONV
+ krb5_kt_get_entry(krb5_context context, krb5_keytab keytab,
+ 		  krb5_const_principal principal, krb5_kvno vno,
+ 		  krb5_enctype enctype, krb5_keytab_entry *entry);
+ krb5_error_code KRB5_CALLCONV
+ krb5_kt_start_seq_get(krb5_context context, krb5_keytab keytab,
+ 		      krb5_kt_cursor *cursor);
+ krb5_error_code KRB5_CALLCONV
+ krb5_kt_next_entry(krb5_context context, krb5_keytab keytab,
+ 		   krb5_keytab_entry *entry, krb5_kt_cursor *cursor);
+ krb5_error_code KRB5_CALLCONV
+ krb5_kt_end_seq_get(krb5_context context, krb5_keytab keytab,
+ 		    krb5_kt_cursor *cursor);
+ 
+ /*
+  * end "keytab.h"
+  */
+ 
+ /*
+  * begin "func-proto.h"
+  */
+ 
+ krb5_error_code KRB5_CALLCONV krb5_init_context
+ 	(krb5_context *);
+ krb5_error_code KRB5_CALLCONV krb5_init_secure_context
+ 	(krb5_context *);
+ void KRB5_CALLCONV krb5_free_context
+ 	(krb5_context);
+ krb5_error_code KRB5_CALLCONV krb5_copy_context
+ 	(krb5_context, krb5_context *);
+ 
+ #if KRB5_PRIVATE
+ krb5_error_code krb5_set_default_in_tkt_ktypes
+ 	(krb5_context,
+ 		const krb5_enctype *);
+ krb5_error_code krb5_get_default_in_tkt_ktypes
+ 	(krb5_context,
+ 		krb5_enctype **);
+ 
+ krb5_error_code krb5_set_default_tgs_ktypes
+ 	(krb5_context,
+ 		const krb5_enctype *);
+ #endif
+ 
+ krb5_error_code KRB5_CALLCONV 
+ krb5_set_default_tgs_enctypes
+ 	(krb5_context,
+ 		const krb5_enctype *);
+ #if KRB5_PRIVATE
+ krb5_error_code KRB5_CALLCONV krb5_get_tgs_ktypes
+ 	(krb5_context,
+ 		krb5_const_principal,
+ 		krb5_enctype **);
+ #endif
+ 
+ krb5_error_code KRB5_CALLCONV krb5_get_permitted_enctypes
+ 	(krb5_context, krb5_enctype **);
+ 
+ #if KRB5_PRIVATE
+ void KRB5_CALLCONV krb5_free_ktypes
+ 	(krb5_context, krb5_enctype *);
+ 
+ krb5_boolean krb5_is_permitted_enctype
+ 	(krb5_context, krb5_enctype);
+ #endif
+ 
+ krb5_boolean KRB5_CALLCONV krb5_is_thread_safe(void);
+ 
+ /* libkrb.spec */
+ #if KRB5_PRIVATE
+ krb5_error_code krb5_kdc_rep_decrypt_proc
+ 	(krb5_context,
+ 		const krb5_keyblock *,
+ 		krb5_const_pointer,
+ 		krb5_kdc_rep * );
+ krb5_error_code KRB5_CALLCONV krb5_decrypt_tkt_part
+ 	(krb5_context,
+ 		const krb5_keyblock *,
+ 		krb5_ticket * );
+ krb5_error_code krb5_get_cred_from_kdc
+ 	(krb5_context,
+ 		krb5_ccache,		/* not const, as reading may save
+ 					   state */
+ 		krb5_creds *,
+ 		krb5_creds **,
+ 		krb5_creds *** );
+ krb5_error_code krb5_get_cred_from_kdc_validate
+ 	(krb5_context,
+ 		krb5_ccache,		/* not const, as reading may save
+ 					   state */
+ 		krb5_creds *,
+ 		krb5_creds **,
+ 		krb5_creds *** );
+ krb5_error_code krb5_get_cred_from_kdc_renew
+ 	(krb5_context,
+ 		krb5_ccache,		/* not const, as reading may save
+ 					   state */
+ 		krb5_creds *,
+ 		krb5_creds **,
+ 		krb5_creds *** );
+ #endif
+ 
+ void KRB5_CALLCONV krb5_free_tgt_creds
+ 	(krb5_context,
+ 	 krb5_creds **); /* XXX too hard to do with const */
+ 
+ #define	KRB5_GC_USER_USER	1	/* want user-user ticket */
+ #define	KRB5_GC_CACHED		2	/* want cached ticket only */
+ 
+ krb5_error_code KRB5_CALLCONV krb5_get_credentials
+ 	(krb5_context,
+ 		krb5_flags,
+ 		krb5_ccache,
+ 		krb5_creds *,
+ 		krb5_creds **);
+ krb5_error_code KRB5_CALLCONV krb5_get_credentials_validate
+ 	(krb5_context,
+ 		krb5_flags,
+ 		krb5_ccache,
+ 		krb5_creds *,
+ 		krb5_creds **);
+ krb5_error_code KRB5_CALLCONV krb5_get_credentials_renew
+ 	(krb5_context,
+ 		krb5_flags,
+ 		krb5_ccache,
+ 		krb5_creds *,
+ 		krb5_creds **);
+ #if KRB5_PRIVATE
+ krb5_error_code krb5_get_cred_via_tkt
+ 	(krb5_context,
+ 		   krb5_creds *,
+ 		   krb5_flags,
+ 		   krb5_address * const *,
+ 		   krb5_creds *,
+ 		   krb5_creds **);
+ #endif
+ krb5_error_code KRB5_CALLCONV krb5_mk_req
+ 	(krb5_context,
+ 		krb5_auth_context *,
+ 		krb5_flags,
+ 		char *,
+ 		char *,
+ 		krb5_data *,
+ 		krb5_ccache,
+ 		krb5_data * );
+ krb5_error_code KRB5_CALLCONV krb5_mk_req_extended
+ 	(krb5_context,
+ 		krb5_auth_context *,
+ 		krb5_flags,
+ 		krb5_data *,
+ 		krb5_creds *,
+ 		krb5_data * );
+ krb5_error_code KRB5_CALLCONV krb5_mk_rep
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_data *);
+ krb5_error_code KRB5_CALLCONV krb5_rd_rep
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		const krb5_data *,
+ 		krb5_ap_rep_enc_part **);
+ krb5_error_code KRB5_CALLCONV krb5_mk_error
+ 	(krb5_context,
+ 		const krb5_error *,
+ 		krb5_data * );
+ krb5_error_code KRB5_CALLCONV krb5_rd_error
+ 	(krb5_context,
+ 		const krb5_data *,
+ 		krb5_error ** );
+ krb5_error_code KRB5_CALLCONV krb5_rd_safe
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		const krb5_data *,
+ 		krb5_data *,
+ 		krb5_replay_data *);
+ krb5_error_code KRB5_CALLCONV krb5_rd_priv
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		const krb5_data *,
+ 		krb5_data *,
+ 		krb5_replay_data *);
+ krb5_error_code KRB5_CALLCONV krb5_parse_name
+ 	(krb5_context,
+ 		const char *,
+ 		krb5_principal * );
+ krb5_error_code KRB5_CALLCONV krb5_unparse_name
+ 	(krb5_context,
+ 		krb5_const_principal,
+ 		char ** );
+ krb5_error_code KRB5_CALLCONV krb5_unparse_name_ext
+ 	(krb5_context,
+ 		krb5_const_principal,
+ 		char **,
+ 		unsigned int *);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_set_principal_realm
+ 	(krb5_context, krb5_principal, const char *);
+ 
+ krb5_boolean KRB5_CALLCONV_WRONG krb5_address_search
+ 	(krb5_context,
+ 		const krb5_address *,
+ 		krb5_address * const *);
+ krb5_boolean KRB5_CALLCONV krb5_address_compare
+ 	(krb5_context,
+ 		const krb5_address *,
+ 		const krb5_address *);
+ int KRB5_CALLCONV krb5_address_order
+ 	(krb5_context,
+ 		const krb5_address *,
+ 		const krb5_address *);
+ krb5_boolean KRB5_CALLCONV krb5_realm_compare
+ 	(krb5_context,
+ 		krb5_const_principal,
+ 		krb5_const_principal);
+ krb5_boolean KRB5_CALLCONV krb5_principal_compare
+ 	(krb5_context,
+ 		krb5_const_principal,
+ 		krb5_const_principal);
+ krb5_error_code KRB5_CALLCONV  krb5_init_keyblock
+ 		(krb5_context, krb5_enctype enctype,
+ 		size_t length, krb5_keyblock **out); 
+   		/* Initialize a new keyblock and allocate storage
+ 		 * for the contents of the key, which will be freed along
+ 		 * with the keyblock when krb5_free_keyblock is called.
+ 		 * It is legal to pass in a length of 0, in which
+ 		 * case contents are left unallocated.
+ 		 */
+ krb5_error_code KRB5_CALLCONV krb5_copy_keyblock
+ 	(krb5_context,
+ 		const krb5_keyblock *,
+ 		krb5_keyblock **);
+ krb5_error_code KRB5_CALLCONV krb5_copy_keyblock_contents
+ 	(krb5_context,
+ 		const krb5_keyblock *,
+ 		krb5_keyblock *);
+ krb5_error_code KRB5_CALLCONV krb5_copy_creds
+ 	(krb5_context,
+ 		const krb5_creds *,
+ 		krb5_creds **);
+ krb5_error_code KRB5_CALLCONV krb5_copy_data
+ 	(krb5_context,
+ 		const krb5_data *,
+ 		krb5_data **);
+ krb5_error_code KRB5_CALLCONV krb5_copy_principal
+ 	(krb5_context,
+ 		krb5_const_principal,
+ 		krb5_principal *);
+ #if KRB5_PRIVATE
+ krb5_error_code KRB5_CALLCONV krb5_copy_addr
+ 	(krb5_context,
+ 		const krb5_address *,
+ 		krb5_address **);
+ #endif
+ krb5_error_code KRB5_CALLCONV krb5_copy_addresses
+ 	(krb5_context,
+ 		krb5_address * const *,
+ 		krb5_address ***);
+ krb5_error_code KRB5_CALLCONV krb5_copy_ticket
+ 	(krb5_context,
+ 		const krb5_ticket *,
+ 		krb5_ticket **);
+ krb5_error_code KRB5_CALLCONV krb5_copy_authdata
+ 	(krb5_context,
+ 		krb5_authdata * const *,
+ 		krb5_authdata ***);
+ krb5_error_code KRB5_CALLCONV krb5_copy_authenticator
+ 	(krb5_context,
+ 		const krb5_authenticator *,
+ 		krb5_authenticator **);
+ krb5_error_code KRB5_CALLCONV krb5_copy_checksum
+ 	(krb5_context,
+ 		const krb5_checksum *,
+ 		krb5_checksum **);
+ #if KRB5_PRIVATE
+ void krb5_init_ets
+ 	(krb5_context);
+ void krb5_free_ets
+ 	(krb5_context);
+ krb5_error_code krb5_generate_subkey
+ 	(krb5_context,
+ 		const krb5_keyblock *, krb5_keyblock **);
+ krb5_error_code krb5_generate_seq_number
+ 	(krb5_context,
+ 		const krb5_keyblock *, krb5_ui_4 *);
+ #endif
+ krb5_error_code KRB5_CALLCONV krb5_get_server_rcache
+ 	(krb5_context,
+ 		const krb5_data *, krb5_rcache *);
+ krb5_error_code KRB5_CALLCONV_C krb5_build_principal_ext
+ 	(krb5_context, krb5_principal *, unsigned int, const char *, ...);
+ krb5_error_code KRB5_CALLCONV_C krb5_build_principal
+ 	(krb5_context, krb5_principal *, unsigned int, const char *, ...);
+ #ifdef va_start
+ /* XXX depending on varargs include file defining va_start... */
+ krb5_error_code KRB5_CALLCONV krb5_build_principal_va
+ 	(krb5_context,
+ 		krb5_principal, unsigned int, const char *, va_list);
+ #endif
+ 
+ krb5_error_code KRB5_CALLCONV krb5_425_conv_principal
+ 	(krb5_context,
+ 		const char *name,
+ 		const char *instance, const char *realm,
+ 		krb5_principal *princ);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_524_conv_principal
+ 	(krb5_context context, krb5_const_principal princ, 
+ 		char *name, char *inst, char *realm);
+ 
+ struct credentials;
+ int KRB5_CALLCONV krb5_524_convert_creds
+ 	(krb5_context context, krb5_creds *v5creds,
+ 	 struct credentials *v4creds);
+ #if KRB5_DEPRECATED
+ #define krb524_convert_creds_kdc krb5_524_convert_creds
+ #define krb524_init_ets(x) (0)
+ #endif
+ 
+ /* libkt.spec */
+ #if KRB5_PRIVATE
+ krb5_error_code KRB5_CALLCONV krb5_kt_register
+ 	(krb5_context,
+ 		const struct _krb5_kt_ops * );
+ #endif
+ 
+ krb5_error_code KRB5_CALLCONV krb5_kt_resolve
+ 	(krb5_context,
+ 		const char *,
+ 		krb5_keytab * );
+ krb5_error_code KRB5_CALLCONV krb5_kt_default_name
+ 	(krb5_context,
+ 		char *,
+ 		int );
+ krb5_error_code KRB5_CALLCONV krb5_kt_default
+ 	(krb5_context,
+ 		krb5_keytab * );
+ krb5_error_code KRB5_CALLCONV krb5_free_keytab_entry_contents
+ 	(krb5_context,
+ 		krb5_keytab_entry * );
+ #if KRB5_PRIVATE
+ /* use krb5_free_keytab_entry_contents instead */
+ krb5_error_code KRB5_CALLCONV krb5_kt_free_entry
+ 	(krb5_context,
+ 		krb5_keytab_entry * );
+ #endif
+ /* remove and add are functions, so that they can return NOWRITE
+    if not a writable keytab */
+ krb5_error_code KRB5_CALLCONV krb5_kt_remove_entry
+ 	(krb5_context,
+ 		krb5_keytab,
+ 		krb5_keytab_entry * );
+ krb5_error_code KRB5_CALLCONV krb5_kt_add_entry
+ 	(krb5_context,
+ 		krb5_keytab,
+ 		krb5_keytab_entry * );
+ krb5_error_code KRB5_CALLCONV_WRONG krb5_principal2salt
+ 	(krb5_context,
+ 		krb5_const_principal, krb5_data *);
+ #if KRB5_PRIVATE
+ krb5_error_code krb5_principal2salt_norealm
+ 	(krb5_context,
+ 		krb5_const_principal, krb5_data *);
+ #endif
+ /* librc.spec--see rcache.h */
+ 
+ /* libcc.spec */
+ krb5_error_code KRB5_CALLCONV krb5_cc_resolve
+ 	(krb5_context,
+ 		const char *,
+ 		krb5_ccache * );
+ const char * KRB5_CALLCONV krb5_cc_default_name
+ 	(krb5_context);
+ krb5_error_code KRB5_CALLCONV krb5_cc_set_default_name
+ 	(krb5_context, const char *);
+ krb5_error_code KRB5_CALLCONV krb5_cc_default
+ 	(krb5_context,
+ 		krb5_ccache *);
+ #if KRB5_PRIVATE
+ unsigned int KRB5_CALLCONV krb5_get_notification_message
+ 	(void);
+ #endif
+ 
+ krb5_error_code KRB5_CALLCONV krb5_cc_copy_creds
+ 	(krb5_context context,
+ 			krb5_ccache incc,
+ 			krb5_ccache outcc);
+ 
+ 
+ /* chk_trans.c */
+ #if KRB5_PRIVATE
+ krb5_error_code krb5_check_transited_list
+ 	(krb5_context, const krb5_data *trans,
+ 	 const krb5_data *realm1, const krb5_data *realm2);
+ #endif
+ 
+ /* free_rtree.c */
+ #if KRB5_PRIVATE
+ void krb5_free_realm_tree
+ 	(krb5_context,
+ 		krb5_principal *);
+ #endif
+ 
+ /* krb5_free.c */
+ void KRB5_CALLCONV krb5_free_principal
+ 	(krb5_context, krb5_principal );
+ void KRB5_CALLCONV krb5_free_authenticator
+ 	(krb5_context, krb5_authenticator * );
+ #if KRB5_PRIVATE
+ void KRB5_CALLCONV krb5_free_authenticator_contents
+ 	(krb5_context, krb5_authenticator * );
+ #endif
+ void KRB5_CALLCONV krb5_free_addresses
+ 	(krb5_context, krb5_address ** );
+ #if KRB5_PRIVATE
+ void KRB5_CALLCONV krb5_free_address
+ 	(krb5_context, krb5_address * );
+ #endif
+ void KRB5_CALLCONV krb5_free_authdata
+ 	(krb5_context, krb5_authdata ** );
+ #if KRB5_PRIVATE
+ void KRB5_CALLCONV krb5_free_enc_tkt_part
+ 	(krb5_context, krb5_enc_tkt_part * );
+ #endif
+ void KRB5_CALLCONV krb5_free_ticket
+ 	(krb5_context, krb5_ticket * );
+ #if KRB5_PRIVATE
+ void KRB5_CALLCONV krb5_free_tickets
+ 	(krb5_context, krb5_ticket ** );
+ void KRB5_CALLCONV krb5_free_kdc_req
+ 	(krb5_context, krb5_kdc_req * );
+ void KRB5_CALLCONV krb5_free_kdc_rep
+ 	(krb5_context, krb5_kdc_rep * );
+ void KRB5_CALLCONV krb5_free_last_req
+ 	(krb5_context, krb5_last_req_entry ** );
+ void KRB5_CALLCONV krb5_free_enc_kdc_rep_part
+ 	(krb5_context, krb5_enc_kdc_rep_part * );
+ #endif
+ void KRB5_CALLCONV krb5_free_error
+ 	(krb5_context, krb5_error * );
+ #if KRB5_PRIVATE
+ void KRB5_CALLCONV krb5_free_ap_req
+ 	(krb5_context, krb5_ap_req * );
+ void KRB5_CALLCONV krb5_free_ap_rep
+ 	(krb5_context, krb5_ap_rep * );
+ void KRB5_CALLCONV krb5_free_cred
+ 	(krb5_context, krb5_cred *);
+ #endif
+ void KRB5_CALLCONV krb5_free_creds
+ 	(krb5_context, krb5_creds *);
+ void KRB5_CALLCONV krb5_free_cred_contents
+ 	(krb5_context, krb5_creds *);
+ #if KRB5_PRIVATE
+ void KRB5_CALLCONV krb5_free_cred_enc_part
+ 	(krb5_context, krb5_cred_enc_part *);
+ #endif
+ void KRB5_CALLCONV krb5_free_checksum
+ 	(krb5_context, krb5_checksum *);
+ void KRB5_CALLCONV krb5_free_checksum_contents
+ 	(krb5_context, krb5_checksum *);
+ void KRB5_CALLCONV krb5_free_keyblock
+ 	(krb5_context, krb5_keyblock *);
+ void KRB5_CALLCONV krb5_free_keyblock_contents
+ 	(krb5_context, krb5_keyblock *);
+ #if KRB5_PRIVATE
+ void KRB5_CALLCONV krb5_free_pa_data
+ 	(krb5_context, krb5_pa_data **);
+ #endif
+ void KRB5_CALLCONV krb5_free_ap_rep_enc_part
+ 	(krb5_context, krb5_ap_rep_enc_part *);
+ #if KRB5_PRIVATE
+ void KRB5_CALLCONV krb5_free_tkt_authent
+ 	(krb5_context, krb5_tkt_authent *);
+ void KRB5_CALLCONV krb5_free_pwd_data
+ 	(krb5_context, krb5_pwd_data *);
+ void KRB5_CALLCONV krb5_free_pwd_sequences
+ 	(krb5_context, passwd_phrase_element **);
+ #endif
+ void KRB5_CALLCONV krb5_free_data
+ 	(krb5_context, krb5_data *);
+ void KRB5_CALLCONV krb5_free_data_contents
+ 	(krb5_context, krb5_data *);
+ void KRB5_CALLCONV krb5_free_unparsed_name
+ 	(krb5_context, char *);
+ void KRB5_CALLCONV krb5_free_cksumtypes
+ 	(krb5_context, krb5_cksumtype *);
+ 
+ /* From krb5/os but needed but by the outside world */
+ krb5_error_code KRB5_CALLCONV krb5_us_timeofday
+ 	(krb5_context,
+ 		krb5_timestamp *,
+ 		krb5_int32 * );
+ krb5_error_code KRB5_CALLCONV krb5_timeofday
+ 	(krb5_context,
+ 		krb5_timestamp * );
+ 		 /* get all the addresses of this host */
+ krb5_error_code KRB5_CALLCONV krb5_os_localaddr
+ 	(krb5_context,
+ 		krb5_address ***);
+ krb5_error_code KRB5_CALLCONV krb5_get_default_realm
+ 	(krb5_context,
+ 		 char ** );
+ krb5_error_code KRB5_CALLCONV krb5_set_default_realm
+ 	(krb5_context,
+ 		   const char * );
+ void KRB5_CALLCONV krb5_free_default_realm
+ 	(krb5_context,
+ 		   char * );
+ krb5_error_code KRB5_CALLCONV krb5_sname_to_principal
+ 	(krb5_context,
+ 		const char *,
+ 		   const char *,
+ 		   krb5_int32,
+ 		   krb5_principal *);
+ krb5_error_code KRB5_CALLCONV
+ krb5_change_password
+ 	(krb5_context context, krb5_creds *creds, char *newpw,
+ 			int *result_code, krb5_data *result_code_string,
+ 			krb5_data *result_string);
+ krb5_error_code KRB5_CALLCONV
+ krb5_set_password
+ 	(krb5_context context, krb5_creds *creds, char *newpw, krb5_principal change_password_for,
+ 			int *result_code, krb5_data *result_code_string, krb5_data *result_string);
+ krb5_error_code KRB5_CALLCONV
+ krb5_set_password_using_ccache
+ 	(krb5_context context, krb5_ccache ccache, char *newpw, krb5_principal change_password_for,
+ 			int *result_code, krb5_data *result_code_string, krb5_data *result_string);
+ 
+ #if KRB5_PRIVATE
+ krb5_error_code krb5_set_config_files
+ 	(krb5_context, const char **);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_get_default_config_files
+ 	(char ***filenames);
+ 
+ void KRB5_CALLCONV krb5_free_config_files
+ 	(char **filenames);
+ #endif
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_get_profile
+ 	(krb5_context, struct _profile_t * /* profile_t */ *);
+ 
+ #if KRB5_PRIVATE
+ krb5_error_code krb5_send_tgs
+ 	(krb5_context,
+ 		krb5_flags,
+ 		const krb5_ticket_times *,
+ 		const krb5_enctype *,
+ 		krb5_const_principal,
+ 		krb5_address * const *,
+ 		krb5_authdata * const *,
+ 		krb5_pa_data * const *,
+ 		const krb5_data *,
+ 		krb5_creds *,
+ 		krb5_response * );
+ #endif
+ 
+ #if KRB5_DEPRECATED
+ krb5_error_code KRB5_CALLCONV krb5_get_in_tkt
+ 	(krb5_context,
+ 		krb5_flags,
+ 		krb5_address * const *,
+ 		krb5_enctype *,
+ 		krb5_preauthtype *,
+ 		krb5_error_code ( * )(krb5_context,
+ 					krb5_enctype,
+ 					krb5_data *,
+ 					krb5_const_pointer,
+ 					krb5_keyblock **),
+ 		krb5_const_pointer,
+ 		krb5_error_code ( * )(krb5_context,
+ 					const krb5_keyblock *,
+ 					krb5_const_pointer,
+ 					krb5_kdc_rep * ),
+ 		krb5_const_pointer,
+ 		krb5_creds *,
+ 		krb5_ccache,
+ 		krb5_kdc_rep ** );
+ 
+ krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_password
+ 	(krb5_context,
+ 		krb5_flags,
+ 		krb5_address * const *,
+ 		krb5_enctype *,
+ 		krb5_preauthtype *,
+ 		const char *,
+ 		krb5_ccache,
+ 		krb5_creds *,
+ 		krb5_kdc_rep ** );
+ 
+ krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_skey
+ 	(krb5_context,
+ 		krb5_flags,
+ 		krb5_address * const *,
+ 		krb5_enctype *,
+ 		krb5_preauthtype *,
+ 		const krb5_keyblock *,
+ 		krb5_ccache,
+ 		krb5_creds *,
+ 		krb5_kdc_rep ** );
+ 
+ krb5_error_code KRB5_CALLCONV krb5_get_in_tkt_with_keytab
+ 	(krb5_context,
+ 		krb5_flags,
+ 		krb5_address * const *,
+ 		krb5_enctype *,
+ 		krb5_preauthtype *,
+ 		krb5_keytab,
+ 		krb5_ccache,
+ 		krb5_creds *,
+ 		krb5_kdc_rep ** );
+ #endif /* KRB5_DEPRECATED */
+ 
+ #if KRB5_PRIVATE
+ krb5_error_code krb5_decode_kdc_rep
+ 	(krb5_context,
+ 		krb5_data *,
+ 		const krb5_keyblock *,
+ 		krb5_kdc_rep ** );
+ #endif
+ 
+ krb5_error_code KRB5_CALLCONV krb5_rd_req
+ 	(krb5_context,
+ 		krb5_auth_context *,
+ 		const krb5_data *,
+ 		krb5_const_principal,
+ 		krb5_keytab,
+ 		krb5_flags *,
+ 		krb5_ticket **);
+ 
+ #if KRB5_PRIVATE
+ krb5_error_code krb5_rd_req_decoded
+ 	(krb5_context,
+ 		krb5_auth_context *,
+ 		const krb5_ap_req *,
+ 		krb5_const_principal,
+ 		krb5_keytab,
+ 		krb5_flags *,
+ 		krb5_ticket **);
+ 
+ krb5_error_code krb5_rd_req_decoded_anyflag
+ 	(krb5_context,
+ 		krb5_auth_context *,
+ 		const krb5_ap_req *,
+ 		krb5_const_principal,
+ 		krb5_keytab,
+ 		krb5_flags *,
+ 		krb5_ticket **);
+ #endif
+ 
+ krb5_error_code KRB5_CALLCONV krb5_kt_read_service_key
+ 	(krb5_context,
+ 		krb5_pointer,
+ 		krb5_principal,
+ 		krb5_kvno,
+ 		krb5_enctype,
+ 		krb5_keyblock **);
+ krb5_error_code KRB5_CALLCONV krb5_mk_safe
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		const krb5_data *,
+ 		krb5_data *,
+ 		krb5_replay_data *);
+ krb5_error_code KRB5_CALLCONV krb5_mk_priv
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		const krb5_data *,
+ 		krb5_data *,
+ 		krb5_replay_data *);
+ #if KRB5_PRIVATE
+ krb5_error_code KRB5_CALLCONV krb5_cc_register
+ 	(krb5_context,
+ 		krb5_cc_ops *,
+ 		krb5_boolean );
+ #endif
+ 
+ krb5_error_code KRB5_CALLCONV krb5_sendauth 
+ 	(krb5_context,
+ 		krb5_auth_context *,
+ 		krb5_pointer,
+ 		char *,
+ 		krb5_principal,
+ 		krb5_principal,
+ 		krb5_flags,
+ 		krb5_data *,
+ 		krb5_creds *,
+ 		krb5_ccache,
+ 		krb5_error **,
+ 		krb5_ap_rep_enc_part **,
+ 		krb5_creds **);
+ 	
+ krb5_error_code KRB5_CALLCONV krb5_recvauth
+ 	(krb5_context,
+ 		krb5_auth_context *,
+ 		krb5_pointer,
+ 		char *,
+ 		krb5_principal,
+ 		krb5_int32, 
+ 		krb5_keytab,
+ 		krb5_ticket **);
+ krb5_error_code KRB5_CALLCONV krb5_recvauth_version
+ 	(krb5_context,
+ 		krb5_auth_context *,
+ 		krb5_pointer,
+ 		krb5_principal,
+ 		krb5_int32, 
+ 		krb5_keytab,
+ 		krb5_ticket **,
+ 		krb5_data *);
+ 
+ #if KRB5_PRIVATE
+ krb5_error_code krb5_walk_realm_tree
+ 	(krb5_context,
+ 		const krb5_data *,
+ 		const krb5_data *,
+ 		krb5_principal **,
+ 		int);
+ #endif
+ 
+ krb5_error_code KRB5_CALLCONV krb5_mk_ncred
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_creds **,
+ 		krb5_data **,
+ 		krb5_replay_data *);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_mk_1cred
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_creds *,
+ 		krb5_data **,
+ 		krb5_replay_data *);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_rd_cred
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_data *,
+ 		krb5_creds ***,
+ 		krb5_replay_data *);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_fwd_tgt_creds
+ 	(krb5_context, 
+ 		krb5_auth_context,
+ 		char *,
+ 		krb5_principal, 
+ 		krb5_principal, 
+ 		krb5_ccache,
+ 		int forwardable,
+ 		krb5_data *);	
+ 
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_init
+ 	(krb5_context,
+ 		krb5_auth_context *);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_free
+ 	(krb5_context,
+ 		krb5_auth_context);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_setflags
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_int32);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_getflags
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_int32 *);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_auth_con_set_checksum_func (krb5_context, krb5_auth_context,
+ 				 krb5_mk_req_checksum_func, void *);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_auth_con_get_checksum_func( krb5_context, krb5_auth_context,
+ 				 krb5_mk_req_checksum_func *, void **);
+ 
+ krb5_error_code KRB5_CALLCONV_WRONG krb5_auth_con_setaddrs
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_address *,
+ 		krb5_address *);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_getaddrs
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_address **,
+ 		krb5_address **);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_setports
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_address *,
+ 		krb5_address *);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_setuseruserkey
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_keyblock *);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_getkey
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_keyblock **);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_getsendsubkey(
+     krb5_context, krb5_auth_context, krb5_keyblock **);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_getrecvsubkey(
+     krb5_context, krb5_auth_context, krb5_keyblock **);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_setsendsubkey(
+     krb5_context, krb5_auth_context, krb5_keyblock *);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_setrecvsubkey(
+     krb5_context, krb5_auth_context, krb5_keyblock *);
+ 
+ #if KRB5_DEPRECATED
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_getlocalsubkey
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_keyblock **);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_getremotesubkey
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_keyblock **);
+ #endif
+ 
+ #if KRB5_PRIVATE
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_set_req_cksumtype
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_cksumtype);
+ 
+ krb5_error_code krb5_auth_con_set_safe_cksumtype
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_cksumtype);
+ #endif
+ 
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_getlocalseqnumber
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_int32 *);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_getremoteseqnumber
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_int32 *);
+ 
+ #if KRB5_DEPRECATED
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_initivector
+ 	(krb5_context,
+ 		krb5_auth_context);
+ #endif
+ 
+ #if KRB5_PRIVATE
+ krb5_error_code krb5_auth_con_setivector
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_pointer);
+ 
+ krb5_error_code krb5_auth_con_getivector
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_pointer *);
+ #endif
+ 
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_setrcache
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_rcache);
+ 
+ krb5_error_code KRB5_CALLCONV_WRONG krb5_auth_con_getrcache
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_rcache *);
+ 
+ #if KRB5_PRIVATE
+ krb5_error_code krb5_auth_con_setpermetypes
+ 	(krb5_context,
+ 	    krb5_auth_context,
+ 	    const krb5_enctype *);
+ 
+ krb5_error_code krb5_auth_con_getpermetypes
+ 	(krb5_context,
+ 	    krb5_auth_context,
+ 	    krb5_enctype **);
+ #endif
+ 
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_getauthenticator
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		krb5_authenticator **);
+ 
+ #define KRB5_REALM_BRANCH_CHAR '.'
+ 
+ /*
+  * end "func-proto.h"
+  */
+ 
+ /*
+  * begin stuff from libos.h
+  */
+ 
+ #if KRB5_PRIVATE
+ krb5_error_code krb5_read_message (krb5_context, krb5_pointer, krb5_data *);
+ krb5_error_code krb5_write_message (krb5_context, krb5_pointer, krb5_data *);
+ int krb5_net_read (krb5_context, int , char *, int);
+ int krb5_net_write (krb5_context, int , const char *, int);
+ #endif
+ 
+ krb5_error_code KRB5_CALLCONV krb5_read_password
+ 	(krb5_context,
+ 		const char *,
+ 		const char *,
+ 		char *,
+ 		unsigned int * );
+ krb5_error_code KRB5_CALLCONV krb5_aname_to_localname
+ 	(krb5_context,
+ 		krb5_const_principal,
+ 		int,
+ 		char * );
+ krb5_error_code KRB5_CALLCONV krb5_get_host_realm
+ 	(krb5_context,
+ 		const char *,
+ 		char *** );
+ krb5_error_code KRB5_CALLCONV krb5_free_host_realm
+ 	(krb5_context,
+ 		char * const * );
+ #if KRB5_PRIVATE
+ krb5_error_code KRB5_CALLCONV krb5_get_realm_domain
+ 	(krb5_context,
+ 		const char *,
+ 		char ** );
+ #endif
+ krb5_boolean KRB5_CALLCONV krb5_kuserok
+ 	(krb5_context,
+ 		krb5_principal, const char *);
+ krb5_error_code KRB5_CALLCONV krb5_auth_con_genaddrs
+ 	(krb5_context,
+ 		krb5_auth_context,
+ 		int, int);
+ #if KRB5_PRIVATE
+ krb5_error_code krb5_gen_portaddr
+ 	(krb5_context,
+ 		const krb5_address *,
+ 		krb5_const_pointer,
+ 		krb5_address **);
+ krb5_error_code krb5_gen_replay_name
+ 	(krb5_context,
+ 		const krb5_address *,
+ 		const char *,
+ 		char **);
+ krb5_error_code krb5_make_fulladdr
+ 	(krb5_context,
+ 		krb5_address *,
+ 		krb5_address *,
+ 		krb5_address *);
+ #endif
+ 
+ krb5_error_code KRB5_CALLCONV krb5_set_real_time
+ 	(krb5_context, krb5_timestamp, krb5_int32);
+ 
+ #if KRB5_PRIVATE
+ krb5_error_code krb5_set_debugging_time
+ 	(krb5_context, krb5_timestamp, krb5_int32);
+ krb5_error_code krb5_use_natural_time
+ 	(krb5_context);
+ #endif
+ krb5_error_code KRB5_CALLCONV krb5_get_time_offsets
+ 	(krb5_context, krb5_timestamp *, krb5_int32 *);
+ #if KRB5_PRIVATE
+ krb5_error_code krb5_set_time_offsets
+ 	(krb5_context, krb5_timestamp, krb5_int32);
+ #endif
+ 
+ /* str_conv.c */
+ krb5_error_code KRB5_CALLCONV krb5_string_to_enctype
+ 	(char *, krb5_enctype *);
+ krb5_error_code KRB5_CALLCONV krb5_string_to_salttype
+ 	(char *, krb5_int32 *);
+ krb5_error_code KRB5_CALLCONV krb5_string_to_cksumtype
+ 	(char *, krb5_cksumtype *);
+ krb5_error_code KRB5_CALLCONV krb5_string_to_timestamp
+ 	(char *, krb5_timestamp *);
+ krb5_error_code KRB5_CALLCONV krb5_string_to_deltat
+ 	(char *, krb5_deltat *);
+ krb5_error_code KRB5_CALLCONV krb5_enctype_to_string
+ 	(krb5_enctype, char *, size_t);
+ krb5_error_code KRB5_CALLCONV krb5_salttype_to_string
+ 	(krb5_int32, char *, size_t);
+ krb5_error_code KRB5_CALLCONV krb5_cksumtype_to_string
+ 	(krb5_cksumtype, char *, size_t);
+ krb5_error_code KRB5_CALLCONV krb5_timestamp_to_string
+ 	(krb5_timestamp, char *, size_t);
+ krb5_error_code KRB5_CALLCONV krb5_timestamp_to_sfstring
+ 	(krb5_timestamp, char *, size_t, char *);
+ krb5_error_code KRB5_CALLCONV krb5_deltat_to_string
+ 	(krb5_deltat, char *, size_t);
+ 
+ 
+ 
+ /* The name of the Kerberos ticket granting service... and its size */
+ #define	KRB5_TGS_NAME		"krbtgt"
+ #define KRB5_TGS_NAME_SIZE	6
+ 
+ /* flags for recvauth */
+ #define KRB5_RECVAUTH_SKIP_VERSION	0x0001
+ #define KRB5_RECVAUTH_BADAUTHVERS	0x0002
+ /* initial ticket api functions */
+ 
+ typedef struct _krb5_prompt {
+     char *prompt;
+     int hidden;
+     krb5_data *reply;
+ } krb5_prompt;
+ 
+ typedef krb5_error_code (KRB5_CALLCONV *krb5_prompter_fct)(krb5_context context,
+ 					     void *data,
+ 					     const char *name,
+ 					     const char *banner,
+ 					     int num_prompts,
+ 					     krb5_prompt prompts[]);
+ 
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_prompter_posix (krb5_context context,
+ 		void *data,
+ 		const char *name,
+ 		const char *banner,
+ 		int num_prompts,
+ 		krb5_prompt prompts[]);
+ 
+ typedef struct _krb5_get_init_creds_opt {
+     krb5_flags flags;
+     krb5_deltat tkt_life;
+     krb5_deltat renew_life;
+     int forwardable;
+     int proxiable;
+     krb5_enctype *etype_list;
+     int etype_list_length;
+     krb5_address **address_list;
+     krb5_preauthtype *preauth_list;
+     int preauth_list_length;
+     krb5_data *salt;
+ } krb5_get_init_creds_opt;
+ 
+ #define KRB5_GET_INIT_CREDS_OPT_TKT_LIFE	0x0001
+ #define KRB5_GET_INIT_CREDS_OPT_RENEW_LIFE	0x0002
+ #define KRB5_GET_INIT_CREDS_OPT_FORWARDABLE	0x0004
+ #define KRB5_GET_INIT_CREDS_OPT_PROXIABLE	0x0008
+ #define KRB5_GET_INIT_CREDS_OPT_ETYPE_LIST	0x0010
+ #define KRB5_GET_INIT_CREDS_OPT_ADDRESS_LIST	0x0020
+ #define KRB5_GET_INIT_CREDS_OPT_PREAUTH_LIST	0x0040
+ #define KRB5_GET_INIT_CREDS_OPT_SALT		0x0080
+ 
+ 
+ void KRB5_CALLCONV
+ krb5_get_init_creds_opt_init
+ (krb5_get_init_creds_opt *opt);
+ 
+ void KRB5_CALLCONV
+ krb5_get_init_creds_opt_set_tkt_life
+ (krb5_get_init_creds_opt *opt,
+ 		krb5_deltat tkt_life);
+ 
+ void KRB5_CALLCONV
+ krb5_get_init_creds_opt_set_renew_life
+ (krb5_get_init_creds_opt *opt,
+ 		krb5_deltat renew_life);
+ 
+ void KRB5_CALLCONV
+ krb5_get_init_creds_opt_set_forwardable
+ (krb5_get_init_creds_opt *opt,
+ 		int forwardable);
+ 
+ void KRB5_CALLCONV
+ krb5_get_init_creds_opt_set_proxiable
+ (krb5_get_init_creds_opt *opt,
+ 		int proxiable);
+ 
+ void KRB5_CALLCONV
+ krb5_get_init_creds_opt_set_etype_list
+ (krb5_get_init_creds_opt *opt,
+ 		krb5_enctype *etype_list,
+ 		int etype_list_length);
+ 
+ void KRB5_CALLCONV
+ krb5_get_init_creds_opt_set_address_list
+ (krb5_get_init_creds_opt *opt,
+ 		krb5_address **addresses);
+ 
+ void KRB5_CALLCONV
+ krb5_get_init_creds_opt_set_preauth_list
+ (krb5_get_init_creds_opt *opt,
+ 		krb5_preauthtype *preauth_list,
+ 		int preauth_list_length);
+ 
+ void KRB5_CALLCONV
+ krb5_get_init_creds_opt_set_salt
+ (krb5_get_init_creds_opt *opt,
+ 		krb5_data *salt);
+ 
+ 
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_get_init_creds_password
+ (krb5_context context,
+ 		krb5_creds *creds,
+ 		krb5_principal client,
+ 		char *password,
+ 		krb5_prompter_fct prompter,
+ 		void *data,
+ 		krb5_deltat start_time,
+ 		char *in_tkt_service,
+ 		krb5_get_init_creds_opt *k5_gic_options);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_get_init_creds_keytab
+ (krb5_context context,
+ 		krb5_creds *creds,
+ 		krb5_principal client,
+ 		krb5_keytab arg_keytab,
+ 		krb5_deltat start_time,
+ 		char *in_tkt_service,
+ 		krb5_get_init_creds_opt *k5_gic_options);
+ 
+ typedef struct _krb5_verify_init_creds_opt {
+     krb5_flags flags;
+     int ap_req_nofail;
+ } krb5_verify_init_creds_opt;
+ 
+ #define KRB5_VERIFY_INIT_CREDS_OPT_AP_REQ_NOFAIL	0x0001
+ 
+ void KRB5_CALLCONV
+ krb5_verify_init_creds_opt_init
+ (krb5_verify_init_creds_opt *k5_vic_options);
+ void KRB5_CALLCONV
+ krb5_verify_init_creds_opt_set_ap_req_nofail
+ (krb5_verify_init_creds_opt *k5_vic_options,
+ 		int ap_req_nofail);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_verify_init_creds
+ (krb5_context context,
+ 		krb5_creds *creds,
+ 		krb5_principal ap_req_server,
+ 		krb5_keytab ap_req_keytab,
+ 		krb5_ccache *ccache,
+ 		krb5_verify_init_creds_opt *k5_vic_options);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_get_validated_creds
+ (krb5_context context,
+ 		krb5_creds *creds,
+ 		krb5_principal client,
+ 		krb5_ccache ccache,
+ 		char *in_tkt_service);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_get_renewed_creds
+ (krb5_context context,
+ 		krb5_creds *creds,
+ 		krb5_principal client,
+ 		krb5_ccache ccache,
+ 		char *in_tkt_service);
+ 
+ krb5_error_code KRB5_CALLCONV
+ krb5_decode_ticket
+ (const krb5_data *code, 
+ 		krb5_ticket **rep);
+ 
+ void KRB5_CALLCONV
+ krb5_appdefault_string
+ (krb5_context context,
+ 		const char *appname,  
+ 	        const krb5_data *realm,
+  		const char *option,
+ 		const char *default_value,
+ 		char ** ret_value);
+ 
+ void KRB5_CALLCONV
+ krb5_appdefault_boolean
+ (krb5_context context,
+ 		const char *appname,  
+ 	        const krb5_data *realm,
+  		const char *option,
+ 		int default_value,
+ 		int *ret_value);
+ 
+ #if KRB5_PRIVATE
+ /*
+  * The realm iterator functions
+  */
+ 
+ krb5_error_code KRB5_CALLCONV krb5_realm_iterator_create
+ 	(krb5_context context, void **iter_p);
+ 
+ krb5_error_code KRB5_CALLCONV krb5_realm_iterator
+ 	(krb5_context context, void **iter_p, char **ret_realm);
+ 
+ void KRB5_CALLCONV krb5_realm_iterator_free
+ 	(krb5_context context, void **iter_p);
+ 
+ void KRB5_CALLCONV krb5_free_realm_string
+ 	(krb5_context context, char *str);
+ #endif
+ 
+ /*
+  * Prompter enhancements
+  */
+ 
+ #define KRB5_PROMPT_TYPE_PASSWORD            0x1
+ #define KRB5_PROMPT_TYPE_NEW_PASSWORD        0x2
+ #define KRB5_PROMPT_TYPE_NEW_PASSWORD_AGAIN  0x3
+ #define KRB5_PROMPT_TYPE_PREAUTH             0x4
+ 
+ typedef krb5_int32 krb5_prompt_type;
+ 
+ krb5_prompt_type* KRB5_CALLCONV krb5_get_prompt_types
+ 	(krb5_context context);
+ 
+ /* Error reporting */
+ void KRB5_CALLCONV_C
+ krb5_set_error_message (krb5_context, krb5_error_code, const char *, ...);
+ #ifdef va_start
+ void KRB5_CALLCONV
+ krb5_vset_error_message (krb5_context, krb5_error_code, const char *, va_list);
+ #endif
+ /*
+  * The behavior of krb5_get_error_message is only defined the first
+  * time it is called after a failed call to a krb5 function using the
+  * same context, and only when the error code passed in is the same as
+  * that returned by the krb5 function.  Future versions may return the
+  * same string for the second and following calls.
+  *
+  * The string returned by this function must be freed using
+  * krb5_free_error_message.
+  */
+ char * KRB5_CALLCONV
+ krb5_get_error_message (krb5_context, krb5_error_code);
+ void KRB5_CALLCONV
+ krb5_free_error_message (krb5_context, char *);
+ void KRB5_CALLCONV
+ krb5_clear_error_message (krb5_context);
+ 
+ 
+ #if TARGET_OS_MAC
+ #    pragma options align=reset
+ #endif
+ 
+ KRB5INT_END_DECLS
+ 
+ /* Don't use this!  We're going to phase it out.  It's just here to keep
+    applications from breaking right away.  */
+ #define krb5_const const
+ 
+ #endif /* KRB5_GENERAL__ */
+ 
+ /*
+  * include/krb5_err.h:
+  * This file is automatically generated; please do not edit it.
+  */
+ 
+ #include <com_err.h>
+ 
+ #define KRB5KDC_ERR_NONE                         (-1765328384L)
+ #define KRB5KDC_ERR_NAME_EXP                     (-1765328383L)
+ #define KRB5KDC_ERR_SERVICE_EXP                  (-1765328382L)
+ #define KRB5KDC_ERR_BAD_PVNO                     (-1765328381L)
+ #define KRB5KDC_ERR_C_OLD_MAST_KVNO              (-1765328380L)
+ #define KRB5KDC_ERR_S_OLD_MAST_KVNO              (-1765328379L)
+ #define KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN          (-1765328378L)
+ #define KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN          (-1765328377L)
+ #define KRB5KDC_ERR_PRINCIPAL_NOT_UNIQUE         (-1765328376L)
+ #define KRB5KDC_ERR_NULL_KEY                     (-1765328375L)
+ #define KRB5KDC_ERR_CANNOT_POSTDATE              (-1765328374L)
+ #define KRB5KDC_ERR_NEVER_VALID                  (-1765328373L)
+ #define KRB5KDC_ERR_POLICY                       (-1765328372L)
+ #define KRB5KDC_ERR_BADOPTION                    (-1765328371L)
+ #define KRB5KDC_ERR_ETYPE_NOSUPP                 (-1765328370L)
+ #define KRB5KDC_ERR_SUMTYPE_NOSUPP               (-1765328369L)
+ #define KRB5KDC_ERR_PADATA_TYPE_NOSUPP           (-1765328368L)
+ #define KRB5KDC_ERR_TRTYPE_NOSUPP                (-1765328367L)
+ #define KRB5KDC_ERR_CLIENT_REVOKED               (-1765328366L)
+ #define KRB5KDC_ERR_SERVICE_REVOKED              (-1765328365L)
+ #define KRB5KDC_ERR_TGT_REVOKED                  (-1765328364L)
+ #define KRB5KDC_ERR_CLIENT_NOTYET                (-1765328363L)
+ #define KRB5KDC_ERR_SERVICE_NOTYET               (-1765328362L)
+ #define KRB5KDC_ERR_KEY_EXP                      (-1765328361L)
+ #define KRB5KDC_ERR_PREAUTH_FAILED               (-1765328360L)
+ #define KRB5KDC_ERR_PREAUTH_REQUIRED             (-1765328359L)
+ #define KRB5KDC_ERR_SERVER_NOMATCH               (-1765328358L)
+ #define KRB5PLACEHOLD_27                         (-1765328357L)
+ #define KRB5PLACEHOLD_28                         (-1765328356L)
+ #define KRB5PLACEHOLD_29                         (-1765328355L)
+ #define KRB5PLACEHOLD_30                         (-1765328354L)
+ #define KRB5KRB_AP_ERR_BAD_INTEGRITY             (-1765328353L)
+ #define KRB5KRB_AP_ERR_TKT_EXPIRED               (-1765328352L)
+ #define KRB5KRB_AP_ERR_TKT_NYV                   (-1765328351L)
+ #define KRB5KRB_AP_ERR_REPEAT                    (-1765328350L)
+ #define KRB5KRB_AP_ERR_NOT_US                    (-1765328349L)
+ #define KRB5KRB_AP_ERR_BADMATCH                  (-1765328348L)
+ #define KRB5KRB_AP_ERR_SKEW                      (-1765328347L)
+ #define KRB5KRB_AP_ERR_BADADDR                   (-1765328346L)
+ #define KRB5KRB_AP_ERR_BADVERSION                (-1765328345L)
+ #define KRB5KRB_AP_ERR_MSG_TYPE                  (-1765328344L)
+ #define KRB5KRB_AP_ERR_MODIFIED                  (-1765328343L)
+ #define KRB5KRB_AP_ERR_BADORDER                  (-1765328342L)
+ #define KRB5KRB_AP_ERR_ILL_CR_TKT                (-1765328341L)
+ #define KRB5KRB_AP_ERR_BADKEYVER                 (-1765328340L)
+ #define KRB5KRB_AP_ERR_NOKEY                     (-1765328339L)
+ #define KRB5KRB_AP_ERR_MUT_FAIL                  (-1765328338L)
+ #define KRB5KRB_AP_ERR_BADDIRECTION              (-1765328337L)
+ #define KRB5KRB_AP_ERR_METHOD                    (-1765328336L)
+ #define KRB5KRB_AP_ERR_BADSEQ                    (-1765328335L)
+ #define KRB5KRB_AP_ERR_INAPP_CKSUM               (-1765328334L)
+ #define KRB5KRB_AP_PATH_NOT_ACCEPTED             (-1765328333L)
+ #define KRB5KRB_ERR_RESPONSE_TOO_BIG             (-1765328332L)
+ #define KRB5PLACEHOLD_53                         (-1765328331L)
+ #define KRB5PLACEHOLD_54                         (-1765328330L)
+ #define KRB5PLACEHOLD_55                         (-1765328329L)
+ #define KRB5PLACEHOLD_56                         (-1765328328L)
+ #define KRB5PLACEHOLD_57                         (-1765328327L)
+ #define KRB5PLACEHOLD_58                         (-1765328326L)
+ #define KRB5PLACEHOLD_59                         (-1765328325L)
+ #define KRB5KRB_ERR_GENERIC                      (-1765328324L)
+ #define KRB5KRB_ERR_FIELD_TOOLONG                (-1765328323L)
+ #define KRB5PLACEHOLD_62                         (-1765328322L)
+ #define KRB5PLACEHOLD_63                         (-1765328321L)
+ #define KRB5PLACEHOLD_64                         (-1765328320L)
+ #define KRB5PLACEHOLD_65                         (-1765328319L)
+ #define KRB5PLACEHOLD_66                         (-1765328318L)
+ #define KRB5PLACEHOLD_67                         (-1765328317L)
+ #define KRB5PLACEHOLD_68                         (-1765328316L)
+ #define KRB5PLACEHOLD_69                         (-1765328315L)
+ #define KRB5PLACEHOLD_70                         (-1765328314L)
+ #define KRB5PLACEHOLD_71                         (-1765328313L)
+ #define KRB5PLACEHOLD_72                         (-1765328312L)
+ #define KRB5PLACEHOLD_73                         (-1765328311L)
+ #define KRB5PLACEHOLD_74                         (-1765328310L)
+ #define KRB5PLACEHOLD_75                         (-1765328309L)
+ #define KRB5PLACEHOLD_76                         (-1765328308L)
+ #define KRB5PLACEHOLD_77                         (-1765328307L)
+ #define KRB5PLACEHOLD_78                         (-1765328306L)
+ #define KRB5PLACEHOLD_79                         (-1765328305L)
+ #define KRB5PLACEHOLD_80                         (-1765328304L)
+ #define KRB5PLACEHOLD_81                         (-1765328303L)
+ #define KRB5PLACEHOLD_82                         (-1765328302L)
+ #define KRB5PLACEHOLD_83                         (-1765328301L)
+ #define KRB5PLACEHOLD_84                         (-1765328300L)
+ #define KRB5PLACEHOLD_85                         (-1765328299L)
+ #define KRB5PLACEHOLD_86                         (-1765328298L)
+ #define KRB5PLACEHOLD_87                         (-1765328297L)
+ #define KRB5PLACEHOLD_88                         (-1765328296L)
+ #define KRB5PLACEHOLD_89                         (-1765328295L)
+ #define KRB5PLACEHOLD_90                         (-1765328294L)
+ #define KRB5PLACEHOLD_91                         (-1765328293L)
+ #define KRB5PLACEHOLD_92                         (-1765328292L)
+ #define KRB5PLACEHOLD_93                         (-1765328291L)
+ #define KRB5PLACEHOLD_94                         (-1765328290L)
+ #define KRB5PLACEHOLD_95                         (-1765328289L)
+ #define KRB5PLACEHOLD_96                         (-1765328288L)
+ #define KRB5PLACEHOLD_97                         (-1765328287L)
+ #define KRB5PLACEHOLD_98                         (-1765328286L)
+ #define KRB5PLACEHOLD_99                         (-1765328285L)
+ #define KRB5PLACEHOLD_100                        (-1765328284L)
+ #define KRB5PLACEHOLD_101                        (-1765328283L)
+ #define KRB5PLACEHOLD_102                        (-1765328282L)
+ #define KRB5PLACEHOLD_103                        (-1765328281L)
+ #define KRB5PLACEHOLD_104                        (-1765328280L)
+ #define KRB5PLACEHOLD_105                        (-1765328279L)
+ #define KRB5PLACEHOLD_106                        (-1765328278L)
+ #define KRB5PLACEHOLD_107                        (-1765328277L)
+ #define KRB5PLACEHOLD_108                        (-1765328276L)
+ #define KRB5PLACEHOLD_109                        (-1765328275L)
+ #define KRB5PLACEHOLD_110                        (-1765328274L)
+ #define KRB5PLACEHOLD_111                        (-1765328273L)
+ #define KRB5PLACEHOLD_112                        (-1765328272L)
+ #define KRB5PLACEHOLD_113                        (-1765328271L)
+ #define KRB5PLACEHOLD_114                        (-1765328270L)
+ #define KRB5PLACEHOLD_115                        (-1765328269L)
+ #define KRB5PLACEHOLD_116                        (-1765328268L)
+ #define KRB5PLACEHOLD_117                        (-1765328267L)
+ #define KRB5PLACEHOLD_118                        (-1765328266L)
+ #define KRB5PLACEHOLD_119                        (-1765328265L)
+ #define KRB5PLACEHOLD_120                        (-1765328264L)
+ #define KRB5PLACEHOLD_121                        (-1765328263L)
+ #define KRB5PLACEHOLD_122                        (-1765328262L)
+ #define KRB5PLACEHOLD_123                        (-1765328261L)
+ #define KRB5PLACEHOLD_124                        (-1765328260L)
+ #define KRB5PLACEHOLD_125                        (-1765328259L)
+ #define KRB5PLACEHOLD_126                        (-1765328258L)
+ #define KRB5PLACEHOLD_127                        (-1765328257L)
+ #define KRB5_ERR_RCSID                           (-1765328256L)
+ #define KRB5_LIBOS_BADLOCKFLAG                   (-1765328255L)
+ #define KRB5_LIBOS_CANTREADPWD                   (-1765328254L)
+ #define KRB5_LIBOS_BADPWDMATCH                   (-1765328253L)
+ #define KRB5_LIBOS_PWDINTR                       (-1765328252L)
+ #define KRB5_PARSE_ILLCHAR                       (-1765328251L)
+ #define KRB5_PARSE_MALFORMED                     (-1765328250L)
+ #define KRB5_CONFIG_CANTOPEN                     (-1765328249L)
+ #define KRB5_CONFIG_BADFORMAT                    (-1765328248L)
+ #define KRB5_CONFIG_NOTENUFSPACE                 (-1765328247L)
+ #define KRB5_BADMSGTYPE                          (-1765328246L)
+ #define KRB5_CC_BADNAME                          (-1765328245L)
+ #define KRB5_CC_UNKNOWN_TYPE                     (-1765328244L)
+ #define KRB5_CC_NOTFOUND                         (-1765328243L)
+ #define KRB5_CC_END                              (-1765328242L)
+ #define KRB5_NO_TKT_SUPPLIED                     (-1765328241L)
+ #define KRB5KRB_AP_WRONG_PRINC                   (-1765328240L)
+ #define KRB5KRB_AP_ERR_TKT_INVALID               (-1765328239L)
+ #define KRB5_PRINC_NOMATCH                       (-1765328238L)
+ #define KRB5_KDCREP_MODIFIED                     (-1765328237L)
+ #define KRB5_KDCREP_SKEW                         (-1765328236L)
+ #define KRB5_IN_TKT_REALM_MISMATCH               (-1765328235L)
+ #define KRB5_PROG_ETYPE_NOSUPP                   (-1765328234L)
+ #define KRB5_PROG_KEYTYPE_NOSUPP                 (-1765328233L)
+ #define KRB5_WRONG_ETYPE                         (-1765328232L)
+ #define KRB5_PROG_SUMTYPE_NOSUPP                 (-1765328231L)
+ #define KRB5_REALM_UNKNOWN                       (-1765328230L)
+ #define KRB5_SERVICE_UNKNOWN                     (-1765328229L)
+ #define KRB5_KDC_UNREACH                         (-1765328228L)
+ #define KRB5_NO_LOCALNAME                        (-1765328227L)
+ #define KRB5_MUTUAL_FAILED                       (-1765328226L)
+ #define KRB5_RC_TYPE_EXISTS                      (-1765328225L)
+ #define KRB5_RC_MALLOC                           (-1765328224L)
+ #define KRB5_RC_TYPE_NOTFOUND                    (-1765328223L)
+ #define KRB5_RC_UNKNOWN                          (-1765328222L)
+ #define KRB5_RC_REPLAY                           (-1765328221L)
+ #define KRB5_RC_IO                               (-1765328220L)
+ #define KRB5_RC_NOIO                             (-1765328219L)
+ #define KRB5_RC_PARSE                            (-1765328218L)
+ #define KRB5_RC_IO_EOF                           (-1765328217L)
+ #define KRB5_RC_IO_MALLOC                        (-1765328216L)
+ #define KRB5_RC_IO_PERM                          (-1765328215L)
+ #define KRB5_RC_IO_IO                            (-1765328214L)
+ #define KRB5_RC_IO_UNKNOWN                       (-1765328213L)
+ #define KRB5_RC_IO_SPACE                         (-1765328212L)
+ #define KRB5_TRANS_CANTOPEN                      (-1765328211L)
+ #define KRB5_TRANS_BADFORMAT                     (-1765328210L)
+ #define KRB5_LNAME_CANTOPEN                      (-1765328209L)
+ #define KRB5_LNAME_NOTRANS                       (-1765328208L)
+ #define KRB5_LNAME_BADFORMAT                     (-1765328207L)
+ #define KRB5_CRYPTO_INTERNAL                     (-1765328206L)
+ #define KRB5_KT_BADNAME                          (-1765328205L)
+ #define KRB5_KT_UNKNOWN_TYPE                     (-1765328204L)
+ #define KRB5_KT_NOTFOUND                         (-1765328203L)
+ #define KRB5_KT_END                              (-1765328202L)
+ #define KRB5_KT_NOWRITE                          (-1765328201L)
+ #define KRB5_KT_IOERR                            (-1765328200L)
+ #define KRB5_NO_TKT_IN_RLM                       (-1765328199L)
+ #define KRB5DES_BAD_KEYPAR                       (-1765328198L)
+ #define KRB5DES_WEAK_KEY                         (-1765328197L)
+ #define KRB5_BAD_ENCTYPE                         (-1765328196L)
+ #define KRB5_BAD_KEYSIZE                         (-1765328195L)
+ #define KRB5_BAD_MSIZE                           (-1765328194L)
+ #define KRB5_CC_TYPE_EXISTS                      (-1765328193L)
+ #define KRB5_KT_TYPE_EXISTS                      (-1765328192L)
+ #define KRB5_CC_IO                               (-1765328191L)
+ #define KRB5_FCC_PERM                            (-1765328190L)
+ #define KRB5_FCC_NOFILE                          (-1765328189L)
+ #define KRB5_FCC_INTERNAL                        (-1765328188L)
+ #define KRB5_CC_WRITE                            (-1765328187L)
+ #define KRB5_CC_NOMEM                            (-1765328186L)
+ #define KRB5_CC_FORMAT                           (-1765328185L)
+ #define KRB5_CC_NOT_KTYPE                        (-1765328184L)
+ #define KRB5_INVALID_FLAGS                       (-1765328183L)
+ #define KRB5_NO_2ND_TKT                          (-1765328182L)
+ #define KRB5_NOCREDS_SUPPLIED                    (-1765328181L)
+ #define KRB5_SENDAUTH_BADAUTHVERS                (-1765328180L)
+ #define KRB5_SENDAUTH_BADAPPLVERS                (-1765328179L)
+ #define KRB5_SENDAUTH_BADRESPONSE                (-1765328178L)
+ #define KRB5_SENDAUTH_REJECTED                   (-1765328177L)
+ #define KRB5_PREAUTH_BAD_TYPE                    (-1765328176L)
+ #define KRB5_PREAUTH_NO_KEY                      (-1765328175L)
+ #define KRB5_PREAUTH_FAILED                      (-1765328174L)
+ #define KRB5_RCACHE_BADVNO                       (-1765328173L)
+ #define KRB5_CCACHE_BADVNO                       (-1765328172L)
+ #define KRB5_KEYTAB_BADVNO                       (-1765328171L)
+ #define KRB5_PROG_ATYPE_NOSUPP                   (-1765328170L)
+ #define KRB5_RC_REQUIRED                         (-1765328169L)
+ #define KRB5_ERR_BAD_HOSTNAME                    (-1765328168L)
+ #define KRB5_ERR_HOST_REALM_UNKNOWN              (-1765328167L)
+ #define KRB5_SNAME_UNSUPP_NAMETYPE               (-1765328166L)
+ #define KRB5KRB_AP_ERR_V4_REPLY                  (-1765328165L)
+ #define KRB5_REALM_CANT_RESOLVE                  (-1765328164L)
+ #define KRB5_TKT_NOT_FORWARDABLE                 (-1765328163L)
+ #define KRB5_FWD_BAD_PRINCIPAL                   (-1765328162L)
+ #define KRB5_GET_IN_TKT_LOOP                     (-1765328161L)
+ #define KRB5_CONFIG_NODEFREALM                   (-1765328160L)
+ #define KRB5_SAM_UNSUPPORTED                     (-1765328159L)
+ #define KRB5_SAM_INVALID_ETYPE                   (-1765328158L)
+ #define KRB5_SAM_NO_CHECKSUM                     (-1765328157L)
+ #define KRB5_SAM_BAD_CHECKSUM                    (-1765328156L)
+ #define KRB5_KT_NAME_TOOLONG                     (-1765328155L)
+ #define KRB5_KT_KVNONOTFOUND                     (-1765328154L)
+ #define KRB5_APPL_EXPIRED                        (-1765328153L)
+ #define KRB5_LIB_EXPIRED                         (-1765328152L)
+ #define KRB5_CHPW_PWDNULL                        (-1765328151L)
+ #define KRB5_CHPW_FAIL                           (-1765328150L)
+ #define KRB5_KT_FORMAT                           (-1765328149L)
+ #define KRB5_NOPERM_ETYPE                        (-1765328148L)
+ #define KRB5_CONFIG_ETYPE_NOSUPP                 (-1765328147L)
+ #define KRB5_OBSOLETE_FN                         (-1765328146L)
+ #define KRB5_EAI_FAIL                            (-1765328145L)
+ #define KRB5_EAI_NODATA                          (-1765328144L)
+ #define KRB5_EAI_NONAME                          (-1765328143L)
+ #define KRB5_EAI_SERVICE                         (-1765328142L)
+ #define KRB5_ERR_NUMERIC_REALM                   (-1765328141L)
+ #define KRB5_ERR_BAD_S2K_PARAMS                  (-1765328140L)
+ #define KRB5_ERR_NO_SERVICE                      (-1765328139L)
+ #define KRB5_CC_READONLY                         (-1765328138L)
+ #define KRB5_CC_NOSUPP                           (-1765328137L)
+ #define KRB5_DELTAT_BADFORMAT                    (-1765328136L)
+ #define KRB5_PLUGIN_NO_HANDLE                    (-1765328135L)
+ #define ERROR_TABLE_BASE_krb5 (-1765328384L)
+ 
+ extern const struct error_table et_krb5_error_table;
+ 
+ #if !defined(_WIN32)
+ /* for compatibility with older versions... */
+ extern void initialize_krb5_error_table (void) /*@modifies internalState@*/;
+ #else
+ #define initialize_krb5_error_table()
+ #endif
+ 
+ #if !defined(_WIN32)
+ #define init_krb5_err_tbl initialize_krb5_error_table
+ #define krb5_err_base ERROR_TABLE_BASE_krb5
+ #endif
+ /*
+  * include/kdb5_err.h:
+  * This file is automatically generated; please do not edit it.
+  */
+ 
+ #include <com_err.h>
+ 
+ #define KRB5_KDB_RCSID                           (-1780008448L)
+ #define KRB5_KDB_INUSE                           (-1780008447L)
+ #define KRB5_KDB_UK_SERROR                       (-1780008446L)
+ #define KRB5_KDB_UK_RERROR                       (-1780008445L)
+ #define KRB5_KDB_UNAUTH                          (-1780008444L)
+ #define KRB5_KDB_NOENTRY                         (-1780008443L)
+ #define KRB5_KDB_ILL_WILDCARD                    (-1780008442L)
+ #define KRB5_KDB_DB_INUSE                        (-1780008441L)
+ #define KRB5_KDB_DB_CHANGED                      (-1780008440L)
+ #define KRB5_KDB_TRUNCATED_RECORD                (-1780008439L)
+ #define KRB5_KDB_RECURSIVELOCK                   (-1780008438L)
+ #define KRB5_KDB_NOTLOCKED                       (-1780008437L)
+ #define KRB5_KDB_BADLOCKMODE                     (-1780008436L)
+ #define KRB5_KDB_DBNOTINITED                     (-1780008435L)
+ #define KRB5_KDB_DBINITED                        (-1780008434L)
+ #define KRB5_KDB_ILLDIRECTION                    (-1780008433L)
+ #define KRB5_KDB_NOMASTERKEY                     (-1780008432L)
+ #define KRB5_KDB_BADMASTERKEY                    (-1780008431L)
+ #define KRB5_KDB_INVALIDKEYSIZE                  (-1780008430L)
+ #define KRB5_KDB_CANTREAD_STORED                 (-1780008429L)
+ #define KRB5_KDB_BADSTORED_MKEY                  (-1780008428L)
+ #define KRB5_KDB_CANTLOCK_DB                     (-1780008427L)
+ #define KRB5_KDB_DB_CORRUPT                      (-1780008426L)
+ #define KRB5_KDB_BAD_VERSION                     (-1780008425L)
+ #define KRB5_KDB_BAD_SALTTYPE                    (-1780008424L)
+ #define KRB5_KDB_BAD_ENCTYPE                     (-1780008423L)
+ #define KRB5_KDB_BAD_CREATEFLAGS                 (-1780008422L)
+ #define KRB5_KDB_NO_PERMITTED_KEY                (-1780008421L)
+ #define KRB5_KDB_NO_MATCHING_KEY                 (-1780008420L)
+ #define KRB5_KDB_DBTYPE_NOTFOUND                 (-1780008419L)
+ #define KRB5_KDB_DBTYPE_NOSUP                    (-1780008418L)
+ #define KRB5_KDB_DBTYPE_INIT                     (-1780008417L)
+ #define KRB5_KDB_SERVER_INTERNAL_ERR             (-1780008416L)
+ #define KRB5_KDB_ACCESS_ERROR                    (-1780008415L)
+ #define KRB5_KDB_INTERNAL_ERROR                  (-1780008414L)
+ #define KRB5_KDB_CONSTRAINT_VIOLATION            (-1780008413L)
+ #define ERROR_TABLE_BASE_kdb5 (-1780008448L)
+ 
+ extern const struct error_table et_kdb5_error_table;
+ 
+ #if !defined(_WIN32)
+ /* for compatibility with older versions... */
+ extern void initialize_kdb5_error_table (void) /*@modifies internalState@*/;
+ #else
+ #define initialize_kdb5_error_table()
+ #endif
+ 
+ #if !defined(_WIN32)
+ #define init_kdb5_err_tbl initialize_kdb5_error_table
+ #define kdb5_err_base ERROR_TABLE_BASE_kdb5
+ #endif
+ /*
+  * include/kv5m_err.h:
+  * This file is automatically generated; please do not edit it.
+  */
+ 
+ #include <com_err.h>
+ 
+ #define KV5M_NONE                                (-1760647424L)
+ #define KV5M_PRINCIPAL                           (-1760647423L)
+ #define KV5M_DATA                                (-1760647422L)
+ #define KV5M_KEYBLOCK                            (-1760647421L)
+ #define KV5M_CHECKSUM                            (-1760647420L)
+ #define KV5M_ENCRYPT_BLOCK                       (-1760647419L)
+ #define KV5M_ENC_DATA                            (-1760647418L)
+ #define KV5M_CRYPTOSYSTEM_ENTRY                  (-1760647417L)
+ #define KV5M_CS_TABLE_ENTRY                      (-1760647416L)
+ #define KV5M_CHECKSUM_ENTRY                      (-1760647415L)
+ #define KV5M_AUTHDATA                            (-1760647414L)
+ #define KV5M_TRANSITED                           (-1760647413L)
+ #define KV5M_ENC_TKT_PART                        (-1760647412L)
+ #define KV5M_TICKET                              (-1760647411L)
+ #define KV5M_AUTHENTICATOR                       (-1760647410L)
+ #define KV5M_TKT_AUTHENT                         (-1760647409L)
+ #define KV5M_CREDS                               (-1760647408L)
+ #define KV5M_LAST_REQ_ENTRY                      (-1760647407L)
+ #define KV5M_PA_DATA                             (-1760647406L)
+ #define KV5M_KDC_REQ                             (-1760647405L)
+ #define KV5M_ENC_KDC_REP_PART                    (-1760647404L)
+ #define KV5M_KDC_REP                             (-1760647403L)
+ #define KV5M_ERROR                               (-1760647402L)
+ #define KV5M_AP_REQ                              (-1760647401L)
+ #define KV5M_AP_REP                              (-1760647400L)
+ #define KV5M_AP_REP_ENC_PART                     (-1760647399L)
+ #define KV5M_RESPONSE                            (-1760647398L)
+ #define KV5M_SAFE                                (-1760647397L)
+ #define KV5M_PRIV                                (-1760647396L)
+ #define KV5M_PRIV_ENC_PART                       (-1760647395L)
+ #define KV5M_CRED                                (-1760647394L)
+ #define KV5M_CRED_INFO                           (-1760647393L)
+ #define KV5M_CRED_ENC_PART                       (-1760647392L)
+ #define KV5M_PWD_DATA                            (-1760647391L)
+ #define KV5M_ADDRESS                             (-1760647390L)
+ #define KV5M_KEYTAB_ENTRY                        (-1760647389L)
+ #define KV5M_CONTEXT                             (-1760647388L)
+ #define KV5M_OS_CONTEXT                          (-1760647387L)
+ #define KV5M_ALT_METHOD                          (-1760647386L)
+ #define KV5M_ETYPE_INFO_ENTRY                    (-1760647385L)
+ #define KV5M_DB_CONTEXT                          (-1760647384L)
+ #define KV5M_AUTH_CONTEXT                        (-1760647383L)
+ #define KV5M_KEYTAB                              (-1760647382L)
+ #define KV5M_RCACHE                              (-1760647381L)
+ #define KV5M_CCACHE                              (-1760647380L)
+ #define KV5M_PREAUTH_OPS                         (-1760647379L)
+ #define KV5M_SAM_CHALLENGE                       (-1760647378L)
+ #define KV5M_SAM_CHALLENGE_2                     (-1760647377L)
+ #define KV5M_SAM_KEY                             (-1760647376L)
+ #define KV5M_ENC_SAM_RESPONSE_ENC                (-1760647375L)
+ #define KV5M_ENC_SAM_RESPONSE_ENC_2              (-1760647374L)
+ #define KV5M_SAM_RESPONSE                        (-1760647373L)
+ #define KV5M_SAM_RESPONSE_2                      (-1760647372L)
+ #define KV5M_PREDICTED_SAM_RESPONSE              (-1760647371L)
+ #define KV5M_PASSWD_PHRASE_ELEMENT               (-1760647370L)
+ #define KV5M_GSS_OID                             (-1760647369L)
+ #define KV5M_GSS_QUEUE                           (-1760647368L)
+ #define ERROR_TABLE_BASE_kv5m (-1760647424L)
+ 
+ extern const struct error_table et_kv5m_error_table;
+ 
+ #if !defined(_WIN32)
+ /* for compatibility with older versions... */
+ extern void initialize_kv5m_error_table (void) /*@modifies internalState@*/;
+ #else
+ #define initialize_kv5m_error_table()
+ #endif
+ 
+ #if !defined(_WIN32)
+ #define init_kv5m_err_tbl initialize_kv5m_error_table
+ #define kv5m_err_base ERROR_TABLE_BASE_kv5m
+ #endif
+ /*
+  * include/krb524_err.h:
+  * This file is automatically generated; please do not edit it.
+  */
+ 
+ #include <com_err.h>
+ 
+ #define KRB524_BADKEY                            (-1750206208L)
+ #define KRB524_BADADDR                           (-1750206207L)
+ #define KRB524_BADPRINC                          (-1750206206L)
+ #define KRB524_BADREALM                          (-1750206205L)
+ #define KRB524_V4ERR                             (-1750206204L)
+ #define KRB524_ENCFULL                           (-1750206203L)
+ #define KRB524_DECEMPTY                          (-1750206202L)
+ #define KRB524_NOTRESP                           (-1750206201L)
+ #define KRB524_KRB4_DISABLED                     (-1750206200L)
+ #define ERROR_TABLE_BASE_k524 (-1750206208L)
+ 
+ extern const struct error_table et_k524_error_table;
+ 
+ #if !defined(_WIN32)
+ /* for compatibility with older versions... */
+ extern void initialize_k524_error_table (void) /*@modifies internalState@*/;
+ #else
+ #define initialize_k524_error_table()
+ #endif
+ 
+ #if !defined(_WIN32)
+ #define init_k524_err_tbl initialize_k524_error_table
+ #define k524_err_base ERROR_TABLE_BASE_k524
+ #endif
+ /*
+  * include/asn1_err.h:
+  * This file is automatically generated; please do not edit it.
+  */
+ 
+ #include <com_err.h>
+ 
+ #define ASN1_BAD_TIMEFORMAT                      (1859794432L)
+ #define ASN1_MISSING_FIELD                       (1859794433L)
+ #define ASN1_MISPLACED_FIELD                     (1859794434L)
+ #define ASN1_TYPE_MISMATCH                       (1859794435L)
+ #define ASN1_OVERFLOW                            (1859794436L)
+ #define ASN1_OVERRUN                             (1859794437L)
+ #define ASN1_BAD_ID                              (1859794438L)
+ #define ASN1_BAD_LENGTH                          (1859794439L)
+ #define ASN1_BAD_FORMAT                          (1859794440L)
+ #define ASN1_PARSE_ERROR                         (1859794441L)
+ #define ASN1_BAD_GMTIME                          (1859794442L)
+ #define ASN1_MISMATCH_INDEF                      (1859794443L)
+ #define ASN1_MISSING_EOC                         (1859794444L)
+ #define ERROR_TABLE_BASE_asn1 (1859794432L)
+ 
+ extern const struct error_table et_asn1_error_table;
+ 
+ #if !defined(_WIN32)
+ /* for compatibility with older versions... */
+ extern void initialize_asn1_error_table (void) /*@modifies internalState@*/;
+ #else
+ #define initialize_asn1_error_table()
+ #endif
+ 
+ #if !defined(_WIN32)
+ #define init_asn1_err_tbl initialize_asn1_error_table
+ #define asn1_err_base ERROR_TABLE_BASE_asn1
+ #endif
Index: openafs/src/WINNT/kfw/inc/leash/leashwin.h
diff -c openafs/src/WINNT/kfw/inc/leash/leashwin.h:1.2 openafs/src/WINNT/kfw/inc/leash/leashwin.h:1.2.14.1
*** openafs/src/WINNT/kfw/inc/leash/leashwin.h:1.2	Sun Jul 25 17:45:24 2004
--- openafs/src/WINNT/kfw/inc/leash/leashwin.h	Thu Oct 12 17:42:40 2006
***************
*** 3,12 ****
  
  #include <krb.h>
  
- typedef struct {
-     int dlgtype;
  #define DLGTYPE_PASSWD   0
  #define DLGTYPE_CHPASSWD 1
      // Tells whether dialog box is in change pwd more or init ticket mode???
      // (verify this):
      int dlgstatemax; // What is this???
--- 3,12 ----
  
  #include <krb.h>
  
  #define DLGTYPE_PASSWD   0
  #define DLGTYPE_CHPASSWD 1
+ typedef struct {
+     int dlgtype;
      // Tells whether dialog box is in change pwd more or init ticket mode???
      // (verify this):
      int dlgstatemax; // What is this???
***************
*** 15,51 ****
      LPSTR principal;
  } LSH_DLGINFO, FAR *LPLSH_DLGINFO;
  
! #define LEASH_USERNAME_SZ  64
! #define LEASH_REALM_SZ    192
  
  typedef struct {
! 	DWORD size;
      int dlgtype;
! #define DLGTYPE_PASSWD   0
! #define DLGTYPE_CHPASSWD 1
!     // Tells whether dialog box is in change pwd more or init ticket mode???
!     // (verify this):
!     LPSTR title;
!     LPSTR username;
! 	LPSTR realm;
! 	int   use_defaults;
! 	int   forwardable;
! 	int   noaddresses;
! 	int   lifetime;
! 	int   renew_till;
! 	int   proxiable;
! 	int   publicip;
!     // Version 1 of this structure ended here
      struct {
          char username[LEASH_USERNAME_SZ];
          char realm[LEASH_REALM_SZ];
      } out;
! } LSH_DLGINFO_EX, FAR *LPLSH_DLGINFO_EX;
  
  #define LSH_DLGINFO_EX_V1_SZ (sizeof(DWORD) + 3 * sizeof(LPSTR) + 8 * sizeof(int))
! #define LSH_DLGINFO_EX_V2_SZ (sizeof(DWORD) + 3 * sizeof(LPSTR) + 8 * sizeof(int) + max(LEASH_USERNAME_SZ,LEASH_REALM_SZ))
  
! typedef struct {                                                
      char    principal[MAX_K_NAME_SZ]; /* Principal name/instance/realm */
      int     btickets;                 /* Do we have tickets? */
      long    lifetime;                 /* Lifetime -- needs to have
--- 15,99 ----
      LPSTR principal;
  } LSH_DLGINFO, FAR *LPLSH_DLGINFO;
  
! #define LEASH_USERNAME_SZ        64
! #define LEASH_REALM_SZ          192
! #define LEASH_TITLE_SZ          128
! #define LEASH_CCACHE_NAME_SZ 	264
  
  typedef struct {
!     DWORD size;
      int dlgtype;
!     // Tells whether dialog box is in change pwd mode or init ticket mode
!     LPSTR title;		// in v3, set to in.title
!     LPSTR username;		// in v3, set to in.username
!     LPSTR realm;		// in v3, set to in.realm
!     int   use_defaults;
!     int   forwardable;
!     int   noaddresses;
!     int   lifetime;
!     int   renew_till;
!     int   proxiable;
!     int   publicip;
!     // Version 1 of this structure ends here
      struct {
          char username[LEASH_USERNAME_SZ];
          char realm[LEASH_REALM_SZ];
+ 	// Version 2 of this structure ends here
+ 	char ccache[LEASH_CCACHE_NAME_SZ];
      } out;
!     struct {
! 	char title[LEASH_TITLE_SZ];
! 	char username[LEASH_USERNAME_SZ];
! 	char realm[LEASH_REALM_SZ];
! 	char ccache[LEASH_CCACHE_NAME_SZ];
!     } in;
! } LSH_DLGINFO_EX, *LPLSH_DLGINFO_EX;
  
  #define LSH_DLGINFO_EX_V1_SZ (sizeof(DWORD) + 3 * sizeof(LPSTR) + 8 * sizeof(int))
! #define LSH_DLGINFO_EX_V2_SZ (LSH_DLGINFO_EX_V1_SZ + LEASH_USERNAME_SZ + LEASH_REALM_SZ)
! #define LSH_DLGINFO_EX_V3_SZ (LSH_DLGINFO_EX_V2_SZ + LEASH_TITLE_SZ + LEASH_USERNAME_SZ + LEASH_REALM_SZ + 2 * LEASH_CCACHE_NAME_SZ)
! 
! #ifndef NETIDMGR
! #define NETID_USERNAME_SZ       128
! #define NETID_REALM_SZ          192
! #define NETID_TITLE_SZ          256
! #define NETID_CCACHE_NAME_SZ 	264
  
! #define NETID_DLGTYPE_TGT      0
! #define NETID_DLGTYPE_CHPASSWD 1
! typedef struct {
!     DWORD size;
!     DWORD dlgtype;
!     // Tells whether dialog box is in change pwd mode or init ticket mode
!     struct {
! 	WCHAR title[NETID_TITLE_SZ];
! 	WCHAR username[NETID_USERNAME_SZ];
! 	WCHAR realm[NETID_REALM_SZ];
! 	WCHAR ccache[NETID_CCACHE_NAME_SZ];
! 	DWORD use_defaults;
! 	DWORD forwardable;
! 	DWORD noaddresses;
! 	DWORD lifetime;
! 	DWORD renew_till;
! 	DWORD proxiable;
! 	DWORD publicip;
! 	DWORD must_use_specified_principal;
!     } in;
!     struct {
!         WCHAR username[NETID_USERNAME_SZ];
!         WCHAR realm[NETID_REALM_SZ];
! 	WCHAR ccache[NETID_CCACHE_NAME_SZ];
!     } out;
!     // Version 1 of this structure ends here
! } NETID_DLGINFO, *LPNETID_DLGINFO;
! 
! #define NETID_DLGINFO_V1_SZ (10 * sizeof(DWORD) \
!         + sizeof(WCHAR) * (NETID_TITLE_SZ + \
!         2 * NETID_USERNAME_SZ + 2 * NETID_REALM_SZ + \
!         2 * NETID_CCACHE_NAME_SZ))
! #endif /* NETIDMGR */
! 
! typedef struct {
      char    principal[MAX_K_NAME_SZ]; /* Principal name/instance/realm */
      int     btickets;                 /* Do we have tickets? */
      long    lifetime;                 /* Lifetime -- needs to have
Index: openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-com_err.h
diff -c openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-com_err.h:1.1 openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-com_err.h:1.1.14.1
*** openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-com_err.h:1.1	Thu Feb 26 14:22:56 2004
--- openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-com_err.h	Thu Oct 12 17:42:40 2006
***************
*** 4,10 ****
--- 4,14 ----
  #include "loadfuncs.h"
  #include <com_err.h>
  
+ #if defined(_WIN64)
+ #define COMERR_DLL      "comerr64.dll"
+ #else
  #define COMERR_DLL      "comerr32.dll"
+ #endif
  
  TYPEDEF_FUNC(
      void,
Index: openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-krb5.h
diff -c openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-krb5.h:1.2 openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-krb5.h:1.2.14.1
*** openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-krb5.h:1.2	Sun Jul 25 17:45:25 2004
--- openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-krb5.h	Thu Oct 12 17:42:40 2006
***************
*** 4,10 ****
--- 4,14 ----
  #include "loadfuncs.h"
  #include <krb5.h>
  
+ #if defined(_WIN64)
+ #define KRB5_DLL      "krb5_64.dll"
+ #else
  #define KRB5_DLL      "krb5_32.dll"
+ #endif
  
  TYPEDEF_FUNC(
      void,
Index: openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-leash.h
diff -c openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-leash.h:1.2 openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-leash.h:1.2.14.1
*** openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-leash.h:1.2	Sun Jul 25 17:45:25 2004
--- openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-leash.h	Thu Oct 12 17:42:40 2006
***************
*** 4,10 ****
--- 4,14 ----
  #include "loadfuncs.h"
  #include <leashwin.h>
  
+ #if defined(_WIN64)
+ #define LEASH_DLL      "leashw64.dll"
+ #else
  #define LEASH_DLL      "leashw32.dll"
+ #endif
  
  #define CALLCONV_C
  
Index: openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-profile.h
diff -c openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-profile.h:1.1 openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-profile.h:1.1.14.1
*** openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-profile.h:1.1	Thu Feb 26 14:22:56 2004
--- openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-profile.h	Thu Oct 12 17:42:40 2006
***************
*** 4,10 ****
--- 4,14 ----
  #include "loadfuncs.h"
  #include <profile.h>
  
+ #if defined(_WIN64)
+ #define PROFILE_DLL      "xpprof64.dll"
+ #else
  #define PROFILE_DLL      "xpprof32.dll"
+ #endif
  
  TYPEDEF_FUNC(
      long,
Index: openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-wshelper.h
diff -c openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-wshelper.h:1.1 openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-wshelper.h:1.1.14.1
*** openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-wshelper.h:1.1	Thu Feb 26 14:22:56 2004
--- openafs/src/WINNT/kfw/inc/loadfuncs/loadfuncs-wshelper.h	Thu Oct 12 17:42:40 2006
***************
*** 4,10 ****
--- 4,14 ----
  #include <loadfuncs.h>
  #include <wshelper.h>
  
+ #if defined(_WIN64)
+ #define WSHELPER_DLL "wshelp64.dll"
+ #else
  #define WSHELPER_DLL "wshelp32.dll"
+ #endif
  #define CALLCONV_C
  
  TYPEDEF_FUNC(
Index: openafs/src/WINNT/kfw/inc/netidmgr/hashtable.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/hashtable.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:24 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/hashtable.h	Thu Oct 12 17:42:40 2006
***************
*** 0 ****
--- 1,223 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: hashtable.h,v 1.1.2.2 2006/10/12 21:42:40 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_HASHTABLE_H
+ #define __KHIMAIRA_HASHTABLE_H
+ 
+ /*! \addtogroup util
+   @{ */
+ 
+ /*! \defgroup util_ht Hashtable
+   @{*/
+ 
+ #include<khdefs.h>
+ #include<khlist.h>
+ 
+ /*! \brief A hash function
+ 
+     The function should take a key as a parameter and return an
+     khm_int32 that serves as the hash of the key.
+  */
+ typedef khm_int32 (*hash_function_t)(const void *key);
+ 
+ /*! \brief A comparison function
+ 
+     The function takes two keys and returns a value indicating the
+     relative ordering of the two keys.
+ 
+     The return value should be:
+     - \b Zero if \a key1 == \a key2
+     - \b Negative if \a key1 &lt; \a key2
+     - \b Positive if \a key1 &gt; \a key2
+  */
+ typedef khm_int32 (*comp_function_t)(const void *key1, const void *key2);
+ 
+ /*! \brief Add-reference function
+ 
+     When an object is successfully added to a hashtable, this function
+     will be called with the \a key and \a data used to add the object.
+     The function is allowed to modify \a data, however, the
+     modification should not alter the \a key or the relationship
+     between \a key and \a data.
+  */
+ typedef void (*add_ref_function_t)(const void *key, void *data);
+ 
+ /*! \brief Delete-reference function
+ 
+     When an object is successfully removed from the hashtable, this
+     function will be called.  As with the add-ref function, the object
+     can be modified, but the \a key and the relationship between \a
+     key and \a data should remain intact.
+ 
+     An object is removed if it is explicitly removed from the
+     hashtable or another object with the same \a key is added to the
+     hashtable.  There should be a 1-1 correspondence with keys and
+     objects in the hashtable.  The delete-reference function will be
+     called on all the remaining objects in the hashtable when the
+     hashtable is deleted.
+  */
+ typedef void (*del_ref_function_t)(const void *key, void *data);
+ 
+ typedef struct tag_hash_bin {
+     void * data;
+     void * key;
+ 
+     LDCL(struct tag_hash_bin);
+ } hash_bin;
+ 
+ typedef struct hashtable_t {
+     khm_int32 n;
+     hash_function_t hash;
+     comp_function_t comp;
+     add_ref_function_t addr;
+     del_ref_function_t delr;
+     hash_bin ** bins;
+ } hashtable;
+ 
+ /*! \brief Create a new hashtable
+ 
+     \param[in] n Number of bins in hashtable.
+     \param[in] hash A hash function. Required.
+     \param[in] comp A comparator.  Required.
+     \param[in] addr An add-ref function.  Optional; can be NULL.
+     \param[in] delr A del-ref function. Optional; can be NULL.
+ 
+  */
+ KHMEXP hashtable * KHMAPI hash_new_hashtable(khm_int32 n, 
+                                hash_function_t hash, 
+                                comp_function_t comp,
+                                add_ref_function_t addr,
+                                del_ref_function_t delr);
+ 
+ /*! \brief Delete a hashtable
+ 
+     \note Not thread-safe.  Applications must serialize calls that
+         reference the same hashtable.
+  */
+ KHMEXP void KHMAPI hash_del_hashtable(hashtable * h);
+ 
+ /*! \brief Add an object to a hashtable
+ 
+     Creates an association between the \a key and \a data in the
+     hashtable \a h.  If there is an add-ref function defined for the
+     hashtable, it will be called with \a key and \data after the
+     object is added.  If there is already an object with the same key
+     in the hashtable, that object will be removed (and the del-ref
+     function called, if appilcable) before adding the new object and
+     before the add-ref function is called for the new object.
+ 
+     Note that two keys \a key1 and \a key2 are equal (or same) in a
+     hashtable if the comparator returns zero when called with \a key1
+     and \a key2.
+ 
+     Also note that all additions and removals to the hashtable are
+     done by reference.  No data is copied.  Any objects pointed to are
+     expected to exist for the duration that the object and key are
+     contained in the hashtable.
+ 
+     \param[in] h Hashtable
+     \param[in] key A key.  If \a key points to a location in memory,
+         it should be within the object pointed to by \a data, or be a
+         constant. Can be NULL.
+     \param[in] data Data. Cannot be NULL.
+ 
+     \note Not thread-safe.  Applications must serialize calls that
+         reference the same hashtable.
+  */
+ KHMEXP void KHMAPI hash_add(hashtable * h, void * key, void * data);
+ 
+ /*! \brief Delete an object from a hashtable
+ 
+     Deletes the object in the hashtable \a h that is associated with
+     key \a key.  An object is associated with key \a key if the key \a
+     key_o that the object is associated with is the same as \a key as
+     determined by the comparator.  If the del-ref function is defined
+     for the hash-table, it will be called with the \a key_o and \a
+     data that was used to add the object.
+ 
+     \note Not thread-safe.  Applications must serialize calls that
+         reference the same hashtable.
+  */
+ KHMEXP void KHMAPI hash_del(hashtable * h, void * key);
+ 
+ /*! \brief Resolve and association
+ 
+     Return the object that is associated with key \a key in hashtable
+     \a h.  An object \a data is associated with key \a key in \a h if
+     the key \a key_o that was used to add \a data to \a h is equal to
+     \a key as determined by the comparator.
+ 
+     Returns NULL if no association is found.
+ 
+     \note Not thread-safe.  Applications must serialize calls that
+         reference the same hashtable.
+  */
+ KHMEXP void * KHMAPI hash_lookup(hashtable * h, void * key);
+ 
+ /*! \brief Check for the presence of an association
+ 
+     Returns non-zero if there exists an association between key \a key
+     and some object in hashtable \a h.  See hash_lookup() for
+     definition of "association".
+ 
+     Returns zero if there is no association.
+ 
+     \note (hash_lookup(h,key) == NULL) iff (hash_exist(h,key)==0)
+ 
+     \note Not thead-safe.  Application must serialize calls that
+         reference the same hashtable.
+  */
+ KHMEXP khm_boolean KHMAPI hash_exist(hashtable * h, void * key);
+ 
+ /*! \brief Compute a hashvalue for a unicode string
+ 
+     The hash value is computed using DJB with parameter 13331.
+ 
+     This function is suitable for use as the hash function for a
+     hashtable if the keys are NULL terminated safe unicode strings
+     that are either part of the data objects or are constants.
+ 
+     \param[in] str A pointer to a NULL terminated wchar_t string cast
+         as (void *).
+  */
+ KHMEXP khm_int32 hash_string(const void *str);
+ 
+ /*! \brief Compare two strings
+ 
+     Compares two strings are returns a value that is in accordance
+     with the comparator for a hashtable.
+ 
+     \param[in] vs1 A pointer to a NULL terminated wchar_t string cast
+         as (void *).
+     \param[in] vs2 A pointer to a NULL terminated wchar_t string cast
+         as (void *).
+  */
+ KHMEXP khm_int32 hash_string_comp(const void *vs1, const void *vs2);
+ 
+ /*@}*/
+ /*@}*/
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/kconfig.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/kconfig.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:24 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/kconfig.h	Thu Oct 12 17:42:40 2006
***************
*** 0 ****
--- 1,954 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: kconfig.h,v 1.1.2.2 2006/10/12 21:42:40 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_KCONFIG_H
+ #define __KHIMAIRA_KCONFIG_H
+ 
+ #include<khdefs.h>
+ #include<mstring.h>
+ 
+ /*! \defgroup kconf NetIDMgr Configuration Provider */
+ /*@{*/
+ 
+ /*! \brief Configuration schema descriptor record 
+ 
+     The schema descriptor is a convenient way to provide a default set
+     of configuration options for a part of an application.  It
+     describes the configuration spaces and the values and subspaces
+     contained in each space.
+ 
+     \see kconf_load_schema()
+ */
+ typedef struct tag_kconf_schema {
+     wchar_t *   name;       /*!< name of the object being described.
+                                 Optional for KC_ENDSPACE type object,
+                                 but required for everything else.
+                                 Names can be upto KCONF_MAXCCH_NAME
+                                 characters in length. */
+     khm_int32   type;       /*!< type of the object.  Can be one of
+                                 KC_SPACE, KC_ENDSPACE, KC_INT32,
+                                 KC_INT64, KC_STRING or KC_BINARY */
+     khm_ui_8    value;      /*!< the value of the object.  It is not
+                                 used for KC_SPACE and KC_ENDSPACE
+                                 typed objects.  For a KC_STRING, this
+                                 contains a pointer to the string
+                                 value.  The string should not be
+                                 longer than KCONF_MAXCCH_STRING
+                                 characters. KC_INT32 and KC_INT64
+                                 objects store the value directly in
+                                 this field, while KC_BINARY objects do
+                                 not support defining a default value
+                                 here. */
+     wchar_t *   description;/*!< a friendly description of the value
+                                 or configuration space. */
+ } kconf_schema;
+ 
+ /*! \name Configuration data types
+   @{*/
+ /*! \brief Not a known type */
+ #define KC_NONE         0
+ 
+ /*! \brief When used as ::kconf_schema \a type, defines the start of a configuration space.
+ 
+     There should be a subsequent KC_ENDSPACE record in the schema
+     which defines the end of this configuration space.
+ 
+     \a name specifies the name of the configuration space.  Optionally
+     use \a description to provide a description.*/
+ #define KC_SPACE        1
+ 
+ /*! \brief Ends a configuration space started with KC_SPACE */
+ #define KC_ENDSPACE     2
+ 
+ /*! \brief A 32 bit integer
+ 
+     Specifies a configuration parameter named \a name which is of this
+     type.  Use \a description to provide an optional description of
+     the value.
+ 
+     \a value specifies a default value for this parameter in the lower
+     32 bits.
+ */
+ #define KC_INT32        3
+ 
+ /*! \brief A 64 bit integer 
+ 
+     Specifies a configuration parameter named \a name which is of this
+     type.  Use \a description to provide an optional description of
+     the value.
+ 
+     \a value specifies a default value for this parameter.
+ */
+ #define KC_INT64        4
+ 
+ /*! \brief A unicode string 
+ 
+     Specifies a configuration parameter named \a name which is of this
+     type.  Use \a description to provide an optional description of
+     the value.
+ 
+     \a value specifies a default value for this parameter which should
+     be a pointer to a NULL terminated unicode string of no more than
+     ::KCONF_MAXCCH_STRING characters.
+ */
+ #define KC_STRING       5
+ 
+ /*! \brief An unparsed binary stream 
+ 
+     Specifies a configuration parameter named \a name which is of this
+     type.  Use \a description to provide an optional description of
+     the value.
+ 
+     Default values are not supported for binary streams.  \a value is
+     ignored.
+ */
+ #define KC_BINARY       6
+ /*@}*/
+ 
+ /*! \brief This is the root configuration space */
+ #define KCONF_FLAG_ROOT          0x00000001
+ 
+ /*! \brief Indicates the configuration store which stores user-specific information */
+ #define KCONF_FLAG_USER          0x00000002
+ 
+ /*! \brief Indicates the configuration store which stores machine-specific information */
+ #define KCONF_FLAG_MACHINE       0x00000004
+ 
+ /*! \brief Indicates the configuration store which stores the schema */
+ #define KCONF_FLAG_SCHEMA        0x00000008
+ 
+ /*! \brief Indicates that the last component of the given configuration path is to be considered to be a configuration value */
+ #define KCONF_FLAG_TRAILINGVALUE 0x00000020
+ 
+ /*! \brief Only write values back there is a change
+ 
+     Any write operations using the handle with check if the value
+     being written is different from the value being read from the
+     handle.  It will only be written if the value is different.
+ 
+     \note Note that the value being read from a handle takes schema and
+     shadowed configuration handles into consideration while the value
+     being written is only written to the topmost layer of
+     configuration that can be written to.
+ 
+     \note Note also that this flag does not affect binary values.
+  */
+ #define KCONF_FLAG_WRITEIFMOD    0x00000040
+ 
+ /*! \brief Use case-insensitive comparison for KCONF_FLAG_WRITEIFMOD
+ 
+     When used in combination with \a KCONF_FLAG_WRITEIFMOD , the
+     string comparison used when determining whether the string read
+     from the configuration handle is the same as the string being
+     written will be case insensitive.  If this flag is not set, the
+     comparison will be case sensitive.
+  */
+ #define KCONF_FLAG_IFMODCI     0x00000080
+ 
+ /*! \brief Do not parse the configuration space name
+ 
+     If set, disables the parsing of the configuration space for
+     subspaces.  The space name is taken verbatim to be a configuration
+     space name.  This can be used when there can be forward slashes or
+     backslahes in the name which are not escaped.
+ 
+     By default, the configuration space name,
+ 
+     \code
+     L"foo\\bar"
+     \endcode
+ 
+     is taken to mean the configuration space \a bar which is a
+     subspace of \a foo.  If ::KCONF_FLAG_NOPARSENAME is set, then this
+     is taken to mean configuration space \a foo\\bar.
+  */
+ #define KCONF_FLAG_NOPARSENAME   0x00000040
+ 
+ /*! \brief Maximum number of allowed characters (including terminating NULL) in a name 
+ 
+     \note This is a hard limit in Windows, since we are mapping
+         configuration spaces to registry keys.
+ */
+ #define KCONF_MAXCCH_NAME 256
+ 
+ /*! \brief Maximum number of allowed bytes (including terminating NULL) in a name */
+ #define KCONF_MAXCB_NAME (KCONF_MAXCCH_NAME * sizeof(wchar_t))
+ 
+ /*! \brief Maximum level of nesting for configuration spaces
+  */
+ #define KCONF_MAX_DEPTH 16
+ 
+ /*! \brief Maximum number of allowed characters (including terminating NULL) in a configuration path */
+ #define KCONF_MAXCCH_PATH (KCONF_MAXCCH_NAME * KCONF_MAX_DEPTH)
+ 
+ /*! \brief Maximum number of allowed bytes (including terminating NULL) in a configuration path */
+ #define KCONF_MAXCB_PATH (KCONF_MAXCCH_PATH * sizeof(wchar_t))
+ 
+ /*! \brief Maximum number of allowed characters (including terminating NULL) in a string */
+ #define KCONF_MAXCCH_STRING KHM_MAXCCH_STRING
+ 
+ /*! \brief Maximum number of allowed bytes (including terminating NULL) in a string */
+ #define KCONF_MAXCB_STRING (KCONF_MAXCCH_STRING * sizeof(wchar_t))
+ 
+ /*! \brief Open a configuration space
+ 
+     Opens the configuration space specified by \a cspace.  By default,
+     the opened space includes user,machine and schema configuration
+     stores.  However, you can specify a subset of these.
+ 
+     If the configuration space does not exist and the \a flags specify
+     KHM_FLAG_CREATE, then the configuration space is created.  The
+     stores that are affected by the create operation depend on \a
+     flags.  If the \a flags only specifies ::KCONF_FLAG_MACHINE, then
+     the configuration space is created in the machine store.  If \a
+     flags specifies any combination of stores including \a
+     ::KCONF_FLAG_USER, then the configuration space is created in the
+     user store.  Note that ::KCONF_FLAG_SCHEMA is readonly.
+ 
+     Once opened, use khc_close_space() to close the configuration
+     space.
+ 
+     \param[in] parent The parent configuration space.  The path
+         specified in \a cspace is relative to the parent.  Set this to
+         NULL to indicate the root configuration space.  
+ 
+     \param[in] cspace The confiuration path.  This can be up to
+         ::KCONF_MAXCCH_PATH characters in length.  Use either
+         backslashes or forward slashes to specify hiearchy.  Set this
+         to NULL to reopen the parent configuration space.
+ 
+     \param[in] flags Flags.  This can be a combination of KCONF_FLAG_*
+         constants and KHM_FLAG_CREATE.  If none of ::KCONF_FLAG_USER,
+         ::KCONF_FLAG_MACHINE or ::KCONF_FLAG_SCHEMA is specified, then
+         it defaults to all three.
+ 
+     \param[out] result Pointer to a handle which receives the handle
+         to the opened configuration space if the call succeeds.
+ 
+     \note You can re-open a configuration space with different flags
+         such as ::KCONF_FLAG_MACHINE by specifying NULL for \a cspace
+         and settings \a flags to the required flags.
+ 
+ */
+ KHMEXP khm_int32 KHMAPI 
+ khc_open_space(khm_handle parent, const wchar_t * cspace, khm_int32 flags, 
+                khm_handle * result);
+ 
+ /*! \brief Set the shadow space for a configuration handle
+ 
+     The handle specified by \a lower becomes a shadow for the handle
+     specified by \a upper.  Any configuration value that is queried in
+     \a upper that does not exist in \a upper will be queried in \a
+     lower.
+ 
+     If \a upper already had a shadow handle, that handle will be
+     replaced by \a lower.  The handle \a lower still needs to be
+     closed by a call to khc_close_space().  However, closing \a lower
+     will not affect \a upper which will still treat the configuration
+     space pointed to by \a lower to be it's shadow.
+ 
+     Shadows are specific to handles and not configuration spaces.
+     Shadowing a configuration space using one handle does not affect
+     any other handles which may be obtained for the same configuration
+     space.
+ 
+     Specify NULL for \a lower to remove any prior shadow.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khc_shadow_space(khm_handle upper, khm_handle lower);
+ 
+ /*! \brief Close a handle opened with khc_open_space()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ khc_close_space(khm_handle conf);
+ 
+ /*! \brief Read a string value from a configuration space
+ 
+     The \a value_name parameter specifies the value to read from the
+     configuration space.  This can be either a value name or a value
+     path consisting of a series nested configuration space names
+     followed by the value name all separated by backslashes or forward
+     slashes.
+ 
+     For example: If \a conf is a handle to the configuration space \c
+     'A/B/C', then the value name \c 'D/E/v' refers to the value named
+     \c 'v' in the configuration space \c 'A/B/C/D/E'.
+ 
+     The specific configuration store that is used to access the value
+     depends on the flags that were specified in the call to
+     khc_open_space().  The precedence of configuration stores are as
+     follows:
+ 
+     - If KCONF_FLAG_USER was specified, then the user configuration
+       space.
+ 
+     - Otherwise, if KCONF_FLAG_MACHINE was specified, then the machine
+       configuration space.
+ 
+     - Otherwise, if KCONF_FLAG_SCHEMA was specified, the the schema
+       store.
+ 
+     Note that not specifying any of the configuration store specifiers
+     in the call to khc_open_space() is equivalent to specifying all
+     three.
+ 
+     If the value is not found in the configuration space and any
+     shadowed configuration spaces, the function returns \a
+     KHM_ERROR_NOT_FOUND.  In this case, the buffer is left unmodified.
+ 
+     \param[in] buf Buffer to copy the string to.  Specify NULL to just
+         retrieve the number of required bytes.
+     
+     \param[in,out] bufsize On entry, specifies the number of bytes of
+         space available at the location specified by \a buf.  On exit
+         specifies the number of bytes actually copied or the size of
+         the required buffer if \a buf is NULL or insufficient.
+ 
+     \retval KHM_ERROR_NOT_READY The configuration provider has not started
+     \retval KHM_ERROR_INVALID_PARAM One or more of the supplied parameters are not valid
+     \retval KHM_ERROR_TYPE_MISMATCH The specified value is not a string
+     \retval KHM_ERROR_TOO_LONG \a buf was NULL or the size of the buffer was insufficient.  The required size is in bufsize.
+     \retval KHM_ERROR_SUCCESS Success.  The number of bytes copied is in bufsize.
+     \retval KHM_ERROR_NOT_FOUND The value was not found.
+ 
+     \see khc_open_space()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ khc_read_string(khm_handle conf, 
+                 const wchar_t * value_name, 
+                 wchar_t * buf, 
+                 khm_size * bufsize);
+ 
+ /*! \brief Read a multi-string value from a configuration space
+ 
+     The \a value_name parameter specifies the value to read from the
+     configuration space.  This can be either a value name or a value
+     path consisting of a series nested configuration space names
+     followed by the value name all separated by backslashes or forward
+     slashes.
+ 
+     For example: If \a conf is a handle to the configuration space \c
+     'A/B/C', then the value name \c 'D/E/v' refers to the value named
+     \c 'v' in the configuration space \c 'A/B/C/D/E'.
+ 
+     The specific configuration store that is used to access the value
+     depends on the flags that were specified in the call to
+     khc_open_space().  The precedence of configuration stores are as
+     follows:
+ 
+     - If KCONF_FLAG_USER was specified, then the user configuration
+       space.
+ 
+     - Otherwise, if KCONF_FLAG_MACHINE was specified, then the machine
+       configuration space.
+ 
+     - Otherwise, if KCONF_FLAG_SCHEMA was specified, the the schema
+       store.
+ 
+     A multi-string is a pseudo data type.  The value in the
+     configuration store should contain a CSV string.  Each comma
+     separated value in the CSV string is considered to be a separate
+     value.  Empty values are not allowed. The buffer pointed to by \a
+     buf will receive these values in the form of a series of NULL
+     terminated strings terminated by an empty string (or equivalently,
+     the last string will be terminated by a double NULL).
+ 
+     Note that not specifying any of the configuration store specifiers
+     in the call to khc_open_space() is equivalent to specifying all
+     three.
+ 
+     If the value is not found in the configuration space and any
+     shadowed configuration spaces, the function returns \a
+     KHM_ERROR_NOT_FOUND.  In this case, the buffer is left unmodified.
+ 
+     \param[in] buf Buffer to copy the multi-string to.  Specify NULL
+         to just retrieve the number of required bytes.
+     
+     \param[in,out] bufsize On entry, specifies the number of bytes of
+         space available at the location specified by \a buf.  On exit
+         specifies the number of bytes actually copied or the size of
+         the required buffer if \a buf is NULL or insufficient.
+ 
+     \retval KHM_ERROR_NOT_READY The configuration provider has not started
+     \retval KHM_ERROR_INVALID_PARAM One or more of the supplied parameters are not valid
+     \retval KHM_ERROR_TYPE_MISMATCH The specified value is not a string
+     \retval KHM_ERROR_TOO_LONG \a buf was NULL or the size of the buffer was insufficient.  The required size is in bufsize.
+     \retval KHM_ERROR_SUCCESS Success.  The number of bytes copied is in bufsize.
+     \retval KHM_ERROR_NOT_FOUND The value was not found.
+ 
+     \see khc_open_space()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ khc_read_multi_string(khm_handle conf, 
+                       const wchar_t * value_name, 
+                       wchar_t * buf, 
+                       khm_size * bufsize);
+ 
+ /*! \brief Read a 32 bit integer value from a configuration space
+ 
+     The \a value_name parameter specifies the value to read from the
+     configuration space.  This can be either a value name or a value
+     path consisting of a series nested configuration space names
+     followed by the value name all separated by backslashes or forward
+     slashes.
+ 
+     For example: If \a conf is a handle to the configuration space \c
+     'A/B/C', then the value name \c 'D/E/v' refers to the value named
+     \c 'v' in the configuration space \c 'A/B/C/D/E'.
+ 
+     The specific configuration store that is used to access the value
+     depends on the flags that were specified in the call to
+     khc_open_space().  The precedence of configuration stores are as
+     follows:
+ 
+     - If KCONF_FLAG_USER was specified, then the user configuration
+       space.
+ 
+     - Otherwise, if KCONF_FLAG_MACHINE was specified, then the machine
+       configuration space.
+ 
+     - Otherwise, if KCONF_FLAG_SCHEMA was specified, the the schema
+       store.
+ 
+     Note that not specifying any of the configuration store specifiers
+     in the call to khc_open_space() is equivalent to specifying all
+     three.
+ 
+     If the value is not found in the configuration space and any
+     shadowed configuration spaces, the function returns \a
+     KHM_ERROR_NOT_FOUND.  In this case, the buffer is left unmodified.
+ 
+     \param[in] conf Handle to a configuration space
+     \param[in] value The value to query
+     \param[out] buf The buffer to receive the value
+ 
+     \retval KHM_ERROR_NOT_READY The configuration provider has not started.
+     \retval KHM_ERROR_SUCCESS Success.  The value that was read was placed in \a buf
+     \retval KHM_ERROR_NOT_FOUND The specified value was not found
+     \retval KHM_ERROR_INVALID_PARAM One or more parameters were invalid
+     \retval KHM_ERROR_TYPE_MISMATCH The specified value was found but was not of the correct type.
+     \see khc_open_space()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ khc_read_int32(khm_handle conf, 
+                const wchar_t * value_name, 
+                khm_int32 * buf);
+ 
+ /*! \brief Read a 64 bit integer value from a configuration space
+ 
+     The \a value_name parameter specifies the value to read from the
+     configuration space.  This can be either a value name or a value
+     path consisting of a series nested configuration space names
+     followed by the value name all separated by backslashes or forward
+     slashes.
+ 
+     For example: If \a conf is a handle to the configuration space \c
+     'A/B/C', then the value name \c 'D/E/v' refers to the value named
+     \c 'v' in the configuration space \c 'A/B/C/D/E'.
+ 
+     The specific configuration store that is used to access the value
+     depends on the flags that were specified in the call to
+     khc_open_space().  The precedence of configuration stores are as
+     follows:
+ 
+     - If KCONF_FLAG_USER was specified, then the user configuration
+       space.
+ 
+     - Otherwise, if KCONF_FLAG_MACHINE was specified, then the machine
+       configuration space.
+ 
+     - Otherwise, if KCONF_FLAG_SCHEMA was specified, the the schema
+       store.
+ 
+     Note that not specifying any of the configuration store specifiers
+     in the call to khc_open_space() is equivalent to specifying all
+     three.
+ 
+     If the value is not found in the configuration space and any
+     shadowed configuration spaces, the function returns \a
+     KHM_ERROR_NOT_FOUND.  In this case, the buffer is left unmodified.
+ 
+     \param[in] conf Handle to a configuration space
+     \param[in] value_name The value to query
+     \param[out] buf The buffer to receive the value
+ 
+     \retval KHM_ERROR_NOT_READY The configuration provider has not started
+     \retval KHM_ERROR_SUCCESS Success.  The value that was read was placed in \a buf
+     \retval KHM_ERROR_NOT_FOUND The specified value was not found
+     \retval KHM_ERROR_INVALID_PARAM One or more parameters were invalid
+     \retval KHM_ERROR_TYPE_MISMATCH The specified value was found but was not the correct data type.
+ 
+     \see khc_open_space()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ khc_read_int64(khm_handle conf, 
+                const wchar_t * value_name, 
+                khm_int64 * buf);
+ 
+ /*! \brief Read a binary value from a configuration space
+ 
+     The \a value_name parameter specifies the value to read from the
+     configuration space.  This can be either a value name or a value
+     path consisting of a series nested configuration space names
+     followed by the value name all separated by backslashes or forward
+     slashes.
+ 
+     For example: If \a conf is a handle to the configuration space \c
+     'A/B/C', then the value name \c 'D/E/v' refers to the value named
+     \c 'v' in the configuration space \c 'A/B/C/D/E'.
+ 
+     The specific configuration store that is used to access the value
+     depends on the flags that were specified in the call to
+     khc_open_space().  The precedence of configuration stores are as
+     follows:
+ 
+     - If KCONF_FLAG_USER was specified, then the user configuration
+       space.
+ 
+     - Otherwise, if KCONF_FLAG_MACHINE was specified, then the machine
+       configuration space.
+ 
+     Note that not specifying any of the configuration store specifiers
+     in the call to khc_open_space() is equivalent to specifying all
+     three. Also note that the schema store (KCONF_FLAG_SCHEMA) does
+     not support binary values.
+ 
+     If the value is not found in the configuration space and any
+     shadowed configuration spaces, the function returns \a
+     KHM_ERROR_NOT_FOUND.  In this case, the buffer is left unmodified.
+ 
+     \param[in] buf Buffer to copy the string to.  Specify NULL to just
+         retrieve the number of required bytes.
+     
+     \param[in,out] bufsize On entry, specifies the number of bytes of
+         space available at the location specified by \a buf.  On exit
+         specifies the number of bytes actually copied or the size of
+         the required buffer if \a buf is NULL or insufficient.
+ 
+     \retval KHM_ERROR_SUCCESS Success. The data was copied to \a buf.  The number of bytes copied is stored in \a bufsize
+     \retval KHM_ERROR_NOT_FOUND The specified value was not found
+     \retval KHM_ERROR_INVALID_PARAM One or more parameters were invalid.
+ 
+     \see khc_open_space()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ khc_read_binary(khm_handle conf, 
+                 const wchar_t * value_name, 
+                 void * buf, 
+                 khm_size * bufsize);
+ 
+ /*! \brief Write a string value to a configuration space
+ 
+     The \a value_name parameter specifies the value to write to the
+     configuration space.  This can be either a value name or a value
+     path consisting of a series nested configuration space names
+     followed by the value name all separated by backslashes or forward
+     slashes.
+ 
+     For example: If \a conf is a handle to the configuration space \c
+     'A/B/C', then the value name \c 'D/E/v' refers to the value named
+     \c 'v' in the configuration space \c 'A/B/C/D/E'.
+ 
+     The specific configuration store that is used to write the value
+     depends on the flags that were specified in the call to
+     khc_open_space().  The precedence of configuration stores are as
+     follows:
+ 
+     - If \a KCONF_FLAG_USER was specified, then the user configuration
+       space.
+ 
+     - Otherwise, if \a KCONF_FLAG_MACHINE was specified, then the
+       machine configuration space.
+ 
+     Note that not specifying any of the configuration store specifiers
+     in the call to khc_open_space() is equivalent to specifying all
+     three.  Also note that the schema store (KCONF_FLAG_SCHEMA) is
+     readonly.
+ 
+     If the \a KCONF_FLAG_WRITEIFMOD flag is specified in the call to
+     khc_open_space() for obtaining the configuration handle, the
+     specified string will only be written if it is different from the
+     value being read from the handle.
+ 
+     If the \a KCONF_FLAG_IFMODCI flag is specified along with the \a
+     KCONF_FLAG_WRITEIFMOD flag, then the string comparison used will
+     be case insensitive.
+ 
+     \param[in] conf Handle to a configuration space
+     \param[in] value_name Name of value to write
+     \param[in] buf A NULL terminated unicode string not exceeding KCONF_MAXCCH_STRING in characters including terminating NULL
+ 
+     \see khc_open_space()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ khc_write_string(khm_handle conf, 
+                  const wchar_t * value_name, 
+                  wchar_t * buf);
+ 
+ /*! \brief Write a multi-string value to a configuration space
+ 
+     The \a value_name parameter specifies the value to write to the
+     configuration space.  This can be either a value name or a value
+     path consisting of a series nested configuration space names
+     followed by the value name all separated by backslashes or forward
+     slashes.
+ 
+     For example: If \a conf is a handle to the configuration space \c
+     'A/B/C', then the value name \c 'D/E/v' refers to the value named
+     \c 'v' in the configuration space \c 'A/B/C/D/E'.
+ 
+     The specific configuration store that is used to write the value
+     depends on the flags that were specified in the call to
+     khc_open_space().  The precedence of configuration stores are as
+     follows:
+ 
+     A multi-string is a pseudo data type.  The buffer pointed to by \a
+     buf should contain a sequence of NULL terminated strings
+     terminated by an empty string (or equivalently, the last string
+     should terminate with a double NULL).  This will be stored in the
+     value as a CSV string.
+ 
+     - If KCONF_FLAG_USER was specified, then the user configuration
+       space.
+ 
+     - Otherwise, if KCONF_FLAG_MACHINE was specified, then the machine
+       configuration space.
+ 
+     Note that not specifying any of the configuration store specifiers
+     in the call to khc_open_space() is equivalent to specifying all
+     three.  Also note that the schema store (KCONF_FLAG_SCHEMA) is
+     readonly.
+ 
+     If the \a KCONF_FLAG_WRITEIFMOD flag is specified in the call to
+     khc_open_space() for obtaining the configuration handle, the
+     specified string will only be written if it is different from the
+     value being read from the handle.
+ 
+     If the \a KCONF_FLAG_IFMODCI flag is specified along with the \a
+     KCONF_FLAG_WRITEIFMOD flag, then the string comparison used will
+     be case insensitive.
+ 
+     \see khc_open_space()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ khc_write_multi_string(khm_handle conf, 
+                        const wchar_t * value_name, 
+                        wchar_t * buf);
+ 
+ /*! \brief Write a 32 bit integer value to a configuration space
+ 
+     The \a value_name parameter specifies the value to write to the
+     configuration space.  This can be either a value name or a value
+     path consisting of a series nested configuration space names
+     followed by the value name all separated by backslashes or forward
+     slashes.
+ 
+     For example: If \a conf is a handle to the configuration space \c
+     'A/B/C', then the value name \c 'D/E/v' refers to the value named
+     \c 'v' in the configuration space \c 'A/B/C/D/E'.
+ 
+     The specific configuration store that is used to write the value
+     depends on the flags that were specified in the call to
+     khc_open_space().  The precedence of configuration stores are as
+     follows:
+ 
+     - If KCONF_FLAG_USER was specified, then the user configuration
+       space.
+ 
+     - Otherwise, if KCONF_FLAG_MACHINE was specified, then the machine
+       configuration space.
+ 
+     Note that not specifying any of the configuration store specifiers
+     in the call to khc_open_space() is equivalent to specifying all
+     three.  Also note that the schema store (KCONF_FLAG_SCHEMA) is
+     readonly.
+ 
+     If the \a KCONF_FLAG_WRITEIFMOD flag is specified in the call to
+     khc_open_space() for obtaining the configuration handle, the
+     specified string will only be written if it is different from the
+     value being read from the handle.
+ 
+     \see khc_open_space()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ khc_write_int32(khm_handle conf, 
+                 const wchar_t * value_name, 
+                 khm_int32 buf);
+ 
+ /*! \brief Write a 64 bit integer value to a configuration space
+ 
+     The \a value_name parameter specifies the value to write to the
+     configuration space.  This can be either a value name or a value
+     path consisting of a series nested configuration space names
+     followed by the value name all separated by backslashes or forward
+     slashes.
+ 
+     For example: If \a conf is a handle to the configuration space \c
+     'A/B/C', then the value name \c 'D/E/v' refers to the value named
+     \c 'v' in the configuration space \c 'A/B/C/D/E'.
+ 
+     The specific configuration store that is used to write the value
+     depends on the flags that were specified in the call to
+     khc_open_space().  The precedence of configuration stores are as
+     follows:
+ 
+     - If KCONF_FLAG_USER was specified, then the user configuration
+       space.
+ 
+     - Otherwise, if KCONF_FLAG_MACHINE was specified, then the machine
+       configuration space.
+ 
+     Note that not specifying any of the configuration store specifiers
+     in the call to khc_open_space() is equivalent to specifying all
+     three.  Also note that the schema store (KCONF_FLAG_SCHEMA) is
+     readonly.
+ 
+     If the \a KCONF_FLAG_WRITEIFMOD flag is specified in the call to
+     khc_open_space() for obtaining the configuration handle, the
+     specified string will only be written if it is different from the
+     value being read from the handle.
+ 
+     \see khc_open_space()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ khc_write_int64(khm_handle conf, 
+                 const wchar_t * value_name, 
+                 khm_int64 buf);
+ 
+ /*! \brief Write a binary value to a configuration space
+ 
+     The \a value_name parameter specifies the value to write to the
+     configuration space.  This can be either a value name or a value
+     path consisting of a series nested configuration space names
+     followed by the value name all separated by backslashes or forward
+     slashes.
+ 
+     For example: If \a conf is a handle to the configuration space \c
+     'A/B/C', then the value name \c 'D/E/v' refers to the value named
+     \c 'v' in the configuration space \c 'A/B/C/D/E'.
+ 
+     The specific configuration store that is used to write the value
+     depends on the flags that were specified in the call to
+     khc_open_space().  The precedence of configuration stores are as
+     follows:
+ 
+     - If KCONF_FLAG_USER was specified, then the user configuration
+       space.
+ 
+     - Otherwise, if KCONF_FLAG_MACHINE was specified, then the machine
+       configuration space.
+ 
+     Note that not specifying any of the configuration store specifiers
+     in the call to khc_open_space() is equivalent to specifying all
+     three.  Also note that the schema store (KCONF_FLAG_SCHEMA) is
+     readonly.
+ 
+     \see khc_open_space()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ khc_write_binary(khm_handle conf, 
+                  const wchar_t * value_name, 
+                  void * buf, 
+                  khm_size bufsize);
+ 
+ /*! \brief Get the type of a value in a configuration space
+ 
+     \return The return value is the type of the specified value, or
+         KC_NONE if the value does not exist.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khc_get_type(khm_handle conf, const wchar_t * value_name);
+ 
+ /*! \brief Check which configuration stores contain a specific value.
+ 
+     Each value in a configuration space can be contained in zero or
+     more configuration stores.  Use this function to determine which
+     configuration stores contain the specific value.
+ 
+     The returned bitmask always indicates a subset of the
+     configuration stores that were specified when opening the
+     configuration space corresponding to \a conf.
+ 
+     \return A combination of ::KCONF_FLAG_MACHINE, ::KCONF_FLAG_USER
+         and ::KCONF_FLAG_SCHEMA indicating which stores contain the
+         value.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khc_value_exists(khm_handle conf, const wchar_t * value);
+ 
+ /*! \brief Remove a value from a configuration space
+ 
+     Removes a value from one or more configuration stores.
+ 
+     A value can exist in multiple configuration stores.  Only the
+     values that are stored in writable stores can be removed.  When
+     the function searches for values to remove, it will only look in
+     configuration stores that are specified in the handle.  In
+     addition, the configuration stores affected can be further
+     narrowed by specifying them in the \a flags parameter.  If \a
+     flags is zero, then all the stores visible to the handle are
+     searched.  If \a flags specifies ::KCONF_FLAG_USER or
+     ::KCONF_FLAG_MACHINE or both, then only the specified stores are
+     searched, provided that the stores are visible to the handle.
+ 
+     This function only operates on the topmost configuration space
+     visible to the handle.  If the configuration handle is shadowed,
+     the shadowed configuration spaces are unaffected by the removal.
+ 
+     \param[in] conf Handle to configuration space to remove value from
+ 
+     \param[in] value_name Value to remove
+ 
+     \param[in] flags Specifies which configuration stores will be
+         affected by the removal.  See above.
+ 
+     \retval KHM_ERROR_SUCCESS The value was removed from all the
+         specified configuration stores.
+ 
+     \retval KHM_ERROR_NOT_FOUND The value was not found.
+ 
+     \retval KHM_ERROR_UNKNOWN An unknown error occurred while trying
+         to remove the value.
+ 
+     \retval KHM_ERROR_PARTIAL The value was successfully removed from
+         one or more stores, but the operation failed on one or more
+         other stores.
+  */
+ KHMEXP khm_int32 KHMAPI
+ khc_remove_value(khm_handle conf, const wchar_t * value_name, khm_int32 flags);
+ 
+ /*! \brief Get the name of a configuration space
+ 
+     \param[in] conf Handle to a configuration space
+ 
+     \param[out] buf The buffer to receive the name.  Set to NULL if
+         only the size of the buffer is required.
+ 
+     \param[in,out] bufsize On entry, holds the size of the buffer
+         pointed to by \a buf.  On exit, holds the number of bytes
+         copied into the buffer including the NULL terminator.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khc_get_config_space_name(khm_handle conf, 
+                           wchar_t * buf, 
+                           khm_size * bufsize);
+ 
+ /*! \brief Get a handle to the parent space
+ 
+     \param[in] conf Handle to a configuration space
+ 
+     \param[out] parent Handle to the parent configuration space if the
+         call succeeds.  Receives NULL otherwise.  The returned handle
+         must be closed using khc_close_space()
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khc_get_config_space_parent(khm_handle conf, 
+                             khm_handle * parent);
+ 
+ /*! \brief Load a configuration schema into the specified configuration space
+ 
+     \param[in] conf Handle to a configuration space or NULL to use the
+         root configuration space.
+ 
+     \param[in] schema The schema to load.  The schema is assumed to be
+         well formed.
+ 
+     \see khc_unload_schema()
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khc_load_schema(khm_handle conf, 
+                 const kconf_schema * schema);
+ 
+ /*! \brief Unload a schema from a configuration space
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khc_unload_schema(khm_handle conf, 
+                   const kconf_schema * schema);
+ 
+ /*! \brief Enumerate the subspaces of a configuration space
+ 
+     Prepares a configuration space for enumeration and returns the
+     child spaces in no particular order.
+ 
+     \param[in] conf The configuration space to enumerate child spaces
+ 
+     \param[in] prev The previous configuration space returned by
+         khc_enum_subspaces() or NULL if this is the first call.  If
+         this is not NULL, then the handle passed in \a prev will be
+         freed.
+ 
+     \param[out] next If \a prev was NULL, receives the first sub space
+         found in \a conf.  You must \b either call
+         khc_enum_subspaces() again with the returned handle or call
+         khc_close_space() to free the returned handle if no more
+         subspaces are required.  \a next can point to the same handle
+         specified in \a prev.
+ 
+     \retval KHM_ERROR_SUCCESS The call succeeded.  There is a valid
+         handle to a configuration space in \a first_subspace.
+ 
+     \retval KHM_ERROR_INVALID_PARAM Either \a conf or \a prev was not a
+         valid configuration space handle or \a first_subspace is NULL.
+         Note that \a prev can be NULL.
+ 
+     \retval KHM_ERROR_NOT_FOUND There were no subspaces in the
+         configuration space pointed to by \a conf.
+ 
+     \note The configuration spaces that are enumerated directly belong
+         to the configuration space given by \a conf.  This function
+         does not enumerate subspaces of shadowed configuration spaces
+         (see khc_shadow_space()).  Even if \a conf was obtained on a
+         restricted domain (i.e. you specified one or more
+         configuration stores when you openend the handle and didn't
+         include all the configuration stores. See khc_open_space()),
+         the subspaces that are returned are the union of all
+         configuration spaces in all the configuration stores.  This is
+         not a bug.  This is a feature.  In NetIDMgr, a configuartion
+         space exists if some configuration store defines it (or it was
+         created with a call to khc_open_space() even if no
+         configuration store defines it yet).  This is the tradeoff you
+         make when using a layered configuration system.
+ 
+ 	However, the returned handle has the same domain restrictions
+ 	as \a conf.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khc_enum_subspaces(khm_handle conf,
+                    khm_handle prev,
+                    khm_handle * next);
+ 
+ /*! \brief Remove a configuration space
+ 
+     The configuration space will be marked for removal.  Once all the
+     handles for the space have been released, it will be deleted.  The
+     configuration stores that will be affected are the write enabled
+     configuration stores for the handle.
+  */
+ KHMEXP khm_int32 KHMAPI
+ khc_remove_space(khm_handle conf);
+ /*@}*/
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/kcreddb.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/kcreddb.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:24 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/kcreddb.h	Thu Oct 12 17:42:40 2006
***************
*** 0 ****
--- 1,3277 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: kcreddb.h,v 1.1.2.2 2006/10/12 21:42:40 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_KCREDDB_H__
+ #define __KHIMAIRA_KCREDDB_H__
+ 
+ #include<khdefs.h>
+ #include<time.h>
+ 
+ 
+ /*! \defgroup kcdb NetIDMgr Credentials Database */
+ /*@{*/
+ 
+ /*! \brief Maximum length in characters of short description 
+ 
+     The length includes the terminating \a NULL character.
+     */
+ #define KCDB_MAXCCH_SHORT_DESC  256
+ 
+ /*! \brief Maximum length in bytes of short description 
+ 
+     The length includes the terminating \a NULL character.
+     */
+ #define KCDB_MAXCB_SHORT_DESC   (sizeof(wchar_t) * KCDB_MAXCCH_SHORT_DESC)
+ 
+ /*! \brief Maximum length in characters of long description 
+ 
+     The length includes the terminating \a NULL character.
+     */
+ #define KCDB_MAXCCH_LONG_DESC   8192
+ 
+ /*! \brief Maximum length in characters of long description 
+ 
+     The length includes the terminating \a NULL character.
+     */
+ #define KCDB_MAXCB_LONG_DESC    (sizeof(wchar_t) * KCDB_MAXCCH_LONG_DESC)
+ 
+ /*! \brief Maximum length in characters of name 
+ 
+     The length includes the terminating \a NULL character.
+     */
+ #define KCDB_MAXCCH_NAME        256
+ 
+ /*! \brief Maximum length in bytes of short description 
+ 
+     The length includes the terminating \a NULL character.
+     */
+ #define KCDB_MAXCB_NAME         (sizeof(wchar_t) * KCDB_MAXCCH_NAME)
+ 
+ /*! \brief Automatically determine the number of bytes required
+ 
+     Can be used in most places where a count of bytes is required.
+     For many objects, the number of bytes that are required can be
+     determined through context and may be ommited.  In such cases you
+     can use the \a KCDB_CBSIZE_AUTO value to specify that the function
+     is to determine the size automatically.
+ 
+     \note Not all functions that take a count of bytes support the \a
+         KCDB_CBSIZE_AUTO value.
+ */
+ #define KCDB_CBSIZE_AUTO (-1)
+ 
+ /*!
+ \defgroup kcdb_ident Identities
+ 
+ Functions, macros etc. for manipulating identities.
+ */
+ 
+ /*@{*/
+ 
+ /*! \brief The maximum number of characters (including terminator) that can
+            be specified as an identity name */
+ #define KCDB_IDENT_MAXCCH_NAME 256
+ 
+ /*! \brief The maximum number of bytes that can be specified as an identity
+            name */
+ #define KCDB_IDENT_MAXCB_NAME (sizeof(wchar_t) * KCDB_IDENT_MAXCCH_NAME)
+ 
+ /*! \brief Valid characters in an identity name */
+ #define KCDB_IDENT_VALID_CHARS L"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._@-/"
+ 
+ /*!
+ \name Flags for identities */
+ /*@{*/
+ 
+ /*! \brief Create the identity if it doesn't already exist. 
+     \note  Only to be used with kcdb_identity_create() */
+ #define KCDB_IDENT_FLAG_CREATE      0x10000000L
+ 
+ /*! \brief Has configuration information
+ 
+     Indicates that the identity has persistent configuration
+     information associated with it.
+  */
+ #define KCDB_IDENT_FLAG_CONFIG      0x00800000L
+ 
+ /*! \brief Marks the identity as active.
+ 
+     An active identity is one that is in active use within NetIDMgr.
+ 
+     \note This flag is readonly and cannot be specified when creating
+         or modifying an identity. Once an identity is deleted, it will
+         no longer have this flag. */
+ #define KCDB_IDENT_FLAG_ACTIVE      0x02000000L
+ 
+ 
+ /*! \brief The identity has custom attributes assigned
+  */
+ #define KCDB_IDENT_FLAG_ATTRIBS     0x08000000L
+ 
+ /*! \brief This is the default identity. 
+ 
+     At most one identity will have this flag set at any given time.
+     To set or reset the flag, use kcdb_identity_set_default() */
+ #define KCDB_IDENT_FLAG_DEFAULT     0x00000001L
+ 
+ /*! \brief This identity can be searched.
+ 
+     The meaning of this flag is left to be interpreted by individual
+     plugins. */
+ #define KCDB_IDENT_FLAG_SEARCHABLE  0x00000002L
+ 
+ /*! \brief Hidden identity.
+ 
+     The identity will not show up in the identity list window.  Once
+     the hidden is switched off, the identity (and all associated
+     credentials) will re-appear in the window */
+ #define KCDB_IDENT_FLAG_HIDDEN      0x00000004L
+ 
+ /*! \brief Invalid identity
+ 
+     For one reason or another, this identity is invalid.  This flag
+     can be set by an identity provider to indicate that this identity
+     does not correspond to an actual identity because an external
+     entity (such as a KDC) has denied it's existence.
+ 
+     The absence of this flag does not imply that the identity is
+     valid.  The ::KCDB_IDENT_FLAG_VALID bit must be set for that to be
+     the case.  If neither flag is set, then the status of the identity
+     is not known.
+ */
+ #define KCDB_IDENT_FLAG_INVALID     0x00000008L
+ 
+ /*! \brief Valid identity
+ 
+     The identity has been validated through an external entity, or
+     it's validity implied through the existence of credentials for the
+     identity.
+ 
+     The absence of this flag does not imply that the identity is
+     invalid.  The ::KCDB_IDENT_FLAG_INVALID bit must be set for that
+     to be the case.  If neither flag is set, then the status of the
+     identity is not known.
+  */
+ #define KCDB_IDENT_FLAG_VALID       0x00000010L
+ 
+ /*! \brief Expired identity
+ 
+     This identity has expired and can not be actively used to obtain
+     credentials.  This determination is made based on the input of
+     some external entity.  This flag may only be set by an identity
+     provider.
+ */
+ #define KCDB_IDENT_FLAG_EXPIRED     0x00000020L
+ 
+ /*! \brief Empty identity
+ 
+     The identity does not have actual credentials associated with it.
+  */
+ #define KCDB_IDENT_FLAG_EMPTY       0x00000040L
+ 
+ /*! \brief Renewable identity
+ 
+     The initial credentials associated with this identity are
+     renewable.  Thus making the whole identity renewable.
+  */
+ #define KCDB_IDENT_FLAG_RENEWABLE   0x00000080L
+ 
+ /*! \brief Required user interaction
+ 
+     The identity is in a state which requires user interaction to
+     activate.  Currently, the identity may not be in a state where it
+     can be used to obtain credentials.
+ 
+     A typical example of this is when the primary password for an
+     identity has expired.
+  */
+ #define KCDB_IDENT_FLAG_INTERACT    0x00000100L
+ 
+ /*! \brief Has expired credentials
+ 
+     The identity has expired credentials associated with it.
+  */
+ #define KCDB_IDENT_FLAG_CRED_EXP    0x00000200L
+ 
+ /*! \brief Has renewable credentials
+ 
+     The identity has renewable credentials associated with it.  If the
+     initial credentials of the identity are renewable, then identity
+     is renewable.  Hence the ::KCDB_IDENT_FLAG_RENEWABLE should also
+     be set.
+  */
+ #define KCDB_IDENT_FLAG_CRED_RENEW  0x00000400L
+ 
+ /*! \brief Sticky identity
+ 
+     Sticky identities are identities that are always visible in the
+     credentials display even if no credentials are associated with it.
+  */
+ #define KCDB_IDENT_FLAG_STICKY      0x00000800L
+ 
+ /*! \brief Read/write flags mask.
+ 
+     A bitmask that correspond to all the read/write flags in the mask.
+ */
+ #define KCDB_IDENT_FLAGMASK_RDWR   0x00000fffL
+ 
+ /*@}*/
+ 
+ /*! \name Identity Provider Data Structures
+ @{*/
+ 
+ /*! \brief Name transfer structure
+ 
+     Used when the KCDB is communicating with the identity provider to
+     exchange string names of identities.  See individual ::KMSG_IDENT
+     message subtypes for the usage of this structure.
+  */
+ typedef struct tag_kcdb_ident_name_xfer {
+     const wchar_t * name_src;   /*!< An identity name.  Does not
+                                      exceed KCDB_IDENT_MAXCCH_NAME
+                                      characters including terminating
+                                      NULL. */
+     const wchar_t * name_alt;   /*!< An identity name.  Does not
+                                      exceed KCDB_IDENT_MAXCCH_NAME
+                                      characters including terminating
+                                      NULL. */
+     wchar_t *       name_dest;  /*!< Pointer to a buffer that is to
+                                      receive a response string.  The
+                                      size of the buffer in bytes is
+                                      specified in \a cb_name_dest. */
+     khm_size        cb_name_dest; /*!< Size of buffer pointed to by \a
+                                      name_dest in bytes. */
+     khm_int32       result;     /*!< Receives a result value, which is
+                                      usually an error code defined in
+                                      kherror.h, though it is not
+                                      always. */
+ } kcdb_ident_name_xfer;
+ 
+ typedef struct tag_kcdb_ident_info {
+     khm_handle      identity;
+     khm_int32       fields;
+ 
+     FILETIME        expiration;
+ } kcdb_ident_info;
+ 
+ /*@}*/
+ 
+ /*! \name Identity provider interface functions
+ 
+     These functions encapsulate safe calls to the current identity
+     provider.  While these functions are exported, applications should
+     not call these functions directly.  They are provided for use by
+     the NetIDMgr core application.
+ @{*/
+ 
+ /*! \brief Validate an identity name
+ 
+     The name that is provided will be passed through sets of
+     validations.  One set, which doesn't depend on the identity
+     provider checks whether the length of the identity name and
+     whether there are any invalid characters in the identity name.  If
+     the name passes those tests, then the name is passed down to the
+     identity provider's name validation handler.
+ 
+     \retval KHM_ERROR_SUCCESS The name is valid
+     \retval KHM_ERROR_TOO_LONG Too many characters in name
+     \retval KHM_ERROR_INVALID_NAME There were invalid characters in the name.
+     \retval KHM_ERROR_NO_PROVIDER There is no identity provider;
+         however the name passed the length and character tests.
+     \retval KHM_ERROR_NOT_IMPLEMENTED The identity provider doesn't
+         implement a name validation handler; however the name passed
+         the length and character tests.
+ 
+     \see ::KMSG_IDENT_VALIDATE_NAME
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identpro_validate_name(const wchar_t * name);
+ 
+ /*! \brief Validate an identity
+ 
+     The identity itself needs to be validated.  This may involve
+     communicating with an external entity.
+ 
+     \see ::KMSG_IDENT_VALIDATE_IDENTITY
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identpro_validate_identity(khm_handle identity);
+ 
+ /*! \brief Canonicalize the name 
+ 
+ 
+     \see ::KMSG_IDENT_CANON_NAME
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identpro_canon_name(const wchar_t * name_in, 
+                          wchar_t * name_out, 
+                          khm_size * cb_name_out);
+ 
+ /*! \brief Compare two identity names 
+ 
+     \see ::KMSG_IDENT_COMPARE_NAME
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identpro_compare_name(const wchar_t * name1,
+                            const wchar_t * name2);
+ 
+ /*! \brief Set the specified identity as the default 
+ 
+     \see ::KMSG_IDENT_SET_DEFAULT
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identpro_set_default(khm_handle identity);
+ 
+ /*! \brief Set the specified identity as searchable 
+ 
+     \see ::KMSG_IDENT_SET_SEARCHABLE
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identpro_set_searchable(khm_handle identity,
+                              khm_boolean searchable);
+ 
+ /*! \brief Update the specified identity 
+ 
+     \see ::KMSG_IDENT_UPDATE
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identpro_update(khm_handle identity);
+ 
+ /*! \brief Obtain the UI callback
+ 
+     \a rock is actually a pointer to a ::khui_ident_new_creds_cb which
+     is to receive the callback.
+ 
+     \see ::KMSG_IDENT_GET_UI_CALLBACK
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identpro_get_ui_cb(void * rock);
+ 
+ /*! \brief Notify an identity provider of the creation of a new identity 
+ 
+     \see ::KMSG_IDENT_NOTIFY_CREATE
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identpro_notify_create(khm_handle identity);
+ 
+ /*@}*/
+ 
+ /*! \brief Check if the given name is a valid identity name
+ 
+     \return TRUE or FALSE to the question, is this valid?
+ */
+ KHMEXP khm_boolean KHMAPI 
+ kcdb_identity_is_valid_name(const wchar_t * name);
+ 
+ /*! \brief Create or open an identity.
+ 
+     If the KCDB_IDENT_FLAG_CREATE flag is specified in the flags
+     parameter a new identity will be created if one does not already
+     exist with the given name.  If an identity by that name already
+     exists, then the existing identity will be opened. The result
+     parameter will receive a held reference to the opened identity.
+     Use kcdb_identity_release() to release the handle.
+ 
+     \param[in] name Name of identity to create
+     \param[in] flags If KCDB_IDENT_FLAG_CREATE is specified, then the
+         identity will be created if it doesn't already exist.
+         Additional flags can be set here which will be assigned to the
+         identity if it is created.  Additional flags have no effect if
+         an existing identity is opened.
+     \param[out] result If the call is successful, this receives a held
+         reference to the identity.  The caller should call
+         kcdb_identity_release() to release the identity once it is no
+         longer needed.
+     */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_create(const wchar_t *name, 
+                      khm_int32 flags, 
+                      khm_handle * result);
+ 
+ /*! \brief Mark an identity for deletion.
+ 
+     The identity will be marked for deletion.  The
+     KCDB_IDENT_FLAG_ACTIVE will no longer be present for this
+     identity.  Once all references to the identity are released, it
+     will be removed from memory.  All associated credentials will also
+     be removed. */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_delete(khm_handle id);
+ 
+ /*! \brief Set or unset the specified flags in the specified identity.
+ 
+     Only flags that are in KCDB_IDENT_FLAGMASK_RDWR can be specifed in
+     the \a flags parameter or the \a mask parameter.  The flags set in
+     the \a mask parameter of the identity will be set to the
+     corresponding values in the \a flags parameter.
+ 
+     If ::KCDB_IDENT_FLAG_INVALID is set using this function, then the
+     ::KCDB_IDENT_FLAG_VALID will be automatically reset, and vice
+     versa.  Resetting either bit does not undo this change, and will
+     leave the identity's validity unspecified.
+ 
+     Note that setting or resetting certain flags have other semantic
+     side-effects:
+ 
+     - ::KCDB_IDENT_FLAG_DEFAULT : Setting this is equivalent to
+       calling kcdb_identity_set_default() with \a id.  Resetting this
+       is equivalent to calling kcdb_identity_set_default() with NULL.
+ 
+     - ::KCDB_IDENT_FLAG_SEARCHABLE : Setting this will result in the
+       identity provider getting notified of the change. If the
+       identity provider indicates that searchable flag should not be
+       set or reset on the identity, then kcdb_identity_set_flags()
+       will return an error.
+ 
+     \note kcdb_identity_set_flags() is not atomic.  Even if the
+     function returns a failure code, some flags in the identity may
+     have been set.  When calling kcdb_identity_set_flags() always
+     check the flags in the identity using kcdb_identity_get_flags() to
+     check which flags have been set and which have failed.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_set_flags(khm_handle id, 
+                         khm_int32 flags,
+                         khm_int32 mask);
+ 
+ /*! \brief Return all the flags for the identity
+ 
+     The returned flags may include internal flags.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_get_flags(khm_handle id, 
+                         khm_int32 * flags);
+ 
+ /*! \brief Return the name of the identity 
+ 
+     \param[out] buffer Buffer to copy the identity name into.  The
+         maximum size of an identity name is \a KCDB_IDENT_MAXCB_NAME.
+         If \a buffer is \a NULL, then the required size of the buffer
+         is returned in \a pcbsize.
+ 
+     \param[in,out] pcbsize Size of buffer in bytes. */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_get_name(khm_handle id, 
+                        wchar_t * buffer, 
+                        khm_size * pcbsize);
+ 
+ /*! \brief Set the specified identity as the default.
+ 
+     Specifying NULL effectively makes none of the identities the
+     default.
+ 
+     \see kcdb_identity_set_flags()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_set_default(khm_handle id);
+ 
+ /*! \brief Mark the specified identity as the default.
+ 
+     This API is reserved for use by identity providers as a means of
+     specifying which identity is default.  The difference between
+     kcdb_identity_set_default() and kcdb_identity_set_default_int() is
+     in semantics.  
+ 
+     - kcdb_identity_set_default() is used to request the KCDB to
+       designate the specified identity as the default.  When
+       processing the request, the KCDB invokes the identity provider
+       to do the necessary work to make the identity the default.
+ 
+     - kcdb_identity_set_default_int() is used by the identity provider
+       to notify the KCDB that the specified identity is the default.
+       This does not result in the invocation of any other semantics to
+       make the identity the default other than releasing the previous
+       defualt identity and making the specified one the default.  As
+       an additional side effect, the notification <::KMSG_KCDB,
+       ::KMSG_KCDB_IDENT, ::KCDB_OP_NEW_DEFAULT> will also not be sent.
+  */
+ KHMEXP khm_int32 KHMAPI
+ kcdb_identity_set_default_int(khm_handle id);
+ 
+ /*! \brief Get the default identity
+ 
+     Obtain a held handle to the default identity if there is one.  The
+     handle must be freed using kcdb_identity_release().
+ 
+     If there is no default identity, then the handle pointed to by \a
+     pvid is set to \a NULL and the function returns
+     KHM_ERROR_NOT_FOUND. */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_get_default(khm_handle * pvid);
+ 
+ /*! \brief Get the configuration space for the identity. 
+ 
+     If the configuration space for the identity does not exist and the
+     flags parameter does not specify ::KHM_FLAG_CREATE, then the
+     function will return a failure code as specified in
+     ::khc_open_space().  Depending on whether or not a configuration
+     space was found, the ::KCDB_IDENT_FLAG_CONFIG flag will be set or
+     reset for the identity.
+ 
+     \param[in] id Identity for which the configuraiton space is requested
+ 
+     \param[in] flags Flags used when calling khc_open_space().  If \a
+         flags specifies KHM_FLAG_CREATE, then the configuration space
+         is created.
+ 
+     \param[out] result The resulting handle.  If the call is
+         successful, this receives a handle to the configuration space.
+         Use khc_close_space() to close the handle.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_get_config(khm_handle id,
+                          khm_int32 flags,
+                          khm_handle * result);
+ 
+ /*! \brief Hold a reference to an identity.
+ 
+     A reference to an identity (a handle) is only valid while it is
+     held.  \note Once the handle is released, it can not be
+     revalidated by calling kcdb_identity_hold().  Doing so would lead
+     to unpredictable consequences. */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_hold(khm_handle id);
+ 
+ /*! \brief Release a reference to an identity.
+     \see kcdb_identity_hold() */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_release(khm_handle id);
+ 
+ /*! \brief Set the identity provider subscription
+ 
+     If there was a previous subscription, that subscription will be
+     automatically deleted.
+ 
+     \param[in] sub New identity provider subscription
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_set_provider(khm_handle sub);
+ 
+ /*! \brief Set the primary credentials type
+ 
+     The primary credentials type is designated by the identity
+     provider.  As such, this function should only be called by an
+     identity provider.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_set_type(khm_int32 cred_type);
+ 
+ /*! \brief Retrieve the identity provider subscription
+ 
+     \param[out] sub Receives the current identity provider
+         subscription.  Set to NULL if only the existence of an
+         identity provider needs to be checked.
+ 
+     \retval KHM_ERROR_SUCCESS An identity provider exists.  If \a sub
+         was not NULL, the subscription has been copied there.
+ 
+     \retval KHM_ERROR_NOT_FOUND There is currently no registered
+         identity provider.  If \a sub was not NULL, the handle it
+         points to has been set to NULL.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_get_provider(khm_handle * sub);
+ 
+ /*! \brief Retrieve the identity provider credentials type
+ 
+     This is the credentials type that the identity provider has
+     designated as the primary credentials type.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_get_type(khm_int32 * ptype);
+ 
+ /*! \brief Returns TRUE if the two identities are equal
+ 
+     Also returns TRUE if both identities are NULL.
+  */
+ KHMEXP khm_boolean KHMAPI
+ kcdb_identity_is_equal(khm_handle identity1,
+                        khm_handle identity2);
+ 
+ /*! \brief Set an attribute in an identity by attribute id
+ 
+     \param[in] buffer A pointer to a buffer containing the data to
+         assign to the attribute.  Setting \a buffer to NULL has the
+         effect of removing any data that is already assigned to the
+         attribute.  If \a buffer is non-NULL, then \a cbbuf should
+         specify the number of bytes in \a buffer.
+ 
+     \param[in] cbbuf Number of bytes of data in \a buffer.  The
+         individual data type handlers may copy in less than this many
+         bytes in to the credential.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_set_attr(khm_handle identity,
+                        khm_int32 attr_id,
+                        void * buffer,
+                        khm_size cbbuf);
+ 
+ /*! \brief Set an attribute in an identity by name
+ 
+     The attribute name has to be a KCDB registered attribute or
+     property.
+ 
+     \param[in] cbbuf Number of bytes of data in \a buffer.  The
+         individual data type handlers may copy in less than this many
+         bytes in to the credential.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_set_attrib(khm_handle identity,
+                          wchar_t * attr_name,
+                          void * buffer,
+                          khm_size cbbuf);
+ 
+ /*! \brief Get an attribute from an identity by attribute id.
+ 
+     \param[in] buffer The buffer that is to receive the attribute
+         value.  Set this to NULL if only the required buffer size is
+         to be returned.
+ 
+     \param[in,out] cbbuf The number of bytes available in \a buffer.
+         If \a buffer is not sufficient, returns KHM_ERROR_TOO_LONG and
+         sets this to the required buffer size.
+ 
+     \param[out] attr_type Receives the data type of the attribute.
+         Set this to NULL if the type is not required.
+ 
+     \note Set both \a buffer and \a cbbuf to NULL if only the
+         existence of the attribute is to be checked.  If the attribute
+         exists in this identity then the function will return
+         KHM_ERROR_SUCCESS, otherwise it returns KHM_ERROR_NOT_FOUND.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_get_attr(khm_handle identity,
+                        khm_int32 attr_id,
+                        khm_int32 * attr_type,
+                        void * buffer,
+                        khm_size * pcbbuf);
+ 
+ /*! \brief Get an attribute from an identity by name.
+ 
+     \param[in] buffer The buffer that is to receive the attribute
+         value.  Set this to NULL if only the required buffer size is
+         to be returned.
+ 
+     \param[in,out] cbbuf The number of bytes available in \a buffer.
+         If \a buffer is not sufficient, returns KHM_ERROR_TOO_LONG and
+         sets this to the required buffer size.
+ 
+     \note Set both \a buffer and \a cbbuf to NULL if only the
+         existence of the attribute is to be checked.  If the attribute
+         exists in this identity then the function will return
+         KHM_ERROR_SUCCESS, otherwise it returns KHM_ERROR_NOT_FOUND.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_get_attrib(khm_handle identity,
+                          wchar_t * attr_name,
+                          khm_int32 * attr_type,
+                          void * buffer,
+                          khm_size * pcbbuf);
+ 
+ /*! \brief Get the string representation of an identity attribute.
+ 
+     A shortcut function which generates the string representation of
+     an identity attribute directly.
+ 
+     \param[in] identity A handle to an identity
+ 
+     \param[in] attr_id The attribute to retrieve
+ 
+     \param[out] buffer A pointer to a string buffer which receives the
+         string form of the attribute.  Set this to NULL if you only
+         want to determine the size of the required buffer.
+ 
+     \param[in,out] pcbbuf A pointer to a #khm_int32 that, on entry,
+         holds the size of the buffer pointed to by \a buffer, and on
+         exit, receives the actual number of bytes that were copied.
+ 
+     \param[in] flags Flags for the string conversion. Can be set to
+         one of KCDB_TS_LONG or KCDB_TS_SHORT.  The default is
+         KCDB_TS_LONG.
+ 
+     \retval KHM_ERROR_SUCCESS Success
+     \retval KHM_ERROR_NOT_FOUND The given attribute was either invalid
+         or was not defined for this identity
+     \retval KHM_ERROR_INVALID_PARAM One or more parameters were invalid
+     \retval KHM_ERROR_TOO_LONG Either \a buffer was NULL or the
+         supplied buffer was insufficient
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_get_attr_string(khm_handle identity,
+                               khm_int32 attr_id,
+                               wchar_t * buffer,
+                               khm_size * pcbbuf,
+                               khm_int32 flags);
+ 
+ /*! \brief Get the string representation of an identity attribute by name.
+ 
+     A shortcut function which generates the string representation of
+     an identity attribute directly.
+ 
+     \param[in] identity A handle to an identity
+ 
+     \param[in] attrib The name of the attribute to retrieve
+ 
+     \param[out] buffer A pointer to a string buffer which receives the
+         string form of the attribute.  Set this to NULL if you only
+         want to determine the size of the required buffer.
+ 
+     \param[in,out] pcbbuf A pointer to a #khm_int32 that, on entry,
+         holds the size of the buffer pointed to by \a buffer, and on
+         exit, receives the actual number of bytes that were copied.
+ 
+     \param[in] flags Flags for the string conversion. Can be set to
+         one of KCDB_TS_LONG or KCDB_TS_SHORT.  The default is
+         KCDB_TS_LONG.
+ 
+     \see kcdb_identity_get_attr_string()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_get_attrib_string(khm_handle identity,
+                                 wchar_t * attr_name,
+                                 wchar_t * buffer,
+                                 khm_size * pcbbuf,
+                                 khm_int32 flags);
+ 
+ /*! \brief Enumerate identities
+ 
+     Enumerates all the active identities that match the criteria
+     specified using \a and_flags and \a eq_flags.  The condition is
+     applied to all active identities as follows:
+ 
+     \code
+     (identity->flags & and_flags) == (eq_flags & and_flags)
+     \endcode
+ 
+     Essentially, if a flag is set in \a and_flags, then that flag in
+     the identity should equal the setting in \a eq_flags.
+ 
+     \param[in] and_flags See above
+ 
+     \param[in] eq_flags See above
+ 
+     \param[out] name_buf Buffer to receive the list of identity names.
+         Can be NULL if only the required size of the buffer or the
+         number of matching identities is required.  The list is
+         returned as a multi string.
+ 
+     \param[in,out] pcb_buf Number of bytes in buffer pointed to by \a
+         name_buf on entry.  On exit, will receive the number of bytes
+         copied.  Can be NULL only if \a name_buf is also NULL.  If \a
+         name_buf is NULL or if \a pcb_buf indicates that the buffer is
+         insufficient, this will receive the number of bytes required
+         and the return value of the function will be
+         KHM_ERROR_TOO_LONG
+ 
+     \param[out] pn_idents Receives the number of identities that match
+         the given criteria.
+ 
+     \retval KHM_ERROR_SUCCESS If \a name_buf was valid, the buffer now
+         contains a multi string of identities that matched.  If \a
+         pn_idents was valid, it contains the number of identities
+         matched.
+ 
+     \retval KHM_ERROR_TOO_LONG No buffer was supplied or the supplied
+         buffer was insufficient.  If \a pn_idents was valid, it
+         contains the number of identities.
+ 
+     \retval KHM_ERROR_INVALID_PARAM None of the parameters \a name_buf,
+         \a pcb_buf and \a pn_idents were supplied, or \a pcb_buf was
+         NULL when \a name_buf was not.
+ 
+     \note Calling this function to obtain the required size of the
+         buffer and then calling it with a that sized buffer is not
+         guaranteed to work since the list of identities may change
+         between the two calls.
+   */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_enum(khm_int32 and_flags,
+                    khm_int32 eq_flags,
+                    wchar_t * name_buf,
+                    khm_size * pcb_buf,
+                    khm_size * pn_idents);
+ 
+ /*! \brief Refresh identity attributes based on root credential set
+ 
+     Several flags in an identity are dependent on the credentials that
+     are associated with it in the root credential set.  In addition,
+     other flags in an identity depend on external factors that need to
+     be verfied once in a while.  This API goes through the root
+     credential set as well as consulting the identity provider to
+     update an identity.
+ 
+     \see kcdb_identity_refresh()
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_refresh(khm_handle vid);
+ 
+ /*! \brief Refresh all identities
+ 
+     Equivalent to calling kcdb_identity_refresh() for all active
+     identities.
+ 
+     \see kcdb_identityt_refresh()
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_identity_refresh_all(void);
+ 
+ /* KSMG_KCDB_IDENT notifications are structured as follows:
+    type=KMSG_KCDB
+    subtype=KMSG_KCDB_IDENT
+    uparam=one of KCDB_OP_*
+    blob=handle to identity in question */
+ 
+ /*@}*/
+ 
+ 
+ /*********************************************************************/
+ 
+ 
+ /*!
+ \defgroup kcdb_creds Credential sets and individual credentials
+ 
+ @{
+ */
+ 
+ 
+ /*! \brief Credentials process function
+ 
+     This function is called for each credential in a credential set
+     when supplied to kcdb_credset_apply().  It should return
+     KHM_ERROR_SUCCESS to continue the operation, or any other value to
+     terminate the processing.
+ 
+     \see kcdb_credset_apply()
+ */
+ typedef khm_int32 
+ (KHMAPI *kcdb_cred_apply_func)(khm_handle cred, 
+                                void * rock);
+ 
+ /*! \brief Credentials filter function.
+ 
+     Should return non-zero if the credential passed as \a cred is to
+     be "accepted".  The precise consequence of a non-zero return value
+     is determined by the individual function that this call back is
+     passed into.
+ 
+     This function should not call any other function which may modify
+     \a cred.
+ 
+     \see kcdb_credset_collect_filtered()
+     \see kcdb_credset_extract_filtered()
+ */
+ typedef khm_int32 
+ (KHMAPI *kcdb_cred_filter_func)(khm_handle cred, 
+                                 khm_int32 flags, 
+                                 void * rock);
+ 
+ /*! \brief Credentials compare function.
+ 
+     Asserts a weak ordering on the credentials that are passed in as
+     \a cred1 and \a cred2.  It should return:
+ 
+     - a negative value if \a cred1 < \a cred2
+     - zero if \a cred1 == \a cred2
+     - a postive value if \a cred1 > \a cred2
+     \see kcdb_credset_sort()
+     \see ::kcdb_credtype
+ */
+ typedef khm_int32 
+ (KHMAPI *kcdb_cred_comp_func)(khm_handle cred1, 
+                               khm_handle cred2, 
+                               void * rock);
+ 
+ /*! \defgroup kcdb_credset Credential sets */
+ /*@{*/
+ 
+ /*! \brief Create a credential set.
+ 
+     Credential sets are temporary containers for credentials.  These
+     can be used by plug-ins to store credentials while they are being
+     enumerated from an external source.  Once all the credentials have
+     been collected into the credential set, the plug-in may call
+     kcdb_credset_collect() to collect the credentials into the root
+     credential store.
+ 
+     The user interface will only display credentials that are in the
+     root credential store.  No notifications are generated for changes
+     to a non-root credential set.
+ 
+     Use kcdb_credset_delete() to delete the credential set once it is
+     created.
+ 
+     \see kcdb_credset_delete()
+     \see kcdb_credset_collect()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credset_create(khm_handle * result);
+ 
+ /** \brief Delete a credential set
+ 
+     \see kcdb_credset_create()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credset_delete(khm_handle credset);
+ 
+ /** \brief Collect credentials from a credential set to another credential set.
+ 
+     Collecting a subset of credentials from credential set \a cs_src
+     into credential set \a cs_dest involves the following steps:
+ 
+     - Select all credentials from \a cs_src that matches the \a
+       identity and \a type specified in the function call and add them
+       to the \a cs_dest credential set if they are not there already.
+       Note that if neither credential set is not the root credential
+       store, then the credentials will be added by reference, while if
+       it is the root credential store, the credentials will be
+       duplicated, and the copies will be added to \a cs_dest.
+ 
+     - If a selected credential in \a cs_src already exists in \a
+       cs_dest, then update the credential in \a cs_dest with the
+       credential fields in \a cs_src.  In other words, once a
+       credential is found to exist in both \a cs_src and \a cs_dest,
+       all the non-null fields from the credential in \a cs_src will be
+       copied to the credential in \a cs_dest.  Fields which are null
+       (undefined) in \a cs_src and are non-null in \a cs_dest will be
+       left unmodified in \a cs_dest.
+ 
+       One notable exception is the credentials' flags.  All flags in
+       \a cs_src which are not included in
+       ::KCDB_CRED_FLAGMASK_ADDITIVE will be copied to the
+       corresponding bits in the flags of \a cs_dest.  However, flags
+       that are included in ::KCDB_CRED_FLAGMASK_ADDITIVE will be added
+       to the corresponding bits in \a cs_dest.
+ 
+       (See notes below)
+ 
+     - Remove all credentials from \a cs_dest that match the \a
+       identity and \a type that do not appear in \a cs_src. (see notes
+       below)
+ 
+     For performance reasons, plugins should use kcdb_credset_collect()
+     to update the root credentials store instead of adding and
+     removing individual credentials from the root store.
+ 
+     Only credentials that are associated with active identities are
+     affected by kcdb_credset_collect().
+ 
+     \param[in] cs_dest A handle to the destination credential set.  If
+         this is \a NULL, then it is assumed to refer to the root
+         credential store.
+ 
+     \param[in] cs_src A handle to the source credential set.  If this
+         is NULL, then it is assumed to refer to the root credential
+         store.
+ 
+     \param[in] identity A handle to an identity.  Setting this to NULL
+         collects all identities in the credential set.
+ 
+     \param[in] type A credentials type.  Setting this to
+         KCDB_CREDTYPE_ALL collects all credential types in the set.
+ 
+     \param[out] delta A bit mask that indicates the modifications that
+         were made to \a cs_dest as a result of the collect operation.
+         This is a combination of KCDB_DELTA_* values.  This parameter
+         can be \a NULL if the value is not required.
+ 
+     \warning If \a identity and \a type is set to a wildcard, all
+         credentials in the root store that are not in this credentials
+         set will be deleted.
+ 
+     \note Two credentials \a A and \a B are considered equal if:
+         - They refer to the same identity
+         - Both have the same credential type
+         - Both have the same name
+ 
+     \note This is the only supported way of modifying the root
+         credential store.
+ 
+     \note \a cs_src and \a cs_dest can not refer to the same
+         credentials set.
+ 
+     \note The destination credential set cannot be sealed.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credset_collect(khm_handle cs_dest,
+                      khm_handle cs_src,
+                      khm_handle identity, 
+                      khm_int32 type,
+                      khm_int32 * delta);
+ 
+ /*! \brief Credentials were added
+     \see kcdb_credset_collect() */
+ #define KCDB_DELTA_ADD      1
+ 
+ /*! \brief Credentials were deleted 
+     \see kcdb_credset_collect() */
+ #define KCDB_DELTA_DEL      2
+ 
+ /*! \brief Credentials were modified
+     \see kcdb_credset_collect() */
+ #define KCDB_DELTA_MODIFY   4
+ 
+ /*! \brief Indicates that the credential to be filtered is from the root store.
+ 
+     \see kcdb_credset_collect_filtered()
+ */
+ #define KCDB_CREDCOLL_FILTER_ROOT   1
+ 
+ /*! \brief Indicates that the credential to be filtered is from the source
+         credential set 
+         
+     \see kcdb_credset_collect_filtered() */
+ #define KCDB_CREDCOLL_FILTER_SRC    2
+ 
+ /*! \brief Indicates that the credential to be filtered is from the destination
+         credential set 
+         
+     \see kcdb_credset_collect_filtered() */
+ #define KCDB_CREDCOLL_FILTER_DEST   4
+ 
+ /*! \brief Collect credentials from one credential set to another using a filter.
+ 
+     Similar to kcdb_credset_collect() except instead of selecting
+     credentials by matching against an identity and/or type, a filter
+     function is called.  If the filter function returns non-zero for a
+     credential, that credential is selected.
+ 
+     Credentials in the source and destination credential sets are
+     passed into the filter function.  Depending on whether the
+     credential is in the source credential set or destination
+     credential set, the \a flag parameter may have either \a
+     KCDB_CREDCOLL_FILTER_SRC or \a KCDB_CREDCOLL_FILTER_DEST bits set.
+     Also, if either one of the credential sets is the root credential
+     store, then additionally \a KCDB_CREDCOLL_FILTER_ROOT would also
+     be set.
+ 
+     See the kcdb_credset_collect() documentation for explanations of
+     the \a cs_src, \a cs_dest and \a delta parameters which perform
+     identical functions.
+ 
+     \param[in] filter The filter of type ::kcdb_cred_filter_func
+     \param[in] rock A custom argument to be passed to the filter function.
+ 
+     \see kcdb_credset_collect()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credset_collect_filtered(khm_handle cs_dest,
+                               khm_handle cs_src,
+                               kcdb_cred_filter_func filter,
+                               void * rock,
+                               khm_int32 * delta);
+ 
+ /*! \brief Flush all credentials from a credential set
+ 
+     Deletes all the crednetials from the credential set.
+ 
+     \param[in] credset A handle to a credential set.  Cannot be NULL.
+ 
+     \note The credential set cannot be sealed
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credset_flush(khm_handle credset);
+ 
+ /*! \brief Extract credentials from one credential set to another
+ 
+     Credentials from the source credential set are selected based on
+     the \a identity and \a type arguements.  If a credential is
+     matched, then it is added to the \a destcredset.
+ 
+     If the \a sourcecredset is the root credential set, the added
+     credentials are copies of the actual credentials in the root
+     credential set.  Otherwise the credentials are references to the
+     original credentials in the \a sourcecredset .
+ 
+     \param[in] destcredset Destination credential set.  Must be valid.
+ 
+     \param[in] sourcecredset The source credential set.  If set to
+         NULL, extracts from the root credential set.
+ 
+     \param[in] identity The identity to match in the source credential
+         set.  If set to NULL, matches all identities.
+ 
+     \param[in] type The credential type to match in the source credential set.
+         If set to KCDB_CREDTYPE_INVALID, matches all types.
+ 
+     \note This function does not check for duplicate credentials.
+ 
+     \note The destination credential set cannot be sealed.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credset_extract(khm_handle destcredset, 
+                      khm_handle sourcecredset, 
+                      khm_handle identity, 
+                      khm_int32 type);
+ 
+ /*! \brief Extract credentials from one credential set to another using a filter.
+ 
+     Similar to kcdb_credset_extract() except a filter function is used
+     to determine which credentials should be selected.
+ 
+     \param[in] rock A custom argument to be passed in to the filter function.
+ 
+     \note The destination credential set cannot be sealed.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credset_extract_filtered(khm_handle destcredset,
+                               khm_handle sourcecredset,
+                               kcdb_cred_filter_func filter,
+                               void * rock);
+ 
+ /*! \brief Retrieve a held reference to a credential in a credential set based on index.
+ 
+     \param[in] idx The index of the credential to retrieve.  This is a
+         zero based index which goes from 0 ... (size of credset - 1).
+ 
+     \param[out] cred The held reference to a credential.  Call 
+         kcdb_cred_release() to release the credential.
+ 
+     \retval KHM_ERROR_SUCCESS Success. \a cred has a held reference to the credential.
+     \retval KHM_ERROR_OUT_OF_BOUNDS The index specified in \a idx is out of bounds.
+     \retval KHM_ERROR_DELETED The credential at index \a idx has been marked as deleted.
+ 
+     \see kcdb_cred_release()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credset_get_cred(khm_handle credset,
+                       khm_int32 idx,
+                       khm_handle * cred);
+ 
+ /*! \brief Search a credential set for a specific credential
+ 
+     The credential set indicated by \a credset is searched for a
+     credential that satisfies the predicate function \a f.  Each
+     credential starting at \a idx_start is passed into the predicate
+     function until it returns a non-zero value.  At this point, that
+     credential is passed in to the \a cred parameter, and the index of
+     the credential is passed into the \a idx parameter.
+ 
+     \param[in] credset The credential set to search on.  Specify NULL
+         if you want to search teh root credential set.
+ 
+     \param[in] idx_start The index at which to start the search after.
+         The first credential passed to the predicate function will be
+         at \a idx_start + 1.  Specify -1 to start from the beginning
+         of the credential set.
+ 
+     \param[in] f The predicate function.  The \a flags parameter of
+         the predicate function will always receive 0.
+ 
+     \param[in] rock An opaque parameter to be passed to the predicate
+         function \a f.
+ 
+     \param[out] cred A held reference to the credential that satisfied
+         the predicate function or NULL if no such credential was
+         found.  Note that if a valid credential is returned, the
+         calling function must release the credential using
+         kcdb_cred_release().
+ 
+     \param[out] idx The index of the credential passed in \a cred.
+         Specify NULL if the index is not required.
+ 
+     \retval KHM_ERROR_SUCCESS A credential that satisfied the
+         predicate function was found and was assigned to \a cred.
+ 
+     \retval KHM_ERROR_NOT_FOUND No credential was found that matched
+         the predicate function.
+ 
+     \note When querying credential sets that are shared between
+         threads, it is possible that another thread modifies the
+         credential set between successive calls to
+         kcdb_credset_find_filtered().  Therefore a continued sequences of
+         searches are not guaranteed to exhastively cover the
+         credential set nor to not return duplicate matches.  Duplicate
+         matches are possible if the order of the credentials in the
+         set was changed.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credset_find_filtered(khm_handle credset,
+                            khm_int32 idx_start,
+                            kcdb_cred_filter_func f,
+                            void * rock,
+                            khm_handle * cred,
+                            khm_int32 * idx);
+ 
+ /*! \brief Find matching credential
+ 
+     Searches a credential set for a credential that matches the
+     specified credential.  For a credential to be a match, it must
+     have the same identity, credential type and name.
+ 
+     \param[in] credset Credential set to search 
+ 
+     \param[in] cred_src Credetial to search on
+ 
+     \param[out] cred_dest receieves the matching credential if the
+         search is successful.  If a handle is returend, the
+         kcdb_cred_release() must be used to release the handle.  If
+         the matching credential is not required, you can pass in NULL.
+ 
+     \retval KHM_ERROR_SUCCESS The search was successful.  A credential
+         was assigned to \a cred_dest
+ 
+     \retval KHM_ERROR_NOT_FOUND A matching credential was not found.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credset_find_cred(khm_handle credset,
+                        khm_handle cred_src,
+                        khm_handle *cred_dest);
+                                                
+ 
+ /*! \brief Delete a credential from a credential set.
+ 
+     The credential at index \a idx will be deleted.  All the
+     credentials that are at indices \a idx + 1 and above will be moved
+     down to fill the gap and the size of the credential set will
+     decrease by one.
+ 
+     Use kcdb_credset_del_cred_ref() to delete a credential by
+     reference.  Using kcdb_credset_del_cred() is faster than
+     kcdb_credset_del_cred_ref().
+ 
+     If you call kcdb_credset_del_cred() or kcdb_credset_del_cred_ref()
+     from within kcdb_credset_apply(), the credential will only be
+     marked as deleted.  They will not be removed.  This means that the
+     size of the credential set will not decrease.  To purge the
+     deleted credentials from the set, call kcdb_credset_purge() after
+     kcdb_credset_apply() completes.
+ 
+     \note The credential set cannot be sealed.
+ 
+     \see kcdb_credset_del_cred_ref()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credset_del_cred(khm_handle credset,
+                       khm_int32 idx);
+ 
+ /*! \brief Delete a credential from a credential set by reference.
+ 
+     See kcdb_credset_del_cred() for description of what happens when a
+     credential is deleted from a credential set.
+ 
+     \note The credential set cannot be sealed.
+ 
+     \see kcdb_credset_del_cred()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credset_del_cred_ref(khm_handle credset,
+                           khm_handle cred);
+ 
+ /*! \brief Add a credential to a credential set.
+ 
+     The credential is added by reference.  In other words, no copy of
+     the credential is made.
+ 
+     \param[in] idx Index of the new credential.  This must be a value
+         in the range 0..(previous size of credential set) or -1.  If
+         -1 is specifed, then the credential is appended at the end of
+         the set.
+ 
+     \note The credential set cannot be sealed.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credset_add_cred(khm_handle credset,
+                       khm_handle cred,
+                       khm_int32 idx);
+ 
+ /*! \brief Get the number of credentials in a credential set.
+ 
+     Credentials in a credential set may be volatile.  When
+     kcdb_credeset_get_size() is called, the credential set is
+     compacted to only include credentials that are active at the time.
+     However, when you are iterating through the credential set, it
+     might be the case that some credentials would get marked as
+     deleted.  These credentials will remain in the credential set
+     until the credential set is discarded or another call to
+     kcdb_credset_get_size() or kdcb_credset_purge() is made.
+ 
+     If the credential set is sealed, then it will not be compacted and
+     will include deleted credentials as well.
+ 
+     \see kcdb_credset_purge()
+     \see kcdb_credset_get_cred()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credset_get_size(khm_handle credset,
+                       khm_size * size);
+ 
+ /*! \brief Removes credentials that have been marked as deleted from a credential set.
+ 
+     See description of \a kcdb_credset_purge() for a description of
+     what happens when credntials that are contained in a credential
+     set are deleted by an external entity.
+ 
+     \note The credential set cannot be sealed.
+ 
+     \see kcdb_credset_get_size()
+     \see kcdb_credset_get_cred()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credset_purge(khm_handle credset);
+ 
+ /*! \brief Applies a function to all the credentials in a credentials set
+ 
+     The given function is called for each credential in a credential
+     set.  With each iteration, the function is called with a handle to
+     the credential and the user defined parameter \a rock.  If the
+     function returns anything other than KHM_ERROR_SUCCESS, the
+     processing stops.
+ 
+     \param[in] credset The credential set to apply the function to, or
+         NULL if you want to apply this to the root credential set.
+ 
+     \param[in] f Function to call for each credential
+ 
+     \param[in] rock An opaque parameter which is to be passed to 'f'
+         as the second argument.
+ 
+     \retval KHM_ERROR_SUCCESS All the credentials were processed.
+ 
+     \retval KHM_ERROR_EXIT The supplied function signalled the
+         processing to be aborted.
+ 
+     \retval KHM_ERROR_INVALID_PARAM One or more parameters were invalid.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credset_apply(khm_handle credset, 
+                    kcdb_cred_apply_func f, 
+                    void * rock);
+ 
+ /*! \brief Sort the contents of a credential set.
+ 
+     \param[in] rock A custom argument to be passed in to the \a comp function.
+ 
+     \note The credential set cannot be sealed.
+ 
+     \see kcdb_cred_comp_generic()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credset_sort(khm_handle credset,
+                   kcdb_cred_comp_func comp,
+                   void * rock);
+ 
+ /*! \brief Seal a credential set
+ 
+     Sealing a credential set makes it read-only.  To unseal a
+     credential set, call kcdb_credset_unseal().
+ 
+     Sealing is an additive operation.  kcdb_credset_seal() can be
+     called muliple times.  However, for every call to
+     kcdb_credset_seal() a call to kcdb_credset_unseal() must be made
+     to undo the seal.  The credential set will become unsealed when
+     all the seals are released.
+ 
+     Once sealed, the credential set will not allow any operation that
+     might change its contents.  However, a selaed credential set can
+     still be delted.
+ 
+     \see kcdb_credset_unseal()
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credset_seal(khm_handle credset);
+ 
+ /*! \brief Unseal a credential set
+ 
+     Undoes what kcdb_credset_seal() did.  This does not guarantee that
+     the credential set is unsealed since there may be other seals.
+ 
+     \see kcdb_credset_seal()
+  */
+ KHMEXP khm_int32 KHMAPI
+ kcdb_credset_unseal(khm_handle credset);
+ 
+ /*! \brief Defines a sort criterion for kcdb_cred_comp_generic()
+ 
+     \see kcdb_cred_comp_generic()
+ */
+ typedef struct tag_kcdb_cred_comp_field {
+     khm_int32 attrib; /*!< a valid attribute ID */
+     khm_int32 order; /*!< one of KCDB_CRED_COMP_INCREASING or
+                        KCDB_CRED_COMP_DECREASING.  Optionally,
+                        KCDB_CRED_COMP_INITIAL_FIRST may be combined
+                        with either. */
+ } kcdb_cred_comp_field;
+ 
+ /*! \brief Defines the sort order for a field in ::kcdb_cred_comp_field 
+ 
+     Sorts lexicographically ascending by string representation of field.
+ */
+ #define KCDB_CRED_COMP_INCREASING 0
+ 
+ /*! \brief Defines the sort order for a field in ::kcdb_cred_comp_field
+ 
+     Sorts lexicographically descending by string representation of
+     field.
+  */
+ #define KCDB_CRED_COMP_DECREASING 1
+ 
+ /*! \brief Defines the sort order for a field in ::kcdb_cred_comp_field 
+ 
+     Any credentials which have the ::KCDB_CRED_FLAG_INITIAL will be
+     grouped above any that don't.
+ 
+     If that does not apply, then credentials from the primary
+     credentials type will be sorted before others.
+ */
+ #define KCDB_CRED_COMP_INITIAL_FIRST 2
+ 
+ /*! \brief Defines the sort criteria for kcdb_cred_comp_generic()
+ 
+     \see kcdb_cred_comp_generic()
+ */
+ typedef struct tag_kcdb_cred_comp_order {
+     khm_int32 nFields;
+     kcdb_cred_comp_field * fields;
+ } kcdb_cred_comp_order;
+ 
+ /*! \brief A generic compare function for comparing credentials.
+ 
+     This function can be passed as a parameter to kcdb_credset_sort().
+ 
+     The \a rock parameter to this function should be a pointer to a
+     ::kcdb_cred_comp_order object.  The \a fields member of the
+     ::kcdb_cred_comp_order object should point to an array of
+     ::kcdb_cred_comp_field objects, each of which specifies the sort
+     order in decreasing order of priority.  The number of
+     ::kcdb_cred_comp_field objects in the array should correspond to
+     the \a nFields member in the ::kcdb_cred_comp_order object.
+ 
+     The array of ::kcdb_cred_comp_field objects define the sort
+     criteria, in order.  The \a attrib member should be a valid
+     attribute ID, while the \a order member determines whether the
+     sort order is increasing or decreasing.  The exact meaning or
+     increasing or decreasing depends on the data type of the
+     attribute.
+ 
+     \param[in] rock a pointer to a ::kcdb_cred_comp_order object
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_comp_generic(khm_handle cred1, 
+                        khm_handle cred2, 
+                        void * rock);
+ 
+ /*@}*/
+ 
+ /*! \defgroup kcdb_cred Credentials */
+ /*@{*/
+ 
+ /*! \brief Maximum number of characters in a credential name */
+ #define KCDB_CRED_MAXCCH_NAME 256
+ 
+ /*! \brief Maximum number of bytes in a credential name */
+ #define KCDB_CRED_MAXCB_NAME (sizeof(wchar_t) * KCDB_CRED_MAXCCH_NAME)
+ 
+ /*! \brief Marked as deleted */
+ #define KCDB_CRED_FLAG_DELETED     0x00000008
+ 
+ /*! \brief Renewable */
+ #define KCDB_CRED_FLAG_RENEWABLE   0x00000010
+ 
+ /*! \brief Initial
+ 
+     Initial credentials form the basis of an identity.  Some
+     properties of an initial credential, such as being renewable, are
+     directly inherited by the identity.  An identity is also
+     automatically considered valid if it contains a valid initial
+     credential.
+  */
+ #define KCDB_CRED_FLAG_INITIAL     0x00000020
+ 
+ /*! \brief Expired
+ 
+     The credential's lifetime has ended.
+  */
+ #define KCDB_CRED_FLAG_EXPIRED     0x00000040
+ 
+ /*! \brief Invalid
+ 
+     The credential can no longer serve its intended function.  This
+     may be because it is expired and is not renewable, or its
+     renewable time period has also expired, or for some other reason.
+  */
+ #define KCDB_CRED_FLAG_INVALID     0x00000080
+ 
+ /*! \brief Credential is selected
+ 
+     Indicates that the credential is selected.  Note that using this
+     flag may be subject to race conditions.
+  */
+ #define KCDB_CRED_FLAG_SELECTED    0x00000100
+ 
+ /*! \brief Bitmask indicating all known credential flags
+  */
+ #define KCDB_CRED_FLAGMASK_ALL     0x0000ffff
+ 
+ /*! \brief External flags
+ 
+     These are flags that are provided by the credentials providers.
+     The other flags are internal to KCDB and should not be modified.
+  */
+ #define KCDB_CRED_FLAGMASK_EXT     (KCDB_CRED_FLAG_INITIAL | KCDB_CRED_FLAG_EXPIRED | KCDB_CRED_FLAG_INVALID | KCDB_CRED_FLAG_RENEWABLE)
+ 
+ /*! \brief Bitmask indicating dditive flags 
+ 
+     Additive flags are special flags which are added to exiting
+     credentials based on new credentials when doing a collect
+     operation.  See details on kcdb_credset_collect()
+ 
+     \see kcdb_credset_collect()
+ */
+ #define KCDB_CRED_FLAGMASK_ADDITIVE KCDB_CRED_FLAG_SELECTED
+ 
+ /*! \brief Generic credentials request
+ 
+     This data structure is used as the format for a generic
+     credentials reqeust for a ::KMSG_KCDB_REQUEST message.  A plugin
+     typically publishes this message so that a credentials provider
+     may handle it and in response, obtain the specified credential.
+ 
+     While the \a identity, \a type and \a name members of the
+     structure are all optional, typically one would specify all three
+     or at least two for a credential provider to be able to provide
+     the credential unambigously.
+ 
+     Credential providers do not need to respond to ::KMSG_KCDB_REQUEST
+     messages.  However, if they do, they should make sure that they
+     are the only credential provider that is responding by setting the
+     \a semaphore member to a non-zero value.  The \a semaphore is set
+     to zero when a request is initially sent out.  When incrementing
+     the semaphore, the plugin should use a thread safe mechanism to
+     ensure that there are no race conditions that would allow more
+     than one provider to respond to the message.
+  */
+ typedef struct tag_kcdb_cred_request {
+     khm_handle identity;        /*!< Identity of the credential.  Set
+                                   to NULL if not specified. */
+     khm_int32  type;            /*!< Type of the credential.  Set to
+                                   KCDB_CREDTYPE_INVALID if not
+                                   specified.  */
+     wchar_t *  name;            /*!< Name of the credential.  Set to
+                                   NULL if not specified.  */
+ 
+     khm_handle dest_credset;    /*!< If non-NULL, instructs whoever is
+                                   handling the request that the
+                                   credential thus obtained be placed
+                                   in this credential set in addition
+                                   to whereever it may place newly
+                                   acquired credentials.  Note that
+                                   while this can be NULL if the new
+                                   credential does not need to be
+                                   placed in a credential set, it can
+                                   not equal the root credential
+                                   set.  */
+ 
+     void *     vparam;        /*!< An unspecified
+                                   parameter. Specific credential types
+                                   may specify how this field is to be
+                                   used. */
+ 
+     long       semaphore;       /*!< Incremented by one when this
+                                   request is answered.  Only one
+                                   credential provider is allowed to
+                                   answer a ::KMSG_KCDB_REQUEST
+                                   message.  Initially, when the
+                                   message is sent out, this member
+                                   should be set to zero. */
+ } kcdb_cred_request;
+ 
+ /*! \brief Create a new credential
+ 
+     \param[in] name Name of credential.  \a name cannot be NULL and cannot
+         exceed \a KCDB_CRED_MAXCCH_NAME unicode characters including the 
+         \a NULL terminator.
+     \param[in] identity A reference to an identity.
+     \param[in] cred_type A credentials type identifier for the credential.
+     \param[out] result Gets a held reference to the newly created credential.
+         Call kcdb_cred_release() or kcdb_cred_delete() to release the 
+         reference.
+     \see kcdb_cred_release()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_create(wchar_t *   name, 
+                  khm_handle  identity,
+                  khm_int32   cred_type,
+                  khm_handle * result);
+ 
+ /*! \brief Duplicate an existing credential.
+ 
+     \param[out] newcred A held reference to the new credential if the call
+         succeeds.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_dup(khm_handle cred,
+               khm_handle * newcred);
+ 
+ /*! \brief Updates one credential using field values from another
+ 
+     All fields that exist in \a vsrc will get copied to \a vdest and will
+     overwrite any values that are already there in \a vdest.  However any
+     values that exist in \a vdest taht do not exist in \a vsrc will not be
+     modified.
+ 
+     \retval KHM_ERROR_SUCCESS vdest was successfully updated
+     \retval KHM_ERROR_EQUIVALENT all fields in vsrc were present and equivalent in vdest
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_update(khm_handle vdest,
+                  khm_handle vsrc);
+ 
+ /*! \brief Set an attribute in a credential by name
+ 
+     \param[in] cbbuf Number of bytes of data in \a buffer.  The
+         individual data type handlers may copy in less than this many
+         bytes in to the credential.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_set_attrib(khm_handle cred, 
+                      wchar_t * name, 
+                      void * buffer, 
+                      khm_size cbbuf);
+ 
+ /*! \brief Set an attribute in a credential by attribute id
+ 
+     \param[in] buffer A pointer to a buffer containing the data to
+         assign to the attribute.  Setting this to NULL has the effect
+         of removing any data that is already assigned to the
+         attribute.  If \a buffer is non-NULL, then \a cbbuf should
+         specify the number of bytes in \a buffer.
+ 
+     \param[in] cbbuf Number of bytes of data in \a buffer.  The
+         individual data type handlers may copy in less than this many
+         bytes in to the credential.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_set_attr(khm_handle cred, 
+                    khm_int32 attr_id, 
+                    void * buffer, 
+                    khm_size cbbuf);
+ 
+ /*! \brief Get an attribute from a credential by name.
+ 
+     \param[in] buffer The buffer that is to receive the attribute
+         value.  Set this to NULL if only the required buffer size is
+         to be returned.
+ 
+     \param[in,out] cbbuf The number of bytes available in \a buffer.
+         If \a buffer is not sufficient, returns KHM_ERROR_TOO_LONG and
+         sets this to the required buffer size.
+ 
+     \note Set both \a buffer and \a cbbuf to NULL if only the
+         existence of the attribute is to be checked.  If the attribute
+         exists in this credential then the function will return
+         KHM_ERROR_SUCCESS, otherwise it returns KHM_ERROR_NOT_FOUND.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_get_attrib(khm_handle cred, 
+                      wchar_t * name, 
+                      khm_int32 * attr_type,
+                      void * buffer, 
+                      khm_size * cbbuf);
+ 
+ /*! \brief Get an attribute from a credential by attribute id.
+ 
+     \param[in] buffer The buffer that is to receive the attribute
+         value.  Set this to NULL if only the required buffer size is
+         to be returned.
+ 
+     \param[in,out] cbbuf The number of bytes available in \a buffer.
+         If \a buffer is not sufficient, returns KHM_ERROR_TOO_LONG and
+         sets this to the required buffer size.
+ 
+     \param[out] attr_type Receives the data type of the attribute.
+         Set this to NULL if the type is not required.
+ 
+     \note Set both \a buffer and \a cbbuf to NULL if only the
+         existence of the attribute is to be checked.  If the attribute
+         exists in this credential then the function will return
+         KHM_ERROR_SUCCESS, otherwise it returns KHM_ERROR_NOT_FOUND.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_get_attr(khm_handle cred, 
+                    khm_int32 attr_id,
+                    khm_int32 * attr_type,
+                    void * buffer, 
+                    khm_size * cbbuf);
+ 
+ /*! \brief Get the name of a credential.
+ 
+     \param[in] buffer The buffer that is to receive the credential
+         name.  Set this to NULL if only the required buffer size is to
+         be returned.
+ 
+     \param[in,out] cbbuf The number of bytes available in \a buffer.
+         If \a buffer is not sufficient, returns KHM_ERROR_TOO_LONG and
+         sets this to the required buffer size.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_get_name(khm_handle cred, 
+                    wchar_t * buffer, 
+                    khm_size * cbbuf);
+ 
+ /*! \brief Get the string representation of a credential attribute.
+ 
+     A shortcut function which generates the string representation of a
+     credential attribute directly.
+ 
+     \param[in] vcred A handle to a credential
+ 
+     \param[in] attr_id The attribute to retrieve
+ 
+     \param[out] buffer A pointer to a string buffer which receives the
+         string form of the attribute.  Set this to NULL if you only
+         want to determine the size of the required buffer.
+ 
+     \param[in,out] pcbbuf A pointer to a #khm_int32 that, on entry,
+         holds the size of the buffer pointed to by \a buffer, and on
+         exit, receives the actual number of bytes that were copied.
+ 
+     \param[in] flags Flags for the string conversion. Can be set to
+         one of KCDB_TS_LONG or KCDB_TS_SHORT.  The default is
+         KCDB_TS_LONG.
+ 
+     \retval KHM_ERROR_SUCCESS Success
+     \retval KHM_ERROR_NOT_FOUND The given attribute was either invalid
+         or was not defined for this credential
+     \retval KHM_ERROR_INVALID_PARAM One or more parameters were invalid
+     \retval KHM_ERROR_TOO_LONG Either \a buffer was NULL or the
+         supplied buffer was insufficient
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_get_attr_string(khm_handle vcred, 
+                           khm_int32 attr_id,
+                           wchar_t * buffer, 
+                           khm_size * pcbbuf,
+                           khm_int32 flags);
+ 
+ /*! \brief Get the string representation of a credential attribute by name.
+ 
+     A shortcut function which generates the string representation of a
+     credential attribute directly.
+ 
+     \param[in] vcred A handle to a credential
+ 
+     \param[in] attrib The name of the attribute to retrieve
+ 
+     \param[out] buffer A pointer to a string buffer which receives the
+         string form of the attribute.  Set this to NULL if you only
+         want to determine the size of the required buffer.
+ 
+     \param[in,out] pcbbuf A pointer to a #khm_int32 that, on entry,
+         holds the size of the buffer pointed to by \a buffer, and on
+         exit, receives the actual number of bytes that were copied.
+ 
+     \param[in] flags Flags for the string conversion. Can be set to
+         one of KCDB_TS_LONG or KCDB_TS_SHORT.  The default is
+         KCDB_TS_LONG.
+ 
+     \see kcdb_cred_get_attr_string()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_get_attrib_string(khm_handle cred, 
+                             wchar_t * name, 
+                             wchar_t * buffer, 
+                             khm_size * cbbuf,
+                             khm_int32 flags) ;
+ 
+ 
+ /*! \brief Get a held reference to the identity associated with a credential
+ 
+     Use kcdb_identity_release() to release the reference that is
+     returned.
+ 
+     \see kcdb_identity_relase()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_get_identity(khm_handle cred, 
+                        khm_handle * identity);
+ 
+ /*! \brief Set the identity of a credential
+ 
+     While it is ill-advised to change the identity of a credential
+     that has been placed in one or more credential sets, there can be
+     legitimate reasons for doing so.  Only change the identity of a
+     credential that is not placed in a credential set or placed in a
+     credential set that is only used by a single entity.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_set_identity(khm_handle vcred,
+                        khm_handle id);
+ 
+ /*! \brief Get the serial number for the credential.
+ 
+     Each credential gets assigned a serial number at the time it is
+     created.  This will stay with the credential for its lifetime.
+ 
+     \param[out] pserial Receives the serial number. Cannot be NULL.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_get_serial(khm_handle cred,
+                      khm_ui_8 * pserial);
+ 
+ /*! \brief Get the type of the credential.
+ 
+     The returned type is a credential type. Doh.
+ 
+     \param[out] type Receives the type.  Cannot be NULL.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_get_type(khm_handle cred,
+                    khm_int32 * type);
+ 
+ /*! \brief Retrieve flags from a credential
+ 
+     The flags returned will be place in the location pointed to by \a
+     flags.  Note that the specified credential must be an active
+     credential for the operation to succeed.  This means the
+     ::KCDB_CRED_FLAG_DELETED will never be retured by this function.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_get_flags(khm_handle cred,
+                     khm_int32 * flags);
+ 
+ /*! \brief Set the flags of a credential
+ 
+     The flags specified in the \a mask parameter will be set to the
+     values specified in the \a flags parameter.  The flags that are
+     not included in \a mask will not be modified.
+ 
+     This function can not be used to set the ::KCDB_CRED_FLAG_DELETED
+     flag.  If this bit is specified in either \a flags or \a mask, it
+     will be ignored.
+ 
+     \see ::KCDB_CRED_FLAGMASK_ALL
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_set_flags(khm_handle cred,
+                     khm_int32 flags,
+                     khm_int32 mask);
+ 
+ /*! \brief Hold a reference to a credential.
+ 
+     Use kcdb_cred_release() to release the reference.
+ 
+     \see kcdb_cred_release()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_hold(khm_handle cred);
+ 
+ /*! \brief Release a held reference to a credential.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_release(khm_handle cred);
+ 
+ /*! \brief Delete a credential.
+ 
+     The credential will be marked for deletion and will continue to
+     exist until all held references are released.  If the credential
+     is bound to a credential set or the root credential store, it will
+     be removed from the respective container.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_cred_delete(khm_handle cred);
+ 
+ /*! \brief Compare an attribute of two credentials by name.
+ 
+     \return The return value is dependent on the type of the attribute
+     and indicate a weak ordering of the attribute values of the two
+     credentials.  If one or both credentials do not contain the
+     attribute, the return value is 0, which signifies that no ordering
+     can be determined.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_creds_comp_attrib(khm_handle cred1, 
+                        khm_handle cred2, 
+                        wchar_t * name);
+ 
+ /*! \brief Compare an attribute of two credentials by attribute id.
+ 
+     \return The return value is dependent on the type of the attribute
+     and indicate a weak ordering of the attribute values of the two
+     credentials.  If one or both credentials do not contain the
+     attribute, the return value is 0, which signifies that no ordering
+     can be determined.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_creds_comp_attr(khm_handle cred1, 
+                      khm_handle cred2, 
+                      khm_int32 attr_id);
+ 
+ /*! \brief Compare two credentials for equivalence
+ 
+     \return Non-zero if the two credentials are equal.  Zero otherwise.
+     \note Two credentials are considered equal if all the following hold:
+         - Both refer to the same identity.
+         - Both have the same name.
+         - Both have the same type.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_creds_is_equal(khm_handle cred1,
+                     khm_handle cred2);
+ 
+ /*@}*/
+ /*@}*/
+ 
+ /********************************************************************/
+ 
+ /*! \defgroup kcdb_type Credential attribute types
+ 
+ @{*/
+ 
+ /*! \brief Convert a field to a string
+ 
+     Provides a string representation of a field in a credential.  The
+     data buffer can be assumed to be valid.
+ 
+     On entry, \a s_buf can be NULL if only the required size of the
+     buffer is to be returned.  \a pcb_s_buf should be non-NULL and
+     should point to a valid variable of type ::khm_size that will, on
+     entry, contain the size of the buffer pointed to by \a s_buf if \a
+     s_buf is not \a NULL, and on exit will contain the number of bytes
+     consumed in \a s_buf, or the required size of the buffer if \a
+     s_buf was NULL or the size of the buffer was insufficient.
+ 
+     The implementation should verify the parameters that are passed in
+     to the function.
+ 
+     The data pointed to by \a data should not be modified in any way.
+ 
+     \param[in] data Valid pointer to a block of data
+ 
+     \param[in] cb_data Number of bytes in data block pointed to by \a
+         data
+ 
+     \param[out] s_buf Buffer to receive the string representation of
+         data.  If the data type flags has KCDB_TYPE_FLAG_CB_AUTO, then
+         this parameter could be set to KCDB_CBSIZE_AUTO.  In this
+         case, the function should compute the size of the input buffer
+         assuming that the input buffer is valid.
+ 
+     \param[in,out] pcb_s_buf On entry, contains the size of the buffer
+         pointed to by \a s_buf, and on exit, contains the number of
+         bytes used by the string representation of the data including
+         the NULL terminator
+ 
+     \param[in] flags Flags for formatting the string
+ 
+     \retval KHM_ERROR_SUCCESS The string representation of the data
+         field was successfully copied to \a s_buf and the size of the
+         buffer used was copied to \a pcb_s_buf.
+ 
+     \retval KHM_ERROR_INVALID_PARAM One or more parameters were invalid
+ 
+     \retval KHM_ERROR_TOO_LONG Either \a s_buf was \a NULL or the size
+         indicated by \a pcb_s_buf was too small to contain the string
+         representation of the value.  The required size of the buffer
+         is in \a pcb_s_buf.
+ 
+     \note This documents the expected behavior of this prototype function
+ 
+     \see ::kcdb_type
+  */
+ typedef khm_int32 
+ (KHMAPI *kcdb_dtf_toString)(const void *     data,
+                             khm_size         cb_data,
+                             wchar_t *        s_buf,
+                             khm_size *       pcb_s_buf,
+                             khm_int32        flags);
+ 
+ /*! \brief Verifies whetehr the given buffer contains valid data
+ 
+     The function should examine the buffer and the size of the buffer
+     and determine whether or not the buffer contains valid data for
+     this data type.
+ 
+     The data field pointed to by \a data should not be modified in any
+     way.
+ 
+     \param[in] data A pointer to a data buffer
+ 
+     \param[in] cb_data The number of bytes in the data buffer. If the
+         data type flags has KCDB_TYPE_FLAG_CB_AUTO, then this
+         parameter could be set to KCDB_CBSIZE_AUTO.  In this case, the
+         function should compute the size of the input buffer assuming
+         that the input buffer is valid.
+ 
+     \return TRUE if the data is valid, FALSE otherwise.
+ 
+     \note This documents the expected behavior of this prototype function
+ 
+     \see ::kcdb_type
+ */
+ typedef khm_boolean 
+ (KHMAPI *kcdb_dtf_isValid)(const void *     data,
+                            khm_size         cb_data);
+ 
+ /*! \brief Compare two fields
+ 
+     Compare the two data fields and return a value indicating their
+     relative ordering.  The return value follows the same
+     specification as strcmp().
+ 
+     Both data buffers that are passed in can be assumed to be valid.
+ 
+     None of the data buffers should be modified in any way.
+ 
+     \param[in] data_l Valid pointer to first data buffer
+ 
+     \param[in] cb_data_l Number of bytes in \a data_l. If the data
+         type flags has KCDB_TYPE_FLAG_CB_AUTO, then this parameter
+         could be set to KCDB_CBSIZE_AUTO.  In this case, the function
+         should compute the size of the input buffer assuming that the
+         input buffer is valid.
+ 
+     \param[in] data_r Valid pointer to second data buffer
+ 
+     \param[in] cb_data_r Number of bytes in \a data_r. If the data
+         type flags has KCDB_TYPE_FLAG_CB_AUTO, then this parameter
+         could be set to KCDB_CBSIZE_AUTO.  In this case, the function
+         should compute the size of the input buffer assuming that the
+         input buffer is valid.
+ 
+     \return The return value should be
+         - Less than zero if \a data_l &lt; \a data_r
+         - Equal to zero if \a data_l == \a data_r or if this data type can not be compared
+         - Greater than zero if \a data_l &gt; \a data_r
+ 
+     \note This documents the expected behavior of this prototype function
+ 
+     \see ::kcdb_type
+ */
+ typedef khm_int32 
+ (KHMAPI *kcdb_dtf_comp)(const void *     data_l,
+                         khm_size         cb_data_l,
+                         const void *     data_r,
+                         khm_size         cb_data_r);
+ 
+ /*! \brief Duplicate a data field
+ 
+     Duplicates a data field.  The buffer pointed to by \a data_src
+     contains a valid field.  The function should copy the field with
+     appropriate adjustments to \a data_dst.
+ 
+     The \a data_dst parameter can be NULL if only the required size of
+     the buffer is needed.  In this case, teh function should set \a
+     pcb_data_dst to the number of bytes required and then return
+     KHM_ERROR_TOO_LONG.
+ 
+     \param[in] data_src Pointer to a valid data buffer
+ 
+     \param[in] cb_data_src Number of bytes in \a data_src. If the data
+         type flags has KCDB_TYPE_FLAG_CB_AUTO, then this parameter
+         could be set to KCDB_CBSIZE_AUTO.  In this case, the function
+         should compute the size of the input buffer assuming that the
+         input buffer is valid.
+ 
+     \param[out] data_dst Poitner to destination buffer.  Could be NULL
+        if only the required size of the destination buffer is to be
+        returned.
+ 
+     \param[in,out] pcb_data_dst On entry specifies the number of bytes
+         in \a data_dst, and on exit should contain the number of bytes
+         copied.
+ 
+     \retval KHM_ERROR_SUCCESS The data was successfully copied.  The
+         number of bytes copied is in \a pcb_data_dst
+ 
+     \retval KHM_ERROR_INVALID_PARAM One or more parameters is incorrect.
+ 
+     \retval KHM_ERROR_TOO_LONG Either \a data_dst was NULL or the size
+         of the buffer was insufficient.  The required size is in \a
+         pcb_data_dst
+ 
+     \note This documents the expected behavior of this prototype function
+ 
+     \see ::kcdb_type
+  */
+ typedef khm_int32 
+ (KHMAPI *kcdb_dtf_dup)(const void * data_src,
+                        khm_size cb_data_src,
+                        void * data_dst,
+                        khm_size * pcb_data_dst);
+ 
+ /*! \brief A data type descriptor.
+ 
+     Handles basic operation for a specific data type.
+ 
+     \see \ref cred_data_types
+ */
+ typedef struct tag_kcdb_type {
+     wchar_t *   name;
+     khm_int32   id;
+     khm_int32   flags;
+ 
+     khm_size    cb_min;
+     khm_size    cb_max;
+ 
+     kcdb_dtf_toString    toString;
+         /*!< Provides a string representation for a value.  */
+ 
+     kcdb_dtf_isValid     isValid;
+         /*!< Returns true of the value is valid for this data type */
+ 
+     kcdb_dtf_comp        comp;
+         /*!< Compare two values and return \a strcmp style return value */
+ 
+     kcdb_dtf_dup         dup;
+         /*!< Duplicate a value into a secondary buffer */
+ } kcdb_type;
+ 
+ /*! \name Flags for kcdb_type::toString
+ @{*/
+ /*! \brief Specify that the short form of the string representation should be returned. 
+ 
+     Flags for #kcdb_type::toString.  The flag specifies how long the
+     string representation should be.  The specific length of a short
+     or long description is not restricted and it is up to the
+     implementation to choose how to interpret the flags.
+ 
+     Usually, KCDB_TS_SHORT is specified when the amount of space that
+     is available to display the string is very restricted.  It may be
+     the case that the string is truncated to facilitate displaying in
+     a constrainted space.  
+ */
+ #define KCDB_TS_SHORT   1
+ 
+ /*! \brief Specify that the long form of the string representation should be returned 
+ 
+     Flags for #kcdb_type::toString.  The flag specifies how long the
+     string representation should be.  The specific length of a short
+     or long description is not restricted and it is up to the
+     implementation to choose how to interpret the flags.
+ 
+ */
+ #define KCDB_TS_LONG    0
+ /*@}*/
+ 
+ /*! \brief The maximum number of bytes allowed for a value of any type */
+ #define KCDB_TYPE_MAXCB 16384
+ 
+ /*! \name Flags for kcdb_type
+ @{*/
+ 
+ /*! \brief The type supports KCDB_CBSIZE_AUTO.
+ 
+     Used for types where the size of the object can be determined
+     through context or by the object content.  Such as for objects
+     that have a fixed size or unicode strings that have a terminator.
+ 
+     This implies that ALL the object manipulation callbacks that are
+     defined in this type definition support the KCDB_CBSIZE_AUTO
+     value.
+ */
+ #define KCDB_TYPE_FLAG_CB_AUTO      16
+ 
+ /*! \brief The \a cb_min member is valid.
+ 
+     The \a cb_min member defines the minimum number of bytes that an
+     object of this type will consume.
+ 
+     \note If this flag is used in conjunction with \a
+     KCDB_TYPE_FLAG_CB_MAX then, \a cb_min must be less than or equal
+     to \a cb_max. 
+ */
+ #define KCDB_TYPE_FLAG_CB_MIN       128
+ 
+ /*! \brief The \a cb_max member is valid.
+ 
+     The \a cb_max member defines the maximum number of bytes that an
+     object of this type will consume.
+ 
+     \note If this flag is used in conjunction with \a
+         KCDB_TYPE_FLAG_CB_MIN then, \a cb_min must be less than or
+         equal to \a cb_max. */
+ #define KCDB_TYPE_FLAG_CB_MAX       256
+ 
+ /*! \brief Denotes that objects of this type have a fixed size.
+ 
+     If this flags is specified, then the type definition must also
+     specify cb_min and cb_max, which must both be the same value.
+ 
+     \note Implies \a KCDB_TYPE_FLAG_CB_AUTO, \a KCDB_TYPE_FLAG_CB_MIN
+         and \a KCDB_TYPE_FLAG_CB_MAX. Pay special attention to the
+         implication of \a KCDB_TYPE_FLAG_AUTO.
+ */
+ #define KCDB_TYPE_FLAG_CB_FIXED (KCDB_TYPE_FLAG_CB_AUTO|KCDB_TYPE_FLAG_CB_MIN|KCDB_TYPE_FLAG_CB_MAX)
+ 
+ /*@}*/
+ 
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_type_get_id(wchar_t *name, khm_int32 * id);
+ 
+ /*! \brief Return the type descriptor for a given type id
+ 
+     \param[out] info Receives a held reference to a type descriptor.
+         Use kcdb_type_release_info() to release the handle.  If the \a
+         info parameter is NULL, the function returns KHM_ERROR_SUCCESS
+         if \a id is a valid type id, and returns KHM_ERROR_NOT_FOUND
+         otherwise.
+ 
+     \see kcdb_type_release_info()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_type_get_info(khm_int32 id, kcdb_type ** info);
+ 
+ /*! \brief Release a reference to a type info structure
+ 
+     Releases the reference to the type information obtained with a
+     prior call to kcdb_type_get_info().
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_type_release_info(kcdb_type * info);
+ 
+ /*! \brief Get the name of a type
+ 
+     Retrieves the non-localized name of the specified type.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_type_get_name(khm_int32 id, 
+                    wchar_t * buffer, 
+                    khm_size * cbbuf);
+ 
+ /*! \brief Register a credentials attribute type
+ 
+     The credentials type record pointed to by \a type defines a new
+     credential attribute type.  The \a id member of \a type may be set
+     to KCDB_TYPE_INVALID to indicate that an attribute ID is to be
+     generated automatically.
+ 
+     \param[in] type The type descriptor
+     \param[out] new_id Receives the identifier for the credential attribute type.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_type_register(kcdb_type * type, 
+                    khm_int32 * new_id);
+ 
+ /*! \brief Unregister a credential attribute type
+ 
+     Removes the registration for the specified credentials attribute
+     type.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_type_unregister(khm_int32 id);
+ 
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_type_get_next_free(khm_int32 * id);
+ 
+ /*! \name Conversion functions
+ @{*/
+ /*! \brief Convert a time_t value to FILETIME
+ */
+ KHMEXP void KHMAPI 
+ TimetToFileTime( time_t t, LPFILETIME pft );
+ 
+ /*! \brief Convert a time_t interval to a FILETIME interval
+ */
+ KHMEXP void KHMAPI 
+ TimetToFileTimeInterval(time_t t, LPFILETIME pft);
+ 
+ /*! \brief Convert a FILETIME interval to seconds
+ */
+ KHMEXP long KHMAPI 
+ FtIntervalToSeconds(LPFILETIME pft);
+ 
+ /*! \brief Convert a FILETIME interval to milliseconds
+ */
+ KHMEXP long KHMAPI 
+ FtIntervalToMilliseconds(LPFILETIME pft);
+ 
+ /*! \brief Compare two FILETIME values
+ 
+     The return value is similar to the return value of strcmp(), based
+     on the comparison of the two FILETIME values.
+  */
+ KHMEXP long KHMAPI 
+ FtCompare(LPFILETIME pft1, LPFILETIME pft2);
+ 
+ /*! \brief Convert a FILETIME to a 64 bit int
+ */
+ KHMEXP khm_int64 KHMAPI FtToInt(LPFILETIME pft);
+ 
+ /*! \brief Convert a 64 bit int to a FILETIME
+ */
+ KHMEXP FILETIME KHMAPI IntToFt(khm_int64 i);
+ 
+ /*! \brief Calculate the difference between two FILETIMEs
+ 
+     Returns the value of ft1 - ft2
+  */
+ KHMEXP FILETIME KHMAPI FtSub(LPFILETIME ft1, LPFILETIME ft2);
+ 
+ /*! \brief Calculate the sum of two FILETIMEs
+ 
+     Return the value of ft1 + ft2
+  */
+ KHMEXP FILETIME KHMAPI FtAdd(LPFILETIME ft1, LPFILETIME ft2);
+ 
+ /*! \brief Convert a FILETIME inverval to a string
+ */
+ KHMEXP khm_int32 KHMAPI 
+ FtIntervalToString(LPFILETIME data, 
+                    wchar_t * buffer, 
+                    khm_size * cb_buf);
+ 
+ /*! \brief Parse a string representing an interval into a FILETIME interval
+ 
+     The string is a localized string which should look like the
+     following:
+ 
+     \code
+     [number unit] [number unit]...
+     \endcode
+ 
+     where \a number is an integer while \a unit is a localized
+     (possibly abbreviated) unit specification.  The value of the
+     described interval is calculated as the sum of each \a number in
+     \a units.  For example :
+ 
+     \code
+     1 hour 36 minutes
+     \endcode
+ 
+     would result in an interval specification that's equivalent to 1
+     hour and 36 minutes.  Of course there is no restriction on the
+     order in which the \a number \a unit specifications are given and
+     the same unit may be repeated multiple times.
+ 
+     \retval KHM_ERROR_INVALID_PARAM The given string was invalid or had
+         a token that could not be parsed.  It can also mean that \a
+         pft was NULL or \a str was NULL.
+ 
+     \retval KHM_ERROR_SUCCESS The string was successfully parsed and
+         the result was placed in \a pft.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ IntervalStringToFt(FILETIME * pft, wchar_t * str);
+ 
+ /*! \brief Return number of milliseconds till next representation change
+ 
+    Returns the number of milliseconds that must elapse away from the
+    interval specified in pft \a for the representation of pft to change
+    from whatever it is right now.
+ 
+    Returns 0 if the representation is not expected to change.
+ */
+ KHMEXP long KHMAPI 
+ FtIntervalMsToRepChange(LPFILETIME pft);
+ 
+ /*! \brief Convert a safe ANSI string to a Unicode string
+ 
+     The resulting string is guaranteed to be NULL terminated and
+     within the size limit set by \a cbwstr.
+ 
+     If the whole string cannot be converted, \a wstr is set to an
+     empty string.
+ 
+     \return the number of characters converted.  This is always either
+         the length of the string \a astr or 0.
+ */
+ KHMEXP int KHMAPI 
+ AnsiStrToUnicode( wchar_t * wstr, size_t cbwstr, const char * astr);
+ 
+ /*! \brief Convert a Unicode string to ANSI
+ 
+     The resulting string is guaranteed to be NULL terminated and
+     within the size limit set by \a cbdest.
+ 
+     \return the number of characters converted.  This is always either
+         the length of the string \a src or 0.
+ */
+ KHMEXP int KHMAPI 
+ UnicodeStrToAnsi( char * dest, size_t cbdest, const wchar_t * src);
+ /*@}*/
+ 
+ /*! \name Standard type identifiers and names 
+ @{*/
+ 
+ /*! Maximum identifier number */
+ #define KCDB_TYPE_MAX_ID 255
+ 
+ /*! \brief Invalid type
+ 
+     Used by functions that return a type identifier to indicate that
+     the returned type identifier is invalid.  Also used to indicate
+     that a type identifier is not available */
+ #define KCDB_TYPE_INVALID (-1)
+ 
+ /*! \brief All types
+ 
+     Used by filters to indicate that all types are allowed.
+ */
+ #define KCDB_TYPE_ALL       KCDB_TYPE_INVALID
+ 
+ #define KCDB_TYPE_VOID      0
+ #define KCDB_TYPE_STRING    1
+ #define KCDB_TYPE_DATE      2
+ #define KCDB_TYPE_INTERVAL  3
+ #define KCDB_TYPE_INT32     4
+ #define KCDB_TYPE_INT64     5
+ #define KCDB_TYPE_DATA      6
+ 
+ #define KCDB_TYPENAME_VOID      L"Void"
+ #define KCDB_TYPENAME_STRING    L"String"
+ #define KCDB_TYPENAME_DATE      L"Date"
+ #define KCDB_TYPENAME_INTERVAL  L"Interval"
+ #define KCDB_TYPENAME_INT32     L"Int32"
+ #define KCDB_TYPENAME_INT64     L"Int64"
+ #define KCDB_TYPENAME_DATA      L"Data"
+ /*@}*/
+ /*@}*/
+ 
+ /********************************************************************/
+ 
+ /*! \defgroup kcdb_credattr Credential attributes */
+ /*@{*/
+ 
+ /*! \brief Prototype callback function for computed data types.
+ 
+     If the flags for a particular attribute specifies that the value
+     is computed, then a callback function should be specified.  The
+     callback function will be called with a handle to a credential
+     along with the attribute ID for the requested attribute.  The
+     function should place the computed value in \a buffer.  The size
+     of the buffer in bytes is specifed in \a cbsize.  However, if \a
+     buffer is \a NULL, then the required buffer size should be placed
+     in \a cbsize.
+  */
+ typedef khm_int32 
+ (KHMAPI *kcdb_attrib_compute_cb)(khm_handle cred, 
+                                  khm_int32 id,
+                                  void * buffer,
+                                  khm_size * cbsize);
+ 
+ /*! \brief Credential attribute descriptor
+ 
+     \see kcdb_attrib_register()
+ */
+ typedef struct tag_kcdb_attrib {
+     wchar_t * name;             /*!< Name.  (Not localized,
+                                   required) */
+     khm_int32 id;               /*!< Identifier.  When registering,
+                                   this can be set to
+                                   ::KCDB_ATTR_INVALID if a unique
+                                   identifier is to be generated. */
+     khm_int32 alt_id;           /*!< Alternate identifier.  If the \a
+                                   flags specify
+                                   ::KCDB_ATTR_FLAG_ALTVIEW, then this
+                                   field should specify the identifier
+                                   of the canonical attribute from
+                                   which this attribute is derived. */
+     khm_int32 flags;            /*!< Flags. Combination of \ref
+                                   kcdb_credattr_flags "attribute
+                                   flags" */
+ 
+     khm_int32 type;             /*!< Type of the attribute.  Must be valid. */
+ 
+     wchar_t * short_desc;       /*!< Short description. (Localized,
+                                   optional) */
+ 
+     wchar_t * long_desc;        /*!< Long description. (Localized,
+                                   optional) */
+ 
+     kcdb_attrib_compute_cb compute_cb;
+                                 /*!< Callback.  Required if \a flags
+                                   specify ::KCDB_ATTR_FLAG_COMPUTED. */
+ 
+     khm_size compute_min_cbsize;
+                                 /*!< Minimum number of bytes required
+                                   to store this attribute.  Required
+                                   if ::KCDB_ATTR_FLAG_COMPUTED is
+                                   specified.*/
+     khm_size compute_max_cbsize;
+                                 /*!< Maximum number of bytes required
+                                   to store this attribute.  Required
+                                   if ::KCDB_ATTR_FLAG_COMPUTED is
+                                   specified.*/
+ } kcdb_attrib;
+ 
+ /*! \brief Retrieve the ID of a named attribute */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_attrib_get_id(wchar_t *name, 
+                    khm_int32 * id);
+ 
+ /*! \brief Register an attribute
+ 
+     \param[out] new_id Receives the ID of the newly registered
+         attribute.  If the \a id member of the ::kcdb_attrib object is
+         set to KCDB_ATTR_INVALID, then a unique ID is generated. */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_attrib_register(kcdb_attrib * attrib, 
+                      khm_int32 * new_id);
+ 
+ /*! \brief Retrieve the attribute descriptor for an attribute 
+ 
+     The descriptor that is returned must be released through a call to
+     kcdb_attrib_release_info()
+ 
+     If only the validity of the attribute identifier needs to be
+     checked, you can pass in NULL for \a attrib.  In this case, if the
+     identifier is valid, then the funciton will return
+     KHM_ERROR_SUCCESS, otherwise it will return KHM_ERROR_NOT_FOUND.
+     
+     \see kcdb_attrib_release_info()
+     */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_attrib_get_info(khm_int32 id, 
+                      kcdb_attrib ** attrib);
+ 
+ /*! \brief Release an attribute descriptor
+ 
+     \see kcdb_attrib_get_info()
+     */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_attrib_release_info(kcdb_attrib * attrib);
+ 
+ /*! \brief Unregister an attribute 
+ 
+     Once an attribute ID has been unregistered, it may be reclaimed by
+     a subsequent call to kcdb_attrib_register().
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_attrib_unregister(khm_int32 id);
+ 
+ /*! \brief Retrieve the description of an attribute 
+ 
+     \param[in] flags Specify \a KCDB_TS_SHORT to retrieve the short description. */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_attrib_describe(khm_int32 id, 
+                      wchar_t * buffer, 
+                      khm_size * cbsize, 
+                      khm_int32 flags);
+ 
+ /*! \brief Count attributes
+ 
+     Counts the number of attributes that match the given criteria.
+     The criteria is specified against the flags of the attribute.  An
+     attribute is a match if its flags satisfy the condition below:
+ 
+     \code
+     (attrib.flags & and_flags) == (eq_flags & and_flags)
+     \endcode
+ 
+     The number of attributes that match are returned in \a pcount.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_attrib_get_count(khm_int32 and_flags,
+                       khm_int32 eq_flags,
+                       khm_size * pcount);
+ 
+ /*! \brief List attribute identifiers
+ 
+     Lists the identifiers of the attributes that match the given
+     criteria.  The criteria is specified against the flags of the
+     attribute.  An attribute is a match if the following condition is
+     satisfied:
+ 
+     \code
+     (attrib.flags & and_flags) == (eq_flags & and_flags)
+     \endcode
+ 
+     The list of attributes found are copied to the \a khm_int32 array
+     specified in \a plist.  The number of elements available in the
+     buffer \a plist is specified in \a pcsize.  On exit, \a pcsize
+     will hold the actual number of attribute identifiers copied to the
+     array.
+ 
+     \param[in] and_flags See above
+     \param[in] eq_flags See above
+     \param[in] plist A khm_int32 array
+     \param[in,out] pcsize On entry, holds the number of elements
+         available in the array pointed to by \a plist.  On exit, holds
+         the number of elements copied to the array.
+ 
+     \retval KHM_ERROR_SUCCESS The list of attribute identifiers have
+         been copied.
+     \retval KHM_ERROR_TOO_LONG The list was too long to fit in the
+         supplied buffer.  As many elements as possible have been
+         copied to the \a plist array and the required number of
+         elements has been written to \a pcsize.
+ 
+     \note The \a pcsize parameter specifies the number of khm_int32
+         elements in the array and not the number of bytes in the
+         array.  This is different from the usual size parameters used
+         in the NetIDMgr API.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_attrib_get_ids(khm_int32 and_flags,
+                     khm_int32 eq_flags,
+                     khm_int32 * plist,
+                     khm_size * pcsize);
+ 
+ /*! \defgroup kcdb_credattr_flags Attribute flags */
+ /*@{*/
+ /*! \brief The attribute is required */
+ #define KCDB_ATTR_FLAG_REQUIRED 0x00000008
+ 
+ /*! \brief The attribute is computed.
+ 
+     If this flag is set, the \a compute_cb, \a compute_min_cbsize and
+     \a compute_max_cbsize members of the ::kcdb_attrib attribute
+     descriptor must be assigned valid values.
+ */
+ #define KCDB_ATTR_FLAG_COMPUTED 0x00000010
+ 
+ /*! \brief System attribute.
+ 
+     This cannot be specified for a custom attribute.  Implies that the
+     value of the attribute is given by the credentials database
+     itself.
+ */
+ #define KCDB_ATTR_FLAG_SYSTEM   0x00000020
+ 
+ /*! \brief Hidden
+ 
+     The attribute is not meant to be displayed to the user.  Setting
+     this flag prevents this attribute from being listed in the list of
+     available data fields in the UI.
+ */
+ #define KCDB_ATTR_FLAG_HIDDEN   0x00000040
+ 
+ /*! \brief Property
+ 
+     The attribute is a property.  The main difference between regular
+     attributes and properties are that properties are not allocated
+     off the credentials record.  Hence, a property can not be used as
+     a credentials field.  Other objects such as identities can hold
+     property sets.  A property set can hold both regular attributes as
+     well as properties.
+ */
+ #define KCDB_ATTR_FLAG_PROPERTY 0x00000080
+ 
+ /*! \brief Volatile
+ 
+     A volatile property is one whose value changes often, such as
+     ::KCDB_ATTR_TIMELEFT.  Some controls will make use of additional
+     logic to deal with such values, or not display them at all.
+  */
+ #define KCDB_ATTR_FLAG_VOLATILE 0x00000100
+ 
+ /*! \brief Alternate view
+ 
+     The attribute is actually an alternate representation of another
+     attribute.  The Canonical attribute name is specified in \a
+     alt_id.
+ 
+     Sometimes a certain attribute may need to be represented in
+     different ways.  You can register multiple attributes for each
+     view.  However, you should also provide a canonical attribute for
+     whenever the canonical set of attributes of the credential is
+     required.
+  */
+ #define KCDB_ATTR_FLAG_ALTVIEW  0x00000200
+ 
+ /*! \brief Transient attribute
+ 
+     A transient attribute is one whose absence is meaningful.  When
+     updating one record using another, if a transient attribute is
+     absent in the source but present in the destination, then the
+     attribute is removed from the destination.
+ */
+ #define KCDB_ATTR_FLAG_TRANSIENT 0x00000400
+ 
+ /*@}*/
+ 
+ /*! \defgroup kcdb_credattr_idnames Standard attribute IDs and names */
+ /*@{*/
+ 
+ /*! \name Attribute related constants */
+ /*@{*/
+ /*! \brief Maximum valid attribute ID */
+ #define KCDB_ATTR_MAX_ID        255
+ 
+ /*! \brief Minimum valid property ID */
+ #define KCDB_ATTR_MIN_PROP_ID   4096
+ 
+ /*! \brief Maximum number of properties */
+ #define KCDB_ATTR_MAX_PROPS     128
+ 
+ /*! \brief Maximum valid property ID */
+ #define KCDB_ATTR_MAX_PROP_ID (KCDB_ATTR_MIN_PROP_ID + KCDB_ATTR_MAX_PROPS - 1)
+ 
+ /*! \brief Invalid ID */
+ #define KCDB_ATTR_INVALID   (-1)
+ 
+ /*! \brief First custom attribute ID */
+ #define KCDB_ATTRID_USER        20
+ 
+ /*@}*/
+ 
+ /*!\name Attribute identifiers  */
+ /*@{*/
+ /*! \brief Name of the credential
+ 
+     - \b Type: STRING
+     - \b Flags: REQUIRED, COMPUTED, SYSTEM
+  */
+ #define KCDB_ATTR_NAME          0
+ 
+ /*! \brief The identity handle for the credential
+ 
+     - \b Type: INT64
+     - \b Flags: REQUIRED, COMPUTED, SYSTEM, HIDDEN
+ 
+     \note The handle returned in by specifying this attribute to
+         kcdb_cred_get_attr() or kcdb_cred_get_attrib() is not held.
+         While the identity is implicitly held for the duration that
+         the credential is held, it is not recommended to obtain a
+         handle to the identity using this method.  Use
+         kcdb_cred_get_identity() instead.
+ */
+ #define KCDB_ATTR_ID            1
+ 
+ /*! \brief The name of the identity 
+ 
+     - \b Type: STRING
+     - \b Flags: REQUIRED, COMPUTED, SYSTEM
+  */
+ #define KCDB_ATTR_ID_NAME       2
+ 
+ /*! \brief The type of the credential
+ 
+     - \b Type: INT32
+     - \b Flags: REQUIRED, COMPUTED, SYSTEM, HIDDEN
+ */
+ #define KCDB_ATTR_TYPE          3
+ 
+ /*! \brief Type name for the credential 
+ 
+     - \b Type: STRING
+     - \b Flags: REQUIRED, COMPUTED, SYSTEM
+ */
+ #define KCDB_ATTR_TYPE_NAME     4
+ 
+ /*! \brief Name of the parent credential 
+ 
+     - \b Type: STRING
+     - \b Flags: SYSTEM
+ */
+ #define KCDB_ATTR_PARENT_NAME   5
+ 
+ /*! \brief Issed on 
+ 
+     - \b Type: DATE
+     - \b Flags: SYSTEM
+ */
+ #define KCDB_ATTR_ISSUE         6
+ 
+ /*! \brief Expires on 
+ 
+     - \b Type: DATE
+     - \b Flags: SYSTEM
+ */
+ #define KCDB_ATTR_EXPIRE        7
+ 
+ /*! \brief Renewable period expires on 
+ 
+     - \b Type: DATE
+     - \b Flags: SYSTEM
+ */
+ #define KCDB_ATTR_RENEW_EXPIRE  8
+ 
+ /*! \brief Time left till expiration 
+ 
+     - \b Type: INTERVAL
+     - \b Flags: SYSTEM, COMPUTED, VOLATILE
+ */
+ #define KCDB_ATTR_TIMELEFT      9
+ 
+ #define KCDB_ATTR_RENEW_TIMELEFT 10
+ 
+ /*! \brief Location of the credential
+ 
+     - \b Type: STRING
+     - \b Flags: SYSTEM
+ */
+ #define KCDB_ATTR_LOCATION      11
+ 
+ /*! \brief Lifetime of the credential 
+ 
+     - \b Type: INTERVAL
+     - \b Flags: SYSTEM
+ */
+ #define KCDB_ATTR_LIFETIME      12
+ 
+ #define KCDB_ATTR_RENEW_LIFETIME 13
+ 
+ /*! \brief Flags for the credential
+ 
+     - \b Type: INT32
+     - \b Flags: REQUIRED, COMPUTED, SYSTEM, HIDDEN
+  */
+ #define KCDB_ATTR_FLAGS         14
+ 
+ /*@}*/
+ 
+ /*!\name Attribute names */
+ /*@{ */
+ 
+ #define KCDB_ATTRNAME_NAME          L"Name"
+ #define KCDB_ATTRNAME_ID            L"Identity"
+ #define KCDB_ATTRNAME_ID_NAME       L"IdentityName"
+ #define KCDB_ATTRNAME_TYPE          L"TypeId"
+ #define KCDB_ATTRNAME_TYPE_NAME     L"TypeName"
+ #define KCDB_ATTRNAME_FLAGS         L"Flags"
+ 
+ #define KCDB_ATTRNAME_PARENT_NAME   L"Parent"
+ #define KCDB_ATTRNAME_ISSUE         L"Issued"
+ #define KCDB_ATTRNAME_EXPIRE        L"Expires"
+ #define KCDB_ATTRNAME_RENEW_EXPIRE  L"RenewExpires"
+ #define KCDB_ATTRNAME_TIMELEFT      L"TimeLeft"
+ #define KCDB_ATTRNAME_RENEW_TIMELEFT L"RenewTimeLeft"
+ #define KCDB_ATTRNAME_LOCATION      L"Location"
+ #define KCDB_ATTRNAME_LIFETIME      L"Lifetime"
+ #define KCDB_ATTRNAME_RENEW_LIFETIME L"RenewLifetime"
+ 
+ /*@}*/
+ 
+ /*@}*/
+ 
+ /*@}*/
+ 
+ /*****************************************************************************/
+ 
+ /*! \defgroup kcdb_credtype Credential types */
+ /*@{*/
+ 
+ /*! \brief Credential type descriptor */
+ typedef struct tag_kcdb_credtype {
+     wchar_t * name;     /*!< name (less than KCDB_MAXCB_NAME bytes) */
+     khm_int32 id;
+     wchar_t * short_desc;       /*!< short localized description (less
+                                   than KCDB_MAXCB_SHORT_DESC bytes) */
+     wchar_t * long_desc;        /*!< long localized descriptionn (less
+                                   than KCDB_MAXCB_LONG_DESC bytes) */
+     khm_handle sub;             /*!< Subscription for credentials type
+                                   hander.  This should be a valid
+                                   subscription constructed through a
+                                   call to kmq_create_subscription()
+                                   and must handle KMSG_CRED messages
+                                   that are marked as being sent to
+                                   type specific subscriptions.
+ 
+                                   The subscription will be
+                                   automatically deleted with a call to
+                                   kmq_delete_subscription() when the
+                                   credentials type is unregistered.*/
+ 
+     kcdb_cred_comp_func is_equal; /*!< Used to as an additional clause
+                                   when comparing two credentials for
+                                   equality.  The function this is
+                                   actually a comparison function, it
+                                   should return zero if the two
+                                   credentials are equal and non-zero
+                                   if they are not.  The addtional \a
+                                   rock parameter is always zero.
+ 
+                                   It can be assumed that the identity,
+                                   name and credentials have already
+                                   been found to be equal among the
+                                   credentials and the credential type
+                                   is the type that is being
+                                   registered.*/
+ 
+ #ifdef _WIN32
+     HICON icon;
+ #endif
+ } kcdb_credtype;
+ 
+ /*! \brief Maximum value of a credential type identifier
+ 
+     Credential type identifiers are assigned serially unless the
+     process registering the credential type sets a specific identity.
+     The maximum identifier number places a hard limit to the number of
+     credential types that can be registered at one time, which is
+     KCDB_CREDTYPE_MAX_ID + 1.
+  */
+ #define KCDB_CREDTYPE_MAX_ID 31
+ 
+ /*! \brief Specify all credential types
+ 
+     This value is used by functions which filter credentials based on
+     credential types.  Specifying this value tells the filter to
+     accept all credential types.
+  */
+ #define KCDB_CREDTYPE_ALL (-1)
+ 
+ /*! \brief Automatically determine a credential type identifier
+ 
+     Used with kcdb_credtype_register() to specify that the credential
+     type identifier should be automatically determined to avoid
+     collisions.
+  */
+ #define KCDB_CREDTYPE_AUTO (-2)
+ 
+ /*! \brief An invalid credential type
+ 
+     Even though any non positive credential type ID is invalid
+     anywhere where a specific credential type ID is required, this
+     value is provided for explicit indication that the credential type
+     is invalid.  Also it makes code more readable to have a constant
+     that shouts out INVALID.
+ 
+ */
+ #define KCDB_CREDTYPE_INVALID (-3)
+ 
+ /*! \brief Macro predicate for testing whether a credtype is valid
+ 
+     Returns TRUE if the given credtype is valid.  This is a safe
+     macro.
+ */
+ #define KCDB_CREDTYPE_IS_VALID(t) ((t) >= 0)
+ 
+ /*! \brief Register a credentials type.
+ 
+     The information given in the \a type parameter is used to register
+     a new credential type.  Note that the \a name member of the \a
+     type should be unique among all credential types.
+ 
+     You can specify ::KCDB_CREDTYPE_AUTO as the \a id member of \a
+     type to let kcdb_credtype_register() determine a suitable
+     credential type identifier.  You can subsequently call
+     kcdb_credtype_get_id() to retrieve the generated id or pass a
+     valid pointer to a khm_int32 type variable as \a new_id.
+ 
+     \param[in] type Credential type descriptor
+ 
+     \param[out] new_id The credential type identifier that this type
+         was registered as.
+ 
+     \retval KHM_ERROR_SUCCESS The credential type was successfully registered.
+ 
+     \retval KHM_ERROR_INVALID_PARAM One or more of the parameters were invalid
+ 
+     \retval KHM_ERROR_TOO_LONG One or more of the string fields in \a
+         type exceeded the character limit for that field.
+ 
+     \retval KHM_ERROR_NO_RESOURCES When autogenerating credential type
+         identifiers, this value indicates that the maximum number of
+         credential types have been registered.  No more registrations
+         can be accepted unless some credentials type is unregisred.
+ 
+     \retval KHM_ERROR_DUPLICATE The \a name or \a id that was
+         specified is already in use.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credtype_register(kcdb_credtype * type, 
+                        khm_int32 * new_id);
+ 
+ /*! \brief Return a held reference to a \a kcdb_credtype object describing the credential type.
+ 
+     The reference points to a static internal object of type \a
+     kcdb_credtype.  Use the kcdb_credtype_release_info() function to
+     release the reference.
+ 
+     Also, the structure passed in as the \a type argument to
+     kcdb_credtype_register() is not valid as a credential type
+     descriptor.  Use kcdb_credtype_get_info() to obtain the actual
+     credential type descriptor.
+ 
+     \param[in] id Credentials type identifier.
+ 
+     \param[out] type Receives the credentials descriptor handle.  If
+         \a type is NULL, then no handle is returned.  However, the
+         function will still return \a KHM_ERROR_SUCCESS if the \a id
+         parameter passed in is a valid credentials type identifier.
+ 
+     \see kcdb_credtype_release_info()
+     \see kcdb_credtype_register()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credtype_get_info(khm_int32 id, 
+                        kcdb_credtype ** type);
+ 
+ /*! \brief Release a reference to a \a kcdb_credtype object
+ 
+     Undoes the hold obtained on a \a kcdb_credtype object from a
+     previous call to kcdb_credtype_get_info().
+ 
+     \see kcdb_credtype_get_info()
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credtype_release_info(kcdb_credtype * type);
+ 
+ /*! \brief Unregister a credentials type
+ 
+     Undoes the registration performed by kcdb_credtype_register().
+ 
+     This should only be done when the credentials provider is being
+     unloaded.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credtype_unregister(khm_int32 id);
+ 
+ /*! \brief Retrieve the name of a credentials type
+ 
+     Given a credentials type identifier, retrieves the name.  The name
+     is not localized and serves as a persistent identifier of the
+     credentials type.
+ 
+     \param[out] buf The buffer to receive the name.  Could be \a NULL
+         if only the length of the buffer is required.
+ 
+     \param[in,out] cbbuf On entry, specifies the size of the buffer
+         pointed to by \a buf if \a buf is not NULL.  On exit, contains
+         the number of bytes copied to \a buf or the required size of
+         the buffer.
+ 
+     \retval KHM_ERROR_SUCCESS The call succeeded.
+ 
+     \retval KHM_ERROR_TOO_LONG Either \a buf was NULL or the supplied
+         buffer was not large enough.  The required size is in \a cbbuf.
+ 
+     \retval KHM_ERROR_INVALID_PARAM Invalid parameter.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credtype_get_name(khm_int32 id,
+                        wchar_t * buf,
+                        khm_size * cbbuf);
+ 
+ /*! \brief Retrieve the type specific subscription for a type
+ 
+     Given a credentials type, this function returns the credentials
+     type specific subcription.  It may return NULL if the subscription
+     is not available.
+  */
+ KHMEXP khm_handle KHMAPI 
+ kcdb_credtype_get_sub(khm_int32 id);
+ 
+ /*! \brief Get the description of a credentials type
+ 
+    Unlike the name of a credential type, the description is localized.
+ 
+    \param[in] id Credentials type identifier
+ 
+    \param[out] buf Receives the description.  Can bet set to NULL if
+        only the size of the buffer is required.
+ 
+    \param[in,out] cbbuf On entry, specifies the size of the buffer
+        pointed to by \a buf.  On exit, specifies the required size of
+        the buffer or the number of bytes copied, depending on whether
+        the call succeeded or not.
+ 
+    \param[in] flags Specify ::KCDB_TS_SHORT if the short version of
+        the description is desired if there is more than one.
+ 
+    \retval KHM_ERROR_SUCCESS The call succeeded
+    \retval KHM_ERROR_TOO_LONG Either \a buf was NULL or the supplied buffer was insufficient.  The required size is specified in \a cbbuf.
+    \retval KHM_ERROR_INVALID_PARAM One or more parameters were invalid.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credtype_describe(khm_int32 id,
+                        wchar_t * buf,
+                        khm_size * cbbuf,
+                        khm_int32 flags);
+ 
+ /*! \brief Look up the identifier of a credentials type by name
+ 
+     Given a name, looks up the identifier.
+ 
+     \param[in] name Name of the credentials type
+     \param[out] id Receives the identifier if the call succeeds
+ 
+  */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_credtype_get_id(wchar_t * name, 
+                      khm_int32 * id);
+ 
+ /*@}*/
+ 
+ /*********************************************************************/
+ 
+ /*! \defgroup kcdb_buf Generic access to buffer 
+ 
+     Currently, credentials and identities both hold record data types.
+     This set of API's allow an application to access fields in the
+     records using a single interface.  Note that credentials only
+     accept regular attributes while identities can hold both
+     attributes and properties.
+ 
+     Handles to credentials and identities are implicitly also handles
+     to records.  Thus they can be directly used as such.
+ */
+ /*@{*/
+ 
+ /*! \brief Get an attribute from a record by attribute id.
+ 
+     \param[in] buffer The buffer that is to receive the attribute
+         value.  Set this to NULL if only the required buffer size is
+         to be returned.
+ 
+     \param[in,out] cbbuf The number of bytes available in \a buffer.
+         If \a buffer is not sufficient, returns KHM_ERROR_TOO_LONG and
+         sets this to the required buffer size.
+ 
+     \param[out] attr_type Receives the data type of the attribute.
+         Set this to NULL if the type is not required.
+ 
+     \note Set both \a buffer and \a cbbuf to NULL if only the
+         existence of the attribute is to be checked.  If the attribute
+         exists in this record then the function will return
+         KHM_ERROR_SUCCESS, otherwise it returns KHM_ERROR_NOT_FOUND.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_buf_get_attr(khm_handle  record, 
+                   khm_int32   attr_id, 
+                   khm_int32 * attr_type, 
+                   void *      buffer, 
+                   khm_size *  pcb_buf);
+ 
+ /*! \brief Get an attribute from a record by name.
+ 
+     \param[in] buffer The buffer that is to receive the attribute
+         value.  Set this to NULL if only the required buffer size is
+         to be returned.
+ 
+     \param[in,out] cbbuf The number of bytes available in \a buffer.
+         If \a buffer is not sufficient, returns KHM_ERROR_TOO_LONG and
+         sets this to the required buffer size.
+ 
+     \note Set both \a buffer and \a cbbuf to NULL if only the
+         existence of the attribute is to be checked.  If the attribute
+         exists in this record then the function will return
+         KHM_ERROR_SUCCESS, otherwise it returns KHM_ERROR_NOT_FOUND.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_buf_get_attrib(khm_handle  record,
+                     wchar_t *   attr_name,
+                     khm_int32 * attr_type,
+                     void *      buffer,
+                     khm_size *  pcb_buf);
+ 
+ /*! \brief Get the string representation of a record attribute.
+ 
+     A shortcut function which generates the string representation of a
+     record attribute directly.
+ 
+     \param[in] record A handle to a record
+ 
+     \param[in] attr_id The attribute to retrieve
+ 
+     \param[out] buffer A pointer to a string buffer which receives the
+         string form of the attribute.  Set this to NULL if you only
+         want to determine the size of the required buffer.
+ 
+     \param[in,out] pcbbuf A pointer to a #khm_int32 that, on entry,
+         holds the size of the buffer pointed to by \a buffer, and on
+         exit, receives the actual number of bytes that were copied.
+ 
+     \param[in] flags Flags for the string conversion. Can be set to
+         one of KCDB_TS_LONG or KCDB_TS_SHORT.  The default is
+         KCDB_TS_LONG.
+ 
+     \retval KHM_ERROR_SUCCESS Success
+     \retval KHM_ERROR_NOT_FOUND The given attribute was either invalid
+         or was not defined for this record
+     \retval KHM_ERROR_INVALID_PARAM One or more parameters were invalid
+     \retval KHM_ERROR_TOO_LONG Either \a buffer was NULL or the
+         supplied buffer was insufficient
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_buf_get_attr_string(khm_handle  record,
+                          khm_int32   attr_id,
+                          wchar_t *   buffer,
+                          khm_size *  pcbbuf,
+                          khm_int32  flags);
+ 
+ /*! \brief Get the string representation of a record attribute by name.
+ 
+     A shortcut function which generates the string representation of a
+     record attribute directly.
+ 
+     \param[in] record A handle to a record
+ 
+     \param[in] attrib The name of the attribute to retrieve
+ 
+     \param[out] buffer A pointer to a string buffer which receives the
+         string form of the attribute.  Set this to NULL if you only
+         want to determine the size of the required buffer.
+ 
+     \param[in,out] pcbbuf A pointer to a #khm_int32 that, on entry,
+         holds the size of the buffer pointed to by \a buffer, and on
+         exit, receives the actual number of bytes that were copied.
+ 
+     \param[in] flags Flags for the string conversion. Can be set to
+         one of KCDB_TS_LONG or KCDB_TS_SHORT.  The default is
+         KCDB_TS_LONG.
+ 
+     \see kcdb_cred_get_attr_string()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_buf_get_attrib_string(khm_handle  record,
+                            wchar_t *   attr_name,
+                            wchar_t *   buffer,
+                            khm_size *  pcbbuf,
+                            khm_int32   flags);
+ 
+ /*! \brief Set an attribute in a record by attribute id
+ 
+     \param[in] cbbuf Number of bytes of data in \a buffer.  The
+         individual data type handlers may copy in less than this many
+         bytes in to the record.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_buf_set_attr(khm_handle  record,
+                   khm_int32   attr_id,
+                   void *      buffer,
+                   khm_size    cbbuf);
+ 
+ /*! \brief Set an attribute in a record by name
+ 
+     \param[in] cbbuf Number of bytes of data in \a buffer.  The
+         individual data type handlers may copy in less than this many
+         bytes in to the record.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_buf_set_attrib(khm_handle  record,
+                     wchar_t *   attr_name,
+                     void *      buffer,
+                     khm_size    cbbuf);
+ 
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_buf_hold(khm_handle  record);
+ 
+ KHMEXP khm_int32 KHMAPI 
+ kcdb_buf_release(khm_handle record);
+ 
+ /*@}*/
+ 
+ /********************************************************************/
+ 
+ /* Notification operation constants */
+ 
+ #define KCDB_OP_INSERT      1
+ #define KCDB_OP_DELETE      2
+ #define KCDB_OP_MODIFY      3
+ #define KCDB_OP_ACTIVATE    4
+ #define KCDB_OP_DEACTIVATE  5
+ #define KCDB_OP_HIDE        6
+ #define KCDB_OP_UNHIDE      7
+ #define KCDB_OP_SETSEARCH   8
+ #define KCDB_OP_UNSETSEARCH 9
+ #define KCDB_OP_NEW_DEFAULT 10
+ 
+ /*@}*/
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/khaction.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/khaction.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:24 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/khaction.h	Thu Oct 12 17:42:40 2006
***************
*** 0 ****
--- 1,1008 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: khaction.h,v 1.1.2.2 2006/10/12 21:42:40 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_ACTION_H
+ #define __KHIMAIRA_ACTION_H
+ 
+ /*! \addtogroup khui
+   @{*/
+ /*! \defgroup khui_actions Actions
+   @{*/
+ 
+ /*! \brief An action */
+ typedef struct tag_khui_action {
+     khm_int32 cmd;            /*!< action identifier */
+     khm_int32 type;           /*!< combination of KHUI_ACTIONTYPE_* */
+     wchar_t * name;           /*!< name for named actions.  NULL if
+                                 not named. */
+ 
+     /* The following fields are only for use by NetIDMgr */
+     khm_int16 ib_normal;      /*!< (internal) normal bitmap (index) (toolbar sized icon) */
+     khm_int16 ib_hot;         /*!< (internal) hot bitmap (index) (toolbar sized icon) */
+     khm_int16 ib_disabled;    /*!< (internal) disabled bitmap (index) (toolbar sized icon) */
+ 
+     khm_int16 ib_icon;        /*!< (internal) index of small (16x16) icon (for menu) (small icon) */
+     khm_int16 ib_icon_dis;    /*!< (internal) index of disabled (greyed) icon (small icon) */
+ 
+     khm_int16 is_caption;     /*!< (internal) index of string resource for caption */
+     khm_int16 is_tooltip;     /*!< (internal) same for description / tooltip */
+     khm_int16 ih_topic;       /*!< (internal) help topic */
+ 
+     /* The following fields are specified for custom actions */
+     wchar_t * caption;        /*!< Caption (localized) (limited by
+                                   KHUI_MAXCCH_SHORT_DESC).  The
+                                   caption is used for representing the
+                                   action in menus and toolbars. */
+     wchar_t * tooltip;        /*!< Tooltip (localized) (limited by
+                                   KHUI_MAXCCH_SHORT_DESC).  If this is
+                                   specified, whenever the user hovers
+                                   over the menu item or toolbar button
+                                   representing the action, the tooltip
+                                   will be displayed either on a
+                                   tooltip window or in the status
+                                   bar. */
+     khm_handle listener;      /*!< Listener of this action.  Should be
+                                   a handle to a message
+                                   subscription. When the action is
+                                   invoked, a message of type
+                                   ::KMSG_ACT and subtype
+                                   ::KMSG_ACT_ACTIVATE will be posted
+                                   to this subscriber. The \a uparam
+                                   parameter of the message will have
+                                   the identifier of the action. */
+     void *    data;           /*!< User data for custom action.  This
+                                   field is not used by the UI library.
+                                   It is reserved for plugins to store
+                                   data that is specific for this
+                                   action.  The data that's passed in
+                                   in the \a userdata parameter to
+                                   khui_action_create() will be stored
+                                   here and can be retrieved by calling
+                                   khui_action_get_data(). */
+     void *    reserved1;      /*!< Reserved. */
+     void *    reserved2;      /*!< Reserved. */
+     void *    reserved3;      /*!< Reserved. */
+ 
+     /* For all actions */
+     int state;                /*!< current state. combination of
+                                   KHUI_ACTIONSTATE_* */
+ } khui_action;
+ 
+ /*! \brief Unknown action type
+ 
+     Unknown action type.
+  */
+ #define KHUI_ACTIONTYPE_NONE    0
+ 
+ /*! \brief A trigger type action
+ 
+     A trigger action usually triggers some event, which is what pretty
+     much every action does.
+ */
+ #define KHUI_ACTIONTYPE_TRIGGER 1
+ 
+ /*! \brief A toggle type action
+ 
+     A toggle type action typically changes the CHECKED state of the
+     action each time it is invoked.
+  */
+ #define KHUI_ACTIONTYPE_TOGGLE  2
+ 
+ /*! \brief The action is enabled
+ 
+     This is the default if no other state is specified.  Just means
+     not-disabled.
+ */
+ #define KHUI_ACTIONSTATE_ENABLED    0
+ 
+ /*! \brief The action is diabled */
+ #define KHUI_ACTIONSTATE_DISABLED   1
+ 
+ /*! \brief For toggle type actions, the action is checked */
+ #define KHUI_ACTIONSTATE_CHECKED    2
+ 
+ /*! \brief The action is hot
+ 
+     Typically this means that the user is hovering the pointing device
+     over a UI element representing the action.
+  */
+ #define KHUI_ACTIONSTATE_HOT        4
+ 
+ /*! \brief The action has been marked for deletion
+ 
+     For custom actions, this means that the custom action was deleted.
+     The contents of the custom action fields are no longer valid.
+  */
+ #define KHUI_ACTIONSTATE_DELETED    8
+ 
+ #ifdef NOEXPORT
+ #define ACTION_SIMPLE(c,cap,des,top) \
+     {c,KHUI_ACTIONTYPE_TRIGGER,NULL,0,0,0,0,0,cap,des,top,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0}
+ 
+ #define ACTION_FULL(cmd,type,name,inormal,ihot,idis,isml,ismld,capt,toolt,topic,state) \
+     {cmd,type,name,inormal,ihot,idis,isml,ismld,capt,toolt,topic,NULL,NULL,NULL,NULL,NULL,NULL,NULL,state}
+ 
+ #define ACTION_SIMPLE_IMAGE(c,inormal, ihot, idis, isml, ismld,cap, des, top) \
+     {c,KHUI_ACTIONTYPE_TRIGGER,NULL,inormal,ihot,idis,isml,ismld,cap,des,top,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0}
+ #endif
+ 
+ /*! \brief A reference to an action
+ 
+     If the \a flags member has the KHUI_ACTIONREF_PACTION bit set,
+     then the action is referenced by the \a p_action member of the
+     union.  Otherwise the identifier for the action is specified by \a
+     action member.
+ */
+ typedef struct tag_khui_action_ref {
+     int flags;                  /*!< A combination of KHUI_ACTIONREF_* */
+     union {
+         khm_int32     action;   /*!< The action identifier for the
+                                   action that is being referrred to.
+                                   Only valid if
+                                   ::KHUI_ACTIONREF_PACTION is not set
+                                   in \a flags. */
+         khui_action * p_action; /*!< A pointer to the ::khui_action
+                                   structure that describes the action
+                                   that is being referred to.  Only
+                                   valid if ::KHUI_ACTIONREF_PACTION is
+                                   set. */
+     };
+ } khui_action_ref;
+ 
+ /*! \brief A submenu
+ 
+     There should exist a menu associated with the action that is being
+     referred.  When displaying this action in a menu, the contents of
+     the associated menu will appear as a submenu.
+  */
+ #define KHUI_ACTIONREF_SUBMENU      0x01
+ 
+ /*! \brief Separator
+ 
+     This is not an actual action, but represents a separator between
+     actions.  When displaying this action in a menu or a toolbar, a
+     separating line will be drawn in place of this action.  The \a
+     action and \a p_action members of the structures are unused if
+     this flag is set.
+  */
+ #define KHUI_ACTIONREF_SEP          0x02
+ 
+ /*! \brief Action by reference
+ 
+     The \a p_action member of the structure points to the
+     ::khui_action structure that describes the action.
+  */
+ #define KHUI_ACTIONREF_PACTION      0x04
+ 
+ #ifdef NOEXPORT
+ /*! \brief Action should be freed
+ 
+     \note This flag is reserved for internal use in the NetIDMgr
+     application.  Do not use.
+  */
+ #define KHUI_ACTIONREF_FREE_PACTION 0x08
+ 
+ /*! \brief Marks the end of an action sequence
+ 
+     \note THis flag is reserved for internal use in the NetIDMgr
+     application. Do not use.
+  */
+ #define KHUI_ACTIONREF_END          0x10
+ #endif
+ 
+ /*! \brief The default action
+ 
+     When this bit is set in an action reference that describes a menu,
+     the menu item will be the default item and will be rendered
+     differently from other menu items.  Only useful when defining
+     context menus.  In general, it is good practice to place the
+     default item at the top of a menu, although the UI library does
+     not enforce this.  This is purely meant as a rendering hint.
+  */
+ #define KHUI_ACTIONREF_DEFAULT      0x20
+ 
+ #ifdef NOEXPORT
+ #define MENU_ACTION(c) {0,c}
+ #define MENU_DEFACTION(c) {KHUI_ACTIONREF_DEFAULT, c}
+ #define MENU_SUBMENU(s) {KHUI_ACTIONREF_SUBMENU,s}
+ #define MENU_SEP() {KHUI_ACTIONREF_SEP,KHUI_MENU_SEP}
+ #define MENU_END() {KHUI_ACTIONREF_END,KHUI_MENU_END}
+ #endif
+ 
+ /*! \brief Menu definition
+ 
+     Use the khui_menu_create(), khui_menu_insert_action(),
+     khui_menu_insert_paction(), khui_menu_get_size(),
+     khui_menu_get_action() functions to create and manipulate custom
+     menus.  Do not manipulate this structure directly as doing so may
+     cause inconsistencies in the UI library.
+ */
+ typedef struct tag_khui_menu_def {
+     khm_int32 cmd;          /*!< Action associated with menu */
+     khm_int32 state;        /*!< combination of KHUI_MENUSTATE_* */
+     khm_size  n_items;      /*!< The number of actions in the \a items
+                               list.  If this is a custom menu, the
+                               ::KHUI_MENUSTATE_ALLOCD bit will be set,
+                               and the contents of this field will be
+                               valid.  Otherwise, the contents of this
+                               field is ignored and the list of actions
+                               must be terminated with a
+                               ACTION_LIST_END action. */
+     khm_size  nc_items;     /*!< max number of items in the buffer
+ 			      alocated for items.  Ignored if
+ 			      ::KHUI_MENUSTATE_ALLOCD is not set in \a
+ 			      state. */
+     khui_action_ref *items; /*!< Action list terminated by,
+ 			      ACTION_LIST_END.  If \a n_items is set
+ 			      to a value other than -1, the list
+ 			      doesn't necessarily have to end with a
+ 			      ACTION_LIST_END.  When constructing a
+ 			      menu using khui_menu_* functions, they
+ 			      will set the size of this list in the \a
+ 			      n_items member, and there will be no
+ 			      ACTION_LIST_END action to terminate the
+ 			      list. */
+ } khui_menu_def;
+ 
+ #ifdef NOEXPORT
+ #define CONSTMENU(c,s,i) {c,s,-1,-1,i}
+ #endif
+ 
+ /*! \brief Unspecified menu
+ 
+     Used when there is no single command associated with the entire
+     menu, such as for ad-hoc context menus.
+  */
+ #define KHUI_MENU_NONE -3
+ 
+ /*! \brief Menu end indicator
+ 
+     For static or constant menus this indicates that this action marks
+     the end of the list of actions which defined the menu.  This is
+     invalid if used in a dynamic menu (a menu with the
+     ::KHUI_MENUSTATE_ALLOCD bit set).
+  */
+ #define KHUI_MENU_END -2
+ 
+ /*! \brief Menu separator
+ 
+     A separator for actions.  When displaying a menu or showing a
+     toolbar based on a menu definition, a separator is rendered as a
+     bar separating the user interface elements for the actions on
+     either side of this.
+ */
+ #define KHUI_MENU_SEP -1
+ 
+ /*! \brief Constant menu
+ 
+     The contents of the menu cannot be modified (individual actions in
+     the menu may be modified, but the order and the contents of the
+     menu itself cannot be modified.
+ 
+     This is the default if ::KHUI_MENUSTATE_ALLOCD is not specified.
+  */
+ #define KHUI_MENUSTATE_CONSTANT 0
+ 
+ /*! \brief Variable menu
+ 
+     The menu is dnamically allocated.  The list of actions contained
+     in the menu can be modified.
+ */
+ #define KHUI_MENUSTATE_ALLOCD   1
+ 
+ #ifdef NOEXPORT
+ /* predefined system menu */
+ #define KHUI_MENUSTATE_SYSTEM   2
+ #endif
+ 
+ #ifdef NOEXPORT
+ 
+ /*! \brief Accelerator definition */
+ typedef struct tag_khui_accel_def {
+     int cmd;
+     int mod;
+     int key;
+     int scope;
+ } khui_accel_def;
+ 
+ #define KHUI_ACCEL_SCOPE_GLOBAL 0
+ 
+ extern khui_accel_def khui_accel_global[];
+ extern int khui_n_accel_global;
+ 
+ extern khui_action khui_actions[];
+ extern int khui_n_actions;
+ 
+ extern khui_menu_def khui_all_menus[];
+ extern int khui_n_all_menus;
+ 
+ #endif /* NOEXPORT */
+ 
+ /* functions */
+ 
+ /*! \brief Create a new menu
+ 
+     Creates a new menu.  The returned data structure must be freed by
+     a call to khui_menu_delete().  Custom menus that are created this
+     way are not reference counted or maintained by the UI library.
+     The caller is responsible for calling khui_menu_delete() when the
+     data is no longer needed.
+ 
+     Specifiying an action in the \a action parameter will associate
+     the menu with the specified action.  In this case, if the action
+     is added to another menu with the ::KHUI_ACTIONREF_SUBMENU flag,
+     this menu will appear as a submenu within that menu.  Only one
+     menu can be associated with any given action.  Custom menus can
+     not be associated with standard actions.
+  */
+ KHMEXP khui_menu_def * KHMAPI
+ khui_menu_create(khm_int32 action);
+ 
+ /*! \brief Duplicate a menu
+ 
+     Creates a copy of the specified menu.  The returned data structure
+     must be freed by a call to khui_menu_delete().  Custom menus are
+     not reference counted or maintained by the UI library.  The caller
+     is responsible for calling khui_menu_delete() when the data is no
+     longer needed.
+ 
+     Note that even if the original menu was associated with an action,
+     the duplicate will not be.  Modifying the duplicate will not
+     modify the original menu.  Only one menu can be associated with an
+     action.
+  */
+ KHMEXP khui_menu_def * KHMAPI
+ khui_menu_dup(khui_menu_def * src);
+ 
+ /*! \brief Delete a menu
+ 
+     Deletes a menu created by a call to khui_menu_create() or
+     khui_menu_dup().  This frees up the memory and associated
+     resources used by the menu definition.  The pointer that is passed
+     in will no longer be valid.
+  */
+ KHMEXP void KHMAPI
+ khui_menu_delete(khui_menu_def * d);
+ 
+ /*! \brief Insert an action into a menu
+ 
+     The action specified by \a cmd will be inserted in to the menu \a
+     d at index \a idx.
+ 
+     \param[in] d The menu to insert the action into
+ 
+     \param[in] idx The index at which to insert the action.  The index
+         is zero based.  If \a idx is (-1) or larger than the largest
+         index in the menu, the item is appended to the menu.
+ 
+     \param[in] cmd The command representing the action to insert into
+         the menu.  This should be either a standard action, a user
+         action created with khui_action_create(), or certain pseudo
+         actions.  Not all pseudo actions can be placed on a menu.
+ 
+     \param[in] flags Flags for the action.  This is a combination of
+         KHUI_ACTIONREF_* constants.  Currently, the only constants
+         that are valid for this function are: ::KHUI_ACTIONREF_SEP,
+         ::KHUI_ACTIONREF_SUBMENU, ::KHUI_ACTIONREF_DEFAULT.
+         ::KHUI_ACTIONREF_SEP will be automatically added if the
+         command is ::KHUI_MENU_SEP.
+ 
+     \note The ::khui_menu_def structure is not thread safe.  Multiple
+         threads modifying the same ::khui_menu_def structure may cause
+         thread safety issues.
+  */
+ KHMEXP void KHMAPI
+ khui_menu_insert_action(khui_menu_def * d, khm_size idx, khm_int32 cmd, khm_int32 flags);
+ 
+ #define khui_menu_add_action(d,c) khui_menu_insert_action((d),-1,(c),0)
+ #pragma deprecated(khui_menu_add_action)
+ 
+ #ifdef NOEXPORT
+ 
+ /*! \brief Insert an action by reference into a menu
+ 
+     The action specified by \a act will be inserted into the menu \a d
+     at index \a idx.
+ 
+     \param[in] d The menu to inser the action into.
+ 
+     \param[in] idx The index at which to insert the action.  The index
+         is zero based.  If the index is (-1) or is larger than the
+         largest index in the menu, then the action is appended to the
+         menu.
+ 
+     \param[in] act The action to insert.  This is added by reference.
+         It is the callers reponsibility to ensure that the structure
+         pointed to by \a act is available throughout the lifetime of
+         the menu.
+ 
+     \param[in] flags Flags for the action.  This is a combination of
+         KHUI_ACTIONREF_* constants.  Currently, the only constants
+         that are valid for this function are: ::KHUI_ACTIONREF_SEP,
+         ::KHUI_ACTIONREF_SUBMENU, ::KHUI_ACTIONREF_DEFAULT.  For this
+         function, ::KHUI_ACTIONREF_PACTION will automatically be aded
+         when adding the action.  ::KHUI_ACTIONREF_SEP will be
+         automatically added if the command is ::KHUI_MENU_SEP.
+ 
+     \note The ::khui_menu_def structure is not thread safe.  Multiple
+         threads modifying the same ::khui_menu_def structure may cause
+         thread safety issues.
+ */
+ KHMEXP void KHMAPI
+ khui_menu_insert_paction(khui_menu_def * d, khm_size idx, khui_action * act, khm_int32 flags);
+ 
+ #define khui_menu_add_paction(d,a,f) khui_menu_insert_paction((d),-1,(a),(f))
+ #pragma deprecated(khui_menu_add_paction)
+ 
+ #endif
+ 
+ /*! \brief Remove an action from a menu
+ 
+     The action at the specified index will be removed from the menu.
+   */
+ KHMEXP void KHMAPI
+ khui_menu_remove_action(khui_menu_def * d, khm_size idx);
+ 
+ /*! \brief Get the number of items in the menu
+ 
+     Note that the count includes menu separators.  The indices of the
+     menu items range from 0 to one less than the value returned by
+     this function.
+  */
+ KHMEXP khm_size KHMAPI
+ khui_menu_get_size(khui_menu_def * d);
+ 
+ /*! \brief Get the menu item at a specified index
+ 
+     The returned reference is only valid while the ::khui_menu_def
+     structure is valid.  In addition, the reference becomes invalid if
+     the list of actions in the menu data structure is modified in any
+     way.
+ 
+     If the specified index is out of bounds, then the function returns
+     NULL.
+ 
+     \note The ::khui_menu_def structure is not thread safe.  Multiple
+         threads modifying the same ::khui_menu_def structure may cause
+         thread safety issues.
+  */
+ KHMEXP khui_action_ref *
+ khui_menu_get_action(khui_menu_def * d, khm_size idx);
+ 
+ /*! \brief Action scope identifiers 
+ 
+     The scope identifier is a value which describes the scope of the
+     cursor context.  See documentation on individual scope identifiers
+     for details.
+ 
+     The role of the scope identifier is to provide a summary of the
+     current cursor context.  Specifically, these identify several
+     special cases of credential selection, such as the selection of an
+     entire identity, a credential type or a single credential.  If
+     none of these are applicable, then the generic scope identifier
+     ::KHUI_SCOPE_GROUP is set or ::KHUI_SCOPE_NONE if there is nothing
+     selected.
+ 
+     Note that the scope typically only apply to cursor contexts and
+     not the selection context.  Please see 
+     \ref khui_context "UI Contexts" for more information.
+ 
+     \see \ref khui_context "UI Contexts"
+ */
+ typedef enum tag_khui_scope {
+     KHUI_SCOPE_NONE,
+     /*!< No context.  Nothing is selected. */
+ 
+     KHUI_SCOPE_IDENT,     
+     /*!< Identity.  The selection is the entire identity specified in
+       the \a identity field of the context. */
+ 
+     KHUI_SCOPE_CREDTYPE,  
+     /*!< A credentials type.  The selection is an entire credentials
+       type.  If \a identity is non-NULL, then the scope is all the
+       credentials of type \a cred_type which belong to \a identity.
+       Otherwise, the selection is all credentials of type \a
+       cred_type.
+ 
+       \note The \a identity can be non-NULL even for the case where
+       all credentials of type \a cred_type under \a identity is the
+       same scope as all credentials of type \a cred_type under all
+       identities. */
+ 
+     KHUI_SCOPE_GROUP,
+     /*!< A grouping of credentials.  The scope is a group of
+       credentials which can not be simplified using one of the other
+       context identifiers.  The \a headers array contains \a n_headers
+       elements describing the outline level that has been selected.
+ 
+       \see ::khui_header
+       \see \ref khui_context_sel_ctx_grp "KHUI_SCOPE_GROUP description" */
+ 
+     KHUI_SCOPE_CRED
+     /*!< A single credential.  Only a single credential was
+       selected. The \a cred field of the context specifies the
+       credential.  The \a identity and \a cred_type fields specify the
+       identity and the credential type respectively. */
+ } khui_scope;
+ 
+ 
+ /*! \brief Outline header
+ 
+     Describes an outline header in the user interface.
+ 
+     \see \ref khui_context_sel_ctx_grp "KHUI_SCOPE_GROUP description"
+  */
+ typedef struct tag_khui_header {
+     khm_int32 attr_id;          /*!< Attribute ID */
+     void *    data;             /*!< Value of attribute */
+     khm_size  cb_data;          /*!< Size of the value */
+ } khui_header;
+ 
+ /*! \brief Maximum number of outline headers
+ 
+     This is the maximum number of fields that the credentials view can
+     be grouped by.
+  */
+ #define KHUI_MAX_HEADERS  6
+ 
+ /*! \brief Action context
+ 
+     Represents the UI context for an action.
+  */
+ typedef struct tag_khui_action_context {
+     khm_int32   magic;          /*!< Internal. */
+     khui_scope  scope;          /*!< Context scope.  One of ::khui_scope*/
+     khm_handle  identity;       /*!< Identity */
+     khm_int32   cred_type;      /*!< Credential type ID */
+     khm_handle  cred;           /*!< Credential */
+ 
+     khui_header headers[KHUI_MAX_HEADERS];
+                                 /*!< The ordered set of outline
+                                   headers which define the current
+                                   cursor location. */
+ 
+     khm_size    n_headers;      /*!< Number of actual headers defined
+                                   above */
+ 
+     khm_handle  credset;        /*!< Handle to a credential set
+                                   containing the currently selected
+                                   credentials.  When the context is
+                                   obtained through khui_context_get(),
+                                   this credential is returned in a
+                                   sealed state. */
+ 
+     khm_size    n_sel_creds;    /*!< Number of selected credentials */
+ 
+     void *      int_buf;        /*!< Internal.  Do not use. */
+     khm_size    int_cb_buf;     /*!< Internal.  Do not use. */
+     khm_size    int_cb_used;    /*!< Internal.  Do not use. */
+ 
+     void *      vparam;         /*!< Optional data */
+     khm_size    cb_vparam;      /*!< Size of optional data */
+ } khui_action_context;
+ 
+ /*! \brief Set the current context
+ 
+     Changes the UI context to that represented by the parameters to
+     the function.  Note that specifying a valid \a identity or \a cred
+     parameter will result in an automatic hold on the respective
+     object.  The hold will stay until another call to
+     khui_context_set() overwrites the identity or credential handle or
+     a call to khui_context_reset() is made.
+ 
+     While this API is available, it is only called from the main
+     NetIDMgr application.  Plugins do not have a good reason to call
+     this API directly and should not do so.
+ 
+     \param[in] scope The new context scope
+ 
+     \param[in] identity A handle to an identity.  If this is not NULL,
+         then it should be a valid handle to an identity.  Required if
+         \a scope specifies ::KHUI_SCOPE_IDENT.  Optional if \a scope
+         specifies ::KHUI_SCOPE_CREDTYPE.  Ignored otherwise.
+ 
+     \param[in] cred_type A credentials type.  Specify
+         ::KCDB_CREDTYPE_INVALID if this parameter is not given or not
+         relevant.  Required if \a scope specifies
+         ::KHUI_SCOPE_CREDTYPE.  Ignored otherwise.
+ 
+     \param[in] cred A handle to a credential.  If this parameter is
+         not NULL it is expected to be a valid handle to a credential.
+         Required if \a scope specifies ::KHUI_SCOPE_CRED.  Ignored
+         otherwise.
+ 
+     \param[in] headers An array of headers.  The \a n_headers
+         parameter specifies the number of elements in the array.  Set
+         to NULL if not specified.  Required if \a scope specifies
+         ::KHUI_SCOPE_GROUP.
+ 
+     \param[in] n_headers Number of elements in \a headers.  Must be
+         less than or equal to ::KHUI_MAX_HEADERS.  Required if \a
+         headers is not NULL. Ignored otherwise.
+ 
+     \param[in] cs_src A handle to a credential set from which the
+         selected credentials will be extracted.  The credentials that
+         are selected must have the ::KCDB_CRED_FLAG_SELECTED flag set.
+ 
+     \note This function should only be called from the UI thread.
+  */
+ KHMEXP void KHMAPI 
+ khui_context_set(khui_scope  scope, 
+                  khm_handle  identity, 
+                  khm_int32   cred_type, 
+                  khm_handle  cred,
+                  khui_header *headers,
+                  khm_size    n_headers,
+                  khm_handle  cs_src);
+ 
+ /*! \brief Set the current context
+ 
+     Changes the UI context to that represented by the parameters to
+     the function.  Note that specifying a valid \a identity or \a cred
+     parameter will result in an automatic hold on the respective
+     object.  The hold will stay until another call to
+     khui_context_set() overwrites the identity or credential handle or
+     a call to khui_context_reset() is made.
+ 
+     While this API is available, it is only called from the main
+     NetIDMgr application.  Plugins do not have a good reason to call
+     this API directly and should not do so.
+ 
+     \param[in] scope The new context scope
+ 
+     \param[in] identity A handle to an identity.  If this is not NULL,
+         then it should be a valid handle to an identity.  Required if
+         \a scope specifies ::KHUI_SCOPE_IDENT.  Optional if \a scope
+         specifies ::KHUI_SCOPE_CREDTYPE.  Ignored otherwise.
+ 
+     \param[in] cred_type A credentials type.  Specify
+         ::KCDB_CREDTYPE_INVALID if this parameter is not given or not
+         relevant.  Required if \a scope specifies
+         ::KHUI_SCOPE_CREDTYPE.  Ignored otherwise.
+ 
+     \param[in] cred A handle to a credential.  If this parameter is
+         not NULL it is expected to be a valid handle to a credential.
+         Required if \a scope specifies ::KHUI_SCOPE_CRED.  Ignored
+         otherwise.
+ 
+     \param[in] headers An array of headers.  The \a n_headers
+         parameter specifies the number of elements in the array.  Set
+         to NULL if not specified.  Required if \a scope specifies
+         ::KHUI_SCOPE_GROUP.
+ 
+     \param[in] n_headers Number of elements in \a headers.  Must be
+         less than or equal to ::KHUI_MAX_HEADERS.  Required if \a
+         headers is not NULL. Ignored otherwise.
+ 
+     \param[in] cs_src A handle to a credential set from which the
+         selected credentials will be extracted.  The credentials that
+         are selected must have the ::KCDB_CRED_FLAG_SELECTED flag set.
+ 
+     \param[in] vparam Optional parameter blob
+ 
+     \param[in] cb_vparam Size of parameter blob
+ 
+     \note This function should only be called from the UI thread.
+  */
+ KHMEXP void KHMAPI 
+ khui_context_set_ex(khui_scope scope, 
+                     khm_handle identity, 
+                     khm_int32 cred_type, 
+                     khm_handle cred,
+                     khui_header *headers,
+                     khm_size n_headers,
+                     khm_handle cs_src,
+                     void * vparam,
+                     khm_size cb_vparam);
+ 
+ /*! \brief Set the current UI context using an existing context
+ 
+     Copies the context specified in \a ctx into the active UI context.
+ 
+     \param[in] ctx A pointer to a ::khui_action_context structure that
+         specifies the new UI context.  Cannot be NULL.
+ */
+ KHMEXP void KHMAPI
+ khui_context_set_indirect(khui_action_context * ctx);
+ 
+ /*! \brief Obtain the current UI context
+ 
+     The parameter specified by \a ctx will receive the current UI
+     context.  If the context contains an identity or a credential
+     handle, a hold will be obtained on the relevant object.  Use
+     khui_context_release() to release the holds obtained in a prior
+     call to khui_context_get().
+ 
+     \note The returned context should not be modified prior to calling
+     khui_context_release().
+ */
+ KHMEXP void KHMAPI 
+ khui_context_get(khui_action_context * ctx);
+ 
+ /*! \brief Create a new UI context
+ 
+     The created context does not have any relation to the current UI
+     context.  This function is provided for use in situations where an
+     application needs to provide a scope description through a
+     ::khui_action_context structure.
+ 
+     Once the application is done with the context, it should call
+     khui_context_release() to release the created context.
+  */
+ KHMEXP void KHMAPI
+ khui_context_create(khui_action_context * ctx,
+                     khui_scope scope,
+                     khm_handle identity,
+                     khm_int32 cred_type,
+                     khm_handle cred);
+ 
+ /*! \brief Release a context obtained using khui_context_get()
+ 
+     Releases all holds obtained on related objects in a prior call to
+     khui_context_get() and nullifies the context.
+ 
+     \note The context should not have been modified between calling
+     khui_context_get() and khui_context_release()
+  */
+ KHMEXP void KHMAPI 
+ khui_context_release(khui_action_context * ctx);
+ 
+ /*! \brief Reset the UI context
+ 
+     Nullifies the current UI context and releases any holds obtained
+     on objects related to the previous context.
+ */
+ KHMEXP void KHMAPI 
+ khui_context_reset(void);
+ 
+ /*! \brief Refresh context data
+ 
+     Setting the UI context involves other side effects such as
+     activation of or disabling certain actions based on the selection.
+     If an operation is performed which may affect the side effects,
+     khui_context_refresh() is called to refresh them.
+ 
+     An example is when setting the default identity.  The state of the
+     action ::KHUI_ACTION_SET_DEF_ID depends on whether the currently
+     selected identity is the default.  However, if the currently
+     selected identity becomes the default after selection, then
+     khui_context_refresh() should be called to adjust the state of the
+     ::KHUI_ACTION_SET_DEF_ID action.
+  */
+ KHMEXP void KHMAPI 
+ khui_context_refresh(void);
+ 
+ /*! \brief A filter function that filters for credentials in the cursor context
+ 
+     This is a function of type ::kcdb_cred_filter_func which can be
+     used to filter for credentials that are included in the cursor
+     context.
+ 
+     The \a rock parameter should be a pointer to a
+     ::khui_action_context structure which will be used as the filter.
+ 
+     For example, the following code will extract the cursor context
+     credentials into the credential set \a my_credset based on the UI
+     context \a my context:
+ 
+     \code
+     kcdb_credset_extract_filtered(my_credset,
+                                   NULL,
+                                   khui_context_cursor_filter,
+                                   (void *) my_context);
+     \endcode
+ */
+ KHMEXP khm_int32 KHMAPI
+ khui_context_cursor_filter(khm_handle cred,
+                            khm_int32 flags,
+                            void * rock);
+ 
+ /*! \brief Get a string representation of an accelerator
+ 
+     \param[in] cmd Command for which to obtain the accelerator string for
+     \param[out] buf Buffer to receive the accelerator string
+     \param[in] bufsiz Size of the buffer in bytes.  Note that the size of the
+         buffer must be sufficient to hold at least one character and a
+         NULL terminator.
+ 
+     \return TRUE if the operation was successful. FALSE otherwise.
+  */
+ KHMEXP khm_boolean KHMAPI khui_get_cmd_accel_string(khm_int32 cmd, wchar_t * buf, khm_size bufsiz);
+ 
+ #ifdef NOEXPORT
+ /*! \brief Initializes the global accelerator table
+  */
+ KHMEXP HACCEL KHMAPI khui_create_global_accel_table(void);
+ #endif
+ 
+ /*! \brief Find a menu by id
+ 
+     Finds the menu that is associated with the specified action.
+  */
+ KHMEXP khui_menu_def * KHMAPI khui_find_menu(khm_int32 action);
+ 
+ #ifdef NOEXPORT
+ 
+ /* internal */
+ KHMEXP void KHMAPI
+ khui_set_main_window(HWND hwnd);
+ 
+ #endif
+ 
+ /*! \brief Trigger an action
+ 
+     Triggers the specified action using the specified UI context.
+ 
+     This function does not return until the specified action has been
+     processed.  Many standard actions are asynchronous and they will
+     return before processing will complete.
+ 
+     Pseudo actions should not be triggered using khui_action_trigger()
+     as they only carry meaning when invoked from specific windows or
+     contexts.
+ 
+     \param[in] action Action.  Should be one of the standard actions
+         or an action created by khui_action_create()
+ 
+     \param[in] ctx The UI context to use for the action.  If this is
+         NULL, the action will be triggered under the current UI context.
+  */
+ KHMEXP void KHMAPI
+ khui_action_trigger(khm_int32 action, khui_action_context * ctx);
+ 
+ /*! \brief Find an action by id
+ 
+     \note This function should not be used by plugins.  It is there
+         for use by the NetIDMgr application.
+ */
+ KHMEXP khui_action * KHMAPI khui_find_action(khm_int32 action);
+ 
+ #ifdef NOEXPORT
+ /*! \brief Get the length of the action list */
+ KHMEXP size_t KHMAPI khui_action_list_length(khui_action_ref * ref);
+ #endif
+ 
+ /*! \brief Create a new action
+ 
+     \param[in] name Name for a named action.  The name must be unique
+         among all registered actions. (limited by KHUI_MAXCCH_NAME)
+         (Optional. Set to NULL if the action is not a named action.)
+ 
+     \param[in] caption The localized caption for the action.  This
+         will be shown in menus, toolbars and buttons when the action
+         needs to be represented. (limited by KHUI_MAXCCH_SHORT_DESC)
+         (Required)
+ 
+     \param[in] tooltip The localized tooltip for the action. (limited
+         by KHUI_MAXCCH_SHORT_DESC) (Optional, set to NULL if there is
+         no tooltip associated with the action)
+ 
+     \param[in] hsub The subscription that is notified when the action
+         is triggered. (Optional) The subscription can be created with
+         kmq_create_subscription().  The handle will be released when
+         it is no longer needed.  Hence, the caller should not release
+         it.
+ 
+     \param[in] type The type of the action.  Currently it should be
+         set to either ::KHUI_ACTIONTYPE_TRIGGER or
+         ::KHUI_ACTIONTYPE_TOGGLE.  For ::KHUI_ACTIONTYPE_TOGGLE, the
+         initial state will be unchecked.  Use khui_check_action()
+         function to change the checked state of the action.
+ 
+     \param[in] userdata A custom value.
+ 
+     \return The identifier of the new action or zero if the action
+         could not be created.
+ 
+     \note For named custom actions, the name of the action can not be
+         the same as the name of a configuration node.  See
+         khui_cfg_register_node().
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_action_create(const wchar_t * name,
+                    const wchar_t * caption,
+                    const wchar_t * tooltip,
+                    void * userdata,
+                    khm_int32 type,
+                    khm_handle hsub);
+ 
+ /* \brief Delete a custom action
+ 
+    Deletes a custom action created by a call to khui_action_create().
+    Custom actions should only be deleted when unloading a plugin.
+  */
+ KHMEXP void KHMAPI
+ khui_action_delete(khm_int32 action);
+ 
+ /*! \brief Get the user data associated with a custom action
+ 
+     This function returns the user data that was specified when the
+     custom action was created usng khui_action_create().  If the
+     custom action identifier is invalid or if the custom action does
+     not contain any user data, this function will return NULL.
+  */
+ KHMEXP void * KHMAPI
+ khui_action_get_data(khm_int32 action);
+ 
+ /*! \brief Find an action by name */
+ KHMEXP khui_action * KHMAPI khui_find_named_action(const wchar_t * name);
+ 
+ /*! \brief Enables or disables a group of actions
+ 
+     The group of actions are specified by the menu definition.  All
+     valid action entries in the menu are marked as enabled or disabled
+     according to the value of \a enable.
+  */
+ KHMEXP void KHMAPI khui_enable_actions(khui_menu_def * d, khm_boolean enable);
+ 
+ /*! \brief Enables or disables an action
+ 
+     The action designated by the command \a action will either be enabled
+     or disabled depending on the \a enable parameter.  If \a enable is
+     TRUE then the action is enabled.
+  */
+ KHMEXP void KHMAPI khui_enable_action(khm_int32 action, khm_boolean enable);
+ 
+ /*! \brief Check an action in an action group
+ 
+     Marks the action denoted by \a action as checked and resets the
+     checked bit in all other actions.
+ 
+     \param[in] d A menu definition.
+ 
+     \param[in] action A command identifier.  Setting this to -1 will
+         reset the checked bit in all the actions in the menu
+         definition.
+  */
+ KHMEXP void KHMAPI khui_check_radio_action(khui_menu_def * d, khm_int32 action);
+ 
+ /*! \brief Check an action
+ 
+     For toggle typed actions, this sets or resets the check.
+  */
+ KHMEXP void KHMAPI khui_check_action(khm_int32 cmd, khm_boolean check);
+ 
+ #ifdef NOEXPORT
+ /*!\cond INTERNAL */
+ 
+ /*! \brief Initialize actions
+ 
+     \note Only called by the NetIDMgr application
+  */
+ KHMEXP void KHMAPI khui_init_actions(void);
+ 
+ /*! \brief Exit actions
+ 
+     \note Only called by the NetIDMgr application
+  */
+ KHMEXP void KHMAPI khui_exit_actions(void);
+ 
+ /*! \endcond */
+ #endif
+ 
+ /*@}*/
+ /*@}*/
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/khactiondef.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/khactiondef.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:24 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/khactiondef.h	Thu Oct 12 17:42:40 2006
***************
*** 0 ****
--- 1,160 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: khactiondef.h,v 1.1.2.2 2006/10/12 21:42:40 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_ACTIONDEF_H
+ #define __KHIMAIRA_ACTIONDEF_H
+ 
+ /*! \ingroup khui_actions
+   @{*/
+ /*! \defgroup khui_std_actions Standard Actions
+ @{ */
+ 
+ /*!\name Standard actions
+   @{*/
+ #define KHUI_ACTION_BASE 50000
+ 
+ #define KHUI_ACTION_PROPERTIES  (KHUI_ACTION_BASE + 0)
+ #define KHUI_ACTION_EXIT        (KHUI_ACTION_BASE + 1)
+ #define KHUI_ACTION_SET_DEF_ID  (KHUI_ACTION_BASE + 3)
+ #define KHUI_ACTION_SET_SRCH_ID (KHUI_ACTION_BASE + 4)
+ #define KHUI_ACTION_PASSWD_ID   (KHUI_ACTION_BASE + 7)
+ #define KHUI_ACTION_NEW_CRED    (KHUI_ACTION_BASE + 8)
+ #define KHUI_ACTION_DEBUG_WINDOW    (KHUI_ACTION_BASE + 10)
+ #define KHUI_ACTION_VIEW_REFRESH    (KHUI_ACTION_BASE + 11)
+ #define KHUI_ACTION_LAYOUT_ID   (KHUI_ACTION_BASE + 12)
+ #define KHUI_ACTION_LAYOUT_TYPE (KHUI_ACTION_BASE + 13)
+ #define KHUI_ACTION_LAYOUT_LOC  (KHUI_ACTION_BASE + 14)
+ #define KHUI_ACTION_TB_STANDARD (KHUI_ACTION_BASE + 15)
+ #define KHUI_ACTION_OPT_KHIM    (KHUI_ACTION_BASE + 16)
+ #define KHUI_ACTION_OPT_IDENTS  (KHUI_ACTION_BASE + 17)
+ #define KHUI_ACTION_OPT_NOTIF   (KHUI_ACTION_BASE + 18)
+ #define KHUI_ACTION_HELP_CTX    (KHUI_ACTION_BASE + 19)
+ #define KHUI_ACTION_HELP_CONTENTS   (KHUI_ACTION_BASE + 20)
+ #define KHUI_ACTION_HELP_INDEX  (KHUI_ACTION_BASE + 21)
+ #define KHUI_ACTION_HELP_ABOUT  (KHUI_ACTION_BASE + 22)
+ #define KHUI_ACTION_DESTROY_CRED    (KHUI_ACTION_BASE + 23)
+ #define KHUI_ACTION_RENEW_CRED  (KHUI_ACTION_BASE + 24)
+ #define KHUI_ACTION_OPEN_APP    (KHUI_ACTION_BASE + 25)
+ #define KHUI_ACTION_MENU_ACTIVATE   (KHUI_ACTION_BASE + 26)
+ #define KHUI_ACTION_CLOSE_APP   (KHUI_ACTION_BASE + 27)
+ #define KHUI_ACTION_IMPORT      (KHUI_ACTION_BASE + 28)
+ #define KHUI_ACTION_OPT_PLUGINS (KHUI_ACTION_BASE + 29)
+ #define KHUI_ACTION_LAYOUT_CUST (KHUI_ACTION_BASE + 30)
+ #define KHUI_ACTION_OPT_APPEAR  (KHUI_ACTION_BASE + 31)
+ #define KHUI_ACTION_LAYOUT_RELOAD (KHUI_ACTION_BASE + 32)
+ /*@}*/
+ 
+ /*! \name Pseudo actions 
+ 
+ Pseudo actions do not trigger any specific function, but acts as a
+ signal of some generic event which will be interpreted based on
+ context.
+ 
+ @{*/
+ #define KHUI_PACTION_BASE   (KHUI_ACTION_BASE + 500)
+ 
+ #define KHUI_PACTION_MENU   (KHUI_PACTION_BASE + 0)
+ #define KHUI_PACTION_UP     (KHUI_PACTION_BASE + 1)
+ #define KHUI_PACTION_DOWN   (KHUI_PACTION_BASE + 2)
+ #define KHUI_PACTION_LEFT   (KHUI_PACTION_BASE + 3)
+ #define KHUI_PACTION_RIGHT  (KHUI_PACTION_BASE + 4)
+ #define KHUI_PACTION_ENTER  (KHUI_PACTION_BASE + 5)
+ #define KHUI_PACTION_ESC    (KHUI_PACTION_BASE + 6)
+ #define KHUI_PACTION_OK     (KHUI_PACTION_BASE + 7)
+ #define KHUI_PACTION_CANCEL (KHUI_PACTION_BASE + 8)
+ #define KHUI_PACTION_CLOSE  (KHUI_PACTION_BASE + 9)
+ #define KHUI_PACTION_DELETE (KHUI_PACTION_BASE + 10)
+ #define KHUI_PACTION_UP_EXTEND (KHUI_PACTION_BASE + 11)
+ #define KHUI_PACTION_UP_TOGGLE (KHUI_PACTION_BASE + 12)
+ #define KHUI_PACTION_DOWN_EXTEND (KHUI_PACTION_BASE + 13)
+ #define KHUI_PACTION_DOWN_TOGGLE (KHUI_PACTION_BASE + 14)
+ #define KHUI_PACTION_BLANK  (KHUI_PACTION_BASE + 15)
+ #define KHUI_PACTION_NEXT   (KHUI_PACTION_BASE + 16)
+ #define KHUI_PACTION_SELALL (KHUI_PACTION_BASE + 17)
+ #define KHUI_PACTION_YES    (KHUI_PACTION_BASE + 18)
+ #define KHUI_PACTION_NO     (KHUI_PACTION_BASE + 19)
+ #define KHUI_PACTION_YESALL (KHUI_PACTION_BASE + 20)
+ #define KHUI_PACTION_NOALL  (KHUI_PACTION_BASE + 21)
+ #define KHUI_PACTION_REMOVE (KHUI_PACTION_BASE + 22)
+ #define KHUI_PACTION_KEEP   (KHUI_PACTION_BASE + 23)
+ #define KHUI_PACTION_DISCARD (KHUI_PACTION_BASE + 24)
+ #define KHUI_PACTION_PGDN   (KHUI_PACTION_BASE + 25)
+ #define KHUI_PACTION_PGUP   (KHUI_PACTION_BASE + 26)
+ #define KHUI_PACTION_PGUP_EXTEND (KHUI_PACTION_BASE + 27)
+ #define KHUI_PACTION_PGDN_EXTEND (KHUI_PACTION_BASE + 28)
+ /*@}*/
+ 
+ /*! \name Menus
+ 
+ Stock menus.
+ 
+ @{*/
+ #define KHUI_MENU_BASE      (KHUI_ACTION_BASE + 1000)
+ 
+ #define KHUI_MENU_MAIN      (KHUI_MENU_BASE + 0)
+ #define KHUI_MENU_FILE      (KHUI_MENU_BASE + 1)
+ #define KHUI_MENU_CRED      (KHUI_MENU_BASE + 2)
+ #define KHUI_MENU_VIEW      (KHUI_MENU_BASE + 3)
+ #define KHUI_MENU_OPTIONS   (KHUI_MENU_BASE + 4)
+ #define KHUI_MENU_HELP      (KHUI_MENU_BASE + 5)
+ 
+ #define KHUI_MENU_LAYOUT    (KHUI_MENU_BASE + 6)
+ #define KHUI_MENU_TOOLBARS  (KHUI_MENU_BASE + 7)
+ 
+ #define KHUI_MENU_IDENT_CTX (KHUI_MENU_BASE + 8)
+ #define KHUI_MENU_TOK_CTX   (KHUI_MENU_BASE + 9)
+ #define KHUI_MENU_ICO_CTX_MIN    (KHUI_MENU_BASE + 12)
+ #define KHUI_MENU_ICO_CTX_NORMAL (KHUI_MENU_BASE + 13)
+ #define KHUI_MENU_CWHEADER_CTX   (KHUI_MENU_BASE + 14)
+ 
+ #define KHUI_MENU_COLUMNS   (KHUI_MENU_BASE + 15)
+ 
+ #define KHUI_PMENU_TOK_SEL  (KHUI_MENU_BASE + 10)
+ #define KHUI_PMENU_ID_SEL   (KHUI_MENU_BASE + 11)
+ 
+ /* Next menu: 14 */
+ /*@}*/
+ 
+ /*! \name Toolbars
+ @{*/
+ #define KHUI_TOOLBAR_BASE   (KHUI_ACTION_BASE + 2000)
+ 
+ #define KHUI_TOOLBAR_STANDARD   (KHUI_TOOLBAR_BASE + 0)
+ /*@}*/
+ 
+ /*! \brief Base for user actions
+ 
+     When creating new actions, the UI library will allocate command
+     identifiers starting with this one.
+ */
+ #define KHUI_USERACTION_BASE    (KHUI_ACTION_BASE + 10000)
+ 
+ /*! \brief Does this command represent a user action? */
+ #define IS_USERACTION(cmd) ((cmd) >= KHUI_USERACTION_BASE)
+ /*@}*/
+ /*@}*/
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/khalerts.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/khalerts.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:24 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/khalerts.h	Thu Oct 12 17:42:40 2006
***************
*** 0 ****
--- 1,398 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: khalerts.h,v 1.1.2.2 2006/10/12 21:42:40 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_KHALERTS_H
+ #define __KHIMAIRA_KHALERTS_H
+ 
+ /*********************************************************************
+   Alerter and error reporting
+ **********************************************************************/
+ 
+ /*! \addtogroup khui
+ @{ */
+ 
+ /*!\defgroup khui_alert Alerter and Error Reporting
+ @{*/
+ 
+ #define KHUI_MAX_ALERT_COMMANDS  4
+ 
+ /*! \brief An alert
+ 
+     Describes an alert message that will be shown to the user in a
+     variety of ways depending on the state of the NetIDMgr
+     application.
+  */
+ typedef struct tag_khui_alert {
+     khm_int32           magic;  /*!< Magic number. Always set to
+                                   KHUI_ALERT_MAGIC */
+ 
+     khm_int32           severity; /*!< The severity of the alert.  One
+                                     of KHERR_ERROR, KHERR_WARNING or
+                                     KHERR_INFO.  The default is
+                                     KHERR_INFO.  Do not set directly.
+                                     Use khui_alert_set_severity(). */
+ 
+     khm_int32           alert_commands[KHUI_MAX_ALERT_COMMANDS];
+                                 /*!< The command buttons associated
+                                   with the alert.  Use
+                                   khui_alert_add_command() to add a
+                                   command.  The buttons will appear in
+                                   the order in which they were added.
+                                   The first button will be the
+                                   default.  Each command should be a
+                                   known action identifier. */
+     khm_int32           n_alert_commands;
+ 
+     wchar_t *           title;  /*!< The title of the alert.  Subject
+                                   to ::KHUI_MAXCCH_TITLE.  Use
+                                   khui_alert_set_title() to set.  Do
+                                   not modify directly. */
+ 
+     wchar_t *           message; /*!< The main message of the alert.
+                                    Subject to ::KHUI_MAXCCH_MESSAGE.
+                                    Use khui_alert_set_message() to
+                                    set.  Do not modify direcly. */
+ 
+     wchar_t *           suggestion; /*!< A suggestion.  Appears below
+                                       the message text. Use
+                                       khui_alert_set_suggestion() to
+                                       set.  Do not modify directly. */
+ 
+ #ifdef _WIN32
+     POINT               target;
+ #endif
+ 
+     khm_int32           flags;  /*!< combination of
+                                  ::khui_alert_flags.  Do not modify
+                                  directly. */
+ 
+     kherr_context *     err_context; 
+                                 /*!< If non-NULL at the time the alert
+                                   window is shown, this indicates that
+                                   the alert window should provide an
+                                   error viewer for the given error
+                                   context. */
+ 
+     kherr_event *       err_event; 
+                                 /*!< If non-NULL at the time the alert
+                                   window is shown, this indicates that
+                                   the alert window should provide an
+                                   error viewer for the given error
+                                   event.  If an \a err_context is also
+                                   given, the error viewer for the
+                                   context will be below this error. */
+ 
+     khm_int32           response; 
+                                 /*!< Once the alert is displayed to
+                                   the user, when the user clicks one
+                                   of the command buttons, the command
+                                   ID will be assigned here. */
+ 
+     int                 refcount; /* internal */
+ 
+     LDCL(struct tag_khui_alert); /* internal */
+ } khui_alert;
+ 
+ #define KHUI_ALERT_MAGIC 0x48c39ce9
+ 
+ /*! \brief Maximum number of characters in title including terminating NULL
+  */
+ #define KHUI_MAXCCH_TITLE 256
+ 
+ /*! \brief Maximum number of bytes in title including terminating NULL
+  */
+ #define KHUI_MAXCB_TITLE (KHUI_MAXCCH_TITLE * sizeof(wchar_t))
+ 
+ /*! \brief Maximum number of characters in message including terminating NULL
+  */
+ #define KHUI_MAXCCH_MESSAGE 1024
+ 
+ /*! \brief Maximum number of bytes in message including terminating NULL
+  */
+ #define KHUI_MAXCB_MESSAGE (KHUI_MAXCCH_MESSAGE * sizeof(wchar_t))
+ 
+ /*! \brief Maxumum number of characters in a suggestion including terminating NULL */
+ #define KHUI_MAXCCH_SUGGESTION 1024
+ 
+ /*! \brief Maximum number of bytes in a suggestion, including terminating NULL */
+ #define KHUI_MAXCB_SUGGESTION (KHUI_MAXCCH_SUGGESTION * sizeof(wchar_t))
+ 
+ /*! \brief Flags for an alert */
+ enum khui_alert_flags {
+     KHUI_ALERT_FLAG_FREE_STRUCT     =0x00000001, 
+     /*!< Internal. Free the structure once the alert is done. */
+ 
+     KHUI_ALERT_FLAG_FREE_TITLE      =0x00000002,
+     /*!< Internal. Free the \a title field when the alert is done.*/
+ 
+     KHUI_ALERT_FLAG_FREE_MESSAGE    =0x00000004,
+     /*!< Internal. Free the \a message field when the alert is done. */
+ 
+     KHUI_ALERT_FLAG_FREE_SUGGEST    =0x00000008,
+     /*!< Internal. Free the \a suggest field when the alert is done */
+ 
+     KHUI_ALERT_FLAG_DEFACTION       =0x00000010,
+     /*!< If the message is displayed as a balloon prompt, then perform
+       the default action when it is clicked.  The default action is
+       the first action added to the alert.  Cannot be used if there
+       are no actions or if ::KHUI_ALERT_FLAG_REQUEST_WINDOW is
+       specified.*/
+ 
+     KHUI_ALERT_FLAG_VALID_TARGET    =0x00010000,
+     /*!< There is a valid target for the alert */
+ 
+     KHUI_ALERT_FLAG_VALID_ERROR     =0x00020000,
+     /*!< There is a valid error context associated with the alert */
+ 
+     KHUI_ALERT_FLAG_DISPLAY_WINDOW  =0x01000000,
+     /*!< The alert has been displayed in a window */
+ 
+     KHUI_ALERT_FLAG_DISPLAY_BALLOON =0x02000000,
+     /*!< The alert has been displayed in a ballon */
+ 
+     KHUI_ALERT_FLAG_REQUEST_WINDOW  =0x04000000,
+     /*!< The alert should be displayed in a window */
+ 
+     KHUI_ALERT_FLAG_REQUEST_BALLOON =0x08000000,
+     /*!< The alert should be displayed in a balloon */
+ 
+     KHUI_ALERT_FLAG_MODAL           =0x10000000,
+     /*!< Modal alert.  Do not set direclty. */
+ 
+     KHUI_ALERT_FLAGMASK_RDWR        =0x0C000010,
+     /*!< Bit mask of flags that can be set by khui_alert_set_flags() */
+ };
+ 
+ /*! \brief Create an empty alert object
+ 
+     The returned result is a held pointer to a ::khui_alert object.
+     Use khui_alert_release() to release the object.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_alert_create_empty(khui_alert ** result);
+ 
+ /*! \brief Create a simple alert object
+ 
+     The returned result is a held pointer to a ::khui_alert object.
+     Use khui_alert_release() to release the object.
+ 
+     \param[in] title The title of the alert. (Required, Localized)
+         Limited by ::KHUI_MAXCCH_TITLE.
+ 
+     \param[in] message The message.  (Required. Localized).  Limited
+         by ::KHUI_MAXCCH_MESSAGE.
+ 
+     \param[in] severity One of ::tag_kherr_severity
+ 
+     \param[out] result Receives a held pointer to a ::khui_alert
+         object upon successful completion.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_alert_create_simple(const wchar_t * title, 
+                          const wchar_t * message, 
+                          khm_int32 severity, 
+                          khui_alert ** result);
+ 
+ /*! \brief Set the title of an alert object
+ 
+     The title is limited by ::KHUI_MAXCCH_TITLE.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_alert_set_title(khui_alert * alert, 
+                      const wchar_t * title);
+ 
+ /*! \brief Set the message of an alert object
+ 
+     The message is limited by ::KHUI_MAXCCH_MESSAGE.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_alert_set_message(khui_alert * alert, 
+                        const wchar_t * message);
+ 
+ /*! \brief Set the suggestion of an alert object 
+ 
+     The suggestion is limited by ::KHUI_MAXCCH_SUGGESTION
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_alert_set_suggestion(khui_alert * alert,
+                           const wchar_t * suggestion);
+ 
+ /*! \brief Set the severity of the alert object
+ 
+     The severity value is one of ::tag_kherr_severity
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_alert_set_severity(khui_alert * alert, 
+                         khm_int32 severity);
+ 
+ /*! \brief Sets the flags of the alert
+ 
+     The flags are as defined in ::khui_alert_flags.  The bits that are
+     on in \a mask will be set to the corresponding values in \a flags.
+     Only the bits specified in ::KHUI_ALERT_FLAGMASK_RDWR can be
+     specified in \a mask.
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_alert_set_flags(khui_alert * alert, khm_int32 mask, khm_int32 flags);
+ 
+ /*! \brief Clear all the commands from an alert object
+ 
+     \see khui_alert_add_command()
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_alert_clear_commands(khui_alert * alert);
+ 
+ /*! \brief Add a command to an alert object
+ 
+     The command ID should be a valid registered command.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_alert_add_command(khui_alert * alert, 
+                        khm_int32 command_id);
+ 
+ /*! \brief Display an alert
+ 
+     The alert must have a valid \a severity, \a title and a \a message
+     to be displayed.  Otherwise the function immediately returns with
+     a failure code.
+ 
+     The method used to display the alert is as follows:
+ 
+     - A balloon alert will be shown if one of the following is true: 
+       - The NetIDMgr application is minimized or in the background.  
+       - ::KHUI_ALERT_FLAG_REQUEST_BALLOON is specified in \a flags.  
+     - Otherwise an alert window will be shown.
+ 
+     If the message, title of the alert is too long to fit in a balloon
+     prompt, there's a suggestion or if there are custom commands then
+     a placeholder balloon prompt will be shown which when clicked on,
+     shows the actual alert in an alert window.  
+ 
+     An exception is when ::KHUI_ALERT_FLAG_DEFACTION is specified in
+     flags.  In this case instead of a placeholder balloon prompt, one
+     will be shown with the actual title and message (truncated if
+     necessary).  Clicking on the balloon will have the same effect as
+     choosing the first command in the action.
+ 
+     The placeholder balloon prompt will have a title derived from the
+     first 63 characters of the \a title field in the alert and a
+     message notifying the user that they should click the balloon
+     prompt for more information.
+ 
+     To this end, it is beneficial to limit the length of the title to
+     63 characters (64 counting the terminating NULL).  This limit is
+     enforced on Windows.  Also, try to make the title descriptive.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_alert_show(khui_alert * alert);
+ 
+ /*! \brief Display a modal alert
+ 
+     Similar to khui_alert_show(), but shows a modal alert dialog.  The
+     function does not return until the user has closed the alert.
+ 
+     This function always opens an alert window (never shows a
+     balloon).
+ 
+     \note Should only be called from the UI thread.
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_alert_show_modal(khui_alert * alert);
+ 
+ /*! \brief Queue an alert
+ 
+     Instead of displaying the alert immediately, the alert is queued
+     and the status bar updated to notify the user that there is a
+     pending alert.  Once the user activates the pending alert, it will
+     be displayed as if khui_alert_show() was called.
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_alert_queue(khui_alert * alert);
+ 
+ /*! \brief Display a simple alert
+ 
+     \see khui_alert_show()
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_alert_show_simple(const wchar_t * title, 
+                        const wchar_t * message, 
+                        khm_int32 severity);
+ 
+ /*! \brief Obtain a hold on the alert
+ 
+     An alert structure is only considered valid for the duration that
+     there is a hold on it.
+ 
+     Use khui_alert_release() to release the hold.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_alert_hold(khui_alert * alert);
+ 
+ /*! \brief Release the hold on the alert
+ 
+     Holds obtained on an alert using any of the functions that either
+     return a held pointer to an alert or implicitly obtains a hold on
+     it need to be undone through a call to khui_alert_release().
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_alert_release(khui_alert * alert);
+ 
+ /*! \brief Lock an alert 
+ 
+     Locking an alert disallows any other thread from accessing the
+     alert at the same time.  NetIDMgr keeps a global list of all alert
+     objects and the user interface may access any of them at various
+     points in time.  Locking the alert allows a thread to modify an
+     alert without causing another thread to be exposed to an
+     inconsistent state.
+ 
+     Once a thread obtains a lock on the alert, it must call
+     khui_alert_unlock() to unlock it.  Otherwise no other thread will
+     be able to access the alert.
+ 
+     \note Currently the alert lock is global.  Locking one alert
+         disallows access to all other alerts as well.
+ 
+     \note Calling khui_alert_lock() is only necessary if you are
+         modifying the ::khui_alert structure directly.  Calling any of
+         the khui_alert_* functions to modify the alert does not
+         require obtaining a lock, as they perform synchronization
+         internally.
+ */
+ KHMEXP void KHMAPI 
+ khui_alert_lock(khui_alert * alert);
+ 
+ /*! \brief Unlock an alert 
+ 
+     \see khui_alert_lock()
+ */
+ KHMEXP void KHMAPI 
+ khui_alert_unlock(khui_alert * alert);
+ 
+ /*!@}*/
+ /*!@}*/
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/khconfigui.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/khconfigui.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:24 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/khconfigui.h	Thu Oct 12 17:42:40 2006
***************
*** 0 ****
--- 1,616 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: khconfigui.h,v 1.1.2.2 2006/10/12 21:42:40 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_KHCONFIGUI_H
+ #define __KHIMAIRA_KHCONFIGUI_H
+ 
+ /*! \addtogroup khui
+ @{ */
+ 
+ /*! \defgroup khui_cfg Configuration Panels
+ 
+     Configuration panels are the primary means from which the user is
+     presented with an interface to change NetIDMgr and plugin
+     configuration.
+ 
+ @{ */
+ 
+ /*! \brief Configuration window notification message
+ 
+     This is the message that will be used to notify dialog panels.
+ 
+     The format of the message is :
+     - uMsg : KHUI_WM_CFG_NOTIFY
+     - HIWORD(wParam) : one of ::khui_wm_cfg_notifications
+ 
+     \note This is the same as ::KHUI_WM_NC_NOTIFY
+  */
+ #define KHUI_WM_CFG_NOTIFY (WM_APP + 0x101)
+ 
+ /*! \brief Configuration notifications
+ 
+     These are sent thorugh a ::KHUI_WM_CFG_NOTIFY message.
+ 
+     The format of the message is :
+     - uMsg : KHUI_WM_CFG_NOTIFY
+     - HIWORD(wParam) : one of ::khui_wm_cfg_notifications
+  */
+ enum khui_wm_cfg_notifications {
+     WMCFG_SHOW_NODE = 1,
+     /*!< Sent to the configuration dialog to request that the panel
+       for the specified node be shown.  The \a lParam message
+       parameter will contain a held ::khui_config_node handle.  The
+       sender of the mssage is responsible for releasing the handle.*/
+ 
+     WMCFG_UPDATE_STATE = 2,
+     /*!< Sent to the configuration dialog to indicate that the state
+       flags for the specified configuration node have changed.
+ 
+       - LOWORD(wParam) : new flags
+       - lParam : ::khui_config_node for the node*/
+ 
+     WMCFG_APPLY = 3,
+     /*!< Sent to all the configuration panels when the user clicks the
+       'Apply' button or the 'Ok' button.  The panels are responsible
+       for applying the configuration changes and updating their flags
+       using khui_cfg_set_flags(). */
+ 
+     WMCFG_SYNC_NODE_LIST = 4,
+     /*!< Sent from the UI library to the configuration window to
+       notify the window that the node list has changed.  This message
+       is sent synchronously before the node is removed. */
+ };
+ 
+ /*! \brief Registration information for a configuration node
+ 
+     \see khui_cfg_register_node()
+ */
+ typedef struct tag_khui_config_node_reg {
+     const wchar_t * name;       /*!< Internal identifier
+                                   (not-localized, required).  The name
+                                   is required to be unique among
+                                   sibling nodes.  However it is not
+                                   required to be unique globally.  The
+                                   size of the name is constrained by
+                                   ::KHUI_MAXCCH_NAME*/
+ 
+     const wchar_t * short_desc; /*!< Short description (Localized,
+                                   required).  This is the name which
+                                   identifies the node within a
+                                   collection of siblings.  The size of
+                                   the string is constrained by
+                                   ::KHUI_MAXCCH_SHORT_DESC*/
+ 
+     const wchar_t * long_desc;  /*!< Global name of the node.
+                                   (Localized, required).  This
+                                   uniquely identifies the node in the
+                                   collection of all configuration
+                                   nodes.  The size of the string is
+                                   constrained by
+                                   ::KHUI_MAXCCH_LONG_DESC.*/
+ 
+     HMODULE   h_module;         /*!< Module which contains the dialog
+                                   resource specified in \a
+                                   dlg_template */
+ 
+     LPWSTR    dlg_template;     /*!< Dialog template for the
+                                   configuration window */
+ 
+     DLGPROC   dlg_proc;         /*!< Dialog procedure */
+ 
+     khm_int32 flags;            /*!< Flags.  Can be a combination of
+                                   ::KHUI_CNFLAG_SORT_CHILDREN and
+                                   ::KHUI_CNFLAG_SUBPANEL*/
+ 
+ } khui_config_node_reg;
+ 
+ /*! \brief Sort the child nodes by short description */
+ #define KHUI_CNFLAG_SORT_CHILDREN 0x0001
+ 
+ /*! \brief Is a subpanel */
+ #define KHUI_CNFLAG_SUBPANEL      0x0002
+ 
+ /*! \brief Node represents a panel that is replicated for all child nodes */
+ #define KHUI_CNFLAG_PLURAL        0x0004
+ 
+ /*! \brief System node
+ 
+     \note For internal use by the NetIDMgr application.  Do not use.
+ */
+ #define KHUI_CNFLAG_SYSTEM        0x0010
+ 
+ #define KHUI_CNFLAG_MODIFIED      0x0100
+ #define KHUI_CNFLAG_APPLIED       0x0200
+ 
+ #define KHUI_CNFLAGMASK_STATIC    0x00ff
+ #define KHUI_CNFLAGMASK_DYNAMIC   0x0f00
+ 
+ /*! \brief Maximum length of the name in characters
+ 
+     The length includes the terminating NULL
+  */
+ #define KHUI_MAXCCH_NAME 256
+ 
+ /*! \brief Maximum length of the name in bytes
+ 
+     The length includes the terminating NULL
+  */
+ #define KHUI_MAXCB_NAME (KHUI_MAXCCH_NAME * sizeof(wchar_t))
+ 
+ /*! \brief Maximum length of the long description in characters
+ 
+     The length includes the terminating NULL
+  */
+ #define KHUI_MAXCCH_LONG_DESC 1024
+ 
+ /*! \brief Maximum length of the long description in bytes
+ 
+     The length includes the terminating NULL
+  */
+ #define KHUI_MAXCB_LONG_DESC (KHUI_MAXCCH_LONG_DESC * sizeof(wchar_t))
+ 
+ /*! \brief Maximum length of the short description in chracters
+ 
+     The length includes the terminating NULL
+  */
+ #define KHUI_MAXCCH_SHORT_DESC 256
+ 
+ /*! \brief Maximum length of the short description in bytes
+ 
+     The length includes the terminating NULL
+  */
+ #define KHUI_MAXCB_SHORT_DESC (KHUI_MAXCCH_SHORT_DESC * sizeof(wchar_t))
+ 
+ /*! \brief Width of a configuration dialog in dialog units
+ 
+     ::CFGDLG_WIDTH and ::CFGDLG_HEIGHT specify the dimensions of a
+     configuration dialog width and height in dialog units.  The dialog
+     will be created as a child of the configuration dialog and placed
+     within it.
+  */
+ #define CFGDLG_WIDTH 255
+ 
+ /*! \brief Height of a configuration dialog in dialog units 
+ 
+     \see ::CFGDLG_WIDTH
+ */
+ #define CFGDLG_HEIGHT 182
+ 
+ /*! \brief Width of a configuration tab dialog in dialog units
+ 
+     ::CFGDLG_TAB_WIDTH and ::CFGDLG_TAB_HEIGHT specify the dimensions
+     (in dialog units) of a dialog that will be placed within a tab
+     control for dialogs where multiple display panels need to be
+     shown.
+  */
+ #define CFGDLG_TAB_WIDTH 235
+ 
+ /*! \brief Height of configuration tab dialog in dialog units
+ 
+     \see ::CFGDLG_TAB_WIDTH
+  */
+ #define CFGDLG_TAB_HEIGHT 151
+ 
+ /*! \brief A handle to a configuration node
+ 
+     \see khui_cfg_open_node(), khui_cfg_close_node()
+ */
+ typedef khm_handle khui_config_node;
+ 
+ /*! \brief Initialization data passed in to a subpanel 
+ 
+     When creating a subpanel, a pointer to the following strucutred
+     will be passed in as the creation parameter for the dialog.
+ */
+ typedef struct tag_khui_config_init_data {
+     khui_config_node ctx_node;  /*!< The node under which the current
+                                   dialog subpanel is being created. */
+ 
+     khui_config_node this_node; /*!< The node which provided the
+                                   registration information for the
+                                   creation of the subpanel. */
+ 
+     khui_config_node ref_node;  /*!< The parent node of the subpanel
+                                   node.  In nodes which have the
+                                   ::KHUI_CNFLAG_PLURAL, this would be
+                                   different from the \a node. This is
+                                   the node under which the subpanel
+                                   was registered. */
+ } khui_config_init_data;
+ 
+ /*! \brief Register a configuration node
+ 
+     The caller fills the registration information in the
+     ::khui_config_node_reg structre.  If the call succeeds, the
+     function will return KHM_ERROR_SUCCESS.
+ 
+     \param[in] parent Parent of the node to be registered.  Set to
+         NULL if the parent is the root node.
+ 
+     \param[in] reg Registration information
+ 
+     \param[out] new_id Receives the new unique identifier of the
+         configuration node.  Pass in NULL if the new identifier is not
+         required.
+ 
+     \retval KHM_ERROR_SUCCESS Success
+     \retval KHM_ERROR_INVALID_PARAM One or more parameters, or fields
+         of reg were invalid
+     \retval KHM_ERROR_DUPLICATE A node with the same name exists as a
+         child of the specified parent node.
+ 
+     \note The name (not the short or long description) of the node can
+         not be the same as the name of a custom action.  See
+         khui_action_create().
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_cfg_register(khui_config_node parent,
+                   const khui_config_node_reg * reg);
+ 
+ /*!\brief Open a configuration node by name
+ 
+     If successful, the \a result parameter will receive a handle to
+     the configuration node.  Use khui_cfg_release() to release
+     the handle.
+ 
+     \param[in] parent Parent node.  Set to NULL to specify root node.
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_cfg_open(khui_config_node parent,
+               const wchar_t * name,
+               khui_config_node * result);
+ 
+ /*! \brief Remove a configuration node
+ 
+     Marks a configuration node as deleted.  Once all the handles,
+     including the handle specified in \a node have been released, it
+     will be deleted.
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_cfg_remove(khui_config_node node);
+ 
+ /*! \brief Hold a handle to a configuration node
+ 
+     Obtains an additional hold on the handle specified by \a node.
+     The hold must be released with a call to \a
+     khui_cfg_release()
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_cfg_hold(khui_config_node node);
+ 
+ /*! \brief Release a handle to a configuration node
+ 
+     \see khui_cfg_hold()
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_cfg_release(khui_config_node node);
+ 
+ /*! \brief Get the parent of a node
+ 
+     Returns a held handle to the parent of the node, or NULL if the
+     current node is a top level node.  The returned handle must be
+     released with khui_cfg_release().
+ 
+     \retval KHM_ERROR_SUCCESS The handle to the parent node is in \a result
+     \retval KHM_ERROR_NOT_FOUND The node is a top level node
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_cfg_get_parent(khui_config_node vnode,
+                     khui_config_node * result);
+ 
+ /*! \brief Get a handle to the first child node
+ 
+     If the call is successful, \a result will receieve a handle to the
+     first child node of the specified node.  The returned handle must
+     be released with a call to khui_cfg_release()
+ 
+     If \a parent does not have any child nodes, the function will
+     return KHM_ERROR_NOT_FOUND and set \a result to NULL.
+ 
+     \param[in] parent Parent node.  Set to NULL to specify root node.
+     \param[out] result Receives a held handle to the first child node.
+ 
+     \see khui_cfg_get_next()
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_cfg_get_first_child(khui_config_node parent,
+                          khui_config_node * result);
+ 
+ /*! \brief Get a handle to the first subpanel
+ 
+     If the call is successful, \a result will receieve a handle to the
+     first subpanel node of the specified node.  The returned handle
+     must be released with a call to khui_cfg_release()
+ 
+     If \a parent does not have any subpanels, the function will return
+     KHM_ERROR_NOT_FOUND and set \a result to NULL.
+ 
+     A subpanel node is a node which has the ::KHUI_CNFLAG_SUBPANEL
+     flag set.
+ 
+     \param[in] parent Parent node.  Set to NULL to specify root node.
+     \param[out] result Receives a held handle to the first subpanel node.
+ 
+     \see khui_cfg_get_next()
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_cfg_get_first_subpanel(khui_config_node vparent,
+                             khui_config_node * result);
+ 
+ /*! \brief Get a handle to the next sibling node
+ 
+     If the call is successful, \a result will receive a held handle to
+     the next sibling node.  The returned handle must be released with
+     a call to khui_cfg_release().
+ 
+     If there are no more sibling nodes, then the function return
+     KHM_ERROR_NOT_FOUND and set \a result to NULL.
+ 
+     This function can be used to traverse a list of child nodes as
+     well as a list of subpanel nodes.
+ 
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_cfg_get_next(khui_config_node node,
+                   khui_config_node * result);
+ 
+ /*! \brief Get a handle to the next sibling node
+ 
+     Similar to khui_cfg_get_next(), but implicitly releases the handle
+     that was supplied.  Equivalent to doing :
+ 
+     \code
+     khui_cfg_get_next(node, &next);
+     khui_cfg_release(node);
+     node = next;
+     \endcode
+ 
+     \param[in,out] node On entry, specifies the node whose sibling
+         needs to be fetched.  On exit, will have either NULL or a held
+         handle to the sibling node.  The handle which was supplied to
+         the function is released.
+ 
+     \retval KHM_ERROR_SUCCESS The next node is now in \a node
+     \retval KHM_ERROR_INVALID_PARAM \a node was not a valid handle
+     \retval KHM_ERROR_NOT_FOUND There are no more siblings.  \a node
+         is set to NULL.
+ 
+     \note Even if there are no more siblings, the handle specified in
+         \a node on entry is released.
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_cfg_get_next_release(khui_config_node * node);
+ 
+ /*! \brief Get the name of a configuration node 
+ 
+     Gets the name (not the short description or the long description)
+     of the given configuration node.
+ */
+ KHMEXP khm_int32 KHMAPI
+ khui_cfg_get_name(khui_config_node node,
+                   wchar_t * buf,
+                   khm_size * cb_buf);
+ 
+ /*! \brief Get registration information for a node
+ 
+     The registration information that is returned is a shallow copy of
+     the data kept by NetIDMgr.  In particular, the strings that will
+     be returned actually point to internal buffers and should not be
+     modified.
+ 
+     No further action is necessary to release the information.
+     However, the returned data ceases to be valid when \a node is
+     released with a call to khui_cfg_release().
+ 
+     \param[in] node Node for which information is requested.  Can be NULL if requesting information about the root node.
+     \param[out] reg Pointer to a ::khui_config_node_reg structure.
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_cfg_get_reg(khui_config_node node,
+                  khui_config_node_reg * reg);
+ 
+ /*! \brief Internal use
+ 
+     This function is used internally by NetIDMgr.  Do not use.
+ */
+ KHMEXP HWND KHMAPI
+ khui_cfg_get_hwnd_inst(khui_config_node node,
+                        khui_config_node noderef);
+ 
+ /*! \brief Internal use
+ 
+     This function is used internally by NetIDMgr.  Do not use.
+ */
+ KHMEXP LPARAM KHMAPI
+ khui_cfg_get_param_inst(khui_config_node node,
+                         khui_config_node noderef);
+ 
+ /*! \brief Internal use
+ 
+     This function is used internally by NetIDMgr.  Do not use.
+ */
+ KHMEXP void KHMAPI
+ khui_cfg_set_hwnd_inst(khui_config_node node, 
+                        khui_config_node noderef,
+                        HWND hwnd);
+ 
+ /*! \brief Internal use
+ 
+     This function is used internally by NetIDMgr.  Do not use.
+ */
+ KHMEXP void KHMAPI
+ khui_cfg_set_param_inst(khui_config_node node, 
+                         khui_config_node noderef,
+                         LPARAM param);
+ 
+ /*! \brief Internal use
+ 
+     This function is used internally by NetIDMgr.  Do not use.
+ */
+ KHMEXP HWND KHMAPI
+ khui_cfg_get_hwnd(khui_config_node node);
+ 
+ /*! \brief Internal use
+ 
+     This function is used internally by NetIDMgr.  Do not use.
+ */
+ KHMEXP LPARAM KHMAPI
+ khui_cfg_get_param(khui_config_node node);
+ 
+ /*! \brief Internal use
+ 
+     This function is used internally by NetIDMgr.  Do not use.
+ */
+ KHMEXP void KHMAPI
+ khui_cfg_set_hwnd(khui_config_node node, HWND hwnd);
+ 
+ /*! \brief Internal use
+ 
+     This function is used internally by NetIDMgr.  Do not use.
+ */
+ KHMEXP void KHMAPI
+ khui_cfg_set_param(khui_config_node node, LPARAM param);
+ 
+ /*! \brief Internal use
+ 
+     This function is used internally by NetIDMgr.  Do not use.
+ */
+ KHMEXP void KHMAPI
+ khui_cfg_clear_params(void);
+ 
+ /*! \brief Internal use
+ 
+     This function is used internally by NetIDMgr.  Do not use.
+ */
+ KHMEXP void KHMAPI
+ khui_cfg_set_configui_handle(HWND hwnd);
+ 
+ /*! \brief Update the state for the specified node
+ 
+     \param[in] node ::khui_config_node handle for the configuration node.
+ 
+     \param[in] flags New flags.  Combination of ::KHUI_CNFLAG_APPLIED and ::KHUI_CNFLAG_MODIFIED
+ 
+     \param[in] mask Valid bits in \a flags
+ 
+     \note Should only be called from within the dialog procedure for
+         the configuration node.
+  */
+ KHMEXP void KHMAPI
+ khui_cfg_set_flags(khui_config_node vnode, khm_int32 flags, khm_int32 mask);
+ 
+ /*! \brief Retrieve the state flags for the configuration node
+ 
+     \see khui_cfg_set_flags()
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_cfg_get_flags(khui_config_node vnode);
+ 
+ /*! \brief Utility function: Initialize dialog box window data
+ 
+     This function initializes the dialog box window data using the
+     ::khui_config_init_data that was passed into the WM_INITDIALOG
+     message.
+ 
+     A new block of memory will be alocated to store the dialog data as
+     well as any extra space specified.  A pointer to this memory block
+     will be stored in the \a DWLP_USER slot in the dialog box.
+ 
+     The allocated block of memory must be freed by a call to
+     khui_cfg_free_dialog_data().  While handling other messages, the
+     dialog data can be retrieved using khui_cfg_get_dialog_data().
+ 
+     \param[in] hwnd_dlg Handle to the dialog box
+ 
+     \param[in] data Pointer to the ::khui_config_init_data that was
+         passed in to WM_INITDIALOG (this is the value of \a lParam)
+ 
+     \param[in] cb_extra Number of extra bytes to allocate, along with
+         the space required to store the contents of
+         ::khui_config_init_data.  The extra space will be initialized
+         to zero.
+ 
+     \param[out] new_data Receives a pointer to the copy of the
+         initialization data that was allocated.  Optional.  Pass in
+         NULL if this value is not required.
+ 
+     \param[out] extra Receives a pointer to the block of extra memory
+         allocated as specified in \a cb_extra.  If \a cb_extra is 0,
+         then this receives a NULL.
+ 
+     \see khui_cfg_get_dialog_data(), khui_cfg_free_dialog_data()
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_cfg_init_dialog_data(HWND hwnd_dlg,
+                           const khui_config_init_data * data,
+                           khm_size cb_extra,
+                           khui_config_init_data ** new_data,
+                           void ** extra);
+ 
+ /*! \brief Utility function: Retrieves dialog data 
+ 
+     Retrieves the dialog data previoulsy stored using
+     khui_cfg_init_dialog_data().
+ 
+     \param[in] hwnd_dlg Handle to the dialog box 
+ 
+     \param[out] data Receives a pointer to the ::khui_config_init_data
+         block.
+     
+     \param[out] extra Receives a pointer to the extra memory
+         allocated. Optional (set to NULL if this value is not needed).
+ */
+ KHMEXP khm_int32 KHMAPI
+ khui_cfg_get_dialog_data(HWND hwnd_dlg,
+                          khui_config_init_data ** data,
+                          void ** extra);
+ 
+ /*! \brief Utility function: Free dialog data
+ 
+     Deallocates the memory allcated in a previous call to
+     khui_cfg_init_dialog_data()
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_cfg_free_dialog_data(HWND hwnd_dlg);
+ 
+ /*! \brief Sets the instance flags for a subpanel
+ 
+     Since there can be more than one subpanel in a configuration
+     panel, they shouldn't modify the flags of the configuration node
+     directly.  Instead, they should call this function to set the
+     instance flags.
+ 
+     The instance flags will be merged with the flags for the
+     configuration node automatically.
+  */
+ KHMEXP void KHMAPI
+ khui_cfg_set_flags_inst(khui_config_init_data * d,
+                         khm_int32 flags,
+                         khm_int32 mask);
+ 
+ /*!@} */
+ /*!@} */
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/khdefs.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/khdefs.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:24 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/khdefs.h	Thu Oct 12 17:42:40 2006
***************
*** 0 ****
--- 1,235 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: khdefs.h,v 1.1.2.2 2006/10/12 21:42:40 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_KHDEFS_H__
+ #define __KHIMAIRA_KHDEFS_H__
+ 
+ /*! \defgroup khdef Core definitions
+ 
+     Key type definitions used throughout NetIDMgr.
+  */
+ /*@{*/
+ #include<stddef.h>
+ #include<limits.h>
+ #include<wchar.h>
+ 
+ /*!\typedef khm_octet
+    \brief A byte (8 bit unsigned)*/
+ 
+ /*!\typedef khm_int16
+    \brief A signed 16 bit quantity */
+ 
+ /*!\typedef khm_ui_2
+    \brief An unsigned 16 bit quantity */
+ 
+ /*!\typedef khm_int32
+    \brief A signed 32 bit quantity */
+ 
+ /*!\typedef khm_ui_4
+    \brief An unsigned 32 bit quantity */
+ 
+ /*!\typedef khm_int64
+    \brief A signed 64 bit quantity */
+ 
+ /*!\typedef khm_ui_8
+    \brief An unsigned 64 bit quantity */
+ 
+ typedef unsigned __int8  khm_octet;
+ 
+ typedef __int16          khm_int16;
+ typedef unsigned __int16 khm_ui_2;
+ 
+ typedef __int32          khm_int32;
+ typedef unsigned __int32 khm_ui_4;
+ 
+ typedef __int64          khm_int64;
+ typedef unsigned __int64 khm_ui_8;
+ 
+ #define VALID_INT_BITS    INT_MAX
+ #define VALID_UINT_BITS   UINT_MAX
+ 
+ #define KHM_UINT32_MAX 4294967295
+ 
+ #define KHM_INT32_MAX  2147483647
+ /* this strange form is necessary since - is a unary operator, not a sign
+    indicator */
+ #define KHM_INT32_MIN  (-KHM_INT32_MAX-1)
+ 
+ #define KHM_UINT16_MAX 65535
+ 
+ #define KHM_INT16_MAX 32767
+ /* this strange form is necessary since - is a unary operator, not a sign
+    indicator */
+ #define KHM_INT16_MIN  (-KHM_INT16_MAX-1)
+ 
+ /*! \brief Generic handle type.
+ 
+     Handles in NetIDMgr are generic pointers.
+ */
+ typedef void * khm_handle;
+ 
+ /*! \brief The invalid handle
+ 
+     Just used to indicate that this handle does not point to anything useful.
+     Usually returned by a function that returns a handle as a signal that the
+     operation failed.
+ */
+ #define KHM_INVALID_HANDLE ((khm_handle) NULL)
+ 
+ /*! \brief Boolean.
+ */
+ typedef khm_int32 khm_boolean;
+ 
+ /*! \brief A size
+  */
+ typedef size_t khm_size;
+ 
+ /*! \typedef ssize_t
+     \brief Signed size specifier
+ 
+     Just a signed version of size_t
+  */
+ 
+ #ifdef  _WIN64
+ typedef __int64    ssize_t;
+ #else
+ typedef _W64 int   ssize_t;
+ #endif
+ 
+ typedef ssize_t khm_ssize;
+ 
+ #if defined(_WIN64)
+ typedef unsigned __int64 khm_wparm;
+ /*TODO: is this enough? */
+ typedef unsigned __int64 khm_lparm;
+ #elif defined(_WIN32)
+ typedef unsigned __int32 khm_wparm;
+ typedef unsigned __int64 khm_lparm;
+ #else
+ #error khm_wparm and khm_lparm need to be defined for this platform
+ #endif
+ 
+ /*!\def KHMAPI 
+    \brief Calling convention for NetIDMgr exported functions
+ 
+    The caling convention for all NetIDMgr exported functions is \b
+    __stdcall , unless otherwise noted.
+  */
+ 
+ /*!\def KHMEXP
+    \brief Export prefix for NetIDMgr exported functions
+ 
+    When compiling source that exports functions, those exported
+    function declarations will be done as follows:
+ 
+    \code
+    __declspec(dllexport) khm_int32 __stdcall function_name(arguments...);
+    \endcode
+ 
+    This eliminates the need for a separate exports definition file.
+    However, it doesn't preserve ordinals, but we aren't guaranteeing
+    that anyway.
+ 
+    On the other hand, if a particular function is going to be imported
+    from a DLL, it should declared as follows:
+ 
+    \code
+    __declspec(dllimport) khm_int32 __stdcall function_name(arguments...);
+    \endcode
+ 
+    This allows the compiler to properly instrument the import. If the
+    function is not declared this way, there will be a stub function
+    generated that will just jump to the proper import, generating
+    redundant instructions and wasting execution time.
+ 
+    This macro encapsulates the proper declaration specifier.
+  */
+ 
+ #ifdef _WIN32
+ #define KHMAPI __stdcall
+ 
+ #define KHMEXP_EXP __declspec(dllexport)
+ #define KHMEXP_IMP __declspec(dllimport)
+ 
+ #define KHMEXP KHMEXP_EXP
+ #endif
+ 
+ /* Generic permission values */
+ /*! \brief Generic read permission or request */
+ #define KHM_PERM_READ       0x100
+ 
+ /*! \brief Generic write permission or request */
+ #define KHM_PERM_WRITE      0x200
+ 
+ /* Generic flags */
+ /*! \brief Generic create request
+ 
+     For most lookup functions, specifying this flag indicates that if
+     the requested object is not found it should be created.
+ */
+ #define KHM_FLAG_CREATE     0x1000
+ 
+ /*! \brief Wrap to DWORD boundary
+ 
+     Returns the smallest integer greater than or equal to the
+     parameter that is a multiple of 4.
+     
+     \note Only use with positive integers. */
+ #define UBOUND32(d) ((((d)-1)&~3) + 4)
+ 
+ /*! \brief Offset a pointer by a number of bytes
+ 
+     Given a pointer, returns a void pointer that is a given number of
+     bytes offset from the pointer.
+  */
+ #define BYTEOFFSET(p,off) ((void *)(((char *) (p)) + (off)))
+ 
+ /*! \brief Check for powers of 2
+ 
+     Return TRUE if the operand is a positive power of 2 or 0*/
+ #define IS_POW2(d) ((d)>=0 && !((d) & ((d) - 1)))
+ 
+ /*! \brief Wrap to upper bound based on start and step size
+ 
+     Return the smallest element in the series <tt>s, s+t, s+2*t,
+     s+3*t, ...</tt> that is greater than or equal to \c v.
+ */
+ #define UBOUNDSS(v,start,step) (((v)<=(start))?(start):(start)+((((v)-((start)+1))/(step))+1)*(step))
+ 
+ /* \brief Length of an array
+ */
+ #define ARRAYLENGTH(x) (sizeof(x)/sizeof(x[0]))
+ 
+ /*! \brief Generic version type*/
+ typedef struct tag_khm_version {
+     khm_ui_2 major;     /*!< Major version number */
+     khm_ui_2 minor;     /*!< Minor version number */
+     khm_ui_2 patch;     /*!< Patch level */
+     khm_ui_2 aux;       /*!< Auxilary level (usually carries a build number) */
+ } khm_version;
+ 
+ /*@}*/
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/kherr.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/kherr.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:24 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/kherr.h	Thu Oct 12 17:42:40 2006
***************
*** 0 ****
--- 1,1094 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: kherr.h,v 1.1.2.2 2006/10/12 21:42:40 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_KHERR_H
+ #define __KHIMAIRA_KHERR_H
+ 
+ /*! \defgroup kherr NetIDMgr Error Reporting
+ 
+     Error reporting functions provide a mechanism to construct
+     meaningful and user friendly error reports for the user.
+ 
+     Unlike most of the other NetIDMgr API's, the error reporting APIs
+     are lightweight and usually do not return an error value.  This is
+     mostly because, these functions are called \b after an error
+     occurs.
+ 
+  @{*/
+ #include<khdefs.h>
+ #include<khlist.h>
+ 
+ /*! \name Customizable macros
+ @{ */
+ #ifndef KHERR_FACILITY
+ /*! \brief The default facility when reporting errors
+ 
+     When including this header file, if the KHERR_FACILITY macro is
+     defined to be a wide character string, then it will be used as the
+     default facility when for the convenience macros.  All of the
+     calls to the convenience macros in the source file would then have
+     that facility.
+ 
+     If left undefined, the convenience macros will leave the facility
+     value undefined.
+  */ 
+ #define KHERR_FACILITY NULL
+ #endif
+ 
+ #ifndef KHERR_FACILITY_ID
+ /*! \brief The default facility ID when reporting errors
+ 
+     When including this header file, if the KHERR_FACILITY_ID macro is
+     defined to be non-zero, then it will be used as the default
+     facility identifier for the convenience macros.  All of the calls
+     to the convenience macros in the source file would then have that
+     facility identifier.
+ 
+     The default value of 0 means that the facility is undefined.
+  */
+ #define KHERR_FACILITY_ID 0
+ #endif
+ 
+ /*! \define KHERR_HMODULE (undefined)
+     \brief The default module handle
+ 
+     When including this header file, if the KHERR_HMODULE macro is
+     defined to be an identifier that holds the module handle, then the
+     convenience macros that specify a module handle will use it.
+ 
+     A default value is not defined for KHERR_HMODULE.  Any attempt to
+     invoke any of the convenience macros that use it should generate a
+     compile time error.
+  */
+ #ifdef _WIN32
+ #ifndef KHERR_HMODULE
+ #endif
+ #endif
+ /*@}*/
+ 
+ /*! \brief Parameter types
+  */
+ enum kherr_parm_types {
+     KEPT_NONE = 0,
+     KEPT_INT32 = 1,
+     KEPT_UINT32,
+     KEPT_INT64,
+     KEPT_UINT64,
+     KEPT_STRINGC,               /*!< String constant */
+     KEPT_STRINGT,               /*!< String.  Will be freed using
+                                   free() when the event is freed */
+     KEPT_PTR                    /*!< Pointer type. */
+ };
+ 
+ 
+ typedef struct tag_kherr_param {
+     khm_octet type;
+     khm_ui_8  data;
+ } kherr_param;
+ 
+ /*! \brief Severity levels
+ 
+     Larger the value, the less severe it is.
+ */
+ enum tag_kherr_severity {
+   KHERR_FATAL = 0,              /*!< Fatal error.*/
+   KHERR_ERROR,                  /*!< Non-fatal error.  We'll probably
+ 				  survive.  See the suggested action. */
+   KHERR_WARNING,                /*!< Warning. Something almost broke
+ 				  or soon will.  See the suggested
+ 				  action. */
+   KHERR_INFO,                   /*!< Informational. Something happened
+                                   that we would like you to know
+                                   about. */
+   KHERR_DEBUG_1 = 64,           /*!< Verbose debug level 1 (high)
+ 				  Events at this severity level are
+ 				  not required to be based on
+ 				  localized strings. */
+   KHERR_DEBUG_2 = 65,           /*!< Verbose debug level 2 (medium)
+ 				  Events at this severity level are
+ 				  not required to be based on
+ 				  localized strings. */
+   KHERR_DEBUG_3 = 66,           /*!< Verbose debug level 3 (low)
+ 				  Events at this severity level are
+ 				  not required to be based on
+ 				  localized strings. */
+   KHERR_RESERVED_BANK = 127,    /*!< Internal use */
+   KHERR_NONE = 128              /*!< Nothing interesting has happened
+                                   so far */
+ };
+ 
+ typedef enum tag_kherr_severity kherr_severity;
+ 
+ /*! \brief Suggestions */
+ enum tag_kherr_suggestion {
+     KHERR_SUGGEST_NONE = 0,     /*!< No suggestions.  */
+     KHERR_SUGGEST_ABORT,        /*!< Abort whatever it was you were
+ 			          trying.  It's not gonna work. */
+     KHERR_SUGGEST_RETRY,        /*!< Retry.  It might work the second
+ 			          or third time over */
+     KHERR_SUGGEST_IGNORE,       /*!< Ignore. It might go away. */
+     KHERR_SUGGEST_INTERACT,     /*!< Further user interaction is
+                                   necessary to resolve the situation.
+                                   The suggest string in the event
+                                   should be prompted to the user. */
+     KHERR_SUGGEST_OTHER,        /*!< Something else. */
+ };
+ 
+ typedef enum tag_kherr_suggestion kherr_suggestion;
+ 
+ /*! \brief An event */
+ typedef struct tag_kherr_event {
+     khm_int32   magic;          /*!< Magic number.  Always set to
+                                   KHERR_EVENT_MAGIC */
+     DWORD       thread_id;      /*!< The thread which reported this
+                                   event. */
+     const wchar_t * short_desc; /*!< Short description or title
+                                    (localized) */
+     const wchar_t * facility;   /*!< Facility name of the reporter
+                                   (not localized) */
+     const wchar_t * location;   /*!< Location.  Usually the function
+ 			          name or such of where the event
+ 			          occured (not localized) */
+     const wchar_t * long_desc;  /*!< A long description of what went
+ 			          wrong (localized, formatted) */
+     const wchar_t * suggestion; /*!< A suggested way to fix it
+ 			          (localized,formatted) */
+ 
+     kherr_severity   severity;  
+                                 /*!< Severity level.  One of the
+ 				  severity levels listed in
+ 				  enumeration ::kherr_severity */
+     khm_int32   facility_id;    /*!< Left to the application to
+ 				  interpret */
+     kherr_suggestion suggestion_id; 
+                                 /*!< One of the suggestion ID's from
+ 				  the enumeration
+ 				  ::kherr_suggestion */
+ 
+     int         flags;          /*!< Flags. */
+ 
+     kherr_param p1;             /*!< Parameter 1 for formatting */
+     kherr_param p2;             /*!< Parameter 2 for formatting */
+     kherr_param p3;             /*!< Parameter 3 for formatting */
+     kherr_param p4;             /*!< Parameter 4 for formatting */
+ 
+     DWORD       time_ticks;     /*!< Time at which event was reported
+                                   (as returned by GetTickCount(). */
+     FILETIME    time_ft;        /*!< Time at which event was reported.
+                                   Current system time as FILETIME. */
+ 
+ #ifdef _WIN32
+     HMODULE     h_module;       /*!< Handle to the module which should
+                                   resolve any unresolved resources
+                                   references above.  */
+ #endif
+ 
+     LDCL(struct tag_kherr_event);
+ } kherr_event;
+ 
+ #define KHERR_EVENT_MAGIC 0x0423e84f
+ 
+ /*! \brief Flags for kherr_event
+ 
+     Each set of flags that define the type of resource for one value
+     is mutually exclusive.
+  */
+ enum kherr_event_flags {
+     KHERR_RF_CSTR_SHORT_DESC= 0x00000000, 
+                                 /*!< Short description is a constant
+                                   string */
+     KHERR_RF_RES_SHORT_DESC = 0x00000001, 
+                                 /*!< Short description is a string
+                                   resource */
+     KHERR_RF_MSG_SHORT_DESC = 0x00000002, 
+                                 /*!< Short description is a message
+                                   resource */
+     KHERR_RF_FREE_SHORT_DESC= 0x00000004, 
+                                 /*!< Short description is an allocated
+                                   string */
+     KHERR_RFMASK_SHORT_DESC = 0x00000007,
+ 
+     KHERR_RF_CSTR_LONG_DESC = 0x00000000, 
+                                 /*!< Long description is a constant
+                                   string */
+     KHERR_RF_RES_LONG_DESC  = 0x00000008, 
+                                 /*!< Long description is a string
+                                   resource */
+     KHERR_RF_MSG_LONG_DESC  = 0x00000010, 
+                                 /*!< Long description is a message
+                                   resouce  */
+     KHERR_RF_FREE_LONG_DESC = 0x00000020, 
+                                 /*!< Long description is an allocated
+                                   string */
+     KHERR_RFMASK_LONG_DESC  = 0x00000038,
+ 
+     KHERR_RF_CSTR_SUGGEST   = 0x00000000, 
+                                 /*!< Suggestion is a constant
+                                   string */
+     KHERR_RF_RES_SUGGEST    = 0x00000040, 
+                                 /*!< Suggestion is a string
+                                   resource */
+     KHERR_RF_MSG_SUGGEST    = 0x00000080, 
+                                 /*!< Suggestion is a message
+                                   resource */
+     KHERR_RF_FREE_SUGGEST   = 0x00000100,  
+                                 /*!< Suggestion is an allocated
+                                   string */
+     KHERR_RFMASK_SUGGEST    = 0x000001C0,
+ 
+     KHERR_RF_STR_RESOLVED   = 0x00010000,
+                                 /*!< The string resources in the event
+                                   have been resolved. */
+     KHERR_RF_CONTEXT_FOLD   = 0x00020000,
+                                 /*!< The event is a representation of
+                                   a folded context. */
+ 
+     KHERR_RF_INERT          = 0x00040000,
+                                 /*!< Inert event.  The event has
+                                   already been dealt with and is no
+                                   longer considered significant. */
+     KHERR_RF_COMMIT         = 0x00080000
+ 				/*!< Committed event.  The commit
+ 				  handlers for this event have already
+ 				  been called. */
+ };
+ 
+ /*! \brief Serial number for error contexts */
+ typedef khm_ui_4 kherr_serial;
+ 
+ /*! \brief An error context
+ */
+ typedef struct tag_kherr_context {
+     khm_int32      magic;       /*!< Magic number. Always set to
+                                   KHERR_CONTEXT_MAGIC */
+ 
+     kherr_serial   serial;      /*!< Context instance serial number.
+                                   Context objects themselves may be
+                                   reused for different contexts as
+                                   they are freed and reallocated.
+                                   However every instance of a context
+                                   is guaranteed to have a unique
+                                   serial number as specified in this
+                                   field.  If an external entity wants
+                                   to keep track of the context, it
+                                   should keep track of the serial
+                                   number as well as the pointer to the
+                                   context object. */
+ 
+     kherr_severity severity;    
+ 				/*!< Severity level.  One of the
+ 				  severity levels listed below. This
+ 				  is the severity level of the context
+ 				  and is the maximum severity level of
+ 				  all the events in the queue of
+ 				  events. */
+ 
+     khm_int32      flags;       /*!< Flags.  Used internally. */
+     khm_ui_4       refcount;    /*!< Reference count. Used
+                                   internally */
+ 
+     kherr_event    *desc_event; /*!< Description event. The event that
+                                   describes the error context.  This
+                                   points to an event that is not in
+                                   the event queue. */
+ 
+     kherr_event    *err_event;  /*!< Significant event.  The last one
+ 				  that caused the severity level to be
+ 				  what it is right now.  This points
+ 				  to an event that is listed in the
+ 				  event queue for this context.*/
+ 
+     khm_ui_4 progress_num;      /*!< Progress numerator */
+     khm_ui_4 progress_denom;    /*!< Progress denominator */
+ 
+     TDCL(struct tag_kherr_context);
+     QDCL(struct tag_kherr_event);
+ } kherr_context;
+ 
+ #define KHERR_CONTEXT_MAGIC 0x34f3238c
+ 
+ enum kherr_context_flags {
+     KHERR_CF_NONE          = 0x00000000,
+                                 /*!< None. */
+ 
+     KHERR_CF_DIRTY         = 0x00000001,
+                                 /*!< Used Internally.  Denotes that
+                                   the err_event and severity may need
+                                   to be recalculated.  Cannot be set
+                                   as an initial flag. */
+ 
+     KHERR_CF_OWN_PROGRESS  = 0x00000002,
+                                 /*!< The context maintains its own
+                                   progress meter as opposed to one
+                                   that is derived from child
+                                   contexts. */
+ 
+     KHERR_CF_UNBOUND       = 0x00000004,
+                                 /*!< Unbound context.  The context
+                                   can't be used to log events.  Call
+                                   kherr_push_context() to associate
+                                   the context with the global context
+                                   hierarchy. Cannot be set as an
+                                   initial flag. */
+ 
+     KHERR_CF_TRANSITIVE    = 0x00000008,
+                                 /*!< Transitive. The context is
+                                   automatically made the current
+                                   context for all other threads that
+                                   handle messages sent or posted by
+                                   threads whose current error context
+                                   is this one. */
+ 
+     KHERR_CFMASK_INITIAL = 0x0000000a,
+                                 /*!< Allowed initial flags */
+ };
+ 
+ /*! \brief Maximum length of a string field in characters including terminating NULL
+  */
+ #define KHERR_MAXCCH_STRING 1024
+ 
+ /*! \brief Maximum length of a string field in bytes including terminating NULL
+  */
+ #define KHERR_MAXCB_STRING (KHERR_MAXCCH_STRING * sizeof(wchar_t))
+ 
+ /*! \brief Context event
+ 
+     \see kherr_add_ctx_handler()
+ */
+ enum kherr_ctx_event {
+     KHERR_CTX_BEGIN  = 0x0001,  /*!< A new context was created */
+     KHERR_CTX_DESCRIBE=0x0002,  /*!< A context was described */
+     KHERR_CTX_END    = 0x0004,  /*!< A context was closed */
+     KHERR_CTX_ERROR  = 0x0008,  /*!< A context switched to an error
+                                   state */
+     KHERR_CTX_EVTCOMMIT = 0x0010 /*!< A event was committed into the
+ 				   context */
+ };
+ 
+ /*! \brief Context event handler
+ 
+     Context event handlers are invoked when specific events occur with
+     respect to an error context.  The ::kherr_ctx_event parameter
+     specifies which event occurred using one of the event values
+     described in the enumeration.  The error context in which this
+     event occurred is specified by the ::kherr_context pointer.
+ 
+     Note that if the handler needs to keep track of the error context
+     for later processing, it also needs to keep track of the \a serial
+     field of the error context.  The same context object may be
+     reused, but the serial number is guaranteed to be unique.
+ 
+     \see kherr_add_ctx_handler()
+  */
+ typedef void (KHMAPI * kherr_ctx_handler)(enum kherr_ctx_event, 
+                                          kherr_context *);
+ 
+ /*! \brief Add a context event handler
+ 
+     An application can register an event handler that gets notified of
+     events that pertain to error contexts.  More than one handler can
+     be registered.  The order in which the handlers are called is
+     undefined for any specific event.
+ 
+     These event occur in the context of individual application
+     threads.  The handler will be called from within the thread that
+     caused the event.  Therefore it is important that the handler is
+     both reentrant and returns quickly.
+ 
+     The events that the handler will be notified of are explained
+     below:
+ 
+     <b>KHERR_CTX_BEGIN</b>: Notification that a new context was
+     created.  A pointer to the context will be supplied to the
+     handler.  The supplied pointer should not be used to obtain a hold
+     on the context, as it will prevent the context from being closed.
+ 
+     <b>KHERR_CTX_DESCRIBE</b>: The thread called
+     kherr_set_desc_event() to set the description of a context.  Once
+     again, the pointer should not be used to obtain a hold on the
+     context.
+ 
+     <b>KHERR_CTX_ERROR</b>: The last event that was reported for the
+     context was an error event (the severity was was equal or higher
+     than KHERR_ERROR).  The pointer may be used to obtain a hold on
+     the context.  However, it is the application's resonsibility to
+     make sure that the hold is released later.  Otherwise the event
+     will never be closed.
+ 
+     <b>KHERR_CTX_END</b>: Closure.  This event is signalled when the
+     last open handle to the context is closed and there is no thread
+     that is currently active which has this context in its error
+     context stack.  At the time the handler is invoked, the context is
+     still intact.  The pointer that is supplied should not be used to
+     obtain a handle on the context.
+ 
+     <b>KHERR_CTX_EVTCOMMIT</b>: An event was committed into the error
+     context.  An event is committed when another event is reported
+     after the event, or if the context is closed.  Since the last
+     event that is reported can still be modified by adding new
+     information, the event remains open until it is no longer the last
+     event or the context is no longer active.  When this notification
+     is received, the last event in the context's event queue is the
+     event that was committed.
+ 
+     \param[in] h Context event handler, of type ::kherr_ctx_handler
+ 
+     \param[in] filter A combination of ::kherr_ctx_event values
+         indication which notifications should be sent to the handler.
+         If a \a filter value of zero is provided, all of the events
+         will be sent to the handler.
+ 
+     \param[in] serial The serial number of the error context that
+         should be tracked.  If this is zero, all error contexts can
+         trigger the handler.
+  */
+ KHMEXP void KHMAPI kherr_add_ctx_handler(kherr_ctx_handler h, 
+                                          khm_int32 filter,
+                                          kherr_serial serial);
+ 
+ /*! \brief Remove a context event handler
+ 
+     Undoes what was done with kherr_add_ctx_handler()
+ 
+     \see kherr_add_ctx_handler()
+  */
+ KHMEXP void KHMAPI kherr_remove_ctx_handler(kherr_ctx_handler h,
+                                             kherr_serial serial);
+ 
+ 
+ /*! \brief Report an error
+ 
+     Creates an event, fills in the details specified in the arguments,
+     and adds it to the current error context.
+ 
+     If the current thread does not have an error context, no reporting
+     happens.  However, if any of the supplied strings or parameters
+     are marked as allocated, they will be freed before the function
+     returns.
+ 
+     Certain parameters that expect strings can instead be given string
+     resources, message resources or allocated strings in addition to
+     constant string.  By default, the parameters are expected to be
+     constant strings.
+ 
+     <b>Allocated strings</b>: The application can allocate memory for
+     a string.  Since the application is not notified when the event is
+     no longer used and freed, it \b must indicate that the string is
+     an allocated string by setting the appropriate flag in the \a
+     flags parameter.  When the event is no longer used, the memory
+     pointed to by the relevant pointer will be freed through a call to
+     free().  Not all string parameters take allocated strings.  See
+     individual parameter documentation for details.
+ 
+     <b>String resources</b>: On WIN32, string resources can be passed
+     in to kherr_report() using the MAKEINTRESOURCE macro.  However,
+     the application \b must specify that the parameter is a string
+     resource using the appropriate flag in the \a flags parameter.
+     The error reporting engine will expand the string against the
+     module handle passed in the \a h_module parameter when the value
+     of the string is required.  Not all string parameters take string
+     resources.  See individual parameter documentation for details.
+     Strings loaded through string resources cannot be longer than
+     ::KHERR_MAXCCH_STRING in characters inclusive of terminating NULL.
+ 
+     <b>Message resources</b>: On WIN32, message resources can be
+     passed in to kherr_report() by specifying the message ID where it
+     ordinarily expects a pointer to a constant string.  The
+     application \b must indicate that the string is a message resource
+     by using the appropriate flag in the \a flags parameter.  When the
+     value of the string is needed, it is expanded against the module
+     handle passed in the \a h_module parameter using the message ID.
+     Not all string parameters take message resources.  See individual
+     parameter documentation for details.  Note that the facility and
+     severity values associated with a message resource are ignored.
+     Strings loaded through message resources cannot be longer than
+     ::KHERR_MAXCCH_STRING in characters inclusive of terminating NULL.
+ 
+     <b>Formatted fields</b>: Parameters that are formatted can have
+     can have parameter inserts like in printf(). However, specifying
+     inserts is different from printf() and follows the conventions
+     used in WIN32 API FormatMessage().  This is because for localized
+     strings, the order of the parameters in the string may be
+     different.  See the documentation for FormatMessage() for details
+     on the format string.  The same set of parameters (i.e. \a p1, \a
+     p2, \a p3, \a p4) is used for all formatted strings with
+     appropriate marshalling for 64 bit types.  The size of the string
+     after expansion must not exceed 65536 bytes inclusive of
+     terminating NULL.
+ 
+     \param[in] severity One of ::kherr_severity_level
+     \param[in] short_desc Short description or title (localized).  Can
+         be a string resource, message resource, allocated string or
+         constant string.  The \a flags parameter should indicate the
+         type of string used.
+     \param[in] facility Facility name of the reporter (not localized)
+     \param[in] location Usually the function name or such of where the
+         event occured (not localized)
+     \param[in] long_desc Long description of event (localized,
+         formatted). Can be a string resource, message resource,
+         allocated string or constant string.  The \a flags parameter
+         should indicate the type of string used.
+     \param[in] suggestion Suggested action to correct situation, if
+         applicable (localized). Can be a string resource, message
+         resource, allocated string or constant string.  The \a flags
+         parameter should indicate the type of string used.
+     \param[in] facility_id Identifier of facility.  Application
+         defined.
+     \param[in] suggestion_id One of the suggestion identifiers from
+         ::kherr_suggestion_ids
+     \param[in] p1 First parameter. Used for formatting.
+     \param[in] p2 Second parameter. Used for formatting.
+     \param[in] p3 Third parameter. Used for formatting.
+     \param[in] p4 Fourth parameter. Used for formatting.
+     \param[in] flags Flags.  See ::kherr_report_flags
+     \param[in] h_module Handle to a module that resolves any string or
+         message resources used for the \a short_description , \a
+         long_desc or \a suggestion parameters.  This parameter is only
+         available on WIN32.
+ 
+     \note With the exception of parameters of type KEPT_STRINGT and
+         parameters which are flagged for freeing using the \a flags
+         parameter, all other string parameters are assumed to be
+         pointers to constant strings.  The strings are not copied and
+         the pointers are used as is.  Also, no clean-up is performed
+         when the event is freed other than that implied by \a flags.
+  */
+ KHMEXP kherr_event * KHMAPI kherr_report(
+     enum kherr_severity severity,
+     const wchar_t * short_desc,
+     const wchar_t * facility,
+     const wchar_t * location,
+     const wchar_t * long_desC,
+     const wchar_t * suggestion,
+     khm_int32 facility_id,
+     enum kherr_suggestion suggestion_id,
+     kherr_param p1,
+     kherr_param p2,
+     kherr_param p3,
+     kherr_param p4,
+     khm_int32 flags
+ #ifdef _WIN32
+     ,HMODULE  h_module
+ #endif
+ );
+ 
+ /*! \brief Report a formatted message
+ 
+     The format string \a long_desc_fmt should be a string constant and
+     the format specifiers follow that of \a sprintf.  This creates an
+     event with the long description set to the expansion of the format
+     string against the arguments.
+  */
+ KHMEXP kherr_event * __cdecl
+ kherr_reportf_ex(enum kherr_severity severity,
+                  const wchar_t * facility,
+                  khm_int32 facility_id,
+ #ifdef _WIN32
+                  HMODULE hModule,
+ #endif
+                  const wchar_t * long_desc_fmt,
+                  ...);
+ #define _reportf_ex kherr_reportf_ex
+ 
+ /*! \brief Report a formatted message
+ 
+     The format string \a long_desc_fmt should be a string constant and
+     the format specifiers follow that of \a sprintf.  This creates an
+     event with the long description set to the expansion of the format
+     string against the arguments.
+  */
+ KHMEXP kherr_event * __cdecl
+ kherr_reportf(const wchar_t * long_desc_fmt,
+               ...);
+ #define _reportf kherr_reportf
+ 
+ /*! \brief Create a parameter out of a transient string
+ 
+     A parameter is created by duplicating the string that is passed
+     into the function.  If the string exceeds KHERR_MAXCCH_STRING,
+     then only the first part of the string that fits within the limit
+     is duplicated.
+ 
+     The resulign ::kherr_param must be passed in to kherr_report().
+     The event logging framework will free the duplicated string once
+     the data is no longer required.
+  */
+ KHMEXP kherr_param kherr_dup_string(const wchar_t * s);
+ 
+ __inline KHMEXP kherr_param
+ kherr_val(khm_octet ptype, khm_ui_8 pvalue) {
+     kherr_param p;
+ 
+     p.type = ptype;
+     p.data = pvalue;
+ 
+     return p;
+ }
+ 
+ #define _int32(i)   kherr_val(KEPT_INT32, (khm_ui_8) i)
+ #define _uint32(ui) kherr_val(KEPT_UINT32, (khm_ui_8) ui)
+ #define _int64(i)   kherr_val(KEPT_INT64, (khm_ui_8) i)
+ #define _uint64(ui) kherr_val(KEPT_UINT64, (khm_ui_8) ui)
+ #define _cstr(cs)   kherr_val(KEPT_STRINGC, (khm_ui_8) cs)
+ #define _tstr(ts)   kherr_val(KEPT_STRINGT, (khm_ui_8) ts)
+ #define _cptr(p)    kherr_val(KEPT_PTR, (khm_ui_8) p)
+ #define _vnull()    kherr_val(KEPT_NONE, 0)
+ #define _dupstr(s)  kherr_dup_string(s)
+ 
+ /* convenience macros for calling kherr_report */
+ #ifdef KHERR_HMODULE
+ 
+ #define _report_cs0(severity, long_description)                 \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (long_description), NULL, KHERR_FACILITY_ID, 0, _vnull(), _vnull(), _vnull(), _vnull(), 0, KHERR_HMODULE)
+ 
+ #define _report_cs1(severity, long_description, p1)             \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (long_description), NULL, KHERR_FACILITY_ID, 0, p1, _vnull(), _vnull(), _vnull(), 0, KHERR_HMODULE)
+ 
+ #define _report_cs2(severity, long_description, p1, p2)         \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (long_description), NULL, KHERR_FACILITY_ID, 0, p1, p2, _vnull(), _vnull(), 0, KHERR_HMODULE)
+ 
+ #define _report_cs3(severity, long_description, p1, p2, p3)     \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (long_description), NULL, KHERR_FACILITY_ID, 0, p1, p2, p3, _vnull(), 0, KHERR_HMODULE)
+ 
+ #define _report_cs4(severity, long_description, p1, p2, p3, p4) \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (long_description), NULL, KHERR_FACILITY_ID, 0, p1, p2, p3, p4, 0, KHERR_HMODULE)
+ 
+ #else
+ 
+ #define _report_cs0(severity, long_description)                 \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (long_description), NULL, KHERR_FACILITY_ID, 0, _vnull(), _vnull(), _vnull(), _vnull(), 0, NULL)
+ 
+ #define _report_cs1(severity, long_description, p1)             \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (long_description), NULL, KHERR_FACILITY_ID, 0, p1, _vnull(), _vnull(), _vnull(), 0, NULL)
+ 
+ #define _report_cs2(severity, long_description, p1, p2)         \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (long_description), NULL, KHERR_FACILITY_ID, 0, p1, p2, _vnull(), _vnull(), 0, NULL)
+ 
+ #define _report_cs3(severity, long_description, p1, p2, p3)     \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (long_description), NULL, KHERR_FACILITY_ID, 0, p1, p2, p3, _vnull(), 0, NULL)
+ 
+ #define _report_cs4(severity, long_description, p1, p2, p3, p4) \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (long_description), NULL, KHERR_FACILITY_ID, 0, p1, p2, p3, p4, 0, NULL)
+ #endif /* !defined(KHERR_HMODULE) */
+ 
+ #ifdef _WIN32
+ #define _report_sr0(severity, long_desc_id)                     \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, MAKEINTRESOURCE(long_desc_id), NULL, KHERR_FACILITY_ID, 0, _vnull(), _vnull(), _vnull(), _vnull(), KHERR_RF_RES_LONG_DESC, KHERR_HMODULE)
+ 
+ #define _report_sr1(severity, long_desc_id, p1)                 \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, MAKEINTRESOURCE(long_desc_id), NULL, KHERR_FACILITY_ID, 0, p1, _vnull(), _vnull(), _vnull(), KHERR_RF_RES_LONG_DESC, KHERR_HMODULE)
+ 
+ #define _report_sr2(severity, long_desc_id, p1, p2)             \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, MAKEINTRESOURCE(long_desc_id), NULL, KHERR_FACILITY_ID, 0, p1, p2, _vnull(), _vnull(), KHERR_RF_RES_LONG_DESC, KHERR_HMODULE)
+ 
+ #define _report_sr3(severity, long_desc_id, p1, p2, p3)         \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, MAKEINTRESOURCE(long_desc_id), NULL, KHERR_FACILITY_ID, 0, p1, p2, p3, _vnull(), KHERR_RF_RES_LONG_DESC, KHERR_HMODULE)
+ 
+ #define _report_sr4(severity, long_desc_id, p1, p2, p3, p4)     \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, MAKEINTRESOURCE(long_desc_id), NULL, KHERR_FACILITY_ID, 0, p1, p2, p3, p4, KHERR_RF_RES_LONG_DESC, KHERR_HMODULE)
+ #endif
+ 
+ #ifdef _WIN32
+ #define _report_mr0(severity, long_desc_msg_id)                     \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (wchar_t *)(long_desc_msg_id), NULL, KHERR_FACILITY_ID, 0, _vnull(), _vnull(), _vnull(), _vnull(), KHERR_RF_MSG_LONG_DESC, KHERR_HMODULE)
+ 
+ #define _report_mr1(severity, long_desc_msg_id, p1)                 \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (wchar_t *)(long_desc_msg_id), NULL, KHERR_FACILITY_ID, 0, p1, _vnull(), _vnull(), _vnull(), KHERR_RF_MSG_LONG_DESC, KHERR_HMODULE)
+ 
+ #define _report_mr2(severity, long_desc_msg_id, p1, p2)             \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (wchar_t *)(long_desc_msg_id), NULL, KHERR_FACILITY_ID, 0, p1, p2, _vnull(), _vnull(), KHERR_RF_MSG_LONG_DESC, KHERR_HMODULE)
+ 
+ #define _report_mr3(severity, long_desc_msg_id, p1, p2, p3)         \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (wchar_t *)(long_desc_msg_id), NULL, KHERR_FACILITY_ID, 0, p1, p2, p3, _vnull(), KHERR_RF_MSG_LONG_DESC, KHERR_HMODULE)
+ 
+ #define _report_mr4(severity, long_desc_msg_id, p1, p2, p3, p4)     \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (wchar_t *)(long_desc_msg_id), NULL, KHERR_FACILITY_ID, 0, p1, p2, p3, p4, KHERR_RF_MSG_LONG_DESC, KHERR_HMODULE)
+ #endif
+ 
+ #define _report_ts0(severity, long_desc_ptr)                     \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (long_desc_ptr), NULL, KHERR_FACILITY_ID, 0, _vnull(), _vnull(), _vnull(), _vnull(), KHERR_RF_FREE_LONG_DESC, NULL)
+ 
+ #define _report_ts1(severity, long_desc_ptr, p1)                 \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (long_desc_ptr), NULL, KHERR_FACILITY_ID, 0, p1, _vnull(), _vnull(), _vnull(), KHERR_RF_FREE_LONG_DESC, NULL)
+ 
+ #define _report_ts2(severity, long_desc_ptr, p1, p2)             \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (long_desc_ptr), NULL, KHERR_FACILITY_ID, 0, p1, p2, _vnull(), _vnull(), KHERR_RF_FREE_LONG_DESC, NULL)
+ 
+ #define _report_ts3(severity, long_desc_ptr, p1, p2, p3)         \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (long_desc_ptr), NULL, KHERR_FACILITY_ID, 0, p1, p2, p3, _vnull(), KHERR_RF_FREE_LONG_DESC, NULL)
+ 
+ #define _report_ts4(severity, long_desc_ptr, p1, p2, p3, p4)     \
+     kherr_report((severity), NULL, KHERR_FACILITY, NULL, (long_desc_ptr), NULL, KHERR_FACILITY_ID, 0, p1, p2, p3, p4, KHERR_RF_FREE_LONG_DESC, NULL)
+ 
+ /*! \brief Set the suggestion and suggestion identifier for the last event
+ 
+     The event that will be modified is the last event reported by the
+     calling thread.
+  */
+ KHMEXP void KHMAPI kherr_suggest(wchar_t * suggestion, khm_int32 suggestion_id, khm_int32 flags);
+ #define _suggest_cs(cs,sid) kherr_suggest((cs), (sid), KHERR_RF_CSTR_SUGGEST)
+ #define _suggest_ts(ts,sid) kherr_suggest((ts), (sid), KHERR_RF_FREE_SUGGEST)
+ #define _suggest_sr(sr,sid) kherr_suggest(MAKEINTRESOURCE(sr), (sid), KHERR_RF_RES_SUGGEST)
+ #define _suggest_mr(mr,sid) kherr_suggest((wchar_t *)(DWORD_PTR)(mr), (sid), KHERR_RF_MSG_SUGGEST)
+ 
+ /*! \brief Set the location string for the last event
+ 
+     The event that will be modified is the last event reported by the
+     calling thread.
+  */
+ KHMEXP void KHMAPI kherr_location(wchar_t * location);
+ #define _location(l) kherr_location(l)
+ 
+ /*! \brief Set the facility string and identifier for the last event
+ 
+     The event that will be modified is the last event reported by the
+     calling thread.
+  */
+ KHMEXP void KHMAPI kherr_facility(wchar_t * facility, khm_int32 facility_id);
+ #define _facility(f,fid) kherr_facility((f),(fid))
+ 
+ /*! \brief Marks the last event as the descriptor event for the current error context
+ 
+     Note that marking an event as the descriptor event has the effect
+     of removing the event from event queue.  The event will henceforth
+     be used as the descriptor for the context.  The only effective
+     fields of a descriptor event are \a short_desc, \a long_desc, \a
+     facility, \a facility_id and the parameters which are used for
+     resolving formatted strings in the aforementioned fields.
+ 
+     Upon calling kherr_set_desc_event(), the event will be
+     automatically evaluated as if kherr_evaluate_event() was called.
+ 
+     The event that will be referenced is the last event reported by
+     the calling thread.
+  */
+ KHMEXP void KHMAPI kherr_set_desc_event(void);
+ #define _describe kherr_set_desc_event
+ 
+ /*! \brief Delete the last event
+ 
+     The event that will be deleted is the last event reported by the
+     calling thread.
+  */
+ KHMEXP void KHMAPI kherr_del_last_event(void);
+ #define _del_event kherr_del_last_event
+ 
+ /*! \brief Create a new context
+ 
+     The created context is not bound to any thread or any context
+     hierarchy.  Hence it cannot be used to capture any events until it
+     is used in a call to kherr_push_context().
+ 
+     Release the returned context pointer with a call to
+     kherr_release_context().
+ 
+     \param[in] flags Initial flags for the context. Combination of
+         ::kherr_context_flags
+ 
+     \note This function is for internal use only.
+  */
+ KHMEXP kherr_context * KHMAPI kherr_create_new_context(khm_int32 flags);
+ 
+ /*! \brief Obtain a hold on a context */
+ KHMEXP void KHMAPI kherr_hold_context(kherr_context * c);
+ 
+ /*! \brief Release a context */
+ KHMEXP void KHMAPI kherr_release_context(kherr_context * c);
+ 
+ /*! \brief Push an empty context
+ 
+     Creates an empty context, adds it as a child of the current
+     thread's error context.  If the current thread does not have an
+     error context, then the created error context will be a root level
+     context.
+ 
+     The new context will be the current error context for the calling
+     thread.
+ 
+     \param[in] flags Initial flags for the context. Combination of
+         ::kherr_context_flags
+ 
+     \see kherr_push_new_context() for more information about thread
+         specific context stacks.
+ 
+  */
+ KHMEXP void KHMAPI kherr_push_new_context(khm_int32 flags);
+ #define _begin_task kherr_push_new_context
+ 
+ /*! \brief Push a context
+ 
+     Each thread has a stack of error contexts.  The topmost one is
+     current.  The thread can push or pop contexts on to the stack
+     independently of the hierarchy of contexts (the only exception, as
+     explained below is when the context that is being pushed is
+     unbound).
+ 
+     If the context being pushed by kherr_push_context() is unbound,
+     then it will be attached to the current context of the thread as a
+     child.  Once the new context is pushed to the top of the stack, it
+     will become the current context for the thread.
+ 
+     The calling thread must call kherr_pop_context() to remove the
+     context from the top of the stack.  Each call to
+     kherr_push_new_context() or kher_push_context() must have a
+     corresponding kherr_pop_context() call.
+ 
+     When the thread terminates, all of the contexts in the thread's
+     context stack will be automatically removed.
+ 
+     \see kherr_pop_context()
+  */
+ KHMEXP void KHMAPI kherr_push_context(kherr_context * c);
+ 
+ /*! \brief Pop a context
+ 
+     Remove the current error context from the thread's context stack.
+     If no other open handles exist to the error context, this causes
+     the error context to collapse into it's parent context or vanish
+     entirely unless the context contains an error.
+ 
+     \see kherr_push_context() for more information about thread
+         specific context stacks.
+  */
+ KHMEXP void KHMAPI kherr_pop_context(void);
+ #define _end_task kherr_pop_context
+ 
+ /*! \brief Retrieve the current error context
+ 
+     The returned pointer must be released with a call to
+     kherr_release_context().
+ */
+ KHMEXP kherr_context * KHMAPI kherr_peek_context(void);
+ 
+ /*! \brief Check if the current error context indicates an error
+ 
+     \return TRUE if there is an error. FALSE otherwise.
+     \see kherr_analyze()
+  */
+ KHMEXP khm_boolean KHMAPI kherr_is_error(void);
+ 
+ /*! \brief Check if an error context indicates an error
+ 
+     \return TRUE if there is an error. FALSE otherwise.
+     \see kherr_analyze()
+  */
+ KHMEXP khm_boolean KHMAPI kherr_is_error_i(kherr_context * c);
+ 
+ /*! \brief Clear the error state of the current context */
+ KHMEXP void KHMAPI kherr_clear_error(void);
+ 
+ /*! \brief Clear the error state of an error context */
+ KHMEXP void KHMAPI kherr_clear_error_i(kherr_context * c);
+ 
+ /*! \brief Set the progress meter of the current error context
+ 
+     Setting \a denom to zero removes the progress meter.
+  */
+ KHMEXP void KHMAPI kherr_set_progress(khm_ui_4 num, khm_ui_4 denom);
+ #define _progress(num,denom) kherr_set_progress((num),(denom))
+ 
+ /*! \brief Get the progress meter of the current error context
+  */
+ KHMEXP void KHMAPI kherr_get_progress(khm_ui_4 * num, khm_ui_4 * denom);
+ 
+ /*! \brief Get the progress meter of an error context
+  */
+ KHMEXP void KHMAPI kherr_get_progress_i(kherr_context * c, khm_ui_4 * num, khm_ui_4 * denom);
+ 
+ /*! \brief Get the first event in a context
+ 
+     The returned pointer is only valid as long as there is a hold on
+     \a c.  Once the context is released with a call to
+     kherr_release_context() all pointers to events in the context
+     become invalid.
+ 
+     In addition, the last event in a context may still be "active".  A
+     thread can still modify the last event as long as the context is
+     active.
+ 
+     \see kherr_get_next_event(), kherr_get_prev_event(),
+     kherr_get_last_event()
+  */
+ KHMEXP kherr_event * KHMAPI kherr_get_first_event(kherr_context * c);
+ 
+ /*! \brief Get the next event
+ 
+     Call kherr_get_first_event() to obtain the first event in a
+     context.  Subsequent calls to kherr_get_next_event() will yield
+     other events in the order in which they were reported.  The list
+     ends when kherr_get_next_event() returns NULL.
+ 
+     The returned pointer is only valid as long as there is a hold on
+     \a c.  Once the context is released with a call to
+     kherr_release_context() all pointers to events in the context
+     become invalid.
+ 
+     In addition, the last event in a context may still be "active".  A
+     thread can still modify the last event as long as the context is
+     active.
+ 
+     \see kherr_get_first_event(), kherr_get_prev_event(),
+     kherr_get_last_event()
+  */
+ KHMEXP kherr_event * KHMAPI kherr_get_next_event(kherr_event * e);
+ 
+ /*! \brief Get the previous event
+ 
+     Returns a pointer to the event that was reported in the context
+     containing \a e prior to \a e being reported.
+ 
+     The returned pointer is only valid as long as there is a hold on
+     the error context.  Once the context is released with a call to
+     kherr_release_context() all pointers to events in the context
+     become invalid.
+ 
+     In addition, the last event in a context may still be "active". A
+     thread can still modify the last event as long as the context is
+     active.
+ 
+     \see kherr_get_first_event(), kherr_get_next_event(),
+     kherr_get_last_event()
+  */
+ KHMEXP kherr_event * KHMAPI kherr_get_prev_event(kherr_event * e);
+ 
+ /*! \brief Get the last event in an error context
+ 
+     Returns a pointer to the last error event that that was reported
+     to the context \a c.
+ 
+     The returned pointer is only valid as long as there is a hold on
+     the error context.  Once the context is released with a call to
+     kherr_release_context(), all pointers to events in the context
+     become invalid.
+ 
+     In addtion, the last event in a context may still be "active".  A
+     thread can still modify the last event as long as the context is
+     active.
+ 
+     \see kherr_get_first_event(), kherr_get_next_event(),
+     kherr_get_prev_event()
+  */
+ KHMEXP kherr_event * KHMAPI kherr_get_last_event(kherr_context * c);
+ 
+ /*! \brief Get the first child context of a context
+ 
+     Contexts are arranged in a hiearchy.  This function returns the
+     first child of an error context.  Use kherr_get_next_context() to
+     obtain the other contexts.  If \a c is \a NULL, this returns the
+     first root level context.
+ 
+     The returned pointer must be released with a call to
+     kherr_release_context()
+  */
+ KHMEXP kherr_context * KHMAPI kherr_get_first_context(kherr_context * c);
+ 
+ /*! \brief Get the next sibling context of a context
+ 
+     The returned pointer must be released with a call to
+     kherr_release_context()
+ 
+     \see kherr_get_first_context()
+  */
+ KHMEXP kherr_context * KHMAPI kherr_get_next_context(kherr_context * c);
+ 
+ /*! \brief Get the desciption event for the context
+ 
+     The description event is the event that was denoted using
+     kherr_set_desc_event() as the event which describes the context.
+ 
+     The returned pointer is only valid as long as there is a hold on
+     \a c.  Once the context is released with a call to
+     kherr_release_context() all pointers to events in the context
+     becomes invalid.
+  */
+ KHMEXP kherr_event * KHMAPI kherr_get_desc_event(kherr_context * c);
+ 
+ /*! \brief Get the error event for the context
+ 
+     The error event for a context is the last event that had the
+     highest severity level.
+ 
+     The returned pointer is only valid as long as there is a hold on
+     \a c.  Once the context is released with a call to
+     kherr_release_context() all pointers to events in the context
+     becomes invalid.
+  */
+ KHMEXP kherr_event * KHMAPI kherr_get_err_event(kherr_context * c);
+ 
+ /*! \brief Evaluate an event
+ 
+     When an event is reported, all the parameters and resource
+     references that were passed to kherr_report() are kept as-is until
+     the actual string values are required by the error reporting
+     library.  However, if the string fields are required before then,
+     an application can call kherr_evaluate_event() to get them.
+ 
+     This function does the following:
+ 
+     - Load any referenced string or message resources that are
+       referenced in the event's short description, long description or
+       suggestion.
+ 
+     - Expand any inserts using the parameters that were passed in.
+ 
+     - Free up allocated strings in for the descriptions or suggestion
+       fields and any parameters.
+ 
+     - Update the string fields in the event to contain the newly
+       generated strings.
+ 
+  */
+ KHMEXP void KHMAPI kherr_evaluate_event(kherr_event * e);
+ 
+ /*! \brief Evaluate the last event
+ 
+     Same as kherr_evaluate_event(), but operates on the last event
+     logged by the current thread.
+ 
+     \see kherr_evaluate_event()
+  */
+ KHMEXP void KHMAPI kherr_evaluate_last_event(void);
+ #define _resolve kherr_evaluate_last_event
+ 
+ /*! \defgroup kherr_fids Standard Facility IDs
+ @{*/
+ #define KHM_FACILITY_KMM       1
+ #define KHM_FACILITY_KCDB      2
+ #define KHM_FACILITY_UI        3
+ #define KHM_FACILITY_KRB5      64
+ #define KHM_FACILITY_KRB4      65
+ #define KHM_FACILITY_AFS       66
+ #define KHM_FACILITY_USER      128
+ /*@}*/
+ 
+ /*@}*/
+ 
+ /* In debug mode, outputs the formatted string to the debug console */
+ #ifdef DEBUG
+ KHMEXP void kherr_debug_printf(wchar_t * fmt, ...);
+ #endif
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/kherror.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/kherror.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/kherror.h	Thu Oct 12 17:42:41 2006
***************
*** 0 ****
--- 1,180 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: kherror.h,v 1.1.2.2 2006/10/12 21:42:41 jaltman Exp $ */
+ 
+ /* Exported */
+ #ifndef __KHIMAIRA_KHERROR_H
+ #define __KHIMAIRA_KHERROR_H
+ 
+ /*! \defgroup kherror NetIDMgr errors
+ 
+ @{*/
+ /*! \brief Base for error codes
+ 
+     NetIDMgr errors range from \a KHM_ERROR_BASE to KHM_ERROR_BASE +
+     KHM_ERROR_RANGE, with the exception of KHM_ERROR_SUCCESS and
+     KHM_ERROR_NONE.
+     */
+ #define KHM_ERROR_BASE 0x40000000L
+ 
+ /*! \brief Range for error codes
+ 
+     NetIDMgr errors range from \a KHM_ERROR_BASE to 
+     KHM_ERROR_BASE + KHM_ERROR_RANGE.
+ */
+ #define KHM_ERROR_RANGE 256L
+ 
+ /*! \defgroup kherror_codes Error codes
+   @{*/
+ 
+ /*! \brief No error */
+ #define KHM_ERROR_NONE 0x00000000L
+ 
+ /*! \brief Success. Same as \a KHM_ERROR_NONE */
+ #define KHM_ERROR_SUCCESS KHM_ERROR_NONE
+ 
+ /*! \brief The supplied name was invalid */
+ #define KHM_ERROR_INVALID_NAME      (KHM_ERROR_BASE + 1)
+ 
+ /*! \brief Too much data
+ 
+     A supplied buffer was invalid, was of insufficient size, or a
+     buffer was of a larger size than expected
+  */
+ #define KHM_ERROR_TOO_LONG          (KHM_ERROR_BASE + 2)
+ 
+ /*! \brief One or more parameters supplied to a function were invalid */
+ #define KHM_ERROR_INVALID_PARAM      (KHM_ERROR_BASE + 3)
+ 
+ /*! \brief A duplicate.
+ 
+     Usually means that something that should have been unique was
+     found to be not.
+  */
+ #define KHM_ERROR_DUPLICATE         (KHM_ERROR_BASE + 4)
+ 
+ /*! \brief An object was not found
+ 
+     An object referenced in a parameter was not found.
+  */
+ #define KHM_ERROR_NOT_FOUND         (KHM_ERROR_BASE + 5)
+ 
+ /*! \brief The relevant subsystem is not ready
+ 
+     Indicates that initialization has not been completed for a
+     subsystem.
+  */
+ #define KHM_ERROR_NOT_READY         (KHM_ERROR_BASE + 6)
+ 
+ /*! \brief No more resources
+ 
+     A limited resource has been exhausted.
+  */
+ #define KHM_ERROR_NO_RESOURCES      (KHM_ERROR_BASE + 7)
+ 
+ /*! \brief Type mismatch
+  */
+ #define KHM_ERROR_TYPE_MISMATCH     (KHM_ERROR_BASE + 8)
+ 
+ /*! \brief Already exists
+ 
+     Usually indicates that an exclusive create operation failed due to
+     the existence of a similar object.  Subtly different from
+     ::KHM_ERROR_DUPLICATE
+  */
+ #define KHM_ERROR_EXISTS            (KHM_ERROR_BASE + 9)
+ 
+ /*! \brief Operation timed out
+  */
+ #define KHM_ERROR_TIMEOUT           (KHM_ERROR_BASE + 10)
+ 
+ /*! \brief An EXIT message was received
+  */
+ #define KHM_ERROR_EXIT              (KHM_ERROR_BASE + 11)
+ 
+ /*! \brief Unknown or unspecified error
+  */
+ #define KHM_ERROR_UNKNOWN           (KHM_ERROR_BASE + 12)
+ 
+ /*! \brief General error
+  */
+ #define KHM_ERROR_GENERAL           KHM_ERROR_UNKNOWN
+ 
+ /*! \brief An index was out of bounds
+  */
+ #define KHM_ERROR_OUT_OF_BOUNDS     (KHM_ERROR_BASE + 13)
+ 
+ /*! \brief Object already deleted
+ 
+     One or more objects that were referenced were found to have been
+     already deleted.
+  */
+ #define KHM_ERROR_DELETED           (KHM_ERROR_BASE + 14)
+ 
+ /*! \brief Invalid operation
+ 
+     The operation was not permitted to continue for some reason.
+     Usually because the necessary conditions for the operation haven't
+     been met yet or the operation can only be performed at certain
+     times during the execution of NetIDMgr.
+  */
+ #define KHM_ERROR_INVALID_OPERATION (KHM_ERROR_BASE + 15)
+ 
+ /*! \brief Signature check failed
+  */
+ #define KHM_ERROR_INVALID_SIGNATURE (KHM_ERROR_BASE + 16)
+ 
+ /*! \brief Not implemented yet
+ 
+     The operation that was attempted involved invoking functionality
+     that has not been implemented yet.
+  */
+ #define KHM_ERROR_NOT_IMPLEMENTED   (KHM_ERROR_BASE + 17)
+ 
+ /*! \brief The objects were equivalent
+  */
+ #define KHM_ERROR_EQUIVALENT        (KHM_ERROR_BASE + 18)
+ 
+ /*! \brief No provider exists to service the request
+ */
+ #define KHM_ERROR_NO_PROVIDER       (KHM_ERROR_BASE + 19)
+ 
+ /*! \brief The operation succeeded, but with errors
+ */
+ #define KHM_ERROR_PARTIAL           (KHM_ERROR_BASE + 20)
+ 
+ /*! \brief An incompatibility was found */
+ #define KHM_ERROR_INCOMPATIBLE      (KHM_ERROR_BASE + 21)
+ 
+ /*@}*/ /*kherror_codes*/
+ 
+ /*! \brief Tests whether a return value indicates success */
+ #define KHM_SUCCEEDED(rv) ((rv)==KHM_ERROR_NONE)
+ 
+ /*! \brief Tests whether a return value indicates failure */
+ #define KHM_FAILED(rv) ((rv)!=KHM_ERROR_NONE)
+ 
+ /*@}*/
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/khhtlink.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/khhtlink.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/khhtlink.h	Thu Oct 12 17:42:41 2006
***************
*** 0 ****
--- 1,58 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: khhtlink.h,v 1.1.2.2 2006/10/12 21:42:41 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_KHHTLINK_H
+ #define __KHIMAIRA_KHHTLINK_H
+ 
+ /*! \addtogroup khui 
+ @{ */
+ 
+ /*! \defgroup khui_hyperlink Hyperlink 
+ @{*/
+ 
+ /*! \brief A hyperlink
+ 
+     When a link in a hypertext window is clicked, this structure is
+     passed along with the message.
+ 
+     The link text fields do to point to NULL terminated strings.
+     Instead, the length fields should be used to extract the string.
+  */
+ typedef struct tag_khui_htwnd_link {
+     RECT r;
+     wchar_t * id;
+     int id_len;
+     wchar_t * param;
+     int param_len;
+ } khui_htwnd_link;
+ 
+ #define KHUI_MAXCCH_HTLINK_FIELD 256
+ #define KHUI_MAXCB_HTLINK_FIELD (KHUI_MAXCCH_HTLINK_FIELD * sizeof(wchar_t))
+ 
+ /*!@}*/
+ /*!@}*/
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/khlist.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/khlist.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/khlist.h	Thu Oct 12 17:42:41 2006
***************
*** 0 ****
--- 1,173 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: khlist.h,v 1.1.2.2 2006/10/12 21:42:41 jaltman Exp $ */
+ 
+ /* Not exported */
+ #ifndef _KHIMAIRA_KHLIST_H
+ #define _KHIMAIRA_KHLIST_H
+ 
+ /* Note that most of these are "unsafe" macros.  Not for general use */
+ 
+ /* LIFO lists */
+ #define LDCL(type)                              \
+     type * next;                                \
+     type * prev
+ 
+ #define LINIT(pe)                               \
+     do {                                        \
+     (pe)->next = NULL;                          \
+     (pe)->prev = NULL; } while(0)
+ 
+ #define LPUSH(pph,pe)                           \
+     do {                                        \
+     (pe)->next = *pph;                          \
+     (pe)->prev = NULL;                          \
+     if(*(pph)) (*(pph))->prev = (pe);           \
+     (*(pph)) = (pe); } while(0)
+ 
+ #define LPOP(pph,ppe)                           \
+     do {                                        \
+     *(ppe) = *(pph);                            \
+     if(*(pph)) *(pph) = (*(pph))->next;         \
+     if(*(pph)) (*(pph))->prev = NULL;           \
+     if(*(ppe)) (*(ppe))->next = NULL;           \
+     } while(0)
+ 
+ #define LDELETE(pph,pe)                                 \
+     do {                                                \
+     if((pe)->prev) (pe)->prev->next = (pe)->next;       \
+     if((pe)->next) (pe)->next->prev = (pe)->prev;       \
+     if(*(pph) == (pe)) *(pph) = (pe)->next;             \
+     (pe)->next = (pe)->prev = NULL;                     \
+     } while(0)
+ 
+ #define LEMPTY(pph) (*(pph) == NULL)
+ 
+ #define LNEXT(pe) ((pe)?(pe)->next:NULL)
+ 
+ #define LPREV(pe) ((pe)?(pe)->prev:NULL)
+ 
+ /* Trees with LIFO child lists */
+ #define TDCL(type)                              \
+     LDCL(type);                                 \
+     type * children;                            \
+     type * parent
+ 
+ #define TINIT(pe)                               \
+     do {                                        \
+     (pe)->children = NULL;                      \
+     (pe)->parent = NULL; } while(0)
+ 
+ #define TADDCHILD(pt,pe)                        \
+     do {                                        \
+     LPUSH(&((pt)->children),(pe));              \
+     (pe)->parent = (pt); } while(0)
+ 
+ #define TFIRSTCHILD(pt) ((pt)?(pt)->children:NULL)
+ 
+ #define TPOPCHILD(pt, ppe)                      \
+     do {                                        \
+     LPOP(&((pt)->children), ppe);               \
+     if(*(ppe)) (*(ppe))->parent = NULL;         \
+     } while(0)
+ 
+ #define TDELCHILD(pt, pe)                       \
+     do {                                        \
+     LDELETE(&((pt)->children), (pe));           \
+     (pe)->parent = NULL; } while(0)
+ 
+ #define TPARENT(pe) ((pe)?(pe)->parent:NULL)
+ 
+ /* FIFO lists */
+ #define QDCL(type)                              \
+     type * head;                                \
+     type * tail
+ 
+ #define QINIT(pq)                               \
+     do {                                        \
+     (pq)->head = (pq)->tail = NULL;             \
+     } while(0)
+ 
+ #define QPUT(pq, pe)                            \
+     do {                                        \
+     LPUSH(&(pq)->tail, (pe));                   \
+     if(!(pq)->head) (pq)->head = (pe);          \
+     } while(0)
+ 
+ #define QGET(pq, ppe)                                           \
+     do {                                                        \
+     *(ppe) = (pq)->head;                                        \
+     if(*(ppe)) {                                                \
+         (pq)->head = (*(ppe))->prev;                            \
+         if( (*(ppe))->prev ) (*(ppe))->prev->next = NULL;       \
+         (*(ppe))->prev = NULL;                                  \
+         if( (pq)->tail == *(ppe)) (pq)->tail = NULL;            \
+     }                                                           \
+     } while(0)
+ 
+ #define QDEL(pq, pe)                                    \
+     do {                                                \
+         if((pq)->head == (pe)) (pq)->head = LPREV(pe);  \
+         LDELETE(&((pq)->tail), (pe));                   \
+     } while(0)
+ 
+ 
+ #define QGETT(pq,ppe)                                           \
+     do {                                                        \
+     *(ppe) = (pq)->tail;                                        \
+     if(*(ppe)) {                                                \
+         (pq)->tail = (*(ppe))->next;                            \
+         if( (*(ppe))->next ) (*(ppe))->next->prev = NULL;       \
+         (*(ppe))->next = NULL;                                  \
+         if( (pq)->head == *(ppe)) (pq)->head = NULL;            \
+     }                                                           \
+     } while(0)
+ 
+ #define QTOP(pq) ((pq)->head)
+ #define QBOTTOM(pq) ((pq)->tail)
+ #define QNEXT(pe) ((pe)->prev)
+ #define QPREV(pe) ((pe)->next)
+ 
+ /* Trees with FIFO child lists */
+ #define TQDCL(type)                             \
+     LDCL(type);                                 \
+     QDCL(type);                                 \
+     type * parent
+ 
+ #define TQINIT(pe)                              \
+     do {                                        \
+     QINIT(pe);                                  \
+     (pe)->parent = NULL; } while(0)
+ 
+ #define TQADDCHILD(pt,pe)                       \
+     do {                                        \
+     QPUT((pt), (pe));                           \
+     (pe)->parent = (pt); } while(0)
+ 
+ #define TQFIRSTCHILD(pt) ((pt)?QTOP(pt):NULL)
+ 
+ #define TQPARENT(pe) ((pe)?(pe)->parent:NULL)
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/khmsgtypes.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/khmsgtypes.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/khmsgtypes.h	Thu Oct 12 17:42:41 2006
***************
*** 0 ****
--- 1,800 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: khmsgtypes.h,v 1.1.2.2 2006/10/12 21:42:41 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_KHMSGTYPES_H
+ #define __KHIMAIRA_KHMSGTYPES_H
+ 
+ /*! \addtogroup kmq
+ @{*/
+ /*! \defgroup kmq_msg Message Types
+ @{*/
+ 
+ /*! \name Global message types
+ @{*/
+ 
+ /*! \brief System messages.
+ 
+     All subscribers are subscribed to the system message class by default.
+ 
+     \see \ref kmq_msg_system
+ */
+ #define KMSG_SYSTEM     0
+ 
+ /*! \brief Ad-hoc messages.
+ 
+     These are messages that are sent through add hoc publishers and
+     subscribers.
+ */
+ #define KMSG_ADHOC      1
+ 
+ /*! \brief NetIDMgr Credentials Database messages
+ 
+     These messages notify subscribers of events related to the
+     credentials database, such as the registration, unregistration and
+     modification of identities, attributes, attribute types and
+     credential types.  It also provides notifications of changes to
+     the root crednetial set.
+ 
+     \see \ref kmq_msg_kcdb
+ */
+ #define KMSG_KCDB       2
+ 
+ /*! \brief NetIDMgr Module Manager messages
+  
+     \see \ref kmq_msg_kmm
+ */
+ #define KMSG_KMM        3
+ 
+ /*! \brief NetIDMgr Credential messages
+ 
+     Notifications of crednetial events.  These are the most important
+     events that a credentials provider should respond to.  The
+     notifications provide co-oridination between credential providers
+     for performing basic credentials management tasks such as
+     obtaining new credentials for an identity, deleting credentials
+     for an identity, obtaining or deleting credentials of a particular
+     type for an identity etc.
+ 
+     \see \ref cred_msgs
+     \see \ref kmq_msg_cred
+  */
+ #define KMSG_CRED       4
+ 
+ /*! \brief Action list messages
+ 
+     Notifications of changes in action state and firing of custom
+     actions.
+ 
+     \see \ref kmq_msg_act
+  */
+ #define KMSG_ACT        5
+ 
+ /*! \brief Alert messages
+ 
+     Notifier is the component which displays alerts and error messages
+     when the NetIDMgr window is normally in operation and which
+     displays balloon prompts when the window is minimized to alert the
+     user to important messages such as credentials expiring etc.
+ 
+     \note This is an internal message class.  Components that are not
+         the notifier should not be subscribing to alert messages.
+ 
+     \see \ref kmq_msg_alert
+  */
+ #define KMSG_ALERT      6
+ 
+ /*! \brief Identity messages
+ 
+     These are messages that are sent to the identity provider.  These
+     are generally dispatched through a specific subscription object
+     and are not broadcast.
+ 
+     \see \ref kmq_msg_ident
+  */
+ #define KMSG_IDENT      7
+ 
+ /*! \brief Base message type ID for customized message types
+  */
+ #define KMSGBASE_USER   16
+ 
+ /*@}*/
+ 
+ /*! \defgroup kmq_msg_system KMSG_SYSTEM subtypes 
+ @{*/
+ /*! \brief Generic initialization message
+ 
+     This message is used by specific components to signal that the
+     recipient is to perform initialization tasks.  As a convention,
+     the recipient should return KHM_ERROR_SUCCESS if it successfully
+     performed the initlization tasks or some other value if it failed
+     to do so.  Failure to successfully initialize is usually taken to
+     mean that the recipient component is not able to perform its
+     function.
+ 
+     Usually this is the first message to be received by the recipient.
+ 
+     \see \ref pi_pt_cred_init
+  */
+ #define KMSG_SYSTEM_INIT    1
+ 
+ /*! \brief Generic uninitialization message
+ 
+     Used by specific components to signal that the recipient should
+     perform uninitilization tasks in preparation of termination.  The
+     return value of this message is not used.
+ 
+     Usually this is the last message to be received by the recipient.
+ 
+     \see \ref pi_pt_cred_exit
+  */
+ #define KMSG_SYSTEM_EXIT    2
+ 
+ /*! \brief Message completion
+ 
+     This is an internal message
+  */
+ #define KMSG_SYSTEM_COMPLETION 3
+ /*@}*/
+ 
+ /*! \defgroup kmq_msg_kcdb KMSG_KCDB subtypes 
+ @{*/
+ #define KMSG_KCDB_IDENT     1
+ #define KMSG_KCDB_CREDTYPE  2
+ #define KMSG_KCDB_ATTRIB    3
+ #define KMSG_KCDB_TYPE      4
+ 
+ /*! \brief Generic credentials request
+ 
+     \see ::kcdb_cred_request for more information
+  */
+ #define KMSG_KCDB_REQUEST   256
+ /*@}*/
+ 
+ /*! \defgroup kmq_msg_kmm KMSG_KMM subtypes
+ @{*/
+ #define KMSG_KMM_I_REG      1
+ 
+ #define KMSG_KMM_I_DONE     2
+ /*@}*/
+ 
+ /*! \defgroup kmq_msg_act KMSG_ACT subtypes
+   @{*/
+ 
+ /*! \brief One or more actions changed state
+ 
+     This message is sent in response to a call to
+     khui_enable_actions() or khui_enable_action() and indicates that
+     one or more actions have changed their state.
+  */
+ #define KMSG_ACT_ENABLE     1
+ 
+ /*! \brief One or more actions changed check state
+ 
+     Sent in response to khui_check_radio_action() or
+     khui_check_action() and indicates that one or more actions have
+     either been checked or unchecked.
+  */
+ #define KMSG_ACT_CHECK      2
+ 
+ /*! \brief Refresh action states
+ 
+     Sent after a batch of modifications were made to action states.
+  */
+ #define KMSG_ACT_REFRESH    3
+ 
+ /*! \brief A new action was created
+ 
+     Sent when a new custom action was created.  The \a uparam
+     parameter of the message contains the identifier of the newly
+     created action.
+ */
+ #define KMSG_ACT_NEW        4
+ 
+ /*! \brief A custom action was deleted
+ 
+     Sent after a custom action is deleted.  The \a uparam parameter of
+     the message contains the identifier of the deleted action.
+  */
+ #define KMSG_ACT_DELETE     5
+ 
+ /*! \brief A custom action has been activated
+ 
+     When a custom action is activated, then the listener of that
+     custom action receives this message.  Note that only the listener
+     for that custom action will receive this notification.
+ 
+     \a uparam of the message is set to the identifier of the custom
+     action.
+  */
+ #define KMSG_ACT_ACTIVATE   6
+ 
+ /*! \brief Internal */
+ #define KMSG_ACT_BEGIN_CMDLINE 128
+ 
+ /*! \brief Internal */
+ #define KMSG_ACT_CONTINUE_CMDLINE 129
+ 
+ /*! \brief Internal */
+ #define KMSG_ACT_SYNC_CFG 130
+ 
+ /*@}*/
+ 
+ /*! \defgroup kmq_msg_cred KMSG_CRED subtypes
+   @{*/
+ /*! \brief Root credential set changed
+     
+     This message is issued when the root credential set successfully
+     collected credentials from another credential set.
+ 
+     \a uparam of the message is set to a bitmask indicating the change
+     that occured.  It is a combination of ::KCDB_DELTA_ADD,
+     ::KCDB_DELTA_DEL and ::KCDB_DELTA_MODIFY.
+  */
+ #define KMSG_CRED_ROOTDELTA 1
+ 
+ /*! \brief Re-enumerate credentials
+ 
+     A notice to all credential providers to re-enumerate their
+     respective credentials.
+ 
+     \note May be sent to individual credential subscriptions.
+  */
+ #define KMSG_CRED_REFRESH   2
+ 
+ /*! \brief Change the password
+ 
+     This message notifies credentials providers that a password change
+     request has been received.
+ 
+     A plug-in handling this message that wishes to participate in the
+     password change operation is expected to add a
+     ::khui_new_creds_by_type to the list of participants in the
+     ::khui_new_creds structure by calling khui_cw_add_type().
+ 
+     The password change operation requires user interaction.  Any
+     plug-ins that are participating in the operation need to provide a
+     user-interface.
+ 
+     Message parameters:
+     - \b vparam : pointer to a ::khui_new_creds structure
+ 
+     \see khui_cw_add_type(), ::khui_new_creds, ::khui_new_creds_by_type
+  */
+ #define KMSG_CRED_PASSWORD  16
+ 
+ /*! \brief Initiate the process of obtaining new credentials
+ 
+     The UI sends this message to start the process of obtaining new
+     credentials.  See \ref cred_acq for more information about
+     handling this message.
+ 
+     A plug-in handling this message that wishes to participate in the
+     new credentials acquisition operation is expected to add a
+     ::khui_new_creds_by_type to hte list of participants in the
+     ::khui_new_creds structure by calling khui_cw_add_type().
+ 
+     Message parameters:
+     - \b vparam : pointer to a ::khui_new_creds structure
+ 
+     \see \ref cred_acq, khui_cw_add_type(), ::khui_new_creds,
+     ::khui_new_creds_by_type
+  */
+ #define KMSG_CRED_NEW_CREDS 17
+ 
+ /*! \brief Renew credentials
+ 
+     This is a notification sent to individual credentials providers
+     that a specified identity's credentials should be renewed.
+ 
+     A plug-in handling this message that wishes to participate in the
+     renew credentials operation is expected to add a
+     ::khui_new_creds_by_type to the list of participants in the
+     ::khui_new_creds structure by calling khui_cw_add_type().
+ 
+     Message parameters:
+     - \b vparam : Pointer to a khui_new_creds object
+ 
+     \see khui_cw_add_type(), ::khui_new_creds,
+     ::khui_new_creds_by_type
+  */
+ #define KMSG_CRED_RENEW_CREDS       18
+ 
+ /*! \brief Dialog setup
+ 
+     Once ::KMSG_CRED_NEW_CREDS has been responded to by all the
+     credential types, the UI creates the dialog windows using the data
+     supplied in the ::khui_new_creds_by_type structures and issues
+     this message.  Each credentials provider is expected to respond by
+     finalizing dialog creation operations.
+ 
+     Message parameters:
+     - \b vparam : poitner to a ::khui_new_creds structure
+ 
+     \note May be sent to individual credential subscriptions.
+  */
+ #define KMSG_CRED_DIALOG_SETUP      19
+ 
+ /*! \brief Dialog pre-start
+ 
+     Sent after all the credentials providers have responded to
+     ::KMSG_CRED_DIALOG_SETUP and all the initialization has been
+     completed.  Credentials providers are expected to respond to this
+     message by loading any default data into the dialog controls for
+     each credential type.
+ 
+     Message parameters:
+     - \b vparam : pointer to a ::khui_new_creds structure
+ 
+     \note May be sent to individual credential subscriptions.
+  */
+ #define KMSG_CRED_DIALOG_PRESTART   20
+ 
+ /*! \brief Dialog start
+ 
+     A notification that the dialog is now in progress.
+ 
+     Message parameters:
+     - \b vparam : pointer to a ::khui_new_creds structure
+ 
+     \note May be sent to individual credential subscriptions.
+  */
+ #define KMSG_CRED_DIALOG_START      21
+ 
+ /*! \brief The primary identity of the new credentials dialog has changed
+ 
+     This message is not sent out by the UI, but is reserved here for
+     use by individual credentials providers.  The message may be sent
+     from the dialog procedure to the plugin.
+ 
+     Message parameters:
+     - \b vparam : pointer to a ::khui_new_creds structure
+ 
+     \note Be careful when sending this message.  All messages that are
+         not sent by the system should not be sent via broadcast.
+         Instead, create a subscription using kmq_create_subscription()
+         for the individual plugin that you want to send the message
+         and use one of the per-subscription message functions to send
+         the actual message.
+  */
+ #define KMSG_CRED_DIALOG_NEW_IDENTITY 22
+ 
+ /*! \brief New credentials options have changed.
+ 
+     This message is not sent out by the UI, but is reserved here for
+     use by individual credentials providers.  The message may be sent
+     from the dialog procedure to the plugin.
+ 
+     Message parameters:
+     - \b vparam : pointer to a ::khui_new_creds structure
+ 
+     \note Be careful when sending this message.  All messages that are
+         not sent by the system should not be sent via broadcast.
+         Instead, create a subscription using kmq_create_subscription()
+         for the individual plugin that you want to send the message
+         and use one of the per-subscription message functions to send
+         the actual message.
+  */
+ #define KMSG_CRED_DIALOG_NEW_OPTIONS  23
+ 
+ /*! \brief Process dialog
+ 
+     Sent to all the credential providers to look at the contents of
+     the given ::khui_new_creds structure and do any required
+     processing.
+ 
+     If the \a result field in the structure is set to
+     ::KHUI_NC_RESULT_PROCESS, then new credentials should be
+     obtained using the given data.
+ 
+     Set the \a response field in the structure to indicate how the UI
+     should proceed from here.
+ 
+     Message parameters:
+     - \b vparam : pointer to a ::khui_new_creds structure
+ 
+     \note May be sent to individual credential subscriptions.
+  */
+ #define KMSG_CRED_PROCESS             24
+ 
+ /*! \brief End a credentials acquisition operation
+ 
+     A notification that the credentials acquisition operation has
+     ended.
+ 
+     Message parameters:
+     - \b vparam : pointer to a ::khui_new_creds structure
+ 
+     \note May be sent to individual credential subscriptions.
+  */
+ #define KMSG_CRED_END                 25
+ 
+ /*! \brief Import credentials from the operating system
+ 
+     Notification to all credentials providers to import any available
+     credentials from the operating system.
+ 
+     Message parameters:
+     - This message does not have any parameters
+ */
+ #define KMSG_CRED_IMPORT              26
+ 
+ /*! \brief Destroy credentials
+ 
+     Notification that the specified credentials should be destroyed.
+     Once this message has completed processing a ::KMSG_CRED_REFRESH
+     message will be issued.
+ 
+     The credentials that should be destroyed are specified by a
+     ::khui_action_context structure.  The context that should be used
+     is the selection context.  Hence, the credentials that must be
+     destroyed are the ones lised in the credential set (\a credset).
+ 
+     Message parameters:
+ 
+     - \b upram : Unused. Zero.
+ 
+     - \b vparam : pointer to a ::khui_action_context structure which
+       describes which credentials need to be destroyed.
+ 
+  */
+ #define KMSG_CRED_DESTROY_CREDS     32
+ 
+ #if 0
+ /*! \brief Parse an identity
+ 
+     \note May be sent to individual credential subscriptions.
+  */
+ #define KMSG_CRED_IDENT_PARSE       65
+ #endif
+ 
+ /*! \brief A property page is being launced
+ 
+     Message parameters:
+     - \b vparam : pointer to a ::khui_property_sheet structure
+  */
+ #define KMSG_CRED_PP_BEGIN          128
+ 
+ /*! \brief A property page is about to be created
+ 
+     Message parameters:
+     - \b vparam : pointer to a ::khui_property_sheet structure
+ 
+     \note This message is merely a notification that the property
+         sheet is being created.  Handlers should not modify the state
+         of the property sheet or pages at this time.
+  */
+ #define KMSG_CRED_PP_PRECREATE      129
+ 
+ /*! \brief A property page has finished processing
+ 
+     Message parameters:
+     - \b vparam : pointer to a ::khui_property_sheet structure
+  */
+ #define KMSG_CRED_PP_END            130
+ 
+ /*! \brief A property page has been destroyed
+ 
+     Message parameters:
+     - \b vparam : pointer to a ::khui_property_sheet structure
+  */
+ #define KMSG_CRED_PP_DESTROY        131
+ 
+ /*! \brief An IP address change occurred
+ 
+     There are no parameters for this message.  The NetIDMgr
+     application handles this message and depending on configuration,
+     posts message for the individual credentials providers to either
+     obtain new credentials or renew old ones.
+  */
+ #define KMSG_CRED_ADDR_CHANGE        140
+ 
+ /*! \brief Check if a KMSG_CRED subtype is a credentials acquisition message
+ 
+     Dialog messages are those that deal with the new or initial
+     credentials acquisition dialog, from initial announcement to
+     dialog completion.
+ 
+     Currently, the dialog messages are:
+     - ::KMSG_CRED_NEW_CREDS
+     - ::KMSG_CRED_RENEW_CREDS
+     - ::KMSG_CRED_DIALOG_SETUP
+     - ::KMSG_CRED_DIALOG_PRESTART
+     - ::KMSG_CRED_DIALOG_START
+     - ::KMSG_CRED_DIALOG_NEW_IDENTITY
+     - ::KMSG_CRED_DIALOG_NEW_OPTIONS
+     - ::KMSG_CRED_PROCESS
+     - ::KMSG_CRED_END
+ 
+     All dialog message numbers are allocated in a contigous block.
+ 
+     Note that while ::KMSG_CRED_PROCESS and ::KMSG_CRED_END are not
+     specific to dialogs, they are still included in this predicate
+     because they are also part of the dialog message sequence.
+  */
+ #define IS_CRED_ACQ_MSG(msg) ((msg) >= 16 && (msg) <=31)
+ 
+ /*@}*/ /* /KMSG_CRED subtypes */ 
+ 
+ /*! \defgroup kmq_msg_alert KMSG_ALERT Subtypes 
+   @{*/
+ 
+ /*! \brief Show an alert
+ 
+     Message parameters:
+     - \b vparam : held pointer to a ::khui_alert object
+ 
+     \note The ::khui_alert object will be released when the processing
+         of this message completes.
+  */
+ #define KMSG_ALERT_SHOW 1
+ 
+ /*! \brief Add an alert to the alert queue
+ 
+     Message parameters:
+     - \b vparam : held pointer to a ::khui_alert object
+ 
+     \note the ::khui_alert object will be released when the queued
+         messages are displayed.
+  */
+ #define KMSG_ALERT_QUEUE 2
+ 
+ /*! \brief Show the next queued alert
+ 
+     There are no message parameters
+  */
+ #define KMSG_ALERT_SHOW_QUEUED 3
+ 
+ /*! \brief Check if there are any queued messages and, if so, update the statusbar
+ 
+     There are no message parameters
+  */
+ #define KMSG_ALERT_CHECK_QUEUE 4
+ 
+ /*! \brief Show a modal alert
+ 
+     Message parameters:
+     - \b vparam : held pointer to a ::khui_alert object.
+ 
+     \note the ::khui_alert object will be released when the queued
+         messages are displayed.
+  */
+ #define KMSG_ALERT_SHOW_MODAL 5
+ 
+ /*@}*/
+ 
+ /*! \defgroup kmq_msg_ident KMSG_IDENT Subtypes
+   @{*/
+ 
+ /*! \brief Initialize and start the identity provider
+ 
+ 
+     Sent by the KCDB to notify the identity provider that it is now
+     the current identity provider.
+ 
+     Note that unlike regular plugins, an identity provider can be
+     loaded and inert (not provide any services).  Also, the user may
+     switch between multiple identity providers on the fly.
+  */
+ #define KMSG_IDENT_INIT                 1
+ 
+ /*! \brief Stop the identity provider
+ 
+     Sent by the KCDB as notificaton that the identity provider is no
+     longer the current provider.
+  */
+ #define KMSG_IDENT_EXIT                 2
+ 
+ /*! \brief Check if an identity name is valid
+ 
+     This message is sent to the identity provider to verify the syntax
+     of an identity name.  Note that only the syntax of the name is to
+     be verfied and not the actual physical existence of said identity.
+ 
+     Message parameters:
+ 
+     - \b vparam : pointer to ::kcdb_ident_name_xfer object.  The
+         name to be validated will be in the \a name_src member.  The
+         buffer will be NULL terminated with a maximum limit of
+         KCDB_IDENT_MAXCCH_NAME characters including the terminating
+         NULL, consisting only of characters in KCDB_IDENT_VALID_CHARS
+         The \a result member should be set to one of the following
+         depending on the result of the validation:
+ 
+         - KHM_ERROR_SUCCESS : The name was valid
+         - KHM_ERROR_INVALID_NAME : The name was invalid
+  */
+ #define KMSG_IDENT_VALIDATE_NAME        3
+ 
+ /*! \brief Check if an identity is valid
+ 
+     Sent to the identity provider to verify the validity of the given
+     identity.  The provider should verify that the identity exists and
+     is in a state where it can be actively used.
+ 
+     Depending on the result of the validation, the flags of the
+     identity should be updated.
+ 
+     Message parameters:
+     - \b vparam : Handle to an identity cast as a void pointer.
+  */
+ #define KMSG_IDENT_VALIDATE_IDENTITY    4
+ 
+ /*! \brief Canonicalize identity name
+ 
+     The identity provider will be given a name, which it should put in
+     canonical form, adjusting case and any character replacement or
+     doing any relevant expansions if applicable, and place it in the
+     supplied buffer.
+ 
+     Message parameters:
+ 
+     - \b vparam : Pointer to a ::kcdb_ident_name_xfer structure
+           which provides the identity name to canonicalize in the \a
+           name_src member, and the buffer to store the canonical name
+           in the \a name_dest member.  The \a name_dest buffer is
+           guaranteed to be at least KCDB_IDENT_MAXCCH_NAME characters
+           in size.
+ 
+     If the name cannot be canonicalized for some reason, the
+     destination buffer should be set to a zero-length string and the
+     \a result member of the ::kcdb_ident_name_xfer structure should be
+     set to the error code.  If the destination buffer is set to a
+     zero-length string and \a result is KHM_ERROR_SUCCESS, then the
+     original name provided in \a name_src is assumed to be already in
+     canonical form.
+  */
+ #define KMSG_IDENT_CANON_NAME           5
+ 
+ /*! \brief Compare names
+ 
+     Compare two identity names.  The names that are given aren't
+     guaranteed to be in canonical form.  The return value should be
+     akin to strcmp().
+ 
+     Message parameters: 
+ 
+     - \b vparam : A pointer to a ::kcdb_ident_name_xfer structure.
+         The \a name_src member points at the first name, and the \a
+         name_alt member specifies the second name.  The result of the
+         comparison should be place in \a result.
+  */
+ #define KMSG_IDENT_COMPARE_NAME         6
+ 
+ /*! \brief Set the default identity
+ 
+     Set or unset the default identity.  To set the default identity,
+     the \a uparam parameter will be set to a non-zero value and a
+     handle to the identity will be specified in \a vparam.  To unset
+     the default identity (i.e. not have a default identity), a zero
+     value will be specified in \a uparam and no identities will be
+     specified in \a vparam.
+ 
+     When setting a default identity, the identity provider will
+     receive this message prior to the ::KCDB_IDENT_FLAG_DEFAULT bit
+     being set or reset on any identity.  It should return
+     KHM_ERROR_SUCCESS if the requested operation can be performed.
+     Returning any other value will abort the operation and will leave
+     the default identity unchanged.
+ 
+     When resetting the default identity, this message should be
+     treated only as a notification.
+ 
+     Message parameters:
+ 
+     - \a uparam : Is non-zero if an identity is being made default.  If
+       this is zero, then identity should be the default.
+ 
+     - \a vparam : A handle to the identity to be made default if \a
+       uparam is non-zero.  NULL otherwise.
+ 
+     Return value:
+ 
+     - KHM_ERROR_SUCCESS : The identity should be marked as default
+     - Any other value : The identity should not be marked as default
+ 
+  */
+ #define KMSG_IDENT_SET_DEFAULT          7
+ 
+ /*! \brief Set an identity as searchable
+ 
+     Set or reset the searchable bit on an identity.  If the \a uparam
+     parameter is non-zero, then the searchable bit is being set.
+     Otherwise it is being reset.  The identity provider should return
+     KHM_ERROR_SUCCESS in order to indicate that the identity should be
+     marked as searchable.  Any other value will result in the
+     searchable bit being reset on the identity.
+ 
+     Message parameters:
+ 
+     - \a uparam : Is non-zero if the searchable bit is being set.  Zero
+       otherwise.
+ 
+     - \a vparam : Handle to the identity
+ 
+     Return value:
+ 
+     - KHM_ERROR_SUCCESS: The identity should be marked as searchable
+     - Any other value : The identity should not be marked as default
+  */
+ #define KMSG_IDENT_SET_SEARCHABLE       8
+ 
+ /*! \brief Get information about an identity
+ 
+  */
+ #define KMSG_IDENT_GET_INFO             9
+ 
+ /*! \brief Enumerate known and accessible identities
+  */
+ #define KMSG_IDENT_ENUM_KNOWN           10
+ 
+ /*! \brief Update information about an identity
+  */
+ #define KMSG_IDENT_UPDATE               11
+ 
+ /*! \brief Retrieve the user interface callback function
+ 
+     When obtaining new credentials, the user interface needs to obtain
+     a callback function which will provide identity selection
+     controls.
+ 
+     Message parameters:
+ 
+     - \a uparam : Not used
+ 
+     - \a vparam : pointer to a ::khui_ident_new_creds_cb which will
+          receive the call back.
+  */
+ #define KMSG_IDENT_GET_UI_CALLBACK      12
+ 
+ /*! \brief Notification of the creation of an identity
+ 
+     This should be considered just a notification.  The identit
+     provider does not have an opportunity to veto the creation of an
+     identity whose name has been found to be valid.  However, when
+     handing this notification, the identity provider can:
+ 
+     - Change the flags of the identity and/or marking the identity as
+       invalid.
+ 
+     - Change the default identity.
+ 
+     Note that this notification is sent before the general :;KMSG_KCDB
+     notification of the identity creation is sent.
+ 
+     Message parameters:
+ 
+     - \a uparam : Not used.
+ 
+     - \p vparam : handle to the identity
+  */
+ #define KMSG_IDENT_NOTIFY_CREATE        13
+ 
+ /*@}*/ /* /KMSG_IDENT subtypes */
+ 
+ /*@}*/ /* / message types */
+ /*@}*/ /* / kmq */
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/khnewcred.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/khnewcred.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/khnewcred.h	Thu Oct 12 17:42:41 2006
***************
*** 0 ****
--- 1,975 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: khnewcred.h,v 1.1.2.2 2006/10/12 21:42:41 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_KHNEWCRED_H
+ #define __KHIMAIRA_KHNEWCRED_H
+ 
+ /********************************************************************
+   New credentials windows
+ *********************************************************************/
+ 
+ /*! \addtogroup khui
+ @{ */
+ 
+ /*! \defgroup khui_cred Credentials acquisition 
+ 
+     Declarations associated with credentials acquisition.
+ 
+ @{ */
+ 
+ /*! \brief Window message sent to credentials type panels
+ 
+     This message is sent to the child windows.
+ 
+     The format of the message is :
+     - uMsg : KHUI_WM_NC_NOTIFY
+     - HIWORD(wParam) : one of ::khui_wm_nc_notifications
+     - LPARAM : pointer to the ::khui_new_creds structure
+ */
+ #define KHUI_WM_NC_NOTIFY (WM_APP + 0x101)
+ 
+ /*! \brief The first control ID that may be used by an identity provider */
+ #define KHUI_CW_ID_MIN 8016
+ 
+ /*! \brief The maximum number of controls that may be created by an identity provider*/
+ #define KHUI_CW_MAX_CTRLS 8
+ 
+ /*! \brief The maximum control ID that may be used by an identity provider */
+ #define KHUI_CW_ID_MAX (KHUI_CW_ID_MIN + KHUI_CW_MAX_CTRLS - 1)
+ 
+ 
+ /*! \brief Credentials dialog notifications
+ 
+     These notifications will be sent to the individual dialog
+     procedures of the credential type panels as a ::KHUI_WM_NC_NOTIFY
+     message.
+ */
+ enum khui_wm_nc_notifications {
+     WMNC_DIALOG_EXPAND = 1, 
+     /*!< The dialog is getting expanded.
+ 
+       This message is sent to the new creds dialog to set the dialog
+       to expanded mode.  In expanded mode, all credentials type panels
+       are visible as opposed to the compressed mode where they are not
+       visible.  The message is not sent to credentials type panels.*/
+ 
+     WMNC_DIALOG_SETUP,      
+     /*!< Sent by NetIDMgr to the new creds window to notify it that
+       the dialog should create all the type configuration panels.
+         
+       Until this message is issued, none of the credentials type
+       panels exist.  The credentials type panels will receive
+       WM_INITDIALOG etc as per the normal dialog creation process. */
+ 
+     WMNC_DIALOG_ACTIVATE,   
+     /*!< Sent by NetIDMgr to the new creds window to notify it that
+       the dialog should do final initialization work and activate. */
+ 
+     WMNC_DIALOG_MOVE,       
+     /*!< Sent by the new creds widnow to all the panels notifying them
+       that the NC window is moving. */
+ 
+     WMNC_DIALOG_SWITCH_PANEL, 
+     /*!< Sent to the new creds window to cause it to switch to the
+       panel identified by LOWORD(wParam).
+ 
+       Does nothing if the specified panel is already the current
+       panel.  If the dialog is in compact mode and making the
+       specified panel visible requires switching to expanded mode, the
+       dialog will do so. */
+ 
+     WMNC_UPDATE_CREDTEXT,   
+     /*!< Sent to all the credential type panels for a credentials
+       window to request them to update the credential text.
+ 
+       When sent to the new credentials window, causes it to send the
+       WMNC_UPDATE_CREDTEXT message to all the credential type panels
+       and update the cred text window.*/
+ 
+     WMNC_CREDTEXT_LINK,    
+     /*!< Sent to a panel dialog proc when a user clicks a credtext
+       embedded link that belongs to that panel */
+ 
+     WMNC_IDENTITY_CHANGE,   
+     /*!< The primary identity has changed */
+ 
+     WMNC_CLEAR_PROMPTS,     
+     /*!< Sent to the new creds window to clear any custom prompts */
+ 
+     WMNC_SET_PROMPTS,       
+     /*!< Sent to the new creds window to set custom prompts */
+     
+     WMNC_DIALOG_PREPROCESS, 
+     /*!< Sent to all the credentials type panels to notify them that
+       the dialog is about to be processed */
+ 
+     WMNC_DIALOG_PROCESS,    
+     /*!< Process the dialog and signal whether to exit the dialog or
+       not */
+ 
+     WMNC_DIALOG_PROCESS_COMPLETE, 
+     /*!< Sent to the new creds window to indicate that the all the
+       threads have completed processing.*/
+ 
+     WMNC_TYPE_STATE,        
+     /*!< Sent to the new creds window as notification that a
+       particular credentials type has changed state from enabled to
+       disabled or vice versa.  The LPARAM member of the message
+       specifies the credentials type identifier for the changed
+       type */
+ 
+     WMNC_ADD_CONTROL_ROW,
+     /*!< Add a row of controls to a new cred dialog.  This is an
+       internal message. */
+ };
+ 
+ /*! \brief Plugins can use WMNC_NOTIFY message codes from here on up
+ 
+     \see ::KHUI_WM_NC_NOTIFY
+  */
+ #define WMNC_USER 2048
+ 
+ /*! \brief Notifications to the identity provider
+ 
+     These notifications are sent through to the identity provider's UI
+     callback that was obtained using a ::KMSG_IDENT_GET_UI_CB message.
+ 
+     The callback routine is called from the context of the UI thread
+     and is expected to not make any blocking calls.  One of the
+     following commands will be passed in as the \a cmd parameter to
+     the callback.
+  */
+ enum khui_wm_nc_ident_notify {
+     WMNC_IDENT_INIT,            
+     /*!< Initialize an identity selector for a new credentials
+          dialog. The \a lParam parameter contains a handle to the
+          dialog window which will contain the identity selector
+          controls.  The identity provider may make use of the \a
+          ident_aux field of the ::khui_new_creds structure to hold any
+          data pertaining to the credentials acquisition dialog.*/
+ 
+     WMNC_IDENT_WMSG,
+     /*!< Windows message.  Presumably sent from one of the controls
+          that was created by the identity provider.  The callback is
+          expected to return TRUE if it processed the message or FALSE
+          if it did not.  The \a uMsg, \a wParam and \a lParam
+          parameters are set to the values passed in by Windows. */
+ 
+     WMNC_IDENT_EXIT,
+     /*!< Terminate a credentials acquisition dialog. Sent just before
+       the dialog is terminated. */
+ };
+ 
+ /*! \name Standard credtext link IDs
+ @{*/
+ 
+ /*! \brief Switch the panel
+     
+     The \a id attribute of the link specifies the ordinal of the panel
+     to switch to.
+ */
+ #define CTLINKID_SWITCH_PANEL L"SwitchPanel"
+ 
+ /*@}*/
+ 
+ /*forward dcl*/
+ struct tag_khui_new_creds_by_type;
+ typedef struct tag_khui_new_creds_by_type khui_new_creds_by_type;
+ struct tag_khui_new_creds_prompt;
+ typedef struct tag_khui_new_creds_prompt khui_new_creds_prompt;
+ struct tag_khui_new_creds;
+ typedef struct tag_khui_new_creds khui_new_creds;
+ 
+ typedef LRESULT
+ (KHMAPI *khui_ident_new_creds_cb)(khui_new_creds * nc,
+                                   UINT cmd,
+                                   HWND hwnd,
+                                   UINT uMsg,
+                                   WPARAM wParam,
+                                   LPARAM lParam);
+ 
+ /*! \brief New credentials acquisition blob
+ 
+     A pointer to an object of this type is passed in along with the
+     credentials acquisition messages.
+ 
+     \see \ref cred_acq for more information
+ */
+ typedef struct tag_khui_new_creds {
+     khm_int32   magic;
+ 
+     khm_int32   subtype;        /*!< Subtype of the request that is
+                                   being handled through this object.
+                                   One of ::KMSG_CRED_INITIAL_CREDS,
+                                   ::KMSG_CRED_NEW_CREDS or
+                                   ::KMSG_CRED_RENEW_CREDS */
+ 
+     CRITICAL_SECTION cs;
+ 
+     khm_boolean set_default;    /*!< After a successfull credentials
+                                   acquisition, set the primary
+                                   identity as the default. */
+ 
+     khm_handle  *identities;    /*!< The list of identities associated
+                                   with this request.  The first
+                                   identity in this list (\a
+                                   identities[0]) is the primary
+                                   identity. */
+ 
+     khm_size    n_identities;   /*!< Number of identities in the list
+                                   \a identities */
+ 
+     khm_size    nc_identities;  /*!< Internal use */
+ 
+     khui_action_context ctx;    /*!< An action context specifying the
+                                   context in which the credentials
+                                   acquisition operation was
+                                   launced. */
+ 
+     khm_int32   mode;           /*!< The mode of the user interface.
+                                   One of ::KHUI_NC_MODE_MINI or
+                                   ::KHUI_NC_MODE_EXPANDED. */
+ 
+     HWND        hwnd;           /*!< Handle to the new credentials
+                                   window. */
+ 
+     struct tag_khui_new_creds_by_type **types;
+                                 /*!< Internal use */
+     khm_handle  *type_subs;     /*!< Internal use */
+     khm_size    n_types;        /*!< Internal use */
+     khm_size    nc_types;       /*!< Internal use */
+ 
+     khm_int32   result;     /*!< One of ::KHUI_NC_RESULT_CANCEL or
+                                 ::KHUI_NC_RESULT_PROCESS indicating
+                                 the result of the dialog with the
+                                 user */
+ 
+     khm_int32   response;   /*!< Response.  See individual message
+                                 documentation for info on what to do
+                                 with this field */
+ 
+     wchar_t     *password;  /*!< Not set until the dialog ends */
+ 
+     /* UI stuff */
+ 
+     wchar_t     *banner;        /*!< Internal use */
+     wchar_t     *pname;         /*!< Internal use */
+     khm_size    n_prompts;      /*!< Internal use */
+     khm_size    nc_prompts;     /*!< Internal use */
+     struct tag_khui_new_creds_prompt ** prompts; /*!< Internal use */
+ 
+     khui_ident_new_creds_cb ident_cb; /*!< Internal use */
+ 
+     wchar_t     *window_title;  /*!< Internal use */
+ 
+     LPARAM      ident_aux;      /*!< Auxilliary field which is
+                                   reserved for use by the identity
+                                   provider during the course of
+                                   conducting this dialog. */
+ 
+ } khui_new_creds;
+ 
+ #define KHUI_NC_MAGIC 0x84270427
+ 
+ /*!\name Result values for khui_new_creds_t::result
+   @{*/
+ #define KHUI_NC_RESULT_PROCESS    0
+ #define KHUI_NC_RESULT_CANCEL       1
+ /*@}*/
+ 
+ /*!\name Mode values for khui_new_creds_t::mode
+   @{*/
+ #define KHUI_NC_MODE_MINI       0
+ #define KHUI_NC_MODE_EXPANDED   1
+ /*@}*/
+ 
+ /*!\name Response values for khui_new_creds_t::response
+   @{*/
+ /*!\brief No known response */
+ #define KHUI_NC_RESPONSE_NONE     0
+ 
+ /*!\brief It is okay to exit the dialog now 
+ 
+     This is the default, which is why it has a value of zero.  In
+     order to prevent the dialog from exiting, set the
+     KHUI_NC_RESPONSE_NOEXIT response bit. */
+ #define KHUI_NC_RESPONSE_EXIT     0
+ 
+ /*!\brief It is NOT okay to exit the dialog now
+ 
+     Used to indicate that further user-interaction is necessary to
+     process the dialog.  Usually this is accompanied by setting
+     necessary custom prompts and notifications so the user knows why
+     the dialog is prompting for more information.
+  */
+ #define KHUI_NC_RESPONSE_NOEXIT    0x00000002
+ 
+ /*!\brief The dialog was processed successfully
+ 
+     Since this is the default response, the value is zero.  Use one of
+     KHUI_NC_RESPONSE_FAILED or KHUI_NC_RESPONSE_PENDING to indicate an
+     error or pending status.
+  */
+ #define KHUI_NC_RESPONSE_SUCCESS  0
+ 
+ /*!\brief The processing of the dialog failed
+ 
+     Self explanatory.  More information about the failure should have
+     been reported using the khlog API, however, this response value
+     indicates to other credential types that depend on this credential
+     type that whatever it was that this credential type was supposed
+     to do didn't happen.
+ */
+ #define KHUI_NC_RESPONSE_FAILED    0x00000008
+ 
+ /*!\brief Further interaction required
+ 
+     Set along with KHUI_NC_RESPONSE_NOEXIT although it is not
+     required.  Setting this bit will automatically add the
+     KHUI_NC_RESPONSE_NOEXIT.
+ 
+     If this bit is set, all dependent plugins will be set on hold
+     until another round of processing clears the pending bit.
+  */
+ #define KHUI_NC_RESPONSE_PENDING   0x00000010
+ 
+ /*! \brief Completed
+ 
+     This is automatically set if the plugin sets a response which does
+     not indicate either KHUI_NC_RESPONSE_NOEXIT or
+     KHUI_NC_RESPONSE_PENDING, which is considered to mean that the
+     plugin is completed processing.
+ 
+     This flag cannot be explicitly specified in a response.
+  */
+ #define KHUI_NC_RESPONSE_COMPLETED 0x00000020
+ 
+ /*! \brief Processing
+ 
+     This is an internal flag set while the credentials acquisition
+     process is executing.
+  */
+ #define KHUI_NC_RESPONSE_PROCESSING 0x00010000
+ 
+ #define KHUI_NCMASK_RESPONSE (KHUI_NC_RESPONSE_EXIT|KHUI_NC_RESPONSE_NOEXIT)
+ #define KHUI_NCMASK_RESULT  (KHUI_NC_RESPONSE_SUCCESS|KHUI_NC_RESPONSE_FAILED|KHUI_NC_RESPONSE_PENDING)
+ /*@}*/
+ 
+ /*!\brief Maximum number of dependencies for a credentials type */
+ #define KHUI_MAX_TYPE_DEPS 8
+ 
+ /*!\brief Maximum number of credential types for a new creds window */
+ #define KHUI_MAX_NCTYPES 16
+ 
+ /*!\brief Maximum number of characters in a password
+ 
+   Length includes the termininating NULL
+ */
+ #define KHUI_MAXCCH_PASSWORD 512
+ 
+ /*! \brief Maximum number of bytes in a password
+ 
+   Includes terminating NULL
+ */
+ #define KHUI_MAXCB_PASSWORD (KHUI_MAXCCH_PASSWORD * sizeof(wchar_t))
+ 
+ /*! \brief Maximum number of characters in a custom banner
+ 
+     Length includes terminating NULL
+ */
+ #define KHUI_MAXCCH_BANNER 256
+ 
+ 
+ /*! \brief Maximum number of bytes in a custom banner
+ 
+     Length includes terminating NULL
+ */
+ #define KHUI_MAXCB_BANNER (KHUI_MAXCCH_BANNER * sizeof(wchar_t))
+ 
+ /*! \brief Maximum number of characters in a panel name
+ 
+     Length includes terminating NULL
+ */
+ #define KHUI_MAXCCH_PNAME 256
+ 
+ /*! \brief Maximum number of bytes in a panel name
+ 
+     Length includes terminating NULL
+ */
+ #define KHUI_MAXCB_PNAME (KHUI_MAXCCH_PNAME * sizeof(wchar_t))
+ 
+ /*! \brief A descriptor of a panel in the new credentials acquisition tab
+ 
+     When processing certain credentials messages such as
+     ::KMSG_CRED_PASSWORD, ::KMSG_CRED_NEW_CREDS,
+     ::KMSG_CRED_RENEW_CREDS, a pointer to a ::khui_new_creds structure
+     will be passed in to the message handler.  If the handler of the
+     message needs to add one or more credentials types as participants
+     of the operation, the handler will need to call khui_cw_add_type()
+     and specify a ::khui_new_creds_by_type structure.
+ 
+     Note that the memory address passed in to the call to
+     khui_cw_add_type() will not be copied.  Therefore, the block of
+     memory should remain as-is for the lifetime of the
+     ::khui_new_creds structure or until it is removed with a call to
+     khui_cw_del_type().
+ 
+     Some of the credentials messages that require specifying a
+     ::khui_new_creds_by_type structure require providing a
+     user-interface.  In these cases, the fields marked for providing a
+     UI may be required to hold valid values.  If the message does not
+     require providing a UI, these fields will be ignored.
+ */
+ typedef struct tag_khui_new_creds_by_type {
+     khui_new_creds * nc;        /*!< Internal use.  Do not set */
+     khm_int32   flags;          /*!< Internal use.  Do not set */
+ 
+     khm_int32   type;           /*!< The identifier of the credentials
+                                   type.  This is a credentials type
+                                   identifier allocated with a call to
+                                   kcdb_credtype_register(). */
+ 
+     khm_int32   type_deps[KHUI_MAX_TYPE_DEPS];
+                                 /*!< credentials types that this
+                                     credential type depends on.  Each
+                                     element defines a credentials type
+                                     identifier that this type depends
+                                     on for this operation.  The number
+                                     of valid values in this array
+                                     should be specified in the \a
+                                     n_type_deps field. */
+ 
+     khm_size    n_type_deps;    /*!< Number of dependencies listed
+                                   above.  Should be between 0 and
+                                   ::KHUI_MAX_TYPE_DEPS.  Specify 0 if
+                                   there are no dependencies. */
+ 
+     khm_size    ordinal;        /*!< The requested ordinal.  The UI
+                                   would attempt to place this panel at
+                                   the reqested order in the list of
+                                   panels.  Set to -1 if the order does
+                                   not matter.  Once the dialog is
+                                   activated this field will be updated
+                                   to reflect the actual ordinal of the
+                                   panel. */
+ 
+     wchar_t    *name;           /*!< Name of the panel (localized,
+                                   optional).  If NULL, the localized
+                                   name of the credentials type is
+                                   used. Only used if providing a
+                                   user-interface. */
+ 
+     HICON       icon;           /*!< Icon for the panel (optional).
+                                   Only used if providing a
+                                   user-interface. */
+ 
+     wchar_t    *tooltip;        /*!< Tooltip for the panel (localized,
+                                   optional).  If NULL, no tooltip will
+                                   be assigned for the panel.  Only
+                                   used if providing a
+                                   user-interface.  */
+ 
+     HMODULE     h_module;       /*!< Handle to the module containing
+                                   the dialog resource.  Only used if
+                                   providing a user-interface. */
+ 
+     LPWSTR      dlg_template;   /*!< The dialog resource.  Only used
+                                   if providing a user-interface. */
+     DLGPROC     dlg_proc;       /*!< The dialog procedure. Only used
+                                   if providing a user-interface. */
+ 
+     HWND        hwnd_panel;     /*!< The dialog window.  Once the
+                                   dialog panel is created, a handle to
+                                   the panel will be assigned here.
+                                   Note that the handle is assigned
+                                   after a successful call to
+                                   CreateDialogParam and hence would
+                                   not be available when handling the
+                                   WM_INITDIALOG message from the
+                                   dialog procedure.  Only used of
+                                   providing a user-interface. */
+ 
+     HWND        hwnd_tc;        /*!< Internal use. Do not set */
+ 
+     wchar_t    *credtext;       /*!< A brief description of the
+                                   current state of this cred
+                                   type. (localized, optional).  Only
+                                   used if providing a
+                                   user-interface. */
+ 
+     LPARAM      aux;            /*!< auxilliary field.  For use by the
+                                   plug-in. */
+ } khui_new_creds_by_type;
+ 
+ /*!\name Flags for khui_new_creds_by_type
+ 
+     Note that KHUI_NC_RESPONSE_SUCCESS, KHUI_NC_RESPONSE_FAILED,
+     KHUI_NC_RESPONSE_PENDING are also stored in the flags. 
+ 
+ @{*/
+ #define KHUI_NCT_FLAG_PROCESSED 1024
+ #define KHUI_NCT_FLAG_DISABLED  2048
+ /*@}*/
+ 
+ /*! \brief Width of a new creds dialog panel in dialog units*/
+ #define NCDLG_WIDTH     300
+ /*! \brief Height of a new creds dialog panel in dialog units*/
+ #define NCDLG_HEIGHT    166
+ 
+ /*! \brief Width of the button bar in dialog units */
+ #define NCDLG_BBAR_WIDTH 60
+ /*! \brief Height of a tab button in dialog units */
+ #define NCDLG_TAB_HEIGHT 15
+ /*! \brief Width of a tab button in dialog units */
+ #define NCDLG_TAB_WIDTH 60
+ 
+ /*! \brief A custom prompt */
+ typedef struct tag_khui_new_creds_prompt {
+     khm_size    index;          /*!< Set to the zero based index
+                                   of this prompt. */
+ 
+     khm_int32   type;           /*!< one of KHUI_NCPROMPT_TYPE_* */
+     wchar_t *   prompt;         /*!< prompt string. Cannot exceed
+                                   KHUI_MAXCCH_PROMPT */
+     wchar_t *   def;            /*!< default value. Cannot exceed
+                                   KHUI_MAXCCH_PROMPT_VALUE */
+     wchar_t *   value;          /*!< On completion, this is set to the
+                                   value that the user entered. Will
+                                   not exceed
+                                   KHUI_MAXCCH_PROMPT_VALUE */
+ 
+     khm_int32   flags;          /*!< Combination of
+                                   KHUI_NCPROMPT_FLAG_* */
+ 
+     HWND        hwnd_static;    /* internal use */
+     HWND        hwnd_edit;      /* internal use */
+ } khui_new_creds_prompt;
+ 
+ /*! \brief The prompt input is hidden
+ 
+     The input is hidden for prompts which accept passwords.  The
+     control which represents the input will display an asterisk or a
+     small circle corresponding to each character typed in, but will
+     not show the actual character.
+  */
+ #define KHUI_NCPROMPT_FLAG_HIDDEN   1
+ 
+ /*! \brief Internal use */
+ #define KHUI_NCPROMPT_FLAG_STOCK    2
+ 
+ /*! \brief Maximum number of characters in a prompt
+ 
+     Refers to the prompt text that accompanies an input control.  THe
+     length includes the terminating NULL.
+  */
+ #define KHUI_MAXCCH_PROMPT 256
+ 
+ /*! \brief Maximum number of bytes in a prompt
+ 
+     Refers to the prompt text that accompanies an input control.  THe
+     length includes the terminating NULL.
+  */
+ #define KHUI_MAXCB_PROMPT (KHUI_MAXCCH_PROMPT * sizeof(wchar_t))
+ 
+ /*! \brief Maximum number of characters that can be entered in an input control
+ 
+     Refers to the input control of a prompt.  The length includes the
+     terminating NULL.
+  */
+ #define KHUI_MAXCCH_PROMPT_VALUE 256
+ 
+ /*! \brief Maximum number of bytes that can be entered in an input control
+ 
+     Refers to the input control of a prompt.  The length includes the
+     terminating NULL.
+  */
+ #define KHUI_MAXCB_PROMPT_VALUE (KHUI_MAXCCH_PROMPT_VALUE * sizeof(wchar_t))
+ 
+ /* from krb5.h.  Redefining here because we don't want to depend on
+    krb5.h for all credential types */
+ 
+ /*! \brief A password control */
+ #define KHUI_NCPROMPT_TYPE_PASSWORD             1
+ 
+ /*! \brief New password control
+ 
+     Used when changing the password
+  */
+ #define KHUI_NCPROMPT_TYPE_NEW_PASSWORD         2
+ 
+ /*! \brief New password again control
+ 
+     Used when changing the password
+  */
+ #define KHUI_NCPROMPT_TYPE_NEW_PASSWORD_AGAIN   3
+ 
+ /*! \brief Preauthentication (reserved) */
+ #define KHUI_NCPROMPT_TYPE_PREAUTH              4
+ 
+ /*! \brief Control sizes */
+ typedef enum tag_khui_control_size {
+     KHUI_CTRLSIZE_SMALL,
+     /*!< A small control fits in about 1/5 the width of the new
+       credentials panel */
+     KHUI_CTRLSIZE_HALF,
+     /*!< Half size controls fit in 1/2 the width of the new
+       credentials panel */
+     KHUI_CTRLSIZE_FULL,
+     /*!< Takes up the whole width of the crednetials panel */
+ } khui_control_size;
+ 
+ /*! \brief Internal use */
+ typedef struct tag_khui_control_row {
+     HWND label;
+     HWND input;
+     khui_control_size size;
+ } khui_control_row;
+ 
+ /*! \brief Create a ::khui_new_creds object
+ 
+     Creates and initializes a ::khui_new_creds object.  The created
+     object must be destroyed using the khui_cw_destroy_cred_blob()
+     function.
+ 
+     \note Plugins should not call this function directly.  The
+          necessary ::khui_new_creds objects will be created by
+          NetIDMgr.
+ 
+     \see khui_cw_destroy_cred_blob()
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_cw_create_cred_blob(khui_new_creds ** c);
+ 
+ /*! \brief Destroy a ::khui_new_creds object
+ 
+     Destroys a ::khui_new_creds object that was fomerly created using
+     a call to khui_cw_create_cred_blob().
+ 
+     \note Plugins should not call this function directly.  The
+          necessary ::khui_new_creds objects will be created by
+          NetIDMgr.
+ 
+     \see khui_cw_create_cred_blob()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ khui_cw_destroy_cred_blob(khui_new_creds *c);
+ 
+ /*! \brief Lock the new_creds object
+ 
+     When a plugin is accessing the fields of a ::khui_new_creds
+     object, it must first obtain a lock on the object so that other
+     threads will not modify the fields at the same time.  Locking the
+     object ensures that the fields of the object will be consistent.
+ 
+     Use khui_cw_unlock_nc() to undo the lock obtained through a call
+     to khui_cw_lock_nc().
+ 
+     It is not necessary to lock a new credentials object when
+     modifying it using the NetIDMgr API.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_cw_lock_nc(khui_new_creds * c);
+ 
+ /*! \brief Unlock a new_creds object
+ 
+     \see khui_cw_lock_nc()
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_cw_unlock_nc(khui_new_creds * c);
+ 
+ /*! \brief Add a new panel to a new credentials acquisition window 
+ 
+     See the description of ::khui_new_cred_panel for information on
+     how to populate it to describe a credentials type panel.
+ 
+     Note that the structure pointed to by \a t is added by reference.
+     The memory pointed to by \a t is not copied.  Hence, the block of
+     memory and any other blocks pointed to by the
+     ::khui_new_creds_by_type structure located there should remain
+     intact for the lifetime of the ::khui_new_creds structure pointed
+     to by \a c or until the credentials type panel is removed from the
+     ::khui_new_creds structure with a call to khui_cw_del_type().
+ 
+     Generally, a plug-in that calls this function should allocate a
+     block of memory to contain the ::khui_new_creds_by_type structure,
+     fill it in and then pass in the address in a call to
+     khui_cw_add_type() while handling a ::KMSG_CRED_PASSWORD,
+     ::KMSG_CRED_NEW_CREDS or ::KMSG_CRED_RENEW_CREDS message.  Then
+     the plug-in should remove the reference with a call to
+     khui_cw_del_type() while processing ::KMSG_CRED_END.
+ 
+     \see khui_cw_del_type()
+     \see \ref cred_acq_panel_spec
+     \see ::khui_new_cred_panel
+     \see ::khui_new_creds
+ */
+ KHMEXP khm_int32 KHMAPI 
+ khui_cw_add_type(khui_new_creds * c, 
+                  khui_new_creds_by_type * t);
+ 
+ /*! \brief Remove a panel from a new credentials acquisition window
+ 
+     \see khui_cw_add_type()
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_cw_del_type(khui_new_creds * c, 
+                  khm_int32 type);
+ 
+ /*! \brief Find the panel belonging to a particular credentials type
+ 
+     This panel would have been added to the new credentials window
+     using khui_cw_add_type().
+ 
+     \see khui_cw_add_type()
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_cw_find_type(khui_new_creds * c, 
+                   khm_int32 type, 
+                   khui_new_creds_by_type **t);
+ 
+ /*! \brief Enable/disable a particular credentials type
+ 
+     Enables or disables the panel associated with a particular
+     credentials type.  Does not preclude the credentials type from
+     participating in the new credentials acquisition.  However, the
+     user will be prevented from interacting with the specific panel.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_cw_enable_type(khui_new_creds * c,
+                     khm_int32 type,
+                     khm_boolean enable);
+ 
+ /*! \brief Set the primary identity in a new credentials acuisition
+ 
+     The primary identity dictates many of the defaults and the
+     semantics associated with the credentials acquision process.
+     Setting the primary identity also triggers the
+     ::WMNC_IDENTITY_CHANGE notification which will be sent to all the
+     credentials type panels.
+ 
+     Has no effect if the primary identity is already the same as the
+     one specified in \a id.  Specify NULL for \a id if the current
+     primary identity is to be cleared.
+ 
+     If the primary identity is changed, then all the additional
+     identities associated with the new credentials acquisition dialog
+     will also be discarded.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_cw_set_primary_id(khui_new_creds * c, 
+                        khm_handle id);
+ 
+ /*! \brief Add an additional identity to the new credentials acquisition
+ 
+     Individual plugins are free to decide how to handle additional
+     identities.  Generally, they would attempt to obtain credentials
+     for the primary and additional identities, but would not consider
+     it an error if an additional identity failed to obtain
+     credentials.
+ 
+     Calling this function with \a id of NULL does nothing.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ khui_cw_add_identity(khui_new_creds * c, 
+                      khm_handle id);
+ 
+ /*! \brief Clear all custom prompts
+ 
+     Removes all the custom prompts from the new credentials dialog.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_cw_clear_prompts(khui_new_creds * c);
+ 
+ /*! \brief Synchronize custom prompt values
+ 
+     It is important to synchronize the values before accessing their
+     values.  The controls associated with custom prompts update the
+     values in the ::khui_new_creds object periodically.  However, the
+     values may lose sync intermittently.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_cw_sync_prompt_values(khui_new_creds * c);
+ 
+ /*! \brief Begin custom prompting
+ 
+     Begins the process of defining custom prompts.  Implicity removes
+     all the custom prompts that are currently being displayed.  The \a
+     banner and \a name will be displayed in separate controls above
+     the set of new custom prompts.
+ 
+     The controls associated with the prompts will not actually be
+     created until all the prompts have been added using
+     khui_cw_add_prompt().  The number of promtps that can be added
+     will be exactly \a n_prompts.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_cw_begin_custom_prompts(khui_new_creds * c, 
+                              khm_size n_prompts, 
+                              wchar_t * banner, 
+                              wchar_t * name);
+ 
+ /*! \brief Add a custom prompt
+ 
+     After khui_cw_begin_custom_prompts() is called, the plugin should
+     call khui_cw_add_prompt() to add the actual prompts.  The number
+     of prompts that can be added is the \a n_prompts value specified
+     in the earlier call to \a khui_cw_begin_custom_prompts().
+ 
+     Once \a n_prompts prompts have been added, the new prompts will
+     automatically be created and shown in the user interface.
+     However, if less than that prompts are added, nothing is displayed
+     to the user.
+ 
+     \param[in] c Pointer to ::khui_new_creds structure
+ 
+     \param[in] type Type of prompt.  One of
+         ::KHUI_NCPROMPT_TYPE_PREAUTH, ::KHUI_NCPROMPT_TYPE_PASSWORD,
+         ::KHUI_NCPROMPT_TYPE_NEW_PASSWORD,
+         ::KHUI_NCPROMPT_TYPE_NEW_PASSWORD_AGAIN
+ 
+     \param[in] prompt Text of the prompt.  Constrained by
+         ::KHUI_MAXCCH_PROMPT. (Localized, required)
+ 
+     \param[in] def Default value.  (optional).  Constrained by
+         ::KHUI_MAXCCH_PROMPT_VALUE.  Set to NULL if not provided.
+ 
+     \param[in] flags Flags.  Combination of
+         ::KHUI_NCPROMPT_FLAG_HIDDEN
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_cw_add_prompt(khui_new_creds * c, 
+                    khm_int32 type, 
+                    wchar_t * prompt, 
+                    wchar_t * def, 
+                    khm_int32 flags);
+ 
+ /*! \brief Retrieve a custom prompt
+ 
+     Retrieves an individual prompt.  The \a idx parameter is a
+     zero-based index of the prompt to retrieve.  The ordering is the
+     same as the order in which khui_cw_add_prompt() was called.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_cw_get_prompt(khui_new_creds * c, 
+                    khm_size idx, 
+                    khui_new_creds_prompt ** prompt);
+ 
+ /*! \brief Get the number of custom prompts
+ 
+     Retrieves the number of custom prompts currently displayed.  If
+     this function is called between calling
+     khui_cw_begin_custom_prompts() and adding all the prompts, the
+     number returned will be the number of prompts that is expected to
+     be registered (i.e. the \a n_prompts parameter passed to
+     khui_cw_begin_custom_prompts()).
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_cw_get_prompt_count(khui_new_creds * c,
+                          khm_size * np);
+ 
+ 
+ /*! \brief Get the value of a custom prompt
+ 
+     Retrieve the value of a specific prompt.  The value is the string
+     that was typed into the input control associated with a custom
+     prompt.  The \a idx parameter is the zero-based index of the
+     prompt from which to retrieve the value from.  The ordering is the
+     same as the order in which khui_cw_add_prompt() was called.
+ 
+     It is important to call khui_cw_sync_prompt_values() before
+     starting to call khui_cw_get_prompt_value() so that the values
+     returned are up-to-date.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_cw_get_prompt_value(khui_new_creds * c, 
+                          khm_size idx, 
+                          wchar_t * buf, 
+                          khm_size *cbbuf);
+ 
+ /*! \brief Set the response for a plugin
+ 
+     When handling ::KMSG_CRED_DIALOG_PROCESS from within the plugin
+     thread, it is important to set the response by calling this
+     function.  The response can be used to signal whether the plugin
+     successfully obtained credentials or whether further interaction
+     is required, or the credentials acquisition failed.
+ 
+     The response is a combination of :
+     - ::KHUI_NC_RESPONSE_PENDING
+     - ::KHUI_NC_RESPONSE_FAILED
+     - ::KHUI_NC_RESPONSE_PENDING
+     - ::KHUI_NC_RESPONSE_SUCCESS
+     - ::KHUI_NC_RESPONSE_NOEXIT
+     - ::KHUI_NC_RESPONSE_EXIT
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_cw_set_response(khui_new_creds * c,
+                      khm_int32 type,
+                      khm_int32 response);
+ 
+ /*! \brief Check whether a specified credential type panel succeeded
+ 
+     This is called during the processing of KMSG_CRED_DIALOG_PROCESS
+     to determine whether a specified credential type succeeded in
+     obtaining credentials.  The credential type that is being queried
+     should have also been listed as a dependency when adding the
+     current credentials type, otherwise the type queried may not have
+     been invoked yet.
+ 
+     \return TRUE iff the queried type has reported that it successfully
+         completed the credentials acquision operation.
+  */
+ KHMEXP khm_boolean KHMAPI 
+ khui_cw_type_succeeded(khui_new_creds * c,
+                        khm_int32 type);
+ 
+ /*! \brief Add a row of controls to the identity specifier area
+ 
+     Only for use by identity provider callbacks that wish to add an
+     identity selector control.  A row of controls consist of a label
+     control and some input control.
+ 
+     When the ::WMNC_IDENT_INIT message is sent to the identity
+     provider, it receives a handle to the dialog panel in the \a
+     lParam parameter which should be the parent window of both the
+     windows specified here.  The control ID for any controls created
+     must fall within the ::KHUI_CW_ID_MIN and ::KHUI_CW_ID_MAX range.
+ 
+     Both controls will be resized to fit in the row.
+ 
+     If \a long_label is TRUE then the size of the label will be larger
+     than normal and will accomodate more text.
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_cw_add_control_row(khui_new_creds * c,
+                         HWND label,
+                         HWND input,
+                         khui_control_size size);
+ 
+ /*!@}*/ /* Credentials acquisition */
+ /*!@}*/
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/khprops.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/khprops.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/khprops.h	Thu Oct 12 17:42:41 2006
***************
*** 0 ****
--- 1,207 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: khprops.h,v 1.1.2.2 2006/10/12 21:42:41 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_KHPROPS_H
+ #define __KHIMAIRA_KHPROPS_H
+ 
+ /*********************************************************************
+   Property sheets
+ **********************************************************************/
+ 
+ /*! \addtogroup khui 
+ 
+ @{*/
+ 
+ /*!\defgroup khui_pp Property sheets
+ @{*/
+ 
+ /* forward dcl */
+ struct tag_khui_property_page;
+ 
+ /*! \brief A property sheet
+  */
+ typedef struct tag_khui_property_sheet {
+   PROPSHEETHEADER header;    /*!< property sheet header */
+   khm_int32       status;    /*!< status of property sheet.  One of
+ 			       ::KHUI_PS_STATUS_NONE,
+ 			       ::KHUI_PS_STATUS_RUNNING or
+ 			       ::KHUI_PS_STATUS_DONE */
+ 
+   HWND            hwnd;      /*!< handle to the property sheet window.
+ 			       Only valid when \a status is NOT
+ 			       ::KHUI_PS_STATUS_NONE */
+ 
+   HWND            hwnd_page; /*!< handle to the current page in the
+ 			       property sheet.  Only valid when \a
+ 			       status is ::KHUI_PS_STATUS_RUNNING */
+ 
+   khui_action_context ctx;   /*!< Context for the property sheet.  See
+ 			       documentation for
+ 			       ::khui_action_context */
+ 
+   khm_handle      identity;  /*!< Handle to the associated identity,
+                                if applicable */
+   khm_int32       credtype;  /*!< Type ID of the credentials type, if
+                                applicable */
+   khm_handle      cred;      /*!< Handle to the associated credential,
+                                if applicable */
+ 
+   khm_int32       n_pages;   /*!< Number of property pages.
+ 			       Upperbound of ::KHUI_PS_MAX_PSP */
+ 
+   QDCL(struct tag_khui_property_page);
+ } khui_property_sheet;
+ 
+ /*! \brief The property sheet hasn't been created yet */
+ #define KHUI_PS_STATUS_NONE 0
+ 
+ /*! \brief The property sheet is visible and running */
+ #define KHUI_PS_STATUS_RUNNING 1
+ 
+ /*! \brief The property sheet has completed running.
+ 
+     At this point, it is safe to call khui_ps_destroy_sheet() to
+     destroy the property sheet.
+ */
+ #define KHUI_PS_STATUS_DONE 2
+ 
+ /*! \brief The property sheet is in the process of being destroyed
+  */
+ #define KHUI_PS_STATUS_DESTROY 3
+ 
+ /*! \brief Maximum number of property sheet pages in a property sheet */
+ #define KHUI_PS_MAX_PSP 16
+ 
+ 
+ /*! \brief A property sheet page
+  */
+ typedef struct tag_khui_property_page {
+   HPROPSHEETPAGE h_page;
+   LPPROPSHEETPAGE p_page;
+   HWND           hwnd;
+   khm_int32      credtype;
+   khm_int32      ordinal;
+ 
+   LDCL(struct tag_khui_property_page);
+ } khui_property_page;
+ 
+ /*! \brief Special pseudo credtype for identity page
+  */
+ #define KHUI_PPCT_IDENTITY (-8)
+ 
+ /*! \brief Special pseudo credtype for credential page
+  */
+ #define KHUI_PPCT_CREDENTIAL (-9)
+ 
+ /*! \brief Create a property sheet
+ 
+     \note Only called by the NetIDMgr application.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_ps_create_sheet(khui_property_sheet ** sheet);
+ 
+ /*! \brief Add a page to a property sheet
+ 
+     Called by a plugin or the NetIDMgr application to add a page to a
+     property sheet.
+ 
+     Pages can only be added before the property sheet is made visible
+     to the user.
+ 
+     \param[in] sheet The property sheet to add the page to
+ 
+     \param[in] credtype The credentials type ID of the owner of the
+         property page.  This should be set to ::KCDB_CREDTYPE_INVALID
+         if the type is not relevant.
+ 
+     \param[in] ordinal Requested ordinal.  A positive integer which is
+         used to order the pages in a property sheet.  The pages are
+         ordered based on ordinal first and then alphabetically by
+         credentials type name.  If the type is unavailable, then the
+         ordering is undefined.  Ordinals for credential type property
+         pages can be in the range from 0 to 127.  Ordinals 128 and
+         above are reserved.  Passing in 0 will work for credentials
+         providers unless they provide more than one property page per
+         credential, in which case the ordinal should be used to
+         enforce an order.
+ 
+     \param[in] ppage Pointer to structure that will be passed to
+         CreatePropertySheetPage() to create the property page.  The
+         structure is not managed by NetIDMgr at all, and must exist
+         until the status of the property sheet changes to
+         ::KHUI_PS_STATUS_RUNNING.  The same pointer will be found in
+         the \a p_page member of the ::khui_property_page structure.
+ 
+     \param[out] page A pointer will be returned here that will point
+         to the newly created khui_property_page structure.  Specify
+         NULL if this value is not required.  You can use
+         khui_ps_find_page() to retrieve a pointer to the structure
+         later.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ khui_ps_add_page(khui_property_sheet * sheet,
+                  khm_int32 credtype,
+                  khm_int32 ordinal,
+                  LPPROPSHEETPAGE ppage,
+                  khui_property_page ** page);
+ 
+ /*! \brief Retrieve a property page structure from a property sheet
+  */
+ KHMEXP khm_int32 KHMAPI
+ khui_ps_find_page(khui_property_sheet * sheet,
+                   khm_int32 credtype,
+                   khui_property_page ** page);
+ 
+ /*! \brief Display the property sheet
+ 
+     \note Only called by the NetIDMgr application
+  */
+ KHMEXP HWND KHMAPI 
+ khui_ps_show_sheet(HWND parent, 
+                    khui_property_sheet * sheet);
+ 
+ /*! \brief Check if the given message belongs to the property sheet
+ 
+     \note Only called by the NetIDMgr application
+  */
+ KHMEXP LRESULT KHMAPI 
+ khui_ps_check_message(khui_property_sheet * sheet, 
+                       PMSG msg);
+ 
+ /*! \brief Destroy a property sheet and all associated data structures.
+ 
+     \note Only called by the NetIDMgr application.
+ */
+ KHMEXP khm_int32 KHMAPI 
+ khui_ps_destroy_sheet(khui_property_sheet * sheet);
+ 
+ KHMEXP khm_int32 KHMAPI 
+ khui_property_wnd_set_record(HWND hwnd_pwnd, khm_handle record);
+ 
+ /*!@}*/
+ /*!@}*/
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/khremote.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/khremote.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/khremote.h	Thu Oct 12 17:42:41 2006
***************
*** 0 ****
--- 1,84 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: khremote.h,v 1.1.2.2 2006/10/12 21:42:41 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_REMOTE_H
+ #define __KHIMAIRA_REMOTE_H
+ 
+ /*! \addtogroup khui
+   @{*/
+ /*! \defgroup khui_remote Connecting to NetIDMgr from another process
+   @{*/
+ 
+ /* Leash compatibility */
+ #define ID_OBTAIN_TGT_WITH_LPARAM       32810
+ 
+ #define KHUI_REQDAEMONWND_CLASS L"IDMgrRequestDaemonCls"
+ #define KHUI_REQDAEMONWND_NAME  L"IDMgrRequestDaemon"
+ 
+ #define KHUI_REQD_MAPPING_FORMAT L"Local\\NetIDMgr_DlgInfo_%lu"
+ 
+ #define NETID_USERNAME_SZ       128
+ #define NETID_REALM_SZ          192
+ #define NETID_TITLE_SZ          256
+ #define NETID_CCACHE_NAME_SZ    264
+   
+ #define NETID_DLGTYPE_TGT      0
+ #define NETID_DLGTYPE_CHPASSWD 1
+ typedef struct {
+     DWORD size;
+     DWORD dlgtype;
+     // Tells whether dialog box is in change pwd mode or init ticket mode
+     struct {
+         WCHAR title[NETID_TITLE_SZ];
+         WCHAR username[NETID_USERNAME_SZ];
+         WCHAR realm[NETID_REALM_SZ];
+         WCHAR ccache[NETID_CCACHE_NAME_SZ];
+         DWORD use_defaults;
+         DWORD forwardable;
+         DWORD noaddresses;
+         DWORD lifetime;
+         DWORD renew_till;
+         DWORD proxiable;
+         DWORD publicip;
+         DWORD must_use_specified_principal;
+     } in;
+     struct {
+         WCHAR username[NETID_USERNAME_SZ];
+         WCHAR realm[NETID_REALM_SZ];
+         WCHAR ccache[NETID_CCACHE_NAME_SZ];
+     } out;
+     // Version 1 of this structure ends here
+ } NETID_DLGINFO, *LPNETID_DLGINFO;
+   
+ #define NETID_DLGINFO_V1_SZ (10 * sizeof(DWORD) \
+          + sizeof(WCHAR) * (NETID_TITLE_SZ + \
+          2 * NETID_USERNAME_SZ + 2 * NETID_REALM_SZ + \
+          2 * NETID_CCACHE_NAME_SZ))
+ 
+ /*!@} */
+ /*!@} */
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/khrescache.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/khrescache.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/khrescache.h	Thu Oct 12 17:42:41 2006
***************
*** 0 ****
--- 1,100 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: khrescache.h,v 1.1.2.2 2006/10/12 21:42:41 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_RESCACHE_H
+ #define __KHIMAIRA_RESCACHE_H
+ 
+ #include<khdefs.h>
+ 
+ KHMEXP void KHMAPI 
+ khui_init_rescache(void);
+ 
+ KHMEXP void KHMAPI 
+ khui_exit_rescache(void);
+ 
+ KHMEXP void KHMAPI 
+ khui_cache_bitmap(UINT id, HBITMAP hbm);
+ 
+ KHMEXP HBITMAP KHMAPI 
+ khui_get_cached_bitmap(UINT id);
+ 
+ typedef struct khui_ilist_t {
+     int cx;
+     int cy;
+     int n;
+     int ng;
+     int nused;
+     HBITMAP img;
+     HBITMAP mask;
+     int *idlist;
+ } khui_ilist;
+ 
+ typedef struct khui_bitmap_t {
+     HBITMAP hbmp;
+     int cx;
+     int cy;
+ } khui_bitmap;
+ 
+ KHMEXP void KHMAPI  
+ khui_bitmap_from_hbmp(khui_bitmap * kbm, HBITMAP hbm);
+ 
+ KHMEXP void KHMAPI
+ khui_delete_bitmap(khui_bitmap * kbm);
+ 
+ KHMEXP void KHMAPI
+ khui_draw_bitmap(HDC hdc, int x, int y, khui_bitmap * kbm);
+ 
+ /* image lists */
+ KHMEXP khui_ilist * KHMAPI  
+ khui_create_ilist(int cx, int cy, int n, int ng, int opt);
+ 
+ KHMEXP BOOL KHMAPI          
+ khui_delete_ilist(khui_ilist * il);
+ 
+ KHMEXP int KHMAPI           
+ khui_ilist_add_masked(khui_ilist * il, HBITMAP hbm, COLORREF cbkg);
+ 
+ KHMEXP int KHMAPI           
+ khui_ilist_add_masked_id(khui_ilist *il, HBITMAP hbm, 
+                          COLORREF cbkg, int id);
+ 
+ KHMEXP int KHMAPI           
+ khui_ilist_lookup_id(khui_ilist *il, int id);
+ 
+ KHMEXP void KHMAPI          
+ khui_ilist_draw(khui_ilist * il, int idx, HDC dc, int x, int y, int opt);
+ 
+ KHMEXP void KHMAPI          
+ khui_ilist_draw_bg(khui_ilist * il, int idx, HDC dc, int x, int y, 
+                    int opt, COLORREF bgcolor);
+ 
+ #define khui_ilist_draw_id(il, id, dc, x, y, opt) \
+     khui_ilist_draw((il),khui_ilist_lookup_id((il),(id)),(dc),(x),(y),(opt))
+ 
+ #define KHUI_SMICON_CX 16
+ #define KHUI_SMICON_CY 16
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/khtracker.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/khtracker.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/khtracker.h	Thu Oct 12 17:42:41 2006
***************
*** 0 ****
--- 1,114 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: khtracker.h,v 1.1.2.2 2006/10/12 21:42:41 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_TRACKERWND_H
+ #define __KHIMAIRA_TRACKERWND_H
+ 
+ #include<time.h>
+ 
+ /*! \addtogroup khui 
+ 
+ @{ */
+ 
+ /*!\defgroup khui_trk Duration sliders
+ 
+ The duration sliders in the UI are pseudo-log-scaled.  This is based
+ on the assumption that people don't really need 1 minute accuracy when
+ setting a duration that's several hours long.  As a result, it is
+ easier to hone in on the duration that you want without having
+ wizardly mouse maneuvering skillz.
+ 
+ Following are the duration ranges and the granularity that is offered
+ in each range:
+ 
+ <table>
+ <tr><td> Range     </td><td> Increment</td></tr>
+ <tr><td> 0..5m     </td><td> 1 min    </td></tr>
+ <tr><td> 5m..1hr   </td><td> 5 min    </td></tr>
+ <tr><td> 1hr..4hr  </td><td> 15 min   </td></tr>
+ <tr><td> 4hr..10hr </td><td> 30 min   </td></tr>
+ <tr><td> 10hr..24hr</td><td> 1 hr     </td></tr>
+ <tr><td> 24hr..4d  </td><td> 6 hr     </td></tr>
+ <tr><td> 4d..      </td><td> 1 day    </td></tr>
+ </table>
+ 
+ We don't really adjust for durations over 4 days.  The ranges we are
+ concerned with don't get much larger.
+ 
+ For the purpose of writing this piece of code, I have chosen the term
+ "tick" to refer to a period of granularity.  The number of periods of
+ granularity (inclusive) within a certain duration interval is referred
+ to as the number of ticks in the interval.  For example, there are 4
+ ticks between the interval of 3 minutes to 10 minutes.  Each occuring
+ at the start of 3min, 4, 5 and 10mins.  And thusly the slider control
+ will display 4 ticks if it is displaying the interval 3-10mins.
+ 
+ @{*/
+ 
+ /*! \brief Tracker data */
+ typedef struct tag_khui_tracker {
+     WNDPROC fn_edit;
+     WNDPROC fn_tracker;
+     HWND hw_slider;
+     HWND hw_edit;
+     int lbl_y;
+     int lbl_lx;
+     int lbl_rx;
+     DWORD act_time;
+ 
+     time_t current;             /*!< Current selection */
+     time_t min;                 /*!< Minimum (inclusive)  */
+     time_t max;                 /*!< Maximum (inclusive) */
+ } khui_tracker;
+ 
+ /*! \brief Install a tracker into an edit control
+ 
+     Once installed, the edit control becomes a duration editor.  The
+     tracker data structure that is supplied should remain as is for
+     the lifetime of the edit control.
+ 
+     The tracker strucutre should have been initialized with a call to
+     khui_tracker_initialize() and should have valid values in the \a
+     min, \a max and \a current fields.
+  */
+ KHMEXP void KHMAPI
+ khui_tracker_install(HWND hwnd_edit, khui_tracker * tc);
+ 
+ KHMEXP void KHMAPI
+ khui_tracker_reposition(khui_tracker * tc);
+ 
+ KHMEXP void KHMAPI
+ khui_tracker_initialize(khui_tracker * tc);
+ 
+ KHMEXP void KHMAPI
+ khui_tracker_refresh(khui_tracker * tc);
+ 
+ KHMEXP void KHMAPI
+ khui_tracker_kill_controls(khui_tracker * tc);
+ /*!@}*/
+ /*!@}*/
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/khuidefs.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/khuidefs.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/khuidefs.h	Thu Oct 12 17:42:41 2006
***************
*** 0 ****
--- 1,92 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: khuidefs.h,v 1.1.2.2 2006/10/12 21:42:41 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_KHUIDEFS_H
+ #define __KHIMAIRA_KHUIDEFS_H
+ 
+ #include<windows.h>
+ #include<kmq.h>
+ #include<kcreddb.h>
+ #include<kherror.h>
+ #include<kherr.h>
+ #include<khmsgtypes.h>
+ 
+ #include<khaction.h>
+ #include<khactiondef.h>
+ #include<khrescache.h>
+ #include<khhtlink.h>
+ #include<khnewcred.h>
+ #include<khprops.h>
+ #include<khalerts.h>
+ #include<khconfigui.h>
+ #include<khtracker.h>
+ 
+ #include<khremote.h>
+ 
+ /*! \internal */
+ KHMEXP void KHMAPI
+ khm_version_init(void);
+ 
+ /*! \defgroup khui User Interface
+ 
+     Functions and data structures for interacting with the user
+     interface.
+ 
+ @{*/
+ 
+ /*! \brief Get the version of the NetIDMgr library
+ 
+     \param[out] libver Receives the version of the library.
+ 
+     \param[out] apiver Receives the API version of the library.
+         Optional.  Set to NULL if this value is not required.
+ 
+     \note When the NetIDMgr framework loads a plugin, it checks the
+         version information of the plugin against the version of the
+         library to determine if the plugin is compatible.
+  */
+ KHMEXP void KHMAPI
+ khm_get_lib_version(khm_version * libver, khm_ui_4 * apiver);
+ 
+ /*! \brief Return the version of Common Control library
+ 
+     Can be used to check the version of the Windows Common Control
+     library that is currently loaded.  The return value of the
+     function is the packed version value obatained by the macro :
+ 
+     \code
+     MAKELONG(vesion->dwMinorVersion, version->dwMajorVersion);
+     \endcode
+ 
+     The \a pdvi parameter is optional.  Specify NULL if this is not
+     required.
+  */
+ KHMEXP khm_ui_4 KHMAPI
+ khm_get_commctl_version(khm_version * pdvi);
+ 
+ /*!@}*/
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/kmm.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/kmm.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/kmm.h	Thu Oct 12 17:42:41 2006
***************
*** 0 ****
--- 1,1068 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: kmm.h,v 1.1.2.2 2006/10/12 21:42:41 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_KMM_H
+ #define __KHIMAIRA_KMM_H
+ 
+ #include<khdefs.h>
+ #include<kmq.h>
+ 
+ /*! \defgroup kmm NetIDMgr Module Manager
+ @{*/
+ 
+ /*! \brief A handle to a module.
+ */
+ typedef khm_handle kmm_module;
+ 
+ /*! \brief A handle to a plugin.
+  */
+ typedef khm_handle kmm_plugin;
+ 
+ /*! \name Limits
+   @{*/
+ 
+ /*! \brief Maximum number of characters in a name in KMM including the terminating NULL */
+ #define KMM_MAXCCH_NAME 256
+ 
+ /*! \brief Maximum number of bytes in a name in KMM including the terminating NULL */
+ #define KMM_MAXCB_NAME (sizeof(wchar_t) * KMM_MAXCCH_NAME)
+ 
+ /*! \brief Maximum number of characters in a description in KMM including the terminating NULL */
+ #define KMM_MAXCCH_DESC 512
+ 
+ /*! \brief Maximum number of bytes in a description in KMM including the terminating NULL */
+ #define KMM_MAXCB_DESC (sizeof(wchar_t) * KMM_MAXCCH_NAME)
+ 
+ /*! \brief Maximum number of characters in a vendor string in KMM including the terminating NULL */
+ #define KMM_MAXCCH_VENDOR 256
+ 
+ /*! \brief Maximum number of bytes in a vendor string in KMM including the terminating NULL */
+ #define KMM_MAXCB_VENDOR (sizeof(wchar_t) * KMM_MAXCCH_VENDOR)
+ 
+ /*! \brief Maximum number of characters in a support URI in KMM including the terminating NULL */
+ #define KMM_MAXCCH_SUPPORT 256
+ 
+ /*! \brief Maximum number of bytes in a vendor string in KMM including the terminating NULL */
+ #define KMM_MAXCB_SUPPORT (sizeof(wchar_t) * KMM_MAXCCH_SUPPORT)
+ 
+ /*! \brief Maximum number of dependencies per plugin
+ */
+ #define KMM_MAX_DEPENDENCIES    8
+ 
+ /*! \brief Maximum number of dependants per plugin
+  */
+ #define KMM_MAX_DEPENDANTS      32
+ 
+ /*! \brief Maximum number of characters a dependency string including trailing double NULL */
+ #define KMM_MAXCCH_DEPS (KMM_MAXCCH_NAME * KMM_MAX_DEPENDENCIES + 1)
+ 
+ /*! \brief Maximum number of bytes in a dependency string including trailing double NULL */
+ #define KMM_MAXCB_DEPS (sizeof(wchar_t) * KMM_MAXCCH_DEPS)
+ /*@}*/ /* Limits */
+ 
+ /*! \brief Plugin registration
+ 
+     \see ::khm_cred_provider
+ */
+ typedef struct tag_kmm_plugin_reg {
+     wchar_t *   name;           /*!< Name of the plugin.  Maximum of
+                                      KMM_MAXCCH_NAME characters
+                                      including the terminating
+                                      NULL. Required. */
+ 
+     wchar_t *   module;         /*!< Name of module that owns the
+                                      plugin. Maximum of
+                                      KMM_MAXCCH_NAME characters
+                                      including terminating NULL.
+                                      Required. */
+ 
+     khm_int32   type;           /*!< Type plugin type.  One of
+                                      KHM_PITYPE_*. Required. */
+     khm_int32   flags;          /*!< Unused. Set to 0 */
+     kmq_callback_t msg_proc;    /*!< Message processor.  Required. */
+     wchar_t *   dependencies;   /*!< Dependencies.  Note that this is
+                                      a multi string.  (you can use the
+                                      KHC multi string functions to
+                                      manipulate multi strings or to
+                                      convert a comma separated list of
+                                      dependencies to a multi string).
+                                      Each string in the multi string
+                                      is a name of a plugin that this
+                                      plugin depends on.  Optional (set
+                                      to NULL if this plugin has no
+                                      dependencies). Maximum of
+                                      KMM_MAXCCH_DEPS characters
+                                      including terminating double
+                                      NULL.*/
+ 
+     wchar_t *   description;    /*!< Description of the plugin.
+                                      Maximum of KMM_MAXCCH_DESC
+                                      characters including the
+                                      terminating
+                                      NULL. Localized. Optional (set to
+                                      NULL if not provided) */
+ #ifdef _WIN32
+     HICON       icon;           /*!< Icon used to represent the
+                                      plugin. Optional. (set to NULL if
+                                      not provided) */
+ #endif
+ } kmm_plugin_reg;
+ 
+ /*! \brief Plugin information
+ */
+ typedef struct tag_kmm_plugin_info {
+     kmm_plugin_reg reg;         /*!< Registration info */
+ 
+     khm_int32   state;          /*!< Current status of the plugin.
+                                   One of ::_kmm_plugin_states */
+ 
+     khm_int32   failure_count;  /*!< Number of recorded failures in
+ 				     the plugin */
+     FILETIME    failure_time;   /*!< Time of first recorded failure */
+     khm_int32   failure_reason; /*!< The reason for the first recorded
+ 				     failure */
+ 
+     kmm_plugin  h_plugin;       /*!< Handle to plugin */
+ 
+     khm_int32   flags;          /*!< Flags for the plugin. Currently
+                                   this can only specify
+                                   ::KMM_PLUGIN_FLAG_DISABLED. */
+ } kmm_plugin_info;
+ 
+ /*! \brief The plugin is disabled
+ 
+     This flag will be set in the \a flags field of the
+     ::kmm_plugin_info structure for a plugin that has been marked as
+     disabled.  If the plugin is currently running, but marked as
+     disabled for future sessions, then this bit will be set in \a
+     flags , but the \a state of the plugin will indicate that the
+     plugin is running.
+  */
+ #define KMM_PLUGIN_FLAG_DISABLED    0x00000400
+ 
+ /*! \name Plugin types
+ @{*/
+ /*! \brief A credentials provider
+ 
+     \see \ref pi_pt_cred for more information.
+  */
+ #define KHM_PITYPE_CRED     1
+ 
+ /*! \brief A identity provider 
+ 
+     \see \ref pi_pt_cred for more information
+  */
+ #define KHM_PITYPE_IDENT    2
+ 
+ /*! \brief A configuration provider
+ 
+     \see \ref pi_pt_conf for more information.
+  */
+ #define KHM_PITYPE_CONFIG   3
+ 
+ /*! \brief Undefined plugin type
+ 
+     The plugin doesn't provide any credential type.
+  */
+ #define KHM_PITYPE_MISC     4
+ 
+ /*@}*/
+ 
+ /*! \brief Plugin states */
+ enum _kmm_plugin_states {
+     KMM_PLUGIN_STATE_FAIL_INIT = -6,    /*!< Failed to initialize */
+     KMM_PLUGIN_STATE_FAIL_UNKNOWN = -5, /*!< Failed due to unknown
+                                           reasons */
+     KMM_PLUGIN_STATE_FAIL_MAX_FAILURE = -4, /*!< The plugin has
+                                           reached the maximum number
+                                           of failures and cannot be
+                                           initialized until the
+                                           failure count is reset */
+     KMM_PLUGIN_STATE_FAIL_NOT_REGISTERED = -3, /*!< Failed because the
+                                           plugin was not registered
+                                           and automatic registration
+                                           failed. */
+     KMM_PLUGIN_STATE_FAIL_DISABLED = -2,/*!< Failed because plugin was
+                                           disabled by the user. */
+     KMM_PLUGIN_STATE_FAIL_LOAD = -1,    /*!< The plugin failed to load
+                                           due to some unknown
+                                           reason. */
+     KMM_PLUGIN_STATE_NONE = 0,          /*!< Unknown state */
+     KMM_PLUGIN_STATE_PLACEHOLDER,       /*!< Placeholder.  The plugin
+                                           hasn't been provided by
+                                           anyone yet, but the plugin
+                                           record has been created to
+                                           keep track of
+                                           dependencies. */
+     KMM_PLUGIN_STATE_REG,               /*!< The plugin is registered
+                                           but not initialized */
+     KMM_PLUGIN_STATE_PREINIT,           /*!< The plugin is in the
+                                           process of being
+                                           initialized */
+     KMM_PLUGIN_STATE_HOLD,              /*!< On hold.  One or more
+                                           dependencies of this plugin
+                                           has not been resolved */
+     KMM_PLUGIN_STATE_INIT,              /*!< The plugin was initialized */
+     KMM_PLUGIN_STATE_RUNNING,           /*!< The plugin is running */
+     KMM_PLUGIN_STATE_EXITED             /*!< The plugin has been stopped. */
+ };
+ 
+ /*! \brief Module registration */
+ typedef struct tag_kmm_module_reg {
+     wchar_t *   name;               /*!< Identifier for the module */
+     wchar_t *   path;               /*!< Full pathname to module
+ 				         binary */
+ 
+     wchar_t *   description;        /*!< Description of module */
+ 
+     wchar_t *   vendor;             /*!< Vendor/copyright string */
+ 
+     wchar_t *   support;            /*!< Support URL/contact */
+ 
+     khm_int32   n_plugins;          /*!< Number of plugins that are
+ 				         active */
+     kmm_plugin_reg * plugin_reg_info;  /*!< Array of kmm_plugin_reg
+ 				         records for each active
+ 				         plugin */
+ } kmm_module_reg;
+ 
+ /*! \brief Module information record */
+ typedef struct tag_kmm_module_info {
+     kmm_module_reg reg;             /*!< Registration info */
+ 
+     khm_ui_4    language;           /*!< Currently loaded langugage */
+ 
+     khm_int32   state;              /*!< Current status of the
+ 				         module */
+ 
+     khm_version file_version;       /*!< File version for the
+ 				         module */
+     khm_version product_version;    /*!< Product version for the
+ 				         module */
+ 
+     khm_int32   failure_count;      /*!< Number of times the module
+ 				         has failed to load */
+     FILETIME    failure_time;       /*!< Time of first recorded
+ 				         failure */
+     khm_int32   failure_reason;     /*!< Reason for first failure.
+ 				         One of the module status
+ 				         values */
+ 
+     kmm_module  h_module;           /*!< Handle to the module. */
+ } kmm_module_info;
+ 
+ /*! \brief Module states
+ */
+ enum KMM_MODULE_STATES {
+     KMM_MODULE_STATE_FAIL_INCOMPAT=-12, /*!< The library containing
+                                           the module was not
+                                           compatible with this version
+                                           of NetIDMgr. */
+     KMM_MODULE_STATE_FAIL_INV_MODULE=-11, /*!< The library containing
+                                             the module was invalid. */
+     KMM_MODULE_STATE_FAIL_UNKNOWN=-10,   /*!< Module could not be
+                                           loaded due to unknown
+                                           reasons. */
+     KMM_MODULE_STATE_FAIL_MAX_FAILURE=-9,/*!< The module has failed
+                                           too many times already.  Not
+                                           attempting to restart it
+                                           again */
+     KMM_MODULE_STATE_FAIL_DUPLICATE=-8, /*!< An attempt was made to
+                                           load the same module
+                                           twice. */
+     KMM_MODULE_STATE_FAIL_NOT_REGISTERED=-7, /*!< The module is not
+                                           found among the registered
+                                           module list */
+     KMM_MODULE_STATE_FAIL_NO_PLUGINS=-6,/*!< The module provided no
+                                           plugins, or all the plugins
+                                           that are provided are
+                                           disabled */
+     KMM_MODULE_STATE_FAIL_DISABLED=-5,  /*!< Module is disabled and
+                                           cannot be loaded */
+     KMM_MODULE_STATE_FAIL_LOAD=-4,      /*!< The module failed to
+                                           initialize */
+     KMM_MODULE_STATE_FAIL_INVALID=-3,   /*!< The module was invalid.
+                                           Typically caused by the
+                                           required entrypoints not
+                                           being present */
+     KMM_MODULE_STATE_FAIL_SIGNATURE=-2, /*!< The module failed to load
+                                           due to an unverifiable
+                                           signature */
+     KMM_MODULE_STATE_FAIL_NOT_FOUND=-1, /*!< The module was not
+                                           found */
+     KMM_MODULE_STATE_NONE=0,            /*!< Unknown state. The handle
+                                           is possibly invalid */
+     KMM_MODULE_STATE_PREINIT,           /*!< The module is being
+                                           loaded. init_module() hasn't
+                                           been called yet */
+     KMM_MODULE_STATE_INIT,              /*!< In init_module() */
+     KMM_MODULE_STATE_INITPLUG,          /*!< Initializing plugins */
+     KMM_MODULE_STATE_RUNNING,           /*!< Running */
+     KMM_MODULE_STATE_EXITPLUG,          /*!< Currently exiting plugins */
+     KMM_MODULE_STATE_EXIT,              /*!< Currently exiting */
+     KMM_MODULE_STATE_EXITED             /*!< Exited */
+ };
+ 
+ /*! \brief Start the Module Manager
+ 
+     \note Only called by the NetIDMgr core.
+ */
+ KHMEXP void KHMAPI 
+ kmm_init(void);
+ 
+ /*! \brief Stop the Module Manager
+ 
+     \note Only called by the NetIDMgr core.
+ */
+ KHMEXP void KHMAPI 
+ kmm_exit(void);
+ 
+ /*! \brief Return the plugin handle for the current plugin
+ 
+     The returned handle represents the plugin which owns the current
+     thread.  The returned handle must be released by calling
+     kmm_release_plugin().  Returns NULL if the current thread is not
+     owned by any plugin.
+  */
+ KHMEXP kmm_plugin KHMAPI 
+ kmm_this_plugin(void);
+ 
+ /*! \brief Return the module handle for the current module
+ 
+     The returned handle represents the module which owns the current
+     thread.  The returned handle must be released by calling
+     kmm_release_module()
+ */
+ KHMEXP kmm_module KHMAPI 
+ kmm_this_module(void);
+ 
+ /*! \name Flags for kmm_load_module()
+ @{*/
+ /*!\brief Load synchronously
+ 
+     If this flag is set, then the function waits for the module to be
+     loaded.  The default is to load the module asynchronously.
+ 
+     When loading a module asynchronously, the kmm_load_module()
+     function returns KHM_ERROR_SUCCESS and exits without waiting for
+     the module to load.  If \a result is not NULL, it will receive a
+     valid handle to the module.
+ 
+     When loading a module synchronously, kmm_load_module() will wait
+     for the module to completely load.  If it fails to load properly,
+     it will return an error code and set \a result to NULL.
+ */
+ #define KMM_LM_FLAG_SYNC    1
+ 
+ /*! \brief Do not load
+ 
+     Indicates that the module shouldn't actually be loaded.  If the
+     specified module name identifies a module that has already been
+     loaded, then the function returns a held handle to the existing
+     module (use kmm_release_module() to free the handle).  Otherwise,
+     the function returns KHM_ERROR_NOT_FOUND.
+ */
+ #define KMM_LM_FLAG_NOLOAD  2
+ /*@}*/
+ 
+ /*! \brief Load a module
+ 
+     The \a modulename parameter specifies a module to load.  Depending
+     on the configuration, not all of the plugins that are provided by
+     the module may be loaded.  If no plugins are successfully loaded,
+     the module will be immediately unloaded.
+ 
+     If the module is currently loaded or is being loaded, then a valid
+     handle to the existing module is returned.
+ 
+     When called with KMM_LM_FLAG_SYNC, the function does not return
+     until the module and the associated plugins are all initialized,
+     or an error occurs.
+ 
+     If the KMM_LM_FLAG_NOLOAD flag is set, then a handle to an
+     existing instance of the module will be returned.  If the module
+     hasn't been loaded yet, then no handle is returned and the
+     function returns KHM_ERROR_NOT_FOUND.
+ 
+     See the associated NetIDMgr Module Manager documentation on the
+     sequence of events associated with loading a module.
+ 
+     \param[in] modulename Name of the module.  The module should have
+         been registered under this name prior to the call.
+     \param[in] flags Combination of KMM_LM_FLAG_*
+     \param[out] result Receives a handle to the loaded module.  If the
+         result is not required, set this to NULL. If \a result is not
+         NULL, and km_load_module() returns KHM_ERROR_SUCCESS, then
+         kmm_release_module() must be called to release the handle to
+         the module.  Otherwise, \a result receives NULL.  If a handle
+         is returned, it will be valid regardless of whether the module
+         fails to load or not.  You can use kmm_get_module_state() to
+         query the progress of the loading process.  See
+         ::KMM_LM_FLAG_SYNC.
+ 
+     \retval KHM_ERROR_SUCCESS The call succeeded.  If \a
+         KMM_LM_FLAG_SYNC was specified, this means that the module was
+         successfully loaded.  Otherwise, it only means that the module
+         has been queued up for loading.  Use kmm_get_module_state() to
+         determine if it was successfully loaded.  If \a result is not
+         NULL, a valid handle is returned.
+     \retval KHM_ERROR_EXISTS The module is already loaded or has been
+         already queued for loading.  If \a result is not NULL, a valid
+         handle to the existing module instance is returned.
+     \retval KHM_ERROR_NOT_FOUND If called with KMM_LM_FLAG_NOLOAD,
+         indicates that the module has not been loaded.  Otherwise only
+         returned when called with KMM_LM_FLAG_SYNC.  The module image
+         was not found.  No handle is returned.
+     \retval KHM_ERROR_INVALID_SIGNATURE Only returned when called with
+         KMM_LM_FLAG_SYNC.  The module was signed with an invalid
+         certificate.  No handle is returned.
+     \retval KHM_ERROR_UNKNOWN Only returned when called with
+         KMM_LM_FLAG_SYNC.  Some other error has occured.  No handle is
+         returned.
+ 
+     \see \ref pi_fw_pm_load
+     \see ::KMM_LM_FLAG_SYNC, ::KMM_LM_FLAG_NOLOAD
+ */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_load_module(wchar_t * modname, khm_int32 flags, kmm_module * result);
+ 
+ /*! \brief Hold a handle to a module
+ 
+     Use kmm_release_module() to release the hold.
+ */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_hold_module(kmm_module module);
+ 
+ /*! \brief Release a handle to a module
+ 
+     Release a held referece to a module that was returned in a call to 
+     kmm_load_module().
+ */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_release_module(kmm_module m);
+ 
+ /*! \brief Query the state of a module
+ 
+     When loading a module asynchronously you can query the state of
+     the loading process using this.  The return value is a status
+     indicator.
+ 
+     \return The return value is one of the ::KMM_MODULE_STATES
+         enumerations.
+ */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_get_module_state(kmm_module m);
+ 
+ /*! \brief Unload a module
+ 
+     See the associated NetIDMgr Module Manager documentation on the
+     sequence of events associated with unloading a module.
+ 
+     \see \ref pi_fw_pm_unload
+ */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_unload_module(kmm_module module);
+ 
+ /*! \brief Loads the default modules as specified in the configuration
+ 
+     The configuration can specify the default set of modules to load.
+     This function dispatches the necessary message for loading these
+     modules and reutnrs.
+ */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_load_default_modules(void);
+ 
+ /*! \brief Checks whether there are any pending loads
+ 
+     Returns TRUE if there are modules still waiting to be loaded.
+ */
+ KHMEXP khm_boolean  KHMAPI
+ kmm_load_pending(void);
+ 
+ #ifdef _WIN32
+ 
+ /*! \brief Returns the Windows module handle from a handle to a NetIDMgr module.
+     Although it is possible to obtain the Windows module handle and
+     use it to call Windows API functions, it is not recommended to do
+     so.  This is because that might cause the state of the module to
+     change in ways which are inconsistent from the internal data
+     structures that kmm maintains.
+  */
+ KHMEXP HMODULE     KHMAPI 
+ kmm_get_hmodule(kmm_module m);
+ #endif
+ 
+ /*! \brief Hold a plugin
+ 
+     Obtains a hold on a plugin.  The plugin handle will remain valid
+     until the hold is released with a call to kmm_release_plugin().
+     No guarantees are made on the handle once the handle is released.
+  */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_hold_plugin(kmm_plugin p);
+ 
+ /*! \brief Release a plugin
+ 
+     Releases a hold on a plugin obtained through a call to
+     kmm_hold_plugin().  The plugin handle should no longer be
+     considered valied once this is called.
+  */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_release_plugin(kmm_plugin p);
+ 
+ /*! \brief Provide a plugin
+ 
+     This function must be called for each plugin that the module
+     provides.
+ 
+     Note that this function returns immediately and does not
+     initialize the plugin.  All plugins that are provided by a
+     module will be initialized once the init_module() function
+     returns.  If the plugin has dependencies, it will be kept in a
+     held state until the plugins that it depends on are successfully
+     initialized.  If the dependencies are not resolved (the dependent
+     plugins are not loaded), then plugin will not be initialized.
+ 
+     If the plugin is not registered and \a plugin contains enough
+     information to perform the registration, then it will be
+     automatically registered.  However, if the plugin is not
+     registered and cannot be registered using the provided
+     information, the plugin will not be initialized properly.  Note
+     that automatic registration will always register the plugin in the
+     user configuration store.
+ 
+     The \a name and \a msg_proc members of \a plugin are required to
+     have valid values.  The \a icon member may optionally be
+     specified.  The other fields can be specified if the plugin should
+     be automatically registered, however, the \a module field will be
+     ignored and will be determined by the \a module handle.
+ 
+     \param[in] module Handle to this module that is providing the plugin.
+     \param[in] plugin A plugin descriptor.
+ 
+     \retval KHM_ERROR_SUCCESS Succeeded.
+     \retval KHM_ERROR_INVALID_OPERATION The function was not called
+         during init_module()
+     \retval KHM_ERROR_INVALID_PARAM One or more parameters were invalid
+     \retval KHM_ERROR_DUPLICATE The plugin was already provided
+ 
+     \note This can only be called when handing init_module()
+ */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_provide_plugin(kmm_module module, kmm_plugin_reg * plugin);
+ 
+ /*! \brief Query the state of a plugin.
+ 
+     \return One of ::_kmm_plugin_states
+ */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_get_plugin_state(wchar_t * plugin);
+ 
+ /*! \defgroup kmm_reg Registration
+ 
+     The functions for managing plugin and module registration.  These
+     functions are also available as static linked libraries for use by
+     external applications which must register or unregister plugins or
+     modules.
+ @{*/
+ 
+ /*! \brief Obtain the configuration space for a named plugin
+ 
+     Note that the named plugin does not have to actually exist.
+     Configuration spaces for plugins are based solely on the plugin
+     name and hence can be accessed regardless of whether the specific
+     plugin is loaded or not.
+ 
+     \param[in] flags Controls the options for opening the
+         configuration space.  If KHM_FLAG_CREATE is specified, then
+         the configuration space for the plugin named \a plugin wil be
+         created if it doesn't already exist.  The \a flags parameter
+         is directly passed into a call to khc_open_space().
+ 
+     \param[in] plugin Name of the plugin.  The name can not contain
+         slashes.
+ 
+     \param[out] result Receives a configuration space handle.  The
+         calling application should free the handle using
+         khc_close_space().
+ 
+     \see khc_open_space()
+     \see khc_close_space()
+  */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_get_plugin_config(wchar_t * plugin, khm_int32 flags, khm_handle * result);
+ 
+ /*! \brief Obtain the configuration space or a named module
+ 
+     The named module does not have to actually exist.  Configuration
+     spaces for modules are based on the basename of the module
+     (including the extension).
+ 
+     \param[in] module Name of the module.
+ 
+     \param[in] flags The flags used to call khc_open_space().  You can
+         use this to specify a particular configuration store if
+         needed.
+ 
+     \param[out] result Receives the handle to a configuration space if
+         successful.  Call khc_close_space() to close the handle.
+ 
+     \see khc_open_space()
+     \see khc_close_space()
+ */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_get_module_config(wchar_t * module, khm_int32 flags, khm_handle * result);
+ 
+ /*! \brief Retrieve a handle to the configuration space for plugins
+ 
+     The configuration space for plugins is a container which holds the
+     configuration subspaces for all the plugins.  This is the config
+     space which must be used to load a configuration space for a
+     plugin.
+ 
+     \param[in] flags The flags to pass in to the call to
+         khc_open_space().  The flags can be used to select a specific
+         configuration store if needed.
+ 
+     \param[out] result Receives a handle to the configuration
+         space. Call khc_close_space() to close the handle
+ 
+     \see khc_open_space()
+     \see khc_close_space()
+  */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_get_plugins_config(khm_int32 flags, khm_handle * result);
+ 
+ /*! \brief Retrieve the handle to the configuration space for modules
+ 
+     The configuration space for modules is a container which hold the
+     configuration subspaces for all the modules.  Each module
+     registration ends up in this subspace.
+ 
+     \param[in] flags The flags to pass in to the call to
+         khc_open_space().  The flags can be used to select a specific
+         configuration store if needed.
+ 
+     \param[out] result Receives a handle to the configuration space.
+         Call khc_close_space() to close the handle.
+ 
+     \see khc_open_space()
+     \see khc_close_space()
+  */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_get_modules_config(khm_int32 flags, khm_handle * result);
+ 
+ /*! \brief Return information about a loaded module
+ 
+     The retrieves a block of information about a module.  Refer to
+     ::kmm_module_info for information about the format of the returned
+     data.
+ 
+     Note that the size of the required buffer is actually greater than
+     the size of the ::kmm_module_info structure and accomodates the
+     ::kmm_plugin_info structures and strings required to complete the
+     information block.
+ 
+     Call the function with \a buffer set to NULL and \a cb_buffer
+     pointing at a khm_size variable to obtain the required size of the
+     buffer.
+ 
+     \param[in] module_name Name of a module
+     \param[in] flags Flags indicating which types of information to
+         return
+     \param[out] buffer Points to a buffer that recieves information.
+         Set this to NULL if only the size of the buffer is required.
+     \param[in,out] On entry, contains the size of the buffer pointed
+         to by \a buffer if \a buffer is not NULL. On exit, contains
+         the required size of the buffer or the number of actual bytes
+         copied.
+ 
+     \retval KHM_ERROR_SUCCESS The requested information was copied
+     \retval KHM_ERROR_INVALID_PARAM One of the parameters was invalid
+     \retval KHM_ERROR_TOO_LONG The buffer was not large enough or was
+         NULL.  The number of bytes requied is in \a cb_buffer.
+     \retval KHM_ERROR_NOT_FOUND The specified module is not a
+         registered module.
+  */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_get_module_info(wchar_t *  module_name, khm_int32 flags, 
+                     kmm_module_info * buffer, khm_size * cb_buffer);
+ 
+ /*! \brief Get information about a module
+ 
+     Similar to kmm_get_module_info(), but uses a module handle instead
+     of a name, and uses internal buffers for providing string fields.
+ 
+     The information that is returned should be freed using a call to
+     kmm_release_module_info_i().
+ 
+     \see kmm_release_module_info_i()
+  */
+ KHMEXP khm_int32   KHMAPI
+ kmm_get_module_info_i(kmm_module module, kmm_module_info * info);
+ 
+ /*! \brief Release module information
+ 
+     Releases the information returned by a previous call to
+     kmm_get_module_info_i().  The contents of the ::kmm_module_info
+     structure should not have been modified in any way between calling
+     kmm_get_module_info_i() and kmm_release_module_info_i().
+  */
+ KHMEXP khm_int32   KHMAPI
+ kmm_release_module_info_i(kmm_module_info * info);
+ 
+ /*! \brief Obtain information about a plugin
+ 
+     Retrieve a block of information about a plugin.  See
+     ::kmm_plugin_info for details about what information can be
+     returned.  Note that some fields may not be available if the
+     module is not loaded.
+ 
+     Note that the size of the required buffer is greater than the size
+     of the ::kmm_plugin_info structure and accounts for strings as
+     well.  Call kmm_get_plugin_info() with \a buffer set to NULL and
+     \a cb_buffer set to point to a variable of type \a khm_size to
+     obtain the required size of the structure.
+ 
+     \param[in] plugin_name Name of the plugin
+     \param[out] buffer The buffer to receive the plugin information.
+         Set to \a NULL if only the size of the buffer is required.
+     \param[in,out] cb_buffer On entry, points to variable that
+         specifies the size of the buffer pointed to by \a buffer is \a
+         buffer is not \a NULL.  On exit, holds the number of bytes
+         copied or the required size of the buffer.
+ 
+     \retval KHM_ERROR_SUCCESS The requested information was
+         successfully copied to the \a buffer
+     \retval KHM_ERROR_TOO_LONG The buffer was either \a NULL or
+         insufficient to hold the requested information.  The required
+         size of the buffer was stored in \a cb_buffer
+     \retval KHM_ERROR_INVALID_PARAM One or more parameters were
+         invlaid.
+     \retval KHM_ERROR_NOT_FOUND The specified plugin was not found
+         among the registered plugins.
+ */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_get_plugin_info(wchar_t * plugin_name, 
+                     kmm_plugin_info * buffer, 
+                     khm_size * cb_buffer);
+ 
+ /*! \brief Obtain information about a plugin using a plugin handle
+ 
+     Similar to kmm_get_plugin_info() but uses a plugin handle instead
+     of a plugin name.  If the call is successful, the \a info
+     structure will be filled with information about the plugin.  The
+     returned info should not be modified in any way and may contain
+     pointers to internal buffers.
+ 
+     The returned information must be released with a call to
+     kmm_release_plugin_info_i().
+  */
+ KHMEXP khm_int32   KHMAPI
+ kmm_get_plugin_info_i(kmm_plugin p, kmm_plugin_info * info);
+ 
+ /*! \brief Release plugin information returned by kmm_get_plugin_info_i
+ 
+     The information returned by kmm_get_plugin_info_i() should not be
+     modified in any way before calling kmm_release_plugin_info_i().
+     Once the call completes, the contents of \a info will be
+     initialized to zero.
+  */
+ KHMEXP khm_int32   KHMAPI
+ kmm_release_plugin_info_i(kmm_plugin_info * info);
+ 
+ /*! \brief Enumerates plugins
+ 
+     Enumerates through known plugins.  This list may not include
+     plugins which were not loaded by NetIDMgr in this session.
+ 
+     If the call is successful, a handle to the next plugin in the list
+     will be placed in \a p_next.  The returned handle must be freed
+     with a call to kmm_release_plugin().
+ 
+     If the \a p parameter is set to NULL, then the first plugin handle
+     will be placed in \a p_next.  The handles will not be returned in
+     any specific order.  In addition, the enumeration may not include
+     all known plugins if the list of plugins changes during
+     enumeration.
+  */
+ KHMEXP khm_int32   KHMAPI
+ kmm_get_next_plugin(kmm_plugin p, kmm_plugin * p_next);
+ 
+ /*! \brief Enables or disables a plugin
+ 
+     This function currently does not take effect immediately.  However
+     it marks the plugin as enabled or disabled so that the next time
+     NetIDMgr starts, the module manager will act accordingly.
+ 
+     \param[in] p Handle to the plugin
+ 
+     \param[in] enable If non-zero, the plugin will be marked as
+         enabled.  Otherwise the plugin will be marked as disabled.
+  */
+ KHMEXP khm_int32   KHMAPI
+ kmm_enable_plugin(kmm_plugin p, khm_boolean enable);
+ 
+ /*! \brief Register a plugin
+ 
+     The \a plugin member defines the plugin to be registered.  The \a
+     msg_proc and \a icon members of the structure are ignored.
+ 
+     At the time kmm_register_plugin() is called, the module specified
+     by \a module member of the \a plugin parameter must have been already
+     registered.  Otherwise the function call fails.
+ 
+     If the plugin has already been registered, then all the fields in
+     the plugin registration will be updated to be in sync with the
+     information provided in the \a plugin parameter.  The failure
+     counts and associated statistics will not be reset when the
+     configuration information is updated.
+ 
+     If the plugin has not been registered, the a new registration
+     entry is created in the configuration space indicated by the \a
+     config_flags parameter.  In addition, the plugin will be added to
+     the list of plugins associated with the owning module.
+ 
+     Note that the module that owns the plugin must be registered in
+     the same configuration store as the plugin.
+ 
+     \param[in] plugin Registration info for the plugin.  The \a
+         msg_proc and \a icon members are ignored.  All other fields
+         are required.  The \a description member should be localized
+         to the system locale when registering a plugin in the machine
+         configuration store and should be localized to the user locale
+         when registering a plugin in the user configuration store.
+     \param[in] config_flags Flags for the configuration provider.
+         These flags are used verbatim to call khc_open_space(), hence
+         they may be used to pick whether or not the registration is
+         per machine or per user.
+ 
+     \see kmm_register_module()
+  */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_register_plugin(kmm_plugin_reg * plugin, khm_int32 config_flags);
+ 
+ /*! \brief Register a module
+ 
+     The \a module parameter specifies the parameters for the module
+     registration.
+ 
+     The \a plugin_info member should point to an array of
+     ::kmm_plugin_info structures unless the \a n_plugins member is
+     zero, in which case \a plugin_info can be \a NULL.  Plugins can be
+     registered separately using kmm_register_plugin().
+ 
+     \param[in] module Information about the module.  The name and path
+         fields are required. The \a plugin_info field can only be \a
+         NULL if \a n_plugins is zero.
+ 
+     \param[in] config_flags Flags used to call khc_open_space().  This
+         can be used to choose the configuration store in which the
+         module registration will be performed.
+   */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_register_module(kmm_module_reg * module, khm_int32 config_flags);
+ 
+ /*! \brief Unregister a plugin
+ 
+     Registration information associated with the plugin will be
+     removed.  In addtion, the plugin will be removed from the list of
+     plugins provided by the owner module.
+ 
+     \param[in] plugin Names the plugin to be removed
+     \param[in] config_flags Flags used to call khc_open_space(). Can
+         be used to choose the configuraiton store that is affected by
+         the call.
+ 
+     \note kmm_unregister_plugin() has no effect on whether the plugin
+         is loaded or not.  The caller must make sure that the plugin
+         is unloaded and the associated module is either also unloaded
+         or in a state where the plugin can be unregistered.
+  */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_unregister_plugin(wchar_t * plugin, khm_int32 config_flags);
+ 
+ /*! \brief Unregister a module
+ 
+     Registration information associated with the module as well as all
+     the plugins provided by the module will be removed from the
+     configuration store.
+ 
+     \param[in] module Names the module to be removed
+ 
+     \param[in] config_flags Flags used to call khc_open_space().  Can
+         be used to choose the configuration store affected by the
+         call.
+ 
+     \note kmm_unregister_module() has no effect on the loaded state of
+         the module.  The caller should make sure that the module is
+         unloaded and in a state where it can be unregistered.
+  */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_unregister_module(wchar_t * module, khm_int32 config_flags);
+ 
+ /*@}*/ /* kmm_reg */
+ 
+ /*! \defgroup kmm_loc Internationalization support
+ 
+     See \ref pi_localization for more information about
+     internationalization.
+ 
+ @{*/
+ 
+ /*! \brief Locale descriptor record
+ 
+     See kmm_set_locale()
+ */
+ typedef struct tag_kmm_module_locale {
+     khm_ui_4    language; /*!< A language ID.  On Windows, you can use the
+                             MAKELANGID macro to generate this value. */
+     wchar_t *   filename; /*!< The filename corresponding to this language.
+                             Use NULL to indicate that resources for this
+                             language are to be found in the main module. */
+     khm_int32   flags;    /*!< Flags.  Combination of KMM_MLOC_FLAG_* */
+ } kmm_module_locale;
+ 
+ #define LOCALE_DEF(language_id, filename, flags) {language_id, filename, flags}
+ 
+ /*! \brief Default (fallback) locale
+ */
+ #define KMM_MLOC_FLAG_DEFAULT 1
+ 
+ 
+ /*! \brief Sets the locale for a loaded module.
+ 
+     The given locale records are searched in the given order until a
+     locale that matches the current user locale is found.  If no
+     locales match, then the first locale with the
+     ::KMM_MLOC_FLAG_DEFAULT flag set will be loaded.  If no locales
+     have that flag set, then the first locale is loaded.
+ 
+     You can obtain a handle to the loaded library using
+     kmm_get_resource_hmodule().  This function does not return until a
+     matched library is loaded.
+ 
+     Note that the ::kmm_module_locale structure only specifies a
+     module name for the resource module.  This resource module must
+     exist in the same directory as the \a module.
+ 
+     \param[in] module The module handle
+     \param[in] locales An array of ::kmm_module_locale objects
+     \param[in] n_locales The number of objects in the array pointed to by \a locales
+ 
+     \retval KHM_ERROR_SUCCESS Succeeded.
+     \retval KHM_ERROR_NOT_FOUND A matching locale resource library was not found.
+     \retval KHM_ERROR_INVALID_OPERATION The function was called on a module which is currently not being initalized.
+ 
+     \see \ref pi_localization
+     \see kmm_get_resource_hmodule()
+ 
+     \note This can only be called when handing init_module()
+ */
+ KHMEXP khm_int32   KHMAPI 
+ kmm_set_locale_info(kmm_module module, 
+                     kmm_module_locale * locales, 
+                     khm_int32 n_locales);
+ 
+ #ifdef _WIN32
+ 
+ /*! \brief Return the Windows module handle of the resource library of a NetIDMgr module.
+ 
+     NetIDMgr allows the specification of an alternate resource library
+     that will be used to load localized resources from.  This function
+     returns a handle to this library.
+     
+     While you can use the convenience macros to access resources in a
+     localization library using the module handle, it is recommended,
+     for performance reasons, to use this function to obtain the handle
+     to the resource library and then use that handle in calls to
+     LoadString, LoadImage etc. directly.
+ */
+ KHMEXP HMODULE     KHMAPI 
+ kmm_get_resource_hmodule(kmm_module m);
+ 
+ /*! \name Convenience Macros
+ @{*/
+ /*! \brief Convenience macro for using calling LoadAccelerators using a module handle
+ 
+     \param[in] module A handle to a loaded module.  The corresponding resource 
+         module will be located through a call to kmm_get_resource_hmodule()
+ */
+ #define kmm_LoadAccelerators(module, lpTableName) \
+     (LoadAccelerators(kmm_get_resource_hmodule(module), lpTableName))
+ 
+ /*! \brief Convenience macro for using calling LoadBitmap using a module handle
+ 
+     \param[in] module A handle to a loaded module.  The corresponding resource 
+         module will be located through a call to kmm_get_resource_hmodule()
+ */
+ #define kmm_LoadBitmap(module, lpBitmapName) \
+     (LoadBitmap(kmm_get_resource_hmodule(module), lpBitmapName))
+ 
+ /*! \brief Convenience macro for using calling LoadImage using a module handle
+ 
+     \param[in] module A handle to a loaded module.  The corresponding resource 
+         module will be located through a call to kmm_get_resource_hmodule()
+ */
+ #define kmm_LoadImage(module, lpszName, uType, cxDesired, cyDesired, fuLoad) \
+     (LoadImage(kmm_get_resource_hmodule(module), lpszName, uType, cxDesired, cyDesired, fuLoad))
+ 
+ /*! \brief Convenience macro for using calling LoadCursor using a module handle
+ 
+     \param[in] module A handle to a loaded module.  The corresponding resource 
+         module will be located through a call to kmm_get_resource_hmodule()
+ */
+ #define kmm_LoadCursor(module, lpCursorName) \
+     (LoadCursor(kmm_get_resource_hmodule(module), lpCursorName))
+ 
+ /*! \brief Convenience macro for using calling LoadIcon using a module handle
+ 
+     \param[in] module A handle to a loaded module.  The corresponding resource 
+         module will be located through a call to kmm_get_resource_hmodule()
+ */
+ #define kmm_LoadIcon(module, lpIconName) \
+     (LoadIcon(kmm_get_resource_hmodule(module), lpIconName))
+ 
+ /*! \brief Convenience macro for using calling LoadMenu using a module handle
+ 
+     \param[in] module A handle to a loaded module.  The corresponding resource 
+         module will be located through a call to kmm_get_resource_hmodule()
+ */
+ #define kmm_LoadMenu(module, lpMenuName) \
+     (LoadMenu(kmm_get_resource_hmodule(module), lpMenuName))
+ 
+ /*! \brief Convenience macro for using calling LoadString using a module handle
+ 
+     \param[in] module A handle to a loaded module.  The corresponding resource 
+         module will be located through a call to kmm_get_resource_hmodule()
+ */
+ #define kmm_LoadString(module, uID, lpBuffer, nBufferMax) \
+     (LoadString(kmm_get_resource_hmodule(module), uID, lpBuffer, nBufferMax))
+ /*@}*/ /* Convenience Macros */
+ #endif
+ /*@}*/ /* group kmm_loc */
+ /*@}*/ /* group kmm */
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/kmq.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/kmq.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/kmq.h	Thu Oct 12 17:42:41 2006
***************
*** 0 ****
--- 1,764 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: kmq.h,v 1.1.2.2 2006/10/12 21:42:41 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_KMQ_H__
+ #define __KHIMAIRA_KMQ_H__
+ 
+ /*! \defgroup kmq NetIDMgr Message Queue */
+ /*@{*/
+ 
+ #include<khdefs.h>
+ #include<khlist.h>
+ #include<kherr.h>
+ 
+ /* general */
+ #ifdef _WIN32
+ typedef DWORD kmq_thread_id;
+ typedef DWORD kmq_timer;
+ #endif
+ 
+ #ifdef _WIN32
+ /*! \brief Window message for kmq
+ 
+    This message is sent to the window procedure of a window if that
+    window is a subscriber to KMQ messages.
+ 
+     \see kmq_subscribe_hwnd() for more information about handling this
+         window message
+  */
+ #define KMQ_WM_DISPATCH (WM_APP+0x100)
+ #endif
+ 
+ /* callback */
+ 
+ /*! \brief A message callback
+ 
+     Should return TRUE if the message is properly handled.  Otherwise
+     return FALSE */
+ typedef khm_int32 (KHMAPI *kmq_callback_t)(khm_int32 msg_type, 
+                                            khm_int32 msg_sub_type, 
+                                            khm_ui_4 uparam, 
+                                            void * vparam);
+ 
+ /* message */
+ 
+ /*! \brief A single response.
+ 
+     Certain broadcast messages may user scatter-gather type
+     notification and result gathering.  Individual subscribers to a
+     message attach their individual responses to a ::kmq_response
+     object and attach that to the message which can later be read by
+     the sender of the message.
+  */
+ typedef struct tag_kmq_response {
+     kmq_thread_id thread;
+     void * response;
+ 
+     LDCL(struct tag_kmq_response);
+ } kmq_response;
+ 
+ /*! \brief A single message
+  */
+ typedef struct tag_kmq_message {
+     khm_int32 type;             /*!< Type of message */
+     khm_int32 subtype;          /*!< Subtype of message */
+ 
+     khm_ui_4 uparam;             /*!< Integer parameter */
+     void * vparam;            /*!< Pointer to parameter blob */
+ 	
+     khm_int32 nSent;            /*!< Number of instances of message
+                                   sent (for broadcast messages) */
+ 
+     khm_int32 nCompleted;       /*!< Number of instances that have
+                                   completed processing (for broadcast
+                                   messages) */
+ 
+     khm_int32 nFailed;          /*!< Number of instances that failed
+                                   to process (for broadcast
+                                   messages) */
+ 
+     kmq_response * responses;   /*!< List of responses */
+     HANDLE wait_o;              /*!< Event to wait on (only valid if
+                                   the publisher of the message
+                                   requested a handle to the call) */
+ 
+     kmq_timer timeSent;         /*!< Time at which the message was
+                                   sent */
+     kmq_timer timeExpire;       /*!< Time at which the message
+                                   expires */
+ 
+     kherr_context * err_ctx;    /*!< Error context for the message */
+ 
+     khm_int32 refcount;
+ 
+     LDCL(struct tag_kmq_message);
+ } kmq_message;
+ 
+ /*! \brief A handle to a call
+  */
+ typedef kmq_message *kmq_call;
+ 
+ /*! \brief Message reference */
+ typedef struct tag_kmq_message_ref {
+     kmq_message * msg;          /*!< Message that we are referring
+                                   to */
+     kmq_callback_t recipient;   /*!< The recipient of the message */
+ 
+     LDCL(struct tag_kmq_message_ref);
+ } kmq_message_ref;
+ 
+ /*! \brief Message queue
+ 
+     Each thread gets its own message queue.  When a message is
+     broadcast to which there is a subscriber in a particular thread, a
+     reference to the message is placed in the message queue of the
+     thread.  The dispatch procedure then dispatches the message as
+     described in the message reference.
+ */
+ typedef struct tag_kmq_queue {
+     kmq_thread_id thread;       /*!< The thread id  */
+ 
+     CRITICAL_SECTION cs;
+     HANDLE wait_o;
+ 
+     khm_int32 load;             /*!< Number of messages waiting to be
+                                   processed on this message queue.  */
+     kmq_timer last_post;        /*!< Time the last message was
+                                   received */
+ 
+     khm_int32 flags;            /*!< Flags.  Currently, it's just KMQ_QUEUE_FLAG_DELETED */
+ 
+     /*Q*/
+     QDCL(kmq_message_ref);      /*!< Queue of message references  */
+ 
+     /*Lnode*/
+     LDCL(struct tag_kmq_queue);
+ } kmq_queue;
+ 
+ #define KMQ_QUEUE_FLAG_DELETED 0x0008
+ 
+ /*! \brief Message subscription
+ 
+     A subscription binds a recipient with a message type.  These are
+     specific to a thread. I.e. a subscription that was made in one
+     thread will not receive messages in the context of another thread.
+ */
+ typedef struct tag_kmq_msg_subscription {
+     khm_int32 magic;            /*!< Magic number.  Should always be
+                                   ::KMQ_MSG_SUB_MAGIC */
+     khm_int32 type;             /*!< Type of message */
+     khm_int32 rcpt_type;        /*!< Type of recipient.  One of
+                                   ::KMQ_RCPTTYPE_CB or
+                                   ::KMQ_RCPTTYPE_HWND  */
+     union {
+         kmq_callback_t cb;      /*!< Callback if the subscription is
+                                   of callback type */
+         HWND hwnd;              /*!< Window handle if the subscription
+                                   is a windows message type */
+     } recipient;
+ 
+     kmq_queue * queue;          /*!< Associated queue */
+ 
+     /*lnode*/
+     LDCL(struct tag_kmq_msg_subscription);
+ } kmq_msg_subscription;
+ 
+ #define KMQ_MSG_SUB_MAGIC 0x3821b58e
+ 
+ /*! \brief Callback recipient type
+ 
+     The recipient is a callback function */
+ #define KMQ_RCPTTYPE_CB     1
+ 
+ /*! \brief Windows recipient type
+ 
+     The recipient is a window */
+ #define KMQ_RCPTTYPE_HWND   2
+ 
+ /* publishers */
+ 
+ /*! \brief A completion handler for a message
+ 
+     Each message type can have a completion handler.  Once a message
+     of this a specific type has been broadcast and handled by all the
+     subscripbers, the message will be passed down to the completion
+     handler before the associated data structures are freed.  This
+     allows applications that define message type to also define clean
+     up for each message.  For example, the completion handler can
+     initiate another message if the messages form a sequence or free
+     up blocks of memory that was passed as the parameter to the
+     message.
+  */
+ typedef void (KHMAPI *kmq_msg_completion_handler)(kmq_message *);
+ 
+ /*! \brief A message type
+  */
+ typedef struct tag_kmq_msg_type {
+     khm_int32 id;               /*!< Identifier for the message
+                                   type. */
+     kmq_msg_subscription * subs; /*!< The list of subscriptions */
+     kmq_msg_completion_handler completion_handler; /*!< Completion
+                                   handler for the message type */
+ 
+     wchar_t * name;             /*!< Name of the message type for
+                                   named types.  Message type names are
+                                   language independant. */
+ 
+     /*Lnode*/
+     LDCL(struct tag_kmq_msg_type);
+ } kmq_msg_type;
+ 
+ /*! \brief The maximum number of message types
+  */
+ #define KMQ_MSG_TYPE_MAX 255
+ 
+ /*! \brief Maximum number of characters in a message type name
+ 
+     The count includes the terminating NULL
+  */
+ #define KMQ_MAXCCH_TYPE_NAME 256
+ 
+ /*! \brief Maximum number of bytes in a message type name
+ 
+     Type count includes the terminating NULL
+  */
+ #define KMQ_MAXCB_TYPE_NAME (KMQ_MAXCCH_TYPE_NAME * sizeof(wchar_t))
+ 
+ KHMEXP khm_int32 KHMAPI kmq_init(void);
+ 
+ KHMEXP khm_int32 KHMAPI kmq_exit(void);
+ 
+ /*! \brief Register a message type
+ 
+     Registers a custom message type.  The \a name parameter specifies
+     a language independent name for the message type and must be
+     unique and must be less than ::KMQ_MAXCCH_TYPE_NAME characters.
+ 
+     \param[in] name Name of the message type.  Upto
+         ::KMQ_MAXCCH_TYPE_NAME characters including terminating NULL.
+         The \a name cannot be a zero length string.
+ 
+     \param[out] new_id Receives the new message type ID.  Specify NULL
+         if the new message type is not required.
+ 
+     \see kmq_find_type() and kmq_unregister_type()
+ 
+     \retval KHM_ERROR_INVALID_PARAM The \a name parameter was invalid.
+     \retval KHM_ERROR_EXISTS A message type with that name already exists.
+     \retval KHM_ERROR_NO_RESOURCES Can't register any more message types.
+     \retval KHM_ERROR_SUCCESS The operation succeeded.
+  */
+ KHMEXP khm_int32 KHMAPI kmq_register_type(wchar_t * name, khm_int32 * new_id);
+ 
+ /*! \brief Find a message type
+ 
+     Find the message type with the given name.  If found, the type ID
+     is returned in \a id.
+ 
+     \retval KHM_ERROR_SUCCESS A message type with the given name was
+         found.
+     \retval KHM_ERROR_NOT_FOUND A message type with the given name was
+         not found.
+  */
+ KHMEXP khm_int32 KHMAPI kmq_find_type(wchar_t * name, khm_int32 * id);
+ 
+ /*! \brief Unregister a message type
+ 
+     Unregisters a message type that was registered using
+     kmq_register_type().
+ 
+     \retval KHM_ERROR_SUCCESS The specified message type was
+         successfully unregistered.
+ 
+     \retval KHM_ERROR_NOT_FOUND The message type was not found.
+  */
+ KHMEXP khm_int32 KHMAPI kmq_unregister_type(khm_int32 id);
+ 
+ /*! \brief Subscribte to a message type.
+ 
+     Adds a subscription to messages of type \a type.  Subscriptions
+     are managed per thread.  Therefore the subscription is actually
+     added to the subscription list for the current thread (the thread
+     which calls kmq_subscribe()).
+ 
+     When a message of type \a type is received by the thread, it is
+     dispatched to the callback function identified by \a cb within the
+     context of this thread.
+ 
+     \note Calling kmq_subscribe() from within multiple threads with
+         the same \a type and \a cb will result in multiple
+         subscriptions.
+ 
+     \see kmq_unsubscribe()
+     \see kmq_dispatch()
+ */
+ KHMEXP khm_int32 KHMAPI kmq_subscribe(khm_int32 type, kmq_callback_t cb);
+ 
+ /*! \brief Subscribe a window to a message type
+ 
+     Adds the window specified by \a hwnd to the subscription list for
+     the message type \a type.  When a message of this type is posted,
+     then the window procedure of the window \a hwnd receives a message
+     ::KMQ_WM_DISPATCH.
+ 
+     When a window receives a ::KMQ_WM_DISPATCH message, it means that
+     a message has been posted which is of a type that the window has
+     subscribed for.  Because of the way Windows handles window
+     messages and the way NetIDMgr message queues work, a thread which
+     has a window (or thread) procedure can not call kmq_dispatch() to
+     handle these messages.  For threads that have window or thread
+     message loops, they must call kmq_subscribe_hwnd() to subscribe a
+     particular window (for thread message loops, this would be the
+     HWND of the message window for the thread) to NetIDMgr messages.
+ 
+     There are two supported ways of handling the ::KMQ_WM_DISPATCH
+     message.  Examples of both are provided below.
+ 
+     Handling the message inline:
+ 
+     \code
+     LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
+     kmq_message * m;
+     khm_int32 rv;
+     ...
+     switch(uMsg) {
+     case WM_CREATE:
+        ...
+        kmq_subscribe_hwnd(KMSG_CRED, hwnd);
+        ...
+        break;
+ 
+     case WM_DESTROY:
+        ...
+        kmq_unsubscribe_hwnd(KMSG_CRED, hwnd);
+        ...
+        break;
+ 
+     ...
+     case KMQ_WM_DISPATCH:
+         kmq_wm_begin(lParam,&m);
+ 
+ 	if(m->type == KMSG_CRED && m->subtype == KMSG_CRED_ROOTDELTA) {
+ 	// do something
+         rv = KHM_ERROR_SUCCESS;
+ 	}
+ 
+ 	return kmq_wm_end(m, rv);
+     ...
+     };
+     ...
+     }
+     \endcode
+ 
+     The other method is to dispatch the ::KMQ_WM_DISPATCH message to a
+     secondary callback function:
+ 
+     \code
+     khm_int32 msg_handler(khm_int32 t, khm_int32 st, khm_ui_4 up, void * pb) {
+         khm_int32 rv = KHM_ERROR_SUCCESS;
+ 
+         //handle message
+ 
+ 	return rv;
+     }
+ 
+     LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
+     kmq_message * m;
+     khm_int32 rv;
+     ...
+     switch(uMsg) {
+     ...
+ 
+     case WM_CREATE:
+        ...
+        kmq_subscribe_hwnd(KMSG_CRED, hwnd);
+        ...
+        break;
+ 
+     case WM_DESTROY:
+        ...
+        kmq_unsubscribe_hwnd(KMSG_CRED, hwnd);
+        ...
+        break;
+ 
+     ...
+     case KMQ_WM_DISPATCH:
+         return kmq_wm_dispatch(lParam, msg_handler);
+     ...
+     };
+     ...
+     }
+     \endcode
+ 
+     \note Make sure you unsubscribe from the message type when the
+         window is destroyed.
+ 
+     \see kmq_unsubscribe_hwnd()
+     \see kmq_wm_begin()
+     \see kmq_wm_end()
+     \see kmq_wm_dispatch()
+  */
+ KHMEXP khm_int32 KHMAPI kmq_subscribe_hwnd(khm_int32 type, HWND hwnd);
+ 
+ #ifdef _WIN32
+ /*! \brief Begins handling a KMQ_WM_DISPATCH message
+ 
+     \return The return value of this function should be ignored.
+ 
+     \see kmq_subscribe_hwnd() for more details about handling ::KMQ_WM_DISPATCH
+  */
+ KHMEXP LRESULT KHMAPI kmq_wm_begin(LPARAM lparm, kmq_message ** m);
+ 
+ /*! \brief Ends handling a KMQ_WM_DISPATCH message
+ 
+     \return The return value of this function should be the return
+         value of the window procedure.  See kmq_subscribe_hwnd()
+         documentation for example
+ 
+     \see kmq_subscribe_hwnd() for more details about handling ::KMQ_WM_DISPATCH
+  */
+ KHMEXP LRESULT KHMAPI kmq_wm_end(kmq_message *m, khm_int32 rv);
+ 
+ /*! \brief Dispatches a KMQ_WM_DISPATCH message to a callback
+ 
+     \return The return value of this function should be the return
+         value of the window procedure.  See kmq_subscribe_hwnd()
+         documentation for example.
+ 
+     \see kmq_subscribe_hwnd() for more details about handling ::KMQ_WM_DISPATCH
+  */
+ KHMEXP LRESULT KHMAPI kmq_wm_dispatch(LPARAM lparm, kmq_callback_t cb);
+ #endif
+ 
+ /*! \brief Unsubscribe a callback from a message type
+ 
+     Removes the subscription for message type \a type for callback
+     function \a cb from the subscription list for the current thread
+     (the thread that calls kmq_unsubscribe()).
+ 
+     \note kmq_unsubscribe() can only remove subscriptions for the subscription
+         list for the current thread.
+ 
+     \see kmq_subscribe()
+     \see kmq_dispatch()
+ */
+ KHMEXP khm_int32 KHMAPI kmq_unsubscribe(khm_int32 type, kmq_callback_t cb);
+ 
+ /*! \brief Unsubscribe a window from a message type
+ 
+     Removes the specific window from the subsription list for message
+     type \a type.
+ 
+     \see kmq_subscribe_hwnd()
+ */
+ KHMEXP khm_int32 KHMAPI kmq_unsubscribe_hwnd(khm_int32 type, HWND hwnd);
+ 
+ /*! \brief Create an ad-hoc subscription
+ 
+     An ad-hoc subscription describes a callback point in a thread that
+     can be dispatched messages to individually without broadcasting.
+ 
+     \see kmq_post_sub_msg(), kmq_post_sub_msg_ex(),
+         kmq_send_sub_msg(), kmq_post_subs_msg(),
+         kmq_post_subs_msg_ex(), kmq_send_subs_msg(),
+         kmq_delete_subscription()
+ */
+ KHMEXP khm_int32 KHMAPI kmq_create_subscription(
+     kmq_callback_t cb, 
+     khm_handle * result);
+ 
+ /*! \brief Create an ad-hoc subscription for a window
+ 
+     An ad-hoc subscription describes a window that will be dispatched
+     messages individually without broadcasting.
+ 
+     \see kmq_post_sub_msg(), kmq_post_sub_msg_ex(),
+         kmq_send_sub_msg(), kmq_post_subs_msg(),
+         kmq_post_subs_msg_ex(), kmq_send_subs_msg(),
+         kmq_delete_subscription()
+  */
+ KHMEXP khm_int32 KHMAPI kmq_create_hwnd_subscription(HWND hw,
+                                                      khm_handle * result);
+ 
+ /*! \brief Delete an ad-hoc subscription
+ 
+     Deletes a subscriptoin that was created using
+     kmq_create_subscription()
+  */
+ KHMEXP khm_int32 KHMAPI kmq_delete_subscription(khm_handle sub);
+ 
+ /*! \brief Post a message to a subscription
+ 
+     Equivalent of kmq_post_msg() but only posts the message to the
+     specified subscription.
+  */
+ KHMEXP khm_int32 KHMAPI kmq_post_sub_msg(
+     khm_handle sub, 
+     khm_int32 type, 
+     khm_int32 subtype, 
+     khm_ui_4 uparam, 
+     void * vparam);
+ 
+ /*! \brief Post a message to a subscription and acquire a handle to the call
+  */
+ KHMEXP khm_int32 KHMAPI kmq_post_sub_msg_ex(
+     khm_handle sub, 
+     khm_int32 type, 
+     khm_int32 subtype, 
+     khm_ui_4 uparam, 
+     void * vparam, 
+     kmq_call * call);
+ 
+ /*! \brief Send a synchronous message to a subscription
+ 
+     \retval KHM_ERROR_SUCCESS The call succeeded, and no subscribers reported errors
+     \retval KHM_ERROR_PARTIAL The call succeeded, but at least one subscriber reported errors
+  */
+ KHMEXP khm_int32 KHMAPI kmq_send_sub_msg(
+     khm_handle sub, 
+     khm_int32 type, 
+     khm_int32 subtype, 
+     khm_ui_4 uparam, 
+     void * vparam);
+ 
+ /*! \brief Post a message to a group of subscriptions
+ 
+     The block of memory pointed to by \a subs should be an array of
+     subscriptions.  The number of elements in that array should be \a
+     n_subs.  A message as specified by the remaining parameters will
+     be dispatched to all of the subscription points in the array.
+  */
+ KHMEXP khm_int32 KHMAPI kmq_post_subs_msg(
+     khm_handle * subs, 
+     khm_size  n_subs, 
+     khm_int32 type, 
+     khm_int32 subtype, 
+     khm_ui_4 uparam, 
+     void * vparam);
+ 
+ /*! \brief Post a message to a group of subscriptions and acquire a handle to the call
+ 
+     The block of memory pointed to by \a subs should be an array of
+     subscriptions.  The number of elements in that array should be \a
+     n_subs.  A message as specified by the remaining parameters will
+     be dispatched to all of the subscription points in the array, and
+     a handle to the call will be returned in \a call.
+ 
+     The returned \a call will reference all of the dispatches that
+     were made.
+ */
+ KHMEXP khm_int32 KHMAPI kmq_post_subs_msg_ex(
+     khm_handle * subs, 
+     khm_int32 n_subs, 
+     khm_int32 type, 
+     khm_int32 subtype, 
+     khm_ui_4 uparam, 
+     void * vparam, 
+     kmq_call * call);
+ 
+ /*! \brief Send a synchronous message to a group of subscriptions
+ 
+     The block of memory pointed to by \a subs should be an array of
+     subscriptions.  The number of elements in that array should be \a
+     n_subs.  A message as specified by the remaining parameters will
+     be dispatched to all of the subscription points in the array.  The
+     function will not return until all of the calls have succeeded.
+ 
+     \retval KHM_ERROR_SUCCESS The call succeeded, and no subscribers reported errors
+     \retval KHM_ERROR_PARTIAL The call succeeded, but at least one subscriber reported errors
+ */
+ KHMEXP khm_int32 KHMAPI kmq_send_subs_msg(
+     khm_handle *subs, 
+     khm_int32 n_subs,
+     khm_int32 type, 
+     khm_int32 subtype, 
+     khm_ui_4 uparam, 
+     void * vparam);
+ 
+ /*! \brief Dispatch a message for the current thread.
+ 
+     This function opens the message list for the current thread and
+     dispatches the first message instance that is found.  Note that if
+     multiple callbacks subscribe to the same message type in the same
+     thread, then when a message of that type is received, multiple
+     message instances are added to the message queue corresponding to
+     each subscription.
+ 
+     If no message instances are waiting in the queue, kmq_dispatch()
+     waits for the \a timeout period for a message.
+ 
+     \param[in] timeout The timeout period in milliseconds.  Specify INFINITE for
+         kmq_dispatch() to wait indefinitely.
+ 
+     \retval KHM_ERROR_SUCCESS A message instance was dispatched
+     \retval KHM_ERROR_TIMEOUT The timeout period elapsed
+     \retval KHM_ERROR_EXIT The message found on the queue was <KMSG_SYSTEM,KMSG_SYSTEM_EXIT>
+ */
+ KHMEXP khm_int32 KHMAPI kmq_dispatch(kmq_timer timeout);
+ 
+ /*! \brief Send a message
+ 
+     The specified message will be posted to all the subscribers of the
+     message type.  Then the function will wait for all the subscribers
+     to finish processing the message before returning.
+     
+     \param[in] type The type of the message
+     \param[in] subtype The subtype
+     \param[in] uparam The khm_ui_4 parameter for the message
+     \param[in] blob The parameter blob for the message
+ 
+     \note The internal timeout for this function is INFINITE.  If you
+         it is desirable to use a different timeout, use
+         kmq_post_message_ex() and kmq_wait() functions.
+ 
+     \retval KHM_ERROR_SUCCESS The call succeeded and no subscribers returned errors
+     \retval KHM_ERROR_PARTIAL The call succeeded but at least one subscriber returned an error
+ */
+ KHMEXP khm_int32 KHMAPI kmq_send_message(
+     khm_int32 type, 
+     khm_int32 subtype, 
+     khm_ui_4 uparam, 
+     void * blob);
+ 
+ /*! \brief Post a message
+ 
+     The specified message will be posted to all the subscribers of the
+     message type.  The function returns immediately.
+     
+     If you want to be able to wait for all the subscribers to finish
+     processing the message, you should use kmq_post_message_ex()
+     instead.
+ 
+     \param[in] type The type of the message
+     \param[in] subtype The subtype
+     \param[in] uparam The khm_ui_4 parameter for the message
+     \param[in] blob The parameter blob for the message
+ */
+ KHMEXP khm_int32 KHMAPI kmq_post_message(
+     khm_int32 type, 
+     khm_int32 subtype, 
+     khm_ui_4 uparam, 
+     void * blob);
+ 
+ /*! \brief Post a message and acquire a handle to the call.
+ 
+     The specified message is posted to all the subscribers.  In
+     addition, a handle is obtained for the call which can be used in
+     subsequent call to kmq_free_call() or kmq_wait().
+ 
+     Call kmq_free_call() to free the handle.
+ 
+     \param[in] type The type of the message
+     \param[in] subtype The subtype
+     \param[in] uparam The khm_ui_4 parameter for the message
+     \param[in] blob The parameter blob for the message
+     \param[out] call Receives the call handle.  Set to NULL if the call handle is not required.
+ 
+     \see kmq_free_call()
+ */
+ KHMEXP khm_int32 KHMAPI kmq_post_message_ex(
+     khm_int32 type, 
+     khm_int32 subtype, 
+     khm_ui_4 uparam, 
+     void * blob, 
+     kmq_call * call);
+ 
+ /*! \brief Free a handle to a call obtained through kmq_post_message_ex()
+ 
+     All call handles obtained through kmq_post_message_ex() must be
+     freed via a call to kmq_free_call().
+ */
+ KHMEXP khm_int32 KHMAPI kmq_free_call(kmq_call call);
+ 
+ /*! \brief Sends a <KMSG_SYSTEM,KMSG_SYSTEM_EXIT> message to the specified thread.
+ 
+     The message itself will not be received by any callback function,
+     however, any kmq_dispatch() function that is currently active of
+     becomes active will exit with a KHM_ERROR_EXIT code.
+     kmq_send_thread_quit_message() will wait for this to happen before
+     returning.
+     */
+ KHMEXP khm_int32 KHMAPI kmq_send_thread_quit_message(
+     kmq_thread_id thread, 
+     khm_ui_4 uparam);
+ 
+ /*! \brief Post a <KMSG_SYSTEM,KMSG_SYSTEM_EXIT> message to the specified thread.
+ 
+     The message itself will not be received by any callback function,
+     however, any kmq_dispatch() function that is currently active of
+     becomes active will exit with a KHM_ERROR_EXIT code.
+     kmq_post_thread_quit_message() will return immediately.
+     */
+ KHMEXP khm_int32 KHMAPI kmq_post_thread_quit_message(
+     kmq_thread_id thread, 
+     khm_ui_4 uparam, 
+     kmq_call * call);
+ 
+ KHMEXP khm_int32 KHMAPI kmq_get_next_response(kmq_call call, void ** resp);
+ 
+ /*! \brief Check if a specific call has completed
+ 
+     \return TRUE if the call has completed. FALSE otherwise.
+ */
+ KHMEXP khm_boolean KHMAPI kmq_has_completed(kmq_call call);
+ 
+ /*! \brief Wait for a call to complete.
+ 
+     Waits for the specified call to complete.  If the call dispatched
+     to multiple recipients, the function waits for all dispatches to
+     complete.
+ 
+     If the call has already completed, then the function returns
+     immediately.
+ 
+     If more than one thread is waiting for a single message to
+     complete, then only one of them will be released when the message
+     compeltes.  Each subsequent thread will be released as each
+     released thread calls kmq_free_call().
+ 
+     \param[in] call A handle to a call.
+     \param[in] timeout Specifies, in milliseconds, the amount of time
+         to wait for the call to complete. Specify INFINITE to wait
+         indefinitely.
+ 
+     \retval KHM_ERROR_SUCCESS The call completed
+     \retval KHM_ERROR_TIMEOUT The timeout period expired
+     \retval KHM_ERROR_INVALID_PARAM One of the parameters were invalid.
+ */
+ KHMEXP khm_int32 KHMAPI kmq_wait(kmq_call call, kmq_timer timeout);
+ 
+ /*! \brief Sets the completion handler for a specified message type.
+ 
+     \note Only one completion handler can exist for one message type.
+         Calling this function overwrites the previous completion
+         handler.
+ */
+ KHMEXP khm_int32 KHMAPI kmq_set_completion_handler(
+     khm_int32 type, 
+     kmq_msg_completion_handler hander);
+ 
+ /*@}*/
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/kplugin.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/kplugin.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/kplugin.h	Thu Oct 12 17:42:41 2006
***************
*** 0 ****
--- 1,146 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: kplugin.h,v 1.1.2.2 2006/10/12 21:42:41 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_KPLUGIN_H
+ #define __KHIMAIRA_KPLUGIN_H
+ 
+ #include<kmm.h>
+ #include<kherror.h>
+ 
+ /*! \addtogroup kmm
+ @{*/
+ /*! \defgroup kplugin NetIDMgr Plugin Callbacks
+ 
+ See the following related documentation pages for more information 
+ about NetIDMgr plugins.
+ 
+ These are prototypes of functions that must be implemented by a NetIDMgr
+ plugin.
+ 
+ - \ref plugins
+ @{*/
+ 
+ /*! \brief Initialize the module
+ 
+     This is the first callback function to be called in a module.
+     Perform all the required intialization when this is called.  As
+     mentioned in \ref plugins, you should not attempt to call any
+     NetIDMgr API function from DLLMain or other initialization code
+     other than this one.
+ 
+     You should use this call back to register the plugins that will be
+     implemented in this module and to notify the plugin manager of any
+     resource libraries that this module will use.
+ 
+     Call:
+     - kmm_set_locale() : to set the notify the plugin manager of the
+       locale specifc resource libraries that are used by this module.
+     - kmm_provide_plugin() : to register each plugin that is
+       implemented in this module.
+ 
+     This function is called in the context of the current user, from
+     the plug-in manager thread.  This same thread is used by the
+     plug-in manager to load and initialize all the modules for a
+     session.
+ 
+     The name of the callback must be init_module().  The calling
+     convention is KHMAPI, which is currently __stdcall.
+ 
+     If this function does not register any plugins, the plugin manager
+     will immediately call exit_module() and unload the module even if
+     the init_module() function completes successfully.
+ 
+     \return Return the following values to indicate whether the module
+         successfully initialized or not.
+         - KHM_ERROR_SUCCESS : Succeeded. The module manager will call
+             init_plugin() for each of the registered plugins for the
+             module.
+         - any other error code: Signals that the module did not
+             successfully initialize.  The plugin manager will
+             immediately call exit_module() and then unload the module.
+ 
+     \note This callback is required.
+ */
+ KHMEXP khm_int32 KHMAPI init_module(kmm_module h_module);
+ 
+ /*! \brief Type for init_module() */
+ typedef khm_int32 (KHMAPI *init_module_t)(kmm_module);
+ 
+ #if defined(_WIN64)
+ #define EXP_INIT_MODULE "init_module"
+ #elif defined(_WIN32)
+ #define EXP_INIT_MODULE "_init_module@4"
+ #else
+ #error  EXP_INIT_MODULE not defined for platform
+ #endif
+ 
+ /*! \brief Plugin procedure
+ 
+     This is the message processor for a plugin.  See \ref pi_fw_pnm_p
+     for more information.
+ 
+     Essentially, this is a message subscriber for KMQ messages.
+ */
+ KHMEXP khm_int32 KHMAPI _plugin_proc(khm_int32 msg_type, khm_int32 msg_subtype, khm_ui_4 uparam, void * vparam);
+ 
+ /*! \brief Type for init_plugin() */
+ typedef kmq_callback_t _plugin_proc_t;
+ 
+ /*! \brief Exit a module
+ 
+     This is the last callback function that the NetIDMgr module
+     manager calls before unloading the module.  When this function is
+     called, all of the plugins for the module have already been
+     stopped.  However, any localization libraries that were loaded as
+     a result of init_module() calling kmm_set_locale_info() will still
+     be loaded.  These localization libraries will be unloaded
+     immediately after this callback returns.
+ 
+     Use this callback to perform any required cleanup tasks.  However,
+     it is advisable that each plugin perform its own cleanup tasks,
+     since each plugin may be stopped independently of others.
+ 
+     \return The return value of this function is ignored.
+ 
+     \note This callback is not required.
+ */
+ KHMEXP khm_int32 KHMAPI exit_module(kmm_module h_module);
+ 
+ /*! \brief Type for exit_module() */
+ typedef khm_int32 (KHMAPI *exit_module_t)(kmm_module);
+ 
+ #if defined(_WIN64)
+ #define EXP_EXIT_MODULE "exit_module"
+ #elif defined(_WIN32)
+ #define EXP_EXIT_MODULE "_exit_module@4"
+ #else
+ #error  EXP_EXIT_MODULE not defined for platform
+ #endif
+ 
+ /*@}*/
+ /*@}*/
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/mstring.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/mstring.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/mstring.h	Thu Oct 12 17:42:41 2006
***************
*** 0 ****
--- 1,361 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: mstring.h,v 1.1.2.2 2006/10/12 21:42:41 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_MSTRING_H
+ #define __KHIMAIRA_MSTRING_H
+ 
+ #include<khdefs.h>
+ 
+ /*! \addtogroup util
+     @{ */
+ 
+ /*! \defgroup util_mstring Multi String and CSV functions
+     @{*/
+ 
+ #define KHM_PREFIX 8
+ 
+ #define KHM_CASE_SENSITIVE 16
+ 
+ #define KHM_MAXCCH_STRING 16384
+ 
+ #define KHM_MAXCB_STRING (KHM_MAXCCH_STRING * sizeof(wchar_t))
+ 
+ /*! \brief Initialize a multi-string
+  */
+ KHMEXP khm_int32 KHMAPI
+ multi_string_init(wchar_t * ms,
+                   khm_size cb_ms);
+ 
+ /*! \brief Prepend a string to a multi string
+ 
+     Adds the string \a str to the beginning of multi-string \a ms.
+ 
+     \param[in,out] ms  The multi-string to be modified.
+ 
+     \param[in,out] pcb_ms A pointer to the size of the multistring.
+         On entry this specifies the size of the buffer pointed to by
+         \a ms.  If the call is successful, on exit this will receive
+         the new size of the multi string in bytes.  If the buffer is
+         insufficient, the function will return KHM_ERROR_TOO_LONG and
+         set this to the required size of the buffer in bytes.
+ 
+     \param[in] str The string to prepend to \a ms.  This cannot be
+         longer than KHM_MAXCCH_STRING in characters including the
+         terminating NULL.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ multi_string_prepend(wchar_t * ms,
+                      khm_size * pcb_ms,
+                      const wchar_t * str);
+ 
+ /*! \brief Append a string to a multi-string
+ 
+     Appends the string specified by \a str to the multi string
+     specified by \a ms.  The size of the multi string in characters
+     including terminating NULLs after appending \a str can not exceed
+     KHM_MAXCCH_STRING.
+ 
+     \param[in] ms The buffer containing the multi string
+ 
+     \param[in,out] pcb_ms Points to a khm_int32 indicating the size of
+         the buffer pointed to by \a ms.  On entry this contains the
+         size (in bytes) of the buffer pointed to by \a ms.  On exit,
+         contains the new size of the multi string in bytes.
+ 
+     \param[in] str The string to append to the multi string.  This
+         string cannot be NULL or an empty (zero length) string.  The
+         length of \a str cannot exceed KHM_MAXCCH_STRING in
+         characters including terminating NULL.
+ 
+     \retval KHM_ERROR_SUCCESS The string was appended to the multi string
+ 
+     \retval KHM_ERROR_TOO_LONG The buffer pointed to by \a ms was
+         insufficient.  The required size of the buffer is in \a pcb_ms
+ 
+     \retval KHM_ERROR_INVALID_PARAM One of more of the parameters were invalid.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ multi_string_append(wchar_t * ms,
+                     khm_size * pcb_ms,
+                     const wchar_t * str);
+ 
+ /*! \brief Deletes a string from a multi string
+ 
+     Deletes the string specified by \a str from the multi string
+     specified by \a ms.  How the string is matched to the strings in
+     \a ms is determined by \a flags.  If more than one match is found,
+     then only the first match is deleted.
+ 
+     \param[in] ms The multi string to modify.  The length of the multi
+         string in characters cannot exceed KHM_MAXCCH_STRING.
+  
+     \param[in] str The string to search for
+ 
+     \param[in] flags How \a str is to be matched to existing strings
+         in \a ms.  This could be a combination of KHM_PREFIX and
+         KHM_CASE_SENSITIVE. If KHM_PREFIX is used, then \a ms is
+         searched for a string that begins with \a str.  Otherwise, \a
+         str must match the an entire string in the multi string.  If
+         KHM_CASE_SENSITIVE is specified, then a case sensitive match
+         is performed.  The defualt is to use a case insensitive
+         search.
+ 
+     \retval KHM_ERROR_SUCCESS A string was matched and deleted from \a ms
+ 
+     \retval KHM_ERROR_NOT_FOUND No matches were found
+ 
+     \retval KHM_ERROR_INVALID_PARAM One or more parameters were incorrect.
+ 
+     \note The search for the existing string is done with
+         multi_string_find()
+  */
+ KHMEXP khm_int32 KHMAPI 
+ multi_string_delete(wchar_t * ms,
+                     const wchar_t * str,
+                     const khm_int32 flags);
+ 
+ /*! \brief Search a multi string for a string
+ 
+     Searches the string specified by \a ms for a string that matches
+     \a str.  How the match is performed is determined by \a flags.
+     Returns a poitner to the start of the matched string in \a ms.  If
+     more than one string in \a ms matches \a str, then only the first
+     match is returned.
+ 
+     \param[in] ms The multi string to search in.  The length of the
+         multi string cannot exceed KHM_MAXCCH_STRING in characters.
+ 
+     \param[in] str The string to search for
+ 
+     \param[in] flags How \a str is to be matched to existing strings
+         in \a ms.  This could be a combination of KHM_PREFIX and
+         KHM_CASE_SENSITIVE. If KHM_PREFIX is used, then \a ms is
+         searched for a string that begins with \a str.  Otherwise, \a
+         str must match the an entire string in the multi string.  If
+         KHM_CASE_SENSITIVE is specified, then a case sensitive match
+         is performed.  The defualt is to use a case insensitive
+         search.
+ 
+     \return A pointer to the start of the first matched string or
+         NULL if no matches were found.
+ 
+  */
+ KHMEXP wchar_t * KHMAPI 
+ multi_string_find(const wchar_t * ms,
+                   const wchar_t * str,
+                   const khm_int32 flags);
+ 
+ /*! \brief Convert a multi string to CSV
+ 
+     Converts a multi string to a comma separated value string based on
+     the following rules.
+ 
+     - Each string in the multi string is treated an individual field 
+ 
+     - A field is quoted if it has double quotes or commas 
+ 
+     - Double quotes within quoted fields are escaped by two
+       consecutive double quotes.
+ 
+     For example:
+ 
+     \code
+     multi_string = L"foo\0bar\0baz,quux\0ab\"cd\0";
+     csv_string = L"foo,bar,\"baz,quux\",\"ab\"\"cd\"";
+     \endcode
+ 
+     If multi_string_to_csv() is called on \a multi_string above,
+     you would obtain \a csv_string.
+ 
+     \param[out] csvbuf The buffer to place the CSV string in.  Can be
+         NULL if only teh size of the needed buffer is required.
+ 
+     \param[in,out] pcb_csvbuf On entry, points to a khm_int32 that
+         holds the size of the buffer pointed to by \a csvbuf.  On
+         exit, gets the number of bytes writted to \a csvbuf or the
+         required size of \a csvbuf if the buffer is too small or \a
+         csvbuf is NULL.
+ 
+     \param[in] ms The mutli string to convert to a CSV.
+ 
+     \retval KHM_ERROR_SUCCESS The multi string was successfully
+         converted to a CSV string.  The number of bytes written is in
+         \a pcb_csvbuf.  The count includes the terminating NULL.
+ 
+     \retval KHM_ERROR_TOO_LONG The buffer was too small or \a csvbuf
+         was NULL.  The required number of bytes in the buffer is in \a
+         pcb_csvbuf.
+ 
+     \retval KHM_ERROR_INVALID_PARAM One or more parameters were ivnalid.
+ 
+     \see csv_to_multi_string()
+ */
+ KHMEXP khm_int32 KHMAPI 
+ multi_string_to_csv(wchar_t * csvbuf,
+                     khm_size * pcb_csvbuf,
+                     const wchar_t * ms);
+ 
+ /*! \brief Converts a CSV to a multi string
+ 
+     Undoes what multi_string_to_csv() does.
+ 
+     \param[out] ms The buffer that recieves the multi string.  This
+         can be NULL if only the size of the buffer is requried.
+ 
+     \param[in,out] pcb_ms On entry contains the number of bytes ni the
+         buffer poitned to by \a ms.  On exit contains the number of
+         bytes that were copied to \a ms including terminating NULLs,
+         or if the buffer was too small or \a ms was NULL, holds the
+         size in bytes of the requied buffer.
+ 
+     \param[in] csv The CSV string.
+ 
+     \retval KHM_ERROR_SUCCESS The CSV string was successfully
+        converted.  The number of bytes written is in \a pcb_ms.
+ 
+     \retval KHM_ERROR_TOO_LONG The provided buffer was too small or \a
+         ms was NULL. The required size of the buffer in bytes is in \a
+         pcb_ms.
+ 
+     \retval KHM_ERROR_INVALID_PARAM One or more parameters were invalid.
+ 
+  */
+ KHMEXP khm_int32 KHMAPI 
+ csv_to_multi_string(wchar_t * ms,
+                     khm_size * pcb_ms,
+                     const wchar_t * csv);
+ 
+ /*! \brief Get the next string in a multi string
+ 
+     When \a str is pointing to a string that is in a multi string,
+     this function returns a pointer to the next string in the multi
+     string.
+ 
+     Typically, one would start by having \a str point to the start of
+     the multi string (which is the first string in the multi string),
+     and then call this function repeatedly, until it returns NULL, at
+     which point the end of the multi string has been reached.
+ 
+     \param[in] str Pointer to a string in a multi string.  Each string
+         in a multi string cannot exceed KHM_MAXCCH_STRING in charaters
+         including the terminating NULL.
+ 
+     \return A pointer to the start of the next string in the multi
+         string or NULL if there is no more strings.
+  */
+ KHMEXP wchar_t * KHMAPI 
+ multi_string_next(const wchar_t * str);
+ 
+ /*! \brief Get the length of a multi string in bytes
+ 
+     The returned length includes the trailing double \a NULL and any
+     other \a NULL inbetween.
+ 
+     \param[in] str Pointer to a multi string.
+     \param[in] max_cb Maximum size that the str can be.  This can not
+         be larger than KHM_MAXCB_STRING.
+     \param[out] len_cb The length of the string in bytes if the call
+         is successful.
+ 
+     \retval KHM_ERROR_SUCCESS The length of the string is in \a len_cb
+     \retval KHM_ERROR_INVALID_PARAM One or more parameters were invalid
+     \retval KHM_ERROR_TOO_LONG The multi string is longer than \a
+         max_cb bytes.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ multi_string_length_cb(const wchar_t * str, 
+                        khm_size max_cb, 
+                        khm_size * len_cb);
+ 
+ /*! \brief Get the length of a multi string in characters
+ 
+     The returned length includes the trailing double \a NULL and any
+     other \a NULL inbetween.
+ 
+     \param[in] str Pointer to a multi string.
+     \param[in] max_cch Maximum size that the str can be.  This can not
+         be larger than KHM_MAXCCH_STRING.
+     \param[out] len_cch The length of the string in characters if the call
+         is successful.
+ 
+     \retval KHM_ERROR_SUCCESS The length of the string is in \a len_cch
+     \retval KHM_ERROR_INVALID_PARAM One or more parameters were invalid
+     \retval KHM_ERROR_TOO_LONG The multi string is longer than \a
+         max_cch characters.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ multi_string_length_cch(const wchar_t * str, 
+                         khm_size max_cch, 
+                         khm_size * len_cch);
+ 
+ /*! \brief Get the number of strings in a multi string
+  */
+ KHMEXP khm_size KHMAPI 
+ multi_string_length_n(const wchar_t * str);
+ 
+ /*! \brief Copy a multi string with byte counts
+ 
+     Copy a multi string from one location to another.
+ 
+     \param[out] s_dest Receives a copy of the multi string
+     \param[in] max_cb_dest Number of bytes in the buffer pointed to by
+         \a s_dest.
+     \param[in] src The source multi string
+ 
+     \retval KHM_ERROR_SUCCESS The multi string was copied successfully
+     \retval KHM_ERROR_INVALID_PARAM One or more parameters were
+         invalid.
+     \retval KHM_ERROR_TOO_LONG The size of the destination buffer was
+         insufficient.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ multi_string_copy_cb(wchar_t * s_dest, 
+                      khm_size max_cb_dest, 
+                      const wchar_t * src);
+ 
+ /*! \brief Copy a multi string with character count
+ 
+     Copy a multi string from one location to another.
+ 
+     \param[out] s_dest Receives a copy of the multi string
+     \param[in] max_cb_dest Number of characters in the buffer pointed
+         to by \a s_dest.
+     \param[in] src The source multi string
+ 
+     \retval KHM_ERROR_SUCCESS The multi string was copied successfully
+     \retval KHM_ERROR_INVALID_PARAM One or more parameters were
+         invalid.
+     \retval KHM_ERROR_TOO_LONG The size of the destination buffer was
+         insufficient.
+  */
+ KHMEXP khm_int32 KHMAPI 
+ multi_string_copy_cch(wchar_t * s_dest, 
+                       khm_size max_cch_dest, 
+                       const wchar_t * src);
+ 
+ /*@}*/
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/netidmgr.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/netidmgr.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/netidmgr.h	Thu Oct 12 17:42:41 2006
***************
*** 0 ****
--- 1,43 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: netidmgr.h,v 1.1.2.2 2006/10/12 21:42:41 jaltman Exp $ */
+ 
+ #ifndef __NETIDMGR_H
+ #define __NETIDMGR_H
+ 
+ #include "khdefs.h"
+ 
+ #include "utils.h"
+ #include "khuidefs.h"
+ #include "kmq.h"
+ #include "khmsgtypes.h"
+ #include "kcreddb.h"
+ #include "kherr.h"
+ #include "kherror.h"
+ #include "kconfig.h"
+ #include "kmm.h"
+ #include "kplugin.h"
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/netidmgr_version.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/netidmgr_version.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/netidmgr_version.h	Thu Oct 12 17:42:41 2006
***************
*** 0 ****
--- 1,59 ----
+ /* Copyright (c) 2004 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  *
+  */
+ 
+ #ifndef __NETIDMGR_VERSION_H
+ #define __NETIDMGR_VERSION_H
+ 
+ #include<windows.h>
+ 
+ /* Version number macros */
+ #define KH_VERSION_MAJOR 	1
+ #define KH_VERSION_MINOR 	1
+ #define KH_VERSION_PATCH 	0
+ #define KH_VERSION_AUX 		1
+ 
+ #define KH_VERSION_API          5
+ #define KH_VERSION_API_MINCOMPAT 5
+ 
+ #define KH_VERSION_LIST 	1,1,0,1
+ #define KH_VERSION_STRING 	"1.1.0.1"
+ #define KH_VERSION_STRINGW 	L"1.1.0.1"
+ #define KH_VERSION_STRINGC 	"1,1,0,1"
+ #define KH_VERSION_STRINGCW 	L"1,1,0,1"
+ #define KH_VERSION_STRINGAPI    "5"
+ 
+ /* Version definition macros */
+ #define KH_VER_FILEFLAGMASK     0x17L
+ #define KH_VER_FILEFLAGS 	0
+ #define KH_VER_FILEOS 		VOS_NT_WINDOWS32
+ #define KH_VER_FILETYPEDLL 	VFT_DLL
+ #define KH_VER_FILETYPEAPP 	VFT_APP
+ 
+ /* Special macros for NetIDMgr special string resources */
+ #define NIMV_MODULE             "NIDM_Module"
+ #define NIMV_PLUGINS            "NIDM_Plugins"
+ #define NIMV_APIVER             "NIDM_APIVers"
+ #define NIMV_SUPPORT            "NIDM_Support"
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/perfstat.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/perfstat.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/perfstat.h	Thu Oct 12 17:42:41 2006
***************
*** 0 ****
--- 1,71 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: perfstat.h,v 1.1.2.2 2006/10/12 21:42:41 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_PERFSTAT_H
+ #define __KHIMAIRA_PERFSTAT_H
+ 
+ #include<khdefs.h>
+ 
+ #ifdef DEBUG
+ #define PMALLOC(s) perf_malloc(__FILE__,__LINE__,s)
+ #define PCALLOC(n,s) perf_calloc(__FILE__,__LINE__,n,s)
+ #define PREALLOC(d,s) perf_realloc(__FILE__,__LINE__,d,s)
+ #define PFREE(p)   perf_free(p)
+ #define PDUMP(f)   perf_dump(f)
+ #define PWCSDUP(s) perf_wcsdup(__FILE__,__LINE__,s)
+ #define PSTRDUP(s) perf_strdup(__FILE__,__LINE__,s)
+ #else
+ #define PMALLOC(s) malloc(s)
+ #define PCALLOC(n,s) calloc(n,s)
+ #define PREALLOC(d,s) realloc(d,s)
+ #define PFREE(p)   free(p)
+ #define PDUMP(f)   ((void) 0)
+ #define PWCSDUP(s) wcsdup(s)
+ #define PSTRDUP(s) strdup(s)
+ #endif
+ 
+ KHMEXP void *
+ perf_malloc(char * file, int line, size_t s);
+ 
+ KHMEXP void *
+ perf_realloc(char * file, int line, void * data, size_t s);
+ 
+ KHMEXP void
+ perf_free  (void * b);
+ 
+ KHMEXP void
+ perf_dump  (char * filename);
+ 
+ KHMEXP wchar_t *
+ perf_wcsdup(char * file, int line, const wchar_t * str);
+ 
+ KHMEXP char *
+ perf_strdup(char * file, int line, const char * str);
+ 
+ KHMEXP void *
+ perf_calloc(char * file, int line, size_t num, size_t size);
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/sync.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/sync.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/sync.h	Thu Oct 12 17:42:41 2006
***************
*** 0 ****
--- 1,128 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: sync.h,v 1.1.2.2 2006/10/12 21:42:41 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_SYNC_H
+ #define __KHIMAIRA_SYNC_H
+ 
+ #include<khdefs.h>
+ 
+ /*! \addtogroup util
+     @{ */
+ 
+ /*! \defgroup util_sync Synchronization
+     @{*/
+ 
+ /*! \brief A read/write lock
+ 
+     A classic read/write lock.  Allows multiple readers or a single
+     writer to access a protected object.  Readers will wait for any
+     pending writer to release the lock, while a writer will wait for
+     any pending readers to release the lock.
+ */
+ typedef struct tag_rwlock {
+     int locks;
+     int status;
+     CRITICAL_SECTION cs;
+     HANDLE readwx;
+     HANDLE writewx;
+ 
+     DWORD writer;               /* TID of writer thread */
+ } rw_lock_t;
+ 
+ typedef rw_lock_t RWLOCK, *PRWLOCK;
+ 
+ /*! \brief Initialize a read/write lock.
+ 
+     A lock <b>must</b> be initialized before it can be used.
+     Initializing the lock does not grant the caller any locks on the
+     object.
+ */
+ KHMEXP void KHMAPI InitializeRwLock(PRWLOCK pLock);
+ 
+ /*! \brief Delete a read/write lock
+ 
+     Once the application is done using the read/write lock, it must be
+     deleted with a call to DeleteRwLock()
+ */
+ KHMEXP void KHMAPI DeleteRwLock(PRWLOCK pLock);
+ 
+ /*! \brief Obtains a read lock on the read/write lock
+ 
+     Multiple readers can obtain read locks on the same r/w lock.
+     However, if any thread attempts to obtain a write lock on the
+     object, it will wait until all readers have released the read
+     locks.
+ 
+     Call LockReleaseRead() to release the read lock.  While the same
+     thread may obtain multiple read locks on the same object, each
+     call to LockObtainRead() must have a corresponding call to
+     LockReleaseRead() to properly relinquish the lock.
+ 
+     \see LockReleaseRead()
+ */
+ KHMEXP void KHMAPI LockObtainRead(PRWLOCK pLock);
+ 
+ /*! \brief Relase a read lock obtained on a read/write lock
+ 
+     Each call to LockObtainRead() must have a corresponding call to
+     LockReleaseRead().  Once all read locks are released, any threads
+     waiting on write locks on the object will be woken and assigned a
+     write lock.
+ 
+     \see LockObtainRead()
+ */
+ KHMEXP void KHMAPI LockReleaseRead(PRWLOCK pLock);
+ 
+ /*! \brief Obtains a write lock on the read/write lock
+ 
+     Only a single writer is allowed to lock a single r/w lock.
+     However, if any thread attempts to obtain a read lock on the
+     object, it will wait until the writer has released the lock.
+ 
+     Call LockReleaseWrite() to release the write lock.  While the same
+     thread may obtain multiple write locks on the same object, each
+     call to LockObtainWrite() must have a corresponding call to
+     LockReleaseWrite() to properly relinquish the lock.
+ 
+     \see LockReleaseWrite()
+ */
+ KHMEXP void KHMAPI LockObtainWrite(PRWLOCK pLock);
+ 
+ /*! \brief Relase a write lock obtained on a read/write lock
+ 
+     Each call to LockObtainWrite() must have a corresponding call to
+     LockReleaseWrite().  Once the write lock is released, any threads
+     waiting for read or write locks on the object will be woken and
+     assigned the proper lock.
+ 
+     \see LockObtainWrite()
+ */
+ KHMEXP void KHMAPI LockReleaseWrite(PRWLOCK pLock);
+ 
+ /*@}*/
+ /*@}*/
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/netidmgr/utils.h
diff -c /dev/null openafs/src/WINNT/kfw/inc/netidmgr/utils.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/kfw/inc/netidmgr/utils.h	Thu Oct 12 17:42:41 2006
***************
*** 0 ****
--- 1,37 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: utils.h,v 1.1.2.2 2006/10/12 21:42:41 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_UTIL_H
+ #define __KHIMAIRA_UTIL_H
+ 
+ /*! \defgroup util Utilities
+  */
+ #include<hashtable.h>
+ #include<sync.h>
+ #include<mstring.h>
+ #include<perfstat.h>
+ 
+ #endif
Index: openafs/src/WINNT/kfw/inc/wshelper/hesiod.h
diff -c openafs/src/WINNT/kfw/inc/wshelper/hesiod.h:1.1 openafs/src/WINNT/kfw/inc/wshelper/hesiod.h:1.1.14.1
*** openafs/src/WINNT/kfw/inc/wshelper/hesiod.h:1.1	Thu Feb 26 14:22:56 2004
--- openafs/src/WINNT/kfw/inc/wshelper/hesiod.h	Thu Oct 12 17:42:41 2006
***************
*** 1,122 ****
! /* This file contains definitions for use by the Hesiod name service and
!  * applications.
   *
!  * @doc
!  *
!  * @module hesiod.h |
!  * For copying and distribution information, see the file 
!  * <gt> mit-copyright.h <lt>.
!  *
!  * Original version by Steve Dyer, IBM/Project Athena.
!  * 
!  */
! 
! /* Configuration information. */
  
  #ifndef _HESIOD_
  #define _HESIOD_
  
! #if defined(_WINDOWS) || defined(_WIN32)
  #include <windows.h>
- #endif
  
! #if defined(_WINDOWS) || defined(_WIN32)
  #define HESIOD_CONF     "c:\\net\\tcp\\hesiod.cfg"
- #else
- #define HESIOD_CONF     "/etc/hesiod.conf"      /* Configuration file. */
- #endif
  
! #define DEF_RHS         ".Athena.MIT.EDU"       /* Defaults if HESIOD_CONF */
! #define DEF_LHS         ".ns"                   /*    file is not present. */
  
! /* @doc ERROR
! /* Error codes. */
! /*
  
! @type HES_ER_UNINIT   | -1      uninitialized 
! @type HES_ER_OK       | 0       no error 
! @type HES_ER_NOTFOUND | 1       Hesiod name not found by server 
! @type HES_ER_CONFIG   | 2       local problem (no config file?) 
! @type HES_ER_NET      | 3        network problem
  
   */
  
! #define HES_ER_UNINIT   -1      /* uninitialized */
! #define HES_ER_OK       0       /* no error */
! #define HES_ER_NOTFOUND 1       /* Hesiod name not found by server */
! #define HES_ER_CONFIG   2       /* local problem (no config file?) */
! #define HES_ER_NET      3       /* network problem */
  
- /* Declaration of routines */
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
! #if defined(_WINDOWS) || defined(_WIN32)
! 
  LPSTR WINAPI
  hes_to_bind(
      LPSTR HesiodName, 
      LPSTR HesiodNameType
      );
  
  LPSTR * WINAPI
  hes_resolve(
      LPSTR HesiodName,
      LPSTR HesiodNameType
      );
  
  int WINAPI
  hes_error(
      void
      );
  
- #else 
- char *hes_to_bind(const char *name, const char *type);
- char **hes_resolve(const char *name, const char *type);
- int hes_error(void);
- #endif /* WINDOWS */
- 
  
! /*
!  * @doc
   *
!  * @struct hes_postoffice | For use in getting post-office information.
!  *
!  * @field LPSTR   | po_type | The post office type, e.g. POP, IMAP 
!  * @field LPSTR   | po_host | The post office host, e.g. PO10.MIT.EDU
!  * @field LPSTR   | po_name | The account name on the post office, e.g. tom
   *
   */
- #if defined(_WINDOWS) || defined(_WIN32)
  struct hes_postoffice {
      LPSTR   po_type;
      LPSTR   po_host;
      LPSTR   po_name;
  };
- #else
- struct hes_postoffice {
-     char    *po_type;
-     char    *po_host;
-     char    *po_name;
- };
- #endif
  
! /* Other routines */
  
! #if defined(_WINDOWS) || defined(_WIN32)
! struct hes_postoffice FAR * WINAPI hes_getmailhost(LPSTR user);
! struct servent FAR * WINAPI hes_getservbyname(LPSTR name, 
!                                                               LPSTR proto);
! struct passwd FAR * WINAPI hes_getpwnam(LPSTR nam);
! struct passwd FAR * WINAPI hes_getpwuid(int uid);
! #else
! struct hes_postoffice *hes_getmailhost();
! struct servent *hes_getservbyname();
! struct passwd *hes_getpwnam();
! struct passwd *hes_getpwuid();
! #endif
  
  #ifdef __cplusplus
  }
--- 1,214 ----
! /*!	\file hesiod.h
!  *	WSHelper DNS/Hesiod Library
   *
!  *	This file contains the function declaration for: \n
!  *	hes_to_bind()	\n
!  *	hes_resolve()	\n
!  *	hes_error()		\n
!  *	hes_free()		\n
!  *	hes_getmailhost()	\n
!  *	hes_getservbyname()	\n
!  *	hes_getpwnam()	\n
!  *	hes_getpwuid()	\n
! */
  
  #ifndef _HESIOD_
  #define _HESIOD_
  
! 
  #include <windows.h>
  
! /*! \def HESIOD_CONF
!  *	name of the hesiod configuration file. We will look at the file to determine the RHS AND LHS value before using the default.
!  *  Here is a sample hesiod.cfg file: \n
!  *	lhs .ns \n
!  *	rhs .ATHENA.MIT.EDU \n
!  */
  #define HESIOD_CONF     "c:\\net\\tcp\\hesiod.cfg"
  
! /*! \def DEF_RHS
!  *	default RHS value is the hesiod configuration file is not present
!  */
! #define DEF_RHS         ".Athena.MIT.EDU"      
! 
! /*! \def DEF_LHS
!  *	default LHS value is the hesiod configuration file is not present
!  */
! #define DEF_LHS         ".ns"                   
! 
! /*! \def HES_ER_UNINIT
!  *	HES error code: uninitialized 
!  */
! #define HES_ER_UNINIT   -1  
  
! /*! \def HES_ER_OK 
!  *	HES error code: no error 
!  */
! #define HES_ER_OK       0  
  
! /*! \def HES_ER_NOTFOUND 
!  *	HES error code: Hesiod name not found by server
!  */
! #define HES_ER_NOTFOUND 1      
  
+ /*! \def HES_ER_CONFIG  
+  *	HES error code: local problem (no config file?)
   */
+ #define HES_ER_CONFIG   2       
  
! /*! \def HES_ER_NET
!  *	HES error code: network problem
!  */
! #define HES_ER_NET      3      
  
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
! /*!	\fn LPSTR WINAPI hes_to_bind(LPSTR HesiodName, LPSTR HesiodNameType)
!  *	hes_to_bind function use the LHS and RHS values and 
!  *	binds them with the parameters so that a well formed DNS query may
!  *	be performed.
!  *
!  *	defined in hesiod.c
!  *
!  *	\param[in]	HesiodName		The Hesiod name such as a username or service name
!  *	\param[in]	HesiodNameType	The Hesiod name type such as pobox, passwd, or sloc
!  *	\retval		Returns NULL if there was an error. Otherwise the pointer to a string containing a valid query is returned.
!  *
!  */
  LPSTR WINAPI
  hes_to_bind(
      LPSTR HesiodName, 
      LPSTR HesiodNameType
      );
  
+ 
+ /*!	\fn LPSTR * WINAPI hes_resolve(LPSTR HesiodName, LPSTR HesiodNameType)
+  *	This function calls hes_to_bind to form a valid hesiod query, then queries the dns database.
+  *
+  *	defined in hesiod.c
+  *
+  *	\param[in]	HesiodName		The Hesiod name such as a username or service name
+  *	\param[in]	HesiodNameType	The Hesiod name type such as pobox, passwd, or sloc
+  *	\retval		returns a NULL terminated vector of strings (a la argv),
+  *				one for each resource record containing Hesiod data, or NULL if
+  *				there is any error. If there is an error call hes_error() to get
+  *				further information. You will need to call hes_free to free the result
+  *
+  */
+ 
  LPSTR * WINAPI
  hes_resolve(
      LPSTR HesiodName,
      LPSTR HesiodNameType
      );
  
+ /*! \fn  int WINAPI hes_error(void)
+  *	The  function  hes_error may be called to determine the 
+  *	source of the error.  It does not take an argument.
+  *
+  *	defined in hesiod.c
+  *
+  *	\retval		return one of the HES_ER_* codes defined in hesiod.h.
+  */
+ 
  int WINAPI
  hes_error(
      void
      );
  
  
! /*! \fn void WINAPI hes_free(LPSTR* hesinfo)
!  * The function hes_free should be called to free up memeory returned by hes_resolve
   *
!  * defined in hesiod.c
   *
+  * \param[in]	hesinfo		a NULL terminiated array of strings returned by hes_resolve
+  */
+ void WINAPI
+ hes_free(
+     LPSTR* hesinfo
+     );
+ 
+ 
+ /*! \struct hes_postoffice 
+  * For use in getting post-office information.
   */
  struct hes_postoffice {
+ 	/*! The post office type, e.g. POP, IMAP */
      LPSTR   po_type;
+ 	/*! The post office host, e.g. PO10.MIT.EDU */
      LPSTR   po_host;
+ 	/*! The account name on the post office, e.g. tom */
      LPSTR   po_name;
  };
  
! /*! \fn struct hes_postoffice  * WINAPI hes_getmailhost(LPSTR user)
!  * This call is used to obtain a user's type of mail account and the location of that 
!  *	account. E.g. POP PO10.MIT.EDU or IMAP IMAP-TEST.MIT.EDU
!  *
!  *	defined in hesmailh.c
!  *
!  *	\param[in]	user	The username to be used when querying for the Hesiod Name Type POBOX.
!  *	\retval				NULL if there was an error or if there was no entry for the
!  *						username. Otherwise a pointer to a hes_postoffice structure is
!  *						returned. The caller must never attempt to modify this structure or to free 
!  *						any of its components. Furthermore, only one copy of this structure is allocated per call per thread, so the application should copy any information it needs before 
!  *						issuing another getmailhost call
!  */
! struct hes_postoffice  * WINAPI hes_getmailhost(LPSTR user);
  
! /*!	\fn struct servent  * WINAPI hes_getservbyname(LPSTR name, LPSTR proto)
!  *	This function will query a Hesiod server for a servent structure given
!  *	a service name and protocol. This is a replacement for the Winsock
!  *	getservbyname function which normally just uses a local services
!  *	file. This allows a site to use a centralized database for adding new
!  *	services.
!  *	
!  *	defined in hesservb.c
!  *	
!  *	\param[in]	name	pointer to the official name of the service, eg "POP3".
!  *	\param[in]	proto	pointer to the protocol to use when contacting the service, e.g. "TCP"
!  *	\retval				NULL if there was an error or a pointer to a servent structure. The caller must 
!  *						never attempt to modify this structure or to free any of its components. 
!  *						Furthermore, only one copy of this structure is allocated per call per thread, so the application should copy any information it needs before 
!  *						issuing another hes_getservbyname call
!  *
!  */
! struct servent  * WINAPI hes_getservbyname(LPSTR name, 
!                                               LPSTR proto);
! 
! /*! \fn struct passwd  * WINAPI hes_getpwnam(LPSTR nam)
!  *	Given a username this function will return the pwd information, eg
!  *	username, uid, gid, fullname, office location, phone number, home
!  *	directory, and default shell
!  *
!  *	defined in hespwnam.c
!  *
!  *	\param	nam			a pointer to the username
!  *	\retval				NULL if there was an error or a pointer to the passwd structure. The caller must 
!  *						never attempt to modify this structure or to free any of its components. 
!  *						Furthermore, only one copy of this structure is allocated per call per thread, so the application should copy any information it needs before 
!  *						issuing another hes_getpwnam call
!  *
!  */
! struct passwd  * WINAPI hes_getpwnam(LPSTR nam);
! 
! /*!  struct passwd  * WINAPI hes_getpwuid(int uid)
!  * 	Given a UID this function will return the pwd information, eg username, uid,
!  *	gid, fullname, office location, phone number, home directory, and default shell
!  *	
!  *	defined in hespwnam.c
!  *
!  *	\param	uid			The user ID
!  *	\retval				NULL if there was an error or a pointer to the passwd structure. The caller must 
!  *						never attempt to modify this structure or to free any of its components. 
!  *						Furthermore, only one copy of this structure is allocated per call per thread, so the application should copy any information it needs before 
!  *						issuing another hes_getpwuid call
!  */
! struct passwd  * WINAPI hes_getpwuid(int uid);
  
  #ifdef __cplusplus
  }
Index: openafs/src/WINNT/kfw/inc/wshelper/mitwhich.h
diff -c openafs/src/WINNT/kfw/inc/wshelper/mitwhich.h:1.1 openafs/src/WINNT/kfw/inc/wshelper/mitwhich.h:1.1.14.1
*** openafs/src/WINNT/kfw/inc/wshelper/mitwhich.h:1.1	Thu Feb 26 14:22:56 2004
--- openafs/src/WINNT/kfw/inc/wshelper/mitwhich.h	Thu Oct 12 17:42:41 2006
***************
*** 1,14 ****
! /*
! 
! @doc
! 
! @module mitwhich.h |
! 
! some defines so that we can figure out which MS OS and subsystem an
! application is running under. Also support for finding out which
! TCP/IP stack is being used. This is useful when you need to find out
! about the domain or the nameservers.
! 
   */
  
  #if !defined( __MIT_WHICH_H )
--- 1,8 ----
! /*! \file mitwhich.h
!  *	some defines so that we can figure out which MS OS and subsystem an
!  *	application is running under. Also support for finding out which
!  *	TCP/IP stack is being used. This is useful when you need to find out
!  *	about the domain or the nameservers.
   */
  
  #if !defined( __MIT_WHICH_H )
***************
*** 51,62 ****
     should change these defaults to their own defaults either by
     editing this file and recompiling or by editing the string tables
     of the binaries. Don't use App Studio to edit the .RC files.
! <nl>
! 	#define DNS1	"18.70.0.160" <nl>
! 	#define DNS2	"18.71.0.151" <nl>
! 	#define DNS3	"18.72.0.3"   <nl>
! <nl>
! 	#define DEFAULT_DOMAIN "mit.edu" <nl>
  */
  
  #define DNS1	"18.70.0.160"
--- 45,56 ----
     should change these defaults to their own defaults either by
     editing this file and recompiling or by editing the string tables
     of the binaries. Don't use App Studio to edit the .RC files.
! \n
! 	#define DNS1	"18.70.0.160" \n
! 	#define DNS2	"18.71.0.151" \n
! 	#define DNS3	"18.72.0.3"   \n
! \n
! 	#define DEFAULT_DOMAIN "mit.edu" \n
  */
  
  #define DNS1	"18.70.0.160"
***************
*** 86,156 ****
  #define W95_DOMAIN_KEY "SYSTEM\\CurrentControlSet\\Services\\VxD\\MSTCP\\Domain"
  #define W95_NS_KEY     "SYSTEM\\CurrentControlSet\\Services\\VxD\\MSTCP\\NameServer"
  
- /*
- 
-   @comm Notes on different Winsock stack configuration files.<nl>
- 
-   The Microsoft stacks for Windows95 and NT 3.x, 4.x use the registry
-   to store the default domain and the IP addresses of the DNS
-   servers. The wshelper and wshelp32 will use the registry information
-   when possible.<nl>
- 
-   Novell's LAN WorkPlace stack and the much older Excelan products use
-   a resolv.cfg file to store this information. The resolv.cfg file
-   could be located in a number of places over the years. Our DLL will
-   try to search for it in:<nl><nl>
- 
-   C:\etc\resolv.cfg<nl>
-   C:\excelan\tcp\resolv.cfg<nl>
-   C:\net\tcp\resolv.cfg<nl>
-   %NDIR%\etc\resolv.cfg<nl>
-   %NDIR%\tcp\resolv.cfg<nl><nl>
- 
-   where %NDIR% is the expansion of the local environment variable
-   NDIR. So setting NDIR to be N:\COMMON\NET would mean that we would
-   also look in N:\common\net\etc\resolv.cfg and
-   N:\common\net\tcp\resolv.cfg for the domain and nameserver
-   information.<nl><nl>
- 
-   Here is a sample resolv.cfg file<nl>
- 
-   ; LAN WorkPlace resolver configuration file<nl>
-   domain mit.edu<nl>
- 
-   nameserver 18.70.0.160<nl>
-   nameserver 18.71.0.151<nl>
-   nameserver 18.72.0.3<nl>
-   ; end of file<nl><nl>
- 
-   The TRUMPET Winsock stack uses a TRUMPETWSK.INI file to store the
-   domain and nameserver configuration information. The section tag is
-   [Trumpet Winsock]. The domain information is identified by domain=
-   and the nameserver information is identified by a single name, dns=,
-   multiple nameservers may be specified on the same line and they
-   should be space delimited.<nl><nl>
- 
-   trupwsk.ini<nl>
-   [Trumpet Winsock]<nl>
-   dns=18.71.0.151 18.70.0.160 18.72.0.3<nl>
-   domain=mit.edu<nl><nl>
- 
-   Core Internet-Connect uses a CORE.INI file, nameservers are comma
-   delimited.<nl>
- 
-   [winsock]<nl>
-   domainname=mit.edu<nl>
-   nameservers=18.71.0.151, 18.70.0.160, 18.72.0.3<nl><nl>
- 
-   FTP software uses a PCTCP.INI file. This file may be located by use
-   of the environment variable PCTCP.<nl>
- 
-   [pctcp general]<nl>
-   domain=mit.edu<nl>
-   [pctcp addresses]<nl>
-   domain-name-server=18.70.0.160<nl>
-   domain-name-server=18.71.0.151<nl>
-   domain-name-server=18.72.0.3<nl>
- 
- */
  	   
  #endif // __MIT_WHICH_H
--- 80,84 ----
Index: openafs/src/WINNT/kfw/inc/wshelper/resolv.h
diff -c openafs/src/WINNT/kfw/inc/wshelper/resolv.h:1.1 openafs/src/WINNT/kfw/inc/wshelper/resolv.h:1.1.14.1
*** openafs/src/WINNT/kfw/inc/wshelper/resolv.h:1.1	Thu Feb 26 14:22:56 2004
--- openafs/src/WINNT/kfw/inc/wshelper/resolv.h	Thu Oct 12 17:42:41 2006
***************
*** 1,126 ****
! /*
! 
! @doc
! 
! @module resolv.h |
!  * Copyright (c) 1983, 1987, 1989 The Regents of the University of California.
!  * All rights reserved. <nl>
! 
!   Structure definitions for resolver functions and #define statements
! 
  */
  
- /*
-  * Copyright (c) 1983, 1987, 1989 The Regents of the University of California.
-  * All rights reserved.
-  *
-  * Redistribution and use in source and binary forms, with or without
-  * modification, are permitted provided that the following conditions
-  * are met:
-  * 1. Redistributions of source code must retain the above copyright
-  *    notice, this list of conditions and the following disclaimer.
-  * 2. Redistributions in binary form must reproduce the above copyright
-  *    notice, this list of conditions and the following disclaimer in the
-  *    documentation and/or other materials provided with the distribution.
-  * 3. All advertising materials mentioning features or use of this software
-  *    must display the following acknowledgement:
-  *      This product includes software developed by the University of
-  *      California, Berkeley and its contributors.
-  * 4. Neither the name of the University nor the names of its contributors
-  *    may be used to endorse or promote products derived from this software
-  *    without specific prior written permission.
-  *
-  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-  * SUCH DAMAGE.
-  *
-  *      @(#)resolv.h    5.15 (Berkeley) 4/3/91
-  */
- 
  #ifndef _RESOLV_H_
  #define _RESOLV_H_
  
- #if defined(_WINDOWS) || defined(_WIN32)
  #include <windows.h>
  #endif
  
! /*
!  * Resolver configuration file.
!  * Normally not present, but may contain the address of the
!  * inital name server(s) to query and the domain search list.
   */
  
! #ifndef _PATH_RESCONF
! #if defined(_WINDOWS) || defined(_WIN32)
! #define _PATH_RESCONF        "c:\\net\\tcp\\resolv.cfg"
! #else
! #define _PATH_RESCONF        "/etc/resolv.conf"
! #endif
! #endif
  
! #ifndef MAXDNAME
! #include <arpa/nameser.h>
! #endif
  
! /*
!  * Global defines and variables for resolver stub.
   */
! #define MAXNS                   3       /* max # name servers we'll track */
! #define MAXDFLSRCH              3       /* # default domain levels to try */
! #define MAXDNSRCH               6       /* max # domains in search path */
! #define LOCALDOMAINPARTS        2       /* min levels in name that is "local" */
  
! #define RES_TIMEOUT             5       /* min. seconds between retries */
  
! // new
  #define MAXMXRECS               8
  
  struct mxent {
!     int numrecs;
!     u_short pref[MAXMXRECS];
!     char FAR * FAR * hostname;
  };
  
  
! /*
! 
!   @struct state | This structure holds the state for the resolver query
! 
   */
  struct state {
!     int     retrans;                /* @field retransmition time interval */
!     int     retry;                  /* @field number of times to retransmit */
!     long    options;                /* @field option flags - see below. */
!     int     nscount;                /* @field number of name servers */
!     struct  sockaddr_in nsaddr_list[MAXNS]; /* @field address of name server */
! #define nsaddr  nsaddr_list[0]          /* @field for backward compatibility */
!     u_short id;                     /* @field current packet id */
!     char    defdname[MAXDNAME];     /* @field default domain */
!     char    *dnsrch[MAXDNSRCH+1];   /* @field components of domain to search */
  };
  
! /*
!  * Resolver options
   */
! #define RES_INIT        0x0001          /* address initialized */
! #define RES_DEBUG       0x0002          /* print debug messages */
! #define RES_AAONLY      0x0004          /* authoritative answers only */
! #define RES_USEVC       0x0008          /* use virtual circuit */
! #define RES_PRIMARY     0x0010          /* query primary server only */
! #define RES_IGNTC       0x0020          /* ignore trucation errors */
! #define RES_RECURSE     0x0040          /* recursion desired */
! #define RES_DEFNAMES    0x0080          /* use default domain name */
! #define RES_STAYOPEN    0x0100          /* Keep TCP socket open */
! #define RES_DNSRCH      0x0200          /* search up local domain tree */
  
  #define RES_DEFAULT     (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
  
  extern struct state _res;
--- 1,145 ----
! /*! \file resolv.h
!  *  WSHelper DNS/Hesiod Library header 
!  *	This file contains the function declaration for:\n
!  *	res_init()		\n
!  *	res_search()	\n
!  *  dn_comp()		\n
!  *	rdn_expand()	\n \n
!  *	and unsupported functions: \n 
!  *	res_setopts()		\n
!  *	res_getopts()		\n
!  *	res_querydomain()	\n
!  *	res_mkquery()		\n
!  *	res_send()			\n
  */
  
  #ifndef _RESOLV_H_
  #define _RESOLV_H_
  
  #include <windows.h>
+ #ifndef MAXDNAME
+ #include <arpa/nameser.h>
  #endif
  
! /*! \def MAXNS
!  *	max # name servers we'll track
   */
+ #define MAXNS                   3       
  
! /*! \def MAXDFLSRCH
!  *	# default domain levels to try
!  */
! #define MAXDFLSRCH              3      
  
! /*!	\def MAXDNSRCH 
!  *	max # domains in search path
!  */
! #define MAXDNSRCH               6      
  
! /*! \def LOCALDOMAINPARTS
!  *	min levels in name that is "local"
   */
! #define LOCALDOMAINPARTS        2      
  
! /*! \def RES_TIMEOUT
!  *	min. seconds between retries
!  */
! #define RES_TIMEOUT             5       
  
! /*! \def MAXMXRECS
!  *	number of records in the preference array in the MX record
!  */
  #define MAXMXRECS               8
  
+ /*! \struct mxent 
+  *	structure to hold the MX record
+  */
  struct mxent {
! 	/*! number of records in the preference field */
!     int numrecs;	
! 	/*! holds a 16 bit integer which specifies the preference given to this RR */
!     u_short pref[MAXMXRECS];	
! 	/*! a host willing to act as a mail exchange */
!     char ** hostname;			
  };
  
  
! /*! \struct state
!  * This structure holds the state for the resolver query
   */
  struct state {
! 	/*! retransmition time interval */
!     int     retrans;  
! 	/*! number of times to retransmit */
!     int     retry;  
! 	/*! field option flags - see below. */
!     long    options;    
! 	 /*! field number of name servers */
!     int     nscount; 
! 	/*! address of name server */
!     struct  sockaddr_in nsaddr_list[MAXNS]; 
! #define nsaddr  nsaddr_list[0] 
! 	/*! current packet id */
!     u_short id;    
! 	/*! field default domain */
!     char    defdname[MAXDNAME];  
! 	/*! field components of domain to search */
!     char    *dnsrch[MAXDNSRCH+1];   
  };
  
! /*! \def RES_INIT
!  *	resolver option: address initialized
!  */
! #define RES_INIT        0x0001          
! 
! /*! \def RES_DEBUG
!  *	resolver option: print debug messages
!  */
! #define RES_DEBUG       0x0002         
! 
! /*! \def RES_AAONLY
!  *	resolver option: authoritative answers only
!  */
! #define RES_AAONLY      0x0004  
! 
! /*! \def RES_USEVC
!  *	resolver option: use virtual circuit
!  */
! #define RES_USEVC       0x0008          
! 
! /*! \def RES_PRIMARY 
!  *	resolver option: query primary server only
!  */
! #define RES_PRIMARY     0x0010    
! 
! /*! \def RES_IGNTC
!  *	resolver option: ignore trucation errors
!  */
! #define RES_IGNTC       0x0020   
! 
! /*! \def RES_RECURSE
!  *	resolver option: recursion desired
!  */
! #define RES_RECURSE     0x0040          
! 
! /*! \def RES_DEFNAMES
!  *	resolver option: use default domain name
!  */
! #define RES_DEFNAMES    0x0080  
! 
! /*! \def RES_STAYOPEN
!  *	resolver option: Keep TCP socket ope
   */
! #define RES_STAYOPEN    0x0100   
  
+ /*! \def RES_DNSRCH
+  *	resolver option: search up local domain tree
+  */
+ #define RES_DNSRCH      0x0200         
+ 
+ /*! \def RES_DEFAULT
+  *	resolver option: Default RES options (RES_RECURSE + RES_DEFNAMES + RES_DNSRCH)
+  */
  #define RES_DEFAULT     (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
  
  extern struct state _res;
***************
*** 128,134 ****
  #include <stdio.h>
  
  /* Private routines shared between libc/net, named, nslookup and others. */
- #define dn_skipname     __dn_skipname
  #define fp_query        __fp_query
  #define hostalias       __hostalias
  #define putlong         __putlong
--- 147,152 ----
***************
*** 137,201 ****
  #define p_time          __p_time
  #define p_type          __p_type
  
- #if defined(_WINDOWS) || defined(_WIN32)
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
  int  WINAPI res_init();
! void WINAPI res_setopts(long opts);
! long WINAPI res_getopts(void);
! int  WINAPI res_mkquery(int op, const char FAR *dname, 
!                                         int qclass, int type, 
!                                         const char FAR *data, int datalen, 
!                                         const struct rrec FAR *newrr,
!                                         char FAR *buf, int buflen);
! int  WINAPI res_send(const char FAR *msg, int msglen, 
!                                      char FAR *answer, int anslen);
! int  WINAPI res_querydomain(const char FAR *name, 
!                                             const char FAR *domain, 
!                                             int qclass, int type, 
!                                             u_char FAR *answer, int anslen);
! int  WINAPI res_search(const char FAR *name, 
                                         int qclass, int type, 
!                                        u_char FAR *answer, int anslen);
  
! int  WINAPI dn_comp(const u_char FAR *exp_dn, 
!                                     u_char FAR *comp_dn, 
!                                     int length, u_char FAR * FAR *dnptrs, 
!                                     u_char FAR * FAR *lastdnptr);
! int  WINAPI rdn_expand(const u_char FAR *msg, 
!                                       const u_char FAR *eomorig, 
!                                       const u_char FAR *comp_dn, 
!                                       u_char FAR *exp_dn, 
                                        int length);
  /* Microsoft includes an implementation of dn_expand() in winsock */
  /* Make sure we do not use it.  jaltman@columbia.edu              */
  #define dn_expand(a,b,c,d,e) rdn_expand(a,b,c,d,e)
  
  #ifdef __cplusplus
  }
  #endif
- #else
- __BEGIN_DECLS
- int      __dn_skipname __P((const u_char *, const u_char *));
- void     __fp_query __P((char *, FILE *));
- char    *__hostalias __P((const char *));
- void     __putlong __P((u_long, u_char *));
- void     __putshort __P((u_short, u_char *));
- char    *__p_class __P((int));
- char    *__p_time __P((u_long));
- char    *__p_type __P((int));
- 
- int      dn_comp __P((const u_char *, u_char *, int, u_char **, u_char **));
- int      rdn_expand __P((const u_char *, const u_char *, const u_char *,
-                         u_char *, int));
- int      res_init __P((void));
- int      res_mkquery __P((int, const char *, int, int, const char *, int,
-                           const struct rrec *, char *, int));
- int      res_send __P((const char *, int, char *, int));
- __END_DECLS
- #endif /* _WINDOWS || _WIN32 */
  
  #endif /* !_RESOLV_H_ */
--- 155,284 ----
  #define p_time          __p_time
  #define p_type          __p_type
  
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
+ /*! \fn int WINAPI res_init()
+  *	\brief retrieves the default domain name and search order. It will look to see if an environment variable LOCALDOMAIN is defined. Otherwise, 
+  *	the domain associated with the local host is used. Otherwise, it will try to find the domain name from the registry
+  *
+  *  defined in res_init.c 
+  *	
+  *	\retval		The return value is 0 if the operation was successful.  Otherwise the value -1 is returned.
+  */
  int  WINAPI res_init();
! 
!                            
! /*! \fn	int WINAPI res_search(const char* name, int qclass, int type, u_char* answer, int anslen)
!  *	\brief a generic query interface to the DNS name space. The query is performed with the dnsapi and
!  *	the answer buffer is populated based on the returned RR set.
!  *
!  *	defined in res_quer.c
! 
!  *	\param[in]	name	domain name
!  *	\param[in]	qclass  class of query(such as DNS_CLASS_INTERNET, DNS_CLASS_CSNET, DNS_CLASS_CHAOS, 
!  *						DNS_CLASS_HESIOD. Defined in windns.h) 
!  *	\param[in]	type	type of query(such as DNS_TYPE_A, DNS_TYPE_NS, DNS_TYPE_MX, DNS_TYPE_SRV. Defined in
!  *						windns.h)
!  *	\param[in]	answer  buffer to put answer in
!  *	\param[in]	anslen	size of the answer buffer. compare the anslen with the return value, if the return
!  *						value is bigger than anslen, it means the answer buffer doesn't contain the complete
!  *						response. You will need to call this function again with a bigger answer buffer if
!  *						you care about the complete response
!  *
!  *	\retval		return the size of the response on success, -1 on error
!  *
!  */
! int  WINAPI res_search(const char  *name, 
                                         int qclass, int type, 
!                                        u_char  *answer, int anslen);
  
! /*! \fn	int WINAPI dn_comp(const u_char* exp_dn, u_char* comp_dn, int length, u_char** dnptrs, u_char** lastdnptr) 
!  *	\brief Compress domain name 'exp_dn' into 'comp_dn'
!  *
!  *	defined in res_comp.c
!  *
!  *	\param[in]	exp_dn	name to compress
!  *	\param[in, out]	comp_dn		result of the compression
!  *	\param[in]	length			the size of the array pointed to by 'comp_dn'.
!  *	\param[in, out]	dnptrs		a list of pointers to previous compressed names. dnptrs[0]
!  *								is a pointer to the beginning of the message. The list ends with NULL.
!  *	\param[in]	lastdnptr		a pointer to the end of the arrary pointed to by 'dnptrs'. Side effect 
!  *								is to update the list of pointers for labels inserted into the 
!  *								message as we compress the name. If 'dnptr' is NULL, we don't try to 
!  *								compress names. If 'lastdnptr' is NULL, we don't update the list.
!  *	\retval						Return the size of the compressed name or -1
!  */
! int  WINAPI dn_comp(const u_char *exp_dn, 
!                                     u_char  *comp_dn, 
!                                     int length, u_char  **dnptrs, 
!                                     u_char  * *lastdnptr);
! 
! /*! \fn int WINAPI rdn_expand(const u_char  *msg, const u_char  *eomorig, const u_char  *comp_dn, u_char  *exp_dn, 
!                               int length);
!  *	\brief	replacement for dn_expand called rdn_expand. Older versions of the DLL used to this as dn_expand 
!  *			but this has caused some conflict with more recent versions of the MSDEV libraries. rdn_expand() 
!  *			expands the compressed domain name comp_dn to a full domain name.  Expanded names are converted to upper case.
!  *
!  *	defined in res_comp.c
!  *
!  *	\param[in]		msg			msg is a pointer to the  beginning  of  the  message
!  *	\param[in]		eomorig	
!  *	\param[in]		comp_dn		the compressed domain name.
!  *	\param[in, out]	exp_dn		a pointer to the result buffer
!  *	\param[in]		length		size of the result in expn_dn
!  *	\retval						the size of compressed name is returned or -1 if there was an error.
! */
! int  WINAPI rdn_expand(const u_char  *msg, 
!                                       const u_char  *eomorig, 
!                                       const u_char  *comp_dn, 
!                                       u_char  *exp_dn, 
                                        int length);
  /* Microsoft includes an implementation of dn_expand() in winsock */
  /* Make sure we do not use it.  jaltman@columbia.edu              */
  #define dn_expand(a,b,c,d,e) rdn_expand(a,b,c,d,e)
  
+ 
+ /*! \fn void WINAPI res_setopts(long opts) 
+  *		unsupported 
+ */
+ void WINAPI res_setopts(long opts);
+ 
+ /*! \fn long WINAPI res_getopts(void)
+  *		unsupported
+ */
+ long WINAPI res_getopts(void);
+ 
+ /*! \fn int  WINAPI res_mkquery(int op, const char *dname, int qclass, int type, const char  *data, int datalen, 
+  *					const struct rrec  *newrr, char  *buf, int buflen)
+  *		unsupported
+  */
+ int  WINAPI res_mkquery(int op, const char *dname, 
+                                         int qclass, int type, 
+                                         const char  *data, int datalen, 
+                                         const struct rrec  *newrr,
+                                         char  *buf, int buflen);
+ 
+ /*! \fn int  WINAPI res_send(const char  *msg, int msglen, char  *answer, int anslen)
+  *		unsupported 
+ */
+ int  WINAPI res_send(const char  *msg, int msglen, 
+                                      char  *answer, int anslen);
+ 
+ /*! \fn int  WINAPI res_querydomain(const char  *name, const char  *domain, int qclass, int type, 
+ 									u_char  *answer, int anslen);
+ *		unsupported
+ */
+ int  WINAPI res_querydomain(const char  *name, 
+                                             const char  *domain, 
+                                             int qclass, int type, 
+ 											u_char  *answer, int anslen);
+                  
+ 
  #ifdef __cplusplus
  }
  #endif
  
  #endif /* !_RESOLV_H_ */
Index: openafs/src/WINNT/kfw/inc/wshelper/wshelper.h
diff -c openafs/src/WINNT/kfw/inc/wshelper/wshelper.h:1.1 openafs/src/WINNT/kfw/inc/wshelper/wshelper.h:1.1.14.1
*** openafs/src/WINNT/kfw/inc/wshelper/wshelper.h:1.1	Thu Feb 26 14:22:56 2004
--- openafs/src/WINNT/kfw/inc/wshelper/wshelper.h	Thu Oct 12 17:42:41 2006
***************
*** 1,53 ****
! /*
!    WSHelper DNS/Hesiod Library for WINSOCK
!    wshelper.h
! */
  
  #ifndef _WSHELPER_
  #define _WSHELPER_
  
  #include <winsock.h>
  #include <mitwhich.h>
- 
  #include <resolv.h>
  #include <hesiod.h>
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
! struct hostent FAR* WINAPI rgethostbyname(char FAR *name);
! struct hostent FAR* WINAPI rgethostbyaddr(char FAR *addr, 
!                                                           int len, int type);
! struct servent FAR* WINAPI rgetservbyname(LPSTR name, 
!                                                           LPSTR proto); 
  
  LPSTR WINAPI gethinfobyname(LPSTR name);
  LPSTR WINAPI getmxbyname(LPSTR name);
- LPSTR WINAPI getrecordbyname(LPSTR name, int rectype);
- DWORD WINAPI rrhost( LPSTR lpHost );
  
! unsigned long WINAPI inet_aton(register const char *cp, 
!                                                struct in_addr *addr);
  
! DWORD WhichOS( DWORD *check);
  
! #ifdef _WIN32
  int WINAPI wsh_gethostname(char* name, int size);
- int WINAPI wsh_getdomainname(char* name, int size);
- LONG FAR WSHGetHostID();
- #endif
  
! /* some definitions to determine which OS were using and which subsystem */
!                               
! #if !defined( STACK_UNKNOWN )                              
! #define STACK_UNKNOWN    -1
! #define MS_NT_32          1
! #define MS_NT_16          2
! #define MS_95_32          3
! #define MS_95_16          4
! #define NOVELL_LWP_16     5
! #endif /* STACK_UNKNOWN */
  
  
  #ifdef __cplusplus
--- 1,144 ----
! /*! \file wshelper.h
!  * WSHelper DNS/Hesiod Library   
!  *
!  * This file contains the function declaration for:	\n
!  *	rgethostbyname()	\n
!  *	rgethostbyaddr()	\n	
!  *  rgetservbyname()	\n
!  *  inet_aton()			\n
!  *	wsh_gethostname()	\n
!  *	wsh_getdomainname()	\n \n
!  *  and unsupported functions: \n
!  *	gethinfobyname()	\n
!  *	getmxbyname()		\n
!  *	getrecordbyname()	\n
!  *	rrhost()			\n
!  */
  
  #ifndef _WSHELPER_
  #define _WSHELPER_
  
  #include <winsock.h>
  #include <mitwhich.h>
  #include <resolv.h>
  #include <hesiod.h>
  
  #ifdef __cplusplus
  extern "C" {
  #endif
+ /*!  \fn struct hostent * WINAPI rgethostbyname(char  *name)
+  *	retrieves host information corresponding to a host name in the DNS database
+  *
+  *	defined in gethna.c
+  *
+  *	\param[in]	name	Pointer to the null-terminated name of the host to resolve. It can be a fully qualified host name such as x.mit.edu
+  *						or it can be a simple host name such as x. If it is a simple host name, the default domain name is
+  *						appended to do the search.
+  *	\retval		a pointer to the structure hostent. a structure allocated by the library. The hostent structure contains 
+  *				the results of a successful search for the host specified in the name parameter. The caller must never 
+  *				attempt to modify this structure or to free any of its components. Furthermore, only one copy of this 
+  *				structure is allocated per call per thread, so the application should copy any information it needs before 
+  *				issuing another rgethostbyname.
+  *				NULL if the search has failed
+  *
+ */
+ struct hostent * WINAPI rgethostbyname(char  *name);
  
! /*! \fn struct hostent * WINAPI rgethostbyaddr(char  *addr, int len, int type)
!  *	retrieves the host information corresponding to a network address in the DNS database
!  *	
!  *	defined in gethna.c
!  *
!  *	\param[in]	addr	Pointer to an address in network byte order
!  *	\param[in]	len		Length of the address, in bytes
!  *	\param[in]  type	Type of the address, such as the AF_INET address family type (defined as TCP, 
!  *						UDP, and other associated Internet protocols). Address family types and their corresponding 
!  *						values are defined in the Winsock2.h header file. 
!  *	\retval		returns a pointer to the hostent structure that contains the name and address corresponding 
!  *				to the given network address. The structure is allocated by the library.  The caller must never 
!  *				attempt to modify this structure or to free any of its components. Furthermore, only one copy of this 
!  *				structure is allocated per call per thread, so the application should copy any information it needs before 
!  *				issuing another rgethostbyaddr.
!  *				NULL if the search has failed
!  *
! */
! struct hostent * WINAPI rgethostbyaddr(char  *addr, int len, int type);
  
+ /*! \fn	struct servent * WINAPI rgetservbyname(LPSTR name, LPSTR proto)
+  *	retrieves service information corresponding to a service name and protocol.
+  *	
+  *	defined in gethna.c
+  *
+  *	\param[in]	name	Pointer to a null-terminated service name. 
+  *	\param[in]  proto	pointer to a null-terminated protocol name. getservbyname should match both 
+  *						the name and the proto. 
+  *	\retval		a pointer to the servent structure containing the name(s) and service number that match the name and proto
+  *				parameters. The structure is allocated by the library.  The caller must never 
+  *				attempt to modify this structure or to free any of its components. Furthermore, only one copy of this 
+  *				structure is allocated per call per thread, so the application should copy any information it needs before 
+  *				issuing another rgetservbyname.
+  *				NULL if the search has failed
+  *
+  */
+ struct servent * WINAPI rgetservbyname(LPSTR name, LPSTR proto); 
+ 
+ /*! \fn LPSTR WINAPI gethinfobyname(LPSTR name)
+  *	unsupported
+  */
  LPSTR WINAPI gethinfobyname(LPSTR name);
+ 
+ /*! \fn LPSTR WINAPI getmxbyname(LPSTR name)
+  *	unsupported
+  */
  LPSTR WINAPI getmxbyname(LPSTR name);
  
! /*! \fn LPSTR WINAPI getrecordbyname(LPSTR name, int rectype)
!  *	unsupported
!  */
! LPSTR WINAPI getrecordbyname(LPSTR name, int rectype);
  
! /*! \fn  DWORD WINAPI rrhost( LPSTR lpHost )
!  *	unsupported
!  */
! DWORD WINAPI rrhost( LPSTR lpHost );
  
! /*! \fn  unsigned long WINAPI inet_aton(register const char *cp, struct in_addr *addr)
!  *	converts a string containing an (Ipv4) Internet Protocol dotted address into a proper address for the in_addr structure
!  *	
!  *	defined in inetaton.c
!  *	
!  *	\param[in]		cp		Null-terminated character string representing a number expressed in the 
!  *							Internet standard ".'' (dotted) notation. 
!  *	\param[in, out]	addr	pointer to the in_addr structure. The s_addr memeber will be populated
!  *	\retval Returns 1 if the address is valid, 0 if not.
!  */
! unsigned long WINAPI inet_aton(register const char *cp, struct in_addr *addr);
! 
! 											   
! /*! \fn int WINAPI wsh_gethostname(char* name, int size)
!  *	Gets the base part of the hostname
!  *	
!  *	defined in res_init.c
!  * 
!  *	\param[in, out]	name	pointer to a buffer that receives a null-terminated string containing the computer name 
!  *	\param[in]		size	specifies the size of the buffer, in chars (must be large
!  *							enough to hold NULL-terminated host name)
!  *	\retval			return 0 ifsuccess,  -1 on error.
! */
  int WINAPI wsh_gethostname(char* name, int size);
  
! /*!	\fn int WINAPI wsh_getdomainname(char* name, int size)
!  *	Gets the machine's domain name
!  *	
!  *	defined in res_init.c
!  * 
!  *	\param[in, out]	name	pointer to a buffer that receives a null-terminated string containing the domain name 
!  *	\param[in]		size	specifies the size of the buffer, in chars (must be large
!  *							enough to hold NULL-terminated domain name)
!  *
!  *	\retval			return 0 ifsuccess,  -1 on error.
!  */
! int WINAPI wsh_getdomainname(char* name, int size);
  
  
  #ifdef __cplusplus
Index: openafs/src/WINNT/kfw/lib/i386/comerr32.lib
Index: openafs/src/WINNT/kfw/lib/i386/delaydlls.lib
Index: openafs/src/WINNT/kfw/lib/i386/getopt.lib
Index: openafs/src/WINNT/kfw/lib/i386/gssapi32.lib
Index: openafs/src/WINNT/kfw/lib/i386/kclnt32.lib
Index: openafs/src/WINNT/kfw/lib/i386/krb524.lib
Index: openafs/src/WINNT/kfw/lib/i386/krb5_32.lib
Index: openafs/src/WINNT/kfw/lib/i386/krbcc32.lib
Index: openafs/src/WINNT/kfw/lib/i386/krbv4w32.lib
Index: openafs/src/WINNT/kfw/lib/i386/leashw32.lib
Index: openafs/src/WINNT/kfw/lib/i386/loadfuncs.lib
Index: openafs/src/WINNT/kfw/lib/i386/nidmgr32.lib
Index: openafs/src/WINNT/kfw/lib/i386/wshelp32.lib
Index: openafs/src/WINNT/kfw/lib/i386/xpprof32.lib
Index: openafs/src/WINNT/netidmgr_plugin/NTMakefile
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/NTMakefile:1.1.2.4
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/NTMakefile	Mon Oct 16 09:55:34 2006
***************
*** 0 ****
--- 1,183 ----
+ #
+ # Copyright (c) 2005,2006 Secure Endpoints Inc.
+ #
+ # Permission is hereby granted, free of charge, to any person
+ # obtaining a copy of this software and associated documentation files
+ # (the "Software"), to deal in the Software without restriction,
+ # including without limitation the rights to use, copy, modify, merge,
+ # publish, distribute, sublicense, and/or sell copies of the Software,
+ # and to permit persons to whom the Software is furnished to do so,
+ # subject to the following conditions:
+ #
+ # The above copyright notice and this permission notice shall be
+ # included in all copies or substantial portions of the Software.
+ #
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ # SOFTWARE.
+ 
+ AFSDEV_AUXRCFLAGS=/i ..\kfw\inc\netidmgr
+ RELDIR=WINNT\netidmgr_plugin
+ !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME)
+ !INCLUDE ..\..\config\NTMakefile.version
+ 
+ AFSPLUGIN_VERSION_MAJOR=$(AFSPRODUCT_VER_MAJOR)
+ AFSPLUGIN_VERSION_MINOR=$(AFSPRODUCT_VER_MINOR)
+ AFSPLUGIN_VERSION_PATCH=$(AFSPRODUCT_VER_PATCH)
+ AFSPLUGIN_VERSION_AUX  =$(AFSPRODUCT_VER_BUILD)
+ 
+ AFSPLUGIN_VERSION=$(AFSPLUGIN_VERSION_MAJOR).$(AFSPLUGIN_VERSION_MINOR).$(AFSPLUGIN_VERSION_PATCH).$(AFSPLUGIN_VERSION_AUX)
+ AFSPLUGIN_VERLIST=$(AFSPLUGIN_VERSION_MAJOR),$(AFSPLUGIN_VERSION_MINOR),$(AFSPLUGIN_VERSION_PATCH),$(AFSPLUGIN_VERSION_AUX)
+ 
+ # short form version numbers
+ TAFSPLUGIN_VERSION=$(AFSPLUGIN_VERSION_MAJOR).$(AFSPLUGIN_VERSION_MINOR).$(AFSPLUGIN_VERSION_PATCH)
+ 
+ !INCLUDE afsp_version.h.in
+ 
+ # Directories
+ 
+ EXEDIR = $(DESTDIR)\root.client\usr\vice\etc
+ 
+ INCFILEDIR = $(DESTDIR)\include\WINNT
+ 
+ LIBFILEDIR = $(DESTDIR)\lib
+ 
+ KFWINCDIR = ..\kfw\inc
+ 
+ KFWLIBDIR = ..\kfw\lib\$(CPU)
+ 
+ # Build environment
+ 
+ kfwincflags=-I$(KFWINCDIR)\krb5\KerberosIV -I$(KFWINCDIR)\loadfuncs -I$(KFWINCDIR)\krb5 -I$(KFWINCDIR)\netidmgr -I$(KFWINCDIR)
+ afsincflags=-I$(DESTDIR)\include
+ 
+ incflags=$(kfwincflags) $(afsincflags) -I.
+ pldefines=-DUNICODE -D_UNICODE
+ cdebug=$(cdebug) -Os -Zi
+ cwarn=$(cwarn) /Wp64 /WX
+ 
+ plcflags=$(cdebug) $(cflags) $(incflags) $(pldefines) $(cwarn) $(cvarsmt)
+ 
+ PC2OBJ=$(CC) $(plcflags) /Fo"$@" /c $**
+ 
+ {}.c{$(OBJ)}.obj:
+ 	$(PC2OBJ)
+ 
+ # Targets
+ 
+ CHMFILE=$(EXEDIR)\afsplhlp.chm
+ 
+ DLLFILE=$(EXEDIR)\afscred.dll
+ 
+ LIBFILE=$(LIBFILEDIR)\afscred.lib
+ 
+ INCFILES=				\
+ 	afsp_version.h			\
+ 	$(INCFILEDIR)\afspext.h		\
+ 	$(INCFILEDIR)\afsp_version.h
+ 
+ OBJFILES= 				\
+ 	$(OUT)\afsfuncs.obj 		\
+ 	$(OUT)\afsplugin.obj 		\
+ 	$(OUT)\main.obj 		\
+ 	$(OUT)\afsconfig.obj 		\
+ 	$(OUT)\afsconfigdlg.obj 	\
+ 	$(OUT)\afsnewcreds.obj		\
+ 	$(OUT)\afsext.obj		\
+ 	$(OUT)\afshelp.obj		\
+ 	$(OUT)\dynimport.obj 		\
+ 	$(OUT)\krb5common.obj
+ 
+ LIBFILES= 				\
+ 	$(KFWLIBDIR)\nidmgr32.lib
+ 
+ SDKLIBFILES= 				\
+ 	$(DESTDIR)\lib\afsauthent.lib 	\
+ 	$(DESTDIR)\lib\libafsconf.lib 	\
+ 	$(KFWLIBDIR)\loadfuncs.lib	\
+ 	htmlhelp.lib			\
+ 	shell32.lib			\
+ 	comctl32.lib			\
+ 	version.lib			\
+ 	shlwapi.lib			\
+ 	psapi.lib
+ 
+ VERRESFILE=$(OUT)\version.res
+ 
+ $(OUT)\afsfuncs.obj: afsfuncs.c
+ 	$(PC2OBJ)
+ 
+ $(OUT)\afsplugin.obj: afsplugin.c
+ 	$(PC2OBJ)
+ 
+ $(OUT)\main.obj: main.c
+ 	$(PC2OBJ)
+ 
+ $(OUT)\afsconfig.obj: afsconfig.c
+ 	$(PC2OBJ)
+ 
+ $(OUT)\afsconfigdlg.obj: afsconfigdlg.c
+ 	$(PC2OBJ)
+ 
+ $(OUT)\afsnewcreds.obj: afsnewcreds.c
+ 	$(PC2OBJ)
+ 
+ $(OUT)\afsext.obj: afsext.c
+ 	$(PC2OBJ)
+ 
+ $(OUT)\afshelp.obj: afshelp.c
+ 	$(PC2OBJ)
+ 
+ $(OUT)\dynimport.obj: dynimport.c
+ 	$(PC2OBJ)
+ 
+ $(OUT)\krb5common.obj: krb5common.c
+ 	$(PC2OBJ)
+ 
+ $(DLLFILE): $(OBJFILES) $(VERRESFILE)
+ 	$(DLLGUILINK) $(LIBFILES) $(SDKLIBFILES)
+ 	$(_VC_MANIFEST_EMBED_DLL)
+ 	$(_VC_MANIFEST_CLEAN)
+ 
+ dummy:
+ 
+ $(CHMFILE): dummy
+ 	$(CD) help
+ 	nmake /f NTMakefile install
+ 	$(CD) ..
+ 
+ install: $(INCFILES) $(CHMFILE) $(DLLFILE) lang
+ 
+ lang::
+ 
+ # Repeat this block as necessary redefining LANG for additional
+ # languages.
+ 
+ # Begin language block
+ LANG=en_us
+ 
+ LANGDLL=$(EXEDIR)\afscred_$(LANG).dll
+ 
+ lang:: $(LANGDLL)
+ 
+ $(LANGDLL): $(OUT)\langres_$(LANG).res $(OUT)\langres_ver_$(LANG).res
+ 	$(DLLRESLINK)
+ 
+ $(OUT)\langres_ver_$(LANG).res: version.rc
+ 	$(RC) /d LANGVER /d LANG_$(LANG) /fo $@ $** 
+ 
+ $(OUT)\langres_$(LANG).res: lang\$(LANG)\langres.rc
+ 	$(RC) /fo $@ $**
+ # End language block
+ 
+ clean::
+ 	$(DEL) $(INCFILES)
+ 	$(DEL) *.pdb
+ 	$(CD) help
+ 	$(MAKECMD) /f NTMakefile clean
+ 	$(CD) ..
Index: openafs/src/WINNT/netidmgr_plugin/afsconfig.c
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/afsconfig.c:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/afsconfig.c	Thu Oct 12 17:19:42 2006
***************
*** 0 ****
--- 1,36 ----
+ /*
+ This file was autogenerated from:
+     c:\work\pismere\athena\auth\krb5\src\windows\identity\config\csvschema.cfg
+     afsconfig.csv
+ 
+ Do not modify directly.
+ */
+ #include<kconfig.h>
+ 
+ kconf_schema schema_afsconfig[] = {
+ {L"AfsCred",KC_SPACE,0,L"AFS Credentials Provider"},
+ {L"Module",KC_STRING,(khm_int64) L"OpenAFS",L""},
+ {L"Description",KC_STRING,(khm_int64) L"AFS Credentials Provider",L""},
+ {L"Dependencies",KC_STRING,(khm_int64) L"Krb5Cred",L""},
+ {L"Type",KC_INT32,1,L""},
+ {L"Flags",KC_INT32,0,L""},
+ {L"Cells",KC_STRING,(khm_int64) L"",L"Multi string giving list of cells to authenticate to"},
+ {L"Disableafscreds",KC_INT32,0,L"Disable afscreds.exe"},
+ {L"Parameters",KC_SPACE,0,L"Parameters for AfsCred"},
+ {L"AFSEnabled",KC_INT32,1,L"Is AFS enabled?"},
+ {L"LRUCells",KC_STRING,(khm_int64) L"",L"List of recently used cells"},
+ {L"LRURealms",KC_STRING,(khm_int64) L"",L"List of recently used realms"},
+ {L"DefaultCells",KC_STRING,(khm_int64) L"",L"List of default cells to authenticate to."},
+ {L"Parameters",KC_ENDSPACE,0,L""},
+ {L"Cells",KC_SPACE,0,L"Per identity cells list and plugin settings"},
+ {L"cellname",KC_STRING,(khm_int64) L"identity",L"Cell-identity mapping kept in the plugin configuration for the user."},
+ {L"_Schema",KC_SPACE,0,L"Schema is named for each cell to authenticate"},
+ {L"MethodName",KC_STRING,(khm_int64) L"",L"Name of method"},
+ {L"Method",KC_INT32,0,L"(Deprecated) Method identifier"},
+ {L"Realm",KC_STRING,(khm_int64) L"",L"Kerberos realm to use for authentication"},
+ {L"_Schema",KC_ENDSPACE,0,L""},
+ {L"Cells",KC_ENDSPACE,0,L""},
+ {L"AfsCred",KC_ENDSPACE,0,L""}
+ };
+ 
+ 
Index: openafs/src/WINNT/netidmgr_plugin/afsconfigdlg.c
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/afsconfigdlg.c:1.1.2.3
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/afsconfigdlg.c	Mon Oct 16 09:55:34 2006
***************
*** 0 ****
--- 1,646 ----
+ /*
+  * Copyright (c) 2005,2006 Secure Endpoints Inc.
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: afsconfigdlg.c,v 1.1.2.3 2006/10/16 13:55:34 jaltman Exp $ */
+ 
+ #include<afscred.h>
+ #include<kherror.h>
+ #include<khuidefs.h>
+ #include<commctrl.h>
+ #include<help/afsplhlp.h>
+ #include<htmlhelp.h>
+ 
+ /* disable the 'name was marked as deprecated' warnings.  These get
+    issued for Str?Cat? and Str?Cpy? functions.  We don't use those
+    anyway. */
+ #pragma warning(push)
+ #pragma warning(disable: 4995)
+ #include<shlwapi.h>
+ #include<shlobj.h>
+ #pragma warning(pop)
+ 
+ #include<assert.h>
+ 
+ typedef struct tag_afs_ids_dlg_data {
+     khui_config_init_data cfg;
+ 
+     khm_boolean afs_enabled;
+ } afs_ids_dlg_data;
+ 
+ INT_PTR CALLBACK
+ afs_cfg_ids_proc(HWND hwnd,
+                  UINT uMsg,
+                  WPARAM wParam,
+                  LPARAM lParam) {
+ 
+     afs_ids_dlg_data * d = NULL;
+ 
+     switch(uMsg) {
+     case WM_INITDIALOG:
+         {
+             khm_int32 t = 1;
+ 
+             d = PMALLOC(sizeof(*d));
+             ZeroMemory(d, sizeof(*d));
+ 
+ #pragma warning(push)
+ #pragma warning(disable: 4244)
+             SetWindowLongPtr(hwnd, DWLP_USER, (LONG_PTR) d);
+ #pragma warning(pop)
+ 
+             d->cfg = *((khui_config_init_data *) lParam);
+ 
+             khc_read_int32(csp_params, L"AFSEnabled", &t);
+ 
+             d->afs_enabled = !!t;
+ 
+             CheckDlgButton(hwnd, IDC_CFG_OBTAIN,
+                            (d->afs_enabled)? BST_CHECKED: BST_UNCHECKED);
+         }
+         return FALSE;
+ 
+     case WM_DESTROY:
+         {
+             d = (afs_ids_dlg_data *) (LONG_PTR)
+                 GetWindowLongPtr(hwnd, DWLP_USER);
+ 
+             PFREE(d);
+         }
+         return TRUE;
+ 
+     case WM_COMMAND:
+         {
+             d = (afs_ids_dlg_data *) (LONG_PTR)
+                 GetWindowLongPtr(hwnd, DWLP_USER);
+ 
+             if (wParam == MAKEWPARAM(IDC_CFG_OBTAIN, BN_CLICKED)) {
+                 d->afs_enabled =
+                     (IsDlgButtonChecked(hwnd, IDC_CFG_OBTAIN) ==
+                      BST_CHECKED);
+                 khui_cfg_set_flags_inst(&d->cfg, KHUI_CNFLAG_MODIFIED,
+                                         KHUI_CNFLAG_MODIFIED);
+                 return TRUE;
+             }
+         }
+         return FALSE;
+ 
+     case KHUI_WM_CFG_NOTIFY:
+         {
+             d = (afs_ids_dlg_data *) (LONG_PTR)
+                 GetWindowLongPtr(hwnd, DWLP_USER);
+ 
+             if (HIWORD(wParam) == WMCFG_APPLY) {
+                 khm_int32 t;
+ 
+                 if (KHM_FAILED(khc_read_int32(csp_params,
+                                               L"AFSEnabled", &t)) ||
+                     !!t != !!d->afs_enabled) {
+                     khc_write_int32(csp_params, L"AFSEnabled",
+                                     !!d->afs_enabled);
+ 
+                     khui_cfg_set_flags_inst(&d->cfg,
+                                             KHUI_CNFLAG_APPLIED,
+                                             KHUI_CNFLAG_APPLIED |
+                                             KHUI_CNFLAG_MODIFIED);
+                 } else {
+                     khui_cfg_set_flags_inst(&d->cfg,
+                                             0,
+                                             KHUI_CNFLAG_MODIFIED);
+                 }
+             }
+         }
+         return TRUE;
+     }
+ 
+     return FALSE;
+ }
+ 
+ INT_PTR CALLBACK
+ afs_cfg_id_proc(HWND hwnd,
+                 UINT uMsg,
+                 WPARAM wParam,
+                 LPARAM lParam) {
+ 
+     switch(uMsg) {
+ 
+     case WM_INITDIALOG:
+         {
+             INT_PTR rv;
+             afs_dlg_data * d;
+             wchar_t idname[KCDB_IDENT_MAXCCH_NAME];
+             khm_size cb;
+ 
+             rv = afs_dlg_proc(hwnd, uMsg, wParam, 0);
+ 
+             d = (afs_dlg_data *) (LONG_PTR) GetWindowLongPtr(hwnd, DWLP_USER);
+ 
+             d->cfg = *((khui_config_init_data *) lParam);
+ 
+             idname[0] = L'\0';
+             cb = sizeof(idname);
+             khui_cfg_get_name(d->cfg.ctx_node, idname, &cb);
+ 
+             d->ident = NULL;
+             kcdb_identity_create(idname, 0, &d->ident);
+ 
+ #ifdef DEBUG
+             assert(d->ident);
+ #endif
+ 
+             d->config_dlg = TRUE;
+ 
+             afs_cred_get_identity_creds(&d->creds, d->ident, &d->afs_enabled);
+ 
+             afs_dlg_proc(hwnd, KHUI_WM_NC_NOTIFY,
+                          MAKEWPARAM(0, WMNC_DIALOG_SETUP), 0);
+ 
+             return rv;
+         }
+         break;                  /* not reached */
+ 
+     case WM_DESTROY:
+         {
+             afs_dlg_data * d;
+ 
+             d = (afs_dlg_data *) (LONG_PTR) GetWindowLongPtr(hwnd, DWLP_USER);
+ #ifdef DEBUG
+             assert(d && d->ident);
+ #endif
+             kcdb_identity_release(d->ident);
+ 
+             return afs_dlg_proc(hwnd, uMsg, wParam, lParam);
+         }
+         break;                  /* not reached */
+ 
+     case KHUI_WM_CFG_NOTIFY:
+         {
+             afs_dlg_data * d;
+ 
+             d = (afs_dlg_data *) (LONG_PTR) GetWindowLongPtr(hwnd, DWLP_USER);
+ 
+             if (HIWORD(wParam) == WMCFG_APPLY) {
+                 afs_cred_write_ident_data(d);
+             }
+         }
+         return TRUE;
+ 
+     default:
+         return afs_dlg_proc(hwnd, uMsg, wParam, lParam);
+     }
+ }
+ 
+ static void
+ set_service_status(HWND hwnd) {
+     static DWORD wait_start = 0;
+     DWORD status = 0;
+     DWORD wait_hint = 0;
+     int i;
+     wchar_t status_strings_csv[1024];
+     wchar_t status_strings_ms[1024];
+     khm_size cb;
+     wchar_t *t;
+ 
+     GetServiceStatus(NULL,
+                      TRANSARCAFSDAEMON,
+                      &status, &wait_hint);
+ 
+     LoadString(hResModule, IDS_CFG_SVCSTATUS,
+                status_strings_csv, ARRAYLENGTH(status_strings_csv));
+ 
+     cb = sizeof(status_strings_ms);
+     csv_to_multi_string(status_strings_ms, &cb, status_strings_csv);
+ 
+     for(i=0, t = status_strings_ms; t && *t && *t != L' ';
+         t = multi_string_next(t), i++) {
+         if (i == status)
+             break;
+     }
+ 
+     if (!t || !*t)
+         t = status_strings_ms;  /* the first one is "unknown". */
+ 
+     SetDlgItemText(hwnd, IDC_CFG_STATUS, t);
+ 
+     if (status != SERVICE_RUNNING) {
+         HWND hw;
+ 
+         hw = GetDlgItem(hwnd, IDC_CFG_STOP);
+         if (hw == GetFocus())
+             SetFocus(GetNextDlgTabItem(hwnd, hw, FALSE));
+ 
+         EnableWindow(hw, FALSE);
+     } else {
+         EnableWindow(GetDlgItem(hwnd, IDC_CFG_STOP), TRUE);
+     }
+ 
+     if (status != SERVICE_STOPPED &&
+         status != SERVICE_PAUSED) {
+         HWND hw;
+ 
+         hw = GetDlgItem(hwnd, IDC_CFG_START);
+         if (hw == GetFocus())
+             SetFocus(GetNextDlgTabItem(hwnd, hw, FALSE));
+ 
+         EnableWindow(hw, FALSE);
+     } else {
+         EnableWindow(GetDlgItem(hwnd, IDC_CFG_START), TRUE);
+     }
+ 
+     if (status == SERVICE_START_PENDING ||
+         status == SERVICE_STOP_PENDING) {
+         HWND hw;
+         DWORD now;
+         int progress;
+ 
+         hw = GetDlgItem(hwnd, IDC_CFG_PROGRESS);
+ #ifdef DEBUG
+         assert(hw);
+ #endif
+         if (!IsWindowVisible(hw))
+             ShowWindow(hw, SW_SHOW);
+ 
+         if (wait_start == 0)
+             wait_start = GetTickCount();
+ 
+         now = GetTickCount();
+ 
+         if (now + wait_hint != wait_start)
+             progress = (now - wait_start) * 100 /
+                 (now + wait_hint - wait_start);
+         else
+             progress = 0;
+ 
+         SendMessage(hw, PBM_SETPOS, progress, 0);
+ 
+         SetTimer(hwnd, 1, 500, NULL);
+     } else {
+         HWND hw;
+ 
+         hw = GetDlgItem(hwnd, IDC_CFG_PROGRESS);
+ #ifdef DEBUG
+         assert(hw);
+ #endif
+         wait_start = 0;
+         if (IsWindowVisible(hw))
+             ShowWindow(hw, SW_HIDE);
+     }
+ }
+ 
+ void
+ afs_cfg_show_last_error(HWND hwnd, wchar_t * prefix, DWORD code) {
+     DWORD r;
+     wchar_t * err_desc = NULL;
+     wchar_t title[64];
+     wchar_t msg[1024];
+     wchar_t tmp[128];
+ 
+     r = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+                       FORMAT_MESSAGE_IGNORE_INSERTS |
+                       FORMAT_MESSAGE_FROM_SYSTEM,
+                       NULL,
+                       code,
+                       0,
+                       (LPWSTR) &err_desc,
+                       0,
+                       NULL);
+ 
+     if (r == 0 || err_desc == NULL)
+         return;
+ 
+     LoadString(hResModule, IDS_PLUGIN_DESC,
+                title, ARRAYLENGTH(title));
+     if (prefix == NULL)
+         tmp[0] = L'\0';
+     else if (IS_INTRESOURCE(prefix))
+         LoadString(hResModule, (UINT)(UINT_PTR) prefix,
+                    tmp, ARRAYLENGTH(tmp));
+     else
+         StringCbCopy(tmp, sizeof(tmp), prefix);
+ 
+     StringCbPrintf(msg, sizeof(msg), L"%s%s",
+                    tmp, err_desc);
+ 
+     MessageBox(hwnd, msg, title, MB_OK | MB_APPLMODAL);
+ 
+     LocalFree(err_desc);
+ }
+ 
+ #define SCNAME_AFSCREDS L"AFS Credentials.lnk"
+ 
+ BOOL
+ afs_cfg_get_afscreds_shortcut(wchar_t * wpath) {
+     HRESULT hr;
+     BOOL shortcut_found = FALSE;
+ 
+     hr = SHGetFolderPath(NULL, CSIDL_COMMON_STARTUP,
+                          NULL, SHGFP_TYPE_CURRENT,
+                          wpath);
+     if (FAILED(hr))
+         goto _noshortcut;
+ 
+     if (!PathAppend(wpath, SCNAME_AFSCREDS)) {
+         goto _noshortcut;
+     }
+ 
+     if (PathFileExists(wpath)) {
+         shortcut_found = TRUE;
+     }
+ 
+  _noshortcut:
+ 
+     return shortcut_found;
+ }
+ 
+ INT_PTR CALLBACK
+ afs_cfg_main_proc(HWND hwnd,
+                   UINT uMsg,
+                   WPARAM wParam,
+                   LPARAM lParam) {
+     switch(uMsg) {
+     case WM_INITDIALOG:
+         {
+             wchar_t imagepath[MAX_PATH];
+             wchar_t blockname[MAX_PATH];
+             HKEY service_key;
+             LONG l;
+             DWORD cb;
+             DWORD dummy;
+             LPVOID ver_info;
+             wchar_t * value;
+ 
+             struct LANGANDCODEPATH {
+                 WORD wLanguage;
+                 WORD wCodePage;
+             } *translations;
+ 
+ #pragma warning(push)
+ #pragma warning(disable: 4244)
+             SetWindowLongPtr(hwnd, DWLP_USER, (DWORD_PTR) lParam);
+ #pragma warning(pop)
+ 
+             /* Try to figure out if afscreds.exe is on the startup
+                group for all users. */
+             {
+                 khm_handle csp_afscred = NULL;
+                 khm_int32 disable = FALSE;
+ 
+                 if (KHM_SUCCEEDED(kmm_get_plugin_config(AFS_PLUGIN_NAME,
+                                                         0,
+                                                         &csp_afscred))) {
+ 
+                     khc_read_int32(csp_afscred, L"Disableafscreds",
+                                    &disable);
+ 
+                     khc_close_space(csp_afscred);
+                 }
+ 
+                 if (!disable) {
+                     CheckDlgButton(hwnd, IDC_CFG_STARTAFSCREDS,
+                                    BST_UNCHECKED);
+                 } else {
+                     CheckDlgButton(hwnd, IDC_CFG_STARTAFSCREDS,
+                                    BST_CHECKED);
+                 }
+             }
+ 
+             l = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+                              L"SYSTEM\\CurrentControlSet\\Services\\TransarcAFSDaemon",
+                              0,
+                              KEY_READ,
+                              &service_key);
+ 
+             if (l != ERROR_SUCCESS)
+                 goto _set_status;
+ 
+             cb = sizeof(imagepath);
+             l = RegQueryValueEx(service_key,
+                                 L"ImagePath",
+                                 NULL, NULL,
+                                 (LPBYTE) imagepath,
+                                 &cb);
+             if (l != ERROR_SUCCESS)
+                 goto _close_key;
+ 
+             PathUnquoteSpaces(imagepath);
+ 
+             dummy = 1;
+             cb = GetFileVersionInfoSize(imagepath, &dummy);
+             if (cb == 0 || dummy)
+                 goto _close_key;
+ 
+             ver_info = malloc(cb);
+ #ifdef DEBUG
+             assert(ver_info);
+ #endif
+             if (!ver_info)
+                 goto _close_key;
+ 
+             if (!GetFileVersionInfo(imagepath,
+                                     0, cb, ver_info))
+                 goto _free_buffer;
+ 
+             cb = 0;
+             if (!VerQueryValue(ver_info, 
+                                L"\\VarFileInfo\\Translation",
+                                (LPVOID*) &translations,
+                                &cb) ||
+                 cb == 0)
+                 goto _free_buffer;
+ 
+             StringCbPrintf(blockname, sizeof(blockname),
+                            L"\\StringFileInfo\\%04x%04x\\FileVersion",
+                            translations[0].wLanguage,
+                            translations[0].wCodePage);
+ 
+             if (!VerQueryValue(ver_info,
+                                blockname,
+                                (LPVOID*) &value,
+                                &cb) ||
+                 cb == 0)
+                 goto _free_buffer;
+ 
+             SetDlgItemText(hwnd, IDC_CFG_VERSION, value);
+ 
+             StringCbPrintf(blockname, sizeof(blockname),
+                            L"\\StringFileInfo\\%04x%04x\\CompanyName",
+                            translations[0].wLanguage,
+                            translations[0].wCodePage);
+ 
+             if (!VerQueryValue(ver_info,
+                                blockname,
+                                (LPVOID*) &value,
+                                &cb) ||
+                 cb == 0)
+                 goto _free_buffer;
+ 
+             SetDlgItemText(hwnd, IDC_CFG_COMPANY, value);
+ 
+         _free_buffer:
+             free(ver_info);
+         _close_key:
+             RegCloseKey(service_key);
+         _set_status:
+             set_service_status(hwnd);
+         }
+         return FALSE;
+ 
+     case WM_COMMAND:
+         switch(wParam) {
+         case MAKEWPARAM(IDC_CFG_STOP, BN_CLICKED):
+             {
+                 DWORD r;
+ 
+                 r = ServiceControl(NULL, TRANSARCAFSDAEMON, SERVICE_STOPPED);
+ 
+                 if (r)
+                     afs_cfg_show_last_error(hwnd,
+                                             MAKEINTRESOURCE(IDS_CFG_CANTSTOP),
+                                             r);
+                 else
+                     set_service_status(hwnd);
+             }
+             break;
+ 
+         case MAKEWPARAM(IDC_CFG_START,BN_CLICKED):
+             {
+                 DWORD r;
+                 r = ServiceControl(NULL, TRANSARCAFSDAEMON, SERVICE_RUNNING);
+ 
+                 if (r)
+                     afs_cfg_show_last_error(hwnd,
+                                             MAKEINTRESOURCE(IDS_CFG_CANTSTART),
+                                             r);
+                 else
+                     set_service_status(hwnd);
+             }
+             break;
+ 
+         case MAKEWPARAM(IDC_CFG_CPL, BN_CLICKED):
+             if (32 >= (LRESULT) ShellExecute (NULL, NULL, 
+                                               L"AFS_CONFIG.EXE", NULL,
+                                               NULL, SW_SHOW)) {
+                 MessageBox(NULL, 
+                            L"Can't find file AFS_CONFIG.EXE", 
+                            L"Error", MB_OK);
+             }
+             break;
+ 
+         case MAKEWPARAM(IDC_CFG_STARTAFSCREDS, BN_CLICKED):
+             {
+                 khui_config_node node;
+ 
+                 node = (khui_config_node) (DWORD_PTR)
+                     GetWindowLongPtr(hwnd, DWLP_USER);
+ 
+                 khui_cfg_set_flags(node,
+                                    KHUI_CNFLAG_MODIFIED,
+                                    KHUI_CNFLAG_MODIFIED);
+             }
+             break;
+         }
+         return TRUE;
+ 
+     case KHUI_WM_CFG_NOTIFY:
+         {
+             if (HIWORD(wParam) == WMCFG_APPLY) {
+                 wchar_t wpath[MAX_PATH];
+                 int dlg_state;
+                 khui_config_node node;
+                 khm_handle csp_afscred = NULL;
+                 khm_int32 disable = FALSE;
+ 
+                 node = (khui_config_node) (DWORD_PTR)
+                     GetWindowLongPtr(hwnd, DWLP_USER);
+ 
+                 kmm_get_plugin_config(AFS_PLUGIN_NAME, KHM_PERM_WRITE,
+                                       &csp_afscred);
+ 
+                 if (csp_afscred)
+                     khc_read_int32(csp_afscred, L"Disableafscreds",
+                                    &disable);
+ 
+                 dlg_state = IsDlgButtonChecked(hwnd, IDC_CFG_STARTAFSCREDS);
+ 
+                 if (!!disable !=
+                     (dlg_state == BST_CHECKED)) {
+                     if (csp_afscred)
+                         khc_write_int32(csp_afscred,
+                                         L"Disableafscreds",
+                                         (dlg_state == BST_CHECKED));
+ 
+                     khui_cfg_set_flags(node,
+                                        KHUI_CNFLAG_APPLIED,
+                                        KHUI_CNFLAG_MODIFIED |
+                                        KHUI_CNFLAG_APPLIED);
+                 } else {
+                     khui_cfg_set_flags(node, 0,
+                                        KHUI_CNFLAG_MODIFIED);
+                 }
+ 
+                 if (dlg_state == BST_CHECKED &&
+                     afs_cfg_get_afscreds_shortcut(wpath)) {
+ 
+                     DeleteFile(wpath);
+                 }
+             }
+         }
+         return TRUE;
+ 
+     case WM_TIMER:
+         if (wParam == 1) {
+             KillTimer(hwnd, 1);
+             set_service_status(hwnd);
+         }
+         break;
+ 
+     case WM_DESTROY:
+         return FALSE;
+ 
+     case WM_HELP:
+         {
+             static const DWORD ctx_help[] = {
+                 IDC_CFG_STATUS, IDH_SVCSTATUS,
+                 IDC_CFG_STOP, IDH_SVCSTOP,
+                 IDC_CFG_START, IDH_SVCSTART,
+                 IDC_CFG_VERSION, IDH_SVCVERSION,
+                 IDC_CFG_COMPANY, IDH_SVCCOMPANY,
+                 IDC_CFG_CPL, IDH_SVCCPL,
+                 IDC_CFG_STARTAFSCREDS, IDH_STARTAFSCREDS,
+                 0
+             };
+ 
+             LPHELPINFO hlp;
+ 
+             hlp = (LPHELPINFO) lParam;
+ 
+             if (hlp->iContextType != HELPINFO_WINDOW)
+                 break;
+ 
+             afs_html_help(hlp->hItemHandle, L"::/popups_cfg.txt",
+                           HH_TP_HELP_WM_HELP, (DWORD_PTR) ctx_help);
+         }
+         return TRUE;
+     }
+     return FALSE;
+ }
Index: openafs/src/WINNT/netidmgr_plugin/afscred.h
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/afscred.h:1.1.2.3
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/afscred.h	Mon Oct 16 09:55:34 2006
***************
*** 0 ****
--- 1,208 ----
+ /*
+  * Copyright (c) 2005,2006 Secure Endpoints Inc.
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: afscred.h,v 1.1.2.3 2006/10/16 13:55:34 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_AFSCRED_H
+ #define __KHIMAIRA_AFSCRED_H
+ 
+ #define _WINSOCKAPI_
+ #include<windows.h>
+ #include<time.h>
+ 
+ #define KHERR_FACILITY L"AfsCred"
+ #define KHERR_HMODULE hResModule
+ #include<netidmgr.h>
+ 
+ #include<langres.h>
+ 
+ #include <afs/cm_config.h>
+ #include <afs/stds.h>
+ #include <afs/auth.h>
+ #include <afs/ptserver.h>
+ #include <afs/ptuser.h>
+ 
+ #include<afspext.h>
+ 
+ #include<afsfuncs.h>
+ #include<afsnewcreds.h>
+ 
+ #ifndef NOSTRSAFE
+ #include<strsafe.h>
+ #endif
+ 
+ #define AFS_PLUGIN_NAME         L"AfsCred"
+ #define AFS_CREDTYPE_NAME       L"AfsCred"
+ 
+ #define AFS_PLUGIN_DEPS         L"Krb5Cred\0"
+ 
+ #define KRB5_CREDTYPE_NAME      L"Krb5Cred"
+ #define KRB4_CREDTYPE_NAME      L"Krb4Cred"
+ 
+ #define AFS_TYPENAME_PRINCIPAL      L"AFSPrincipal"
+ #define AFS_TYPENAME_METHOD         L"AFSTokenMethod"
+ #define AFS_ATTRNAME_CLIENT_PRINC   L"AFSClientPrinc"
+ #define AFS_ATTRNAME_SERVER_PRINC   L"AFSServerPrinc"
+ #define AFS_ATTRNAME_CELL           L"AFSCell"
+ #define AFS_ATTRNAME_METHOD         L"AFSMethod"
+ #define AFS_ATTRNAME_REALM          L"AFSRealm"
+ 
+ #define AFS_VALID_CELL_CHARS    L"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-"
+ #define AFS_VALID_REALM_CHARS   AFS_VALID_CELL_CHARS
+ 
+ #define AFS_CONFIG_NODE_IDS     L"AfsIdentities"
+ #define AFS_CONFIG_NODE_ID      L"AfsIdentity"
+ #define AFS_CONFIG_NODE_MAIN    L"AfsOptions"
+ 
+ #define AFS_HELPFILE            L"afsplhlp.chm"
+ 
+ /* token acquisition methods provided by extensions begin with this
+    ID */
+ #define AFS_TOKEN_USER          8
+ 
+ void init_afs();
+ void exit_afs();
+ KHMEXP khm_int32 KHMAPI init_module(kmm_module h_module);
+ KHMEXP khm_int32 KHMAPI exit_module(kmm_module h_module);
+ 
+ /* globals */
+ extern kmm_module h_khModule;
+ extern HMODULE hResModule;
+ extern HINSTANCE hInstance;
+ 
+ extern khm_int32 afs_credtype_id;
+ extern khm_int32 krb5_credtype_id;
+ extern khm_int32 krb4_credtype_id;
+ extern khm_int32 afs_msg_type_id;
+ extern khm_handle afs_credset;
+ 
+ extern khm_int32 afs_type_principal;
+ extern khm_int32 afs_attr_client_princ;
+ extern khm_int32 afs_attr_server_princ;
+ extern khm_int32 afs_attr_cell;
+ extern khm_int32 afs_attr_method;
+ extern khm_int32 afs_attr_realm;
+ 
+ /* Configuration spaces */
+ #define CSNAME_PLUGINS      L"Plugins"
+ #define CSNAME_AFSCRED      L"AfsCred"
+ #define CSNAME_PARAMS       L"Parameters"
+ 
+ extern khm_handle csp_plugins;
+ extern khm_handle csp_afscred;
+ extern khm_handle csp_params;
+ 
+ extern khm_handle afs_sub;
+ 
+ /* defined in afsconfig.c which is generated from afsconfig.csv */
+ extern kconf_schema schema_afsconfig[];
+ 
+ 
+ /* plugin callback procedure */
+ khm_int32 KHMAPI 
+ afs_plugin_cb(khm_int32 msg_type,
+               khm_int32 msg_subtype,
+               khm_ui_4 uparam,
+               void * vparam);
+ 
+ INT_PTR CALLBACK
+ afs_cfg_ids_proc(HWND hwnd,
+                  UINT uMsg,
+                  WPARAM wParam,
+                  LPARAM lParam);
+ 
+ INT_PTR CALLBACK
+ afs_cfg_id_proc(HWND hwnd,
+                 UINT uMsg,
+                 WPARAM wParam,
+                 LPARAM lParam);
+ 
+ INT_PTR CALLBACK
+ afs_cfg_main_proc(HWND hwnd,
+                   UINT uMsg,
+                   WPARAM wParam,
+                   LPARAM lParam);
+ 
+ HWND
+ afs_html_help(HWND caller,
+               wchar_t * postfix,
+               UINT cmd,
+               DWORD_PTR data);
+ 
+ /* extensions */
+ typedef afs_msg_announce afs_extension;
+ 
+ /* not thread safe. only call from the plugin thread */
+ afs_extension *
+ afs_find_extension(const wchar_t * name);
+ 
+ /* not thread safe. only call from the plugin thread */
+ afs_extension *
+ afs_get_extension(khm_size i);
+ 
+ /* not thread safe.  only call from the plugin thread */
+ afs_extension *
+ afs_get_next_token_acq(afs_extension * f);
+ 
+ /* not thread safe.  only call from the plugin thread */
+ khm_boolean
+ afs_is_valid_method_id(afs_tk_method method);
+ 
+ afs_tk_method
+ afs_get_next_method_id(afs_tk_method method);
+ 
+ afs_tk_method
+ afs_get_method_id(wchar_t * name);
+ 
+ khm_boolean
+ afs_get_method_name(afs_tk_method method, wchar_t * buf, khm_size cbbuf);
+ 
+ afs_extension *
+ afs_get_method_ext(afs_tk_method method);
+ 
+ khm_boolean
+ afs_method_describe(afs_tk_method method, khm_int32 flags,
+                     wchar_t * wbuf, khm_size cbbuf);
+ 
+ khm_boolean
+ afs_ext_resolve_token(const wchar_t * cell,
+                       const struct ktc_token * token,
+                       const struct ktc_principal * serverp,
+                       const struct ktc_principal * clientp,
+                       khm_handle * pident,
+                       afs_tk_method * pmethod);
+ 
+ khm_boolean
+ afs_ext_klog(afs_tk_method method,
+              khm_handle   identity,
+              const char * service,
+              const char * cell,
+              const char * realm,
+              const afs_conf_cell * cell_config,
+              khm_int32    lifetime);
+ 
+ BOOL
+ afs_cfg_get_afscreds_shortcut(wchar_t * wpath);
+ 
+ #endif
Index: openafs/src/WINNT/netidmgr_plugin/afsext.c
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/afsext.c:1.1.2.3
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/afsext.c	Mon Oct 16 09:55:34 2006
***************
*** 0 ****
--- 1,454 ----
+ /*
+  * Copyright (c) 2005,2006 Secure Endpoints Inc.
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: afsext.c,v 1.1.2.3 2006/10/16 13:55:34 jaltman Exp $ */
+ 
+ #include<afscred.h>
+ #include<assert.h>
+ #include<wchar.h>
+ 
+ /* supported API versions */
+ #define AFS_PLUGIN_VERSION_MIN 0x00000001
+ #define AFS_PLUGIN_VERSION_MAX AFS_PLUGIN_VERSION
+ 
+ #define MAX_EXTENSIONS 8
+ 
+ afs_extension extensions[MAX_EXTENSIONS];
+ khm_size n_extensions = 0;
+ khm_int32 next_method_id = AFS_TOKEN_USER;
+ 
+ /* not threadsafe.  should only be called from the plugin thread */
+ khm_int32
+ afs_add_extension(afs_msg_announce * ann) {
+     size_t cbname = 0;
+     size_t cbtashort = 0;
+     size_t cbtalong = 0;
+     afs_extension * ext;
+     wchar_t * tmp;
+ 
+     if (ann->cbsize != sizeof(afs_msg_announce) ||
+         FAILED(StringCbLength(ann->name, KHUI_MAXCB_NAME, &cbname)) ||
+         ann->sub == NULL ||
+         (ann->provide_token_acq &&
+          ((FAILED(StringCbLength(ann->token_acq.short_desc,
+                                  KHUI_MAXCB_SHORT_DESC,
+                                  &cbtashort))) ||
+           (ann->token_acq.long_desc &&
+            FAILED(StringCbLength(ann->token_acq.long_desc,
+                                  KHUI_MAXCB_LONG_DESC,
+                                  &cbtalong))))) ||
+         ann->version < AFS_PLUGIN_VERSION_MIN ||
+         ann->version > AFS_PLUGIN_VERSION_MAX)
+ 
+         return KHM_ERROR_INVALID_PARAM;
+ 
+     if (n_extensions == MAX_EXTENSIONS)
+         return KHM_ERROR_NO_RESOURCES;
+ 
+     cbname += sizeof(wchar_t);
+     cbtashort += sizeof(wchar_t);
+     cbtalong += sizeof(wchar_t);
+ 
+     ext = &extensions[n_extensions];
+ 
+     *ext = *ann;
+ 
+     tmp = PMALLOC(cbname);
+ #ifdef DEBUG
+     assert(tmp);
+ #endif
+     StringCbCopy(tmp, cbname, ann->name);
+     ext->name = tmp;
+ 
+     if (ann->provide_token_acq) {
+         tmp = PMALLOC(cbtashort);
+ #ifdef DEBUG
+         assert(tmp);
+ #endif
+         StringCbCopy(tmp, cbtashort, ann->token_acq.short_desc);
+         ext->token_acq.short_desc = tmp;
+ 
+         if (ann->token_acq.long_desc) {
+             tmp = PMALLOC(cbtalong);
+ #ifdef DEBUG
+             assert(tmp);
+ #endif
+             StringCbCopy(tmp, cbtalong,
+                          ann->token_acq.long_desc);
+             ext->token_acq.long_desc = tmp;
+         } else {
+             ext->token_acq.long_desc = NULL;
+         }
+ 
+         ann->token_acq.method_id = next_method_id++;
+         ext->token_acq.method_id = ann->token_acq.method_id;
+     } else {
+         ZeroMemory(&ext->token_acq, sizeof(ext->token_acq));
+     }
+ 
+     n_extensions++;
+ 
+     return KHM_ERROR_SUCCESS;
+ }
+ 
+ void
+ afs_free_extension(khm_int32 idx) {
+     afs_extension * ext;
+ 
+ #ifdef DEBUG
+     assert(idx >= 0 && idx < (khm_int32) n_extensions);
+ #endif
+ 
+     ext = &extensions[idx];
+ 
+     if (ext->name)
+         PFREE((void *) ext->name);
+     if (ext->token_acq.short_desc)
+         PFREE((void *) ext->token_acq.short_desc);
+     if (ext->token_acq.long_desc)
+         PFREE((void *) ext->token_acq.long_desc);
+     if (ext->sub)
+         kmq_delete_subscription(ext->sub);
+ 
+     ZeroMemory(ext, sizeof(*ext));
+ }
+ 
+ /* not thread safe.  only call from plugin thread */
+ void
+ afs_remove_extension(khm_int32 idx) {
+     if (idx < 0 || idx > (khm_int32) n_extensions)
+         return;
+ 
+     afs_free_extension(idx);
+ 
+     if (idx == n_extensions-1) {
+         n_extensions--;
+     } else {
+         MoveMemory(&extensions[idx], &extensions[idx + 1],
+                    (n_extensions - (idx+1)) * sizeof(*extensions));
+     }
+ }
+ 
+ /* not thread safe. only call from the plugin thread */
+ afs_extension *
+ afs_find_extension(const wchar_t * name) {
+     khm_size i;
+ 
+     for (i=0; i < n_extensions; i++) {
+         if (extensions[i].name &&
+             !wcscmp(extensions[i].name, name))
+             return &extensions[i];
+     }
+ 
+     return NULL;
+ }
+ 
+ /* not thread safe.  only call from the plugin thread */
+ khm_boolean
+ afs_is_valid_method_id(afs_tk_method method) {
+     khm_size i;
+ 
+     if (method == AFS_TOKEN_AUTO ||
+         method == AFS_TOKEN_KRB5 ||
+         method == AFS_TOKEN_KRB524 ||
+         method == AFS_TOKEN_KRB4)
+         return TRUE;
+ 
+     for (i=0; i < n_extensions; i++) {
+         if (extensions[i].provide_token_acq &&
+             extensions[i].token_acq.method_id == method)
+             return TRUE;
+     }
+ 
+     return FALSE;
+ }
+ 
+ khm_boolean
+ afs_method_describe(afs_tk_method method, khm_int32 flags,
+                     wchar_t * wbuf, khm_size cbbuf) {
+     khm_size idx;
+ 
+     switch(method) {
+     case AFS_TOKEN_AUTO:
+         return LoadString(hResModule,
+                           ((flags & KCDB_TS_SHORT)? 
+                            IDS_NC_METHOD_AUTO:
+                            IDS_NC_METHODL_AUTO),
+                           wbuf, (int) cbbuf / sizeof(wchar_t));
+ 
+     case AFS_TOKEN_KRB5:
+         return LoadString(hResModule,
+                           ((flags & KCDB_TS_SHORT)?
+                            IDS_NC_METHOD_KRB5:
+                            IDS_NC_METHODL_KRB5),
+                           wbuf, (int) cbbuf / sizeof(wchar_t));
+ 
+     case AFS_TOKEN_KRB524:
+         return LoadString(hResModule,
+                           ((flags & KCDB_TS_SHORT)?
+                            IDS_NC_METHOD_KRB524:
+                            IDS_NC_METHODL_KRB524),
+                           wbuf, (int) cbbuf / sizeof(wchar_t));
+ 
+     case AFS_TOKEN_KRB4:
+         return LoadString(hResModule,
+                           ((flags & KCDB_TS_SHORT)?
+                            IDS_NC_METHOD_KRB4:
+                            IDS_NC_METHODL_KRB4),
+                           wbuf, (int) cbbuf / sizeof(wchar_t));
+ 
+     default:
+         for (idx = 0; idx < n_extensions; idx++) {
+             if(!extensions[idx].provide_token_acq ||
+                extensions[idx].token_acq.method_id != method)
+                 continue;
+ 
+             if ((flags & KCDB_TS_SHORT) ||
+                 extensions[idx].token_acq.long_desc == NULL)
+                 return SUCCEEDED(StringCbCopy(wbuf, cbbuf,
+                                               extensions[idx].token_acq.short_desc));
+             else
+                 return SUCCEEDED(StringCbCopy(wbuf, cbbuf,
+                                               extensions[idx].token_acq.long_desc));
+         }
+     }
+ 
+     return FALSE;
+ }
+ 
+ afs_tk_method
+ afs_get_next_method_id(afs_tk_method method) {
+     khm_size idx;
+ 
+     switch(method) {
+     case -1:
+         return AFS_TOKEN_AUTO;
+     case AFS_TOKEN_AUTO:
+         return AFS_TOKEN_KRB5;
+     case AFS_TOKEN_KRB5:
+         return AFS_TOKEN_KRB524;
+     case AFS_TOKEN_KRB524:
+         return AFS_TOKEN_KRB4;
+     case AFS_TOKEN_KRB4:
+         idx = 0;
+         break;
+     default:
+         for(idx = 0; idx < n_extensions; idx ++) {
+             if (extensions[idx].provide_token_acq &&
+                 extensions[idx].token_acq.method_id == method)
+                 break;
+         }
+         idx++;
+     }
+ 
+     for(; idx < n_extensions; idx++) {
+         if (extensions[idx].provide_token_acq)
+             return extensions[idx].token_acq.method_id;
+     }
+ 
+     return -1;
+ }
+ 
+ /* not thread safe.  only call from the plugin thread */
+ afs_extension *
+ afs_get_next_token_acq(afs_extension * f) {
+     khm_size idx;
+ 
+     if (f == NULL)
+         idx = 0;
+     else
+         idx = (f - extensions) + 1;
+ 
+     for(; idx < n_extensions; idx++) {
+         if (extensions[idx].provide_token_acq)
+             return &extensions[idx];
+     }
+ 
+     return NULL;
+ }
+ 
+ afs_extension *
+ afs_get_extension(khm_size i) {
+     if (i >= n_extensions)
+         return NULL;
+     else
+         return &extensions[i];
+ }
+ 
+ afs_tk_method
+ afs_get_method_id(wchar_t * name) {
+     if (!wcscmp(name, AFS_TOKENNAME_AUTO))
+         return AFS_TOKEN_AUTO;
+     else if (!wcscmp(name, AFS_TOKENNAME_KRB5))
+         return AFS_TOKEN_KRB5;
+     else if (!wcscmp(name, AFS_TOKENNAME_KRB524))
+         return AFS_TOKEN_KRB524;
+     else if (!wcscmp(name, AFS_TOKENNAME_KRB4))
+         return AFS_TOKEN_KRB4;
+     else {
+         khm_size i;
+ 
+         for (i=0; i < n_extensions; i++) {
+             if (!extensions[i].provide_token_acq)
+                 continue;
+ 
+             if (!wcscmp(extensions[i].name, name))
+                 return extensions[i].token_acq.method_id;
+         }
+     }
+ 
+     return AFS_TOKEN_AUTO;
+ }
+ 
+ khm_boolean
+ afs_get_method_name(afs_tk_method method, wchar_t * buf, khm_size cbbuf) {
+     if (method == AFS_TOKEN_AUTO)
+         return SUCCEEDED(StringCbCopy(buf, cbbuf, AFS_TOKENNAME_AUTO));
+     else if (method == AFS_TOKEN_KRB5)
+         return SUCCEEDED(StringCbCopy(buf, cbbuf, AFS_TOKENNAME_KRB5));
+     else if (method == AFS_TOKEN_KRB524)
+         return SUCCEEDED(StringCbCopy(buf, cbbuf, AFS_TOKENNAME_KRB524));
+     else if (method == AFS_TOKEN_KRB4)
+         return SUCCEEDED(StringCbCopy(buf, cbbuf, AFS_TOKENNAME_KRB4));
+     else {
+         khm_size i;
+ 
+         for (i=0; i < n_extensions; i++) {
+             if (!extensions[i].provide_token_acq)
+                 continue;
+             if (extensions[i].token_acq.method_id == method)
+                 return SUCCEEDED(StringCbCopy(buf, cbbuf,
+                                               extensions[i].name));
+         }
+     }
+ 
+     return FALSE;
+ }
+ 
+ /* not thread safe.  only call from the plugin thread */
+ khm_boolean
+ afs_ext_resolve_token(const wchar_t * cell,
+                       const struct ktc_token * token,
+                       const struct ktc_principal * serverp,
+                       const struct ktc_principal * clientp,
+                       khm_handle * pident,
+                       afs_tk_method * pmethod) {
+ 
+     afs_msg_resolve_token rt;
+     khm_size idx;
+     khm_int32 rv;
+ 
+     ZeroMemory(&rt, sizeof(rt));
+ 
+     rt.cbsize = sizeof(rt);
+ 
+     rt.cell = cell;
+     rt.token = token;
+     rt.serverp = serverp;
+     rt.clientp = clientp;
+     rt.method = AFS_TOKEN_AUTO;
+     rt.ident = NULL;
+ 
+     for (idx = 0; idx < n_extensions; idx++) {
+         if (!extensions[idx].provide_token_acq)
+             continue;
+ 
+         rv = kmq_send_sub_msg(extensions[idx].sub,
+                               afs_msg_type_id,
+                               AFS_MSG_RESOLVE_TOKEN,
+                               0,
+                               (void *) &rt);
+ 
+         if (KHM_SUCCEEDED(rv)) {
+             assert(rt.ident != NULL);
+ 
+             *pident = rt.ident;
+             *pmethod = rt.method;
+ 
+             return TRUE;
+         }
+     }
+ 
+     return FALSE;
+ }
+ 
+ /* not thread safe. only call from the plugin thread */
+ khm_boolean
+ afs_ext_klog(afs_tk_method method,
+              khm_handle   identity,
+              const char * service,
+              const char * cell,
+              const char * realm,
+              const afs_conf_cell * cell_config,
+              khm_int32    lifetime) {
+ 
+     khm_size idx;
+     khm_int32 rv = KHM_ERROR_GENERAL;
+     afs_msg_klog msg;
+     afs_conf_cell cellconfig;
+ 
+     ZeroMemory(&msg, sizeof(msg));
+     ZeroMemory(&cellconfig, sizeof(cellconfig));
+ 
+     msg.cbsize = sizeof(msg);
+ 
+     msg.identity = identity;
+     msg.service = service;
+     msg.cell = cell;
+     msg.realm = realm;
+     msg.lifetime = lifetime;
+ 
+     msg.cell_config = &cellconfig;
+ 
+     cellconfig = *cell_config;
+     cellconfig.cbsize = sizeof(cellconfig);
+ 
+     for (idx = 0; idx < n_extensions; idx++) {
+         if (!extensions[idx].provide_token_acq ||
+             (method != AFS_TOKEN_AUTO &&
+              extensions[idx].token_acq.method_id != method))
+             continue;
+ 
+         rv = kmq_send_sub_msg(extensions[idx].sub,
+                               afs_msg_type_id,
+                               AFS_MSG_KLOG,
+                               0,
+                               (void *) &msg);
+ 
+         if (KHM_SUCCEEDED(rv))
+             return TRUE;
+     }
+ 
+     return FALSE;
+ }
+ 
+ khm_int32 KHMAPI 
+ afs_msg_ext(khm_int32 msg_subtype, khm_ui_4 uparam, void * vparam) {
+     switch(msg_subtype) {
+     case AFS_MSG_ANNOUNCE:
+         return afs_add_extension((afs_msg_announce *) vparam);
+     }
+ 
+     return KHM_ERROR_SUCCESS;
+ }
Index: openafs/src/WINNT/netidmgr_plugin/afsfuncs.c
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/afsfuncs.c:1.1.2.3
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/afsfuncs.c	Mon Oct 16 09:55:34 2006
***************
*** 0 ****
--- 1,1432 ----
+ /*
+  * Copyright (c) 2005,2006 Secure Endpoints Inc.
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: afsfuncs.c,v 1.1.2.3 2006/10/16 13:55:34 jaltman Exp $ */
+ 
+ /* Disable the 'macro redefinition' warning which is getting
+    triggerred by a redefinition of the ENCRYPT and DECRYPT macros. */
+ #pragma warning (push)
+ #pragma warning (disable: 4005)
+ 
+ #include<afscred.h>
+ #include<dynimport.h>
+ #include<krb5common.h>
+ 
+ #pragma warning (pop)
+ 
+ BOOL
+ afs_is_running(void) {
+     DWORD CurrentState;
+ 
+     if (!AfsAvailable)
+         return FALSE;
+ 
+     if (GetServiceStatus(NULL, TRANSARCAFSDAEMON, 
+                          &CurrentState, NULL) != NOERROR)
+         return FALSE;
+     if (CurrentState != SERVICE_RUNNING)
+         return FALSE;
+ 
+     return TRUE;
+ }
+ 
+ int
+ afs_unlog(void)
+ {
+     long	rc;
+ 
+     if (!afs_is_running())
+         return 0;
+ 
+     rc = ktc_ForgetAllTokens();
+ 
+     return rc;
+ }
+ 
+ int
+ afs_unlog_cred(khm_handle cred)
+ {
+     long rc;
+     struct ktc_principal princ;
+     khm_size cbbuf;
+     wchar_t name[KCDB_MAXCCH_NAME];
+ 
+     if (!afs_is_running())
+         return 0;
+ 
+     cbbuf = sizeof(princ);
+     if(KHM_FAILED(kcdb_cred_get_attr(cred, afs_attr_server_princ, 
+                                      NULL, &princ, &cbbuf)))
+         return 1;
+ 
+     afs_princ_to_string(&princ, name, sizeof(name));
+ 
+     _report_cs1(KHERR_INFO, L"Destroying token %1!s!",
+                 _cstr(name));
+     _resolve();
+ 
+     rc = ktc_ForgetToken(&princ);
+ 
+     return rc;
+ }
+ 
+ /* convert a ktc_principal to a wchar_t string form that looks like
+     name.instance@cell return 0 if it worked. non-zero otherwise
+ */
+ int 
+ afs_princ_to_string(struct ktc_principal * p, 
+                     wchar_t * buf, 
+                     size_t cbbuf)
+ {
+     wchar_t wbuf[256];
+     int rv = 0;
+     int l;
+ 
+     l = AnsiStrToUnicode(wbuf, sizeof(wbuf), p->name);
+     wbuf[l] = L'\0';
+ 
+     rv = FAILED(StringCbCopy(buf, cbbuf, wbuf));
+     if(p->instance[0]) {
+         StringCbCat(buf, cbbuf, L".");
+         if((l = AnsiStrToUnicode(wbuf, sizeof(wbuf), p->instance)) > 0) {
+             wbuf[l] = L'\0';
+             rv = rv || FAILED(StringCbCat(buf, cbbuf, wbuf));
+         }
+         else
+             rv = 1;
+     }
+     if(p->cell[0]) {
+         rv = rv || FAILED(StringCbCat(buf, cbbuf, L"@"));
+         if((l = AnsiStrToUnicode(wbuf, sizeof(wbuf), p->cell)) > 0) {
+             wbuf[l] = L'\0';
+             rv = rv || FAILED(StringCbCat(buf, cbbuf, wbuf));
+         }
+         else
+             rv = 1;
+     }
+ 
+     return rv;
+ }
+ 
+ int 
+ afs_list_tokens(void)
+ {
+     int r;
+ 
+     kcdb_credset_flush(afs_credset);
+     r = afs_list_tokens_internal();
+     kcdb_credset_collect(NULL, afs_credset, NULL, afs_credtype_id, NULL);
+ 
+     return r;
+ }
+ 
+ /* is the credential provided an AFS token and is it from the
+    specified cell? */
+ static khm_int32 KHMAPI 
+ afs_filter_by_cell(khm_handle cred, khm_int32 flags, void * rock)
+ {
+     wchar_t wcell[MAXCELLCHARS];
+     wchar_t * tcell;
+     khm_size cbsize;
+     khm_int32 type;
+ 
+     tcell = (wchar_t *) rock;
+ 
+     if(KHM_FAILED(kcdb_cred_get_type(cred, &type)) ||
+         type != afs_credtype_id)
+         return FALSE;
+ 
+     cbsize = sizeof(wcell);
+     if(KHM_FAILED(kcdb_cred_get_attr(cred, afs_attr_cell, 
+                                      NULL, wcell, &cbsize)))
+         return FALSE;
+ 
+     if(wcscmp(wcell, tcell))
+         return FALSE;
+ 
+     return TRUE;
+ }
+ 
+ struct token_filter_data {
+     wchar_t * cell;
+ };
+ 
+ khm_int32 KHMAPI
+ afs_filter_for_token(khm_handle cred, khm_int32 flags, void * rock) {
+     struct token_filter_data * pdata;
+     wchar_t ccell[MAXCELLCHARS];
+     khm_size cb;
+     khm_int32 ctype;
+ 
+     pdata = (struct token_filter_data *) rock;
+ 
+     if (KHM_FAILED(kcdb_cred_get_type(cred, &ctype)) ||
+         ctype != afs_credtype_id)
+ 
+         return 0;
+ 
+     cb = sizeof(ccell);
+ 
+     if (KHM_FAILED(kcdb_cred_get_attr(cred, afs_attr_cell,
+                                       NULL,
+                                       ccell,
+                                       &cb)) ||
+         _wcsicmp(ccell, pdata->cell))
+ 
+         return 0;
+ 
+     return 1;
+ }
+ 
+ khm_handle
+ afs_find_token(khm_handle credset, wchar_t * cell) {
+     struct token_filter_data fdata;
+     khm_handle cred = NULL;
+ 
+     fdata.cell = cell;
+ 
+     if (KHM_FAILED(kcdb_credset_find_filtered(credset,
+                                               -1,
+                                               afs_filter_for_token,
+                                               &fdata,
+                                               &cred,
+                                               NULL)))
+         return NULL;
+     else
+         return cred;
+ }
+ 
+ static khm_int32 KHMAPI 
+ afs_filter_krb5_tkt(khm_handle cred, khm_int32 flags, void * rock) 
+ {
+     wchar_t cname[KCDB_CRED_MAXCCH_NAME];
+     khm_int32 type;
+     wchar_t * tcell;
+     wchar_t * t, *tkt_cell;
+     khm_size cbsize;
+ 
+     tcell = (wchar_t *) rock;
+ 
+     if(KHM_FAILED(kcdb_cred_get_type(cred, &type)) ||
+        type != krb5_credtype_id)
+         return FALSE;
+ 
+     cbsize = sizeof(cname);
+     if (KHM_FAILED(kcdb_cred_get_name(cred, cname, &cbsize)))
+         return FALSE;
+ 
+     if (!wcsncmp(cname, L"afs/", 4)) {
+ 
+         tkt_cell = cname + 4;
+ 
+         t = wcschr(tkt_cell, L'@');
+         if (t == NULL)
+             return FALSE;
+         *t = L'\0';
+ 
+     } else if (!wcsncmp(cname, L"afs@", 4)) {
+ 
+         tkt_cell = cname + 4;
+ 
+     } else {
+         return FALSE;
+     }
+ 
+     if (_wcsicmp(tcell, tkt_cell))
+         return FALSE;
+ 
+     return TRUE;
+ }
+ 
+ static khm_int32 KHMAPI 
+ afs_filter_krb4_tkt(khm_handle cred, khm_int32 flags, void * rock) 
+ {
+     wchar_t cname[KCDB_CRED_MAXCCH_NAME];
+     khm_int32 type;
+     wchar_t * tcell;
+     wchar_t * t, *tkt_cell;
+     khm_size cbsize;
+ 
+     tcell = (wchar_t *) rock;
+ 
+     if(KHM_FAILED(kcdb_cred_get_type(cred, &type)) ||
+        type != krb4_credtype_id)
+         return FALSE;
+ 
+     cbsize = sizeof(cname);
+     if (KHM_FAILED(kcdb_cred_get_name(cred, cname, &cbsize)))
+         return FALSE;
+ 
+     if (!wcsncmp(cname, L"afs.", 4)) {
+ 
+         tkt_cell = cname + 4;
+ 
+         t = wcschr(tkt_cell, L'@');
+         if (t == NULL)
+             return FALSE;
+         *t = L'\0';
+ 
+     } else if (!wcsncmp(cname, L"afs@", 4)) {
+ 
+         tkt_cell = cname + 4;
+ 
+     } else {
+         return FALSE;
+     }
+ 
+     if (_wcsicmp(tcell, tkt_cell))
+         return FALSE;
+ 
+     return TRUE;
+ }
+ 
+ /* collects all AFS tokens to the root credential set using the
+    generic afs_credset credential set
+    */
+ int
+ afs_list_tokens_internal(void)
+ {
+     struct ktc_principal    aserver;
+     struct ktc_principal    aclient;
+     struct ktc_token        atoken;
+     int                     cellNum;
+     int                     BreakAtEnd;
+     wchar_t                 idname[256];
+     wchar_t                 crname[256];
+     wchar_t                 location[256];
+     wchar_t                 *cell;
+ 
+     DWORD                   rc;
+ 
+     khm_handle              ident = NULL;
+     khm_handle              cred = NULL;
+     afs_tk_method           method;
+ 
+     FILETIME                ft;
+ 
+     if (!afs_is_running())
+         return 0;
+ 
+     kcdb_credset_flush(afs_credset);
+ 
+     LoadString(hResModule, IDS_DEF_LOCATION, location, ARRAYLENGTH(location));
+ 
+     BreakAtEnd = 0;
+     cellNum = 0;
+     while (1) 
+     {
+         memset(&aserver, 0, sizeof(aserver));
+         if (rc = ktc_ListTokens(cellNum, &cellNum, &aserver))
+         {
+             if (rc != KTC_NOENT)
+                 return(0);
+ 
+             if (BreakAtEnd == 1)
+                 break;
+         }
+         BreakAtEnd = 1;
+         memset(&atoken, '\0', sizeof(atoken));
+         if (rc = ktc_GetToken(&aserver, &atoken, sizeof(atoken), &aclient))
+         {
+             if (rc == KTC_ERROR)
+                 return(0);
+ 
+             continue;
+         }
+ 
+ #if 0
+         /* failed attempt at trying to figure out the principal name from
+            the token.  The ticket that is attached to the token is not
+            in a form that is useful at this point */
+         idname[0] = L'\0';
+         if(atoken.kvno == RXKAD_TKT_TYPE_KERBEROS_V5) {
+             krb5_context ctx = 0;
+             krb5_ccache cc = 0;
+             krb5_creds * k5c;
+             krb5_error_code code;
+             char * princ;
+ 
+             code = khm_krb5_initialize(&ctx, &cc);
+             if(code)
+                 goto _no_krb5;
+ 
+             k5c = (krb5_creds *) atoken.ticket;
+ 
+             code = pkrb5_unparse_name(ctx, k5c->client, &princ);
+             if(code)
+                 goto _no_krb5;
+ 
+             MultiByteToWideChar(CP_ACP, 0, princ, strlen(princ), idname, sizeof(idname)/sizeof(idname[0]));
+ 
+             pkrb5_free_unparsed_name(ctx, princ);
+ _no_krb5:
+             ;
+         }
+ #endif
+ 
+         method = AFS_TOKEN_AUTO;
+ 
+         afs_princ_to_string(&aclient, idname, sizeof(idname));
+ 
+         /* We need to figure out a good client name which we can use
+            to create an identity which looks familiar to the user.  No
+            good way of doing this, so we use a heuristic.
+ 
+            Note that, we use another heuristic to find out which
+            identity to associate the token with.
+    
+            ASSUMPTION:
+ 
+            The assumption here is that the principal for the token is
+            computed as follows:
+            
+            if realm != cell : principal looks like user@realm@cell
+            if realm == cell : principal looks like user@realm
+         
+            HEURISTIC:
+         
+            We strip the part of the string that follows the second '@'
+            sign to obtain the 'user@realm' part, which we use as the
+            credential name.  If there is no second '@', we use the
+            whole principal name. */
+         {
+             wchar_t * ats;
+ 
+             ats = wcschr(idname, L'@');
+             if(ats && (ats = wcschr(ats + 1, L'@')))
+                 *ats = L'\0';
+         }
+ 
+         afs_princ_to_string(&aserver, crname, sizeof(crname));
+ 
+         /* Ok, now we need to figure out which identity to associate
+            this token with.  This is a little bit tricky, and there is
+            currently no good way of determining the original identity
+            used to obtain the token if it was done outside of
+            NetIDMgr.  So we use a heuristic here.
+ 
+            REQUIREMENT:
+ 
+            Elsewhere, (actually in afsnewcreds.c) just after obtaining
+            AFS tokens through NetIDMgr, we enumerate the AFS tokens
+            and assign the root identity (used to obtain new creds)
+            with the AFS tokens.  This would still be there in the root
+            credential set when we list tokens later on.
+ 
+            HEURISTIC:
+ 
+            If there exists an AFS token in the root credential set for
+            the same cell, we associate this token with the same
+            identity as that credential.
+         */
+         cell = wcschr(crname, L'@');
+         if(cell) {
+             cell++;
+             if(!*cell)
+                 cell = NULL;
+         }
+ 
+         ident = NULL;
+         if(cell) {
+             khm_handle c;
+ 
+             if(KHM_SUCCEEDED(kcdb_credset_find_filtered(NULL, -1, 
+                                                         afs_filter_by_cell, 
+                                                         (void *) cell, 
+                                                         &c, NULL))) {
+                 khm_size cb;
+ 
+                 kcdb_cred_get_identity(c, &ident);
+                 cb = sizeof(method);
+                 kcdb_cred_get_attr(c, afs_attr_method, NULL,
+                                    &method, &cb);
+                 kcdb_cred_release(c);
+             }
+         }
+ 
+         /* If that failed, we have try another trick.  If there is a
+            Krb5 ticket of the form afs/<cell>@<realm> or afs@<CELL>
+            where <cell> matches our cell, then we pick the identity
+            off of that.
+ 
+            ASSUMPTION:
+ 
+            If Krb5 was used to obatain the token, then there is a Krb5
+            ticket of the form afs/<cell>@<REALM> or afs@<CELL> still
+            in the cache.  This is also true for Krb524 token
+            acquisition.
+ 
+            HEURISTIC:
+ 
+            If such a Krb5 ticket is found, use the identity of that
+            credential as the identity of the AFS token.
+ 
+         */
+         if (ident == NULL && cell != NULL) {
+             khm_handle c;
+ 
+             if(KHM_SUCCEEDED(kcdb_credset_find_filtered(NULL, -1, 
+                                                         afs_filter_krb5_tkt,
+                                                         (void *) cell, 
+                                                         &c, NULL))) {
+                 kcdb_cred_get_identity(c, &ident);
+                 /* this could be Krb5 or Krb524, so we leave method at
+                    AFS_TOKEN_AUTO. */
+                 method = AFS_TOKEN_AUTO;
+                 kcdb_cred_release(c);
+             }
+         }
+ 
+         /* If that didn't work either, we look for a Krb4 ticket of
+            the form afs.<cell>@<REALM> or afs@<CELL> which matches the
+            cell. 
+ 
+            ASSUMPTION:
+ 
+            If Krb4 was used to obtain an AFS token, then there should
+            be a Krb4 ticket of the form afs.<cell>@<REALM> or
+            afs@<CELL> in the cache.
+ 
+            HEURISTIC:
+ 
+            If such a ticket is found, then use the identity of that
+            credential as the identity of the AFS token.
+         */
+         if (ident == NULL && cell != NULL) {
+             khm_handle c;
+ 
+             if (krb4_credtype_id < 0) {
+                 kcdb_credtype_get_id(KRB4_CREDTYPE_NAME,
+                                      &krb4_credtype_id);
+             }
+ 
+             if (krb4_credtype_id > 0 &&
+                 KHM_SUCCEEDED(kcdb_credset_find_filtered(NULL, -1,
+                                                          afs_filter_krb4_tkt,
+                                                          (void *) cell,
+                                                          &c, NULL))) {
+ 
+                 kcdb_cred_get_identity(c, &ident);
+                 kcdb_cred_release(c);
+                 method = AFS_TOKEN_KRB4;
+ 
+             }
+         }
+ 
+         /* Finally, we allow any extension plugins to give this a shot */
+         if (ident == NULL && cell != NULL) {
+             afs_ext_resolve_token(cell,
+                                   &atoken,
+                                   &aserver,
+                                   &aclient,
+                                   &ident,
+                                   &method);
+         }
+ 
+         /* One more thing to try.  If we have a cell->identity
+            mapping, then we try that. */
+         if (ident == NULL && cell != NULL) {
+             khm_handle h_cellmap;
+             wchar_t tidname[KCDB_IDENT_MAXCCH_NAME];
+             khm_size cb;
+ 
+             cb = sizeof(tidname);
+ 
+             if (KHM_SUCCEEDED(khc_open_space(csp_afscred,
+                                              L"Cells", 0, 
+                                              &h_cellmap))) {
+                 if (KHM_SUCCEEDED(khc_read_string(h_cellmap,
+                                                   cell,
+                                                   tidname,
+                                                   &cb))) {
+                     kcdb_identity_create(tidname,
+                                          KCDB_IDENT_FLAG_CREATE,
+                                          &ident);
+                 }
+                 khc_close_space(h_cellmap);
+             }
+         }
+ 
+         /* all else failed */
+         if(ident == NULL) {
+             if(KHM_FAILED(kcdb_identity_create(idname, 
+                                                KCDB_IDENT_FLAG_CREATE, 
+                                                &ident)))
+                 goto _exit;
+         }
+ 
+         if(KHM_FAILED(kcdb_cred_create(crname, ident, afs_credtype_id, &cred)))
+             goto _exit;
+ 
+         kcdb_cred_set_attr(cred, afs_attr_method, &method, sizeof(method));
+ 
+         TimetToFileTime(atoken.endTime, &ft);
+         kcdb_cred_set_attr(cred, KCDB_ATTR_EXPIRE, &ft, sizeof(ft));
+         if (atoken.startTime != 0) {
+             TimetToFileTime(atoken.startTime, &ft);
+             kcdb_cred_set_attr(cred, KCDB_ATTR_ISSUE, &ft, sizeof(ft));
+         }
+         kcdb_cred_set_attr(cred, afs_attr_client_princ, 
+                            &aclient, sizeof(aclient));
+         kcdb_cred_set_attr(cred, afs_attr_server_princ, 
+                            &aserver, sizeof(aserver));
+ 
+         if(cell) {
+             kcdb_cred_set_attr(cred, afs_attr_cell, cell, KCDB_CBSIZE_AUTO);
+         }
+ 
+         kcdb_cred_set_attr(cred, KCDB_ATTR_LOCATION, 
+                            location, KCDB_CBSIZE_AUTO);
+ 
+         kcdb_credset_add_cred(afs_credset, cred, -1);
+ 
+         /* both these calls are NULL pointer safe */
+         kcdb_cred_release(cred);
+         cred = NULL;
+         kcdb_identity_release(ident);
+         ident = NULL;
+     }
+ 
+ _exit:
+     if(ident)
+         kcdb_identity_release(ident);
+     if(cred)
+         kcdb_cred_release(cred);
+ 
+     return(0);
+ }
+ 
+ 
+ #define ALLOW_REGISTER 1
+ static int
+ ViceIDToUsername(char *username, 
+                  char *realm_of_user, 
+                  char *realm_of_cell,
+                  char * cell_to_use,
+                  struct ktc_principal *aclient, 
+                  struct ktc_principal *aserver, 
+                  struct ktc_token *atoken)
+ {
+     static char lastcell[MAXCELLCHARS+1] = { 0 };
+     static char confname[512] = { 0 };
+ #ifdef AFS_ID_TO_NAME
+     char username_copy[BUFSIZ];
+ #endif /* AFS_ID_TO_NAME */
+     long viceId = ANONYMOUSID;		/* AFS uid of user */
+     int  status = 0;
+ #ifdef ALLOW_REGISTER
+     afs_int32 id;
+ #endif /* ALLOW_REGISTER */
+ 
+     if (confname[0] == '\0') {
+         StringCbCopyA(confname, sizeof(confname), AFSDIR_CLIENT_ETC_DIRPATH);
+     }
+ 
+     StringCbCopyA(lastcell, sizeof(lastcell), aserver->cell);
+ 
+     if (!pr_Initialize (0, confname, aserver->cell)) {
+         char sname[PR_MAXNAMELEN];
+         StringCbCopyA(sname, sizeof(sname), username);
+         status = pr_SNameToId (sname, &viceId);
+ 	pr_End();
+     }
+ 
+     /*
+      * This is a crock, but it is Transarc's crock, so
+      * we have to play along in order to get the
+      * functionality.  The way the afs id is stored is
+      * as a string in the username field of the token.
+      * Contrary to what you may think by looking at
+      * the code for tokens, this hack (AFS ID %d) will
+      * not work if you change %d to something else.
+      */
+ 
+     /*
+      * This code is taken from cklog -- it lets people
+      * automatically register with the ptserver in foreign cells
+      */
+ 
+ #ifdef ALLOW_REGISTER
+     if (status == 0) {
+         if (viceId != ANONYMOUSID) {
+ #else /* ALLOW_REGISTER */
+ 	    if ((status == 0) && (viceId != ANONYMOUSID))
+ #endif /* ALLOW_REGISTER */
+     {
+ #ifdef AFS_ID_TO_NAME
+ 	StringCbCopyA(username_copy, BUFSIZ, username);
+ 	StringCchPrintfA(username, BUFSIZ, "%s (AFS ID %d)", username_copy, (int) viceId);
+ #endif /* AFS_ID_TO_NAME */
+     }
+ #ifdef ALLOW_REGISTER
+         } else if (strcmp(realm_of_user, realm_of_cell) != 0) {
+             id = 0;
+             StringCbCopyA(aclient->name, sizeof(aclient->name), username);
+             StringCbCopyA(aclient->instance, sizeof(aclient->instance), "");
+             StringCbCopyA(aclient->cell, sizeof(aclient->cell), realm_of_user);
+             if (status = ktc_SetToken(aserver, atoken, aclient, 0))
+                 return status;
+             if (status = pr_Initialize(1L, confname, aserver->cell))
+                 return status;
+             status = pr_CreateUser(username, &id);
+ 	    pr_End();
+ 	    if (status)
+ 		return status;
+ #ifdef AFS_ID_TO_NAME
+             StringCbCopyA(username_copy, BUFSIZ, username);
+             StringCchPrintfA(username, BUFSIZ, "%s (AFS ID %d)", username_copy, (int) viceId);
+ #endif /* AFS_ID_TO_NAME */
+         }
+     }
+ #endif /* ALLOW_REGISTER */
+     return status;
+ }
+ 
+ 
+ int
+ afs_klog(khm_handle identity,
+          char *service,
+          char *cell,
+          char *realm,
+          int LifeTime,
+          afs_tk_method method,
+          time_t * tok_expiration) {
+ 
+     long	rc;
+     CREDENTIALS	creds;
+     struct ktc_principal	aserver;
+     struct ktc_principal	aclient;
+     char	realm_of_user[REALM_SZ]; /* Kerberos realm of user */
+     char	realm_of_cell[REALM_SZ]; /* Kerberos realm of cell */
+     char	local_cell[MAXCELLCHARS+1];
+     char	Dmycell[MAXCELLCHARS+1];
+     struct ktc_token	atoken;
+     struct ktc_token	btoken;
+     afs_conf_cell	ak_cellconfig; /* General information about the cell */
+     char	RealmName[128];
+     char	CellName[128];
+     char	ServiceName[128];
+ 	khm_handle	confighandle;
+ 	khm_int32	supports_krb4 = 1;
+ 
+     /* signalling */
+     BOOL        bGotCreds = FALSE; /* got creds? */
+ 
+     if (tok_expiration)
+         *tok_expiration = (time_t) 0;
+ 
+     if (!afs_is_running()) {
+         _report_sr0(KHERR_WARNING, IDS_ERR_NOSERVICE);
+         return(0);
+     }
+ 
+     if ( !realm )   realm = "";
+     if ( !cell )    cell = "";
+     if ( !service ) service = "";
+ 
+     memset(RealmName, '\0', sizeof(RealmName));
+     memset(CellName, '\0', sizeof(CellName));
+     memset(ServiceName, '\0', sizeof(ServiceName));
+     memset(realm_of_user, '\0', sizeof(realm_of_user));
+     memset(realm_of_cell, '\0', sizeof(realm_of_cell));
+     memset(Dmycell, '\0', sizeof(Dmycell));
+ 
+     // NULL or empty cell returns information on local cell
+     if (cell && cell[0])
+         StringCbCopyA(Dmycell, sizeof(Dmycell), cell);
+ 
+     rc = afs_get_cellconfig(Dmycell, &ak_cellconfig, local_cell);
+     if (rc) {
+         _reportf(L"afs_get_cellconfig returns %ld", rc);
+ 
+         _report_sr2(KHERR_ERROR, IDS_ERR_CELLCONFIG, _cstr(Dmycell), _int32(rc));
+         _suggest_sr(IDS_ERR_CELLCONFIG_S, KHERR_SUGGEST_NONE);
+         _resolve();
+         return(rc);
+     }
+ 
+     StringCbCopyA(realm_of_cell, sizeof(realm_of_cell), 
+                   afs_realm_of_cell(&ak_cellconfig));
+ 
+     if (strlen(service) == 0)
+         StringCbCopyA(ServiceName, sizeof(ServiceName), "afs");
+     else
+         StringCbCopyA(ServiceName, sizeof(ServiceName), service);
+ 
+     if (strlen(cell) == 0)
+         StringCbCopyA(CellName, sizeof(CellName), local_cell);
+     else
+         StringCbCopyA(CellName, sizeof(CellName), cell);
+ 
+     if (strlen(realm) == 0)
+         StringCbCopyA(RealmName, sizeof(RealmName), realm_of_cell);
+     else
+         StringCbCopyA(RealmName, sizeof(RealmName), realm);
+ 
+     memset(&creds, '\0', sizeof(creds));
+ 
+     /*** Kerberos 5 and 524 ***/
+ 
+     if (method == AFS_TOKEN_AUTO ||
+         method == AFS_TOKEN_KRB5 ||
+         method == AFS_TOKEN_KRB524) {
+ 
+         krb5_context   context = 0;
+         krb5_ccache    k5cc = 0;
+         krb5_creds     increds;
+         krb5_creds *   k5creds = 0;
+         krb5_error_code r;
+         krb5_principal client_principal = 0;
+         krb5_flags     flags = 0;
+ 
+         int         retry = 0;
+         int         len;
+ 	char        *p;
+ 
+         _reportf(L"Trying Kerberos 5");
+ 
+         if (!(r = khm_krb5_initialize(identity, &context, &k5cc))) {
+             int i;
+ 
+             memset((char *)&increds, 0, sizeof(increds));
+ 
+             (*pkrb5_cc_get_principal)(context, k5cc, &client_principal);
+             i = krb5_princ_realm(context, client_principal)->length;
+             if (i > REALM_SZ-1) 
+                 i = REALM_SZ-1;
+             StringCchCopyNA(realm_of_user, ARRAYLENGTH(realm_of_user),
+                             krb5_princ_realm(context, client_principal)->data,
+                             i);
+         } else {
+             _reportf(L"khm_krb5_initialize returns code %d", r);
+             goto try_krb4;
+         }
+ 
+         /* First try Service/Cell@REALM */
+         if (r = (*pkrb5_build_principal)(context, &increds.server,
+                                          (int) strlen(RealmName),
+                                          RealmName,
+                                          ServiceName,
+                                          CellName,
+                                          0)) {
+             _reportf(L"krb5_build_principal returns %d", r);
+             goto end_krb5;
+         }
+ 
+         increds.client = client_principal;
+         increds.times.endtime = 0;
+         /* Ask for DES since that is what V4 understands */
+         increds.keyblock.enctype = ENCTYPE_DES_CBC_CRC;
+ 
+ #ifdef KRB5_TC_NOTICKET
+         flags = 0;
+         r = pkrb5_cc_set_flags(context, k5cc, flags);
+ #endif
+         r = pkrb5_get_credentials(context, 0, k5cc, &increds, &k5creds);
+         if (r == KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN ||
+             r == KRB5KRB_ERR_GENERIC /* Heimdal */) {
+             /* Next try Service@REALM */
+             pkrb5_free_principal(context, increds.server);
+             r = (*pkrb5_build_principal)(context, &increds.server,
+                                          (int) strlen(RealmName),
+                                          RealmName,
+                                          ServiceName,
+                                          0);
+             if (r == 0)
+                 r = pkrb5_get_credentials(context, 0, k5cc, 
+                                           &increds, &k5creds);
+         }
+ 
+         pkrb5_free_principal(context, increds.server);
+         pkrb5_free_principal(context, client_principal);
+         client_principal = 0;
+ #ifdef KRB5_TC_NOTICKET
+         flags = KRB5_TC_NOTICKET;
+         pkrb5_cc_set_flags(context, k5cc, flags);
+ #endif
+ 
+         (void) pkrb5_cc_close(context, k5cc);
+         k5cc = 0;
+ 
+         if (r) {
+             _reportf(L"Code %d while getting credentials", r);
+             goto end_krb5;
+         }
+ 
+         if ( k5creds->ticket.length > MAXKTCTICKETLEN ||
+              method == AFS_TOKEN_KRB524) {
+             goto try_krb524d;
+         }
+ 
+         /* This code inserts the entire K5 ticket into the token */
+ 
+         _reportf(L"Trying K5 SetToken");
+ 
+         memset(&aserver, '\0', sizeof(aserver));
+         StringCchCopyA(aserver.name, MAXKTCNAMELEN, ServiceName);
+         StringCchCopyA(aserver.cell, MAXKTCREALMLEN, CellName);
+ 
+         memset(&atoken, '\0', sizeof(atoken));
+         atoken.kvno = RXKAD_TKT_TYPE_KERBEROS_V5;
+         atoken.startTime = k5creds->times.starttime;
+         atoken.endTime = k5creds->times.endtime;
+         memcpy(&atoken.sessionKey, 
+                k5creds->keyblock.contents, 
+                k5creds->keyblock.length);
+         atoken.ticketLen = k5creds->ticket.length;
+         memcpy(atoken.ticket, k5creds->ticket.data, atoken.ticketLen);
+ 
+         if (tok_expiration)
+             *tok_expiration = k5creds->times.endtime;
+ 
+     retry_gettoken5:
+         rc = ktc_GetToken(&aserver, &btoken, sizeof(btoken), &aclient);
+         if (rc != 0 && rc != KTC_NOENT && rc != KTC_NOCELL) {
+             if ( rc == KTC_NOCM && retry < 20 ) {
+                 Sleep(500);
+                 retry++;
+                 goto retry_gettoken5;
+             }
+             goto try_krb524d;
+         }
+ 
+         if (atoken.kvno == btoken.kvno &&
+             atoken.ticketLen == btoken.ticketLen &&
+             !memcmp(&atoken.sessionKey, &btoken.sessionKey, 
+                     sizeof(atoken.sessionKey)) &&
+             !memcmp(atoken.ticket, btoken.ticket, atoken.ticketLen)) {
+ 
+             /* success */
+             if (k5creds && context)
+                 pkrb5_free_creds(context, k5creds);
+ 
+             if (context)
+                 pkrb5_free_context(context);
+ 
+             _reportf(L"Same token already exists");
+             
+             return 0;
+         }
+ 
+         // * Reset the "aclient" structure before we call ktc_SetToken.
+         // * This structure was first set by the ktc_GetToken call when
+         // * we were comparing whether identical tokens already existed.
+ 
+         len = min(k5creds->client->data[0].length,MAXKTCNAMELEN - 1);
+         StringCchCopyNA(aclient.name, MAXKTCNAMELEN,
+                         k5creds->client->data[0].data, len);
+ 
+         if ( k5creds->client->length > 1 ) {
+             StringCbCatA(aclient.name, sizeof(aclient.name), ".");
+             p = aclient.name + strlen(aclient.name);
+             len = (int) min(k5creds->client->data[1].length,
+                             MAXKTCNAMELEN - strlen(aclient.name) - 1);
+             StringCchCopyNA(p, MAXKTCNAMELEN - strlen(aclient.name),
+                             k5creds->client->data[1].data, len);
+         }
+ 
+         aclient.instance[0] = '\0';
+ 
+         StringCbCopyA(aclient.cell, sizeof(aclient.cell), realm_of_cell);
+ 
+ 	StringCbCatA(aclient.name, sizeof(aclient.name), "@");
+ 	p = aclient.name + strlen(aclient.name);
+ 	len = (int) min(k5creds->client->realm.length,
+ 			 MAXKTCNAMELEN - strlen(aclient.name) - 1);
+         StringCchCopyNA(p, MAXKTCNAMELEN - strlen(aclient.name),
+                         k5creds->client->realm.data, len);
+ 
+         ViceIDToUsername(aclient.name, realm_of_user, realm_of_cell, CellName, 
+                          &aclient, &aserver, &atoken);
+ 
+         rc = ktc_SetToken(&aserver, &atoken, &aclient, 0);
+         if (!rc) {
+             /* success */
+ 
+             if (k5creds && context)
+                 pkrb5_free_creds(context, k5creds);
+ 
+             if (context)
+                 pkrb5_free_context(context);
+             
+             return 0;
+         }
+ 
+         _reportf(L"SetToken returns code %d", rc);
+ 
+     try_krb524d:
+ 
+         _reportf(L"Trying Krb524");
+ 
+         if (method == AFS_TOKEN_AUTO ||
+             method == AFS_TOKEN_KRB524) {
+             /* This requires krb524d to be running with the KDC */
+             r = pkrb524_convert_creds_kdc(context, k5creds, &creds);
+             if (r) {
+                 _reportf(L"Code %d while converting credentials", r);
+                 goto end_krb5;
+             }
+             rc = KSUCCESS;
+             bGotCreds = TRUE;
+         }
+ 
+     end_krb5:
+         if (client_principal)
+             pkrb5_free_principal(context, client_principal);
+ 
+         if (k5creds && context)
+             pkrb5_free_creds(context, k5creds);
+ 
+         if (context)
+             pkrb5_free_context(context);
+     }
+ 
+     /* Kerberos 4 */
+  try_krb4:
+ 
+     kcdb_identity_get_config(identity, 0, &confighandle);
+     khc_read_int32(confighandle, L"Krb4Cred\\Krb4NewCreds", &supports_krb4);
+     khc_close_space(confighandle);
+ 
+     if (!supports_krb4) {
+         _reportf(L"Kerberos 4 not configured");
+     }
+ 
+     if (!bGotCreds && supports_krb4 && 
+         (method == AFS_TOKEN_AUTO ||
+          method == AFS_TOKEN_KRB4)) {
+ 
+         KTEXT_ST	ticket;
+ 
+         _reportf(L"Trying Kerberos 4");
+ 
+         if (!realm_of_user[0] ) {
+             if ((rc = (*pkrb_get_tf_realm)((*ptkt_string)(), realm_of_user)) 
+                 != KSUCCESS) {
+                 /* can't determine realm of user */
+                 _reportf(L"krb_get_tf_realm returns %d", rc);
+                 goto end_krb4;
+             }
+         }
+ 
+         _reportf(L"Trying to find %S.%S@%S", ServiceName, CellName, RealmName);
+         rc = (*pkrb_get_cred)(ServiceName, CellName, RealmName, &creds);
+         if (rc == NO_TKT_FIL) {
+             // if the problem is that we have no krb4 tickets
+             // do not attempt to continue
+             _reportf(L"krb_get_cred returns %d (no ticket file)", rc);
+             goto end_krb4;
+         }
+ 
+         if (rc != KSUCCESS) {
+             _reportf(L"Trying to find %S@%S", ServiceName, RealmName);
+             rc = (*pkrb_get_cred)(ServiceName, "", RealmName, &creds);
+         }
+ 
+         if (rc != KSUCCESS) {
+             _reportf(L"Trying to obtain new ticket");
+             if ((rc = (*pkrb_mk_req)(&ticket, ServiceName, 
+                                      CellName, RealmName, 0))
+                 == KSUCCESS) {
+                 if ((rc = (*pkrb_get_cred)(ServiceName, CellName, 
+                                            RealmName, &creds)) != KSUCCESS) {
+                     goto end_krb4;
+                 } else {
+                     _reportf(L"Got %S.%S@%S", ServiceName, CellName, RealmName);
+                 }
+             } else if ((rc = (*pkrb_mk_req)(&ticket, ServiceName, 
+                                             "", RealmName, 0))
+                        == KSUCCESS) {
+                 if ((rc = (*pkrb_get_cred)(ServiceName, "", 
+                                            RealmName, &creds)) != KSUCCESS) {
+                     goto end_krb4;
+                 } else {
+                     _reportf(L"Got %S@%S", ServiceName, RealmName);
+                 }
+             } else {
+                 goto end_krb4;
+             }
+         }
+ 
+         bGotCreds = TRUE;
+ 
+     end_krb4:
+         ;
+     }
+ 
+     if (bGotCreds) {
+ 
+         memset(&aserver, '\0', sizeof(aserver));
+         StringCchCopyA(aserver.name, MAXKTCNAMELEN, ServiceName);
+         StringCchCopyA(aserver.cell, MAXKTCREALMLEN, CellName);
+ 
+         memset(&atoken, '\0', sizeof(atoken));
+         atoken.kvno = creds.kvno;
+         atoken.startTime = creds.issue_date;
+         atoken.endTime = (*pkrb_life_to_time)(creds.issue_date,creds.lifetime);
+         memcpy(&atoken.sessionKey, creds.session, 8);
+         atoken.ticketLen = creds.ticket_st.length;
+         memcpy(atoken.ticket, creds.ticket_st.dat, atoken.ticketLen);
+ 
+         if (tok_expiration)
+             *tok_expiration = atoken.endTime;
+ 
+         if (!(rc = ktc_GetToken(&aserver, &btoken, 
+                                 sizeof(btoken), &aclient)) &&
+             atoken.kvno == btoken.kvno &&
+             atoken.ticketLen == btoken.ticketLen &&
+             !memcmp(&atoken.sessionKey, &btoken.sessionKey, 
+                     sizeof(atoken.sessionKey)) &&
+             !memcmp(atoken.ticket, btoken.ticket, atoken.ticketLen)) {
+ 
+             /* success! */
+             return(0);
+         }
+ 
+         // Reset the "aclient" structure before we call ktc_SetToken.
+         // This structure was first set by the ktc_GetToken call when
+         // we were comparing whether identical tokens already existed.
+ 
+         StringCchCopyA(aclient.name, MAXKTCNAMELEN, creds.pname);
+         if (creds.pinst[0]) {
+             StringCchCatA(aclient.name, MAXKTCNAMELEN, ".");
+             StringCchCatA(aclient.name, MAXKTCNAMELEN, creds.pinst);
+         }
+ 
+         StringCbCopyA(aclient.instance, sizeof(aclient.instance), "");
+ 
+         StringCchCatA(aclient.name, MAXKTCNAMELEN, "@");
+         StringCchCatA(aclient.name, MAXKTCNAMELEN, creds.realm);
+ 
+         StringCbCopyA(aclient.cell, sizeof(aclient.cell), CellName);
+ 
+         ViceIDToUsername(aclient.name, realm_of_user, realm_of_cell, CellName, 
+                          &aclient, &aserver, &atoken);
+ 
+         // NOTE: On WIN32, the order of SetToken params changed...
+         // to   ktc_SetToken(&aserver, &aclient, &atoken, 0)
+         // from ktc_SetToken(&aserver, &atoken, &aclient, 0) on
+         // Unix...  The afscompat ktc_SetToken provides the Unix order
+ 
+         if (rc = ktc_SetToken(&aserver, &atoken, &aclient, 0)) {
+             afs_report_error(rc, "ktc_SetToken()");
+             return(rc);
+         }
+     } else if (method == AFS_TOKEN_AUTO ||
+                method >= AFS_TOKEN_USER) {
+         /* we couldn't get a token using Krb5, Krb524 or Krb4, either
+            because we couldn't get the necessary credentials or
+            because the method was set to not use those.  Now we
+            dispatch to any extensions to see if they have better
+            luck. */
+ 
+         rc = !afs_ext_klog(method,
+                            identity,
+                            ServiceName,
+                            CellName,
+                            RealmName,
+                            &ak_cellconfig,
+                            LifeTime);
+     } else {
+         /* if the return code was not set, we should set it now.
+            Otherwise we let the code go through. */
+         if (!rc) {
+             /* No tokens were obtained.  We should report something */
+             _report_sr1(KHERR_ERROR, IDS_ERR_GENERAL,
+                         _cptr(CellName));
+             _resolve();
+ 
+             rc = KHM_ERROR_GENERAL;
+         }
+     }
+ 
+     return rc;
+ }
+ 
+ /**************************************/
+ /* afs_realm_of_cell():               */
+ /**************************************/
+ static char *
+ afs_realm_of_cell(afs_conf_cell *cellconfig)
+ {
+     char krbhst[MAX_HSTNM]="";
+     static char krbrlm[REALM_SZ+1]="";
+     krb5_context  ctx = 0;
+     char ** realmlist=NULL;
+     krb5_error_code r;
+ 
+     if (!cellconfig)
+         return 0;
+ 
+     if ( pkrb5_init_context ) {
+         r = pkrb5_init_context(&ctx); 
+         if ( !r )
+             r = pkrb5_get_host_realm(ctx, cellconfig->hostName[0], &realmlist);
+         if ( !r && realmlist && realmlist[0] ) {
+             StringCbCopyA(krbrlm, sizeof(krbrlm), realmlist[0]);
+             pkrb5_free_host_realm(ctx, realmlist);
+         }
+         if (ctx)
+             pkrb5_free_context(ctx);
+     }
+ 
+     if ( !krbrlm[0] ) {
+         StringCbCopyA(krbrlm, sizeof(krbrlm), 
+                       (char *)(*pkrb_realmofhost)(cellconfig->hostName[0]));
+         if ((*pkrb_get_krbhst)(krbhst, krbrlm, 1) != KSUCCESS)
+             krbrlm[0] = '\0';
+     }
+ 
+     if ( !krbrlm[0] ) {
+         char *s = krbrlm;
+         char *t = cellconfig->name;
+         int c;
+ 
+         while (c = *t++)
+         {
+             if (islower(c)) c=toupper(c);
+             *s++ = c;
+         }
+         *s++ = 0;
+     }
+     return(krbrlm);
+ }
+ 
+ /**************************************/
+ /* afs_get_cellconfig():                  */
+ /**************************************/
+ static int 
+ afs_get_cellconfig(char *cell, afs_conf_cell *cellconfig, char *local_cell)
+ {
+     int	rc;
+     int ttl;
+ 
+     local_cell[0] = (char)0;
+     memset(cellconfig, 0, sizeof(*cellconfig));
+ 
+     cellconfig->cbsize = sizeof(*cellconfig);
+ 
+     /* WIN32: cm_GetRootCellName(local_cell) - NOTE: no way to get max chars */
+     if (rc = cm_GetRootCellName(local_cell)) {
+         return(rc);
+     }
+ 
+     if (strlen(cell) == 0)
+         StringCbCopyA(cell, (MAXCELLCHARS+1) * sizeof(char), local_cell);
+ 
+     /* WIN32: cm_SearchCellFile(cell, pcallback, pdata) */
+     StringCbCopyA(cellconfig->name, (MAXCELLCHARS+1) * sizeof(char), cell);
+ 
+     rc = cm_SearchCellFile(cell, NULL, afs_get_cellconfig_callback, 
+                            (void*)cellconfig);
+     if(rc)
+         rc = cm_SearchCellByDNS(cell, NULL, &ttl, 
+                                 afs_get_cellconfig_callback, 
+                                 (void*) cellconfig);
+ 
+     return rc;
+ }
+ 
+ /**************************************/
+ /* afs_get_cellconfig_callback():          */
+ /**************************************/
+ static long 
+ afs_get_cellconfig_callback(void *cellconfig, 
+                             struct sockaddr_in *addrp, 
+                             char *namep)
+ {
+     afs_conf_cell *cc = (afs_conf_cell *)cellconfig;
+ 
+     cc->hostAddr[cc->numServers] = *addrp;
+     StringCbCopyA(cc->hostName[cc->numServers], 
+                   sizeof(cc->hostName[0]), namep);
+     cc->numServers++;
+     return(0);
+ }
+ 
+ 
+ /**************************************/
+ /* afs_report_error():           */
+ /**************************************/
+ void
+ afs_report_error(LONG rc, LPCSTR FailedFunctionName)
+ {
+     char message[256];
+     const char *errText; 
+ 
+     // Using AFS defines as error messages for now, until Transarc 
+     // gets back to me with "string" translations of each of these 
+     // const. defines. 
+     if (rc == KTC_ERROR)
+         errText = "KTC_ERROR";
+     else if (rc == KTC_TOOBIG)
+         errText = "KTC_TOOBIG";
+     else if (rc == KTC_INVAL)
+         errText = "KTC_INVAL";
+     else if (rc == KTC_NOENT)
+         errText = "KTC_NOENT";
+     else if (rc == KTC_PIOCTLFAIL)
+         errText = "KTC_PIOCTLFAIL";
+     else if (rc == KTC_NOPIOCTL)
+         errText = "KTC_NOPIOCTL";
+     else if (rc == KTC_NOCELL)
+         errText = "KTC_NOCELL";
+     else if (rc == KTC_NOCM)
+         errText = "KTC_NOCM: The service, Transarc AFS Daemon, most likely is not started!";
+     else
+         errText = "Unknown error!";
+ 
+     StringCbPrintfA(message, sizeof(message), 
+                     "%s\n(%s failed)", errText, FailedFunctionName);
+     _report_cs1(KHERR_ERROR, L"%1!S!", _cptr(message));
+     _resolve();
+     return;
+ }
+ 
+ DWORD 
+ GetServiceStatus(LPSTR lpszMachineName, 
+                  LPSTR lpszServiceName, 
+                  DWORD *lpdwCurrentState,
+                  DWORD *lpdwWaitHint) 
+ { 
+     DWORD           hr               = NOERROR; 
+     SC_HANDLE       schSCManager     = NULL; 
+     SC_HANDLE       schService       = NULL; 
+     DWORD           fdwDesiredAccess = 0; 
+     SERVICE_STATUS  ssServiceStatus  = {0}; 
+     BOOL            fRet             = FALSE; 
+ 
+     *lpdwCurrentState = 0; 
+  
+     fdwDesiredAccess = GENERIC_READ; 
+  
+     schSCManager = OpenSCManagerA(lpszMachineName,  
+                                   NULL,
+                                   fdwDesiredAccess); 
+  
+     if(schSCManager == NULL) { 
+         hr = GetLastError();
+         goto cleanup; 
+     } 
+  
+     schService = OpenServiceA(schSCManager,
+                               lpszServiceName,
+                               fdwDesiredAccess);
+  
+     if(schService == NULL) { 
+         hr = GetLastError();
+         goto cleanup; 
+     } 
+  
+     fRet = QueryServiceStatus(schService,
+                               &ssServiceStatus); 
+  
+     if(fRet == FALSE) { 
+         hr = GetLastError(); 
+         goto cleanup; 
+     } 
+  
+     *lpdwCurrentState = ssServiceStatus.dwCurrentState; 
+     if (lpdwWaitHint)
+         *lpdwWaitHint = ssServiceStatus.dwWaitHint;
+ cleanup: 
+  
+     CloseServiceHandle(schService); 
+     CloseServiceHandle(schSCManager); 
+  
+     return(hr); 
+ } 
+ 
+ DWORD ServiceControl(LPSTR lpszMachineName, 
+                      LPSTR lpszServiceName,
+                      DWORD dwNewState) {
+ 
+     DWORD           hr               = NOERROR; 
+     SC_HANDLE       schSCManager     = NULL; 
+     SC_HANDLE       schService       = NULL; 
+     DWORD           fdwDesiredAccess = 0; 
+     SERVICE_STATUS  ssServiceStatus  = {0}; 
+     BOOL            fRet             = FALSE; 
+     DWORD           dwCurrentState   = 0;
+ 
+     dwCurrentState = 0; 
+  
+     fdwDesiredAccess = GENERIC_READ;
+  
+     schSCManager = OpenSCManagerA(lpszMachineName, NULL, 
+                                   fdwDesiredAccess); 
+  
+     if(schSCManager == NULL) {
+         hr = GetLastError();
+         goto cleanup; 
+     }
+ 
+     fdwDesiredAccess = GENERIC_READ | GENERIC_EXECUTE;
+ 
+     schService = OpenServiceA(schSCManager, lpszServiceName,
+                               fdwDesiredAccess);
+  
+     if(schService == NULL) {
+         hr = GetLastError();
+         goto cleanup; 
+     } 
+  
+     fRet = QueryServiceStatus(schService, &ssServiceStatus);
+  
+     if(fRet == FALSE) {
+         hr = GetLastError(); 
+         goto cleanup; 
+     } 
+  
+     dwCurrentState = ssServiceStatus.dwCurrentState; 
+ 
+     if (dwCurrentState == SERVICE_STOPPED &&
+         dwNewState == SERVICE_RUNNING) {
+ 
+         fRet = StartService(schService, 0, NULL);
+ 
+         if (fRet == FALSE) {
+             hr = GetLastError();
+             goto cleanup;
+         }
+     }
+ 
+     if (dwCurrentState == SERVICE_RUNNING &&
+         dwNewState == SERVICE_STOPPED) {
+         fRet = ControlService(schService, SERVICE_CONTROL_STOP, 
+                               &ssServiceStatus);
+ 
+         if (fRet == FALSE) {
+             hr = GetLastError();
+             goto cleanup;
+         }
+     }
+  
+ cleanup: 
+  
+     CloseServiceHandle(schService); 
+     CloseServiceHandle(schSCManager); 
+  
+     return(hr); 
+ }
Index: openafs/src/WINNT/netidmgr_plugin/afsfuncs.h
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/afsfuncs.h:1.1.2.3
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/afsfuncs.h	Mon Oct 16 09:55:35 2006
***************
*** 0 ****
--- 1,80 ----
+ /*
+  * Copyright (c) 2005,2006 Secure Endpoints Inc.
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: afsfuncs.h,v 1.1.2.3 2006/10/16 13:55:35 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_AFSFUNCS_H
+ #define __KHIMAIRA_AFSFUNCS_H
+ 
+ 
+ BOOL
+ afs_is_running(void);
+ 
+ int 
+ afs_princ_to_string(struct ktc_principal * p, wchar_t * buf, size_t cbbuf);
+ 
+ int 
+ afs_list_tokens(void);
+ 
+ khm_handle
+ afs_find_token(khm_handle credset, wchar_t * cell);
+ 
+ int 
+ afs_list_tokens_internal(void);
+ 
+ int 
+ afs_klog(khm_handle identity,
+          char *service,
+          char *cell,
+          char *realm,
+          int LifeTime,
+          afs_tk_method method,
+          time_t * tok_expiration /* OUT: expiration time of new
+                                     token */
+          );
+ 
+ int
+ afs_unlog(void);
+ 
+ int
+ afs_unlog_cred(khm_handle cred);
+ 
+ DWORD 
+ GetServiceStatus(LPSTR lpszMachineName, 
+                  LPSTR lpszServiceName, 
+                  DWORD *lpdwCurrentState,
+                  DWORD *lpdwWaitHint);
+ 
+ DWORD 
+ ServiceControl(LPSTR lpszMachineName, 
+                LPSTR lpszServiceName,
+                DWORD dwNewState);
+ 
+ void afs_report_error(LONG rc, LPCSTR FailedFunctionName);
+ 
+ static char *afs_realm_of_cell(afs_conf_cell *);
+ static long afs_get_cellconfig_callback(void *, struct sockaddr_in *, char *);
+ static int afs_get_cellconfig(char *, afs_conf_cell *, char *);
+ 
+ #endif
Index: openafs/src/WINNT/netidmgr_plugin/afshelp.c
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/afshelp.c:1.1.2.3
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/afshelp.c	Mon Oct 16 09:55:35 2006
***************
*** 0 ****
--- 1,70 ----
+ /*
+  * Copyright (c) 2005,2006 Secure Endpoints Inc.
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: afshelp.c,v 1.1.2.3 2006/10/16 13:55:35 jaltman Exp $ */
+ 
+ #define NOSTRSAFE
+ 
+ #include<afscred.h>
+ #include<shlwapi.h>
+ #include<htmlhelp.h>
+ #include<psapi.h>
+ 
+ #ifdef DEBUG
+ #include<assert.h>
+ #endif
+ 
+ #include<strsafe.h>
+ 
+ static wchar_t helpfile[MAX_PATH] = L"";
+ 
+ /* can only be called from the UI thread */
+ HWND
+ afs_html_help(HWND caller,
+               wchar_t * postfix,
+               UINT cmd,
+               DWORD_PTR data) {
+ 
+     wchar_t fullp[MAX_PATH + MAX_PATH];
+ 
+     if (!helpfile[0]) {
+         DWORD rv;
+ 
+         rv = GetModuleFileNameEx(GetCurrentProcess(),
+                                  hInstance,
+                                  helpfile,
+                                  ARRAYLENGTH(helpfile));
+ #ifdef DEBUG
+         assert(rv != 0);
+ #endif
+         PathRemoveFileSpec(helpfile);
+         PathAppend(helpfile, AFS_HELPFILE);
+     }
+ 
+     StringCbCopy(fullp, sizeof(fullp), helpfile);
+     if (postfix)
+         StringCbCat(fullp, sizeof(fullp), postfix);
+ 
+     return HtmlHelp(caller, fullp, cmd, data);
+ }
Index: openafs/src/WINNT/netidmgr_plugin/afsnewcreds.c
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/afsnewcreds.c:1.1.2.3
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/afsnewcreds.c	Mon Oct 16 09:55:35 2006
***************
*** 0 ****
--- 1,2781 ----
+ /*
+  * Copyright (c) 2005,2006 Secure Endpoints Inc.
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: afsnewcreds.c,v 1.1.2.3 2006/10/16 13:55:35 jaltman Exp $ */
+ 
+ #include<afscred.h>
+ #include<commctrl.h>
+ #include<assert.h>
+ #include<netidmgr_version.h>
+ #include<htmlhelp.h>
+ #include<help/afsplhlp.h>
+ 
+ /* UI stuff */
+ 
+ #define WMNC_AFS_UPDATE_ROWS (WMNC_USER + 1)
+ 
+ typedef struct tag_afs_ident_token_set {
+     khm_handle ident;
+     afs_cred_list * l;
+     khm_boolean add_new;
+     khm_boolean update_info;
+ } afs_ident_token_set;
+ 
+ 
+ void 
+ afs_cred_flush_rows(afs_cred_list * l) {
+     int i;
+ 
+     for(i=0; i<l->n_rows; i++) {
+         if(l->rows[i].cell)
+             PFREE(l->rows[i].cell);
+         if(l->rows[i].realm)
+             PFREE(l->rows[i].realm);
+     }
+ 
+     if(l->nc_rows) {
+         ZeroMemory(l->rows, sizeof(l->rows[0]) * l->nc_rows);
+     }
+ 
+     l->n_rows = 0;
+ }
+ 
+ void 
+ afs_cred_free_rows(afs_cred_list * l) {
+ 
+     afs_cred_flush_rows(l);
+ 
+     if(l->rows)
+         PFREE(l->rows);
+     l->rows = NULL;
+     l->n_rows = 0;
+     l->nc_rows = 0;
+ }
+ 
+ void 
+ afs_cred_assert_rows(afs_cred_list * l, int n) {
+     afs_cred_row * rows;
+ 
+     if(n > l->nc_rows) {
+         l->nc_rows = UBOUNDSS(n, AFS_DLG_ROW_ALLOC, AFS_DLG_ROW_ALLOC);
+         rows = PMALLOC(sizeof(afs_cred_row) * l->nc_rows);
+         ZeroMemory(rows, sizeof(afs_cred_row) * l->nc_rows);
+ 
+         if(l->rows) {
+             if(l->n_rows)
+                 memcpy(rows, l->rows, sizeof(afs_cred_row) * l->n_rows);
+             PFREE(l->rows);
+         }
+         l->rows = rows;
+     }
+ }
+ 
+ void 
+ afs_cred_delete_row(afs_cred_list * l, int i) {
+     if (i < 0 || i >= l->n_rows)
+         return;
+ 
+     if(i < (l->n_rows - 1)) {
+         if(l->rows[i].cell)
+             PFREE(l->rows[i].cell);
+         if(l->rows[i].realm)
+             PFREE(l->rows[i].realm);
+         memmove(&(l->rows[i]),
+                 &(l->rows[i+1]),
+                 ((l->n_rows - (i+1)) * 
+                  sizeof(l->rows[0])));
+     }
+     l->n_rows--;
+ }
+ 
+ afs_cred_row * 
+ afs_cred_get_new_row(afs_cred_list * l) {
+     afs_cred_row * r;
+ 
+     afs_cred_assert_rows(l, l->n_rows + 1);
+     r = &(l->rows[l->n_rows]);
+     l->n_rows++;
+ 
+     ZeroMemory(r, sizeof(*r));
+ 
+     return r;
+ }
+ 
+ afs_cred_row *
+ afs_cred_add_row_from_cred(afs_cred_list * l,
+                            khm_handle cred) {
+     khm_int32 rv;
+     afs_cred_row * row;
+     khm_size cb;
+     wchar_t cell[MAXCELLCHARS];
+     int i;
+ 
+     cb = sizeof(cell);
+     rv = kcdb_cred_get_attr(cred,
+                             afs_attr_cell,
+                             NULL,
+                             cell,
+                             &cb);
+ #ifdef DEBUG
+     assert(rv == KHM_ERROR_SUCCESS && cb != 0);
+ #endif
+ 
+     /* check if we already have the cell listed. */
+     for (i=0; i<l->n_rows; i++) {
+         if (!_wcsicmp(l->rows[i].cell, cell))
+             return &l->rows[i];
+     }
+ 
+     row = afs_cred_get_new_row(l);
+ 
+     row->cell = PMALLOC(cb);
+     StringCbCopy(row->cell, cb, cell);
+ 
+     cb = sizeof(row->method);
+     rv = kcdb_cred_get_attr(cred,
+                             afs_attr_method,
+                             NULL,
+                             &row->method,
+                             &cb);
+ 
+     if (KHM_FAILED(rv)) {
+         row->method = AFS_TOKEN_AUTO;
+         row->realm = NULL;
+         return row;
+     }
+ 
+     rv = kcdb_cred_get_attr(cred,
+                             afs_attr_realm,
+                             NULL,
+                             NULL,
+                             &cb);
+ 
+     if (rv == KHM_ERROR_TOO_LONG && cb > sizeof(wchar_t)) {
+         row->realm = PMALLOC(cb);
+ #ifdef DEBUG
+         assert(row->realm);
+ #endif
+         rv = kcdb_cred_get_attr(cred,
+                                 afs_attr_realm,
+                                 NULL,
+                                 row->realm,
+                                 &cb);
+ 
+         if (KHM_FAILED(rv)) {
+             if (row->realm)
+                 PFREE(row->realm);
+             row->realm = NULL;
+         }
+     } else {
+         row->realm = NULL;
+     }
+ 
+     return row;
+ }
+ 
+ khm_int32 KHMAPI
+ afs_cred_add_cred_proc(khm_handle cred, void * rock) {
+     afs_cred_list * l = (afs_cred_list *) rock;
+     khm_int32 t;
+ 
+     if (KHM_FAILED(kcdb_cred_get_type(cred, &t)) ||
+         t != afs_credtype_id)
+         return KHM_ERROR_SUCCESS;
+ 
+     afs_cred_add_row_from_cred(l, cred);
+ 
+     return KHM_ERROR_SUCCESS;
+ }
+ 
+ void
+ afs_cred_get_context_creds(afs_cred_list *l,
+                            khui_action_context * ctx) {
+     khm_handle credset = NULL;
+ 
+     if (KHM_FAILED(kcdb_credset_create(&credset)))
+         return;
+ 
+     if (KHM_FAILED(kcdb_credset_extract_filtered(credset,
+                                                  NULL,
+                                                  khui_context_cursor_filter,
+                                                  (void *) ctx)))
+         goto _cleanup;
+ 
+     kcdb_credset_apply(credset,
+                        afs_cred_add_cred_proc,
+                        (void *) l);
+ 
+  _cleanup:
+     if (credset)
+         kcdb_credset_delete(credset);
+ }
+ 
+ khm_int32 KHMAPI
+ afs_get_id_creds_apply_proc(khm_handle cred, void * rock) {
+     khm_int32 t;
+     afs_ident_token_set * ts;
+     afs_cred_list * l;
+     khm_handle ident;
+     wchar_t cell[MAXCELLCHARS];
+     khm_size cb;
+     int i;
+     khm_int32 cflags = 0;
+ 
+     ts = (afs_ident_token_set *) rock;
+     l = ts->l;
+ 
+     kcdb_cred_get_type(cred, &t);
+     if (t != afs_credtype_id)
+         return KHM_ERROR_SUCCESS;
+ 
+     cb = sizeof(cell);
+     if (KHM_FAILED(kcdb_cred_get_attr(cred, afs_attr_cell,
+                                       NULL,
+                                       cell, &cb)))
+         return KHM_ERROR_SUCCESS;
+ 
+     kcdb_cred_get_flags(cred, &cflags);
+ 
+     kcdb_cred_get_identity(cred, &ident);
+ 
+     if (kcdb_identity_is_equal(ident, ts->ident)) {
+ 
+         for (i=0; i < l->n_rows; i++) {
+             if (!_wcsicmp(l->rows[i].cell, cell)) {
+                 khm_int32 method;
+ 
+                 /* if the token exists, then these are implied */
+                 l->rows[i].flags =
+                     DLGROW_FLAG_EXISTS |
+                     DLGROW_FLAG_CHECKED |
+                     DLGROW_FLAG_VALID;
+ 
+                 if (cflags & KCDB_CRED_FLAG_EXPIRED)
+                     l->rows[i].flags |= DLGROW_FLAG_EXPIRED;
+ 
+                 if (ts->update_info) {
+                     wchar_t realm[KHUI_MAXCCH_NAME];
+ 
+                     cb = sizeof(method);
+                     if (KHM_SUCCEEDED
+                         (kcdb_cred_get_attr(cred, afs_attr_method,
+                                             NULL,
+                                             &method, &cb)) &&
+                         afs_is_valid_method_id(method))
+                         l->rows[i].method = method;
+ 
+                     cb = sizeof(realm);
+                     if (KHM_SUCCEEDED
+                         (kcdb_cred_get_attr(cred, afs_attr_realm,
+                                             NULL,
+                                             realm, &cb)) &&
+                         cb > sizeof(wchar_t)) {
+ 
+                         if (l->rows[i].realm)
+                             PFREE(l->rows[i].realm);
+                         l->rows[i].realm = PMALLOC(cb);
+                         StringCbCopy(l->rows[i].realm,
+                                      cb,
+                                      realm);
+                     }
+                 }
+                 break;
+             }
+         }
+ 
+         /* not found? add! */
+         if (i >= l->n_rows && ts->add_new) {
+             afs_cred_row * r;
+ 
+             r = afs_cred_add_row_from_cred(l, cred);
+ 
+             r->flags = DLGROW_FLAG_VALID | DLGROW_FLAG_CHECKED |
+                 DLGROW_FLAG_EXISTS;
+ 
+             if (cflags & KCDB_CRED_FLAG_EXPIRED)
+                 r->flags |= DLGROW_FLAG_EXPIRED;
+         }
+ 
+     } else {                    /* different identities */
+ 
+         for (i=0; i < l->n_rows; i++) {
+             if (!_wcsicmp(l->rows[i].cell, cell)) {
+                 l->rows[i].flags =
+                     DLGROW_FLAG_NOTOWNED | DLGROW_FLAG_EXISTS |
+                     DLGROW_FLAG_VALID | DLGROW_FLAG_CHECKED;
+                 if (cflags & KCDB_CRED_FLAG_EXPIRED)
+                     l->rows[i].flags |= DLGROW_FLAG_EXPIRED;
+             }
+         }
+ 
+     }
+ 
+     kcdb_identity_release(ident);
+ 
+     return KHM_ERROR_SUCCESS;
+ }
+ 
+ void
+ afs_remove_token_from_identities(wchar_t * cell) {
+     wchar_t * idents = NULL;
+     wchar_t * t;
+     khm_size cb_id;
+     khm_size n_id = 0;
+ 
+     do {
+         if (kcdb_identity_enum(KCDB_IDENT_FLAG_CONFIG,
+                                KCDB_IDENT_FLAG_CONFIG,
+                                NULL,
+                                &cb_id,
+                                &n_id) != KHM_ERROR_TOO_LONG ||
+             n_id == 0) {
+             if (idents)
+                 PFREE(idents);
+             return;
+         }
+ 
+         if (idents)
+             PFREE(idents);
+         idents = PMALLOC(cb_id);
+ 
+         if (kcdb_identity_enum(KCDB_IDENT_FLAG_CONFIG,
+                                KCDB_IDENT_FLAG_CONFIG,
+                                idents,
+                                &cb_id,
+                                &n_id) == KHM_ERROR_SUCCESS)
+             break;
+     } while(TRUE);
+ 
+     for (t=idents;
+          t && *t;
+          t = multi_string_next(t)) {
+ 
+         khm_handle h_id = NULL;
+         khm_handle csp_ident = NULL;
+         khm_handle csp_afs = NULL;
+         khm_size cb;
+         wchar_t vbuf[1024];
+         wchar_t * tbuf = NULL;
+ 
+         kcdb_identity_create(t, 0, &h_id);
+         if (h_id == NULL) {
+ #ifdef DEBUG
+             assert(FALSE);
+ #endif
+             continue;
+         }
+ 
+         if (KHM_FAILED(kcdb_identity_get_config(h_id, 0, &csp_ident)))
+             goto _cleanup_loop;
+ 
+         if (KHM_FAILED(khc_open_space(csp_ident, CSNAME_AFSCRED,
+                                       0, &csp_afs)))
+             goto _cleanup_loop;
+ 
+         if (khc_read_multi_string(csp_afs, L"Cells", NULL, &cb)
+             != KHM_ERROR_TOO_LONG)
+             goto _cleanup_loop;
+ 
+         if (cb < sizeof(vbuf))
+             tbuf = vbuf;
+         else
+             tbuf = PMALLOC(cb);
+ 
+         if (khc_read_multi_string(csp_afs, L"Cells", tbuf, &cb)
+             != KHM_ERROR_SUCCESS)
+             goto _cleanup_loop;
+ 
+         if (multi_string_find(tbuf, cell, 0) == NULL)
+             goto _cleanup_loop;
+ 
+         multi_string_delete(tbuf, cell, 0);
+ 
+         khc_write_multi_string(csp_afs, L"Cells", tbuf);
+ 
+     _cleanup_loop:
+         kcdb_identity_release(h_id);
+         if (csp_ident)
+             khc_close_space(csp_ident);
+         if (csp_afs)
+             khc_close_space(csp_afs);
+         if (tbuf && tbuf != vbuf)
+             PFREE(tbuf);
+     }
+ 
+     if (idents)
+         PFREE(idents);
+ }
+ 
+ khm_boolean
+ afs_check_add_token_to_identity(wchar_t * cell, khm_handle ident,
+                                 khm_handle * ident_conflict) {
+     wchar_t * idents = NULL;
+     wchar_t * t;
+     khm_size cb_id;
+     khm_size n_id = 0;
+     khm_boolean ok_to_add = TRUE;
+ 
+     /* check if this cell is listed for any other identity. */
+ 
+     do {
+         if (kcdb_identity_enum(KCDB_IDENT_FLAG_CONFIG,
+                                KCDB_IDENT_FLAG_CONFIG,
+                                NULL,
+                                &cb_id,
+                                &n_id) != KHM_ERROR_TOO_LONG ||
+             n_id == 0) {
+             if (idents)
+                 PFREE(idents);
+             return TRUE;
+         }
+ 
+         if (idents)
+             PFREE(idents);
+         idents = PMALLOC(cb_id);
+ 
+         if (kcdb_identity_enum(KCDB_IDENT_FLAG_CONFIG,
+                                KCDB_IDENT_FLAG_CONFIG,
+                                idents,
+                                &cb_id,
+                                &n_id) == KHM_ERROR_SUCCESS)
+             break;
+     } while(TRUE);
+ 
+     for (t=idents;
+          ok_to_add && t && *t;
+          t = multi_string_next(t)) {
+ 
+         khm_handle h_id = NULL;
+         khm_handle csp_ident = NULL;
+         khm_handle csp_afs = NULL;
+         khm_size cb;
+         wchar_t vbuf[1024];
+         wchar_t * tbuf = NULL;
+ 
+         kcdb_identity_create(t, 0, &h_id);
+         if (h_id == NULL) {
+ #ifdef DEBUG
+             assert(FALSE);
+ #endif
+             continue;
+         }
+ 
+         if (kcdb_identity_is_equal(h_id, ident)) {
+             kcdb_identity_release(h_id);
+             continue;
+         }
+ 
+         if (KHM_FAILED(kcdb_identity_get_config(h_id, 0, &csp_ident)))
+             goto _cleanup_loop;
+ 
+         if (KHM_FAILED(khc_open_space(csp_ident, CSNAME_AFSCRED,
+                                       0, &csp_afs)))
+             goto _cleanup_loop;
+ 
+         if (khc_read_multi_string(csp_afs, L"Cells", NULL, &cb)
+             != KHM_ERROR_TOO_LONG)
+             goto _cleanup_loop;
+ 
+         if (cb < sizeof(vbuf))
+             tbuf = vbuf;
+         else
+             tbuf = PMALLOC(cb);
+ 
+         if (khc_read_multi_string(csp_afs, L"Cells", tbuf, &cb)
+             != KHM_ERROR_SUCCESS)
+             goto _cleanup_loop;
+ 
+         if (multi_string_find(tbuf, cell, 0) == NULL)
+             goto _cleanup_loop;
+ 
+         /* we found another identity which gets tokens for the
+            same cell */
+ 
+         ok_to_add = FALSE;
+ 
+         if (ident_conflict) {
+             *ident_conflict = h_id;
+             kcdb_identity_hold(h_id);
+         }
+ 
+     _cleanup_loop:
+         kcdb_identity_release(h_id);
+         if (csp_ident)
+             khc_close_space(csp_ident);
+         if (csp_afs)
+             khc_close_space(csp_afs);
+         if (tbuf && tbuf != vbuf)
+             PFREE(tbuf);
+     }
+ 
+     if (idents)
+         PFREE(idents);
+ 
+     return ok_to_add;
+ }
+ 
+ void 
+ afs_cred_get_identity_creds(afs_cred_list * l, 
+                             khm_handle ident,
+                             khm_boolean * penabled) {
+     khm_handle h_id = NULL;
+     khm_handle h_afs = NULL;
+     khm_handle h_cells = NULL;  /* per identity cells space */
+     khm_handle h_gcells = NULL; /* global cells space */
+     khm_boolean load_defs = TRUE;
+     khm_size cbi;
+     wchar_t * ms = NULL;
+     wchar_t * s = NULL;
+     afs_ident_token_set ts;
+     khm_int32 t;
+ 
+     if (penabled)
+         *penabled = TRUE;
+ 
+     afs_cred_flush_rows(l);
+ 
+     kcdb_identity_get_config(ident, 0, &h_id);
+     if(!h_id) 
+         goto _done_config;
+ 
+     if(KHM_FAILED(khc_open_space(h_id, CSNAME_AFSCRED, 
+                                  0, &h_afs)))
+         goto _done_config;
+ 
+     if (penabled) {
+         t = 1;
+         if (KHM_FAILED(khc_read_int32(h_afs, L"AFSEnabled", &t)))
+             khc_read_int32(csp_params, L"AFSEnabled", &t);
+         *penabled = !!t;
+     }
+ 
+     if(KHM_FAILED(khc_open_space(h_afs, L"Cells", 
+                                  0, &h_cells)))
+         goto _done_config;
+ 
+     if(khc_read_multi_string(h_afs, L"Cells", NULL, &cbi) != 
+        KHM_ERROR_TOO_LONG)
+         goto _done_config;
+ 
+     load_defs = FALSE;
+ 
+     ms = PMALLOC(cbi);
+     ZeroMemory(ms, cbi);
+ 
+     khc_read_multi_string(h_afs, L"Cells", ms, &cbi);
+ 
+     s = ms;
+     for(s = ms; s && *s; s = multi_string_next(s)) {
+         afs_cred_row * r;
+         size_t cb;
+         khm_handle h_cell = NULL;
+ 
+         /* is this a valid cell name? */
+         if(FAILED(StringCbLength(s, MAXCELLCHARS, &cb)))
+             continue;
+         cb += sizeof(wchar_t);
+ 
+         r = afs_cred_get_new_row(l);
+ 
+         r->cell = PMALLOC(cb);
+         StringCbCopy(r->cell, cb, s);
+ 
+         r->realm = NULL;
+         r->method = 0;
+         r->flags = 0;
+ 
+         if(KHM_SUCCEEDED(khc_open_space(h_cells, s, 
+                                         0, &h_cell))) {
+             khm_int32 i;
+             wchar_t wname[KHUI_MAXCCH_NAME];
+             khm_size cb;
+ 
+             if(khc_read_string(h_cell, L"Realm", 
+                                NULL, &cbi) == 
+                KHM_ERROR_TOO_LONG &&
+                cbi > sizeof(wchar_t)) {
+ 
+                 r->realm = PMALLOC(cbi);
+                 khc_read_string(h_cell, L"Realm", r->realm, &cbi);
+             }
+ 
+             i = AFS_TOKEN_AUTO;
+ 
+             cb = sizeof(wname);
+             if (KHM_SUCCEEDED(khc_read_string(h_cell, L"MethodName",
+                                               wname, &cb))) {
+ 
+                 r->method = afs_get_method_id(wname);
+ 
+                 /* remove the deprecated value if it is present. */
+                 khc_remove_value(h_cell, L"Method", 0);
+ 
+             } else if (KHM_SUCCEEDED(khc_read_int32(h_cell, 
+                                                     L"Method", &i))) {
+                 /* the Method property is deprecated.  We detect and
+                    correct this whenever possible. */
+ 
+                 if (!afs_is_valid_method_id(i))
+                     i = AFS_TOKEN_AUTO;
+ 
+                 r->method = i;
+ 
+                 afs_get_method_name(i, wname, sizeof(wname));
+ 
+                 khc_write_string(h_cell, L"MethodName",
+                                  wname);
+ 
+                 khc_remove_value(h_cell, L"Method", 0);
+             }
+ 
+             khc_close_space(h_cell);
+         }
+     }
+ 
+     if(ms) {
+         PFREE(ms);
+         ms = NULL;
+     }
+ 
+  _done_config:
+ 
+     if (load_defs) {
+         /* We want to load defaults */
+         char buf[MAXCELLCHARS];
+         wchar_t wbuf[MAXCELLCHARS];
+         wchar_t wmethod[KHUI_MAXCCH_NAME];
+         wchar_t * defcells;
+         khm_size cb_defcells;
+         afs_cred_row * r;
+         khm_size sz;
+ 
+         khc_open_space(csp_params, L"Cells", 0, &h_gcells);
+ 
+         if(!cm_GetRootCellName(buf)) {
+             AnsiStrToUnicode(wbuf, sizeof(wbuf), buf);
+ 
+             if (afs_check_add_token_to_identity(wbuf, ident, NULL)) {
+                 khm_handle h_cell = NULL;
+ 
+                 r = afs_cred_get_new_row(l);
+ 
+                 StringCbLength(wbuf, sizeof(wbuf), &sz);
+                 sz += sizeof(wchar_t);
+ 
+                 r->cell = PMALLOC(sz);
+                 StringCbCopy(r->cell, sz, wbuf);
+ 
+                 if (h_gcells &&
+                     KHM_SUCCEEDED(khc_open_space(h_gcells, wbuf, 0, &h_cell))) {
+                     khm_size cb;
+ 
+                     cb = sizeof(wmethod);
+                     if (KHM_SUCCEEDED(khc_read_string(h_cell, L"MethodName", wmethod, &cb))) {
+                         r->method = afs_get_method_id(wmethod);
+                     } else {
+                         r->method = AFS_TOKEN_AUTO;
+                     }
+ 
+                     cb = sizeof(wbuf);
+                     if (KHM_SUCCEEDED(khc_read_string(h_cell, L"Realm", wbuf, &cb))) {
+                         r->realm = PMALLOC(cb);
+                         StringCbCopy(r->realm, cb, wbuf);
+                     } else {
+                         r->realm = NULL;
+                     }
+ 
+                     khc_close_space(h_cell);
+ 
+                 } else {
+                     r->realm = NULL;
+                     r->method = AFS_TOKEN_AUTO;
+                 }
+ 
+                 r->flags = 0;
+             }
+         }
+ 
+         if (khc_read_multi_string(csp_params, L"DefaultCells",
+                                   NULL, &cb_defcells) == KHM_ERROR_TOO_LONG &&
+             cb_defcells > sizeof(wchar_t) * 2) {
+             wchar_t * c_cell;
+ 
+             defcells = PMALLOC(cb_defcells);
+             if (defcells == NULL)
+                 goto _done_defaults;
+ 
+             if (KHM_FAILED(khc_read_multi_string(csp_params, L"DefaultCells",
+                                                  defcells, &cb_defcells))) {
+                 PFREE(defcells);
+                 goto _done_defaults;
+             }
+ 
+             for (c_cell = defcells;
+                  c_cell && *c_cell;
+                  c_cell = multi_string_next(c_cell)) {
+ 
+                 khm_size cb;
+                 int i;
+                 khm_handle h_cell = NULL;
+                 afs_cred_row * r;
+ 
+                 if (FAILED(StringCbLength(c_cell, (MAXCELLCHARS + 1) * sizeof(wchar_t),
+                                           &cb)))
+                     continue;
+                 cb += sizeof(wchar_t);
+ 
+                 for (i=0; i < l->n_rows; i++) {
+                     if (!_wcsicmp(l->rows[i].cell, c_cell))
+                         break;
+                 }
+ 
+                 if (i < l->n_rows)
+                     continue;
+ 
+                 r = afs_cred_get_new_row(l);
+ 
+                 r->cell = PMALLOC(cb);
+                 StringCbCopy(r->cell, cb, c_cell);
+ 
+                 if (h_gcells &&
+                     KHM_SUCCEEDED(khc_open_space(h_gcells, c_cell, 0, &h_cell))) {
+ 
+                     cb = sizeof(wmethod);
+                     if (KHM_SUCCEEDED(khc_read_string(h_cell, L"MethodName", wmethod, &cb))) {
+                         r->method = afs_get_method_id(wmethod);
+                     } else {
+                         r->method = AFS_TOKEN_AUTO;
+                     }
+ 
+                     cb = sizeof(wbuf);
+                     if (KHM_SUCCEEDED(khc_read_string(h_cell, L"Realm", wbuf, &cb))) {
+                         r->realm = PMALLOC(cb);
+                         StringCbCopy(r->realm, cb, wbuf);
+                     } else {
+                         r->realm = NULL;
+                     }
+ 
+                     khc_close_space(h_cell);
+                 } else {
+                     r->realm = NULL;
+                     r->method = AFS_TOKEN_AUTO;
+                 }
+ 
+                 r->flags = 0;
+             }
+ 
+             PFREE(defcells);
+         }
+     }
+ 
+  _done_defaults:
+ 
+     ts.ident = ident;
+     ts.l = l;
+     ts.add_new = TRUE;
+     ts.update_info = FALSE;
+ 
+     kcdb_credset_apply(NULL, afs_get_id_creds_apply_proc,
+                        &ts);
+ 
+     if(h_id)
+         khc_close_space(h_id);
+     if(h_afs)
+         khc_close_space(h_afs);
+     if(h_cells)
+         khc_close_space(h_cells);
+     if(h_gcells)
+         khc_close_space(h_gcells);
+ }
+ 
+ void 
+ nc_dlg_enable(HWND hwnd, BOOL enable) {
+     if(enable) {
+         SendDlgItemMessage(hwnd, IDC_NCAFS_OBTAIN, BM_SETCHECK, 
+                            BST_CHECKED, 0);
+     } else {
+         SendDlgItemMessage(hwnd, IDC_NCAFS_OBTAIN, BM_SETCHECK, 
+                            BST_UNCHECKED, 0);
+     }
+ 
+     EnableWindow(GetDlgItem(hwnd,IDC_NCAFS_CELL), enable);
+     EnableWindow(GetDlgItem(hwnd,IDC_NCAFS_REALM), enable);
+     EnableWindow(GetDlgItem(hwnd,IDC_NCAFS_METHOD), enable);
+     EnableWindow(GetDlgItem(hwnd,IDC_NCAFS_TOKENLIST), enable);
+     EnableWindow(GetDlgItem(hwnd,IDC_NCAFS_ADD_TOKEN), enable);
+     EnableWindow(GetDlgItem(hwnd,IDC_NCAFS_DELETE_TOKEN), enable);
+ }
+ 
+ void 
+ nc_dlg_show_tooltip(HWND hwnd, 
+                     UINT_PTR id, 
+                     LPWSTR msg, 
+                     LPWSTR title, 
+                     int type, 
+                     int x, 
+                     int y)
+ {
+     afs_dlg_data * d;
+     TOOLINFO ti;
+ 
+     d = (afs_dlg_data *)(LONG_PTR) GetWindowLongPtr(hwnd, DWLP_USER);
+ 
+     ZeroMemory(&ti, sizeof(ti));
+     ti.cbSize = sizeof(ti);
+     ti.hwnd = hwnd;
+     ti.uId = id;
+     SendMessage(d->tooltip, TTM_GETTOOLINFO, 0, (LPARAM) &ti);
+ 
+     ti.hinst = hResModule;
+     ti.lpszText = msg;
+ 
+     SendMessage(d->tooltip, TTM_SETTOOLINFO, 0, (LPARAM) &ti);
+ 
+     if(IS_INTRESOURCE(title)) {
+         wchar_t wbuf[1024];
+         UINT resid;
+ 
+         resid = (UINT)(UINT_PTR) title;
+ 
+         LoadString(hResModule, resid, wbuf, ARRAYLENGTH(wbuf));
+         SendMessage(d->tooltip, TTM_SETTITLE, type, (LPARAM) wbuf);
+     } else
+         SendMessage(d->tooltip, TTM_SETTITLE, type, (LPARAM) title);
+ 
+     SendMessage(d->tooltip, TTM_TRACKACTIVATE, TRUE, (LPARAM) &ti);
+     SendMessage(d->tooltip, TTM_TRACKPOSITION, 0, (LPARAM) MAKELONG(x,y));
+ 
+     d->tooltip_visible = TRUE;
+ 
+     SetTimer(hwnd, DLG_TOOLTIP_TIMER_ID, DLG_TOOLTIP_TIMEOUT, NULL);
+ }
+ 
+ void 
+ nc_dlg_hide_tooltip(HWND hwnd, UINT_PTR id)
+ {
+     TOOLINFO ti;
+     afs_dlg_data * d;
+ 
+     d = (afs_dlg_data *)(LONG_PTR) GetWindowLongPtr(hwnd, DWLP_USER);
+ 
+     if(!d->tooltip_visible)
+         return;
+ 
+     ZeroMemory(&ti, sizeof(ti));
+     ti.cbSize = sizeof(ti);
+     ti.hwnd = hwnd;
+     ti.uId = id;
+ 
+     SendMessage(d->tooltip, TTM_TRACKACTIVATE, FALSE, (LPARAM) &ti);
+     d->tooltip_visible = FALSE;
+ }
+ 
+ void 
+ afs_dlg_update_rows(HWND hwnd, afs_dlg_data * d) {
+     HWND hwlist;
+     LVITEM lvi;
+     wchar_t wauto[256];
+     int i;
+ 
+     CheckDlgButton(hwnd, IDC_NCAFS_OBTAIN,
+                    (d->afs_enabled)? BST_CHECKED: BST_UNCHECKED);
+ 
+     hwlist = GetDlgItem(hwnd, IDC_NCAFS_TOKENLIST);
+ 
+     ListView_DeleteAllItems(hwlist);
+ 
+     if(d->creds.n_rows == 0)
+         return;
+ 
+     LoadString(hResModule, IDS_NC_AUTO, wauto, ARRAYLENGTH(wauto));
+ 
+     for(i=0; i < d->creds.n_rows; i++) {
+         wchar_t wbuf[256];
+         int flags;
+ 
+         ZeroMemory(&lvi, sizeof(lvi));
+ 
+         lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE;
+         lvi.iItem = d->creds.n_rows + 1;
+ 
+         lvi.stateMask = LVIS_STATEIMAGEMASK;
+         flags = d->creds.rows[i].flags;
+         if ((flags & DLGROW_FLAG_EXISTS) &&
+             (flags & DLGROW_FLAG_NOTOWNED)) {
+             lvi.state = INDEXTOSTATEIMAGEMASK(d->idx_bad_token);
+         } else if ((flags & DLGROW_FLAG_EXISTS)) {
+             lvi.state = INDEXTOSTATEIMAGEMASK(d->idx_existing_token);
+         } else {
+             lvi.state = INDEXTOSTATEIMAGEMASK(d->idx_new_token);
+         }
+ 
+         lvi.lParam = (LPARAM) i;
+ 
+         lvi.iSubItem = NCAFS_IDX_CELL;
+         lvi.pszText = d->creds.rows[i].cell;
+ 
+         lvi.iItem = ListView_InsertItem(hwlist, &lvi);
+ 
+         lvi.mask = LVIF_TEXT; /* subitems dislike lParam */
+         lvi.iSubItem = NCAFS_IDX_REALM;
+         if(d->creds.rows[i].realm != NULL)
+             lvi.pszText = d->creds.rows[i].realm;
+         else
+             lvi.pszText = wauto;
+         ListView_SetItem(hwlist, &lvi);
+ 
+         lvi.iSubItem = NCAFS_IDX_METHOD;
+         afs_method_describe(d->creds.rows[i].method,
+                             KCDB_TS_SHORT,
+                             wbuf, sizeof(wbuf));
+         lvi.pszText = wbuf;
+ 
+         ListView_SetItem(hwlist, &lvi);
+     }
+ }
+ 
+ void 
+ nc_dlg_del_token(HWND hwnd) {
+     afs_dlg_data * d;
+     khui_new_creds_by_type * nct;
+ 
+     d = (afs_dlg_data *)(LONG_PTR) GetWindowLongPtr(hwnd, DWLP_USER);
+ 
+     if (d->nc)
+         khui_cw_find_type(d->nc, afs_credtype_id, &nct);
+ 
+     if(ListView_GetSelectedCount(GetDlgItem(hwnd, IDC_NCAFS_TOKENLIST)) == 0) {
+         wchar_t cell[KCDB_MAXCCH_NAME];
+         int i;
+ 
+         /* nothing is selected in the list view */
+         /* we delete the row that matches the current contents of the
+         cell edit control */
+         cell[0] = 0;
+         GetDlgItemText(hwnd, IDC_NCAFS_CELL, cell, ARRAYLENGTH(cell));
+         for(i=0; i<d->creds.n_rows; i++) {
+             if(!_wcsicmp(d->creds.rows[i].cell, cell)) {
+                 /* found it */
+                 afs_cred_delete_row(&d->creds, i);
+                 afs_dlg_update_rows(hwnd, d);
+                 d->dirty = TRUE;
+                 break;
+             }
+         }
+     } else {
+         /* something is selected in the token list view */
+         /* we delete that */
+         HWND hw;
+         LVITEM lvi;
+         int idx;
+         int row;
+         BOOL deleted = FALSE;
+ 
+         hw = GetDlgItem(hwnd, IDC_NCAFS_TOKENLIST);
+         idx = -1;
+         do {
+             idx = ListView_GetNextItem(hw, idx, LVNI_SELECTED);
+             if(idx >= 0) {
+                 ZeroMemory(&lvi, sizeof(lvi));
+                 lvi.iItem = idx;
+                 lvi.iSubItem = 0;
+                 lvi.mask = LVIF_PARAM;
+                 if(!ListView_GetItem(hw, &lvi))
+                     continue;
+                 row = (int) lvi.lParam;
+                 if(row >= 0 && row < d->creds.n_rows) {
+                     d->creds.rows[row].flags |= DLGROW_FLAG_DELETED;
+                     deleted = TRUE;
+                 }
+             }
+         } while(idx != -1);
+ 
+         if(deleted) {
+             for(idx = 0; idx < d->creds.n_rows; idx ++) {
+                 if(d->creds.rows[idx].flags & DLGROW_FLAG_DELETED) {
+                     afs_cred_delete_row(&d->creds, idx);
+                     idx--; /* we have to look at the current item again */
+                 }
+             }
+ 
+             d->dirty = TRUE;
+             afs_dlg_update_rows(hwnd, d);
+         }
+     }
+ 
+     if (d->nc)
+         SendMessage(d->nc->hwnd, KHUI_WM_NC_NOTIFY, 
+                     MAKEWPARAM(0, WMNC_UPDATE_CREDTEXT), 0);
+     else if (d->config_dlg && d->dirty)
+         khui_cfg_set_flags_inst(&d->cfg, KHUI_CNFLAG_MODIFIED,
+                                 KHUI_CNFLAG_MODIFIED);
+ }
+ 
+ void 
+ nc_dlg_add_token(HWND hwnd) {
+     afs_dlg_data * d;
+     afs_cred_row * prow;
+     afs_cred_row trow;
+     khui_new_creds_by_type * nct;
+     wchar_t buf[256];
+     int idx;
+     size_t n;
+     size_t cb;
+     int i;
+     BOOL new_row = FALSE;
+     khm_handle ident = NULL;
+ 
+     d = (afs_dlg_data *)(LONG_PTR) GetWindowLongPtr(hwnd, DWLP_USER);
+ 
+     if (d->nc)
+         khui_cw_find_type(d->nc, afs_credtype_id, &nct);
+     else
+         nct = NULL;
+ 
+     if((n = SendDlgItemMessage(hwnd, IDC_NCAFS_CELL, WM_GETTEXT, 
+                                (WPARAM) ARRAYLENGTH(buf), (LPARAM) buf)) 
+        == 0)
+     {
+         /* probably should indicate that user should type something */
+         RECT r;
+         GetWindowRect(GetDlgItem(hwnd, IDC_NCAFS_CELL), &r);
+         nc_dlg_show_tooltip(hwnd, 
+                             0, 
+                             MAKEINTRESOURCE(IDS_NC_TT_NO_CELL), 
+                             MAKEINTRESOURCE(IDS_NC_TT_CANT_ADD), 
+                             2, (r.left + r.right)/ 2, r.bottom);
+         return;
+     }
+ 
+     if(n != wcsspn(buf, AFS_VALID_CELL_CHARS)) {
+         RECT r;
+         GetWindowRect(GetDlgItem(hwnd, IDC_NCAFS_CELL), &r);
+         nc_dlg_show_tooltip(hwnd, 
+                             0, 
+                             MAKEINTRESOURCE(IDS_NC_TT_MALFORMED_CELL), 
+                             MAKEINTRESOURCE(IDS_NC_TT_CANT_ADD), 
+                             2, (r.left + r.right)/2, r.bottom);
+         return;
+     }
+ 
+     /* check if this is already listed */
+     for(i=0;i<d->creds.n_rows;i++) {
+         if(!_wcsicmp(buf, d->creds.rows[i].cell))
+             break;
+     }
+ 
+     if(i < d->creds.n_rows) {
+         new_row = FALSE;
+ 
+         prow = &(d->creds.rows[i]);
+     } else {
+         new_row = TRUE;
+         prow = NULL;
+     }
+ 
+     ZeroMemory(&trow, sizeof(trow));
+ 
+     cb = (n+1) * sizeof(wchar_t);
+     trow.cell = PMALLOC(cb);
+     StringCbCopy(trow.cell, cb, buf);
+ 
+     /* now for the realm */
+     do {
+         idx = (int) SendDlgItemMessage(hwnd, IDC_NCAFS_REALM, 
+                                        CB_GETCURSEL, 0, 0);
+         if(idx != CB_ERR) {
+             int lp;
+             lp = (int) SendDlgItemMessage(hwnd, IDC_NCAFS_REALM, 
+                                           CB_GETITEMDATA, idx, 0);
+             if(lp != CB_ERR && lp) /* this is the 'determine realm
+                                       automatically' item */
+             {
+                 trow.realm = NULL;
+                 break;
+             }
+         }
+ 
+         if((n = SendDlgItemMessage(hwnd, IDC_NCAFS_REALM, WM_GETTEXT, 
+                                    ARRAYLENGTH(buf), (LPARAM) buf)) == 0) {
+             RECT r;
+             GetWindowRect(GetDlgItem(hwnd, IDC_NCAFS_REALM), &r);
+             nc_dlg_show_tooltip(hwnd, 
+                                 0, 
+                                 MAKEINTRESOURCE(IDS_NC_TT_NO_REALM), 
+                                 MAKEINTRESOURCE((new_row)?
+                                                 IDS_NC_TT_CANT_ADD:
+                                                 IDS_NC_TT_CANT_UPDATE),
+                                 2, (r.left + r.right)/2, r.bottom);
+             goto _error_exit;
+         }
+ 
+         if(n != wcsspn(buf, AFS_VALID_REALM_CHARS)) {
+             RECT r;
+             GetWindowRect(GetDlgItem(hwnd, IDC_NCAFS_REALM), &r);
+             nc_dlg_show_tooltip(hwnd,
+                                 0, 
+                                 MAKEINTRESOURCE(IDS_NC_TT_MALFORMED_REALM),
+                                 MAKEINTRESOURCE((new_row)?
+                                                 IDS_NC_TT_CANT_ADD:
+                                                 IDS_NC_TT_CANT_UPDATE), 
+                                 2, (r.left + r.right)/2, r.bottom);
+             goto _error_exit;
+         }
+ 
+         cb = (n+1) * sizeof(wchar_t);
+         trow.realm = PMALLOC(cb);
+         StringCbCopy(trow.realm, cb, buf);
+ 
+     } while(FALSE);
+ 
+     idx = (int)SendDlgItemMessage(hwnd, IDC_NCAFS_METHOD, 
+                                   CB_GETCURSEL, 0, 0);
+     if (idx != CB_ERR) {
+         trow.method = (afs_tk_method)
+             SendDlgItemMessage(hwnd, IDC_NCAFS_METHOD, CB_GETITEMDATA, 
+                                idx, 0);
+     } else {
+         trow.method = AFS_TOKEN_AUTO;
+     }
+ 
+     if (d->nc &&
+         d->nc->n_identities > 0 &&
+         d->nc->identities[0]) {
+         
+         ident = d->nc->identities[0];
+ 
+     } else if (d->ident) {
+ 
+         ident = d->ident;
+         
+     }
+ 
+     if(new_row) {
+         khm_boolean ok_to_add = TRUE;
+ 
+         if (ident) {
+             khm_handle id_conf = NULL;
+ 
+             ok_to_add =
+                 afs_check_add_token_to_identity(trow.cell,
+                                                 ident,
+                                                 &id_conf);
+ 
+             if (!ok_to_add) {
+ #if KH_VERSION_API >= 5
+                 khui_alert * a;
+                 wchar_t wbuf[512];
+                 wchar_t wfmt[128];
+                 wchar_t widname[KCDB_IDENT_MAXCCH_NAME];
+                 khm_size cb;
+ 
+ #ifdef DEBUG
+                 assert(id_conf);
+ #endif
+                 khui_alert_create_empty(&a);
+ 
+                 cb = sizeof(widname);
+                 kcdb_identity_get_name(id_conf, widname, &cb);
+ 
+                 LoadString(hResModule, IDS_NC_TT_CONFLICT,
+                            wfmt, ARRAYLENGTH(wfmt));
+                 StringCbPrintf(wbuf, sizeof(wbuf),
+                                wfmt, trow.cell, widname);
+                 khui_alert_set_message(a, wbuf);
+ 
+                 LoadString(hResModule, IDS_NC_TT_PROBLEM,
+                            wbuf, ARRAYLENGTH(wbuf));
+                 khui_alert_set_title(a, wbuf);
+ 
+                 khui_alert_add_command(a, KHUI_PACTION_KEEP);
+                 khui_alert_add_command(a, KHUI_PACTION_REMOVE);
+                 khui_alert_add_command(a, KHUI_PACTION_CANCEL);
+ 
+                 khui_alert_set_severity(a, KHERR_INFO);
+ 
+                 khui_alert_show_modal(a);
+ 
+                 ok_to_add = TRUE;
+ 
+                 if (a->response == KHUI_PACTION_REMOVE) {
+                     afs_remove_token_from_identities(trow.cell);
+                 } else if (a->response == KHUI_PACTION_CANCEL) {
+                     ok_to_add = FALSE;
+                 }
+ 
+                 khui_alert_release(a);
+ #else
+                 wchar_t widname[KCDB_IDENT_MAXCCH_NAME];
+                 wchar_t wtitle[64];
+                 wchar_t wmsg[512];
+                 wchar_t wfmt[128];
+                 khm_size cb;
+                 int r;
+ 
+ #ifdef DEBUG
+                 assert(id_conf);
+ #endif
+ 
+                 cb = sizeof(widname);
+                 kcdb_identity_get_name(id_conf, widname, &cb);
+                 LoadString(hResModule, IDS_NC_TT_PROBLEM,
+                            wtitle, ARRAYLENGTH(wtitle));
+                 LoadString(hResModule, IDS_NC_TT_CONFLICTM,
+                            wfmt, ARRAYLENGTH(wfmt));
+                 StringCbPrintf(wmsg, sizeof(wmsg), wfmt,
+                                trow.cell, widname);
+                 r = MessageBox(NULL, wmsg, wtitle,
+                                MB_YESNOCANCEL | MB_ICONWARNING |
+                                MB_APPLMODAL);
+ 
+                 ok_to_add = TRUE;
+                 if (r == IDNO) {
+                     afs_remove_token_from_identities(trow.cell);
+                 } else if (r == IDCANCEL) {
+                     ok_to_add = FALSE;
+                 }
+ #endif
+ 
+                 kcdb_identity_release(id_conf);
+             }
+ 
+             if (!ok_to_add)
+                 goto _error_exit;
+         }
+ 
+         prow = afs_cred_get_new_row(&d->creds);
+     } else {
+         if (prow->cell)
+             PFREE(prow->cell);
+ 
+         if(prow->realm)
+             PFREE(prow->realm);
+ 
+         ZeroMemory(prow, sizeof(*prow));
+     }
+ 
+     *prow = trow;
+ 
+     if (ident) {
+         afs_ident_token_set ts;
+ 
+         ts.ident = ident;
+         ts.l = &d->creds;
+         ts.add_new = FALSE;
+         ts.update_info = FALSE;
+ 
+         kcdb_credset_apply(NULL, afs_get_id_creds_apply_proc,
+                            &ts);
+     }
+ 
+     afs_dlg_update_rows(hwnd, d);
+ 
+     d->dirty = TRUE;
+ 
+     if (d->nc)
+         SendMessage(d->nc->hwnd, KHUI_WM_NC_NOTIFY, 
+                     MAKEWPARAM(0, WMNC_UPDATE_CREDTEXT), 0);
+     else if (d->config_dlg) {
+         khui_cfg_set_flags_inst(&d->cfg,
+                                 KHUI_CNFLAG_MODIFIED,
+                                 KHUI_CNFLAG_MODIFIED);
+     }
+ 
+     return;
+ 
+ _error_exit:
+     if(trow.realm)
+         PFREE(trow.realm);
+     if(trow.cell)
+         PFREE(trow.cell);
+ }
+ 
+ /* this is shared between the new credentials window and the AFS per
+    identity configuration dialog. */
+ INT_PTR CALLBACK 
+ afs_dlg_proc(HWND hwnd,
+              UINT uMsg,
+              WPARAM wParam,
+              LPARAM lParam)
+ {
+     switch(uMsg) {
+     case WM_INITDIALOG:
+         {
+             HWND hw;
+             HIMAGELIST hw_ilist;
+             afs_dlg_data * d;
+             khui_new_creds_by_type * nct = NULL;
+             RECT r;
+ 
+             d = PMALLOC(sizeof(*d));
+             ZeroMemory(d, sizeof(*d));
+ 
+             InitializeCriticalSection(&d->cs);
+ 
+             /* lParam is a pointer to a khui_new_creds structure */
+             d->nc = (khui_new_creds *) lParam;
+ 
+             if (d->nc)
+                 khui_cw_find_type(d->nc, afs_credtype_id, &nct);
+ 
+ #pragma warning(push)
+ #pragma warning(disable: 4244)
+             SetWindowLongPtr(hwnd, DWLP_USER, (LPARAM) d);
+ #pragma warning(pop)
+ 
+             EnterCriticalSection(&d->cs);
+ 
+             if (nct)
+                 nct->aux = (LPARAM) d;
+ 
+             /* create the tooltip window */
+             d->tooltip = 
+                 CreateWindowEx(WS_EX_TOPMOST,
+                                TOOLTIPS_CLASS,
+                                NULL,
+                                WS_POPUP | TTS_BALLOON | TTS_ALWAYSTIP,
+                                CW_USEDEFAULT, CW_USEDEFAULT,
+                                CW_USEDEFAULT, CW_USEDEFAULT,
+                                hwnd,  /* make this an owned window, so
+                                          we don't have to worry about
+                                          destroying it */
+                                NULL,
+                                hInstance,
+                                NULL);
+ 
+             SetWindowPos(d->tooltip,
+                          HWND_TOPMOST,
+                          0,
+                          0,
+                          0,
+                          0,
+                          SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+ 
+             {
+                 TOOLINFO ti;
+ 
+                 ZeroMemory(&ti, sizeof(ti));
+                 ti.cbSize = sizeof(ti);
+                 ti.uFlags = TTF_TRACK;
+                 ti.hwnd = hwnd;
+                 ti.uId = 0;
+                 ti.hinst = hResModule;
+                 ti.lpszText = L"";
+                 GetClientRect(hwnd, &(ti.rect));
+ 
+                 SendMessage(d->tooltip, TTM_ADDTOOL, 0, (LPARAM) &ti);
+             }
+ 
+             /* we only initialize the constant bits here. */
+             hw = GetDlgItem(hwnd, IDC_NCAFS_TOKENLIST);
+ 
+             GetClientRect(hw, &r);
+ 
+             /* set the list view status icons */
+             hw_ilist = ImageList_Create(GetSystemMetrics(SM_CXSMICON),
+                                         GetSystemMetrics(SM_CYSMICON),
+                                         ILC_COLOR8 | ILC_MASK,
+                                         4, 4);
+ #ifdef DEBUG
+             assert(hw_ilist);
+ #endif
+             {
+                 HICON hi;
+ 
+                 hi = LoadImage(hResModule, MAKEINTRESOURCE(IDI_NC_NEW),
+                                IMAGE_ICON,
+                                GetSystemMetrics(SM_CXSMICON),
+                                GetSystemMetrics(SM_CYSMICON),
+                                LR_DEFAULTCOLOR);
+ 
+                 d->idx_new_token = ImageList_AddIcon(hw_ilist, hi) + 1;
+ 
+                 DestroyIcon(hi);
+ 
+                 hi = LoadImage(hResModule, MAKEINTRESOURCE(IDI_NC_EXIST),
+                                IMAGE_ICON,
+                                GetSystemMetrics(SM_CXSMICON),
+                                GetSystemMetrics(SM_CYSMICON),
+                                LR_DEFAULTCOLOR);
+                 d->idx_existing_token = ImageList_AddIcon(hw_ilist, hi) + 1;
+ 
+                 DestroyIcon(hi);
+ 
+                 hi = LoadImage(hResModule,
+                                MAKEINTRESOURCE(IDI_NC_NOTOWNED),
+                                IMAGE_ICON,
+                                GetSystemMetrics(SM_CXSMICON),
+                                GetSystemMetrics(SM_CYSMICON),
+                                LR_DEFAULTCOLOR);
+                 d->idx_bad_token = ImageList_AddIcon(hw_ilist, hi) + 1 ;
+ 
+                 DestroyIcon(hi);
+             }
+ 
+             ListView_SetImageList(hw, hw_ilist, LVSIL_STATE);
+ 
+             ListView_DeleteAllItems(hw);
+ 
+             /* set the columns */
+             {
+                 LVCOLUMN lc;
+                 wchar_t wbuf[256];
+ 
+                 lc.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT;
+                 lc.fmt = LVCFMT_LEFT;
+                 lc.cx = ((r.right - r.left) * 2) / 5;
+                 LoadString(hResModule, IDS_NCAFS_COL_CELL, 
+                            wbuf, ARRAYLENGTH(wbuf));
+                 lc.pszText = wbuf;
+ 
+                 ListView_InsertColumn(hw, 0, &lc);
+ 
+                 lc.mask |= LVCF_SUBITEM;
+                 //lc.cx is the same as above
+                 lc.iSubItem = NCAFS_IDX_REALM;
+                 LoadString(hResModule, IDS_NCAFS_COL_REALM, 
+                            wbuf, ARRAYLENGTH(wbuf));
+ 
+                 ListView_InsertColumn(hw, 1, &lc);
+ 
+                 lc.cx = ((r.right - r.left) * 1) / 5;
+                 lc.iSubItem = NCAFS_IDX_METHOD;
+                 LoadString(hResModule, IDS_NCAFS_COL_METHOD, 
+                            wbuf, ARRAYLENGTH(wbuf));
+ 
+                 ListView_InsertColumn(hw, 2, &lc);
+             }
+ 
+             /* Set the items for the 'method' combo box */
+             hw = GetDlgItem(hwnd, IDC_NCAFS_METHOD);
+ 
+             {
+                 wchar_t wbuf[KHUI_MAXCB_SHORT_DESC];
+                 afs_tk_method method = -1;
+                 int idx;
+ 
+                 SendMessage(hw, CB_RESETCONTENT, 0, 0);
+ 
+                 while((method = afs_get_next_method_id(method)) >= 0) {
+                     afs_method_describe(method, KCDB_TS_SHORT,
+                                         wbuf, sizeof(wbuf));
+                     idx = (int)SendMessage(hw, CB_INSERTSTRING,
+                                            (WPARAM) -1, (LPARAM) wbuf);
+ #ifdef DEBUG
+                     assert(idx != CB_ERR);
+ #endif
+                     SendMessage(hw, CB_SETITEMDATA, (WPARAM) idx,
+                                 (LPARAM)  method);
+                 }
+ 
+                 /* finally, set the current selection to auto, which
+                    is the first method returned by
+                    afs_get_next_method_id() */
+                 SendMessage(hw, CB_SETCURSEL, 0, 0);
+             }
+ 
+             d->afs_enabled = TRUE;
+             SendDlgItemMessage(hwnd, IDC_NCAFS_OBTAIN, 
+                                BM_SETCHECK, BST_CHECKED, 0);
+ 
+             LeaveCriticalSection(&d->cs);
+ 
+             /* the cells and realms combo boxes need to be filled
+                in the plugin thread since that requires making
+                potentially blocking and non-thread safe calls */
+         }
+         return TRUE;
+ 
+     case WM_DESTROY:
+         {
+             afs_dlg_data * d;
+             khui_new_creds_by_type * nct;
+ 
+             d = (afs_dlg_data *)(LONG_PTR) 
+                 GetWindowLongPtr(hwnd, DWLP_USER);
+ 
+             EnterCriticalSection(&d->cs);
+ 
+             if (d->nc) {
+                 khui_cw_find_type(d->nc, afs_credtype_id, &nct);
+ 
+                 nct->aux = (LPARAM) NULL;
+             }
+ 
+             afs_cred_free_rows(&d->creds);
+ 
+             LeaveCriticalSection(&d->cs);
+             DeleteCriticalSection(&d->cs);
+ 
+             PFREE(d);
+         }
+         return TRUE;
+ 
+     case WM_COMMAND:
+         {
+             afs_dlg_data * d;
+             khui_new_creds_by_type * nct;
+ 
+             d = (afs_dlg_data *)(LONG_PTR) 
+                 GetWindowLongPtr(hwnd, DWLP_USER);
+ 
+             EnterCriticalSection(&d->cs);
+ 
+             if (d->nc)
+                 khui_cw_find_type(d->nc, afs_credtype_id, &nct);
+             else
+                 nct = NULL;
+ 
+             nc_dlg_hide_tooltip(hwnd, 0);
+ 
+             /* Handle WM_COMMAND */
+             switch(wParam) {
+             case MAKEWPARAM(IDC_NCAFS_OBTAIN, BN_CLICKED):
+                 {
+                     BOOL c;
+                     c = (SendDlgItemMessage(hwnd, IDC_NCAFS_OBTAIN, 
+                                             BM_GETCHECK, 0, 0) 
+                          == BST_CHECKED);
+                     d->afs_enabled = c;
+                     d->dirty = TRUE;
+                     if (d->nc)
+                         khui_cw_enable_type(d->nc, afs_credtype_id, c);
+                     else if (d->config_dlg)
+                         khui_cfg_set_flags_inst(&d->cfg,
+                                                 KHUI_CNFLAG_MODIFIED,
+                                                 KHUI_CNFLAG_MODIFIED);
+                     nc_dlg_enable(hwnd, c);
+                 }
+                 break;
+ 
+             case MAKEWPARAM(IDC_NCAFS_ADD_TOKEN, BN_CLICKED):
+                 {
+                     nc_dlg_add_token(hwnd);
+                 }
+                 break;
+ 
+             case MAKEWPARAM(IDC_NCAFS_DELETE_TOKEN, BN_CLICKED):
+                 {
+                     nc_dlg_del_token(hwnd);
+                 }
+                 break;
+             }
+ 
+             LeaveCriticalSection(&d->cs);
+         }
+         return TRUE;
+ 
+     case KHUI_WM_NC_NOTIFY:
+         {
+             afs_dlg_data * d;
+             khui_new_creds_by_type * nct;
+ 
+             d = (afs_dlg_data *)(LONG_PTR) 
+                 GetWindowLongPtr(hwnd, DWLP_USER);
+ 
+             EnterCriticalSection(&d->cs);
+ 
+             if (d->nc)
+                 khui_cw_find_type(d->nc, afs_credtype_id, &nct);
+             else
+                 nct = NULL;
+ 
+             switch(HIWORD(wParam)) {
+             case WMNC_DIALOG_SETUP:
+                 {
+                     SendDlgItemMessage(hwnd, IDC_NCAFS_CELL, 
+                                        CB_RESETCONTENT, 0, 0);
+                     
+                     /* load the LRU cells */
+                     {
+                         wchar_t * buf;
+                         wchar_t *s;
+                         khm_size cbbuf;
+ 
+                         if(khc_read_multi_string(csp_params, L"LRUCells", 
+                                                  NULL, &cbbuf) == 
+                            KHM_ERROR_TOO_LONG) {
+                             buf = PMALLOC(cbbuf);
+                             khc_read_multi_string(csp_params, L"LRUCells", 
+                                                   buf, &cbbuf);
+                             s = buf;
+                             while(*s) {
+                                 SendDlgItemMessage(hwnd, IDC_NCAFS_CELL, 
+                                                    CB_ADDSTRING, 0, (LPARAM) s);
+                                 s += wcslen(s) + 1;
+                             }
+                             PFREE(buf);
+                         }
+                     }
+ 
+                     /* now, if the root cell is not in the LRU, add it */
+                     {
+                         char buf[256];
+                         wchar_t wbuf[256];
+ 
+                         if(!cm_GetRootCellName(buf)) {
+                             AnsiStrToUnicode(wbuf, sizeof(wbuf), buf);
+                             if(SendDlgItemMessage(hwnd,
+                                                   IDC_NCAFS_CELL,
+                                                   CB_FINDSTRINGEXACT,
+                                                   (WPARAM) -1,
+                                                   (LPARAM) wbuf) == CB_ERR) {
+                                 SendDlgItemMessage(hwnd, IDC_NCAFS_CELL, 
+                                                    CB_ADDSTRING, 
+                                                    0, (LPARAM) wbuf);
+                             }
+                             SendDlgItemMessage(hwnd, IDC_NCAFS_CELL, 
+                                                CB_SELECTSTRING, 
+                                                -1, (LPARAM) wbuf);
+                         }
+                     }
+ 
+                     SendDlgItemMessage(hwnd, IDC_NCAFS_REALM, 
+                                        CB_RESETCONTENT, 0, 0);
+ 
+                     /* as for the realms, we have a special one here */
+                     {
+                         wchar_t wbuf[256];
+                         int idx;
+ 
+                         LoadString(hResModule, IDS_NC_REALM_AUTO, wbuf, 
+                                    (int) ARRAYLENGTH(wbuf));
+                         idx = (int) SendDlgItemMessage(hwnd, IDC_NCAFS_REALM, 
+                                                        CB_ADDSTRING, 0, 
+                                                        (LPARAM) wbuf);
+                         /* item data for the realm strings is the
+                            answer to the question, "is this the
+                            'determine realm automatically' item?" */
+                         SendDlgItemMessage(hwnd, IDC_NCAFS_REALM, 
+                                            CB_SETITEMDATA, idx, TRUE);
+                         SendDlgItemMessage(hwnd, IDC_NCAFS_REALM, 
+                                            CB_SELECTSTRING, 
+                                            -1, (LPARAM) wbuf);
+                     }
+ 
+                     /* load the LRU realms */
+                     {
+                         wchar_t * buf;
+                         wchar_t *s;
+                         int idx;
+                         khm_size cbbuf;
+ 
+                         if(khc_read_multi_string(csp_params, L"LRURealms", 
+                                                  NULL, &cbbuf) == 
+                            KHM_ERROR_TOO_LONG) {
+                             buf = PMALLOC(cbbuf);
+                             khc_read_multi_string(csp_params, L"LRURealms", 
+                                                   buf, &cbbuf);
+                             s = buf;
+                             while(*s) {
+                                 if(SendDlgItemMessage(hwnd, IDC_NCAFS_REALM, 
+                                                       CB_FINDSTRINGEXACT, -1, 
+                                                       (LPARAM) s) == CB_ERR) {
+                                     idx = 
+                                         (int)
+                                         SendDlgItemMessage(hwnd, 
+                                                            IDC_NCAFS_REALM, 
+                                                            CB_ADDSTRING, 
+                                                            0, (LPARAM) s);
+                                     SendDlgItemMessage(hwnd, IDC_NCAFS_REALM, 
+                                                        CB_SETITEMDATA, 
+                                                        idx, FALSE);
+                                 }
+ 
+                                 s += wcslen(s) + 1;
+                             }
+                             PFREE(buf);
+                         }
+                     }
+ 
+                     if (d->nc)
+                         khui_cw_enable_type(d->nc, afs_credtype_id, 
+                                             d->afs_enabled);
+ 
+                     nc_dlg_enable(hwnd, d->afs_enabled);
+ 
+                     afs_dlg_update_rows(hwnd, d);
+                 }
+                 break;
+ 
+             case WMNC_UPDATE_CREDTEXT:
+                 {
+                     wchar_t wformat[256];
+                     wchar_t wstr[2048];
+                     khm_int32 flags;
+ 
+                     if(nct->credtext) {
+                         PFREE(nct->credtext);
+                         nct->credtext = NULL;
+                     }
+ 
+ #ifdef DEBUG
+                     assert(d->nc);
+ #endif
+ 
+                     if (d->nc->n_identities == 0 ||
+                         KHM_FAILED(kcdb_identity_get_flags(d->nc->identities[0],
+                                                            &flags)) ||
+                         !(flags & KCDB_IDENT_FLAG_VALID))
+                         /* in this case, we don't show any credential text */
+                         break;
+ 
+                     wstr[0] = 0;
+ 
+                     if(!d->afs_enabled) {
+                         LoadString(hResModule, IDS_AFS_CREDTEXT_DIS, 
+                                    wstr, ARRAYLENGTH(wstr));
+                     } else {
+                         if(d->creds.n_rows == 0) {
+                             LoadString(hResModule, IDS_AFS_CREDTEXT_0, 
+                                        wstr, ARRAYLENGTH(wstr));
+                         } else if(d->creds.n_rows == 1) {
+                             LoadString(hResModule, IDS_AFS_CREDTEXT_1, 
+                                        wformat, ARRAYLENGTH(wformat));
+                             StringCbPrintf(wstr, sizeof(wstr), wformat, 
+                                            d->creds.rows[0].cell);
+                         } else {
+                             int i;
+                             wchar_t wcells[1024];
+ 
+                             LoadString(hResModule, IDS_AFS_CREDTEXT_N, 
+                                        wformat, ARRAYLENGTH(wformat));
+                             wcells[0] = 0;
+                             for(i=0; i<d->creds.n_rows; i++) {
+                                 if(i > 0)
+                                     StringCbCat(wcells, sizeof(wcells), 
+                                                 L", ");
+                                 if(FAILED(StringCbCat(wcells, 
+                                                       sizeof(wcells), 
+                                                       d->creds.rows[i].cell))) {
+                                     size_t cch;
+                                     /* looks like we overflowed */
+                                     /* add an ellipsis at the end */
+                                     StringCchLength(wcells, ARRAYLENGTH(wcells), &cch);
+                                     cch = min(ARRAYLENGTH(wcells) - 4, cch);
+                                     StringCchCopy(wcells + cch, 4, L"...");
+ 
+                                     break;
+                                 }
+                             }
+ 
+                             StringCbPrintf(wstr, sizeof(wstr), wformat, wcells);
+                         }
+                     }
+ 
+                     if(wstr[0] != 0) {
+                         size_t cbs;
+                         StringCbLength(wstr, sizeof(wstr), &cbs);
+                         cbs += sizeof(wchar_t);
+                         assert(nct->credtext == NULL);
+                         nct->credtext = PMALLOC(cbs);
+                         StringCbCopy(nct->credtext, cbs, wstr);
+                     } else {
+                         /* something went wrong */
+                         nct->credtext = NULL;
+                     }
+                 }
+                 break;
+ 
+             case WMNC_CREDTEXT_LINK:
+                 {
+                     khui_htwnd_link * l;
+                     wchar_t wid[KHUI_MAXCCH_HTLINK_FIELD];
+                     wchar_t * wids;
+ 
+                     l = (khui_htwnd_link *) lParam;
+ 
+                     StringCchCopyN(wid, ARRAYLENGTH(wid), l->id, l->id_len);
+                     wids = wcschr(wid, L':');
+                         
+                     if(!wids)
+                         break;
+                     else
+                         wids++;
+ 
+ #ifdef DEBUG
+                     assert(d->nc);
+ #endif
+ 
+                     if(!wcscmp(wids, L"Enable")) {
+                         SendDlgItemMessage(hwnd, IDC_NCAFS_OBTAIN, 
+                                            BM_SETCHECK, BST_CHECKED, 0);
+                         d->afs_enabled = TRUE;
+                         khui_cw_enable_type(d->nc, afs_credtype_id, TRUE);
+                         nc_dlg_enable(hwnd, TRUE);
+                     }
+                 }
+                 break;
+ 
+             case WMNC_IDENTITY_CHANGE:
+                 kmq_post_sub_msg(afs_sub, KMSG_CRED, 
+                                  KMSG_CRED_DIALOG_NEW_IDENTITY, 0, 
+                                  (void *) d->nc);
+                 break;
+                 
+             case WMNC_AFS_UPDATE_ROWS:
+                 afs_dlg_update_rows(hwnd, d);
+ 
+ #ifdef DEBUG
+                 assert(d->nc);
+ #endif
+ 
+                 PostMessage(d->nc->hwnd, KHUI_WM_NC_NOTIFY, 
+                             MAKEWPARAM(0, WMNC_UPDATE_CREDTEXT), 0);
+                 break;
+             }
+ 
+             LeaveCriticalSection(&d->cs);
+         }
+         return TRUE;
+ 
+     case WM_NOTIFY:
+         if(wParam == IDC_NCAFS_TOKENLIST) {
+             LPNMHDR lpnmh = (LPNMHDR) lParam;
+ 
+             if(lpnmh->code == LVN_ITEMCHANGED) {
+                 /* when an item in the list view is clicked, we
+                    load the corresponding values into the edit and
+                    combo boxes */
+                 NMLISTVIEW *lpnmlv = (NMLISTVIEW *) lpnmh;
+                 LVITEM lvi;
+                 HWND hw;
+                 int idx;
+                 int row;
+                 afs_dlg_data * d;
+ 
+                 if (!(lpnmlv->uChanged & LVIF_STATE) ||
+                     !(lpnmlv->uNewState & LVIS_SELECTED) ||
+                     (lpnmlv->iItem == -1))
+ 
+                     return TRUE;
+ 
+                 d = (afs_dlg_data *)(LONG_PTR) 
+                     GetWindowLongPtr(hwnd, DWLP_USER);
+ 
+                 EnterCriticalSection(&d->cs);
+ 
+                 hw = GetDlgItem(hwnd, IDC_NCAFS_TOKENLIST);
+ 
+                 idx = lpnmlv->iItem;
+ 
+                 ZeroMemory(&lvi, sizeof(lvi));
+                 lvi.iItem = idx;
+                 lvi.iSubItem = 0;
+                 lvi.mask = LVIF_PARAM;
+ 
+                 if(!ListView_GetItem(hw, &lvi))
+                     goto _done_notify_select;
+ 
+                 /* ok, now lvi.lParam should be the row of the token */
+                 row = (int) lvi.lParam;
+                 if(row < 0 || row >= d->creds.n_rows)
+                     goto _done_notify_select;
+ 
+                 SetDlgItemText(hwnd, IDC_NCAFS_CELL, 
+                                d->creds.rows[row].cell);
+                 if(d->creds.rows[row].realm != NULL) {
+                     SetDlgItemText(hwnd, IDC_NCAFS_REALM, 
+                                    d->creds.rows[row].realm);
+                 } else {
+                     wchar_t wbuf[256];
+                     int idx;
+                         
+                     LoadString(hResModule, IDS_NC_REALM_AUTO, wbuf, 
+                                ARRAYLENGTH(wbuf));
+                     idx = (int) SendDlgItemMessage(hwnd, IDC_NCAFS_REALM, 
+                                                    CB_FINDSTRINGEXACT, -1, 
+                                                    (LPARAM) wbuf);
+                     SendDlgItemMessage(hwnd, IDC_NCAFS_REALM, CB_SETCURSEL,
+                                        idx, 0);
+                 }
+                 SendDlgItemMessage(hwnd, IDC_NCAFS_METHOD, CB_SETCURSEL, 
+                                    d->creds.rows[row].method, 0);
+             _done_notify_select:
+                 LeaveCriticalSection(&d->cs);
+ 
+             } else if (lpnmh->code == NM_DBLCLK) {
+ 
+                 LPNMITEMACTIVATE pnmi;
+                 LVITEM lvi;
+                 HWND hw;
+                 afs_dlg_data * d;
+                 int row;
+                 int x,y;
+                 RECT r;
+ 
+                 d = (afs_dlg_data *)(LONG_PTR) 
+                     GetWindowLongPtr(hwnd, DWLP_USER);
+ 
+                 EnterCriticalSection(&d->cs);
+ 
+                 pnmi = (LPNMITEMACTIVATE) lpnmh;
+ 
+                 hw = GetDlgItem(hwnd, IDC_NCAFS_TOKENLIST);
+ 
+                 ZeroMemory(&lvi, sizeof(lvi));
+                 lvi.iItem = pnmi->iItem;
+                 lvi.iSubItem = 0;
+                 lvi.mask = LVIF_PARAM;
+ 
+                 if (!ListView_GetItem(hw, &lvi))
+                     goto _done_notify_click;
+ 
+                 row = (int) lvi.lParam;
+                 if(row < 0 || row >= d->creds.n_rows)
+                     goto _done_notify_click;
+ 
+                 ListView_GetItemRect(hw, pnmi->iItem, &r, LVIR_SELECTBOUNDS);
+                 x = (r.left + r.right) / 2;
+                 y = (r.bottom);
+ 
+                 GetWindowRect(hw, &r);
+                 y += r.top;
+                 x += r.left;
+ 
+                 if (d->creds.rows[row].flags & DLGROW_FLAG_NOTOWNED) {
+                     nc_dlg_show_tooltip(hwnd, 0,
+                                         MAKEINTRESOURCE(IDS_NC_TT_CONFLICTD),
+                                         MAKEINTRESOURCE(IDS_NC_TT_PROBLEM),
+                                         2,
+                                         x,y);
+                 } else if (d->creds.rows[row].flags &
+                            DLGROW_FLAG_EXPIRED) {
+                     nc_dlg_show_tooltip(hwnd, 0,
+                                         MAKEINTRESOURCE(IDS_NC_TT_EXPIRED),
+                                         MAKEINTRESOURCE(IDS_NC_TT_DETAILS),
+                                         1,
+                                         x, y);
+                 } else if (d->creds.rows[row].flags &
+                            DLGROW_FLAG_EXISTS) {
+                     nc_dlg_show_tooltip(hwnd, 0,
+                                         MAKEINTRESOURCE(IDS_NC_TT_EXISTS),
+                                         MAKEINTRESOURCE(IDS_NC_TT_DETAILS),
+                                         1, x, y);
+                 } else {
+                     nc_dlg_show_tooltip(hwnd, 0,
+                                         MAKEINTRESOURCE(IDS_NC_TT_NEW),
+                                         MAKEINTRESOURCE(IDS_NC_TT_DETAILS),
+                                         1, x, y);
+                 }
+ 
+             _done_notify_click:
+                 LeaveCriticalSection(&d->cs);
+             }
+         }
+         return TRUE;
+ 
+     case WM_TIMER:
+         {
+             if(wParam == DLG_TOOLTIP_TIMER_ID) {
+                 KillTimer(hwnd, DLG_TOOLTIP_TIMER_ID);
+                 nc_dlg_hide_tooltip(hwnd, 0);
+             }
+         }
+         return TRUE;
+ 
+     case WM_HELP:
+         {
+             static const DWORD ctx_help[] = {
+                 IDC_NCAFS_OBTAIN, IDH_OBTAIN,
+                 IDC_NCAFS_CELL, IDH_CELL,
+                 IDC_NCAFS_REALM, IDH_REALM,
+                 IDC_NCAFS_METHOD, IDH_METHOD,
+                 IDC_NCAFS_ADD_TOKEN, IDH_ADD,
+                 IDC_NCAFS_DELETE_TOKEN, IDH_DELETE,
+                 IDC_NCAFS_TOKENLIST, IDH_TOKENLIST,
+                 0
+             };
+ 
+             LPHELPINFO hlp;
+ 
+             hlp = (LPHELPINFO) lParam;
+ 
+             if (hlp->iContextType != HELPINFO_WINDOW)
+                 break;
+ 
+             afs_html_help(hlp->hItemHandle, L"::/popups_newcred.txt",
+                           HH_TP_HELP_WM_HELP, (DWORD_PTR) ctx_help);
+         }
+         return TRUE;
+     } /* switch(uMsg) */
+ 
+     return FALSE;
+ }
+ 
+ 
+ /* passed in to kcdb_credset_apply along with the afs_credset to adjust
+    newly acquired credentials to include informatino derived from the
+    new creds operation */
+ khm_int32 KHMAPI 
+ afs_adjust_token_ident_proc(khm_handle cred, void * vd)
+ {
+     wchar_t cell[MAXCELLCHARS];
+     afs_ident_token_set * b = (afs_ident_token_set *) vd;
+     afs_cred_list * l;
+     khm_size cbbuf;
+     int i;
+ 
+     l = b->l;
+ 
+     /* ASSUMPTION: for each user, there can be tokens for only one
+        cell */
+ 
+     cbbuf = sizeof(cell);
+ 
+     if(KHM_FAILED(kcdb_cred_get_attr(cred, afs_attr_cell, NULL, cell, &cbbuf)))
+         return KHM_ERROR_SUCCESS; /* remember, kcdb doesn't care if
+                                      this run succeeded or not.  all
+                                      it wants to know if whether or
+                                      not we want to continue the
+                                      search */
+     
+     for(i=0; i<l->n_rows; i++) {
+         if((l->rows[i].flags & DLGROW_FLAG_DONE) && 
+            !_wcsicmp(cell, l->rows[i].cell)) {
+             khm_int32 method;
+ 
+             kcdb_cred_set_identity(cred, b->ident);
+             if(l->rows[i].realm)
+                 kcdb_cred_set_attr(cred, afs_attr_realm, l->rows[i].realm, 
+                                    KCDB_CBSIZE_AUTO);
+             else
+                 kcdb_cred_set_attr(cred, afs_attr_realm, NULL, 0);
+ 
+             method = l->rows[i].method;
+             kcdb_cred_set_attr(cred, afs_attr_method, &method, 
+                                KCDB_CBSIZE_AUTO);
+ 
+             break;
+         }
+     }
+ 
+     return KHM_ERROR_SUCCESS;
+ }
+ 
+ void
+ afs_cred_write_ident_data(afs_dlg_data * d) {
+     wchar_t * lru_cell = NULL;
+     wchar_t * lru_realm = NULL;
+     wchar_t * id_cell = NULL;
+     khm_size cbidcell;
+     khm_size cbcell;
+     khm_size cbrealm;
+     khm_size cbt;
+     size_t cbz;
+     khm_handle h_idc = NULL;
+     khm_handle h_afs = NULL;
+     khm_handle h_acells = NULL;
+     khm_handle h_cellmap = NULL;
+     wchar_t idname[KCDB_IDENT_MAXCCH_NAME];
+     khm_handle ident = NULL;
+     afs_cred_list * l;
+     int i;
+ 
+     l = &d->creds;
+ 
+     if (d->nc &&
+         d->nc->n_identities > 0 &&
+         d->nc->identities[0])
+ 
+         ident = d->nc->identities[0];
+ 
+     else if (d->config_dlg)
+ 
+         ident = d->ident;
+ 
+     if (!ident)
+         return;
+ 
+     cbt = sizeof(idname);
+     kcdb_identity_get_name(ident, idname, &cbt);
+ 
+     khc_open_space(csp_afscred, L"Cells", 0, &h_cellmap);
+ 
+     if(ident) {
+         if(KHM_SUCCEEDED(kcdb_identity_get_config(ident,
+                                                   KHM_FLAG_CREATE,
+                                                   &h_idc))) {
+             khc_open_space(h_idc, CSNAME_AFSCRED, 
+                            KHM_FLAG_CREATE, &h_afs);
+         }
+ 
+         if(h_afs) {
+             khc_open_space(h_afs, L"Cells", KHM_FLAG_CREATE, 
+                            &h_acells);
+         }
+     }
+ 
+     if (h_afs && d) {
+         khc_write_int32(h_afs, L"AFSEnabled",
+                         !!d->afs_enabled);
+     }
+ 
+     if(khc_read_multi_string(csp_params, 
+                              L"LRUCells", 
+                              NULL,
+                              &cbcell) == KHM_ERROR_TOO_LONG) {
+         cbcell += MAXCELLCHARS * sizeof(wchar_t) * 
+             l->n_rows;
+         lru_cell = PMALLOC(cbcell);
+         ZeroMemory(lru_cell, cbcell);
+         cbt = cbcell;
+                     
+         khc_read_multi_string(csp_params,
+                               L"LRUCells",
+                               lru_cell,
+                               &cbt);
+     } else {
+         cbcell = MAXCELLCHARS * sizeof(wchar_t) * 
+             l->n_rows;
+         if (cbcell > 0) {
+             lru_cell = PMALLOC(cbcell);
+             ZeroMemory(lru_cell, cbcell);
+         } else {
+             lru_cell = NULL;
+         }
+     }
+ 
+     if(khc_read_multi_string(csp_params,
+                              L"LRURealms",
+                              NULL,
+                              &cbrealm) == KHM_ERROR_TOO_LONG) {
+         cbrealm += MAXCELLCHARS * sizeof(wchar_t) * l->n_rows;
+         lru_realm = PMALLOC(cbrealm);
+         ZeroMemory(lru_realm, cbrealm);
+         cbt = cbrealm;
+ 
+         khc_read_multi_string(csp_params,
+                               L"LRURealms",
+                               lru_realm,
+                               &cbt);
+     } else {
+         cbrealm = MAXCELLCHARS * sizeof(wchar_t) * l->n_rows;
+         if (cbrealm > 0) {
+             lru_realm = PMALLOC(cbrealm);
+             ZeroMemory(lru_realm, cbrealm);
+         } else {
+             lru_cell = NULL;
+         }
+     }
+ 
+     cbidcell = MAXCELLCHARS * sizeof(wchar_t) * l->n_rows;
+     if (cbidcell > 0) {
+         id_cell = PMALLOC(cbidcell);
+         ZeroMemory(id_cell, cbidcell);
+     } else {
+         id_cell = NULL;
+     }
+ 
+     for(i=0; i < l->n_rows; i++)
+         if(!(l->rows[i].flags & DLGROW_FLAG_DELETED)) {
+             khm_handle h_acell = NULL;
+             
+             if(!multi_string_find(lru_cell, 
+                                   l->rows[i].cell, 0)) {
+                 cbz = cbcell;
+                 multi_string_append(lru_cell, &cbz, 
+                                     l->rows[i].cell);
+             }
+ 
+             if(l->rows[i].realm && 
+                !multi_string_find(lru_realm, 
+                                   l->rows[i].realm, 0)) {
+                 cbz = cbrealm;
+                 multi_string_append(lru_realm, &cbz, 
+                                     l->rows[i].realm);
+             }
+ 
+             cbz = cbidcell;
+             multi_string_append(id_cell, &cbz, 
+                                 l->rows[i].cell);
+ 
+             if(h_acells && 
+                KHM_SUCCEEDED(khc_open_space(h_acells, 
+                                             l->rows[i].cell, 
+                                             KHM_FLAG_CREATE, 
+                                             &h_acell))) {
+                 wchar_t methodname[KHUI_MAXCCH_NAME];
+ 
+                 afs_get_method_name(l->rows[i].method,
+                                     methodname,
+                                     sizeof(methodname));
+ 
+                 khc_write_string(h_acell, L"MethodName", 
+                                  methodname);
+ 
+                 if(l->rows[i].realm)
+                     khc_write_string(h_acell, L"Realm", 
+                                      l->rows[i].realm);
+                 else
+                     khc_write_string(h_acell, L"Realm", L"");
+                 khc_close_space(h_acell);
+             }
+ 
+             if (h_cellmap) {
+                 khc_write_string(h_cellmap,
+                                  l->rows[i].cell,
+                                  idname);
+             }
+         }
+ 
+     if (lru_cell)                
+         khc_write_multi_string(csp_params,
+                                L"LRUCells", lru_cell);
+     if (lru_realm)
+         khc_write_multi_string(csp_params,
+                                L"LRURealms", lru_realm);
+     if (id_cell)
+         khc_write_multi_string(h_afs, L"Cells",
+                                id_cell);
+ 
+     if (d->config_dlg) {
+         if (d->dirty)
+             khui_cfg_set_flags_inst(&d->cfg, KHUI_CNFLAG_APPLIED,
+                                     KHUI_CNFLAG_APPLIED |
+                                     KHUI_CNFLAG_MODIFIED);
+         else
+             khui_cfg_set_flags_inst(&d->cfg, 0,
+                                     KHUI_CNFLAG_MODIFIED);
+     }
+ 
+     d->dirty = FALSE;
+ 
+     if(h_cellmap)
+         khc_close_space(h_cellmap);
+     if(h_idc)
+         khc_close_space(h_idc);
+     if(h_afs)
+         khc_close_space(h_afs);
+     if(h_acells)
+         khc_close_space(h_acells);
+     if(id_cell)
+         PFREE(id_cell);
+     if(lru_cell)
+         PFREE(lru_cell);
+     if(lru_realm)
+         PFREE(lru_realm);
+ }
+ 
+ khm_int32
+ afs_msg_newcred(khm_int32 msg_subtype, 
+                 khm_ui_4 uparam, 
+                 void * vparam) {
+ 
+     switch(msg_subtype) {
+     case KMSG_CRED_NEW_CREDS:
+         {
+             khui_new_creds * nc;
+             khui_new_creds_by_type * nct;
+             wchar_t wbuf[256];
+             size_t cbsize;
+ 
+             nc = (khui_new_creds *) vparam;
+ 
+             nct = PMALLOC(sizeof(*nct));
+             ZeroMemory(nct, sizeof(*nct));
+ 
+             nct->type = afs_credtype_id;
+             nct->ordinal = 3;
+ 
+             LoadString(hResModule, IDS_AFS_NAME, wbuf, ARRAYLENGTH(wbuf));
+             StringCbLength(wbuf, sizeof(wbuf), &cbsize);
+             cbsize += sizeof(wchar_t);
+ 
+             nct->name = PMALLOC(cbsize);
+             StringCbCopy(nct->name, cbsize, wbuf);
+ 
+             nct->h_module = hResModule;
+             nct->dlg_proc = afs_dlg_proc;
+             nct->dlg_template = MAKEINTRESOURCE(IDD_NC_AFS);
+             nct->type_deps[nct->n_type_deps++] = krb5_credtype_id;
+ 
+             if (krb4_credtype_id < 0) {
+                 kcdb_credtype_get_id(KRB4_CREDTYPE_NAME,
+                                      &krb4_credtype_id);
+             }
+             if (krb4_credtype_id >= 0) {
+                 nct->type_deps[nct->n_type_deps++] =
+                     krb4_credtype_id;
+             }
+ 
+             khui_cw_add_type(nc, nct);
+         }
+         break;
+ 
+     case KMSG_CRED_RENEW_CREDS:
+         {
+             khui_new_creds * nc;
+             khui_new_creds_by_type * nct;
+ 
+             nc = (khui_new_creds *) vparam;
+ 
+             nct = PMALLOC(sizeof(*nct));
+             ZeroMemory(nct, sizeof(*nct));
+ 
+             nct->type = afs_credtype_id;
+             nct->type_deps[nct->n_type_deps++] = krb5_credtype_id;
+             if (krb4_credtype_id < 0) {
+                 kcdb_credtype_get_id(KRB4_CREDTYPE_NAME,
+                                      &krb4_credtype_id);
+             }
+             if (krb4_credtype_id >= 0) {
+                 nct->type_deps[nct->n_type_deps++] =
+                     krb4_credtype_id;
+             }
+ 
+             khui_cw_add_type(nc, nct);
+         }
+         break;
+ 
+     case KMSG_CRED_DIALOG_PRESTART:
+         {
+             khui_new_creds * nc;
+             khui_new_creds_by_type * nct = NULL;
+             HWND hwnd;
+ 
+             nc = (khui_new_creds *) vparam;
+             khui_cw_find_type(nc, afs_credtype_id, &nct);
+ 
+             if(!nct)
+                 break;
+ 
+             hwnd = nct->hwnd_panel;
+             if (!hwnd)
+                 break;
+ 
+             PostMessage(hwnd, KHUI_WM_NC_NOTIFY,
+                         MAKEWPARAM(0,WMNC_DIALOG_SETUP), 0);
+         }
+         break;
+ 
+     case KMSG_CRED_DIALOG_NEW_IDENTITY:
+         {
+             khui_new_creds * nc;
+             khui_new_creds_by_type * nct = NULL;
+             afs_dlg_data * d;
+ 
+             nc = (khui_new_creds *) vparam;
+             khui_cw_find_type(nc, afs_credtype_id, &nct);
+ 
+             if(nct == NULL)
+                 break;
+ 
+             d = (afs_dlg_data *) nct->aux;
+ 
+             if(d == NULL)
+                 break;
+ 
+             EnterCriticalSection(&d->cs);
+ 
+             if (nct->aux == 0) {
+                 LeaveCriticalSection(&d->cs);
+                 break;
+             }
+ 
+             /* we should load up the selected tokens for this
+                identity */
+             if(nc->n_identities == 0) {
+                 LeaveCriticalSection(&d->cs);
+                 /* no identities selected. nothing to do */
+                 break;
+             }
+ 
+             afs_cred_get_identity_creds(&d->creds, nc->identities[0],
+                                         &d->afs_enabled);
+ 
+             LeaveCriticalSection(&d->cs);
+ 
+             PostMessage(nct->hwnd_panel, KHUI_WM_NC_NOTIFY,
+                         MAKEWPARAM(0, WMNC_AFS_UPDATE_ROWS), 0);
+         }
+         break;
+ 
+     case KMSG_CRED_PROCESS:
+         {
+             khui_new_creds * nc;
+             khui_new_creds_by_type * nct = NULL;
+             afs_cred_list tlist;
+             afs_cred_list * l;
+             int i;
+             BOOL failed = FALSE;    /* one or more cells failed */
+             BOOL succeeded = FALSE; /* one or more cells succeeded */
+             BOOL free_tlist = FALSE;
+             khm_handle ident = NULL;
+             afs_dlg_data * d = NULL;
+             BOOL get_tokens = TRUE;
+             BOOL ident_renew_triggered = TRUE;
+             khm_handle csp_afscred = NULL;
+             khm_handle csp_cells = NULL;
+ 
+             nc = (khui_new_creds *) vparam;
+             khui_cw_find_type(nc, afs_credtype_id, &nct);
+ 
+             if(!nct)
+                 break;
+ 
+             _begin_task(0);
+             _report_cs0(KHERR_INFO,
+                         L"Getting AFS tokens...");
+             _describe();
+ 
+             if(nc->result != KHUI_NC_RESULT_PROCESS &&
+                nc->subtype != KMSG_CRED_RENEW_CREDS) {
+                 /* nothing to do */
+                 khui_cw_set_response(nc, afs_credtype_id,
+                                      KHUI_NC_RESPONSE_SUCCESS);
+ 
+                 _report_cs0(KHERR_INFO, 
+                             L"Cancelling");
+                 _end_task();
+                 break;
+             }
+ 
+             /* we can't proceed if Kerberos 5 has failed */
+             if(!khui_cw_type_succeeded(nc, krb5_credtype_id)) {
+                 khui_cw_set_response(nc, afs_credtype_id,
+                                      KHUI_NC_RESPONSE_FAILED);
+ 
+                 _report_cs0(KHERR_INFO,
+                             L"Kerberos 5 plugin failed to process credentials request.  Aborting");
+                 _end_task();
+                 break;
+             }
+ 
+             if (nc->subtype == KMSG_CRED_RENEW_CREDS) {
+ 
+                 if (nc->ctx.scope == KHUI_SCOPE_IDENT ||
+ 
+                     (nc->ctx.scope == KHUI_SCOPE_CREDTYPE &&
+                      nc->ctx.cred_type == afs_credtype_id) ||
+ 
+                     (nc->ctx.scope == KHUI_SCOPE_CRED &&
+                      nc->ctx.cred_type == afs_credtype_id)) {
+ 
+                     _report_cs1(KHERR_INFO,
+                                 L"AFS Renew Creds :: ident %1!p!", 
+                                 _cptr(nc->ctx.identity));
+ 
+                 } else {
+ 
+                     _report_cs0(KHERR_INFO,
+                                 L"Renew request not applicable to AFS");
+                     _end_task();
+                     break;
+ 
+                 }
+ 
+                 if (nc->ctx.identity != NULL) {
+                     ident = nc->ctx.identity;
+                 } else {
+                     khui_cw_set_response(nc, afs_credtype_id,
+                                          KHUI_NC_RESPONSE_FAILED);
+ 
+                     _report_cs0(KHERR_INFO,
+                                 L"No identity specified.  Aborting");
+                     _end_task();
+                     break;
+                 }
+ 
+                 ZeroMemory(&tlist, sizeof(tlist));
+                 l = &tlist;
+                 free_tlist = TRUE;
+ 
+                 afs_cred_get_identity_creds(l, ident, NULL);
+ 
+                 /* if the identity has any tokens associated with it
+                    that aren't persistent, we should renew those as
+                    well. */
+                 afs_cred_get_context_creds(l, &nc->ctx);
+ 
+                 if (nc->ctx.scope == KHUI_SCOPE_CREDTYPE ||
+                     nc->ctx.scope == KHUI_SCOPE_CRED) {
+ 
+                     ident_renew_triggered = FALSE;
+ 
+                 }
+ 
+             } else {
+                 _report_cs1(KHERR_INFO,
+                             L"AFS New Creds :: ident %1!p!",
+                             _cptr(nc->identities[0]));
+ 
+                 d = (afs_dlg_data *) nct->aux;
+                 if(!d) {
+                     _report_cs0(KHERR_INFO,
+                                 L"No dialog data found.  Aborting");
+ 
+                     khui_cw_set_response(nc, afs_credtype_id,
+                                          KHUI_NC_RESPONSE_FAILED);
+                     _end_task();
+                     break;
+                 }
+ 
+                 EnterCriticalSection(&d->cs);
+ 
+                 l = &d->creds;
+ 
+                 ident = nc->identities[0];
+                 if (!ident) {
+                     LeaveCriticalSection(&d->cs);
+ 
+                     _report_cs0(KHERR_INFO,
+                                 L"No identity specified. Aborting");
+ 
+                     khui_cw_set_response(nc, afs_credtype_id,
+                                          KHUI_NC_RESPONSE_FAILED);
+ 
+                     _end_task();
+                     break;
+                 }
+ 
+                 get_tokens = d->afs_enabled;
+             }
+ 
+             if (!get_tokens)
+                 goto _skip_tokens;
+ 
+             if (KHM_SUCCEEDED(kmm_get_plugin_config(AFS_PLUGIN_NAME, 0,
+                                                     &csp_afscred)))
+                 khc_open_space(csp_afscred, L"Cells", 0, &csp_cells);
+ 
+             /* looks like k5 worked.  Now see about getting those
+                tokens */
+             for(i=0; i<l->n_rows; i++) {
+                 int code;
+                 char cell[MAXCELLCHARS];
+                 char realm[MAXCELLCHARS];
+                 khm_handle ctoken;
+                 FILETIME ft_old;
+                 FILETIME ft_new;
+                 time_t new_exp = 0;
+                 khm_size cb;
+                 khm_int32 method = AFS_TOKEN_AUTO;
+                 khm_handle csp_cell = NULL;
+ 
+                 if (l->rows[i].flags &
+                     (DLGROW_FLAG_DONE | DLGROW_FLAG_DELETED))
+ 
+                     continue;
+ 
+                 ZeroMemory(cell, sizeof(cell));
+                 ZeroMemory(realm, sizeof(realm));
+ 
+                 UnicodeStrToAnsi(cell, sizeof(cell), l->rows[i].cell);
+                 if (l->rows[i].realm != NULL)
+                     UnicodeStrToAnsi(realm, sizeof(realm), 
+                                      l->rows[i].realm);
+ 
+                 ZeroMemory(&ft_old, sizeof(ft_old));
+ 
+                 if (!ident_renew_triggered &&
+                     (ctoken = afs_find_token(NULL, l->rows[i].cell))) {
+ 
+                     cb = sizeof(ft_old);
+                     kcdb_cred_get_attr(ctoken, KCDB_ATTR_EXPIRE,
+                                        NULL, &ft_old, &cb);
+ 
+                     kcdb_cred_release(ctoken);
+                 }
+ 
+                 if (l->rows[i].method == AFS_TOKEN_AUTO && csp_cells &&
+                     KHM_SUCCEEDED(khc_open_space(csp_cells,
+                                                  l->rows[i].cell, 0,
+                                                  &csp_cell))) {
+ 
+                     if (KHM_FAILED(khc_read_int32(csp_cell, L"Method", &method))) {
+                         method = l->rows[i].method;
+                     } else {
+                         _report_cs3(KHERR_INFO,
+                                     L"Overriding method %1!d! with global default %2!d! for cell %3!s!",
+                                     _int32(l->rows[i].method),
+                                     _int32(method),
+                                     _cstr(l->rows[i].cell));
+                         _resolve();
+                     }
+ 
+                     khc_close_space(csp_cell);               
+                 } else {
+                     method = l->rows[i].method;
+                 }
+ 
+                 _report_cs3(KHERR_INFO,
+                             L"Getting tokens for cell %1!S! with realm %2!S! using method %3!d!",
+                             _cstr(cell),
+                             _cstr(realm),
+                             _int32(method));
+                 _resolve();
+ 
+                 /* make the call */
+                 code = afs_klog(ident, "", cell, realm, 0, 
+                                 method, &new_exp);
+ 
+                 _report_cs1(KHERR_INFO,
+                             L"klog returns code %1!d!",
+                             _int32(code));
+ 
+                 if(code) {
+                     failed = TRUE;
+                     l->rows[i].flags &= ~DLGROW_FLAG_DONE;
+ 
+                     if (!kherr_is_error()) {
+                         /* failed to get tokens, but no error was reported */
+                         _report_sr1(KHERR_ERROR, IDS_ERR_GENERAL,
+                                     _cptr(cell));
+                         _resolve();
+                     }
+ 
+                 } else {
+                     l->rows[i].flags |= DLGROW_FLAG_DONE;
+                     succeeded = TRUE;
+ 
+                     if (new_exp &&
+                         !ident_renew_triggered) {
+                         TimetToFileTime(new_exp, &ft_new);
+ 
+                         if (CompareFileTime(&ft_old, &ft_new) >= 0) {
+                             /* getting a new token didn't improve the
+                                situation much.  We only get here if we
+                                were trying to renew tokens. So we try
+                                to trigger an identity renewal.  Doing
+                                so should get us new initial tickets
+                                which will allow us to get a better
+                                token. */
+ 
+                             khui_action_context ctx;
+ 
+                             _reportf(L"Renewal of AFS tokens for cell %s failed to get a longer token.  Triggering identity renewal", l->rows[i].cell);
+ 
+                             khui_context_create(&ctx,
+                                                 KHUI_SCOPE_IDENT,
+                                                 nc->ctx.identity,
+                                                 KCDB_CREDTYPE_INVALID,
+                                                 NULL);
+                             khui_action_trigger(KHUI_ACTION_RENEW_CRED,
+                                                 &ctx);
+ 
+                             khui_context_release(&ctx);
+ 
+                             ident_renew_triggered = TRUE;
+                         }
+                     }
+                 }
+             }
+ 
+         _skip_tokens:
+ 
+             if(failed) {
+                 /* we should indicate errors if anything went wrong */
+                 khui_cw_set_response(nc, afs_credtype_id, 
+                                      KHUI_NC_RESPONSE_FAILED);
+             } else {
+                 khui_cw_set_response(nc, afs_credtype_id,
+                                      KHUI_NC_RESPONSE_SUCCESS);
+             }
+ 
+             if (succeeded && nc->subtype == KMSG_CRED_RENEW_CREDS) {
+                 afs_ident_token_set b;
+ 
+                 afs_list_tokens_internal();
+ 
+                 /* the tokens that we just acquired need adjusting to
+                    include the realm, method and identity information
+                    derived from the new creds operation.  this is done
+                    in afs_adjust_token_ident_proc */
+                 b.ident = ident;
+                 b.l = l;
+                 b.add_new = FALSE;
+                 b.update_info = FALSE;
+ 
+                 kcdb_credset_apply(afs_credset, afs_adjust_token_ident_proc, 
+                                    (void *) &b);
+ 
+                 kcdb_credset_collect(NULL, afs_credset, NULL, 
+                                      afs_credtype_id, NULL);
+ 
+             } else if (nc->subtype == KMSG_CRED_NEW_CREDS) {
+                 afs_ident_token_set b;
+ 
+                 afs_list_tokens_internal();
+ 
+                 /* the tokens that we just acquired need adjusting to
+                    include the realm, method and identity information
+                    derived from the new creds operation.  this is done
+                    in afs_adjust_token_ident_proc */
+                 b.ident = ident;
+                 b.l = l;
+                 b.add_new = FALSE;
+                 b.update_info = FALSE;
+ 
+                 kcdb_credset_apply(afs_credset, afs_adjust_token_ident_proc, 
+                                    (void *) &b);
+ 
+                 kcdb_credset_collect(NULL, afs_credset, NULL, 
+                                      afs_credtype_id, NULL);
+ 
+                 afs_cred_write_ident_data(d);
+             }
+ 
+             if (d)
+                 LeaveCriticalSection(&d->cs);
+ 
+             if (free_tlist) {
+                 afs_cred_free_rows(&tlist);
+             }
+ 
+             if (csp_afscred)
+                 khc_close_space(csp_afscred);
+ 
+             if (csp_cells)
+                 khc_close_space(csp_cells);
+ 
+             _end_task();
+         }
+         break;
+ 
+     case KMSG_CRED_END:
+         {
+             khui_new_creds * nc;
+             khui_new_creds_by_type * nct;
+ 
+             nc = (khui_new_creds *) vparam;
+             khui_cw_find_type(nc, afs_credtype_id, &nct);
+ 
+             if(!nct)
+                 break;
+ 
+             khui_cw_del_type(nc, afs_credtype_id);
+     
+             if (nct->name)
+                 PFREE(nct->name);
+             if (nct->credtext)
+                 PFREE(nct->credtext);
+ 
+             PFREE(nct);
+         }
+         break;
+     }
+ 
+     return KHM_ERROR_SUCCESS;
+ }
Index: openafs/src/WINNT/netidmgr_plugin/afsnewcreds.h
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/afsnewcreds.h:1.1.2.3
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/afsnewcreds.h	Mon Oct 16 09:55:35 2006
***************
*** 0 ****
--- 1,145 ----
+ /*
+  * Copyright (c) 2005,2006 Secure Endpoints Inc.
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: afsnewcreds.h,v 1.1.2.3 2006/10/16 13:55:35 jaltman Exp $ */
+ 
+ #ifndef __AFS_NEWCREDS_H
+ #define __AFS_NEWCREDS_H
+ 
+ typedef struct tag_afs_cred_row {
+     wchar_t * cell;
+     wchar_t * realm;
+     afs_tk_method method;
+     khm_int32 flags;
+ } afs_cred_row;
+ 
+ /* we checked whether this cell exists */
+ #define DLGROW_FLAG_CHECKED  0x00000001
+ 
+ /* cell was checked and was found to be valid */
+ #define DLGROW_FLAG_VALID    0x00000002
+ 
+ /* cell was deleted  */
+ #define DLGROW_FLAG_DELETED  0x00000004
+ 
+ /* tokens obtained for cell */
+ #define DLGROW_FLAG_DONE     0x00000008
+ 
+ /* tokens for this cell already exist */
+ #define DLGROW_FLAG_EXISTS   0x00000010
+ 
+ /* tokens for this cell exist and is listed under a different
+    identity */
+ #define DLGROW_FLAG_NOTOWNED 0x00000020
+ 
+ /* tokens for this cell exist and are expired */
+ #define DLGROW_FLAG_EXPIRED  0x00000040
+ 
+ /* the subitem indexes for each data field */
+ enum afs_ncwnd_subitems {
+     NCAFS_IDX_CELL=0,
+     NCAFS_IDX_REALM,
+     NCAFS_IDX_METHOD
+ };
+ 
+ #define DLG_TOOLTIP_TIMER_ID 1
+ #define DLG_TOOLTIP_TIMEOUT  5000
+ 
+ typedef struct tag_afs_cred_list {
+     afs_cred_row * rows;
+     int n_rows;
+     int nc_rows;
+ } afs_cred_list;
+ 
+ typedef struct tag_afs_dlg_data {
+     khui_new_creds * nc;
+ 
+     afs_cred_list creds;
+ 
+     khm_int32 afs_enabled;
+ 
+     BOOL tooltip_visible;
+     BOOL dirty;
+     HWND tooltip;
+ 
+     /* list view state image indices */
+     int idx_new_token;
+     int idx_existing_token;
+     int idx_bad_token;
+ 
+     CRITICAL_SECTION cs;
+ 
+     /* used with configuration dialogs */
+     khm_boolean config_dlg;
+     khui_config_init_data cfg;
+     khm_handle ident;
+ } afs_dlg_data;
+ 
+ #define AFS_DLG_ROW_ALLOC 4
+ 
+ INT_PTR CALLBACK 
+ afs_dlg_proc(HWND hwnd,
+              UINT uMsg,
+              WPARAM wParam,
+              LPARAM lParam);
+ 
+ void 
+ afs_dlg_update_rows(HWND hwnd, afs_dlg_data * d);
+ 
+ void 
+ afs_cred_flush_rows(afs_cred_list * l);
+ 
+ void 
+ afs_cred_free_rows(afs_cred_list * l);
+ 
+ void 
+ afs_cred_assert_rows(afs_cred_list * l, int n);
+ 
+ void 
+ afs_cred_delete_row(afs_cred_list * l, int i);
+ 
+ afs_cred_row * 
+ afs_cred_get_new_row(afs_cred_list * l);
+ 
+ khm_int32 KHMAPI
+ afs_cred_add_cred_proc(khm_handle cred, void * rock);
+ 
+ void
+ afs_cred_get_context_creds(afs_cred_list *l,
+                            khui_action_context * ctx);
+ 
+ void 
+ afs_cred_get_identity_creds(afs_cred_list * l, 
+                             khm_handle ident,
+                             khm_boolean * enabled);
+ 
+ void
+ afs_cred_write_ident_data(afs_dlg_data * d);
+ 
+ khm_int32
+ afs_msg_newcred(khm_int32 msg_subtype, 
+                 khm_ui_4 uparam, 
+                 void * vparam);
+ 
+ #endif
Index: openafs/src/WINNT/netidmgr_plugin/afsp_version.h.in
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/afsp_version.h.in:1.1.2.3
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/afsp_version.h.in	Mon Oct 16 09:25:09 2006
***************
*** 0 ****
--- 1,42 ----
+ 
+ afsp_version.h: afsp_version.h.in
+ 	$(COPY) << $@
+ /* Copyright (c) 2005,2006 Secure Endpoints Inc.
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  *
+  */
+ 
+ #ifndef __AFSPLUGIN_VERSION_H
+ #define __AFSPLUGIN_VERSION_H
+ 
+ #define AFSPLUGIN_VERSION_MAJOR $(AFSPLUGIN_VERSION_MAJOR)
+ #define AFSPLUGIN_VERSION_MINOR $(AFSPLUGIN_VERSION_MINOR)
+ #define AFSPLUGIN_VERSION_PATCH $(AFSPLUGIN_VERSION_PATCH)
+ #define AFSPLUGIN_VERSION_AUX   $(AFSPLUGIN_VERSION_AUX)
+ 
+ #define AFSPLUGIN_VERSION       $(AFSPLUGIN_VERSION)
+ #define AFSPLUGIN_VERSION_STR   "$(AFSPLUGIN_VERSION)"
+ #define AFSPLUGIN_VERSION_LST   $(AFSPLUGIN_VERLIST)
+ 
+ #endif
+ <<
+ 
Index: openafs/src/WINNT/netidmgr_plugin/afspext.h
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/afspext.h:1.1.2.3
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/afspext.h	Mon Oct 16 09:55:35 2006
***************
*** 0 ****
--- 1,328 ----
+ /*
+  * Copyright (c) 2005,2006 Secure Endpoints Inc.
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: afspext.h,v 1.1.2.3 2006/10/16 13:55:35 jaltman Exp $ */
+ 
+ #ifndef __AFSPLUGIN_EXT_H
+ #define __AFSPLUGIN_EXT_H
+ 
+ /*! \defgroup afs_ext OpenAFS Plugin extensions 
+ 
+     This section documents messages and data structures used by AFS
+     extension plugins.  These are plugins which augment the behavior
+     of the AFS plugin.
+ 
+     When performing specific tasks for NetIDMgr, the AFS plugin will
+     send out messages to the extension plugins either via broadcast or
+     unicast.  The extension plugins provide functionality by
+     responding to these messages.
+ 
+   @{*/
+ 
+ #define MAXCELLCHARS   64
+ #define MAXHOSTCHARS   64
+ #define MAXHOSTSPERCELL 8
+ 
+ #define TRANSARCAFSDAEMON "TransarcAFSDaemon"
+ 
+ #define AFS_TOKENNAME_AUTO L"Auto"
+ #define AFS_TOKENNAME_KRB5 L"Kerberos5"
+ #define AFS_TOKENNAME_KRB524 L"Kerberos524"
+ #define AFS_TOKENNAME_KRB4 L"Kerberos4"
+ 
+ /*! \brief An AFS token acquisition method identifier 
+ 
+     This takes on a value from ::afs_token_method or a token
+     acquisition method identifier assigned to an extension plugin.
+ */
+ typedef khm_int32 afs_tk_method;
+ 
+ /*! \brief Predefined token acquisition methods */
+ enum afs_token_method {
+     AFS_TOKEN_AUTO = 0,         /*!< Automatic.  This method iterates
+                                   through Krb5, Krb524, Krb4 and then
+                                   any extensions which provide token
+                                   acquisition methods until one of
+                                   them succeeds. */
+     AFS_TOKEN_KRB5,             /*!< Kerberos 5 */
+     AFS_TOKEN_KRB524,           /*!< Kerberos 5 with krb524 translation */
+     AFS_TOKEN_KRB4,             /*!< Kerberos 4 */
+ };
+ 
+ /*! \brief Version of the OpenAFS Plugin
+ 
+     This is an internal number that identifies the version of the
+     OpenAFS plugin API that this extension was built against.  This
+     number is specified when sending the ::AFS_MSG_ANNOUNCE message.
+  */
+ #define AFS_PLUGIN_VERSION 0x0000001
+ 
+ /*! \name Messages
+ 
+     The AFS plugin registers the message type named ::AFS_MSG_TYPENAME
+     and sends messages of this type to notify any AFS extension
+     plugins to notify them of various events.
+ 
+  @{*/
+ 
+ /*! \brief Name of the AFS plugin message
+ 
+     This message type is registered when the AFS plugin starts and is
+     unregistered when the plugin stops.
+ 
+     Use kmq_find_type() to find the type ID of this message type.
+  */
+ #define AFS_MSG_TYPENAME L"AfsExtMessage"
+ 
+ /*! \brief Announce an extension plugin
+ 
+     Sent by an extension plugin to announce its existence to the AFS
+     plugin.  This message should be sent by the extension plugin when
+     it has finished loading, and is the only message permitted to be
+     sent by an extension. All other messages are sent by the AFS
+     plugin.
+ 
+     Since this message contains pointer parameters and there is no
+     cleanup performed on this, the message should be sent using
+     kmq_send_message().
+ 
+     <table>
+     <tr><td>Type</td><td>type ID of ::AFS_MSG_TYPENAME</td></tr>
+     <tr><td>Subtype</td><td>::AFS_MSG_ANNOUNCE</td></tr>
+     <tr><td>uparam</td><td>0</td></tr>
+     <tr><td>vparam</td><td>Pointer to a ::afs_msg_announce structure</td></tr>
+     </table>
+ 
+     \note This message is only sent from extension plugins to the AFS plugin.
+  */
+ #define AFS_MSG_ANNOUNCE 1
+ 
+ /*! \brief Parameter structure for announcing an extension plugin
+ 
+     \see ::AFS_MSG_ANNOUNCE
+  */
+ typedef struct tag_afs_msg_announce_v1 {
+     khm_size  cbsize;           /*!< Size of the strucutre.  Set to \a
+                                   sizeof(::afs_msg_announce).  If
+                                   there is a version skew between the
+                                   AFS plugin and the extension, then
+                                   this parameter will ensure that the
+                                   AFS plugin understands the correct
+                                   version of the structure. */
+ 
+     khm_ui_4  version;          /*!< Version of the AFS plugin that
+                                   the extension is compiled for.  Set
+                                   this to ::AFS_PLUGIN_VERSION.
+                                   Depending on this value, the AFS
+                                   plugin will either reject the
+                                   extension or determine which set of
+                                   messages and structures should be
+                                   used to communicate with the
+                                   extension. */
+ 
+     const wchar_t * name;       /*!< Name of the extension.  Should be
+                                   unique among all AFS extension
+                                   plugins. Size constrained by
+                                   ::KHUI_MAXCCH_NAME*/
+ 
+     khm_handle sub;             /*!< A valid subscription for unicast
+                                   messages.  This must have been
+                                   created through
+                                   kmq_create_subscription().  The
+                                   supplied handle will be
+                                   automatically released when the
+                                   plugin exits.  However, if the
+                                   announcement message fails, then the
+                                   extension has to release the handle
+                                   itself. */
+ 
+     khm_boolean provide_token_acq; /*!< non-zero if the extension
+                                      provides a token acquisition
+                                      method. The \a token_acq
+                                      substructure should be filled if
+                                      this member is set to
+                                      non-zero. */
+ 
+     struct {
+         const wchar_t * short_desc; /*!< Short description of token
+                                   acquisition method. (localized,
+                                   required).  Size is constrained by
+                                   ::KHUI_MAXCCH_SHORT_DESC */
+ 
+         const wchar_t * long_desc; /*!< Long description.  (localized,
+                                   optional).  Size is constrained by
+                                   ::KHUI_MAXCCH_LONG_DESC */
+ 
+         afs_tk_method method_id; /*!< Once the message is processed,
+                                   this will receive a new method
+                                   identifier.  The value of this field
+                                   on entry is ignored. */
+ 
+     } token_acq;                /*!< Registration information for
+                                   token acquisition method.  Only
+                                   assumed to be valid if \a
+                                   provide_token_acq is TRUE. */
+ 
+ } afs_msg_announce;
+ 
+ /*! \brief Sent to all extensions to resolve the identity of a token
+ 
+     If the identity and credentials acquisition method of an AFS token
+     cannot be determined by the AFS plugin, this message is sent out
+     to extension plugins to allow them a chance to resolve it.
+ 
+     If the extension plugin successfully resolves the identity and
+     token acquisition method of the specified token, it should return
+     ::KHM_ERROR_SUCCESS.  Otherwise it should return a failure code.
+     The actual return code is not interpreted other than whether or
+     not it passes the ::KHM_SUCCEEDED() test.
+ 
+     <table>
+     <tr><td>Type</td><td>type ID of ::AFS_MSG_TYPENAME</td></tr>
+     <tr><td>Subtype</td><td>::AFS_MSG_RESOLVE_TOKEN</td></tr>
+     <tr><td>uparam</td><td>0</td></tr>
+     <tr><td>vparam</td><td>Pointer to a ::afs_msg_resolve_token structure</td></tr>
+     </table>
+ 
+     \note This message is only sent from the AFS plugin to extension plugins
+ 
+     \note Only sent if the extension plugin has ::provide_token_acq set.
+  */
+ #define AFS_MSG_RESOLVE_TOKEN 2
+ 
+ /*! \brief Message structure for AFS_MSG_RESOLVE_TOKEN
+ 
+     Other than the fields marked as \a [OUT], all other fields should
+     be considered read-only and should not be modified.
+ 
+     \see ::AFS_MSG_RESOLVE_TOKEN
+  */
+ typedef struct tag_afs_msg_resolve_token_v1 {
+     khm_size cbsize;            /*!< Size of the structure.  This will
+                                   be set to \a
+                                   sizeof(::afs_msg_resolve_token). */
+ 
+     const wchar_t * cell;       /*!< Specifies the cell that the token
+                                   belongs to. */
+ 
+     const struct ktc_token * token; /*!< The token */
+     const struct ktc_principal * serverp; /*!< Server principal */
+     const struct ktc_principal * clientp; /*!< Client principal */
+ 
+     khm_handle ident;           /*!< [OUT] If the extension
+                                   successfully resolves the identity,
+                                   then it should assign a handle to
+                                   the identity to this field and
+                                   return ::KHM_ERROR_SUCCESS.  The
+                                   handle will be automatically freed
+                                   by the AFS plugin. */
+ 
+     afs_tk_method method;       /*!< [OUT] If the extension
+                                   successfully resolves the identity,
+                                   it should also assign the token
+                                   acquisition method identifier to
+                                   this field.  The default method is
+                                   ::AFS_TOKEN_AUTO.  This field
+                                   indicates the token acquisition
+                                   method that was used to obtain the
+                                   token and is used when the token
+                                   needs to be renewed. */
+ } afs_msg_resolve_token;
+ 
+ /*! \brief Sent to an extension plugin to obtain AFS tokens
+ 
+     <table>
+     <tr><td>Type</td><td>type ID of ::AFS_MSG_TYPENAME</td></tr>
+     <tr><td>Subtype</td><td>::AFS_MSG_KLOG</td></tr>
+     <tr><td>uparam</td><td>0</td></tr>
+     <tr><td>vparam</td><td>Pointer to a ::afs_msg_klog</td></tr>
+     </table>
+ 
+     \note Only sent from the AFS plugin to extension plugins
+     \note Only sent to extension plugins which have ::provide_token_acq set.
+ */
+ #define AFS_MSG_KLOG 3
+ 
+ /*! \brief Cell configuration information
+ 
+     \see ::afs_msg_klog
+ 
+     \note This structure uses ANSI char fields instead of unicode fields.
+  */
+ typedef struct tag_afs_conf_cellA_v1 {
+     khm_size cbsize;            /*!< set to \a sizeof(afs_conf_cell) */
+ 
+     char     name[MAXCELLCHARS]; /*!< Name of the cell */
+     short    numServers;        /*!< Number of servers for cell.
+                                   Upper bound of MAXHOSTSPERCELL */
+     short    flags;             /*!< Not used. Set to zero. */
+     struct sockaddr_in hostAddr[MAXHOSTSPERCELL];
+                                 /*!< addresses for each server.  There
+                                   are \a numServers entries.*/
+     char     hostName[MAXHOSTSPERCELL][MAXHOSTCHARS];
+                                 /*!< names of the servers. There are
+                                   \a numServers entries. */
+     char *   linkedCell;        /*!< Not used.  Set to zero. */
+ } afs_conf_cell;
+ 
+ /*! \brief Message parameters for AFS_MSG_KLOG message
+ 
+     \see ::AFS_MSG_KLOG
+ 
+     \note This structure uses ANSI char fields instead of unicode fields.
+  */
+ typedef struct tag_afs_msg_klogA_v1 {
+     khm_size        cbsize;     /*!< Set to \a sizeof(afs_msg_klog) */
+ 
+     khm_handle      identity;   /*!< Handle to identity for which we
+                                   are obtaining tokens. */
+ 
+     const char *    service;    /*!< Service name to use when
+                                   obtaining token.  This can be NULL
+                                   if the service name has not be
+                                   determined. */
+ 
+     const char *    cell;       /*!< Name of cell to obtain tokens
+                                   for.  Can be NULL if the local cell
+                                   is to be used. */
+ 
+     const char *    realm;      /*!< Realm to use when obtaining
+                                   tokens.  Can be NULL if the realm
+                                   has not been determined. */
+ 
+     const afs_conf_cell * cell_config; /*!< Cell configuration for the
+                                    cell specified in \a cell. */
+ 
+     khm_int32       lifetime;   /*!< Advisory lifetime specifier, in
+                                   seconds.  If set to zero, means
+                                   there is no specification for
+                                   lifetime.  Extensions should feel
+                                   free to ignore this parameter. */
+ } afs_msg_klog;
+ 
+ /*!@}*/
+ 
+ /*!@}*/
+ 
+ #endif
Index: openafs/src/WINNT/netidmgr_plugin/afsplugin.c
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/afsplugin.c:1.1.2.3
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/afsplugin.c	Mon Oct 16 09:55:35 2006
***************
*** 0 ****
--- 1,642 ----
+ /*
+  * Copyright (c) 2005,2006 Secure Endpoints Inc.
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: afsplugin.c,v 1.1.2.3 2006/10/16 13:55:35 jaltman Exp $ */
+ 
+ #include<afscred.h>
+ #include<kcreddb.h>
+ #include<khmsgtypes.h>
+ #include<kherror.h>
+ #include<khuidefs.h>
+ #include<commctrl.h>
+ #include<assert.h>
+ 
+ static BOOL initialized = FALSE;
+ khm_int32 afs_credtype_id = -1;
+ khm_int32 krb5_credtype_id = -1;
+ khm_int32 krb4_credtype_id = -1;
+ khm_int32 afs_msg_type_id = -1;
+ khm_int32 afs_type_principal = -1;
+ khm_int32 afs_type_method = -1;
+ khm_int32 afs_attr_client_princ = -1;
+ khm_int32 afs_attr_server_princ = -1;
+ khm_int32 afs_attr_cell = -1;
+ khm_int32 afs_attr_method = -1;
+ khm_int32 afs_attr_realm = -1;
+ khm_handle afs_credset = NULL;
+ khm_handle afs_sub = NULL;      /* AFS message subscription */
+ 
+ /* forward dcls */
+ khm_int32 KHMAPI 
+ afs_msg_system(khm_int32 msg_subtype, khm_ui_4 uparam, void * vparam);
+ 
+ khm_int32 KHMAPI 
+ afs_msg_kcdb(khm_int32 msg_subtype, khm_ui_4 uparam, void * vparam);
+ 
+ khm_int32 KHMAPI 
+ afs_msg_cred(khm_int32 msg_subtype, khm_ui_4 uparam, void * vparam);
+ 
+ khm_int32 KHMAPI 
+ afs_msg_ext(khm_int32 msg_subtype, khm_ui_4 uparam, void * vparam);
+ 
+ /* AFS plugin callback */
+ khm_int32 KHMAPI 
+ afs_plugin_cb(khm_int32 msg_type,
+               khm_int32 msg_subtype,
+               khm_ui_4 uparam,
+               void * vparam)
+ {
+     if (msg_type == KMSG_SYSTEM)
+         return afs_msg_system(msg_subtype, uparam, vparam);
+     if (msg_type == KMSG_KCDB)
+         return afs_msg_kcdb(msg_subtype, uparam, vparam);
+     if (msg_type == KMSG_CRED)
+         return afs_msg_cred(msg_subtype, uparam, vparam);
+     if (msg_type == afs_msg_type_id)
+         return afs_msg_ext(msg_subtype, uparam, vparam);
+ 
+     return KHM_ERROR_SUCCESS;
+ }
+ 
+ /* ktc_principal attribute type */
+ /* String */
+ 
+ khm_int32 KHMAPI 
+ afs_type_principal_toString(const void * d, 
+                             khm_size cbd, 
+                             wchar_t * buffer, 
+                             khm_size * cb_buf, 
+                             khm_int32 flags)
+ {
+     size_t cbsize;
+     struct ktc_principal * p;
+     wchar_t sprinc[512] = L"";
+ 
+     if(!cb_buf)
+         return KHM_ERROR_INVALID_PARAM;
+ 
+     p = (struct ktc_principal *) d;
+ 
+     // assume this works.
+     afs_princ_to_string(p, sprinc, sizeof(sprinc));
+     StringCbLength(sprinc, sizeof(sprinc), &cbsize);
+     cbsize += sizeof(wchar_t);
+ 
+     if(!buffer || *cb_buf < cbsize) {
+         *cb_buf = cbsize;
+         return KHM_ERROR_TOO_LONG;
+     }
+ 
+     StringCbCopy(buffer, *cb_buf, sprinc);
+ 
+     *cb_buf = cbsize;
+ 
+     return KHM_ERROR_SUCCESS;
+ }
+ 
+ khm_boolean KHMAPI 
+ afs_type_principal_isValid(const void * d,
+                            khm_size cbd)
+ {
+     /*TODO: check for more inconsistencies */
+     if(cbd != sizeof(struct ktc_principal))
+         return FALSE;
+     return TRUE;
+ }
+ 
+ khm_int32 KHMAPI 
+ afs_type_principal_comp(const void * d1,
+                         khm_size cbd1,
+                         const void * d2,
+                         khm_size cbd2)
+ {
+     struct ktc_principal * p1 = (struct ktc_principal *) d1;
+     struct ktc_principal * p2 = (struct ktc_principal *) d2;
+     int r;
+ 
+     r = strcmp(p1->name, p2->name);
+     if(r != 0)
+         return r;
+     r = strcmp(p1->instance, p2->instance);
+     if(r != 0)
+         return r;
+     r = strcmp(p1->cell, p2->cell);
+     return r;
+ }
+ 
+ khm_int32 KHMAPI 
+ afs_type_principal_dup(const void * d_src,
+                        khm_size cbd_src,
+                        void * d_dst,
+                        khm_size * cbd_dst)
+ {
+     if(!d_dst || *cbd_dst < sizeof(struct ktc_principal)) {
+         *cbd_dst = sizeof(struct ktc_principal);
+         return KHM_ERROR_TOO_LONG;
+     }
+ 
+     memcpy(d_dst, d_src, sizeof(struct ktc_principal));
+     *cbd_dst = sizeof(struct ktc_principal);
+ 
+     return KHM_ERROR_SUCCESS;
+ }
+ 
+ khm_int32 KHMAPI
+ afs_type_method_toString(const void * data,
+                          khm_size     cb_data,
+                          wchar_t *    s_buf,
+                          khm_size *   pcb_s_buf,
+                          khm_int32    flags) {
+     khm_int32 * pmethod = (khm_int32 *) data;
+     wchar_t wbuf[KHUI_MAXCCH_LONG_DESC];
+     khm_size cb;
+ 
+     if (!data || cb_data != sizeof(khm_int32))
+         return KHM_ERROR_INVALID_PARAM;
+ 
+     wbuf[0] = L'\0';
+     if (!afs_method_describe(*pmethod, flags, wbuf, sizeof(wbuf))) {
+         LoadString(hResModule,
+                    IDS_NC_METHOD_INVALID,
+                    wbuf,
+                    ARRAYLENGTH(wbuf));
+     }
+ 
+     StringCbLength(wbuf, sizeof(wbuf), &cb);
+     cb += sizeof(wchar_t);
+ 
+     if (!s_buf || *pcb_s_buf < cb) {
+         *pcb_s_buf = cb;
+         return KHM_ERROR_TOO_LONG;
+     } else {
+         StringCbCopy(s_buf, *pcb_s_buf, wbuf);
+         *pcb_s_buf = cb;
+         return KHM_ERROR_SUCCESS;
+     }
+ }
+ 
+ /* process KMSG_SYSTEM messages */
+ khm_int32 KHMAPI 
+ afs_msg_system(khm_int32 msg_subtype, 
+                khm_ui_4 uparam, 
+                void * vparam)
+ {
+     khm_int32 rv = KHM_ERROR_UNKNOWN;
+ 
+     switch(msg_subtype) {
+     case KMSG_SYSTEM_INIT:
+         /* Perform critical registrations and data structure
+            initalization */
+         {
+             kcdb_credtype ct;
+             wchar_t buf[KCDB_MAXCCH_LONG_DESC];
+             size_t cbsize;
+             kcdb_attrib att;
+             khm_handle csp_afscred = NULL;
+             khm_int32 disable_afscreds = FALSE;
+ 
+             ZeroMemory(&ct, sizeof(ct));
+             /* first of all, register the AFS token credential type */
+             ct.id = KCDB_CREDTYPE_AUTO;
+             ct.name = AFS_CREDTYPE_NAME;
+ 
+             if(LoadString(hResModule, 
+                           IDS_AFS_SHORT_DESC, 
+                           buf, 
+                           ARRAYLENGTH(buf)) != 0) {
+                 StringCbLength(buf, sizeof(buf), &cbsize);
+                 cbsize += sizeof(wchar_t);
+                 ct.short_desc = PMALLOC(cbsize);
+                 StringCbCopy(ct.short_desc, cbsize, buf);
+             } else
+                 ct.short_desc = NULL;
+ 
+             if(LoadString(hResModule, 
+                           IDS_AFS_LONG_DESC, 
+                           buf, 
+                           ARRAYLENGTH(buf)) != 0) {
+                 StringCbLength(buf, sizeof(buf), &cbsize);
+                 cbsize += sizeof(wchar_t);
+                 ct.long_desc = PMALLOC(cbsize);
+                 StringCbCopy(ct.long_desc, cbsize, buf);
+             } else
+                 ct.long_desc = NULL;
+ 
+             ct.icon = LoadImage(hResModule, 
+                                 MAKEINTRESOURCE(IDI_AFSTOKEN), 
+                                 IMAGE_ICON, 
+                                 0, 0, LR_DEFAULTSIZE);
+ 
+             kmq_create_subscription(afs_plugin_cb, &afs_sub);
+             ct.sub = afs_sub;
+ 
+             kcdb_credtype_register(&ct, &afs_credtype_id);
+ 
+             /* register the attribute types */
+             {
+                 kcdb_type type;
+ 
+                 ZeroMemory(&type, sizeof(type));
+                 type.comp = afs_type_principal_comp;
+                 type.dup = afs_type_principal_dup;
+                 type.isValid = afs_type_principal_isValid;
+                 type.toString = afs_type_principal_toString;
+                 type.name = AFS_TYPENAME_PRINCIPAL;
+                 type.id = KCDB_TYPE_INVALID;
+                 type.cb_max = sizeof(struct ktc_principal);
+                 type.cb_min = sizeof(struct ktc_principal);
+                 type.flags = KCDB_TYPE_FLAG_CB_FIXED;
+ 
+                 if(KHM_FAILED(kcdb_type_register(&type, 
+                                                  &afs_type_principal)))
+                     goto _exit_init;
+             }
+ 
+             {
+                 kcdb_type type;
+                 kcdb_type *ti32 = NULL;
+ 
+                 kcdb_type_get_info(KCDB_TYPE_INT32, &ti32);
+ 
+                 ZeroMemory(&type, sizeof(type));
+                 type.comp = ti32->comp;
+                 type.dup = ti32->dup;
+                 type.isValid = ti32->isValid;
+                 type.toString = afs_type_method_toString;
+                 type.name = AFS_TYPENAME_METHOD;
+                 type.id = KCDB_TYPE_INVALID;
+                 type.cb_max = sizeof(khm_int32);
+                 type.cb_min = sizeof(khm_int32);
+                 type.flags = KCDB_TYPE_FLAG_CB_FIXED;
+ 
+                 if(KHM_FAILED(kcdb_type_register(&type, 
+                                                  &afs_type_method))) {
+                     kcdb_type_release_info(ti32);
+                     goto _exit_init;
+                 }
+ 
+                 kcdb_type_release_info(ti32);
+             }
+ 
+             /* now register the attributes */
+             {
+                 wchar_t short_desc[KCDB_MAXCCH_SHORT_DESC];
+                     
+                 ZeroMemory(&att, sizeof(att));
+ 
+                 att.type = KCDB_TYPE_STRING;
+                 att.name = AFS_ATTRNAME_CELL;
+                 LoadString(hResModule, 
+                            IDS_ATTR_CELL_SHORT_DESC, 
+                            short_desc, 
+                            ARRAYLENGTH(short_desc));
+                 att.short_desc = short_desc;
+                 att.long_desc = NULL;
+                 att.id = KCDB_ATTR_INVALID;
+                 att.flags = KCDB_ATTR_FLAG_TRANSIENT;
+                     
+                 if(KHM_FAILED(rv = kcdb_attrib_register(&att, 
+                                                         &afs_attr_cell)))
+                     goto _exit_init;
+             }
+ 
+             {
+                 wchar_t short_desc[KCDB_MAXCCH_SHORT_DESC];
+                     
+                 ZeroMemory(&att, sizeof(att));
+ 
+                 att.type = KCDB_TYPE_STRING;
+                 att.name = AFS_ATTRNAME_REALM;
+                 LoadString(hResModule, 
+                            IDS_ATTR_REALM_SHORT_DESC, 
+                            short_desc, 
+                            ARRAYLENGTH(short_desc));
+                 att.short_desc = short_desc;
+                 att.long_desc = NULL;
+                 att.id = KCDB_ATTR_INVALID;
+                 att.flags = KCDB_ATTR_FLAG_TRANSIENT;
+                     
+                 if(KHM_FAILED(rv = kcdb_attrib_register(&att, 
+                                                         &afs_attr_realm)))
+                     goto _exit_init;
+             }
+ 
+             {
+                 wchar_t short_desc[KCDB_MAXCCH_SHORT_DESC];
+                     
+                 ZeroMemory(&att, sizeof(att));
+ 
+                 att.type = afs_type_method;
+                 att.name = AFS_ATTRNAME_METHOD;
+                 LoadString(hResModule, 
+                            IDS_ATTR_METHOD_SHORT_DESC, 
+                            short_desc, 
+                            ARRAYLENGTH(short_desc));
+                 att.short_desc = short_desc;
+                 att.long_desc = NULL;
+                 att.id = KCDB_ATTR_INVALID;
+                 att.flags = KCDB_ATTR_FLAG_TRANSIENT;
+                     
+                 if(KHM_FAILED(rv = kcdb_attrib_register(&att, 
+                                                         &afs_attr_method)))
+                     goto _exit_init;
+             }
+ 
+             {
+                 wchar_t short_desc[KCDB_MAXCCH_SHORT_DESC];
+ 
+                 ZeroMemory(&att, sizeof(att));
+ 
+                 att.type = afs_type_principal;
+                 att.name = AFS_ATTRNAME_CLIENT_PRINC;
+                 LoadString(hResModule, 
+                            IDS_ATTR_CLIENT_PRINC_SHORT_DESC, 
+                            short_desc, 
+                            ARRAYLENGTH(short_desc));
+                 att.short_desc = short_desc;
+                 att.long_desc = NULL;
+                 att.id = KCDB_ATTR_INVALID;
+                 att.flags = KCDB_ATTR_FLAG_TRANSIENT;
+                     
+                 if(KHM_FAILED(rv = kcdb_attrib_register(&att, &afs_attr_client_princ)))
+                     goto _exit_init;
+             }
+ 
+             {
+                 wchar_t short_desc[KCDB_MAXCCH_SHORT_DESC];
+ 
+                 ZeroMemory(&att, sizeof(att));
+ 
+                 att.type = afs_type_principal;
+                 att.name = AFS_ATTRNAME_SERVER_PRINC;
+                 LoadString(hResModule, 
+                            IDS_ATTR_SERVER_PRINC_SHORT_DESC, 
+                            short_desc, ARRAYLENGTH(short_desc));
+                 att.short_desc = short_desc;
+                 att.long_desc = NULL;
+                 att.id = KCDB_ATTR_INVALID;
+                 att.flags = KCDB_ATTR_FLAG_TRANSIENT;
+                     
+                 if(KHM_FAILED(rv = kcdb_attrib_register(&att, &afs_attr_server_princ)))
+                     goto _exit_init;
+             }
+ 
+             /* afs_credset is our stock credentials set that we
+                use for all our credset needs (instead of creating
+                a new one every time) */
+ 
+             if(KHM_FAILED(rv = kcdb_credset_create(&afs_credset)))
+                 goto _exit_init;
+ 
+             if(KHM_FAILED(rv = kcdb_credtype_get_id(KRB5_CREDTYPE_NAME,
+                                                     &krb5_credtype_id)))
+                 goto _exit_init;
+ 
+             /* register the configuration nodes */
+             {
+                 khui_config_node node_ident;
+                 khui_config_node_reg reg;
+                 wchar_t wshort_desc[KHUI_MAXCCH_SHORT_DESC];
+                 wchar_t wlong_desc[KHUI_MAXCCH_LONG_DESC];
+ 
+                 if (KHM_FAILED(rv = khui_cfg_open(NULL,
+                                                   L"KhmIdentities",
+                                                   &node_ident)))
+                     goto _exit_init;
+ 
+                 ZeroMemory(&reg, sizeof(reg));
+                 reg.name = AFS_CONFIG_NODE_MAIN;
+                 reg.short_desc = wshort_desc;
+                 reg.long_desc = wlong_desc;
+                 reg.h_module = hResModule;
+                 reg.dlg_template = MAKEINTRESOURCE(IDD_CFG_AFS);
+                 reg.dlg_proc = afs_cfg_main_proc;
+                 reg.flags = 0;
+                 LoadString(hResModule, IDS_CFG_MAIN_LONG,
+                            wlong_desc, ARRAYLENGTH(wlong_desc));
+                 LoadString(hResModule, IDS_CFG_MAIN_SHORT,
+                            wshort_desc, ARRAYLENGTH(wshort_desc));
+ 
+                 khui_cfg_register(NULL, &reg);
+ 
+                 ZeroMemory(&reg, sizeof(reg));
+                 reg.name = AFS_CONFIG_NODE_IDS;
+                 reg.short_desc = wshort_desc;
+                 reg.long_desc = wshort_desc;
+                 reg.h_module = hResModule;
+                 reg.dlg_template = MAKEINTRESOURCE(IDD_CFG_IDS_TAB);
+                 reg.dlg_proc = afs_cfg_ids_proc;
+                 reg.flags = KHUI_CNFLAG_SUBPANEL;
+                 LoadString(hResModule, IDS_CFG_IDS_TAB,
+                            wshort_desc, ARRAYLENGTH(wshort_desc));
+ 
+                 khui_cfg_register(node_ident, &reg);
+ 
+                 ZeroMemory(&reg, sizeof(reg));
+                 reg.name = AFS_CONFIG_NODE_ID;
+                 reg.short_desc = wshort_desc;
+                 reg.long_desc = wshort_desc;
+                 reg.h_module = hResModule;
+                 reg.dlg_template = MAKEINTRESOURCE(IDD_CFG_ID_TAB);
+                 reg.dlg_proc = afs_cfg_id_proc;
+                 reg.flags = KHUI_CNFLAG_SUBPANEL | KHUI_CNFLAG_PLURAL;
+                 LoadString(hResModule, IDS_CFG_ID_TAB,
+                            wshort_desc, ARRAYLENGTH(wshort_desc));
+ 
+                 khui_cfg_register(node_ident, &reg);
+             }
+ 
+             /* and register the AFS message type */
+             rv = kmq_register_type(AFS_MSG_TYPENAME, &afs_msg_type_id);
+ 
+             if (KHM_SUCCEEDED(rv))
+                 kmq_subscribe(afs_msg_type_id, afs_plugin_cb);
+ 
+             /* if the configuration is set to disable afscreds.exe,
+                then we look for the shortcut and remove it if
+                found. */
+             if (KHM_SUCCEEDED(kmm_get_plugin_config(AFS_PLUGIN_NAME,
+                                                     0,
+                                                     &csp_afscred))) {
+                 wchar_t wpath[MAX_PATH];
+ 
+                 khc_read_int32(csp_afscred, L"Disableafscreds",
+                                &disable_afscreds);
+ 
+                 if (disable_afscreds &&
+                     afs_cfg_get_afscreds_shortcut(wpath)) {
+ 
+                     DeleteFile(wpath);
+ 
+                 }
+ 
+                 khc_close_space(csp_afscred);
+             }
+ 
+         _exit_init:
+             if(ct.short_desc)
+                 PFREE(ct.short_desc);
+             if(ct.long_desc)
+                 PFREE(ct.long_desc);
+         }
+         /* now that the critical stuff is done, we move on to the
+            non-critical stuff */
+         if(KHM_SUCCEEDED(rv)) {
+             initialized = TRUE;
+ 
+             /* obtain existing tokens */
+             afs_list_tokens();
+         }
+ 
+         /* define this so that if there are no TGT's, we don't
+            deadlock trying to open a new creds dialog from within the
+            new creds dialog. */
+         SetEnvironmentVariable(L"KERBEROSLOGIN_NEVER_PROMPT", L"1");
+ 
+         break;
+         /* end of KMSG_SYSTEM_INIT */
+ 
+     case KMSG_SYSTEM_EXIT:
+         if (afs_msg_type_id != -1) {
+             kmq_unsubscribe(afs_msg_type_id, afs_plugin_cb);
+             kmq_unregister_type(afs_msg_type_id);
+         }
+         if(afs_credtype_id >= 0) {
+             kcdb_credtype_unregister(afs_credtype_id);
+         }
+ #if 0
+         if(afs_attr_client >= 0) {
+             kcdb_attrib_unregister(afs_attr_client);
+         }
+ #endif
+         if(afs_attr_cell >= 0) {
+             kcdb_attrib_unregister(afs_attr_cell);
+         }
+         if(afs_attr_realm >= 0) {
+             kcdb_attrib_unregister(afs_attr_realm);
+         }
+         if(afs_attr_method >= 0) {
+             kcdb_attrib_unregister(afs_attr_method);
+         }
+         if(afs_attr_client_princ >= 0) {
+             kcdb_attrib_unregister(afs_attr_client_princ);
+         }
+         if(afs_attr_server_princ >= 0) {
+             kcdb_attrib_unregister(afs_attr_server_princ);
+         }
+         if(afs_type_principal >= 0) {
+             kcdb_type_unregister(afs_type_principal);
+         }
+         if(afs_type_method >= 0) {
+             kcdb_type_unregister(afs_type_method);
+         }
+         initialized = FALSE;
+         if(afs_credset)
+             kcdb_credset_delete(afs_credset);
+ 
+         /* afs_sub doesn't need to be deleted.  That is taken care
+            of when unregistering the afs cred type */
+         afs_sub = NULL;
+ 
+         rv = KHM_ERROR_SUCCESS;
+         break;
+         /* end of KMSG_SYSTEM_EXIT */
+     }
+     return rv;
+ }
+ 
+ /* process KMSG_KCDB messages */
+ khm_int32 KHMAPI 
+ afs_msg_kcdb(khm_int32 msg_subtype, 
+              khm_ui_4 uparam, 
+              void * vparam)
+ {
+     khm_int32 rv = KHM_ERROR_SUCCESS;
+ 
+     /* we don't really do anything with this yet */
+ #if 0
+     switch(msg_subtype) {
+     }
+ #endif
+ 
+     return rv;
+ }
+ 
+ 
+ 
+ static khm_int32 KHMAPI
+ afs_cred_destroy_proc(khm_handle cred, void * rock) {
+     khm_int32 t;
+ 
+     if (KHM_FAILED(kcdb_cred_get_type(cred, &t)) ||
+         t != afs_credtype_id)
+         return KHM_ERROR_SUCCESS;
+ 
+     afs_unlog_cred(cred);
+ 
+     return KHM_ERROR_SUCCESS;
+ }
+ 
+ /* process KMSG_CRED messages */
+ khm_int32 KHMAPI 
+ afs_msg_cred(khm_int32 msg_subtype, 
+              khm_ui_4 uparam, 
+              void * vparam)
+ {
+     khm_int32 rv = KHM_ERROR_SUCCESS;
+ 
+     switch(msg_subtype) {
+     case KMSG_CRED_REFRESH:
+         afs_list_tokens();
+         break;
+ 
+     case KMSG_CRED_DESTROY_CREDS:
+         {
+             khui_action_context * ctx;
+ 
+             ctx = (khui_action_context *) vparam;
+ 
+             if (ctx->credset) {
+                 _begin_task(0);
+                 _report_cs0(KHERR_INFO, L"Destroying AFS Tokens");
+                 _describe();
+ 
+                 kcdb_credset_apply(ctx->credset,
+                                    afs_cred_destroy_proc,
+                                    NULL);
+ 
+                 _end_task();
+             }
+         }
+         break;
+ 
+     default:
+ 
+         if (IS_CRED_ACQ_MSG(msg_subtype))
+             return afs_msg_newcred(msg_subtype, uparam, vparam);
+     }
+ 
+     return rv;
+ }
+ 
Index: openafs/src/WINNT/netidmgr_plugin/afsplugin_custom.c
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/afsplugin_custom.c:1.1.2.3
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/afsplugin_custom.c	Mon Oct 16 09:55:35 2006
***************
*** 0 ****
--- 1,69 ----
+ /*
+  * Copyright (c) 2005,2006 Secure Endpoints Inc.
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: afsplugin_custom.c,v 1.1.2.3 2006/10/16 13:55:35 jaltman Exp $ */
+ 
+ #include<windows.h>
+ #include<msiquery.h>
+ #include<tchar.h>
+ 
+ static
+ const TCHAR * const dword_props[] = {
+     _TEXT("OPENAFSVERSIONMAJOR"),
+     _TEXT("OPENAFSVERSIONMINOR"),
+     _TEXT("KFWVERSIONMAJOR")
+ };
+ 
+ static void strip_decoration(TCHAR * str, int cchlen) {
+     int i;
+ 
+     if (str[0] != _T('#') || cchlen < 1)
+         return;
+ 
+     for (i=1; i < cchlen && str[i]; i++) {
+         str[i-1] = str[i];
+     }
+ 
+     str[i-1] = _T('\0');
+ }
+ 
+ UINT __stdcall StripRegDecoration(MSIHANDLE hInstall) {
+     TCHAR propbuffer[16];      /* we are looking for string
+                                   representations of DOWRDs.  They
+                                   can't be longer than this. */
+     DWORD cch_buffer;
+     UINT rv;
+     int i;
+ 
+     for (i=0; i < sizeof(dword_props)/sizeof(dword_props[0]); i++) {
+         cch_buffer = sizeof(propbuffer)/sizeof(propbuffer[0]);
+         rv = MsiGetProperty(hInstall, dword_props[i], propbuffer, &cch_buffer);
+         if (rv == ERROR_SUCCESS) {
+             strip_decoration(propbuffer, cch_buffer);
+             MsiSetProperty(hInstall, dword_props[i], propbuffer);
+         }
+     }
+ 
+     return ERROR_SUCCESS;
+ }
Index: openafs/src/WINNT/netidmgr_plugin/dynimport.c
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/dynimport.c:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/dynimport.c	Thu Oct 12 17:19:43 2006
***************
*** 0 ****
--- 1,463 ----
+ /*
+ * Copyright (c) 2005 Massachusetts Institute of Technology
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+ 
+ /* $Id: dynimport.c,v 1.1.2.2 2006/10/12 21:19:43 jaltman Exp $ */
+ 
+ #include<windows.h>
+ #include<khdefs.h>
+ #include<kherror.h>
+ #include<dynimport.h>
+ 
+ HINSTANCE hKrb4 = 0;
+ HINSTANCE hKrb5 = 0;
+ HINSTANCE hKrb524 = 0;
+ HINSTANCE hSecur32 = 0;
+ HINSTANCE hComErr = 0;
+ HINSTANCE hService = 0;
+ HINSTANCE hProfile = 0;
+ HINSTANCE hPsapi = 0; 
+ HINSTANCE hToolHelp32 = 0; 
+ HINSTANCE hCCAPI = 0;
+ 
+ DWORD     AfsAvailable = 0;
+ 
+ // CCAPI
+ DECL_FUNC_PTR(cc_initialize);
+ DECL_FUNC_PTR(cc_shutdown);
+ DECL_FUNC_PTR(cc_get_NC_info);
+ DECL_FUNC_PTR(cc_free_NC_info);
+ 
+ // krb4 functions
+ DECL_FUNC_PTR(get_krb_err_txt_entry);
+ DECL_FUNC_PTR(k_isinst);
+ DECL_FUNC_PTR(k_isname);
+ DECL_FUNC_PTR(k_isrealm);
+ DECL_FUNC_PTR(kadm_change_your_password);
+ DECL_FUNC_PTR(kname_parse);
+ DECL_FUNC_PTR(krb_get_cred);
+ DECL_FUNC_PTR(krb_get_krbhst);
+ DECL_FUNC_PTR(krb_get_lrealm);
+ DECL_FUNC_PTR(krb_get_pw_in_tkt);
+ DECL_FUNC_PTR(krb_get_tf_realm);
+ DECL_FUNC_PTR(krb_mk_req);
+ DECL_FUNC_PTR(krb_realmofhost);
+ DECL_FUNC_PTR(tf_init);
+ DECL_FUNC_PTR(tf_close);
+ DECL_FUNC_PTR(tf_get_cred);
+ DECL_FUNC_PTR(tf_get_pname);
+ DECL_FUNC_PTR(tf_get_pinst);
+ DECL_FUNC_PTR(LocalHostAddr);
+ DECL_FUNC_PTR(tkt_string);
+ DECL_FUNC_PTR(krb_set_tkt_string);
+ DECL_FUNC_PTR(initialize_krb_error_func);
+ DECL_FUNC_PTR(initialize_kadm_error_table);
+ DECL_FUNC_PTR(dest_tkt);
+ DECL_FUNC_PTR(krb_in_tkt);
+ DECL_FUNC_PTR(krb_save_credentials);
+ DECL_FUNC_PTR(krb_get_krbconf2);
+ DECL_FUNC_PTR(krb_get_krbrealm2);
+ DECL_FUNC_PTR(krb_life_to_time);
+ 
+ // krb5 functions
+ DECL_FUNC_PTR(krb5_change_password);
+ DECL_FUNC_PTR(krb5_get_init_creds_opt_init);
+ DECL_FUNC_PTR(krb5_get_init_creds_opt_set_tkt_life);
+ DECL_FUNC_PTR(krb5_get_init_creds_opt_set_renew_life);
+ DECL_FUNC_PTR(krb5_get_init_creds_opt_set_forwardable);
+ DECL_FUNC_PTR(krb5_get_init_creds_opt_set_proxiable);
+ DECL_FUNC_PTR(krb5_get_init_creds_opt_set_address_list);
+ DECL_FUNC_PTR(krb5_get_init_creds_password);
+ DECL_FUNC_PTR(krb5_get_prompt_types);
+ DECL_FUNC_PTR(krb5_build_principal_ext);
+ DECL_FUNC_PTR(krb5_cc_get_name);
+ DECL_FUNC_PTR(krb5_cc_get_type);
+ DECL_FUNC_PTR(krb5_cc_resolve);
+ DECL_FUNC_PTR(krb5_cc_default);
+ DECL_FUNC_PTR(krb5_cc_default_name);
+ DECL_FUNC_PTR(krb5_cc_set_default_name);
+ DECL_FUNC_PTR(krb5_cc_initialize);
+ DECL_FUNC_PTR(krb5_cc_destroy);
+ DECL_FUNC_PTR(krb5_cc_close);
+ DECL_FUNC_PTR(krb5_cc_store_cred);
+ DECL_FUNC_PTR(krb5_cc_copy_creds);
+ DECL_FUNC_PTR(krb5_cc_retrieve_cred);
+ DECL_FUNC_PTR(krb5_cc_get_principal);
+ DECL_FUNC_PTR(krb5_cc_start_seq_get);
+ DECL_FUNC_PTR(krb5_cc_next_cred);
+ DECL_FUNC_PTR(krb5_cc_end_seq_get);
+ DECL_FUNC_PTR(krb5_cc_remove_cred);
+ DECL_FUNC_PTR(krb5_cc_set_flags);
+ // DECL_FUNC_PTR(krb5_cc_get_type);
+ DECL_FUNC_PTR(krb5_free_context);
+ DECL_FUNC_PTR(krb5_free_cred_contents);
+ DECL_FUNC_PTR(krb5_free_principal);
+ DECL_FUNC_PTR(krb5_get_in_tkt_with_password);
+ DECL_FUNC_PTR(krb5_init_context);
+ DECL_FUNC_PTR(krb5_parse_name);
+ DECL_FUNC_PTR(krb5_timeofday);
+ DECL_FUNC_PTR(krb5_timestamp_to_sfstring);
+ DECL_FUNC_PTR(krb5_unparse_name);
+ DECL_FUNC_PTR(krb5_get_credentials);
+ DECL_FUNC_PTR(krb5_mk_req);
+ DECL_FUNC_PTR(krb5_sname_to_principal);
+ DECL_FUNC_PTR(krb5_get_credentials_renew);
+ DECL_FUNC_PTR(krb5_free_data);
+ DECL_FUNC_PTR(krb5_free_data_contents);
+ // DECL_FUNC_PTR(krb5_get_realm_domain);
+ DECL_FUNC_PTR(krb5_free_unparsed_name);
+ DECL_FUNC_PTR(krb5_os_localaddr);
+ DECL_FUNC_PTR(krb5_copy_keyblock_contents);
+ DECL_FUNC_PTR(krb5_copy_data);
+ DECL_FUNC_PTR(krb5_free_creds);
+ DECL_FUNC_PTR(krb5_build_principal);
+ DECL_FUNC_PTR(krb5_get_renewed_creds);
+ DECL_FUNC_PTR(krb5_get_default_config_files);
+ DECL_FUNC_PTR(krb5_free_config_files);
+ DECL_FUNC_PTR(krb5_get_default_realm);
+ DECL_FUNC_PTR(krb5_set_default_realm);
+ DECL_FUNC_PTR(krb5_free_ticket);
+ DECL_FUNC_PTR(krb5_decode_ticket);
+ DECL_FUNC_PTR(krb5_get_host_realm);
+ DECL_FUNC_PTR(krb5_free_host_realm);
+ DECL_FUNC_PTR(krb5_c_random_make_octets);
+ DECL_FUNC_PTR(krb5_free_addresses);
+ DECL_FUNC_PTR(krb5_free_default_realm);
+ 
+ // Krb524 functions
+ DECL_FUNC_PTR(krb524_init_ets);
+ DECL_FUNC_PTR(krb524_convert_creds_kdc);
+ 
+ // ComErr functions
+ DECL_FUNC_PTR(com_err);
+ DECL_FUNC_PTR(error_message);
+ 
+ // Profile functions
+ DECL_FUNC_PTR(profile_init);    
+ DECL_FUNC_PTR(profile_flush);
+ DECL_FUNC_PTR(profile_release); 
+ DECL_FUNC_PTR(profile_get_subsection_names);
+ DECL_FUNC_PTR(profile_free_list);
+ DECL_FUNC_PTR(profile_get_string);
+ DECL_FUNC_PTR(profile_get_values);
+ DECL_FUNC_PTR(profile_get_relation_names);
+ DECL_FUNC_PTR(profile_clear_relation);
+ DECL_FUNC_PTR(profile_add_relation);
+ DECL_FUNC_PTR(profile_update_relation);
+ DECL_FUNC_PTR(profile_release_string);
+ 
+ // Service functions
+ DECL_FUNC_PTR(OpenSCManagerA);
+ DECL_FUNC_PTR(OpenServiceA);
+ DECL_FUNC_PTR(QueryServiceStatus);
+ DECL_FUNC_PTR(CloseServiceHandle);
+ DECL_FUNC_PTR(LsaNtStatusToWinError);
+ 
+ // LSA Functions
+ DECL_FUNC_PTR(LsaConnectUntrusted);
+ DECL_FUNC_PTR(LsaLookupAuthenticationPackage);
+ DECL_FUNC_PTR(LsaCallAuthenticationPackage);
+ DECL_FUNC_PTR(LsaFreeReturnBuffer);
+ DECL_FUNC_PTR(LsaGetLogonSessionData);
+ 
+ // CCAPI
+ FUNC_INFO ccapi_fi[] = {
+     MAKE_FUNC_INFO(cc_initialize),
+     MAKE_FUNC_INFO(cc_shutdown),
+     MAKE_FUNC_INFO(cc_get_NC_info),
+     MAKE_FUNC_INFO(cc_free_NC_info),
+     END_FUNC_INFO
+ };
+ 
+ FUNC_INFO k4_fi[] = {
+     MAKE_FUNC_INFO(get_krb_err_txt_entry),
+     MAKE_FUNC_INFO(k_isinst),
+     MAKE_FUNC_INFO(k_isname),
+     MAKE_FUNC_INFO(k_isrealm),
+     MAKE_FUNC_INFO(kadm_change_your_password),
+     MAKE_FUNC_INFO(kname_parse),
+     MAKE_FUNC_INFO(krb_get_cred),
+     MAKE_FUNC_INFO(krb_get_krbhst),
+     MAKE_FUNC_INFO(krb_get_lrealm),
+     MAKE_FUNC_INFO(krb_get_pw_in_tkt),
+     MAKE_FUNC_INFO(krb_get_tf_realm),
+     MAKE_FUNC_INFO(krb_mk_req),
+     MAKE_FUNC_INFO(krb_realmofhost),
+     MAKE_FUNC_INFO(tf_init),
+     MAKE_FUNC_INFO(tf_close),
+     MAKE_FUNC_INFO(tf_get_cred),
+     MAKE_FUNC_INFO(tf_get_pname),
+     MAKE_FUNC_INFO(tf_get_pinst),
+     MAKE_FUNC_INFO(LocalHostAddr),
+     MAKE_FUNC_INFO(tkt_string),
+     MAKE_FUNC_INFO(krb_set_tkt_string),
+     MAKE_FUNC_INFO(initialize_krb_error_func),
+     MAKE_FUNC_INFO(initialize_kadm_error_table),
+     MAKE_FUNC_INFO(dest_tkt),
+     /*        MAKE_FUNC_INFO(lsh_LoadKrb4LeashErrorTables), */// XXX
+     MAKE_FUNC_INFO(krb_in_tkt),
+     MAKE_FUNC_INFO(krb_save_credentials),
+     MAKE_FUNC_INFO(krb_get_krbconf2),
+     MAKE_FUNC_INFO(krb_get_krbrealm2),
+     MAKE_FUNC_INFO(krb_life_to_time),
+     END_FUNC_INFO
+ };
+ 
+ FUNC_INFO k5_fi[] = {
+     MAKE_FUNC_INFO(krb5_change_password),
+     MAKE_FUNC_INFO(krb5_get_init_creds_opt_init),
+     MAKE_FUNC_INFO(krb5_get_init_creds_opt_set_tkt_life),
+     MAKE_FUNC_INFO(krb5_get_init_creds_opt_set_renew_life),
+     MAKE_FUNC_INFO(krb5_get_init_creds_opt_set_forwardable),
+     MAKE_FUNC_INFO(krb5_get_init_creds_opt_set_proxiable),
+     MAKE_FUNC_INFO(krb5_get_init_creds_opt_set_address_list),
+     MAKE_FUNC_INFO(krb5_get_init_creds_password),
+     MAKE_FUNC_INFO(krb5_get_prompt_types),
+     MAKE_FUNC_INFO(krb5_build_principal_ext),
+     MAKE_FUNC_INFO(krb5_cc_get_name),
+     MAKE_FUNC_INFO(krb5_cc_get_type),
+     MAKE_FUNC_INFO(krb5_cc_resolve),
+     MAKE_FUNC_INFO(krb5_cc_default),
+     MAKE_FUNC_INFO(krb5_cc_default_name),
+     MAKE_FUNC_INFO(krb5_cc_set_default_name),
+     MAKE_FUNC_INFO(krb5_cc_initialize),
+     MAKE_FUNC_INFO(krb5_cc_destroy),
+     MAKE_FUNC_INFO(krb5_cc_close),
+     MAKE_FUNC_INFO(krb5_cc_copy_creds),
+     MAKE_FUNC_INFO(krb5_cc_store_cred),
+     MAKE_FUNC_INFO(krb5_cc_retrieve_cred),
+     MAKE_FUNC_INFO(krb5_cc_get_principal),
+     MAKE_FUNC_INFO(krb5_cc_start_seq_get),
+     MAKE_FUNC_INFO(krb5_cc_next_cred),
+     MAKE_FUNC_INFO(krb5_cc_end_seq_get),
+     MAKE_FUNC_INFO(krb5_cc_remove_cred),
+     MAKE_FUNC_INFO(krb5_cc_set_flags),
+     // MAKE_FUNC_INFO(krb5_cc_get_type),
+     MAKE_FUNC_INFO(krb5_free_context),
+     MAKE_FUNC_INFO(krb5_free_cred_contents),
+     MAKE_FUNC_INFO(krb5_free_principal),
+     MAKE_FUNC_INFO(krb5_get_in_tkt_with_password),
+     MAKE_FUNC_INFO(krb5_init_context),
+     MAKE_FUNC_INFO(krb5_parse_name),
+     MAKE_FUNC_INFO(krb5_timeofday),
+     MAKE_FUNC_INFO(krb5_timestamp_to_sfstring),
+     MAKE_FUNC_INFO(krb5_unparse_name),
+     MAKE_FUNC_INFO(krb5_get_credentials),
+     MAKE_FUNC_INFO(krb5_mk_req),
+     MAKE_FUNC_INFO(krb5_sname_to_principal),
+     MAKE_FUNC_INFO(krb5_get_credentials_renew),
+     MAKE_FUNC_INFO(krb5_free_data),
+     MAKE_FUNC_INFO(krb5_free_data_contents),
+     //  MAKE_FUNC_INFO(krb5_get_realm_domain),
+     MAKE_FUNC_INFO(krb5_free_unparsed_name),
+     MAKE_FUNC_INFO(krb5_os_localaddr),
+     MAKE_FUNC_INFO(krb5_copy_keyblock_contents),
+     MAKE_FUNC_INFO(krb5_copy_data),
+     MAKE_FUNC_INFO(krb5_free_creds),
+     MAKE_FUNC_INFO(krb5_build_principal),
+     MAKE_FUNC_INFO(krb5_get_renewed_creds),
+     MAKE_FUNC_INFO(krb5_free_addresses),
+     MAKE_FUNC_INFO(krb5_get_default_config_files),
+     MAKE_FUNC_INFO(krb5_free_config_files),
+     MAKE_FUNC_INFO(krb5_get_default_realm),
+     MAKE_FUNC_INFO(krb5_set_default_realm),
+     MAKE_FUNC_INFO(krb5_free_ticket),
+     MAKE_FUNC_INFO(krb5_decode_ticket),
+     MAKE_FUNC_INFO(krb5_get_host_realm),
+     MAKE_FUNC_INFO(krb5_free_host_realm),
+     MAKE_FUNC_INFO(krb5_c_random_make_octets),
+     MAKE_FUNC_INFO(krb5_free_default_realm),
+     END_FUNC_INFO
+ };
+ 
+ FUNC_INFO k524_fi[] = {
+     MAKE_FUNC_INFO(krb524_init_ets),
+     MAKE_FUNC_INFO(krb524_convert_creds_kdc),
+     END_FUNC_INFO
+ };
+ 
+ FUNC_INFO profile_fi[] = {
+     MAKE_FUNC_INFO(profile_init),
+     MAKE_FUNC_INFO(profile_flush),
+     MAKE_FUNC_INFO(profile_release), 
+     MAKE_FUNC_INFO(profile_get_subsection_names),
+     MAKE_FUNC_INFO(profile_free_list),
+     MAKE_FUNC_INFO(profile_get_string),
+     MAKE_FUNC_INFO(profile_get_values),
+     MAKE_FUNC_INFO(profile_get_relation_names),
+     MAKE_FUNC_INFO(profile_clear_relation),
+     MAKE_FUNC_INFO(profile_add_relation),
+     MAKE_FUNC_INFO(profile_update_relation),
+     MAKE_FUNC_INFO(profile_release_string),
+     END_FUNC_INFO
+ };
+ 
+ FUNC_INFO ce_fi[] = {
+     MAKE_FUNC_INFO(com_err),
+     MAKE_FUNC_INFO(error_message),
+     END_FUNC_INFO
+ };
+ 
+ FUNC_INFO service_fi[] = {
+     MAKE_FUNC_INFO(OpenSCManagerA),
+     MAKE_FUNC_INFO(OpenServiceA),
+     MAKE_FUNC_INFO(QueryServiceStatus),
+     MAKE_FUNC_INFO(CloseServiceHandle),
+     MAKE_FUNC_INFO(LsaNtStatusToWinError),
+     END_FUNC_INFO
+ };
+ 
+ FUNC_INFO lsa_fi[] = {
+     MAKE_FUNC_INFO(LsaConnectUntrusted),
+     MAKE_FUNC_INFO(LsaLookupAuthenticationPackage),
+     MAKE_FUNC_INFO(LsaCallAuthenticationPackage),
+     MAKE_FUNC_INFO(LsaFreeReturnBuffer),
+     MAKE_FUNC_INFO(LsaGetLogonSessionData),
+     END_FUNC_INFO
+ };
+ 
+ // psapi functions
+ DECL_FUNC_PTR(GetModuleFileNameExA);
+ DECL_FUNC_PTR(EnumProcessModules);
+ 
+ FUNC_INFO psapi_fi[] = {
+     MAKE_FUNC_INFO(GetModuleFileNameExA),
+         MAKE_FUNC_INFO(EnumProcessModules),
+         END_FUNC_INFO
+ };
+ 
+ // toolhelp functions
+ DECL_FUNC_PTR(CreateToolhelp32Snapshot);
+ DECL_FUNC_PTR(Module32First);
+ DECL_FUNC_PTR(Module32Next);
+ 
+ FUNC_INFO toolhelp_fi[] = {
+     MAKE_FUNC_INFO(CreateToolhelp32Snapshot),
+         MAKE_FUNC_INFO(Module32First),
+         MAKE_FUNC_INFO(Module32Next),
+         END_FUNC_INFO
+ };
+ 
+ khm_int32 init_imports(void) {
+     OSVERSIONINFO osvi;
+     int imp_rv = 1;
+ 
+ #define CKRV if(!imp_rv) goto _err_ret
+ 
+ #ifndef _WIN64
+     imp_rv = LoadFuncs(KRB4_DLL, k4_fi, &hKrb4, 0, 1, 0, 0);
+     CKRV;
+ #endif
+ 
+     imp_rv = LoadFuncs(KRB5_DLL, k5_fi, &hKrb5, 0, 1, 0, 0);
+     CKRV;
+ 
+     imp_rv = LoadFuncs(COMERR_DLL, ce_fi, &hComErr, 0, 0, 1, 0);
+     CKRV;
+ 
+     imp_rv = LoadFuncs(SERVICE_DLL, service_fi, &hService, 0, 1, 0, 0);
+     CKRV;
+ 
+     imp_rv = LoadFuncs(SECUR32_DLL, lsa_fi, &hSecur32, 0, 1, 1, 1);
+     CKRV;
+ 
+     imp_rv = LoadFuncs(KRB524_DLL, k524_fi, &hKrb524, 0, 1, 1, 1);
+     CKRV;
+ 
+     imp_rv = LoadFuncs(PROFILE_DLL, profile_fi, &hProfile, 0, 1, 0, 0);
+     CKRV;
+ 
+     imp_rv = LoadFuncs(CCAPI_DLL, ccapi_fi, &hCCAPI, 0, 1, 0, 0);
+     /* CCAPI_DLL is optional.  No error check. */
+ 
+     memset(&osvi, 0, sizeof(OSVERSIONINFO));
+     osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+     GetVersionEx(&osvi);
+ 
+     // XXX: We should really use feature testing, first
+     // checking for CreateToolhelp32Snapshot.  If that's
+     // not around, we try the psapi stuff.
+     //
+     // Only load LSA functions if on NT/2000/XP
+     if(osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
+     {
+         // Windows 9x
+         imp_rv = LoadFuncs(TOOLHELPDLL, toolhelp_fi, &hToolHelp32, 0, 1, 0, 0);
+         CKRV;
+ 
+         hPsapi = 0;
+     }             
+     else if(osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)
+     {
+         // Windows NT
+         imp_rv = LoadFuncs(PSAPIDLL, psapi_fi, &hPsapi, 0, 1, 0, 0);
+         CKRV;
+ 
+         hToolHelp32 = 0;
+     }
+ 
+     AfsAvailable = TRUE; //afscompat_init();
+ 
+     return KHM_ERROR_SUCCESS;
+ 
+  _err_ret:
+     return KHM_ERROR_NOT_FOUND;
+ }
+ 
+ khm_int32 exit_imports(void) {
+     //afscompat_close();
+ 
+     if (hKrb4)
+         FreeLibrary(hKrb4);
+     if (hKrb5)
+         FreeLibrary(hKrb5);
+     if (hProfile)
+         FreeLibrary(hProfile);
+     if (hComErr)
+         FreeLibrary(hComErr);
+     if (hService)
+         FreeLibrary(hService);
+     if (hSecur32)
+         FreeLibrary(hSecur32);
+     if (hKrb524)
+         FreeLibrary(hKrb524);
+     if (hPsapi)
+         FreeLibrary(hPsapi);
+     if (hToolHelp32)
+         FreeLibrary(hToolHelp32);
+ 
+     return KHM_ERROR_SUCCESS;
+ }
+ 
+ int (*Lcom_err)(LPSTR,long,LPSTR,...);
+ LPSTR (*Lerror_message)(long);
+ LPSTR (*Lerror_table_name)(long);
+ 
+ void Leash_load_com_err_callback(FARPROC ce,
+                                  FARPROC em,
+                                  FARPROC etn)
+ {
+     (FARPROC)Lcom_err=ce;
+     (FARPROC)Lerror_message=em;
+     (FARPROC)Lerror_table_name=etn;
+ }
Index: openafs/src/WINNT/netidmgr_plugin/dynimport.h
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/dynimport.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/dynimport.h	Thu Oct 12 17:19:43 2006
***************
*** 0 ****
--- 1,350 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: dynimport.h,v 1.1.2.2 2006/10/12 21:19:43 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_DYNIMPORT_H
+ #define __KHIMAIRA_DYNIMPORT_H
+ 
+ /* Dynamic imports */
+ #include<khdefs.h>
+ #include<tlhelp32.h>
+ #include<ntsecapi.h>
+ 
+ #ifndef FAR
+ #define FAR
+ #endif
+ 
+ extern HINSTANCE hKrb4;
+ extern HINSTANCE hKrb5;
+ extern HINSTANCE hProfile;
+ 
+ ///////////////////////////////////////////////////////////////////////////////
+ 
+ #define CCAPI_DLL     "krbcc32.dll"
+ #define KRBCC32_DLL   "krbcc32.dll"
+ #define SERVICE_DLL   "advapi32.dll"
+ #define SECUR32_DLL   "secur32.dll"
+ #define PROFILE_DLL   "xpprof32.dll"
+ 
+ //////////////////////////////////////////////////////////////////////////////
+ 
+ #include <loadfuncs-com_err.h>
+ #include <loadfuncs-krb5.h>
+ #include <loadfuncs-profile.h>
+ #include <loadfuncs-krb.h>
+ #include <loadfuncs-krb524.h>
+ #include <loadfuncs-lsa.h>
+ 
+ //// CCAPI
+ /* In order to avoid including the private CCAPI headers */
+ typedef int cc_int32;
+ 
+ #define CC_API_VER_1 1
+ #define CC_API_VER_2 2
+ 
+ #define CCACHE_API cc_int32
+ 
+ /*
+ ** The Official Error Codes
+ */
+ #define CC_NOERROR           0
+ #define CC_BADNAME           1
+ #define CC_NOTFOUND          2
+ #define CC_END               3
+ #define CC_IO                4
+ #define CC_WRITE             5
+ #define CC_NOMEM             6
+ #define CC_FORMAT            7
+ #define CC_LOCKED            8
+ #define CC_BAD_API_VERSION   9
+ #define CC_NO_EXIST          10
+ #define CC_NOT_SUPP          11
+ #define CC_BAD_PARM          12
+ #define CC_ERR_CACHE_ATTACH  13
+ #define CC_ERR_CACHE_RELEASE 14
+ #define CC_ERR_CACHE_FULL    15
+ #define CC_ERR_CRED_VERSION  16
+ 
+ enum {
+     CC_CRED_VUNKNOWN = 0,       // For validation
+     CC_CRED_V4 = 1,
+     CC_CRED_V5 = 2,
+     CC_CRED_VMAX = 3            // For validation
+ };
+ 
+ typedef struct opaque_dll_control_block_type* apiCB;
+ typedef struct _infoNC {
+     char*     name;
+     char*     principal;
+     cc_int32  vers;
+ } infoNC;
+ 
+ TYPEDEF_FUNC(
+ CCACHE_API,
+ CALLCONV_C,
+ cc_initialize,
+     (
+     apiCB** cc_ctx,           // <  DLL's primary control structure.
+                               //    returned here, passed everywhere else
+     cc_int32 api_version,     // >  ver supported by caller (use CC_API_VER_1)
+     cc_int32*  api_supported, // <  if ~NULL, max ver supported by DLL
+     const char** vendor       // <  if ~NULL, vendor name in read only C string
+     )
+ );
+ 
+ TYPEDEF_FUNC(
+ CCACHE_API,
+ CALLCONV_C,
+ cc_shutdown,
+     (
+     apiCB** cc_ctx            // <> DLL's primary control structure. NULL after
+     )
+ );
+ 
+ TYPEDEF_FUNC(
+ CCACHE_API,
+ CALLCONV_C,
+ cc_get_NC_info,
+     (
+     apiCB* cc_ctx,          // >  DLL's primary control structure
+     struct _infoNC*** ppNCi // <  (NULL before call) null terminated,
+                             //    list of a structs (free via cc_free_infoNC())
+     )
+ );
+ 
+ TYPEDEF_FUNC(
+ CCACHE_API,
+ CALLCONV_C,
+ cc_free_NC_info,
+     (
+     apiCB* cc_ctx,
+     struct _infoNC*** ppNCi // <  free list of structs returned by
+                             //    cc_get_cache_names().  set to NULL on return
+     )
+ );
+ //// \CCAPI
+ 
+ extern  DWORD AfsAvailable;
+ 
+ // service definitions
+ typedef SC_HANDLE (WINAPI *FP_OpenSCManagerA)(char *, char *, DWORD);
+ typedef SC_HANDLE (WINAPI *FP_OpenServiceA)(SC_HANDLE, char *, DWORD);
+ typedef BOOL (WINAPI *FP_QueryServiceStatus)(SC_HANDLE, LPSERVICE_STATUS);
+ typedef BOOL (WINAPI *FP_CloseServiceHandle)(SC_HANDLE);
+ 
+ //////////////////////////////////////////////////////////////////////////////
+ 
+ // CCAPI
+ extern DECL_FUNC_PTR(cc_initialize);
+ extern DECL_FUNC_PTR(cc_shutdown);
+ extern DECL_FUNC_PTR(cc_get_NC_info);
+ extern DECL_FUNC_PTR(cc_free_NC_info);
+ 
+ // krb4 functions
+ extern DECL_FUNC_PTR(get_krb_err_txt_entry);
+ extern DECL_FUNC_PTR(k_isinst);
+ extern DECL_FUNC_PTR(k_isname);
+ extern DECL_FUNC_PTR(k_isrealm);
+ extern DECL_FUNC_PTR(kadm_change_your_password);
+ extern DECL_FUNC_PTR(kname_parse);
+ extern DECL_FUNC_PTR(krb_get_cred);
+ extern DECL_FUNC_PTR(krb_get_krbhst);
+ extern DECL_FUNC_PTR(krb_get_lrealm);
+ extern DECL_FUNC_PTR(krb_get_pw_in_tkt);
+ extern DECL_FUNC_PTR(krb_get_tf_realm);
+ extern DECL_FUNC_PTR(krb_mk_req);
+ extern DECL_FUNC_PTR(krb_realmofhost);
+ extern DECL_FUNC_PTR(tf_init);
+ extern DECL_FUNC_PTR(tf_close);
+ extern DECL_FUNC_PTR(tf_get_cred);
+ extern DECL_FUNC_PTR(tf_get_pname);
+ extern DECL_FUNC_PTR(tf_get_pinst);
+ extern DECL_FUNC_PTR(LocalHostAddr);
+ extern DECL_FUNC_PTR(tkt_string);
+ extern DECL_FUNC_PTR(krb_set_tkt_string);
+ extern DECL_FUNC_PTR(initialize_krb_error_func);
+ extern DECL_FUNC_PTR(initialize_kadm_error_table);
+ extern DECL_FUNC_PTR(dest_tkt);
+ extern DECL_FUNC_PTR(lsh_LoadKrb4LeashErrorTables); // XXX
+ extern DECL_FUNC_PTR(krb_in_tkt);
+ extern DECL_FUNC_PTR(krb_save_credentials);
+ extern DECL_FUNC_PTR(krb_get_krbconf2);
+ extern DECL_FUNC_PTR(krb_get_krbrealm2);
+ extern DECL_FUNC_PTR(krb_life_to_time);
+ 
+ // krb5 functions
+ extern DECL_FUNC_PTR(krb5_change_password);
+ extern DECL_FUNC_PTR(krb5_get_init_creds_opt_init);
+ extern DECL_FUNC_PTR(krb5_get_init_creds_opt_set_tkt_life);
+ extern DECL_FUNC_PTR(krb5_get_init_creds_opt_set_renew_life);
+ extern DECL_FUNC_PTR(krb5_get_init_creds_opt_set_forwardable);
+ extern DECL_FUNC_PTR(krb5_get_init_creds_opt_set_proxiable);
+ extern DECL_FUNC_PTR(krb5_get_init_creds_opt_set_renew_life);
+ extern DECL_FUNC_PTR(krb5_get_init_creds_opt_set_address_list);
+ extern DECL_FUNC_PTR(krb5_get_init_creds_password);
+ extern DECL_FUNC_PTR(krb5_get_prompt_types);
+ extern DECL_FUNC_PTR(krb5_build_principal_ext);
+ extern DECL_FUNC_PTR(krb5_cc_get_name);
+ extern DECL_FUNC_PTR(krb5_cc_get_type);
+ extern DECL_FUNC_PTR(krb5_cc_resolve);
+ extern DECL_FUNC_PTR(krb5_cc_default);
+ extern DECL_FUNC_PTR(krb5_cc_default_name);
+ extern DECL_FUNC_PTR(krb5_cc_set_default_name);
+ extern DECL_FUNC_PTR(krb5_cc_initialize);
+ extern DECL_FUNC_PTR(krb5_cc_destroy);
+ extern DECL_FUNC_PTR(krb5_cc_close);
+ extern DECL_FUNC_PTR(krb5_cc_copy_creds);
+ extern DECL_FUNC_PTR(krb5_cc_store_cred);
+ extern DECL_FUNC_PTR(krb5_cc_retrieve_cred);
+ extern DECL_FUNC_PTR(krb5_cc_get_principal);
+ extern DECL_FUNC_PTR(krb5_cc_start_seq_get);
+ extern DECL_FUNC_PTR(krb5_cc_next_cred);
+ extern DECL_FUNC_PTR(krb5_cc_end_seq_get);
+ extern DECL_FUNC_PTR(krb5_cc_remove_cred);
+ extern DECL_FUNC_PTR(krb5_cc_set_flags);
+ // extern DECL_FUNC_PTR(krb5_cc_get_type);
+ extern DECL_FUNC_PTR(krb5_free_context);
+ extern DECL_FUNC_PTR(krb5_free_cred_contents);
+ extern DECL_FUNC_PTR(krb5_free_principal);
+ extern DECL_FUNC_PTR(krb5_get_in_tkt_with_password);
+ extern DECL_FUNC_PTR(krb5_init_context);
+ extern DECL_FUNC_PTR(krb5_parse_name);
+ extern DECL_FUNC_PTR(krb5_timeofday);
+ extern DECL_FUNC_PTR(krb5_timestamp_to_sfstring);
+ extern DECL_FUNC_PTR(krb5_unparse_name);
+ extern DECL_FUNC_PTR(krb5_get_credentials);
+ extern DECL_FUNC_PTR(krb5_mk_req);
+ extern DECL_FUNC_PTR(krb5_sname_to_principal);
+ extern DECL_FUNC_PTR(krb5_get_credentials_renew);
+ extern DECL_FUNC_PTR(krb5_free_data);
+ extern DECL_FUNC_PTR(krb5_free_data_contents);
+ // extern DECL_FUNC_PTR(krb5_get_realm_domain);
+ extern DECL_FUNC_PTR(krb5_free_unparsed_name);
+ extern DECL_FUNC_PTR(krb5_os_localaddr);
+ extern DECL_FUNC_PTR(krb5_copy_keyblock_contents);
+ extern DECL_FUNC_PTR(krb5_copy_data);
+ extern DECL_FUNC_PTR(krb5_free_creds);
+ extern DECL_FUNC_PTR(krb5_build_principal);
+ extern DECL_FUNC_PTR(krb5_get_renewed_creds);
+ extern DECL_FUNC_PTR(krb5_free_addresses);
+ extern DECL_FUNC_PTR(krb5_get_default_config_files);
+ extern DECL_FUNC_PTR(krb5_free_config_files);
+ extern DECL_FUNC_PTR(krb5_get_default_realm);
+ extern DECL_FUNC_PTR(krb5_set_default_realm);
+ extern DECL_FUNC_PTR(krb5_free_ticket);
+ extern DECL_FUNC_PTR(krb5_decode_ticket);
+ extern DECL_FUNC_PTR(krb5_get_host_realm);
+ extern DECL_FUNC_PTR(krb5_free_host_realm);
+ extern DECL_FUNC_PTR(krb5_c_random_make_octets);
+ extern DECL_FUNC_PTR(krb5_free_default_realm);
+ 
+ // Krb524 functions
+ extern DECL_FUNC_PTR(krb524_init_ets);
+ extern DECL_FUNC_PTR(krb524_convert_creds_kdc);
+ 
+ // ComErr functions
+ extern DECL_FUNC_PTR(com_err);
+ extern DECL_FUNC_PTR(error_message);
+ 
+ // Profile functions
+ extern DECL_FUNC_PTR(profile_init);
+ extern DECL_FUNC_PTR(profile_flush);
+ extern DECL_FUNC_PTR(profile_release);
+ extern DECL_FUNC_PTR(profile_get_subsection_names);
+ extern DECL_FUNC_PTR(profile_free_list);
+ extern DECL_FUNC_PTR(profile_get_string);
+ extern DECL_FUNC_PTR(profile_get_values);
+ extern DECL_FUNC_PTR(profile_get_relation_names);
+ extern DECL_FUNC_PTR(profile_clear_relation);
+ extern DECL_FUNC_PTR(profile_add_relation);
+ extern DECL_FUNC_PTR(profile_update_relation);
+ extern DECL_FUNC_PTR(profile_release_string);
+ 
+ // Service functions
+ extern DECL_FUNC_PTR(OpenSCManagerA);
+ extern DECL_FUNC_PTR(OpenServiceA);
+ extern DECL_FUNC_PTR(QueryServiceStatus);
+ extern DECL_FUNC_PTR(CloseServiceHandle);
+ extern DECL_FUNC_PTR(LsaNtStatusToWinError);
+ 
+ // LSA Functions
+ extern DECL_FUNC_PTR(LsaConnectUntrusted);
+ extern DECL_FUNC_PTR(LsaLookupAuthenticationPackage);
+ extern DECL_FUNC_PTR(LsaCallAuthenticationPackage);
+ extern DECL_FUNC_PTR(LsaFreeReturnBuffer);
+ extern DECL_FUNC_PTR(LsaGetLogonSessionData);
+ 
+ // toolhelp functions
+ TYPEDEF_FUNC(
+     HANDLE,
+     WINAPI,
+     CreateToolhelp32Snapshot,
+     (DWORD, DWORD)
+     );
+ TYPEDEF_FUNC(
+     BOOL,
+     WINAPI,
+     Module32First,
+     (HANDLE, LPMODULEENTRY32)
+     );
+ TYPEDEF_FUNC(
+     BOOL,
+     WINAPI,
+     Module32Next,
+     (HANDLE, LPMODULEENTRY32)
+     );
+ 
+ // psapi functions
+ TYPEDEF_FUNC(
+     DWORD,
+     WINAPI,
+     GetModuleFileNameExA,
+     (HANDLE, HMODULE, LPSTR, DWORD)
+     );
+ 
+ TYPEDEF_FUNC(
+     BOOL,
+     WINAPI,
+     EnumProcessModules,
+     (HANDLE, HMODULE*, DWORD, LPDWORD)
+     );
+ 
+ #define pGetModuleFileNameEx pGetModuleFileNameExA
+ #define TOOLHELPDLL "kernel32.dll"
+ #define PSAPIDLL "psapi.dll"
+ 
+ // psapi functions
+ extern DECL_FUNC_PTR(GetModuleFileNameExA);
+ extern DECL_FUNC_PTR(EnumProcessModules);
+ 
+ // toolhelp functions
+ extern DECL_FUNC_PTR(CreateToolhelp32Snapshot);
+ extern DECL_FUNC_PTR(Module32First);
+ extern DECL_FUNC_PTR(Module32Next);
+ 
+ khm_int32 init_imports(void);
+ khm_int32 exit_imports(void);
+ 
+ #endif
Index: openafs/src/WINNT/netidmgr_plugin/krb5common.c
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/krb5common.c:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/krb5common.c	Thu Oct 12 17:19:43 2006
***************
*** 0 ****
--- 1,449 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: krb5common.c,v 1.1.2.2 2006/10/12 21:19:43 jaltman Exp $ */
+ 
+ #include<windows.h>
+ #include<netidmgr.h>
+ #include<dynimport.h>
+ #include<krb5common.h>
+ #ifdef DEBUG
+ #include<assert.h>
+ #endif
+ #include<strsafe.h>
+ 
+ /**************************************/
+ /* khm_krb5_error():           */
+ /**************************************/
+ int 
+ khm_krb5_error(krb5_error_code rc, LPCSTR FailedFunctionName, 
+                  int FreeContextFlag, krb5_context * ctx, 
+                  krb5_ccache * cache)
+ {
+ #ifdef NO_KRB5
+     return 0;
+ #else
+ 
+ #ifdef SHOW_MESSAGE_IN_AN_ANNOYING_WAY
+     char message[256];
+     const char *errText;
+     int krb5Error = ((int)(rc & 255));  
+ 
+     errText = perror_message(rc);   
+     _snprintf(message, sizeof(message), 
+         "%s\n(Kerberos error %ld)\n\n%s failed", 
+         errText, 
+         krb5Error, 
+         FailedFunctionName);
+ 
+     MessageBoxA(NULL, message, "Kerberos Five", MB_OK | MB_ICONERROR | 
+         MB_TASKMODAL | 
+         MB_SETFOREGROUND);
+ #endif
+ 
+     if (FreeContextFlag == 1)
+     {
+         if (*ctx != NULL)
+         {
+             if (*cache != NULL) {
+                 pkrb5_cc_close(*ctx, *cache);
+                 *cache = NULL;
+             }
+ 
+             pkrb5_free_context(*ctx);
+             *ctx = NULL;
+         }
+     }
+ 
+     return rc;
+ 
+ #endif //!NO_KRB5
+ }
+ 
+ int 
+ khm_krb5_initialize(khm_handle ident, 
+                     krb5_context *ctx, 
+                     krb5_ccache *cache)
+ {
+ #ifdef NO_KRB5
+     return(0);
+ #else
+ 
+     LPCSTR          functionName;
+     int             freeContextFlag;
+     krb5_error_code	rc = 0;
+     krb5_flags          flags = 0;
+ 
+     if (pkrb5_init_context == NULL)
+         return 1;
+ 
+     if (*ctx == 0 && (rc = (*pkrb5_init_context)(ctx))) {
+         functionName = "krb5_init_context()";
+         freeContextFlag = 0;
+         goto on_error;
+     }
+ 
+     if(*cache == 0) {
+         wchar_t wccname[MAX_PATH];
+         khm_size cbwccname;
+ 
+         if(ident != NULL) {
+             cbwccname = sizeof(wccname);
+             do {
+                 char ccname[256];
+ 
+                 if(KHM_FAILED(kcdb_identity_get_attrib(ident, L"Krb5CCName",
+                                                        NULL, wccname,
+                                                        &cbwccname))) {
+                     cbwccname = sizeof(wccname);
+                     if (KHM_FAILED
+                         (khm_krb5_find_ccache_for_identity(ident,
+                                                            ctx,
+                                                            wccname,
+                                                            &cbwccname))) {
+ #ifdef DEBUG_LIKE_A_MADMAN
+                         assert(FALSE);
+ #endif
+                         break;
+                     }
+                 }
+ 
+                 if(UnicodeStrToAnsi(ccname, sizeof(ccname), wccname) == 0)
+                     break;
+ 
+                 if((*pkrb5_cc_resolve)(*ctx, ccname, cache)) {
+                     functionName = "krb5_cc_resolve()";
+                     freeContextFlag = 1;
+                     goto on_error;
+                 }
+             } while(FALSE);
+         }
+ 
+ #ifndef FAILOVER_TO_DEFAULT_CCACHE
+ 	rc = 1;
+ #endif
+         if (*cache == 0
+ #ifdef FAILOVER_TO_DEFAULT_CCACHE
+             && (rc = (*pkrb5_cc_default)(*ctx, cache))
+ #endif
+             ) {
+             functionName = "krb5_cc_default()";
+             freeContextFlag = 1;
+             goto on_error;
+         }
+     }
+ 
+ #ifdef KRB5_TC_NOTICKET
+     flags = KRB5_TC_NOTICKET;
+ #endif
+ 
+     if ((rc = (*pkrb5_cc_set_flags)(*ctx, *cache, flags)))
+     {
+         if (rc != KRB5_FCC_NOFILE && rc != KRB5_CC_NOTFOUND)
+             khm_krb5_error(rc, "krb5_cc_set_flags()", 0, ctx, 
+             cache);
+         else if ((rc == KRB5_FCC_NOFILE || rc == KRB5_CC_NOTFOUND) && *ctx != NULL) {
+             if (*cache != NULL)
+                 (*pkrb5_cc_close)(*ctx, *cache);
+         }
+         return rc;
+     }
+     return 0;
+ 
+ on_error:
+     return khm_krb5_error(rc, functionName, freeContextFlag, ctx, cache);
+ #endif //!NO_KRB5
+ }
+ 
+ #define TIMET_TOLERANCE (60*5)
+ 
+ khm_int32 KHMAPI
+ khm_get_identity_expiration_time(krb5_context ctx, krb5_ccache cc, 
+                                  khm_handle ident, 
+                                  krb5_timestamp * pexpiration)
+ {
+     krb5_principal principal = 0;
+     char * princ_name = NULL;
+     krb5_creds creds;
+     krb5_error_code code;
+     krb5_error_code cc_code;
+     krb5_cc_cursor cur;
+     krb5_timestamp now, expiration = 0;
+ 
+     wchar_t w_ident_name[KCDB_IDENT_MAXCCH_NAME];
+     char    ident_name[KCDB_IDENT_MAXCCH_NAME];
+     khm_size cb;
+ 
+     khm_int32 rv = KHM_ERROR_NOT_FOUND;
+ 
+     if (!ctx || !cc || !ident || !pexpiration)
+         return KHM_ERROR_GENERAL;
+ 
+     code = pkrb5_cc_get_principal(ctx, cc, &principal);
+ 
+     if ( code )
+         return KHM_ERROR_INVALID_PARAM;
+ 
+     cb = sizeof(w_ident_name);
+     kcdb_identity_get_name(ident, w_ident_name, &cb);
+     UnicodeStrToAnsi(ident_name, sizeof(ident_name), w_ident_name);
+ 
+     code = pkrb5_unparse_name(ctx, principal, &princ_name);
+ 
+     /* compare principal to ident. */
+ 
+     if ( code || !princ_name ||
+          strcmp(princ_name, ident_name) ) {
+         if (princ_name)
+             pkrb5_free_unparsed_name(ctx, princ_name);
+         pkrb5_free_principal(ctx, principal);
+         return KHM_ERROR_UNKNOWN;
+     }
+ 
+     pkrb5_free_unparsed_name(ctx, princ_name);
+     pkrb5_free_principal(ctx, principal);
+ 
+     code = pkrb5_timeofday(ctx, &now);
+ 
+     if (code)
+         return KHM_ERROR_UNKNOWN;
+ 
+     cc_code = pkrb5_cc_start_seq_get(ctx, cc, &cur);
+ 
+     while (!(cc_code = pkrb5_cc_next_cred(ctx, cc, &cur, &creds))) {
+         krb5_data * c0 = krb5_princ_name(ctx, creds.server);
+         krb5_data * c1  = krb5_princ_component(ctx, creds.server, 1);
+         krb5_data * r = krb5_princ_realm(ctx, creds.server);
+ 
+         if ( c0 && c1 && r && c1->length == r->length && 
+              !strncmp(c1->data,r->data,r->length) &&
+              !strncmp("krbtgt",c0->data,c0->length) ) {
+ 
+             /* we have a TGT, check for the expiration time.
+              * if it is valid and renewable, use the renew time 
+              */
+ 
+             if (!(creds.ticket_flags & TKT_FLG_INVALID) &&
+                 creds.times.starttime < (now + TIMET_TOLERANCE) && 
+                 (creds.times.endtime + TIMET_TOLERANCE) > now) {
+                 expiration = creds.times.endtime;
+ 
+                 if ((creds.ticket_flags & TKT_FLG_RENEWABLE) && 
+                     (creds.times.renew_till > creds.times.endtime)) {
+                     expiration = creds.times.renew_till;
+                 }
+             }
+         }
+     }
+ 
+     if (cc_code == KRB5_CC_END) {
+         cc_code = pkrb5_cc_end_seq_get(ctx, cc, &cur);
+         rv = KHM_ERROR_SUCCESS;
+         *pexpiration = expiration;
+     }
+ 
+     return rv;
+ }
+ 
+ khm_int32 KHMAPI
+ khm_krb5_find_ccache_for_identity(khm_handle ident, krb5_context *pctx,
+                                   void * buffer, khm_size * pcbbuf)
+ {
+     krb5_context        ctx = 0;
+     krb5_ccache         cache = 0;
+     krb5_error_code     code;
+     apiCB *             cc_ctx = 0;
+     struct _infoNC **   pNCi = NULL;
+     int                 i;
+     khm_int32           t;
+     wchar_t *           ms = NULL;
+     khm_size            cb;
+     krb5_timestamp      expiration = 0;
+     krb5_timestamp      best_match_expiration = 0;
+     char                best_match_ccname[256] = "";
+     khm_handle          csp_params = NULL;
+     khm_handle          csp_plugins = NULL;
+ 
+     if (!buffer || !pcbbuf)
+     return KHM_ERROR_GENERAL;
+ 
+     ctx = *pctx;
+ 
+     if (!pcc_initialize ||
+         !pcc_get_NC_info ||
+         !pcc_free_NC_info ||
+         !pcc_shutdown)
+         goto _skip_cc_iter;
+ 
+     code = pcc_initialize(&cc_ctx, CC_API_VER_2, NULL, NULL);
+     if (code)
+         goto _exit;
+ 
+     code = pcc_get_NC_info(cc_ctx, &pNCi);
+ 
+     if (code) 
+         goto _exit;
+ 
+     for(i=0; pNCi[i]; i++) {
+         if (pNCi[i]->vers != CC_CRED_V5)
+             continue;
+ 
+         code = (*pkrb5_cc_resolve)(ctx, pNCi[i]->name, &cache);
+         if (code)
+             continue;
+ 
+         /* need a function to check the cache for the identity
+          * and determine if it has valid tickets.  If it has 
+          * the right identity and valid tickets, store the 
+          * expiration time and the cache name.  If it has the
+          * right identity but no valid tickets, store the ccache
+          * name and an expiration time of zero.  if it does not
+          * have the right identity don't save the name.
+          * 
+          * Keep searching to find the best cache available.
+          */
+ 
+         if (KHM_SUCCEEDED(khm_get_identity_expiration_time(ctx, cache, 
+                                                            ident, 
+                                                            &expiration))) {
+             if ( expiration > best_match_expiration ) {
+                 best_match_expiration = expiration;
+                 StringCbCopyA(best_match_ccname, 
+                               sizeof(best_match_ccname),
+                               "API:");
+                 StringCbCatA(best_match_ccname,
+                              sizeof(best_match_ccname),
+                              pNCi[i]->name);
+                 expiration = 0;
+             }
+         }
+ 
+         if(ctx != NULL && cache != NULL)
+             (*pkrb5_cc_close)(ctx, cache);
+         cache = 0;
+     }
+ 
+  _skip_cc_iter:
+ 
+     if (KHM_SUCCEEDED(kmm_get_plugins_config(0, &csp_plugins))) {
+         khc_open_space(csp_plugins, L"Krb5Cred\\Parameters",  0, &csp_params);
+         khc_close_space(csp_plugins);
+         csp_plugins = NULL;
+     }
+ 
+ #ifdef DEBUG
+     if (csp_params == NULL) {
+         assert(FALSE);
+     }
+ #endif
+ 
+     if (csp_params &&
+         KHM_SUCCEEDED(khc_read_int32(csp_params, L"MsLsaList", &t)) && t) {
+         code = (*pkrb5_cc_resolve)(ctx, "MSLSA:", &cache);
+         if (code == 0 && cache) {
+             if (KHM_SUCCEEDED(khm_get_identity_expiration_time(ctx, cache, 
+                                                                ident, 
+                                                                &expiration))) {
+                 if ( expiration > best_match_expiration ) {
+                     best_match_expiration = expiration;
+                     StringCbCopyA(best_match_ccname, sizeof(best_match_ccname),
+                                   "MSLSA:");
+                     expiration = 0;
+                 }
+             }
+         }
+ 
+         if (ctx != NULL && cache != NULL)
+             (*pkrb5_cc_close)(ctx, cache);
+ 
+         cache = 0;
+     }
+ 
+     if (csp_params &&
+         khc_read_multi_string(csp_params, L"FileCCList", NULL, &cb)
+         == KHM_ERROR_TOO_LONG &&
+         cb > sizeof(wchar_t) * 2) {
+ 
+         wchar_t * t;
+         char ccname[MAX_PATH + 6];
+ 
+         ms = PMALLOC(cb);
+ 
+ #ifdef DEBUG
+         assert(ms);
+ #endif
+ 
+         khc_read_multi_string(csp_params, L"FileCCList", ms, &cb);
+         for(t = ms; t && *t; t = multi_string_next(t)) {
+             StringCchPrintfA(ccname, ARRAYLENGTH(ccname),
+                              "FILE:%S", t);
+ 
+             code = (*pkrb5_cc_resolve)(ctx, ccname, &cache);
+             if (code)
+                 continue;
+ 
+             if (KHM_SUCCEEDED(khm_get_identity_expiration_time(ctx, cache, 
+                                                                ident, 
+                                                                &expiration))) {
+                 if ( expiration > best_match_expiration ) {
+                     best_match_expiration = expiration;
+                     StringCbCopyA(best_match_ccname,
+                                   sizeof(best_match_ccname),
+                                   ccname);
+                     expiration = 0;
+                 }
+             }
+ 
+             if (ctx != NULL && cache != NULL)
+                 (*pkrb5_cc_close)(ctx, cache);
+             cache = 0;
+         }
+ 
+         PFREE(ms);
+     }
+  _exit:
+     if (csp_params)
+         khc_close_space(csp_params);
+ 
+     if (pNCi)
+         (*pcc_free_NC_info)(cc_ctx, &pNCi);
+ 
+     if (cc_ctx)
+         (*pcc_shutdown)(&cc_ctx);
+ 
+     if (best_match_ccname[0]) {
+         
+         if (*pcbbuf = AnsiStrToUnicode((wchar_t *)buffer, 
+                                        *pcbbuf,
+                                        best_match_ccname)) {
+ 
+             *pcbbuf = (*pcbbuf + 1) * sizeof(wchar_t);
+ 
+             return KHM_ERROR_SUCCESS;
+         }
+ 
+     }
+ 
+     return KHM_ERROR_GENERAL;
+ }
Index: openafs/src/WINNT/netidmgr_plugin/krb5common.h
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/krb5common.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/krb5common.h	Thu Oct 12 17:19:43 2006
***************
*** 0 ****
--- 1,56 ----
+ /*
+  * Copyright (c) 2005 Massachusetts Institute of Technology
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: krb5common.h,v 1.1.2.2 2006/10/12 21:19:43 jaltman Exp $ */
+ 
+ /* Adapted from multiple Leash header files */
+ 
+ #ifndef __KHIMAIRA_KRB5COMMON_H
+ #define __KHIMAIRA_KRB5COMMON_H
+ 
+ #include<krb5.h>
+ 
+ #ifndef NO_KRB5
+ int khm_krb5_error(krb5_error_code rc, LPCSTR FailedFunctionName, 
+                    int FreeContextFlag, krb5_context *ctx,
+                    krb5_ccache *cache);
+ 
+ int
+ khm_krb5_get_error_string(krb5_error_code rc,
+                           wchar_t * buffer,
+                           khm_size cb_buffer);
+ 
+ int khm_krb5_initialize(khm_handle ident, krb5_context *, krb5_ccache *);
+ 
+ khm_int32 KHMAPI
+ khm_krb5_find_ccache_for_identity(khm_handle ident, krb5_context *pctx,
+                                   void * buffer, khm_size * pcbbuf);
+ 
+ khm_int32 KHMAPI
+ khm_get_identity_expiration_time(krb5_context ctx, krb5_ccache cc, 
+                                  khm_handle ident, 
+                                  krb5_timestamp * pexpiration);
+ #endif /* NO_KRB5 */
+ 
+ #endif
Index: openafs/src/WINNT/netidmgr_plugin/langres.h
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/langres.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/langres.h	Thu Oct 12 17:19:43 2006
***************
*** 0 ****
--- 1,101 ----
+ //{{NO_DEPENDENCIES}}
+ // Microsoft Visual C++ generated include file.
+ // Used by C:\work\pismere\athena\auth\krb5\src\windows\identity\plugins\afs\lang\en_us\langres.rc
+ //
+ #define IDS_AFS_SHORT_DESC              101
+ #define IDS_AFS_LONG_DESC               102
+ #define IDI_ICON1                       102
+ #define IDD_NC_AFS                      103
+ #define IDS_AFS_NAME                    103
+ #define IDS_NCAFS_COL_CELL              104
+ #define IDD_CFG_IDS_TAB                 104
+ #define IDS_NCAFS_COL_REALM             105
+ #define IDD_CFG_ID_TAB                  105
+ #define IDS_NCAFS_COL_METHOD            106
+ #define IDD_CFG_AFS                     106
+ #define IDS_NC_METHOD_AUTO              107
+ #define IDI_AFSTOKEN                    107
+ #define IDS_NC_METHOD_KRB5              108
+ #define IDI_AFSPLUGIN                   108
+ #define IDS_NC_METHOD_KRB4              109
+ #define IDI_NC_NEW                      109
+ #define IDS_NC_METHOD_KRB524            110
+ #define IDI_NC_EXIST                    110
+ #define IDS_NC_REALM_AUTO               111
+ #define IDI_NC_NOTOWNED                 111
+ #define IDS_NC_TT_NO_CELL               112
+ #define IDS_NC_TT_CANT_ADD              113
+ #define IDS_NC_TT_MALFORMED_CELL        114
+ #define IDS_NC_TT_NO_REALM              115
+ #define IDS_NC_AUTO                     116
+ #define IDS_NC_TT_MALFORMED_REALM       117
+ #define IDS_NC_TT_CANT_UPDATE           118
+ #define IDS_AFS_CREDTEXT_DIS            119
+ #define IDS_AFS_CREDTEXT_0              120
+ #define IDS_AFS_CREDTEXT_1              121
+ #define IDS_AFS_CREDTEXT_N              122
+ #define IDS_ATTR_CELL_SHORT_DESC        123
+ #define IDS_ATTR_REALM_SHORT_DESC       124
+ #define IDS_ATTR_METHOD_SHORT_DESC      125
+ #define IDS_ATTR_CLIENT_SHORT_DESC      126
+ #define IDS_ATTR_CLIENT_PRINC_SHORT_DESC 127
+ #define IDS_ATTR_SERVER_PRINC_SHORT_DESC 128
+ #define IDS_DEF_LOCATION                129
+ #define IDS_PLUGIN_DESC                 130
+ #define IDS_CFG_IDS_TAB                 131
+ #define IDS_CFG_ID_TAB                  132
+ #define IDS_CFG_MAIN_LONG               133
+ #define IDS_CFG_MAIN_SHORT              134
+ #define IDS_CFG_SVCSTATUS               135
+ #define IDS_NC_METHODL_AUTO             136
+ #define IDS_NC_METHODL_KRB5             137
+ #define IDS_NC_METHODL_KRB4             138
+ #define IDS_NC_METHODL_KRB524           139
+ #define IDS_NC_METHOD_INVALID           140
+ #define IDS_NC_TT_CONFLICT              141
+ #define IDS_NC_TT_PROBLEM               142
+ #define IDS_NC_TT_CONFLICTM             143
+ #define IDS_NC_TT_DETAILS               144
+ #define IDS_NC_TT_CONFLICTD             145
+ #define IDS_NC_TT_EXPIRED               146
+ #define IDS_NC_TT_EXISTS                147
+ #define IDS_NC_TT_NEW                   148
+ #define IDS_CFG_CANTSTART               149
+ #define IDS_CFG_CANTSTOP                150
+ #define IDS_ERR_CELLCONFIG              151
+ #define IDS_ERR_NOSERVICE               152
+ #define IDS_ERR_CELLCONFIG_S            153
+ #define IDS_ERR_GENERAL                 154
+ #define IDC_NCAFS_OBTAIN                1001
+ #define IDC_NCAFS_TOKENLIST             1002
+ #define IDC_NCAFS_CELL                  1004
+ #define IDC_NCAFS_REALM                 1005
+ #define IDC_NCAFS_METHOD                1006
+ #define IDC_NCAFS_ADD_TOKEN             1007
+ #define IDC_NCAFS_DELETE_TOKEN          1008
+ #define IDC_CFG_SVCGRP                  1009
+ #define IDC_CFG_LBL_STATUS              1010
+ #define IDC_CFG_STATUS                  1011
+ #define IDC_CFG_LBL_VERSION             1012
+ #define IDC_CFG_VERSION                 1013
+ #define IDC_CFG_STOP                    1014
+ #define IDC_CFG_START                   1015
+ #define IDC_CFG_CPL                     1016
+ #define IDC_CFG_OBTAIN                  1017
+ #define IDC_CFG_PROGRESS                1019
+ #define IDC_CFG_LBL_COMPANY             1020
+ #define IDC_CFG_COMPANY                 1021
+ #define IDC_CFG_STARTGRP                1022
+ #define IDC_CHECK1                      1023
+ #define IDC_CFG_STARTAFSCREDS           1023
+ 
+ // Next default values for new objects
+ // 
+ #ifdef APSTUDIO_INVOKED
+ #ifndef APSTUDIO_READONLY_SYMBOLS
+ #define _APS_NEXT_RESOURCE_VALUE        112
+ #define _APS_NEXT_COMMAND_VALUE         40001
+ #define _APS_NEXT_CONTROL_VALUE         1024
+ #define _APS_NEXT_SYMED_VALUE           101
+ #endif
+ #endif
Index: openafs/src/WINNT/netidmgr_plugin/main.c
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/main.c:1.1.2.3
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/main.c	Mon Oct 16 09:55:35 2006
***************
*** 0 ****
--- 1,149 ----
+ /* 
+  * Copyright (c) 2005,2006 Secure Endpoints Inc.
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: main.c,v 1.1.2.3 2006/10/16 13:55:35 jaltman Exp $ */
+ 
+ /* Disable the 'macro redefinition' warning which is getting
+    triggerred by a redefinition of the ENCRYPT and DECRYPT macros. */
+ #pragma warning (push)
+ #pragma warning (disable: 4005)
+ 
+ #include<afscred.h>
+ #include<kmm.h>
+ #include<dynimport.h>
+ #ifdef DEBUG
+ #include<assert.h>
+ #endif
+ 
+ #pragma warning (pop)
+ 
+ kmm_module h_khModule; /* KMM's handle to this module */
+ HINSTANCE hInstance;
+ HMODULE hResModule;    /* HMODULE to the resource library */
+ 
+ khm_handle csp_plugins      = NULL;
+ khm_handle csp_afscred      = NULL;
+ khm_handle csp_params       = NULL;
+ 
+ kmm_module_locale locales[] = {
+     LOCALE_DEF(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US), L"afscred_en_us.dll", KMM_MLOC_FLAG_DEFAULT)
+ };
+ int n_locales = ARRAYLENGTH(locales);
+ 
+ /* These two probably should not do anything */
+ void init_afs() {
+ }
+ 
+ void exit_afs() {
+ }
+ 
+ /* called by the NetIDMgr module manager */
+ KHMEXP khm_int32 KHMAPI init_module(kmm_module h_module) {
+     khm_int32 rv = KHM_ERROR_SUCCESS;
+     kmm_plugin_reg pi;
+     wchar_t buf[256];
+ 
+     h_khModule = h_module;
+ 
+     rv = kmm_set_locale_info(h_module, locales, n_locales);
+     if(KHM_SUCCEEDED(rv)) {
+         hResModule = kmm_get_resource_hmodule(h_module);
+     } else {
+         goto _exit;
+     }
+ 
+     ZeroMemory(&pi,sizeof(pi));
+ 
+     pi.msg_proc = afs_plugin_cb;
+     pi.name = AFS_PLUGIN_NAME;
+     pi.type = KHM_PITYPE_CRED;
+     pi.icon = LoadImage(hResModule, MAKEINTRESOURCE(IDI_AFSPLUGIN), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
+     pi.dependencies = AFS_PLUGIN_DEPS;
+     pi.description = buf;
+ 
+     LoadString(hResModule, IDS_PLUGIN_DESC,
+                buf, ARRAYLENGTH(buf));
+ 
+     kmm_provide_plugin(h_module, &pi);
+ 
+     if(KHM_FAILED(rv = init_imports()))
+         goto _exit;
+ 
+     rv = kmm_get_plugins_config(0, &csp_plugins);
+     if(KHM_FAILED(rv)) goto _exit;
+ 
+     rv = khc_load_schema(csp_plugins, schema_afsconfig);
+     if(KHM_FAILED(rv)) goto _exit;
+ 
+     rv = khc_open_space(csp_plugins, CSNAME_AFSCRED, 0, &csp_afscred);
+     if(KHM_FAILED(rv)) goto _exit;
+ 
+     rv = khc_open_space(csp_afscred, CSNAME_PARAMS, 0, &csp_params);
+     if(KHM_FAILED(rv)) goto _exit;
+ 
+ _exit:
+     return rv;
+ }
+ 
+ /* called by the NetIDMgr module manager */
+ KHMEXP khm_int32 KHMAPI exit_module(kmm_module h_module) {
+     exit_imports();
+ 
+     if(csp_params) {
+         khc_close_space(csp_params);
+         csp_params = NULL;
+     }
+     if(csp_afscred) {
+         khc_close_space(csp_afscred);
+         csp_afscred = NULL;
+     }
+     if(csp_plugins) {
+         khc_unload_schema(csp_plugins, schema_afsconfig);
+         khc_close_space(csp_plugins);
+         csp_plugins = NULL;
+     }
+ 
+     return KHM_ERROR_SUCCESS; /* the return code is ignored */
+ }
+ 
+ BOOL WINAPI DllMain(HINSTANCE hinstDLL,
+                     DWORD fdwReason,
+                     LPVOID lpvReserved)
+ {
+     switch(fdwReason) {
+         case DLL_PROCESS_ATTACH:
+             hInstance = hinstDLL;
+             init_afs();
+             break;
+         case DLL_PROCESS_DETACH:
+             exit_afs();
+             break;
+         case DLL_THREAD_ATTACH:
+             break;
+         case DLL_THREAD_DETACH:
+             break;
+     }
+ 
+     return TRUE;
+ }
Index: openafs/src/WINNT/netidmgr_plugin/params.h
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/params.h:1.1.2.3
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/params.h	Mon Oct 16 09:55:35 2006
***************
*** 0 ****
--- 1,31 ----
+ /*
+  * Copyright (c) 2005,2006 Secure Endpoints Inc.
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  */
+ 
+ /* $Id: params.h,v 1.1.2.3 2006/10/16 13:55:35 jaltman Exp $ */
+ 
+ #ifndef __KHIMAIRA_KRBAFSCRED_PARAMS_H
+ #define __KHIMAIRA_KRBAFSCRED_PARAMS_H
+ 
+ 
+ #endif
\ No newline at end of file
Index: openafs/src/WINNT/netidmgr_plugin/version.rc
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/version.rc:1.1.2.4
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/version.rc	Mon Oct 16 09:55:35 2006
***************
*** 0 ****
--- 1,88 ----
+ /* 
+  * Copyright (c) 2005,2006 Secure Endpoints Inc.
+  *
+  * Permission is hereby granted, free of charge, to any person
+  * obtaining a copy of this software and associated documentation
+  * files (the "Software"), to deal in the Software without
+  * restriction, including without limitation the rights to use, copy,
+  * modify, merge, publish, distribute, sublicense, and/or sell copies
+  * of the Software, and to permit persons to whom the Software is
+  * furnished to do so, subject to the following conditions:
+  *
+  * The above copyright notice and this permission notice shall be
+  * included in all copies or substantial portions of the Software.
+  *
+  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  * SOFTWARE.
+  *
+  */
+ 
+ /* $Id: version.rc,v 1.1.2.4 2006/10/16 13:55:35 jaltman Exp $ */
+ 
+ #include<netidmgr_version.h>
+ #include<afsp_version.h>
+ 
+ #ifndef LANGVER
+ 
+ #define STR_FILEDESC "OpenAFS Plugin for NetIDMgr"
+ #define STR_INTNAME  "afscred"
+ #define STR_ORIGNAME "afscred.dll"
+ 
+ #else
+ 
+ #ifdef LANG_en_us
+ 
+ #define STR_FILEDESC "English(US) language resources for OpenAFS plugin"
+ #define STR_INTNAME  "afscred_en_us"
+ #define STR_ORIGNAME "afscred_en_us.dll"
+ 
+ #else
+ 
+ #error Unknown langugae
+ 
+ #endif
+ 
+ #endif
+ 
+ 1 VERSIONINFO 
+         FILEVERSION     AFSPLUGIN_VERSION_LST
+         PRODUCTVERSION  AFSPLUGIN_VERSION_LST
+         FILEFLAGSMASK   KH_VER_FILEFLAGMASK
+         FILEFLAGS       KH_VER_FILEFLAGS
+         FILEOS          KH_VER_FILEOS
+         FILETYPE        KH_VER_FILETYPEDLL
+         FILESUBTYPE     0
+   {
+ 
+     BLOCK "StringFileInfo"
+     {
+       BLOCK "040904b0"
+       {
+         VALUE "CompanyName",     "Secure Endpoints Inc."
+         VALUE "FileDescription", STR_FILEDESC
+         VALUE "FileVersion",     AFSPLUGIN_VERSION_STR
+         VALUE "InternalName",    STR_INTNAME
+         VALUE "LegalCopyright",  "(C) 2005,2006 Secure Endpoints Inc."
+         VALUE "OriginalFilename", STR_ORIGNAME
+         VALUE "ProductName",     "OpenAFS Plugin for NetIDMgr"
+         VALUE "ProductVersion",  AFSPLUGIN_VERSION_STR
+ #ifndef LANGVER
+         VALUE NIMV_MODULE,       "OpenAFS"
+         VALUE NIMV_PLUGINS,      "AfsCred"
+         VALUE NIMV_APIVER,       KH_VERSION_STRINGAPI
+         VALUE NIMV_SUPPORT,      "http://www.secure-endpoints.com"
+ #endif
+       }
+     }
+ 
+     BLOCK "VarFileInfo"
+     {
+         VALUE "Translation", 0x409, 1200
+     }
+   }
Index: openafs/src/WINNT/netidmgr_plugin/help/Index.hhk
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/help/Index.hhk:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/help/Index.hhk	Thu Oct 12 17:19:43 2006
***************
*** 0 ****
--- 1,9 ----
+ <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+ <HTML>
+ <HEAD>
+ <meta name="GENERATOR" content="Microsoft&reg; HTML Help Workshop 4.1">
+ <!-- Sitemap 1.0 -->
+ </HEAD><BODY>
+ <UL>
+ </UL>
+ </BODY></HTML>
Index: openafs/src/WINNT/netidmgr_plugin/help/NTMakefile
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/help/NTMakefile:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/help/NTMakefile	Thu Oct 12 17:19:43 2006
***************
*** 0 ****
--- 1,37 ----
+ #
+ # Copyright (c) 2005 Massachusetts Institute of Technology
+ #
+ # Permission is hereby granted, free of charge, to any person
+ # obtaining a copy of this software and associated documentation files
+ # (the "Software"), to deal in the Software without restriction,
+ # including without limitation the rights to use, copy, modify, merge,
+ # publish, distribute, sublicense, and/or sell copies of the Software,
+ # and to permit persons to whom the Software is furnished to do so,
+ # subject to the following conditions:
+ #
+ # The above copyright notice and this permission notice shall be
+ # included in all copies or substantial portions of the Software.
+ #
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ # SOFTWARE.
+ 
+ RELDIR=WINNT\netidmgr_plugin
+ !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME)
+ !INCLUDE ..\..\..\config\NTMakefile.version
+ 
+ CHMFILE=$(DESTDIR)\root.client\usr\vice\etc\afsplhlp.chm
+ 
+ install: $(CHMFILE)
+ 
+ $(CHMFILE): afsplhlp.hhp
+ 	-hhc $**
+ 	$(COPY) afsplhlp.chm $(CHMFILE)
+ 
+ clean::
+ 	$(DEL) $(CHMFILE)
\ No newline at end of file
Index: openafs/src/WINNT/netidmgr_plugin/help/afsplhlp.h
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/help/afsplhlp.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/help/afsplhlp.h	Thu Oct 12 17:19:43 2006
***************
*** 0 ****
--- 1,14 ----
+ #define IDH_OBTAIN   3000
+ #define IDH_CELL     3001
+ #define IDH_REALM    3002
+ #define IDH_METHOD   3003
+ #define IDH_ADD      3004
+ #define IDH_DELETE   3005
+ #define IDH_TOKENLIST 3006
+ #define IDH_SVCSTATUS 3007
+ #define IDH_SVCSTOP   3008
+ #define IDH_SVCSTART  3009
+ #define IDH_SVCVERSION 3010
+ #define IDH_SVCCOMPANY 3011
+ #define IDH_SVCCPL     3012
+ #define IDH_STARTAFSCREDS 3013
Index: openafs/src/WINNT/netidmgr_plugin/help/afsplhlp.hhp
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/help/afsplhlp.hhp:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/help/afsplhlp.hhp	Thu Oct 12 17:19:43 2006
***************
*** 0 ****
--- 1,29 ----
+ [OPTIONS]
+ Auto Index=Yes
+ Compatibility=1.1 or later
+ Compiled file=afsplhlp.chm
+ Contents file=toc.hhc
+ Default Window=MainHelpWnd
+ Default topic=html/welcome.htm
+ Display compile progress=No
+ Index file=Index.hhk
+ Language=0x409 English (United States)
+ Title=OpenAFS Plugin for NetIDMgr
+ 
+ [WINDOWS]
+ MainHelpWnd="OpenAFS/NetIDMgr Help","toc.hhc","Index.hhk","html/welcome.htm","html/welcome.htm",,,,,0x42120,,0x384e,[271,372,593,566],0x830000,,,,,,0
+ 
+ 
+ [ALIAS]
+ 
+ [MAP]
+ #include afsplhlp.h
+ 
+ [TEXT POPUPS]
+ afsplhlp.h
+ popups_newcred.txt
+ popups_cfg.txt
+ 
+ [INFOTYPES]
+ Category:Usage
+ CategoryDesc:Usage instructions for OpenAFS/NetIDMgr
Index: openafs/src/WINNT/netidmgr_plugin/help/popups_cfg.txt
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/help/popups_cfg.txt:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/help/popups_cfg.txt	Thu Oct 12 17:19:43 2006
***************
*** 0 ****
--- 1,30 ----
+ .topic IDH_SVCSTATUS
+ Current status of the OpenAFS Client Service.
+ 
+ .topic IDH_SVCSTOP
+ Stops the OpenAFS Client service.  Access to resources in AFS will not
+ be available until the service is started again.  All exising AFS
+ tokens will also be lost.
+ 
+ .topic IDH_SVCSTART
+ Start the service.  Once the service starts, it will not have any AFS
+ tokens for any of the users.  Therefore new tokens will be
+ automatically be obtained once the service starts.
+ 
+ .topic IDH_SVCVERSION
+ Version of the OpenAFS Client that is installed on this machine.  The
+ version is derived from the executable that provides the OpenAFS
+ Client service on this machine.
+ 
+ .topic IDH_SVCCOMPANY
+ The company that provided the OpenAFS client.
+ 
+ .topic IDH_SVCCPL
+ Open the OpenAFS Client Configuration utility.
+ 
+ .topic IDH_STARTAFSCREDS
+ Once the OpenAFS plugin for NetIDMgr is installed, it is no longer
+ necessary to start AFSCreds.exe everytime a user logs in.  The allows
+ you to disable AFSCreds.exe.  Note that this is a per machine setting
+ and requires Administrator privileges on the machine to have an
+ effect.
Index: openafs/src/WINNT/netidmgr_plugin/help/popups_newcred.txt
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/help/popups_newcred.txt:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/help/popups_newcred.txt	Thu Oct 12 17:19:43 2006
***************
*** 0 ****
--- 1,31 ----
+ .topic IDH_OBTAIN
+ If checked, obtains AFS tokens for this identity as specified below.
+ Otherwise, doesn't obtain AFS tokens at all.
+ 
+ .topic IDH_CELL
+ The name of the cell for which this token will be obtained for.
+ 
+ .topic IDH_REALM
+ The Kerberos realm used to obtain the service ticket for the cell.
+ Select 'Automatic' to let the AFS plug-in determine the realm
+ automatically.
+ 
+ .topic IDH_METHOD
+ The method used to construct the AFS token.  Select 'Automatic' to let
+ the AFS plugin determine the method automatically.
+ 
+ .topic IDH_ADD
+ Add or update the token in the token list.  If the token already
+ exists in the list, then the information will be updated.  Otherwise
+ it will be added.
+ 
+ .topic IDH_DELETE
+ Delete the selected tokens from the token list.  Tokens that are
+ currently selected in the tokens list will be deleted.  If no tokens
+ are selected in the list, then the token corresponding to the cell
+ listed in the 'Cell' input box will be deleted.
+ 
+ .topic IDH_TOKENLIST
+ The list of tokens that will be obtained for this identity.
+ Double-click on any of the tokens here to get details about the state
+ of each token.
Index: openafs/src/WINNT/netidmgr_plugin/help/toc.hhc
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/help/toc.hhc:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/help/toc.hhc	Thu Oct 12 17:19:43 2006
***************
*** 0 ****
--- 1,56 ----
+ <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+ <HTML>
+ <HEAD>
+ <!-- Sitemap 1.0 -->
+ </HEAD>
+ <BODY>
+ <OBJECT type="text/site properties">
+ 	<param name="Category" value="Usage">
+ 	<param name="CategoryDesc" value="Usage instructions for Network Identity Manager">
+ 	<param name="Window Styles" value="0x800025">
+ </OBJECT>
+ <UL>
+         <LI> <OBJECT type="text/sitemap">
+ 		<param name="Name" value="Welcome to OpenAFS">
+ 		<param name="Local" value="html\welcome.htm">
+ 		</OBJECT>
+ 	<UL>
+ 		<LI> <OBJECT type="text/sitemap">
+ 			<param name="Name" value="Reporting bugs">
+ 			<param name="Local" value="html\bugs.htm">
+ 			</OBJECT>
+ 		<LI> <OBJECT type="text/sitemap">
+ 			<param name="Name" value="License agreement">
+ 			<param name="Local" value="html\copyright.htm">
+ 			</OBJECT>
+ 	</UL>
+ 	<LI> <OBJECT type="text/sitemap">
+ 		<param name="Name" value="How do I ...">
+ 		</OBJECT>
+         <ul>
+                 <li> <object type="text/sitemap">
+                         <param name="Name" value="Specify AFS tokens when getting new credentials...">
+                         <param name="Local" value="html\tokens_per_id.htm#new_tokens">
+                         </object>
+ 
+                 <li> <object type="text/sitemap">
+                         <param name="Name" value="Change AFS tokens list for an identity...">
+                         <param name="Local" value="html\tokens_per_id.htm#persistent_tokens">
+                         </object>
+ 
+                 <li> <object type="text/sitemap">
+                         <param name="Name" value="Configure the AFS client service...">
+                         <param name="Local" value="html\config_service.htm">
+                         </object>
+         </ul>
+         <li> <object type="text/sitemap">
+                 <param name="Name" value="Topics">
+                 </object>
+         <ul>
+                 <li> <object type="text/sitemap">
+                         <param name="Name" value="Token Acquisition Methods">
+                         <param name="Local" value="html\token_methods.htm">
+                         </object>
+         </ul>
+ </UL>
+ </BODY></HTML>
Index: openafs/src/WINNT/netidmgr_plugin/help/html/afsplhlp.css
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/help/html/afsplhlp.css:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/help/html/afsplhlp.css	Thu Oct 12 17:19:44 2006
***************
*** 0 ****
--- 1,73 ----
+ BODY {
+    font-family:helvetica,sans-serif;
+    font-size:8pt; 
+    font-style:normal; 
+    background-color:white;
+    margin-top: 0;
+    margin-left: 0;
+    margin-right: 0;
+    }
+ 
+ H1 {
+    font-size: 10pt;
+    border-bottom:1px solid black;
+    padding:5px;
+    background-color:#eeeeee;
+    }
+ 
+ H2 {
+    }
+ 
+ H3 {
+    font-size: 9pt;
+    border-bottom: 1px solid lightgrey;
+    padding: 5px;
+    }
+ 
+ H4 {
+    font-size: 9pt;
+    font-style: italic;
+    border-bottom: 1px dashed lightgrey;
+    margin-left: 10px;
+    }
+ 
+ P  {
+    margin-left: 5px;
+    margin-right: 5px;
+    }
+ 
+ P.caption {
+    margin-left: 5px;
+    margin-right: 5px;
+    font-style: italic;
+ }
+ 
+ DIV.inline {
+    float: left;
+ }
+ 
+ DIV.sidebar {
+    float: right;
+    background-color:#ffffb9;
+    border: 1px solid #ffff00;
+ }
+ 
+ A.external {
+ }
+ 
+ A.mail {
+ }
+ 
+ IMG {
+    border: 0;
+ }
+ 
+ SPAN.pre {
+    font-family: courier;
+    font-weight: bold;
+ }
+ 
+ SPAN.title {
+    font-weight: bold;
+ }
+ 
Index: openafs/src/WINNT/netidmgr_plugin/help/html/bugs.htm
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/help/html/bugs.htm:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/help/html/bugs.htm	Thu Oct 12 17:19:44 2006
***************
*** 0 ****
--- 1,24 ----
+ <html>
+ <head>
+   <title>Reporting Bugs and Requesting Features</title>
+   <meta name="description" content="Reporting bugs and Requesting features">
+   <meta name="keywords" content="bugs,features">
+   <link rel="stylesheet" type="text/css" href="afsplhlp.css">
+ </head>
+ <body>
+ 
+ <h1>Reporting Bugs and Requesting Features</h1>
+ 
+ <p>If you experience a bug in the program, please send email to <a
+ href="mailto:bugs@secure-endpoints.com"
+ class="mail">bugs@secure-endpoints.com</a> and report it.  Please
+ include as much information as possible to enable us to reproduce the
+ problem.
+ </p>
+ 
+ <p>If there is a feature you would like to see in a future release, 
+ please send email to the same address given above.
+ </p>
+ 
+ </body>
+ </html>
\ No newline at end of file
Index: openafs/src/WINNT/netidmgr_plugin/help/html/config_service.htm
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/help/html/config_service.htm:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/help/html/config_service.htm	Thu Oct 12 17:19:44 2006
***************
*** 0 ****
--- 1,39 ----
+ <html>
+ <head>
+   <title>Configuring the AFS Service</title>
+   <meta name="description" content="Configuring the AFS Service">
+   <meta name="keywords" content="configure,service">
+   <link rel="stylesheet" type="text/css" href="afsplhlp.css">
+ </head>
+ <body>
+ 
+ <h1>Configuring the AFS Service</h1>
+ 
+ <p>The OpenAFS plug-in allows you to start or stop the AFS
+ client service, determine the installed version,  and invoke the AFS 
+ Control Panel.  This is provided via the AFS configuration panel in 
+ the NetIDMgr configuration dialog, as seen below:
+ </p>
+ 
+ <p><img src="images/window_cfg_afs_main.bmp" /></p>
+ 
+ <p>Depending on the status of the service, either the <span
+ class="pre">Stop service</span> or the <span class="pre">Start
+ service</span> buttons will be enabled.  If the service is in a state
+ where it will not accept these control requests, then both buttons will
+ be disabled.
+ </p>
+ 
+ <p>The <span class="pre">Version</span> field and the <span
+ class="pre">Company</span> fields are populated based on the resources
+ found in the <span class="pre">afsd_service.exe</span> binary.  This
+ is the main binary that provides the AFS client service.  Unless the
+ build of OpenAFS that you have installed is a private build, the
+ version should correspond to the release of OpenAFS that is installed
+ on your machine.</p>
+ 
+ <p>Clicking the <span class="pre">Open AFS Control Panel...</span>
+ will open the AFS configuration utility.</p>
+ 
+ </body>
+ </html>
\ No newline at end of file
Index: openafs/src/WINNT/netidmgr_plugin/help/html/copyright.htm
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/help/html/copyright.htm:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/help/html/copyright.htm	Thu Oct 12 17:19:44 2006
***************
*** 0 ****
--- 1,42 ----
+ <html>
+ <head>
+   <title>License</title>
+   <meta name="description" content="License agreement">
+   <meta name="keywords" content="license">
+   <link rel="stylesheet" type="text/css" href="afsplhlp.css">
+ </head>
+ <body>
+ 
+ <h1>OpenAFS Plug-in for Network Identification Manager License</h1>
+ 
+ <p>This software is being provided to you, the LICENSEE, by Secure
+ Endpoints Inc. under the following license. By obtaining, using and/or
+ copying this software, you agree that you have read, understood, and
+ will comply with these terms and conditions:</p>
+ 
+ <p>Permission to use, copy, modify and distribute this software and its
+ documentation for any purpose and without fee or royalty is hereby
+ granted, provided that you agree to comply with the following
+ copyright notice and statements, including the disclaimer, and that
+ the same appear on ALL copies of the software and documentation,
+ including modifications that you make for internal use or for
+ distribution:</p>
+ 
+ <p>Copyright 2005 by Secure Endpoints Inc.. All rights reserved.</p>
+ 
+ <p>THIS SOFTWARE IS PROVIDED "AS IS", AND SECURE ENDPOINTS INC. MAKES
+ NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. By way of
+ example, but not limitation, SECURE ENDPOINTS INC. MAKES NO
+ REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
+ PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE OR
+ DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
+ TRADEMARKS OR OTHER RIGHTS.</p>
+ 
+ <p>The name of Secure Endpoints Inc. may NOT be used in advertising or
+ publicity pertaining to distribution of the software. Title to
+ copyright in this software and any associated documentation shall at
+ all times remain with Secure Endpoints Inc., and USER agrees to
+ preserve same.</p>
+ 
+ </body>
+ </html>
Index: openafs/src/WINNT/netidmgr_plugin/help/html/template.htm
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/help/html/template.htm:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/help/html/template.htm	Thu Oct 12 17:19:44 2006
***************
*** 0 ****
--- 1,11 ----
+ <html>
+ <head>
+   <title>title</title>
+   <meta name="description" content="">
+   <meta name="keywords" content="">
+   <link rel="stylesheet" type="text/css" href="afsplhlp.css">
+ </head>
+ <body>
+ 
+ </body>
+ </html>
\ No newline at end of file
Index: openafs/src/WINNT/netidmgr_plugin/help/html/token_methods.htm
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/help/html/token_methods.htm:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/help/html/token_methods.htm	Thu Oct 12 17:19:44 2006
***************
*** 0 ****
--- 1,70 ----
+ <html>
+ <head>
+   <title>Token Acquisition Methods</title>
+   <meta name="description" content="Token Acquisition Methods">
+   <meta name="keywords" content="token, krb5, krb4, krb524">
+   <link rel="stylesheet" type="text/css" href="afsplhlp.css">
+ </head>
+ <body>
+ 
+ <h1>Token Acquisition Methods</h1>
+ 
+ <p>AFS tokens can be obtained via several different methods.  Each of
+ the methods that are natively supported by the OpenAFS plug-in is
+ described below.  Note that, additional plug-ins may define other
+ acquisition methods that are not listed here.
+ </p>
+ 
+ <h4>Contents</h4>
+ 
+ <ul>
+ <li><a href="#krb5">Kerberos 5</a></li>
+ <li><a href="#krb524">Kerberos 5 to 4 conversion</a></li>
+ <li><a href="#krb4">Kerberos 4</a></li>
+ <li><a href="#auto">Automatic method selection</a></li>
+ </ul>
+ 
+ <a name="krb5" />
+ <h3>Kerberos 5</h3>
+ 
+ <p>A Kerberos 5 service ticket is obtained for the cell and used directly to
+ construct the AFS token.
+ </p>
+ 
+ <a name="krb524"/>
+ <h3>Kerberos 5 to 4 conversion (Kerberos 524)</h3>
+ 
+ <p>A Kerberos 5 service ticket is obtained for the cell and then
+ converted to a Kerberos 4 service ticket using the krb524 daemon.  The
+ resulting Kerberos 4 ticket is used to construct the AFS token.
+ </p>
+ 
+ <a name="krb4"/>
+ <h3>Kerberos 4</h3>
+ 
+ <p>A Kerberos 4 service ticket is obtained for the cell and then used
+ to construct the AFS token.  In order to use this method, the identity
+ must be be configured to obtain Kerberos 4 tickets when obtaining and
+ renewing credentials.  Otherwise a Kerberos 4 TGT (ticket granting
+ ticket) will not be available to obtain the service ticket with.
+ </p>
+ 
+ <a name="auto"/>
+ <h3>Automatic method selection</h3>
+ 
+ <p>When the OpenAFS plug-in is configured to use automatic method
+ selection for obtaining an AFS token, it iterates through the Kerberos
+ 5, Kerberos 524 and Kerberos 4 methods until one of them succeeds.  If
+ a realm for the service ticket is specified, then the realm will be
+ used for all methods.
+ </p>
+ 
+ <p>The correct method to use for your AFS cell will depend on the
+ configuration of the AFS cell and the associated Kerberos realm.  In
+ most cases, automatic method selection will determine the correct
+ realm.  However, other cases, the method will have to be specified
+ explicitly.
+ </p>
+ 
+ </body>
+ </html>
\ No newline at end of file
Index: openafs/src/WINNT/netidmgr_plugin/help/html/tokens_per_id.htm
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/help/html/tokens_per_id.htm:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/help/html/tokens_per_id.htm	Thu Oct 12 17:19:44 2006
***************
*** 0 ****
--- 1,189 ----
+ <html>
+ <head>
+   <title>Configuring identifications to obtain tokens for AFS cells</title>
+   <meta name="description" content="Specifying tokens per identification">
+   <meta name="keywords" content="tokns, identification, specify">
+   <link rel="stylesheet" type="text/css" href="afsplhlp.css">
+ </head>
+ <body>
+ 
+ <h1>Configuring identifications to obtain tokens for AFS cells</h1>
+ 
+ <p>
+ The OpenAFS plug-in maintains a list of AFS cells for each identification.
+ A list is created the first time AFS tokens are obtained for an
+ identification or when the list of cells is 
+ specified in the identification configuration panels.  Each AFS cell that
+ is listed is associated with a method by which a token should
+ be obtained and the name of the Kerberos realm that is used to
+ obtain the service ticket (more details are provided in the <a
+ href="token_methods.htm">Token Aquisition Methods</a> topic).
+ </p>
+ 
+ <p>The following sections detail the process by which AFS cells can be
+ specified when obtaining new credentials or configuring identifications.
+ </p>
+ 
+ <a name="new_tokens" />
+ <h3>Specifying AFS cells when obtaining new credentials</h3>
+ 
+ <p>
+ When the OpenAFS plug-in is installed, it enhances the NetIDMgr new credentials
+ dialog with an AFS tokens options panel.  A typical new
+ credentials dialog is shown below demonstrating AFS cells listed in the
+ credentials summary window.
+ </p>
+ 
+ <p><img src="images/window_nc_main.bmp" alt="New credentials window showing AFS cells in the credentials summary window" /></p>
+ 
+ <p>Clicking on the <span class="pre">AFS</span> link in the
+ credentials summary window will take you to the AFS options page.
+ Alternatively, you can select the <span class="pre">Options
+ &gt;&gt;</span> button which expands the dialog to show the
+ credentials type buttons, and then click the <span
+ class="pre">AFS</span> button at the bottom of the expanded dialog.
+ </p>
+ 
+ <p>The AFS identification options page is shown below</p>
+ 
+ <p><img src="images/window_nc_afs_0.bmp" alt="AFS identification options page" /></p>
+ 
+ <p>This page allows you to specify if AFS tokens are obtained for this
+ identification and if so, for which tokens and by which method will they be
+ obtained.  By unchecking the <span class="pre">Obtain AFS
+ tokens</span> checkbox, you can prevent AFS tokens from being obtained
+ for this idenfication.
+ </p>
+ 
+ <p>Once the new credentials dialog successfully completes, the list of
+ cells will be saved with the identification.  The next
+ time you obtain new credentials for the identification, the list of cells
+ will be loaded automatically.  This list can be edited either by using
+ the new credentials dialog or the identity configuration
+ panels. (See <a href="#persistent_tokens">Changing persistent tokent lists</a>).
+ </p>
+ 
+ <h4>To add a cell:</h4>
+ <p>
+ <ul>
+ 
+ <li>Specify the name of the cell in the <span class="pre">Cell</span>
+ text box.</li>
+ 
+ <li>Specify the Kerberos realm for the service ticket in the <span
+ class="pre">Realm</span> text box.  Note that you can select <span
+ class="pre">(Automatic)</span> as the realm to allow the OpenAFS
+ plug-in to select the realm.  For most cases, you don't need to specify
+ the realm manually and can safely leave the <span
+ class="pre">Realm</span> as <span class="pre">(Automatic)</span></li>
+ 
+ <li>Specify the token acquisition method in the <span
+ class="pre">Method</span>.  You can select <span
+ class="pre">(Automatic)</span> as the method to allow the OpenAFS
+ plug-in to select the method automatically.  Similar to the automatic
+ realm selection, for most cases the plug-in will be able to correctly
+ select the token aquisition method.  More details about credentials
+ acquisition methods are provided in the <a
+ href="token_methods.htm">Token Acquisition Methods</a> topic.</li>
+ 
+ <li>Select the <span class="pre">Add/Update</span> button to add the
+ cell.</li>
+ 
+ </ul>
+ </p>
+ 
+ <p>Note that only one token can exist per cell per login session.
+ Which means that if you already have a token for cell <em>X</em> while
+ you are logged in as user <em>A</em>, then you can't have another
+ token for cell <em>X</em>.  This means that only one identification can 
+ obtain a token for a given cell.</p>
+ 
+ <p>Therefore, if you try to add a cell to an identification which is
+ already listed in the persistent cell list for another identification or
+ which currently exists under a different identification, you will receive a
+ warning such as the following:
+ </p>
+ 
+ <p>
+ <img src="images/window_nc_prob.bmp" alt="Message displaying warning about a duplicate cell" />
+ </p>
+ 
+ <p>From here, you can decide to keep the cell listed for both
+ identifications (although only one of them can be active at any given
+ time), or remove the cell from all the other identifications and add it to
+ the current one.  Also, you can cancel the add cell request.
+ </p>
+ 
+ <h4>To modify a cell</h4>
+ <p>
+ <ul>
+ 
+ <li>Select the cell from the list of cells.  The cell name, realm and
+ method in the text boxes will be updated to display the information
+ from the cell just selected.</li>
+ 
+ <li>Make changes to the realm and method fields as appropriate</li>
+ 
+ <li>Select <span class="pre">Add / Update</span> to update the
+ information in the cell list</li>
+ 
+ </ul>
+ </p>
+ 
+ <p>Note that if you don't click the <span class="pre">Add /
+ Update</span>, the cell entry will not be updated.
+ </p>
+ 
+ <h4>To delete cells</h4>
+ 
+ <p>
+ <ul>
+ 
+ <li>Select the cells you want to delete from the cell list.  You can
+ select multiple cells by clicking while holding the <span
+ class="pre">Ctrl</span> key.</li>
+ 
+ <li>Select the <span class="pre">Delete</span> button.</span></li>
+ 
+ </ul>
+ </p>
+ 
+ <h4>Cell states</h4>
+ 
+ <p>When you add cells or when you view the cell list, you will see
+ an icon next to each cell name.  This icon represents the current state of
+ the cell's token.  You can double-click on the cell to get details about the
+ state.
+ </p>
+ 
+ <p><img src="images/window_nc_afs_2.bmp" /></p>
+ 
+ <p>
+ <div class="inline"><img src="images/window_nc_afs_1.bmp" /></div>
+ Token for cell <span class="pre">foo.bar</span> is a new token while
+ the token for <span class="pre">net.mit.edu</span> is in a problem
+ state.  Double clicking the problem token will display a balloon
+ prompt indicating what the problem is.
+ </p>
+ 
+ <a name="persistent_tokens" />
+ <h3>Changing persistent cell lists for existing identifications</h3>
+ 
+ <p>
+ The configuration panel for a persistent identification contains a panel for
+ specifying the AFS cells.  This panel is identical to the panel used
+ by the new credentials dialog.  You can easily modify the cell lists
+ as described above and click <span class="pre">Apply</span> and you
+ are done.
+ </p>
+ 
+ <p>The AFS configuration panel for an identification is shown below.</p>
+ 
+ <p><img src="images/window_cfg_afs_0.bmp" /></p>
+ 
+ <p>You can reach this configuration panel by opening the configuration
+ dialog (<span class="pre">Options</span> menu), and then clicking the
+ persistent identification you need to modify options for.</p>
+ 
+ </body>
+ </html>
\ No newline at end of file
Index: openafs/src/WINNT/netidmgr_plugin/help/html/welcome.htm
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/help/html/welcome.htm:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:25 2006
--- openafs/src/WINNT/netidmgr_plugin/help/html/welcome.htm	Thu Oct 12 17:19:44 2006
***************
*** 0 ****
--- 1,61 ----
+ <html>
+ <head>
+   <title>Welcome to the OpenAFS plug-in for NetIDMgr</title>
+   <meta name="description" content="Welcome">
+   <meta name="keywords" content="welcome">
+   <link rel="stylesheet" type="text/css" href="afsplhlp.css">
+ </head>
+ 
+ <h1>Welcome to the OpenAFS plug-in for NetIDMgr</h1>
+ 
+ <img src="images/openafs-logo.jpg"/>
+ 
+ <p>
+ The OpenAFS plug-in extends the Network Identity Manager (or
+ NetIDMgr for short) to support AFS credential management.  This plug-in 
+ obtains AFS tokens for the cells associated with each identification 
+ and provides the tools necessary to maintain them.
+ </p>
+ 
+ <p>
+ This version of the plug-in is provided by Secure Endpoints Inc.
+ Visit <a class="external"
+ href="http://www.secure-endpoints.com">http://www.secure-endpoints.com</a>
+ for updates.
+ </p>
+ 
+ <ul>
+ <li><a href="copyright.htm">Legal information</a></li>
+ <li><a href="bugs.htm">Reporting problems and requesting features</a></li>
+ </ul>
+ 
+ <h3>Using the OpenAFS plug-in</h3>
+ 
+ <ul>
+ 
+ <li>
+ <a href="tokens_per_id.htm">Associating an AFS cell with an
+ identification</a>: How to configure identification options to obtain
+ tokens for select AFS cells.</li>
+ 
+ <li>
+ <a href="config_service.htm">Managing the AFS client service</a>: How
+ to manage the AFS client service and configuration.  </li>
+ 
+ </ul>
+ 
+ 
+ <h3>External links</h3>
+ 
+ <ul>
+ <li><a class="external" href="http://openafs.org">http://openafs.org</a>:
+ 
+ OpenAFS
+ </li>
+ 
+ <li><a class="external" href="http://www.secure-endpoints.com">http://www.secure-endpoints.com</a>:
+ 
+ Secure Endpoints Inc.
+ </ul>
+ 
+ </html>
\ No newline at end of file
Index: openafs/src/WINNT/netidmgr_plugin/help/html/images/openafs-logo.jpg
Index: openafs/src/WINNT/netidmgr_plugin/help/html/images/window_cfg_afs_0.bmp
Index: openafs/src/WINNT/netidmgr_plugin/help/html/images/window_cfg_afs_main.bmp
Index: openafs/src/WINNT/netidmgr_plugin/help/html/images/window_nc_afs_0.bmp
Index: openafs/src/WINNT/netidmgr_plugin/help/html/images/window_nc_afs_1.bmp
Index: openafs/src/WINNT/netidmgr_plugin/help/html/images/window_nc_afs_2.bmp
Index: openafs/src/WINNT/netidmgr_plugin/help/html/images/window_nc_main.bmp
Index: openafs/src/WINNT/netidmgr_plugin/help/html/images/window_nc_prob.bmp
Index: openafs/src/WINNT/netidmgr_plugin/images/OpenAFS.ico
Index: openafs/src/WINNT/netidmgr_plugin/images/afstoken.ico
Index: openafs/src/WINNT/netidmgr_plugin/images/nc_exist.ico
Index: openafs/src/WINNT/netidmgr_plugin/images/nc_new.ico
Index: openafs/src/WINNT/netidmgr_plugin/images/nc_notowned.ico
Index: openafs/src/WINNT/netidmgr_plugin/lang/en_us/langres.rc
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/lang/en_us/langres.rc:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:26 2006
--- openafs/src/WINNT/netidmgr_plugin/lang/en_us/langres.rc	Thu Oct 12 17:19:46 2006
***************
*** 0 ****
--- 1,273 ----
+ // Microsoft Visual C++ generated resource script.
+ //
+ #include "..\..\langres.h"
+ 
+ #define APSTUDIO_READONLY_SYMBOLS
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // Generated from the TEXTINCLUDE 2 resource.
+ //
+ #include "afxres.h"
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ #undef APSTUDIO_READONLY_SYMBOLS
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ // English (U.S.) resources
+ 
+ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+ #ifdef _WIN32
+ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+ #pragma code_page(1252)
+ #endif //_WIN32
+ 
+ #ifdef APSTUDIO_INVOKED
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // TEXTINCLUDE
+ //
+ 
+ 1 TEXTINCLUDE 
+ BEGIN
+     "..\\..\\langres.h\0"
+ END
+ 
+ 2 TEXTINCLUDE 
+ BEGIN
+     "#include ""afxres.h""\r\n"
+     "\0"
+ END
+ 
+ 3 TEXTINCLUDE 
+ BEGIN
+     "\r\n"
+     "\0"
+ END
+ 
+ #endif    // APSTUDIO_INVOKED
+ 
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // Dialog
+ //
+ 
+ IDD_NC_AFS DIALOGEX 0, 0, 300, 166
+ STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_SYSMENU
+ EXSTYLE WS_EX_CONTROLPARENT
+ FONT 8, "MS Shell Dlg", 400, 0, 0x1
+ BEGIN
+     LTEXT           "AFS Token Options",IDC_STATIC,7,7,286,11,SS_SUNKEN | NOT WS_GROUP
+     CONTROL         "Obtain &AFS tokens",IDC_NCAFS_OBTAIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,19,74,12
+     GROUPBOX        "Token for",IDC_STATIC,7,32,286,54
+     LTEXT           "&Cell",IDC_STATIC,12,41,42,10
+     COMBOBOX        IDC_NCAFS_CELL,57,38,152,12,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+     LTEXT           "&Realm",IDC_STATIC,12,57,42,10
+     COMBOBOX        IDC_NCAFS_REALM,57,54,152,12,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+     LTEXT           "&Method",IDC_STATIC,12,73,42,10
+     COMBOBOX        IDC_NCAFS_METHOD,57,70,152,12,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+     PUSHBUTTON      "&Add/Update",IDC_NCAFS_ADD_TOKEN,213,38,77,13,BS_NOTIFY
+     PUSHBUTTON      "&Delete",IDC_NCAFS_DELETE_TOKEN,213,70,77,13,BS_NOTIFY
+     CONTROL         "",IDC_NCAFS_TOKENLIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,88,286,71
+ END
+ 
+ IDD_CFG_IDS_TAB DIALOGEX 0, 0, 235, 151
+ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
+ EXSTYLE WS_EX_CONTROLPARENT
+ FONT 8, "MS Shell Dlg", 400, 0, 0x1
+ BEGIN
+     CONTROL         "Obtain AFS tokens for new identities",IDC_CFG_OBTAIN,
+                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,133,10
+ END
+ 
+ IDD_CFG_ID_TAB DIALOGEX 0, 0, 235, 151
+ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
+ EXSTYLE WS_EX_CONTROLPARENT
+ FONT 8, "MS Shell Dlg", 400, 0, 0x1
+ BEGIN
+     CONTROL         "Obtain &AFS tokens",IDC_NCAFS_OBTAIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,74,12
+     GROUPBOX        "Token for",IDC_STATIC,7,18,221,56
+     LTEXT           "&Cell",IDC_STATIC,13,28,42,10
+     COMBOBOX        IDC_NCAFS_CELL,57,25,109,12,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+     LTEXT           "&Realm",IDC_STATIC,13,44,42,10
+     COMBOBOX        IDC_NCAFS_REALM,57,41,109,12,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+     LTEXT           "&Method",IDC_STATIC,13,60,42,10
+     COMBOBOX        IDC_NCAFS_METHOD,57,57,109,12,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+     PUSHBUTTON      "&Add/Update",IDC_NCAFS_ADD_TOKEN,174,26,50,13,BS_NOTIFY
+     PUSHBUTTON      "&Delete",IDC_NCAFS_DELETE_TOKEN,174,56,50,13,BS_NOTIFY
+     CONTROL         "",IDC_NCAFS_TOKENLIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,75,221,69
+ END
+ 
+ IDD_CFG_AFS DIALOGEX 0, 0, 255, 182
+ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
+ EXSTYLE WS_EX_CONTROLPARENT
+ FONT 8, "MS Shell Dlg", 400, 0, 0x1
+ BEGIN
+     GROUPBOX        "AFS Service",IDC_CFG_SVCGRP,7,7,241,86
+     LTEXT           "Service status",IDC_CFG_LBL_STATUS,14,18,46,8
+     EDITTEXT        IDC_CFG_STATUS,68,16,172,14,ES_AUTOHSCROLL | ES_READONLY
+     PUSHBUTTON      "Stop service",IDC_CFG_STOP,68,34,50,14
+     PUSHBUTTON      "Start service",IDC_CFG_START,127,34,50,14
+     CONTROL         "",IDC_CFG_PROGRESS,"msctls_progress32",NOT WS_VISIBLE | WS_BORDER,184,38,56,8
+     LTEXT           "Version",IDC_CFG_LBL_VERSION,14,57,24,8
+     EDITTEXT        IDC_CFG_VERSION,68,54,172,14,ES_AUTOHSCROLL | ES_READONLY
+     LTEXT           "Company",IDC_CFG_LBL_COMPANY,14,75,31,8
+     EDITTEXT        IDC_CFG_COMPANY,68,72,172,14,ES_AUTOHSCROLL | ES_READONLY
+     PUSHBUTTON      "Open AFS Control Panel ...",IDC_CFG_CPL,128,161,112,14
+     GROUPBOX        "Startup options",IDC_CFG_STARTGRP,7,99,241,48
+     CONTROL         "Prevent AFSCreds.exe from starting automatically everytime you log in to Windows.",IDC_CFG_STARTAFSCREDS,
+                     "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,14,108,226,22
+ END
+ 
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // DESIGNINFO
+ //
+ 
+ #ifdef APSTUDIO_INVOKED
+ GUIDELINES DESIGNINFO 
+ BEGIN
+     IDD_NC_AFS, DIALOG
+     BEGIN
+         LEFTMARGIN, 7
+         RIGHTMARGIN, 293
+         TOPMARGIN, 7
+         BOTTOMMARGIN, 159
+     END
+ 
+     IDD_CFG_IDS_TAB, DIALOG
+     BEGIN
+         LEFTMARGIN, 7
+         RIGHTMARGIN, 228
+         TOPMARGIN, 7
+         BOTTOMMARGIN, 144
+     END
+ 
+     IDD_CFG_ID_TAB, DIALOG
+     BEGIN
+         LEFTMARGIN, 7
+         RIGHTMARGIN, 228
+         TOPMARGIN, 7
+         BOTTOMMARGIN, 144
+     END
+ 
+     IDD_CFG_AFS, DIALOG
+     BEGIN
+         LEFTMARGIN, 7
+         RIGHTMARGIN, 248
+         VERTGUIDE, 14
+         VERTGUIDE, 68
+         VERTGUIDE, 240
+         TOPMARGIN, 7
+         BOTTOMMARGIN, 175
+     END
+ END
+ #endif    // APSTUDIO_INVOKED
+ 
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // Icon
+ //
+ 
+ // Icon with lowest ID value placed first to ensure application icon
+ // remains consistent on all systems.
+ IDI_AFSTOKEN            ICON                    "..\\..\\images\\afstoken.ico"
+ IDI_AFSPLUGIN           ICON                    "..\\..\\images\\OpenAFS.ico"
+ IDI_NC_NEW              ICON                    "..\\..\\images\\nc_new.ico"
+ IDI_NC_EXIST            ICON                    "..\\..\\images\\nc_exist.ico"
+ IDI_NC_NOTOWNED         ICON                    "..\\..\\images\\nc_notowned.ico"
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // String Table
+ //
+ 
+ STRINGTABLE 
+ BEGIN
+     IDS_AFS_SHORT_DESC      "AFS tokens"
+     IDS_AFS_LONG_DESC       "AFS tokens"
+     IDS_AFS_NAME            "AFS"
+     IDS_NCAFS_COL_CELL      "Cell"
+     IDS_NCAFS_COL_REALM     "Realm"
+     IDS_NCAFS_COL_METHOD    "Method"
+     IDS_NC_METHOD_AUTO      "(Automatic)"
+     IDS_NC_METHOD_KRB5      "Kerberos 5"
+     IDS_NC_METHOD_KRB4      "Kerberos 4"
+     IDS_NC_METHOD_KRB524    "Krb524"
+     IDS_NC_REALM_AUTO       "(Automatic)"
+ END
+ 
+ STRINGTABLE 
+ BEGIN
+     IDS_NC_TT_NO_CELL       "You have not specified an AFS cell to authenticate to."
+     IDS_NC_TT_CANT_ADD      "Can't add a new token"
+     IDS_NC_TT_MALFORMED_CELL 
+                             "The cell name you specified contains invalid characters."
+     IDS_NC_TT_NO_REALM      "You have not specified a Kerberos realm to use to obtain tokesn for the cell."
+     IDS_NC_AUTO             "(Auto)"
+     IDS_NC_TT_MALFORMED_REALM 
+                             "The realm name you entered contains invalid characters."
+     IDS_NC_TT_CANT_UPDATE   "Can't update token"
+     IDS_AFS_CREDTEXT_DIS    "<p><a id=""SwitchPanel"" param=""AfsCred""><b>AFS</b></a><tab>: AFS is disabled. (click <a id=""AfsCred:Enable"">here</a> to enable)</p>"
+     IDS_AFS_CREDTEXT_0      "<p><a id=""SwitchPanel"" param=""AfsCred""><b>AFS</b></a><tab>: No tokens selected</p>"
+     IDS_AFS_CREDTEXT_1      "<p><a id=""SwitchPanel"" param=""AfsCred""><b>AFS</b></a><tab>: Token for cell %s</p>"
+     IDS_AFS_CREDTEXT_N      "<p><a id=""SwitchPanel"" param=""AfsCred""><b>AFS</b></a><tab>: Tokens for cells %s</p>"
+     IDS_ATTR_CELL_SHORT_DESC "Cell"
+     IDS_ATTR_REALM_SHORT_DESC "Realm"
+     IDS_ATTR_METHOD_SHORT_DESC "Method"
+     IDS_ATTR_CLIENT_SHORT_DESC "Client Principal"
+     IDS_ATTR_CLIENT_PRINC_SHORT_DESC "Client Principal"
+ END
+ 
+ STRINGTABLE 
+ BEGIN
+     IDS_ATTR_SERVER_PRINC_SHORT_DESC "Server Principal"
+     IDS_DEF_LOCATION        "AFS Cache Manager"
+     IDS_PLUGIN_DESC         "AFS Credentials Provider"
+     IDS_CFG_IDS_TAB         "AFS"
+     IDS_CFG_ID_TAB          "AFS"
+     IDS_CFG_MAIN_LONG       "AFS Configuration"
+     IDS_CFG_MAIN_SHORT      "AFS"
+     IDS_CFG_SVCSTATUS       "Status is unknown,Stopped,Starting ...,Stopping ...,Running,Continuing ...,Pausing ...,Paused,Status is unknown"
+     IDS_NC_METHODL_AUTO     "(Automatically determine method)"
+     IDS_NC_METHODL_KRB5     "Kerberos 5"
+     IDS_NC_METHODL_KRB4     "Kerberos 4"
+     IDS_NC_METHODL_KRB524   "Krb524"
+     IDS_NC_METHOD_INVALID   "(Invalid method identifier)"
+     IDS_NC_TT_CONFLICT      "Tokens for cell %s are already listed for identity %s.\nDo you want to keep the token for this cell for other identities?"
+     IDS_NC_TT_PROBLEM       "Problem with new token"
+     IDS_NC_TT_CONFLICTM     "Tokens for cell %s are already listed for identity %s.\nDo you want to keep the token for other identities as well as this one?"
+ END
+ 
+ STRINGTABLE 
+ BEGIN
+     IDS_NC_TT_DETAILS       "Details about token"
+     IDS_NC_TT_CONFLICTD     "This token already exists under a different identity."
+     IDS_NC_TT_EXPIRED       "Currently existing token has expired."
+     IDS_NC_TT_EXISTS        "This token already exists for this identity."
+     IDS_NC_TT_NEW           "This is a new token for this identity."
+     IDS_CFG_CANTSTART       "The AFS service could not be started.\n\n"
+     IDS_CFG_CANTSTOP        "The AFS service could not be stopped.\n\n"
+     IDS_ERR_CELLCONFIG      "Could not locate configuration information for cell %1!S!."
+     IDS_ERR_NOSERVICE       "The AFS service is not running.  If OpenAFS is installed, you can start the service using the AFS configuration panel."
+     IDS_ERR_CELLCONFIG_S    "The error code returned was %2!d!."
+     IDS_ERR_GENERAL         "Tokens could not be obtained for cell %1!S!."
+ END
+ 
+ #endif    // English (U.S.) resources
+ /////////////////////////////////////////////////////////////////////////////
+ 
+ 
+ 
+ #ifndef APSTUDIO_INVOKED
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // Generated from the TEXTINCLUDE 3 resource.
+ //
+ 
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ #endif    // not APSTUDIO_INVOKED
+ 
Index: openafs/src/WINNT/netidmgr_plugin/lang/en_us/license.rtf
Index: openafs/src/WINNT/netidmgr_plugin/lang/en_us/resource.h
diff -c /dev/null openafs/src/WINNT/netidmgr_plugin/lang/en_us/resource.h:1.1.2.2
*** /dev/null	Tue Oct 17 22:48:26 2006
--- openafs/src/WINNT/netidmgr_plugin/lang/en_us/resource.h	Thu Oct 12 17:19:46 2006
***************
*** 0 ****
--- 1,15 ----
+ //{{NO_DEPENDENCIES}}
+ // Microsoft Visual C++ generated include file.
+ // Used by langres.rc
+ //
+ 
+ // Next default values for new objects
+ // 
+ #ifdef APSTUDIO_INVOKED
+ #ifndef APSTUDIO_READONLY_SYMBOLS
+ #define _APS_NEXT_RESOURCE_VALUE        102
+ #define _APS_NEXT_COMMAND_VALUE         40001
+ #define _APS_NEXT_CONTROL_VALUE         1001
+ #define _APS_NEXT_SYMED_VALUE           101
+ #endif
+ #endif
Index: openafs/src/WINNT/win9xpanel/CellServDB
diff -c openafs/src/WINNT/win9xpanel/CellServDB:1.5 openafs/src/WINNT/win9xpanel/CellServDB:1.5.4.1
*** openafs/src/WINNT/win9xpanel/CellServDB:1.5	Sat Oct 15 20:56:05 2005
--- openafs/src/WINNT/win9xpanel/CellServDB	Sun Oct  8 23:15:12 2006
***************
*** 1,15 ****
! >grand.central.org      #GCO Public CellServDB 15 Oct 2005
  18.7.14.88                      #grand-opening.mit.edu
  128.2.191.224                   #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
  >wu-wien.ac.at          #University of Economics, Vienna, Austria
! 137.208.3.33                    #afsdb1.wu-wien.ac.at
! 137.208.8.12                    #caesar.wu-wien.ac.at
! 137.208.127.33                  #buddy.wu-wien.ac.at
  >hephy.at               #hephy-vienna
  193.170.243.10                  #mowgli.oeaw.ac.at
  193.170.243.12                  #baloo.oeaw.ac.at
  193.170.243.14                  #akela.oeaw.ac.at
  >itp.tugraz.at          #Institute for Theoretical Physics, TU Graz, Austria
  129.27.157.6                    #fubphsv2.tu-graz.ac.at
  129.27.161.7                    #faepsv01.tu-graz.ac.at
--- 1,19 ----
! >grand.central.org      #GCO Public CellServDB 08 Oct 2006
  18.7.14.88                      #grand-opening.mit.edu
  128.2.191.224                   #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
  >wu-wien.ac.at          #University of Economics, Vienna, Austria
! 137.208.3.33                    #goya.wu-wien.ac.at
! 137.208.7.57                    #caravaggio.wu-wien.ac.at
! 137.208.127.57                  #vermeer.wu-wien.ac.at
  >hephy.at               #hephy-vienna
  193.170.243.10                  #mowgli.oeaw.ac.at
  193.170.243.12                  #baloo.oeaw.ac.at
  193.170.243.14                  #akela.oeaw.ac.at
+ >cgv.tugraz.at          #CGV cell
+ 129.27.224.133                  #phobos.cgv.tugraz.at
+ 129.27.224.134                  #deimos.cgv.tugraz.at
+ 129.27.224.210                  #trinculo.cgv.tugraz.at
  >itp.tugraz.at          #Institute for Theoretical Physics, TU Graz, Austria
  129.27.157.6                    #fubphsv2.tu-graz.ac.at
  129.27.161.7                    #faepsv01.tu-graz.ac.at
***************
*** 22,30 ****
  137.138.206.77                  #pcamsf2.cern.ch
  137.138.206.123                 #pcamsf4.cern.ch
  >epfl.ch                #Swiss Federal Institute of Technology at Lausanne
! 128.178.2.6                     #kd1.epfl.ch
! 128.178.2.7                     #kd2.epfl.ch
! 128.178.2.8                     #kd3.epfl.ch
  >ethz.ch                #Swiss Federal Inst. of Tech. - Zurich, Switzerland
  129.132.97.19                   #amalthea.ethz.ch
  129.132.97.27                   #nethzafs-001.ethz.ch
--- 26,34 ----
  137.138.206.77                  #pcamsf2.cern.ch
  137.138.206.123                 #pcamsf4.cern.ch
  >epfl.ch                #Swiss Federal Institute of Technology at Lausanne
! 128.178.109.111                 #kd1.epfl.ch
! 128.178.109.112                 #kd2.epfl.ch
! 128.178.109.113                 #kd3.epfl.ch
  >ethz.ch                #Swiss Federal Inst. of Tech. - Zurich, Switzerland
  129.132.97.19                   #amalthea.ethz.ch
  129.132.97.27                   #nethzafs-001.ethz.ch
***************
*** 37,44 ****
  129.129.190.142                 #afs02.psi.ch
  >extundo.com            #Simon Josefsson's cell
  195.42.214.241                  #slipsten.extundo.com
- >mekinok.com            #Mekinok, Inc.
- 4.36.43.98                      #loggerhead.mekinok.com
  >membrain.com           #membrain.com
  66.93.118.125                   #stormy
  130.85.24.11                    #weasel
--- 41,46 ----
***************
*** 105,121 ****
  144.41.2.3                      #rs14.serv.uni-hohenheim.de
  144.41.2.4                      #rs15.serv.uni-hohenheim.de
  >rz.uni-jena.de         #Rechenzentrum University of Jena, Germany
! 141.35.2.160                    #lc00.rz.uni-jena.de
! 141.35.7.9                      #fsuj01.rz.uni-jena.de
! 141.35.7.10                     #zaphod.rz.uni-jena
  >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
  134.95.144.22                   #afs1.meteo.uni-koeln.de
  134.95.144.24                   #afs2.meteo.uni-koeln.de
  >rrz.uni-koeln.de       #University of Cologne - Reg Comp Center
  134.95.19.3                     #afsdb1.rrz.uni-koeln.de
! 134.95.19.30                    #fileserv3.rrz.uni-koeln.de
  134.95.67.97                    #afs.thp.uni-koeln.de
! 134.95.140.190                  #rzkbserv.rrz.uni-koeln.de
  >physik.uni-mainz.de    #institute of physics, university Mainz, Germany
  134.93.130.93                   #hardy.physik.uni-mainz.de
  >uni-mannheim.de        #Uni Mannheim (Rechenzentrum)
--- 107,123 ----
  144.41.2.3                      #rs14.serv.uni-hohenheim.de
  144.41.2.4                      #rs15.serv.uni-hohenheim.de
  >rz.uni-jena.de         #Rechenzentrum University of Jena, Germany
! 141.35.2.180                    #afs00.rz.uni-jena.de
! 141.35.2.181                    #afs01.rz.uni-jena.de
! 141.35.2.182                    #afs02.rz.uni-jena.de
  >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
  134.95.144.22                   #afs1.meteo.uni-koeln.de
  134.95.144.24                   #afs2.meteo.uni-koeln.de
  >rrz.uni-koeln.de       #University of Cologne - Reg Comp Center
  134.95.19.3                     #afsdb1.rrz.uni-koeln.de
! 134.95.19.10                    #lyra.rrz.uni-koeln.de
  134.95.67.97                    #afs.thp.uni-koeln.de
! 134.95.141.243                  #agrippina.rrz.uni-koeln.de
  >physik.uni-mainz.de    #institute of physics, university Mainz, Germany
  134.93.130.93                   #hardy.physik.uni-mainz.de
  >uni-mannheim.de        #Uni Mannheim (Rechenzentrum)
***************
*** 172,179 ****
  204.194.25.7                    #afs1.qatar.cmu.edu
  204.194.25.8                    #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
! 128.2.56.129                    #nihao.sbp.ri.cmu.edu
! 128.2.56.136                    #youtheman.sbp.ri.cmu.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
--- 174,181 ----
  204.194.25.7                    #afs1.qatar.cmu.edu
  204.194.25.8                    #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
! 128.2.179.12                    #nihao.sbp.ri.cmu.edu
! 128.2.179.113                   #youtheman.sbp.ri.cmu.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
***************
*** 186,191 ****
--- 188,195 ----
  129.170.16.22                   #halley.dartmouth.edu
  129.170.16.42                   #oort.dartmouth.edu
  129.170.16.43                   #cygnusx1.dartmouth.edu
+ >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
***************
*** 261,266 ****
--- 265,280 ----
  134.79.18.25                    #afsdb1.slac.stanford.edu
  134.79.18.26                    #afsdb2.slac.stanford.edu
  134.79.18.27                    #afsdb3.slac.stanford.edu
+ >ucdavis.edu            #University of California at Davis
+ 169.237.104.100                 #afs1.ucdavis.edu
+ 169.237.235.176                 #afs2.ucdavis.edu
+ 169.237.247.91                  #afs3.ucdavis.edu
+ >home.ucdavis.edu       #University of California at Davis home directories
+ 169.237.105.91                  #home1.ucdavis.edu
+ 169.237.105.92                  #home2.ucdavis.edu
+ 169.237.105.93                  #home3.ucdavis.edu
+ >physics.ucsb.edu       #UC Santa Barbara, Physics Dept
+ 128.111.18.161                  #ledzeppelin.physics.ucsb.edu
  >cats.ucsc.edu          #UC Santa Cruz, Comm. and Tech. Services, California U.S.A
  128.114.129.14                  #elan.ucsc.edu
  128.114.129.15                  #ichabod.ucsc.edu
***************
*** 291,316 ****
  141.211.1.34                    #ruthless.ifs.umich.edu
  >atlas.umich.edu        #ATLAS group cell in physics at University of Michigan
  141.211.43.102                  #linat02.grid.umich.edu
! 141.211.43.106                  #linat06.grid.umich.edu
! 141.211.43.109                  #atgrid.grid.umich.edu
  >citi.umich.edu         #Center for Information Technology Integration
  141.211.133.5                   #babylon.citi.umich.edu
  >lsa.umich.edu          #University of Michigan - College of LS&A
  141.211.211.53                  #gerow.lsa.umich.edu
  141.211.211.72                  #collines.lsa.umich.edu
  141.211.211.153                 #hodges.lsa.umich.edu
! >umr.edu                #University of Missouri - Rolla
! 131.151.1.59                    #afsdb1.umr.edu
! 131.151.1.70                    #afsdb3.umr.edu
! 131.151.1.146                   #afsdb2.umr.edu
  >physics.unc.edu        #Univ. of NC at Chapel Hill, Dept. of Physics
  152.2.4.1                       #who.physics.unc.edu
  152.2.4.3                       #what.physics.unc.edu
  152.2.4.5                       #when.physics.unc.edu
  >uncc.edu               #University of NC at Charlotte Mosaic AFS Cell
  152.15.10.70                    #as-sm1.uncc.edu
! 152.15.13.7                     #as-sm2.uncc.edu
! 152.15.30.27                    #fs-kenn3.uncc.edu
  >eng.utah.edu           #University of Utah - Engineering
  155.99.222.9                    #lenny.eng.utah.edu
  155.99.222.10                   #carl.eng.utah.edu
--- 305,328 ----
  141.211.1.34                    #ruthless.ifs.umich.edu
  >atlas.umich.edu        #ATLAS group cell in physics at University of Michigan
  141.211.43.102                  #linat02.grid.umich.edu
! 141.211.43.103                  #linat03.grid.umich.edu
! 141.211.43.104                  #linat04.grid.umich.edu
  >citi.umich.edu         #Center for Information Technology Integration
  141.211.133.5                   #babylon.citi.umich.edu
  >lsa.umich.edu          #University of Michigan - College of LS&A
  141.211.211.53                  #gerow.lsa.umich.edu
  141.211.211.72                  #collines.lsa.umich.edu
  141.211.211.153                 #hodges.lsa.umich.edu
! >sph.umich.edu          #University of Michigan -- School of Public Health
! 141.211.50.41                   #afssph0.sph.umich.edu
  >physics.unc.edu        #Univ. of NC at Chapel Hill, Dept. of Physics
  152.2.4.1                       #who.physics.unc.edu
  152.2.4.3                       #what.physics.unc.edu
  152.2.4.5                       #when.physics.unc.edu
  >uncc.edu               #University of NC at Charlotte Mosaic AFS Cell
  152.15.10.70                    #as-sm1.uncc.edu
! 152.15.93.186                   #as-ece1.uncc.edu
! 152.15.181.175                  #as-me1.uncc.edu
  >eng.utah.edu           #University of Utah - Engineering
  155.99.222.9                    #lenny.eng.utah.edu
  155.99.222.10                   #carl.eng.utah.edu
***************
*** 344,349 ****
--- 356,363 ----
  >dapnia.saclay.cea.fr   #CEA DAPNIA
  132.166.32.7                    #dphrsg.saclay.cea.fr
  132.166.32.12                   #dphrsl.saclay.cea.fr
+ >grif.fr                #GRIF cell
+ 192.54.208.18                   #node03.datagrid.cea.fr
  >in2p3.fr               #IN2P3 production cell
  134.158.232.11                  #ccafsdb1.in2p3.fr
  134.158.232.12                  #ccafsdb2.in2p3.fr
***************
*** 401,406 ****
--- 415,421 ----
  192.84.134.75                   #afsna.na.infn.it
  >ba.infn.it             #INFN, Sezione di Bari
  193.206.185.235                 #baafsserver.ba.infn.it
+ 193.206.185.236                 #debsrv.ba.infn.it
  >kloe.infn.it           #INFN, KLOE experiment at Laboratori di Frascati
  192.135.25.111                  #kloeafs1.lnf.infn.it
  192.135.25.112                  #kloeafs2.lnf.infn.it
***************
*** 451,461 ****
  >laroia.net             #Laroia Networks
  66.66.102.254                   #supercore.laroia.net
  >sinenomine.net         #Sine Nomine Associates
! 66.92.236.139                   #afs.sinenomine.net
  >slackers.net           #The Slackers' Network
  63.201.48.27                    #alexandria.slackers.net
  >tproa.net              #The People's Republic of Ames
  209.234.76.70                   #service-3.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
--- 466,478 ----
  >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
  209.234.76.70                   #service-3.tproa.net
+ 209.234.76.75                   #service-4.tproa.net
+ 209.234.76.76                   #service-5.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
***************
*** 484,505 ****
  >oc7.org                #The OC7 Project
  128.2.122.140                   #knife.oc7.org
  207.22.77.170                   #spoon.oc7.org
! >openafs.org            #OpenAFS Project
! 18.7.14.88                      #grand-opening.mit.edu
! 128.2.191.224                   #penn.central.org
! 130.237.48.87                   #andrew.e.kth.se
! >e.kth.se               #Royal Institute of Technology, Elektro
  130.237.32.145                  #sonen.e.kth.se
  130.237.48.7                    #anden.e.kth.se
  130.237.48.244                  #fadern.e.kth.se
  >hallf.kth.se           #Royal Institute of Technology, HALLF
! 130.237.24.141                  #rasmus13.hallf.kth.se
! 130.237.24.152                  #rasmus3.hallf.kth.se
! 130.237.24.177                  #rasmus29.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
! 130.237.202.12                  #afsdb2.isk.kth.se
! 130.237.206.13                  #afsdb1.isk.kth.se
! 130.237.209.141                 #afsdb3.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
--- 501,516 ----
  >oc7.org                #The OC7 Project
  128.2.122.140                   #knife.oc7.org
  207.22.77.170                   #spoon.oc7.org
! >kth.se                 #Royal Institute of Technology, Stockholm, Sweden
  130.237.32.145                  #sonen.e.kth.se
  130.237.48.7                    #anden.e.kth.se
  130.237.48.244                  #fadern.e.kth.se
  >hallf.kth.se           #Royal Institute of Technology, HALLF
! 130.237.24.11                   #afs1.hallf.kth.se
! 130.237.24.104                  #afs2.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
! 130.237.202.3                   #afsdb1.isk.kth.se
! 130.237.209.39                  #ezri.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
***************
*** 543,548 ****
--- 554,566 ----
  193.2.120.2                     #solkan.p-ng.si
  >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
+ 129.215.64.16                   #afsdb0.inf.ed.ac.uk
+ 129.215.64.17                   #afsdb1.inf.ed.ac.uk
+ 129.215.64.18                   #afsdb2.inf.ed.ac.uk
+ >ic.ac.uk               #Imperial College London
+ 155.198.63.148                  #icafs2.cc.ic.ac.uk
+ 155.198.63.149                  #icafs1.cc.ic.ac.uk
  >hep.man.ac.uk          #Manchester HEP
  194.36.2.3                      #afs1.hep.man.ac.uk
  194.36.2.4                      #afs2.hep.man.ac.uk
Index: openafs/src/afs/afs_osi_gcpags.c
diff -c openafs/src/afs/afs_osi_gcpags.c:1.1.2.2 openafs/src/afs/afs_osi_gcpags.c:1.1.2.4
*** openafs/src/afs/afs_osi_gcpags.c:1.1.2.2	Mon Jul 31 17:27:38 2006
--- openafs/src/afs/afs_osi_gcpags.c	Wed Sep 27 16:02:45 2006
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_osi_gcpags.c,v 1.1.2.2 2006/07/31 21:27:38 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_osi_gcpags.c,v 1.1.2.4 2006/09/27 20:02:45 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 226,238 ****
  #endif
  
  #if defined(AFS_LINUX22_ENV)
- extern rwlock_t tasklist_lock __attribute__((weak));
  void
  afs_osi_TraverseProcTable()
  {
      struct task_struct *p;
      if (&tasklist_lock)
         read_lock(&tasklist_lock);
  #ifdef DEFINED_FOR_EACH_PROCESS
      for_each_process(p) if (p->pid) {
  #ifdef STRUCT_TASK_STRUCT_HAS_EXIT_STATE
--- 226,245 ----
  #endif
  
  #if defined(AFS_LINUX22_ENV)
  void
  afs_osi_TraverseProcTable()
  {
+ #if !defined(LINUX_KEYRING_SUPPORT)
+     extern rwlock_t tasklist_lock __attribute__((weak));
      struct task_struct *p;
+  
      if (&tasklist_lock)
         read_lock(&tasklist_lock);
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+     else
+ 	rcu_read_lock();
+ #endif
+ 
  #ifdef DEFINED_FOR_EACH_PROCESS
      for_each_process(p) if (p->pid) {
  #ifdef STRUCT_TASK_STRUCT_HAS_EXIT_STATE
***************
*** 258,263 ****
--- 265,275 ----
  #endif
      if (&tasklist_lock)
         read_unlock(&tasklist_lock);
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+     else
+ 	rcu_read_unlock();
+ #endif
+ #endif
  }
  #endif
  
Index: openafs/src/afs/afs_syscall.c
diff -c openafs/src/afs/afs_syscall.c:1.1.2.3 openafs/src/afs/afs_syscall.c:1.1.2.4
*** openafs/src/afs/afs_syscall.c:1.1.2.3	Fri Aug  4 14:24:43 2006
--- openafs/src/afs/afs_syscall.c	Wed Oct 11 08:27:18 2006
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_syscall.c,v 1.1.2.3 2006/08/04 18:24:43 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_syscall.c,v 1.1.2.4 2006/10/11 12:27:18 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 100,106 ****
  
  #ifdef AFS_SPARC64_LINUX26_ENV
      if (test_thread_flag(TIF_32BIT))
! #elif AFS_SPARC64_LINUX24_ENV
      if (current->thread.flags & SPARC_FLAG_32BIT)
  #elif defined(AFS_SPARC64_LINUX20_ENV)
      if (current->tss.flags & SPARC_FLAG_32BIT)
--- 100,106 ----
  
  #ifdef AFS_SPARC64_LINUX26_ENV
      if (test_thread_flag(TIF_32BIT))
! #elif defined(AFS_SPARC64_LINUX24_ENV)
      if (current->thread.flags & SPARC_FLAG_32BIT)
  #elif defined(AFS_SPARC64_LINUX20_ENV)
      if (current->tss.flags & SPARC_FLAG_32BIT)
***************
*** 367,373 ****
  
  #ifdef AFS_SPARC64_LINUX26_ENV
      if (test_thread_flag(TIF_32BIT))
! #elif AFS_SPARC64_LINUX24_ENV
      if (current->thread.flags & SPARC_FLAG_32BIT)
  #elif defined(AFS_SPARC64_LINUX20_ENV)
      if (current->tss.flags & SPARC_FLAG_32BIT)
--- 367,373 ----
  
  #ifdef AFS_SPARC64_LINUX26_ENV
      if (test_thread_flag(TIF_32BIT))
! #elif defined(AFS_SPARC64_LINUX24_ENV)
      if (current->thread.flags & SPARC_FLAG_32BIT)
  #elif defined(AFS_SPARC64_LINUX20_ENV)
      if (current->tss.flags & SPARC_FLAG_32BIT)
Index: openafs/src/afs/IRIX/osi_machdep.h
diff -c openafs/src/afs/IRIX/osi_machdep.h:1.10 openafs/src/afs/IRIX/osi_machdep.h:1.10.2.1
*** openafs/src/afs/IRIX/osi_machdep.h:1.10	Thu Apr 13 17:08:19 2006
--- openafs/src/afs/IRIX/osi_machdep.h	Tue Oct 10 18:23:16 2006
***************
*** 160,166 ****
  #else
  #define AFS_GLOCK() AFS_MUTEX_ENTER(&afs_global_lock)
  #endif
! #define AFS_GUNLOCK()  (AFS_ASSERT_GLOCK(),  mutex_exit(&afs_global_lock))
  #define ISAFS_GLOCK() mutex_mine(&afs_global_lock)
  #else
  extern long afs_global_owner;
--- 160,166 ----
  #else
  #define AFS_GLOCK() AFS_MUTEX_ENTER(&afs_global_lock)
  #endif
! #define AFS_GUNLOCK()  { AFS_ASSERT_GLOCK(); mutex_exit(&afs_global_lock); }
  #define ISAFS_GLOCK() mutex_mine(&afs_global_lock)
  #else
  extern long afs_global_owner;
***************
*** 170,176 ****
      afs_global_owner = osi_ThreadUnique(); \
    MACRO_END
  #define AFS_GUNLOCK() \
!     (AFS_ASSERT_GLOCK(), afs_global_owner = 0, mutex_exit(&afs_global_lock))
  #define ISAFS_GLOCK() (osi_ThreadUnique() == afs_global_owner)
  #endif /* AFS_SGI64_ENV */
  #else /* MP */
--- 170,176 ----
      afs_global_owner = osi_ThreadUnique(); \
    MACRO_END
  #define AFS_GUNLOCK() \
!     { AFS_ASSERT_GLOCK(); afs_global_owner = 0; mutex_exit(&afs_global_lock); }
  #define ISAFS_GLOCK() (osi_ThreadUnique() == afs_global_owner)
  #endif /* AFS_SGI64_ENV */
  #else /* MP */
Index: openafs/src/afs/LINUX/osi_groups.c
diff -c openafs/src/afs/LINUX/osi_groups.c:1.28.4.3 openafs/src/afs/LINUX/osi_groups.c:1.28.4.4
*** openafs/src/afs/LINUX/osi_groups.c:1.28.4.3	Wed Sep  6 16:58:48 2006
--- openafs/src/afs/LINUX/osi_groups.c	Wed Sep 27 16:02:46 2006
***************
*** 20,26 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_groups.c,v 1.28.4.3 2006/09/06 20:58:48 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
--- 20,26 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_groups.c,v 1.28.4.4 2006/09/27 20:02:46 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
***************
*** 554,565 ****
--- 554,579 ----
  	return strcmp(key->description, description) == 0;
  }
  
+ static void afs_pag_destroy(struct key *key)
+ {
+     afs_uint32 pag = key->payload.value;
+     struct unixuser *pu;
+ 
+     pu = afs_FindUser(pag, -1, READ_LOCK);
+     if (pu) {
+ 	pu->ct.EndTimestamp = 0;
+ 	pu->tokenTime = 0;
+ 	afs_PutUser(pu, READ_LOCK);
+     }
+ }
+ 
  struct key_type key_type_afs_pag =
  {
      .name        = "afs_pag",
      .describe    = afs_pag_describe,
      .instantiate = afs_pag_instantiate,
      .match       = afs_pag_match,
+     .destroy     = afs_pag_destroy,
  };
  
  void osi_keyring_init(void)
Index: openafs/src/afs/LINUX/osi_machdep.h
diff -c openafs/src/afs/LINUX/osi_machdep.h:1.34.2.1 openafs/src/afs/LINUX/osi_machdep.h:1.34.2.2
*** openafs/src/afs/LINUX/osi_machdep.h:1.34.2.1	Fri Aug 11 17:40:56 2006
--- openafs/src/afs/LINUX/osi_machdep.h	Sat Sep 16 15:16:55 2006
***************
*** 227,230 ****
--- 227,292 ----
  #define AFS_ASSERT_GLOCK()
  #endif
  
+ #ifdef AFS_AMD64_LINUX20_ENV
+ /* RHEL5 beta's kernel doesn't define these. They aren't gonna change, so... */
+ 
+ #ifndef __NR_ia32_afs_syscall
+ #define __NR_ia32_afs_syscall 137
+ #endif
+ #ifndef __NR_ia32_setgroups
+ #define __NR_ia32_setgroups 81
+ #endif
+ #ifndef __NR_ia32_setgroups32
+ #define __NR_ia32_setgroups32 206
+ #endif
+ #ifndef __NR_ia32_close
+ #define __NR_ia32_close 6
+ #endif
+ #ifndef __NR_ia32_chdir
+ #define __NR_ia32_chdir 12
+ #endif
+ #ifndef __NR_ia32_break
+ #define __NR_ia32_break 17
+ #endif
+ #ifndef __NR_ia32_stty
+ #define __NR_ia32_stty 31
+ #endif
+ #ifndef __NR_ia32_gtty
+ #define __NR_ia32_gtty 32
+ #endif
+ #ifndef __NR_ia32_ftime
+ #define __NR_ia32_ftime 35
+ #endif
+ #ifndef __NR_ia32_prof
+ #define __NR_ia32_prof 44
+ #endif
+ #ifndef __NR_ia32_lock
+ #define __NR_ia32_lock 53
+ #endif
+ #ifndef __NR_ia32_mpx
+ #define __NR_ia32_mpx 56
+ #endif
+ #ifndef __NR_ia32_exit
+ #define __NR_ia32_exit 1
+ #endif
+ #ifndef __NR_ia32_mount
+ #define __NR_ia32_mount 21
+ #endif
+ #ifndef __NR_ia32_read
+ #define __NR_ia32_read 3
+ #endif
+ #ifndef __NR_ia32_write
+ #define __NR_ia32_write 4
+ #endif
+ #ifndef __NR_ia32_open
+ #define __NR_ia32_open 5
+ #endif
+ #ifndef __NR_ia32_close
+ #define __NR_ia32_close 6
+ #endif
+ #ifndef __NR_ia32_unlink
+ #define __NR_ia32_unlink 10
+ #endif
+ #endif
+ 
  #endif /* OSI_MACHDEP_H_ */
Index: openafs/src/afs/LINUX/osi_probe.c
diff -c openafs/src/afs/LINUX/osi_probe.c:1.11.2.1 openafs/src/afs/LINUX/osi_probe.c:1.11.2.3
*** openafs/src/afs/LINUX/osi_probe.c:1.11.2.1	Sun Aug 13 12:48:13 2006
--- openafs/src/afs/LINUX/osi_probe.c	Fri Oct  6 10:02:56 2006
***************
*** 245,250 ****
--- 245,251 ----
  extern asmlinkage long sys_open (const char *, int, int) __attribute__((weak));
  #endif
  extern asmlinkage long sys_ioctl(unsigned int, unsigned int, unsigned long) __attribute__((weak));
+ extern rwlock_t tasklist_lock __attribute__((weak));
  
  
  /* Structures used to control probing.  We put all the details of which
***************
*** 1008,1013 ****
--- 1009,1020 ----
  #else
  	ptr = aptr;
  #endif
+ 	if ((unsigned long)ptr < init_mm.start_code ||
+ 		(unsigned long)ptr > init_mm.end_data) {
+ /*	     printk("address 0x%lx (from 0x%lx %d) is out of range in check_table. wtf?\n", (unsigned long)x, (unsigned long)ptr, i);*/
+ 	     continue;
+ 	}
+ 
  	ret = check_table(P, ptr);
  	if (ret >= 0) {
  	    /* return value is number of entries to skip */
***************
*** 1112,1117 ****
--- 1119,1129 ----
  	printk("<7>osi_probe: %s                      try_harder\n", P->symbol);
  #endif
      for (offset = 0; offset < datalen; offset++, ptr++) {
+ 	if ((unsigned long)ptr < init_mm.start_code ||
+ 		(unsigned long)ptr > init_mm.end_data) {
+ /*	     printk("address 0x%lx (from 0x%lx %d) is out of range in check_table. wtf?\n", (unsigned long)x, (unsigned long)ptr, i);*/
+ 	     continue;
+ 	}
  	ret = check_table(P, ptr);
          if (ret >= 0) {
              /* return value is number of entries to skip */
Index: openafs/src/afs/LINUX/osi_vfsops.c
diff -c openafs/src/afs/LINUX/osi_vfsops.c:1.42.4.8 openafs/src/afs/LINUX/osi_vfsops.c:1.42.4.9
*** openafs/src/afs/LINUX/osi_vfsops.c:1.42.4.8	Sun Aug 20 01:32:56 2006
--- openafs/src/afs/LINUX/osi_vfsops.c	Fri Oct  6 09:29:16 2006
***************
*** 16,22 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_vfsops.c,v 1.42.4.8 2006/08/20 05:32:56 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.9 2006/10/06 13:29:16 shadow Exp $");
  
  #define __NO_VERSION__		/* don't define kernel_version in module.h */
  #include <linux/module.h> /* early to avoid printf->printk mapping */
***************
*** 318,325 ****
  void
  afs_destroy_inodecache(void)
  {
!     if (kmem_cache_destroy(afs_inode_cachep))
! 	printk(KERN_INFO "afs_inode_cache: not all structures were freed\n");
  }
  #else
  int
--- 318,324 ----
  void
  afs_destroy_inodecache(void)
  {
!     (void) kmem_cache_destroy(afs_inode_cachep);
  }
  #else
  int
Index: openafs/src/afs/LINUX/osi_vnodeops.c
diff -c openafs/src/afs/LINUX/osi_vnodeops.c:1.126.2.4 openafs/src/afs/LINUX/osi_vnodeops.c:1.126.2.7
*** openafs/src/afs/LINUX/osi_vnodeops.c:1.126.2.4	Sun Aug 13 12:54:51 2006
--- openafs/src/afs/LINUX/osi_vnodeops.c	Tue Oct 10 18:02:42 2006
***************
*** 22,28 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.126.2.4 2006/08/13 16:54:51 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.7 2006/10/10 22:02:42 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
***************
*** 73,79 ****
--- 73,83 ----
      else {
  	    osi_FlushPages(vcp, credp);	/* ensure stale pages are gone */
  	    AFS_GUNLOCK();
+ #ifdef DO_SYNC_READ
+ 	    code = do_sync_read(fp, buf, count, offp);
+ #else
  	    code = generic_file_read(fp, buf, count, offp);
+ #endif
  	    AFS_GLOCK();
      }
  
***************
*** 119,125 ****
--- 123,133 ----
  	code = -code;
      else {
  	    AFS_GUNLOCK();
+ #ifdef DO_SYNC_READ
+ 	    code = do_sync_write(fp, buf, count, offp);
+ #else
  	    code = generic_file_write(fp, buf, count, offp);
+ #endif
  	    AFS_GLOCK();
      }
  
***************
*** 581,586 ****
--- 589,598 ----
  struct file_operations afs_file_fops = {
    .read =	afs_linux_read,
    .write =	afs_linux_write,
+ #ifdef GENERIC_FILE_AIO_READ
+   .aio_read =	generic_file_aio_read,
+   .aio_write =	generic_file_aio_write,
+ #endif
  #ifdef HAVE_UNLOCKED_IOCTL
    .unlocked_ioctl = afs_unlocked_xioctl,
  #else
***************
*** 825,833 ****
      struct vcache *vcp = VTOAFS(ip);
  
      AFS_GLOCK();
-     ObtainWriteLock(&vcp->lock, 537);
      (void) afs_InactiveVCache(vcp, NULL);
-     ReleaseWriteLock(&vcp->lock);
      AFS_GUNLOCK();
  
      iput(ip);
--- 837,843 ----
Index: openafs/src/afs/UKERNEL/sysincludes.h
diff -c openafs/src/afs/UKERNEL/sysincludes.h:1.15 openafs/src/afs/UKERNEL/sysincludes.h:1.15.14.1
*** openafs/src/afs/UKERNEL/sysincludes.h:1.15	Fri Mar 12 00:56:59 2004
--- openafs/src/afs/UKERNEL/sysincludes.h	Wed Sep 27 17:15:59 2006
***************
*** 21,27 ****
--- 21,29 ----
  #include  <limits.h>
  #include  <assert.h>
  #include  <stdarg.h>
+ #if !defined(AFS_USR_DARWIN_ENV) && !defined(AFS_USR_FBSD_ENV) /* must be included after KERNEL undef'd */
  #include <setjmp.h>
+ #endif
  
  #ifdef AFS_USR_SUN5_ENV
  #include  <signal.h>
***************
*** 120,125 ****
--- 122,128 ----
  #define AFS_USR_UNDEF_KERNEL_ENV 1
  #endif
  #include  <errno.h>
+ #include  <setjmp.h>
  #include  <sys/param.h>
  #include  <sys/types.h>
  #include  <sys/socket.h>
Index: openafs/src/afs/VNOPS/afs_vnop_create.c
diff -c openafs/src/afs/VNOPS/afs_vnop_create.c:1.23 openafs/src/afs/VNOPS/afs_vnop_create.c:1.23.4.2
*** openafs/src/afs/VNOPS/afs_vnop_create.c:1.23	Sat Oct 15 10:23:21 2005
--- openafs/src/afs/VNOPS/afs_vnop_create.c	Fri Oct 13 01:12:51 2006
***************
*** 17,23 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_create.c,v 1.23 2005/10/15 14:23:21 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 17,23 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_create.c,v 1.23.4.2 2006/10/13 05:12:51 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 25,30 ****
--- 25,31 ----
  #include "afs/afs_cbqueue.h"
  #include "afs/nfsclient.h"
  #include "afs/afs_osidnlc.h"
+ #include "afs/unified_afs.h"
  
  /* question: does afs_create need to set CDirty in the adp or the avc?
   * I think we can get away without it, but I'm not sure.  Note that
***************
*** 305,311 ****
  	     (tc, code, &adp->fid, &treq, AFS_STATS_FS_RPCIDX_CREATEFILE,
  	      SHARED_LOCK, NULL));
  
!     if (code == EEXIST &&
  #ifdef AFS_SGI64_ENV
      !(flags & VEXCL)
  #else /* AFS_SGI64_ENV */
--- 306,312 ----
  	     (tc, code, &adp->fid, &treq, AFS_STATS_FS_RPCIDX_CREATEFILE,
  	      SHARED_LOCK, NULL));
  
!     if ((code == EEXIST || code == UAEEXIST) &&
  #ifdef AFS_SGI64_ENV
      !(flags & VEXCL)
  #else /* AFS_SGI64_ENV */
Index: openafs/src/audit/audit.c
diff -c openafs/src/audit/audit.c:1.20.2.1 openafs/src/audit/audit.c:1.20.2.4
*** openafs/src/audit/audit.c:1.20.2.1	Mon Jul 31 14:16:06 2006
--- openafs/src/audit/audit.c	Fri Oct 13 15:43:45 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/audit/audit.c,v 1.20.2.1 2006/07/31 18:16:06 shadow Exp $");
  
  #include <fcntl.h>
  #include <stdarg.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/audit/audit.c,v 1.20.2.4 2006/10/13 19:43:45 shadow Exp $");
  
  #include <fcntl.h>
  #include <stdarg.h>
***************
*** 97,107 ****
  	    *(afs_int32 *) bufferPtr = vaLong;
  	    bufferPtr += sizeof(vaLong);
  	    break;
- 	case AUD_LST:		/* Ptr to another list */
- 	    va_copy(vaLst, vaList);
- 	    audmakebuf(audEvent, vaLst);
- 	    va_end(vaLst);
- 	    break;
  	case AUD_FID:		/* AFSFid - contains 3 entries */
  	    vaFid = (struct AFSFid *)va_arg(vaList, struct AFSFid *);
  	    if (vaFid) {
--- 97,102 ----
***************
*** 148,154 ****
  }
  
  static void
! printbuf(FILE *out, int rec, char *audEvent, afs_int32 errCode, va_list vaList)
  {
      int vaEntry;
      int vaInt;
--- 143,150 ----
  }
  
  static void
! printbuf(FILE *out, int rec, char *audEvent, char *afsName, afs_int32 hostId, 
! 	 afs_int32 errCode, va_list vaList)
  {
      int vaEntry;
      int vaInt;
***************
*** 175,182 ****
  	    fprintf(out, "[%d] ", num);
      }
      
!     if (strcmp(audEvent, "VALST") != 0)
! 	fprintf(out,  "EVENT %s CODE %d ", audEvent, errCode);
  
      vaEntry = va_arg(vaList, int);
      while (vaEntry != AUD_END) {
--- 171,182 ----
  	    fprintf(out, "[%d] ", num);
      }
      
!     fprintf(out,  "EVENT %s CODE %d ", audEvent, errCode);
! 
!     if (afsName) {
! 	hostAddr.s_addr = hostId;
! 	fprintf(out,  "NAME %s HOST %s ", afsName, inet_ntoa(hostAddr));
!     }
  
      vaEntry = va_arg(vaList, int);
      while (vaEntry != AUD_END) {
***************
*** 223,233 ****
  	    vaLong = va_arg(vaList, afs_int32);
  	    fprintf(out, "LONG %d ", vaLong);
  	    break;
- 	case AUD_LST:		/* Ptr to another list */
- 	    va_copy(vaLst, vaList);
- 	    printbuf(out, 1, "VALST", 0, vaLst);
- 	    va_end(vaLst);
- 	    break;
  	case AUD_FID:		/* AFSFid - contains 3 entries */
  	    vaFid = va_arg(vaList, struct AFSFid *);
  	    if (vaFid)
--- 223,228 ----
***************
*** 265,272 ****
  	vaEntry = va_arg(vaList, int);
      }				/* end while */
  
!     if (strcmp(audEvent, "VALST") != 0)
! 	fprintf(out, "\n");
  }
  
  #ifdef AFS_PTHREAD_ENV
--- 260,266 ----
  	vaEntry = va_arg(vaList, int);
      }				/* end while */
  
!     fprintf(out, "\n");
  }
  
  #ifdef AFS_PTHREAD_ENV
***************
*** 296,304 ****
  /* The routine that acually does the audit call.
   * ************************************************************************** */
  int
! osi_audit(char *audEvent,	/* Event name (15 chars or less) */
! 	  afs_int32 errCode,	/* The error code */
! 	  ...)
  {
  #ifdef AFS_AIX32_ENV
      afs_int32 code;
--- 290,300 ----
  /* The routine that acually does the audit call.
   * ************************************************************************** */
  int
! osi_audit_internal(char *audEvent,	/* Event name (15 chars or less) */
! 		   afs_int32 errCode,	/* The error code */
! 		   char *afsName,
! 		   afs_int32 hostId,
! 		   va_list vaList)
  {
  #ifdef AFS_AIX32_ENV
      afs_int32 code;
***************
*** 306,312 ****
      static char BUFFER[32768];
  #endif
      int result;
!     va_list vaList;
  
  #ifdef AFS_PTHREAD_ENV
      /* i'm pretty sure all the server apps now call osi_audit_init(),
--- 302,308 ----
      static char BUFFER[32768];
  #endif
      int result;
!     va_list vaCopy;
  
  #ifdef AFS_PTHREAD_ENV
      /* i'm pretty sure all the server apps now call osi_audit_init(),
***************
*** 320,325 ****
--- 316,323 ----
      if (!osi_audit_all && !auditout)
  	return 0;
  
+     va_copy(vaCopy, vaList);
+ 
      switch (errCode) {
      case 0:
  	result = AUDIT_OK;
***************
*** 354,383 ****
      *(int *)bufferPtr = errCode;
      bufferPtr += sizeof(errCode);
  
-     va_start(vaList, errCode);
      audmakebuf(audEvent, vaList);
  #endif
  
      if (osi_echo_trail) {
! 	va_start(vaList, errCode);
! 	printbuf(stdout, 0, audEvent, errCode, vaList);
      }
  
  #ifdef AFS_AIX32_ENV
      bufferLen = (int)((afs_int32) bufferPtr - (afs_int32) & BUFFER[0]);
      code = auditlog(audEvent, result, BUFFER, bufferLen);
- #ifdef notdef
-     if (code) {
- 	err = errno;
- 	code = auditlog("AFS_Aud_Fail", result, &err, sizeof(err));
- 	if (code)
- 	    printf("Error while writing audit entry: %d.\n", errno);
-     }
- #endif /* notdef */
  #else
      if (auditout) {
! 	va_start(vaList, errCode);
! 	printbuf(auditout, 0, audEvent, errCode, vaList);
  	fflush(auditout);
      }
  #endif
--- 352,371 ----
      *(int *)bufferPtr = errCode;
      bufferPtr += sizeof(errCode);
  
      audmakebuf(audEvent, vaList);
  #endif
  
      if (osi_echo_trail) {
! 	printbuf(stdout, 0, audEvent, afsName, hostId, errCode, vaList);
      }
+     va_end(vaCopy);
  
  #ifdef AFS_AIX32_ENV
      bufferLen = (int)((afs_int32) bufferPtr - (afs_int32) & BUFFER[0]);
      code = auditlog(audEvent, result, BUFFER, bufferLen);
  #else
      if (auditout) {
! 	printbuf(auditout, 0, audEvent, afsName, hostId, errCode, vaList);
  	fflush(auditout);
      }
  #endif
***************
*** 387,392 ****
--- 375,398 ----
  
      return 0;
  }
+ int
+ osi_audit(char *audEvent,	/* Event name (15 chars or less) */
+ 	  afs_int32 errCode,	/* The error code */
+ 	  ...)
+ {
+     va_list vaList;
+ 
+     if ((osi_audit_all < 0) || (osi_echo_trail < 0))
+ 	osi_audit_check();
+     if (!osi_audit_all && !auditout)
+ 	return 0;
+ 
+     va_start(vaList, errCode);
+     osi_audit_internal(audEvent, errCode, NULL, 0, vaList);
+     va_end(vaList);
+ 
+     return 0;
+ }
  
  /* ************************************************************************** */
  /* Given a RPC call structure, this routine extracts the name and host id from the 
***************
*** 504,512 ****
  	osi_audit("AFS_Aud_NoCall", (-1), AUD_STR, audEvent, AUD_END);
      }
      va_start(vaList, errCode);
!     osi_audit(audEvent, errCode, AUD_NAME, afsName, AUD_HOST, hostId, 
!               AUD_LST, vaList, AUD_END);
! 
      return 0;
  }
  
--- 510,517 ----
  	osi_audit("AFS_Aud_NoCall", (-1), AUD_STR, audEvent, AUD_END);
      }
      va_start(vaList, errCode);
!     osi_audit_internal(audEvent, errCode, afsName, hostId, vaList);
!     va_end(vaList);
      return 0;
  }
  
Index: openafs/src/auth/cellconfig.c
diff -c openafs/src/auth/cellconfig.c:1.47 openafs/src/auth/cellconfig.c:1.47.2.5
*** openafs/src/auth/cellconfig.c:1.47	Tue Mar 28 13:39:45 2006
--- openafs/src/auth/cellconfig.c	Tue Oct 10 16:22:56 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/cellconfig.c,v 1.47 2006/03/28 18:39:45 shadow Exp $");
  
  #include <afs/stds.h>
  #include <afs/pthread_glock.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/cellconfig.c,v 1.47.2.5 2006/10/10 20:22:56 shadow Exp $");
  
  #include <afs/stds.h>
  #include <afs/pthread_glock.h>
***************
*** 114,119 ****
--- 114,226 ----
   * CellServDB changes.
   */
  
+ #if defined(AFS_SUN5_ENV) && !defined(__sparcv9)
+ /* Solaris through 10 in 32 bit mode will return EMFILE if fopen can't
+    get an fd <= 255. We allow the fileserver to claim more fds than that.
+    This has always been a problem since pr_Initialize would have the same
+    issue, but hpr_Initialize makes it more likely that we would see this. 
+    Work around it. This is not generic. It's coded with the needs of
+    afsconf_* in mind only.
+ 
+    http://www.opensolaris.org/os/community/onnv/flag-days/pages/2006042001/
+ */
+ 
+ #define BUFFER 4096
+ 
+ struct afsconf_iobuffer {
+     int _file;
+     char *buffer;
+     char *ptr;
+     char *endptr;
+ };
+ 
+ typedef struct afsconf_iobuffer afsconf_FILE;
+ 
+ static afsconf_FILE *
+ afsconf_fopen(const char *fname, const char *fmode)
+ {
+     int fd;
+     afsconf_FILE *iop;
+     
+     if ((fd = open(fname, O_RDONLY)) == -1) {
+ 	return NULL;
+     }
+     
+     iop = malloc(sizeof(struct afsconf_iobuffer));
+     if (iop == NULL) {
+ 	(void) close(fd);
+ 	errno = ENOMEM;
+ 	return NULL;
+     }
+     iop->_file = fd;
+     iop->buffer = malloc(BUFFER);
+     if (iop->buffer == NULL) {
+ 	(void) close(fd);
+ 	free((void *) iop);
+ 	errno = ENOMEM;
+ 	return NULL;
+     }
+     iop->ptr = iop->buffer;
+     iop->endptr = iop->buffer;
+     return iop;
+ }
+ 
+ static int
+ afsconf_fclose(afsconf_FILE *iop)
+ {
+     if (iop == NULL) {
+ 	return 0;
+     }
+     close(iop->_file);
+     free((void *)iop->buffer);
+     free((void *)iop);
+     return 0;
+ }
+ 
+ static char *
+ afsconf_fgets(char *s, int n, afsconf_FILE *iop)
+ {
+     char *p;
+     
+     p = s;
+     for (;;) {
+ 	char c;
+ 	
+ 	if (iop->ptr == iop->endptr) {
+ 	    ssize_t len;
+ 	    
+ 	    if ((len = read(iop->_file, (void *)iop->buffer, BUFFER)) == -1) {
+ 		return NULL;
+ 	    }
+ 	    if (len == 0) {
+ 		*p = 0;
+ 		if (s == p) {
+ 		    return NULL;
+ 		}
+ 		return s;
+ 	    }
+ 	    iop->ptr = iop->buffer;
+ 	    iop->endptr = iop->buffer + len;
+ 	}
+ 	c = *iop->ptr++;
+ 	*p++ = c;
+ 	if ((p - s) == (n - 1)) {
+ 	    *p = 0;
+ 	    return s;
+ 	}
+ 	if (c == '\n') {
+ 	    *p = 0;
+ 	    return s;
+ 	}
+     }
+ }
+ #define fopen afsconf_fopen
+ #define fclose afsconf_fclose
+ #define fgets afsconf_fgets
+ #else
+ #define afsconf_FILE FILE
+ #endif /* AFS_SUN5_ENV && ! __sparcv9 */
+ 
  /* return port number in network byte order in the low 16 bits of a long; return -1 if not found */
  static afs_int32
  afsconf_FindService(register const char *aname)
***************
*** 311,317 ****
  	if (!(afsconf_path = getenv("AFSCONF"))) {
  	    /* The "AFSCONF" environment (or contents of "/.AFSCONF") will be typically set to something like "/afs/<cell>/common/etc" where, by convention, the default files for "ThisCell" and "CellServDB" will reside; note that a major drawback is that a given afs client on that cell may NOT contain the same contents... */
  	    char *home_dir;
! 	    FILE *fp;
  	    size_t len;
  
  	    if (!(home_dir = getenv("HOME"))) {
--- 418,424 ----
  	if (!(afsconf_path = getenv("AFSCONF"))) {
  	    /* The "AFSCONF" environment (or contents of "/.AFSCONF") will be typically set to something like "/afs/<cell>/common/etc" where, by convention, the default files for "ThisCell" and "CellServDB" will reside; note that a major drawback is that a given afs client on that cell may NOT contain the same contents... */
  	    char *home_dir;
! 	    afsconf_FILE *fp;
  	    size_t len;
  
  	    if (!(home_dir = getenv("HOME"))) {
***************
*** 366,392 ****
      return tdir;
  }
  
- 
  static int
  GetCellUnix(struct afsconf_dir *adir)
  {
!     int rc;
      char tbuffer[256];
!     FILE *tf;
! 
      strcompose(tbuffer, 256, adir->name, "/", AFSDIR_THISCELL_FILE, NULL);
!     tf = fopen(tbuffer, "r");
!     if (tf) {
! 	/* FIXME: buffer overflow waiting to happen */
! 	rc = fscanf(tf, "%s", tbuffer);
! 	if (rc == 1) {
! 	    adir->cellName = (char *)malloc(strlen(tbuffer) + 1);
! 	    strcpy(adir->cellName, tbuffer);
! 	}
! 	fclose(tf);
!     } else {
  	return -1;
      }
      return 0;
  }
  
--- 473,499 ----
      return tdir;
  }
  
  static int
  GetCellUnix(struct afsconf_dir *adir)
  {
!     char *rc;
      char tbuffer[256];
!     char *p;
!     afsconf_FILE *fp;
!     
      strcompose(tbuffer, 256, adir->name, "/", AFSDIR_THISCELL_FILE, NULL);
!     fp = fopen(tbuffer, "r");
!     if (fp == 0) {
  	return -1;
      }
+     rc = fgets(tbuffer, 256, fp);
+     fclose(fp);
+ 
+     p = strchr(tbuffer, '\n');
+     if (p)
+ 	*p = '\0';
+ 
+     adir->cellName = strdup(tbuffer);
      return 0;
  }
  
***************
*** 410,416 ****
  afsconf_OpenInternal(register struct afsconf_dir *adir, char *cell,
  		     char clones[])
  {
!     FILE *tf;
      register char *tp, *bp;
      register struct afsconf_entry *curEntry;
      struct afsconf_aliasentry *curAlias;
--- 517,523 ----
  afsconf_OpenInternal(register struct afsconf_dir *adir, char *cell,
  		     char clones[])
  {
!     afsconf_FILE *tf;
      register char *tp, *bp;
      register struct afsconf_entry *curEntry;
      struct afsconf_aliasentry *curAlias;
Index: openafs/src/cf/linux-test4.m4
diff -c openafs/src/cf/linux-test4.m4:1.29.2.8 openafs/src/cf/linux-test4.m4:1.29.2.10
*** openafs/src/cf/linux-test4.m4:1.29.2.8	Wed Sep  6 16:58:48 2006
--- openafs/src/cf/linux-test4.m4	Wed Oct 11 22:58:05 2006
***************
*** 644,646 ****
--- 644,687 ----
    if test "x$ac_cv_key_alloc_needs_struct_task" = "xyes"; then
      AC_DEFINE([KEY_ALLOC_NEEDS_STRUCT_TASK], 1, [define if key_alloc takes a struct task *])
    fi])
+ 
+ AC_DEFUN([LINUX_DO_SYNC_READ], [
+   AC_MSG_CHECKING([for linux do_sync_read()])
+   AC_CACHE_VAL([ac_cv_linux_do_sync_read], [
+     AC_TRY_KBUILD(
+ [#include <linux/fs.h>],
+ [do_sync_read(NULL, NULL, 0, NULL, 0);],
+       ac_cv_linux_do_sync_read=no,
+       ac_cv_linux_do_sync_read=maybe)
+     if test "x$ac_cv_linux_do_sync_read" = "xmaybe"; then
+     AC_TRY_KBUILD(
+ [#include <linux/fs.h>],
+ [do_sync_read(NULL, NULL, 0, NULL);],
+       ac_cv_linux_do_sync_read=yes,
+       ac_cv_linux_do_sync_read=no)])
+     fi
+   AC_MSG_RESULT($ac_cv_linux_do_sync_read)
+   if test "x$ac_cv_linux_do_sync_read" = "xyes"; then
+     AC_DEFINE([DO_SYNC_READ], 1, [define if your kernel has do_sync_read()])
+   fi])
+ 
+ AC_DEFUN([LINUX_GENERIC_FILE_AIO_READ], [
+   AC_MSG_CHECKING([for linux generic_file_aio_read()])
+   AC_CACHE_VAL([ac_cv_linux_generic_file_aio_read], [
+     AC_TRY_KBUILD(
+ [#include <linux/fs.h>],
+ [generic_file_aio_read(NULL, NULL, 0, 0, 0);],
+       ac_cv_linux_generic_file_aio_read=no,
+       ac_cv_linux_generic_file_aio_read=maybe)
+     if test "x$ac_cv_linux_generic_file_aio_read" = "xmaybe"; then
+     AC_TRY_KBUILD(
+ [#include <linux/fs.h>],
+ [generic_file_aio_read(NULL, NULL, 0, 0);],
+       ac_cv_linux_generic_file_aio_read=yes,
+       ac_cv_linux_generic_file_aio_read=no)])
+     fi
+   AC_MSG_RESULT($ac_cv_linux_generic_file_aio_read)
+   if test "x$ac_cv_linux_generic_file_aio_read" = "xyes"; then
+     AC_DEFINE([GENERIC_FILE_AIO_READ], 1, [define if your kernel has generic_file_aio_read()])
+   fi])
+ 
Index: openafs/src/cf/osconf.m4
diff -c openafs/src/cf/osconf.m4:1.83 openafs/src/cf/osconf.m4:1.83.2.1
*** openafs/src/cf/osconf.m4:1.83	Wed Apr 26 11:36:24 2006
--- openafs/src/cf/osconf.m4	Fri Oct  6 10:58:49 2006
***************
*** 221,227 ****
  		YACC="byacc"
  		;;
  
! 	*nbsd2*|*nbsd3*)
  		LEX="flex -l"
  		MT_CFLAGS='${XCFLAGS} -DAFS_PTHREAD_ENV -D_REENTRANT '
  		MT_LIBS="-lpthread" # XXX -pthread soon
--- 221,227 ----
  		YACC="byacc"
  		;;
  
! 	*nbsd2*|*nbsd3*|*nbsd4*)
  		LEX="flex -l"
  		MT_CFLAGS='${XCFLAGS} -DAFS_PTHREAD_ENV -D_REENTRANT '
  		MT_LIBS="-lpthread" # XXX -pthread soon
Index: openafs/src/config/Makefile.version-NOCML.in
diff -c openafs/src/config/Makefile.version-NOCML.in:1.5 openafs/src/config/Makefile.version-NOCML.in:1.5.14.1
*** openafs/src/config/Makefile.version-NOCML.in:1.5	Sat May  8 01:15:23 2004
--- openafs/src/config/Makefile.version-NOCML.in	Wed Oct 11 09:18:10 2006
***************
*** 10,16 ****
  
  AFS_component_version_number.o: AFS_component_version_number.c
  
! AFS_component_version_number.c: 
  	echo 'char cml_version_number[]="@(#) OpenAFS ${VERSION} built ' `date +"%Y-%m-%d"` '";' >AFS_component_version_number.c
  	echo 'char* AFSVersion = "${PACKAGE} ${VERSION}"; ' >>AFS_component_version_number.c
  
--- 10,16 ----
  
  AFS_component_version_number.o: AFS_component_version_number.c
  
! AFS_component_version_number.c: @TOP_OBJDIR@/src/config/Makefile.version
  	echo 'char cml_version_number[]="@(#) OpenAFS ${VERSION} built ' `date +"%Y-%m-%d"` '";' >AFS_component_version_number.c
  	echo 'char* AFSVersion = "${PACKAGE} ${VERSION}"; ' >>AFS_component_version_number.c
  
Index: openafs/src/config/NTMakefile
diff -c openafs/src/config/NTMakefile:1.20 openafs/src/config/NTMakefile:1.20.2.1
*** openafs/src/config/NTMakefile:1.20	Sat Mar  4 16:42:12 2006
--- openafs/src/config/NTMakefile	Thu Oct 12 17:19:46 2006
***************
*** 374,379 ****
--- 374,382 ----
  !	IF (!EXIST($(OJT)\WINNT\license\lang))
  		$(MKDIR) $(OJT)\WINNT\license\lang
  !	ENDIF
+ !	IF (!EXIST($(OJT)\WINNT\netidmgr_plugin))
+ 		$(MKDIR) $(OJT)\WINNT\netidmgr_plugin
+ !	ENDIF
  !	IF (!EXIST($(OJT)\WINNT\pthread))
  		$(MKDIR) $(OJT)\WINNT\pthread
  !	ENDIF
Index: openafs/src/config/NTMakefile.amd64_w2k
diff -c openafs/src/config/NTMakefile.amd64_w2k:1.24.2.6 openafs/src/config/NTMakefile.amd64_w2k:1.24.2.10
*** openafs/src/config/NTMakefile.amd64_w2k:1.24.2.6	Sun Sep  3 12:59:13 2006
--- openafs/src/config/NTMakefile.amd64_w2k	Tue Oct 17 10:35:29 2006
***************
*** 84,90 ****
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=5
! AFSPRODUCT_VER_PATCH=0800
  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=903
  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.6 openafs/src/config/NTMakefile.i386_nt40:1.84.2.10
*** openafs/src/config/NTMakefile.i386_nt40:1.84.2.6	Sun Sep  3 12:59:13 2006
--- openafs/src/config/NTMakefile.i386_nt40	Tue Oct 17 10:35:29 2006
***************
*** 84,90 ****
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=5
! AFSPRODUCT_VER_PATCH=0800
  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=903
  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.6 openafs/src/config/NTMakefile.i386_w2k:1.23.2.10
*** openafs/src/config/NTMakefile.i386_w2k:1.23.2.6	Sun Sep  3 12:59:13 2006
--- openafs/src/config/NTMakefile.i386_w2k	Tue Oct 17 10:35:29 2006
***************
*** 84,90 ****
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=5
! AFSPRODUCT_VER_PATCH=0800
  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=903
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
Index: openafs/src/config/afs_sysnames.h
diff -c openafs/src/config/afs_sysnames.h:1.77 openafs/src/config/afs_sysnames.h:1.77.2.1
*** openafs/src/config/afs_sysnames.h:1.77	Wed Mar 15 11:15:07 2006
--- openafs/src/config/afs_sysnames.h	Sun Oct  8 23:30:40 2006
***************
*** 213,218 ****
--- 213,232 ----
  #define SYS_NAME_ID_i386_nbsd21		2525
  #define SYS_NAME_ID_i386_nbsd30		2526
  #define SYS_NAME_ID_amd64_nbsd20	2527
+ #define SYS_NAME_ID_i386_nbsd40 2528
+ #define SYS_NAME_ID_i386_nbsd50 2529
+ #define SYS_NAME_ID_sparc64_nbsd30 2530
+ #define SYS_NAME_ID_sparc64_nbsd40 2531
+ #define SYS_NAME_ID_sparc64_nbsd50 2532
+ #define SYS_NAME_ID_amd64_nbsd30 2533
+ #define SYS_NAME_ID_amd64_nbsd40 2534
+ #define SYS_NAME_ID_amd64_nbsd50 2535
+ #define SYS_NAME_ID_alpha_nbsd30 2536
+ #define SYS_NAME_ID_alpha_nbsd40 2537
+ #define SYS_NAME_ID_alpha_nbsd50 2538
+ #define SYS_NAME_ID_macppc_nbsd30 2539
+ #define SYS_NAME_ID_macppc_nbsd40 2540
+ #define SYS_NAME_ID_macppc_nbsd50 2541
  
  #define SYS_NAME_ID_i386_obsd31		2600
  #define SYS_NAME_ID_i386_obsd32		2601
Index: openafs/src/config/param.i386_nbsd30.h
diff -c openafs/src/config/param.i386_nbsd30.h:1.1 openafs/src/config/param.i386_nbsd30.h:1.1.10.1
*** openafs/src/config/param.i386_nbsd30.h:1.1	Thu Jan 13 20:07:49 2005
--- openafs/src/config/param.i386_nbsd30.h	Fri Oct  6 10:58:49 2006
***************
*** 5,12 ****
  #define AFS_X86_ENV 1
  #define AFSLITTLE_ENDIAN 1
  
! #define SYS_NAME       "i386_nbsd30"
! #define SYS_NAME_ID    SYS_NAME_ID_i386_nbsd30
  
  #ifndef UKERNEL
  /* This section for kernel libafs compiles only */
--- 5,12 ----
  #define AFS_X86_ENV 1
  #define AFSLITTLE_ENDIAN 1
  
! #define SYS_NAME       "i386_nbsd40"
! #define SYS_NAME_ID    SYS_NAME_ID_i386_nbsd40
  
  #ifndef UKERNEL
  /* This section for kernel libafs compiles only */
Index: openafs/src/kauth/authclient.c
diff -c openafs/src/kauth/authclient.c:1.18 openafs/src/kauth/authclient.c:1.18.8.2
*** openafs/src/kauth/authclient.c:1.18	Wed Dec  8 13:33:48 2004
--- openafs/src/kauth/authclient.c	Thu Sep 21 07:41:45 2006
***************
*** 17,23 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/authclient.c,v 1.18 2004/12/08 18:33:48 rees Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
--- 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"
Index: openafs/src/packaging/HP-UX/files/usr/vice/etc/CellServDB
diff -c openafs/src/packaging/HP-UX/files/usr/vice/etc/CellServDB:1.3 openafs/src/packaging/HP-UX/files/usr/vice/etc/CellServDB:1.3.4.1
*** openafs/src/packaging/HP-UX/files/usr/vice/etc/CellServDB:1.3	Sat Oct 15 20:56:07 2005
--- openafs/src/packaging/HP-UX/files/usr/vice/etc/CellServDB	Sun Oct  8 23:15:13 2006
***************
*** 1,15 ****
! >grand.central.org      #GCO Public CellServDB 15 Oct 2005
  18.7.14.88                      #grand-opening.mit.edu
  128.2.191.224                   #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
  >wu-wien.ac.at          #University of Economics, Vienna, Austria
! 137.208.3.33                    #afsdb1.wu-wien.ac.at
! 137.208.8.12                    #caesar.wu-wien.ac.at
! 137.208.127.33                  #buddy.wu-wien.ac.at
  >hephy.at               #hephy-vienna
  193.170.243.10                  #mowgli.oeaw.ac.at
  193.170.243.12                  #baloo.oeaw.ac.at
  193.170.243.14                  #akela.oeaw.ac.at
  >itp.tugraz.at          #Institute for Theoretical Physics, TU Graz, Austria
  129.27.157.6                    #fubphsv2.tu-graz.ac.at
  129.27.161.7                    #faepsv01.tu-graz.ac.at
--- 1,19 ----
! >grand.central.org      #GCO Public CellServDB 08 Oct 2006
  18.7.14.88                      #grand-opening.mit.edu
  128.2.191.224                   #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
  >wu-wien.ac.at          #University of Economics, Vienna, Austria
! 137.208.3.33                    #goya.wu-wien.ac.at
! 137.208.7.57                    #caravaggio.wu-wien.ac.at
! 137.208.127.57                  #vermeer.wu-wien.ac.at
  >hephy.at               #hephy-vienna
  193.170.243.10                  #mowgli.oeaw.ac.at
  193.170.243.12                  #baloo.oeaw.ac.at
  193.170.243.14                  #akela.oeaw.ac.at
+ >cgv.tugraz.at          #CGV cell
+ 129.27.224.133                  #phobos.cgv.tugraz.at
+ 129.27.224.134                  #deimos.cgv.tugraz.at
+ 129.27.224.210                  #trinculo.cgv.tugraz.at
  >itp.tugraz.at          #Institute for Theoretical Physics, TU Graz, Austria
  129.27.157.6                    #fubphsv2.tu-graz.ac.at
  129.27.161.7                    #faepsv01.tu-graz.ac.at
***************
*** 22,30 ****
  137.138.206.77                  #pcamsf2.cern.ch
  137.138.206.123                 #pcamsf4.cern.ch
  >epfl.ch                #Swiss Federal Institute of Technology at Lausanne
! 128.178.2.6                     #kd1.epfl.ch
! 128.178.2.7                     #kd2.epfl.ch
! 128.178.2.8                     #kd3.epfl.ch
  >ethz.ch                #Swiss Federal Inst. of Tech. - Zurich, Switzerland
  129.132.97.19                   #amalthea.ethz.ch
  129.132.97.27                   #nethzafs-001.ethz.ch
--- 26,34 ----
  137.138.206.77                  #pcamsf2.cern.ch
  137.138.206.123                 #pcamsf4.cern.ch
  >epfl.ch                #Swiss Federal Institute of Technology at Lausanne
! 128.178.109.111                 #kd1.epfl.ch
! 128.178.109.112                 #kd2.epfl.ch
! 128.178.109.113                 #kd3.epfl.ch
  >ethz.ch                #Swiss Federal Inst. of Tech. - Zurich, Switzerland
  129.132.97.19                   #amalthea.ethz.ch
  129.132.97.27                   #nethzafs-001.ethz.ch
***************
*** 37,44 ****
  129.129.190.142                 #afs02.psi.ch
  >extundo.com            #Simon Josefsson's cell
  195.42.214.241                  #slipsten.extundo.com
- >mekinok.com            #Mekinok, Inc.
- 4.36.43.98                      #loggerhead.mekinok.com
  >membrain.com           #membrain.com
  66.93.118.125                   #stormy
  130.85.24.11                    #weasel
--- 41,46 ----
***************
*** 105,121 ****
  144.41.2.3                      #rs14.serv.uni-hohenheim.de
  144.41.2.4                      #rs15.serv.uni-hohenheim.de
  >rz.uni-jena.de         #Rechenzentrum University of Jena, Germany
! 141.35.2.160                    #lc00.rz.uni-jena.de
! 141.35.7.9                      #fsuj01.rz.uni-jena.de
! 141.35.7.10                     #zaphod.rz.uni-jena
  >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
  134.95.144.22                   #afs1.meteo.uni-koeln.de
  134.95.144.24                   #afs2.meteo.uni-koeln.de
  >rrz.uni-koeln.de       #University of Cologne - Reg Comp Center
  134.95.19.3                     #afsdb1.rrz.uni-koeln.de
! 134.95.19.30                    #fileserv3.rrz.uni-koeln.de
  134.95.67.97                    #afs.thp.uni-koeln.de
! 134.95.140.190                  #rzkbserv.rrz.uni-koeln.de
  >physik.uni-mainz.de    #institute of physics, university Mainz, Germany
  134.93.130.93                   #hardy.physik.uni-mainz.de
  >uni-mannheim.de        #Uni Mannheim (Rechenzentrum)
--- 107,123 ----
  144.41.2.3                      #rs14.serv.uni-hohenheim.de
  144.41.2.4                      #rs15.serv.uni-hohenheim.de
  >rz.uni-jena.de         #Rechenzentrum University of Jena, Germany
! 141.35.2.180                    #afs00.rz.uni-jena.de
! 141.35.2.181                    #afs01.rz.uni-jena.de
! 141.35.2.182                    #afs02.rz.uni-jena.de
  >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
  134.95.144.22                   #afs1.meteo.uni-koeln.de
  134.95.144.24                   #afs2.meteo.uni-koeln.de
  >rrz.uni-koeln.de       #University of Cologne - Reg Comp Center
  134.95.19.3                     #afsdb1.rrz.uni-koeln.de
! 134.95.19.10                    #lyra.rrz.uni-koeln.de
  134.95.67.97                    #afs.thp.uni-koeln.de
! 134.95.141.243                  #agrippina.rrz.uni-koeln.de
  >physik.uni-mainz.de    #institute of physics, university Mainz, Germany
  134.93.130.93                   #hardy.physik.uni-mainz.de
  >uni-mannheim.de        #Uni Mannheim (Rechenzentrum)
***************
*** 172,179 ****
  204.194.25.7                    #afs1.qatar.cmu.edu
  204.194.25.8                    #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
! 128.2.56.129                    #nihao.sbp.ri.cmu.edu
! 128.2.56.136                    #youtheman.sbp.ri.cmu.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
--- 174,181 ----
  204.194.25.7                    #afs1.qatar.cmu.edu
  204.194.25.8                    #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
! 128.2.179.12                    #nihao.sbp.ri.cmu.edu
! 128.2.179.113                   #youtheman.sbp.ri.cmu.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
***************
*** 186,191 ****
--- 188,195 ----
  129.170.16.22                   #halley.dartmouth.edu
  129.170.16.42                   #oort.dartmouth.edu
  129.170.16.43                   #cygnusx1.dartmouth.edu
+ >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
***************
*** 261,266 ****
--- 265,280 ----
  134.79.18.25                    #afsdb1.slac.stanford.edu
  134.79.18.26                    #afsdb2.slac.stanford.edu
  134.79.18.27                    #afsdb3.slac.stanford.edu
+ >ucdavis.edu            #University of California at Davis
+ 169.237.104.100                 #afs1.ucdavis.edu
+ 169.237.235.176                 #afs2.ucdavis.edu
+ 169.237.247.91                  #afs3.ucdavis.edu
+ >home.ucdavis.edu       #University of California at Davis home directories
+ 169.237.105.91                  #home1.ucdavis.edu
+ 169.237.105.92                  #home2.ucdavis.edu
+ 169.237.105.93                  #home3.ucdavis.edu
+ >physics.ucsb.edu       #UC Santa Barbara, Physics Dept
+ 128.111.18.161                  #ledzeppelin.physics.ucsb.edu
  >cats.ucsc.edu          #UC Santa Cruz, Comm. and Tech. Services, California U.S.A
  128.114.129.14                  #elan.ucsc.edu
  128.114.129.15                  #ichabod.ucsc.edu
***************
*** 291,316 ****
  141.211.1.34                    #ruthless.ifs.umich.edu
  >atlas.umich.edu        #ATLAS group cell in physics at University of Michigan
  141.211.43.102                  #linat02.grid.umich.edu
! 141.211.43.106                  #linat06.grid.umich.edu
! 141.211.43.109                  #atgrid.grid.umich.edu
  >citi.umich.edu         #Center for Information Technology Integration
  141.211.133.5                   #babylon.citi.umich.edu
  >lsa.umich.edu          #University of Michigan - College of LS&A
  141.211.211.53                  #gerow.lsa.umich.edu
  141.211.211.72                  #collines.lsa.umich.edu
  141.211.211.153                 #hodges.lsa.umich.edu
! >umr.edu                #University of Missouri - Rolla
! 131.151.1.59                    #afsdb1.umr.edu
! 131.151.1.70                    #afsdb3.umr.edu
! 131.151.1.146                   #afsdb2.umr.edu
  >physics.unc.edu        #Univ. of NC at Chapel Hill, Dept. of Physics
  152.2.4.1                       #who.physics.unc.edu
  152.2.4.3                       #what.physics.unc.edu
  152.2.4.5                       #when.physics.unc.edu
  >uncc.edu               #University of NC at Charlotte Mosaic AFS Cell
  152.15.10.70                    #as-sm1.uncc.edu
! 152.15.13.7                     #as-sm2.uncc.edu
! 152.15.30.27                    #fs-kenn3.uncc.edu
  >eng.utah.edu           #University of Utah - Engineering
  155.99.222.9                    #lenny.eng.utah.edu
  155.99.222.10                   #carl.eng.utah.edu
--- 305,328 ----
  141.211.1.34                    #ruthless.ifs.umich.edu
  >atlas.umich.edu        #ATLAS group cell in physics at University of Michigan
  141.211.43.102                  #linat02.grid.umich.edu
! 141.211.43.103                  #linat03.grid.umich.edu
! 141.211.43.104                  #linat04.grid.umich.edu
  >citi.umich.edu         #Center for Information Technology Integration
  141.211.133.5                   #babylon.citi.umich.edu
  >lsa.umich.edu          #University of Michigan - College of LS&A
  141.211.211.53                  #gerow.lsa.umich.edu
  141.211.211.72                  #collines.lsa.umich.edu
  141.211.211.153                 #hodges.lsa.umich.edu
! >sph.umich.edu          #University of Michigan -- School of Public Health
! 141.211.50.41                   #afssph0.sph.umich.edu
  >physics.unc.edu        #Univ. of NC at Chapel Hill, Dept. of Physics
  152.2.4.1                       #who.physics.unc.edu
  152.2.4.3                       #what.physics.unc.edu
  152.2.4.5                       #when.physics.unc.edu
  >uncc.edu               #University of NC at Charlotte Mosaic AFS Cell
  152.15.10.70                    #as-sm1.uncc.edu
! 152.15.93.186                   #as-ece1.uncc.edu
! 152.15.181.175                  #as-me1.uncc.edu
  >eng.utah.edu           #University of Utah - Engineering
  155.99.222.9                    #lenny.eng.utah.edu
  155.99.222.10                   #carl.eng.utah.edu
***************
*** 344,349 ****
--- 356,363 ----
  >dapnia.saclay.cea.fr   #CEA DAPNIA
  132.166.32.7                    #dphrsg.saclay.cea.fr
  132.166.32.12                   #dphrsl.saclay.cea.fr
+ >grif.fr                #GRIF cell
+ 192.54.208.18                   #node03.datagrid.cea.fr
  >in2p3.fr               #IN2P3 production cell
  134.158.232.11                  #ccafsdb1.in2p3.fr
  134.158.232.12                  #ccafsdb2.in2p3.fr
***************
*** 401,406 ****
--- 415,421 ----
  192.84.134.75                   #afsna.na.infn.it
  >ba.infn.it             #INFN, Sezione di Bari
  193.206.185.235                 #baafsserver.ba.infn.it
+ 193.206.185.236                 #debsrv.ba.infn.it
  >kloe.infn.it           #INFN, KLOE experiment at Laboratori di Frascati
  192.135.25.111                  #kloeafs1.lnf.infn.it
  192.135.25.112                  #kloeafs2.lnf.infn.it
***************
*** 451,461 ****
  >laroia.net             #Laroia Networks
  66.66.102.254                   #supercore.laroia.net
  >sinenomine.net         #Sine Nomine Associates
! 66.92.236.139                   #afs.sinenomine.net
  >slackers.net           #The Slackers' Network
  63.201.48.27                    #alexandria.slackers.net
  >tproa.net              #The People's Republic of Ames
  209.234.76.70                   #service-3.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
--- 466,478 ----
  >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
  209.234.76.70                   #service-3.tproa.net
+ 209.234.76.75                   #service-4.tproa.net
+ 209.234.76.76                   #service-5.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
***************
*** 484,505 ****
  >oc7.org                #The OC7 Project
  128.2.122.140                   #knife.oc7.org
  207.22.77.170                   #spoon.oc7.org
! >openafs.org            #OpenAFS Project
! 18.7.14.88                      #grand-opening.mit.edu
! 128.2.191.224                   #penn.central.org
! 130.237.48.87                   #andrew.e.kth.se
! >e.kth.se               #Royal Institute of Technology, Elektro
  130.237.32.145                  #sonen.e.kth.se
  130.237.48.7                    #anden.e.kth.se
  130.237.48.244                  #fadern.e.kth.se
  >hallf.kth.se           #Royal Institute of Technology, HALLF
! 130.237.24.141                  #rasmus13.hallf.kth.se
! 130.237.24.152                  #rasmus3.hallf.kth.se
! 130.237.24.177                  #rasmus29.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
! 130.237.202.12                  #afsdb2.isk.kth.se
! 130.237.206.13                  #afsdb1.isk.kth.se
! 130.237.209.141                 #afsdb3.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
--- 501,516 ----
  >oc7.org                #The OC7 Project
  128.2.122.140                   #knife.oc7.org
  207.22.77.170                   #spoon.oc7.org
! >kth.se                 #Royal Institute of Technology, Stockholm, Sweden
  130.237.32.145                  #sonen.e.kth.se
  130.237.48.7                    #anden.e.kth.se
  130.237.48.244                  #fadern.e.kth.se
  >hallf.kth.se           #Royal Institute of Technology, HALLF
! 130.237.24.11                   #afs1.hallf.kth.se
! 130.237.24.104                  #afs2.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
! 130.237.202.3                   #afsdb1.isk.kth.se
! 130.237.209.39                  #ezri.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
***************
*** 543,548 ****
--- 554,566 ----
  193.2.120.2                     #solkan.p-ng.si
  >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
+ 129.215.64.16                   #afsdb0.inf.ed.ac.uk
+ 129.215.64.17                   #afsdb1.inf.ed.ac.uk
+ 129.215.64.18                   #afsdb2.inf.ed.ac.uk
+ >ic.ac.uk               #Imperial College London
+ 155.198.63.148                  #icafs2.cc.ic.ac.uk
+ 155.198.63.149                  #icafs1.cc.ic.ac.uk
  >hep.man.ac.uk          #Manchester HEP
  194.36.2.3                      #afs1.hep.man.ac.uk
  194.36.2.4                      #afs2.hep.man.ac.uk
Index: openafs/src/packaging/MacOS/CellServDB
diff -c openafs/src/packaging/MacOS/CellServDB:1.3 openafs/src/packaging/MacOS/CellServDB:1.3.4.1
*** openafs/src/packaging/MacOS/CellServDB:1.3	Sat Oct 15 20:56:08 2005
--- openafs/src/packaging/MacOS/CellServDB	Sun Oct  8 23:15:14 2006
***************
*** 1,15 ****
! >grand.central.org      #GCO Public CellServDB 15 Oct 2005
  18.7.14.88                      #grand-opening.mit.edu
  128.2.191.224                   #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
  >wu-wien.ac.at          #University of Economics, Vienna, Austria
! 137.208.3.33                    #afsdb1.wu-wien.ac.at
! 137.208.8.12                    #caesar.wu-wien.ac.at
! 137.208.127.33                  #buddy.wu-wien.ac.at
  >hephy.at               #hephy-vienna
  193.170.243.10                  #mowgli.oeaw.ac.at
  193.170.243.12                  #baloo.oeaw.ac.at
  193.170.243.14                  #akela.oeaw.ac.at
  >itp.tugraz.at          #Institute for Theoretical Physics, TU Graz, Austria
  129.27.157.6                    #fubphsv2.tu-graz.ac.at
  129.27.161.7                    #faepsv01.tu-graz.ac.at
--- 1,19 ----
! >grand.central.org      #GCO Public CellServDB 08 Oct 2006
  18.7.14.88                      #grand-opening.mit.edu
  128.2.191.224                   #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
  >wu-wien.ac.at          #University of Economics, Vienna, Austria
! 137.208.3.33                    #goya.wu-wien.ac.at
! 137.208.7.57                    #caravaggio.wu-wien.ac.at
! 137.208.127.57                  #vermeer.wu-wien.ac.at
  >hephy.at               #hephy-vienna
  193.170.243.10                  #mowgli.oeaw.ac.at
  193.170.243.12                  #baloo.oeaw.ac.at
  193.170.243.14                  #akela.oeaw.ac.at
+ >cgv.tugraz.at          #CGV cell
+ 129.27.224.133                  #phobos.cgv.tugraz.at
+ 129.27.224.134                  #deimos.cgv.tugraz.at
+ 129.27.224.210                  #trinculo.cgv.tugraz.at
  >itp.tugraz.at          #Institute for Theoretical Physics, TU Graz, Austria
  129.27.157.6                    #fubphsv2.tu-graz.ac.at
  129.27.161.7                    #faepsv01.tu-graz.ac.at
***************
*** 22,30 ****
  137.138.206.77                  #pcamsf2.cern.ch
  137.138.206.123                 #pcamsf4.cern.ch
  >epfl.ch                #Swiss Federal Institute of Technology at Lausanne
! 128.178.2.6                     #kd1.epfl.ch
! 128.178.2.7                     #kd2.epfl.ch
! 128.178.2.8                     #kd3.epfl.ch
  >ethz.ch                #Swiss Federal Inst. of Tech. - Zurich, Switzerland
  129.132.97.19                   #amalthea.ethz.ch
  129.132.97.27                   #nethzafs-001.ethz.ch
--- 26,34 ----
  137.138.206.77                  #pcamsf2.cern.ch
  137.138.206.123                 #pcamsf4.cern.ch
  >epfl.ch                #Swiss Federal Institute of Technology at Lausanne
! 128.178.109.111                 #kd1.epfl.ch
! 128.178.109.112                 #kd2.epfl.ch
! 128.178.109.113                 #kd3.epfl.ch
  >ethz.ch                #Swiss Federal Inst. of Tech. - Zurich, Switzerland
  129.132.97.19                   #amalthea.ethz.ch
  129.132.97.27                   #nethzafs-001.ethz.ch
***************
*** 37,44 ****
  129.129.190.142                 #afs02.psi.ch
  >extundo.com            #Simon Josefsson's cell
  195.42.214.241                  #slipsten.extundo.com
- >mekinok.com            #Mekinok, Inc.
- 4.36.43.98                      #loggerhead.mekinok.com
  >membrain.com           #membrain.com
  66.93.118.125                   #stormy
  130.85.24.11                    #weasel
--- 41,46 ----
***************
*** 105,121 ****
  144.41.2.3                      #rs14.serv.uni-hohenheim.de
  144.41.2.4                      #rs15.serv.uni-hohenheim.de
  >rz.uni-jena.de         #Rechenzentrum University of Jena, Germany
! 141.35.2.160                    #lc00.rz.uni-jena.de
! 141.35.7.9                      #fsuj01.rz.uni-jena.de
! 141.35.7.10                     #zaphod.rz.uni-jena
  >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
  134.95.144.22                   #afs1.meteo.uni-koeln.de
  134.95.144.24                   #afs2.meteo.uni-koeln.de
  >rrz.uni-koeln.de       #University of Cologne - Reg Comp Center
  134.95.19.3                     #afsdb1.rrz.uni-koeln.de
! 134.95.19.30                    #fileserv3.rrz.uni-koeln.de
  134.95.67.97                    #afs.thp.uni-koeln.de
! 134.95.140.190                  #rzkbserv.rrz.uni-koeln.de
  >physik.uni-mainz.de    #institute of physics, university Mainz, Germany
  134.93.130.93                   #hardy.physik.uni-mainz.de
  >uni-mannheim.de        #Uni Mannheim (Rechenzentrum)
--- 107,123 ----
  144.41.2.3                      #rs14.serv.uni-hohenheim.de
  144.41.2.4                      #rs15.serv.uni-hohenheim.de
  >rz.uni-jena.de         #Rechenzentrum University of Jena, Germany
! 141.35.2.180                    #afs00.rz.uni-jena.de
! 141.35.2.181                    #afs01.rz.uni-jena.de
! 141.35.2.182                    #afs02.rz.uni-jena.de
  >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
  134.95.144.22                   #afs1.meteo.uni-koeln.de
  134.95.144.24                   #afs2.meteo.uni-koeln.de
  >rrz.uni-koeln.de       #University of Cologne - Reg Comp Center
  134.95.19.3                     #afsdb1.rrz.uni-koeln.de
! 134.95.19.10                    #lyra.rrz.uni-koeln.de
  134.95.67.97                    #afs.thp.uni-koeln.de
! 134.95.141.243                  #agrippina.rrz.uni-koeln.de
  >physik.uni-mainz.de    #institute of physics, university Mainz, Germany
  134.93.130.93                   #hardy.physik.uni-mainz.de
  >uni-mannheim.de        #Uni Mannheim (Rechenzentrum)
***************
*** 172,179 ****
  204.194.25.7                    #afs1.qatar.cmu.edu
  204.194.25.8                    #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
! 128.2.56.129                    #nihao.sbp.ri.cmu.edu
! 128.2.56.136                    #youtheman.sbp.ri.cmu.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
--- 174,181 ----
  204.194.25.7                    #afs1.qatar.cmu.edu
  204.194.25.8                    #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
! 128.2.179.12                    #nihao.sbp.ri.cmu.edu
! 128.2.179.113                   #youtheman.sbp.ri.cmu.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
***************
*** 186,191 ****
--- 188,195 ----
  129.170.16.22                   #halley.dartmouth.edu
  129.170.16.42                   #oort.dartmouth.edu
  129.170.16.43                   #cygnusx1.dartmouth.edu
+ >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
***************
*** 261,266 ****
--- 265,280 ----
  134.79.18.25                    #afsdb1.slac.stanford.edu
  134.79.18.26                    #afsdb2.slac.stanford.edu
  134.79.18.27                    #afsdb3.slac.stanford.edu
+ >ucdavis.edu            #University of California at Davis
+ 169.237.104.100                 #afs1.ucdavis.edu
+ 169.237.235.176                 #afs2.ucdavis.edu
+ 169.237.247.91                  #afs3.ucdavis.edu
+ >home.ucdavis.edu       #University of California at Davis home directories
+ 169.237.105.91                  #home1.ucdavis.edu
+ 169.237.105.92                  #home2.ucdavis.edu
+ 169.237.105.93                  #home3.ucdavis.edu
+ >physics.ucsb.edu       #UC Santa Barbara, Physics Dept
+ 128.111.18.161                  #ledzeppelin.physics.ucsb.edu
  >cats.ucsc.edu          #UC Santa Cruz, Comm. and Tech. Services, California U.S.A
  128.114.129.14                  #elan.ucsc.edu
  128.114.129.15                  #ichabod.ucsc.edu
***************
*** 291,316 ****
  141.211.1.34                    #ruthless.ifs.umich.edu
  >atlas.umich.edu        #ATLAS group cell in physics at University of Michigan
  141.211.43.102                  #linat02.grid.umich.edu
! 141.211.43.106                  #linat06.grid.umich.edu
! 141.211.43.109                  #atgrid.grid.umich.edu
  >citi.umich.edu         #Center for Information Technology Integration
  141.211.133.5                   #babylon.citi.umich.edu
  >lsa.umich.edu          #University of Michigan - College of LS&A
  141.211.211.53                  #gerow.lsa.umich.edu
  141.211.211.72                  #collines.lsa.umich.edu
  141.211.211.153                 #hodges.lsa.umich.edu
! >umr.edu                #University of Missouri - Rolla
! 131.151.1.59                    #afsdb1.umr.edu
! 131.151.1.70                    #afsdb3.umr.edu
! 131.151.1.146                   #afsdb2.umr.edu
  >physics.unc.edu        #Univ. of NC at Chapel Hill, Dept. of Physics
  152.2.4.1                       #who.physics.unc.edu
  152.2.4.3                       #what.physics.unc.edu
  152.2.4.5                       #when.physics.unc.edu
  >uncc.edu               #University of NC at Charlotte Mosaic AFS Cell
  152.15.10.70                    #as-sm1.uncc.edu
! 152.15.13.7                     #as-sm2.uncc.edu
! 152.15.30.27                    #fs-kenn3.uncc.edu
  >eng.utah.edu           #University of Utah - Engineering
  155.99.222.9                    #lenny.eng.utah.edu
  155.99.222.10                   #carl.eng.utah.edu
--- 305,328 ----
  141.211.1.34                    #ruthless.ifs.umich.edu
  >atlas.umich.edu        #ATLAS group cell in physics at University of Michigan
  141.211.43.102                  #linat02.grid.umich.edu
! 141.211.43.103                  #linat03.grid.umich.edu
! 141.211.43.104                  #linat04.grid.umich.edu
  >citi.umich.edu         #Center for Information Technology Integration
  141.211.133.5                   #babylon.citi.umich.edu
  >lsa.umich.edu          #University of Michigan - College of LS&A
  141.211.211.53                  #gerow.lsa.umich.edu
  141.211.211.72                  #collines.lsa.umich.edu
  141.211.211.153                 #hodges.lsa.umich.edu
! >sph.umich.edu          #University of Michigan -- School of Public Health
! 141.211.50.41                   #afssph0.sph.umich.edu
  >physics.unc.edu        #Univ. of NC at Chapel Hill, Dept. of Physics
  152.2.4.1                       #who.physics.unc.edu
  152.2.4.3                       #what.physics.unc.edu
  152.2.4.5                       #when.physics.unc.edu
  >uncc.edu               #University of NC at Charlotte Mosaic AFS Cell
  152.15.10.70                    #as-sm1.uncc.edu
! 152.15.93.186                   #as-ece1.uncc.edu
! 152.15.181.175                  #as-me1.uncc.edu
  >eng.utah.edu           #University of Utah - Engineering
  155.99.222.9                    #lenny.eng.utah.edu
  155.99.222.10                   #carl.eng.utah.edu
***************
*** 344,349 ****
--- 356,363 ----
  >dapnia.saclay.cea.fr   #CEA DAPNIA
  132.166.32.7                    #dphrsg.saclay.cea.fr
  132.166.32.12                   #dphrsl.saclay.cea.fr
+ >grif.fr                #GRIF cell
+ 192.54.208.18                   #node03.datagrid.cea.fr
  >in2p3.fr               #IN2P3 production cell
  134.158.232.11                  #ccafsdb1.in2p3.fr
  134.158.232.12                  #ccafsdb2.in2p3.fr
***************
*** 401,406 ****
--- 415,421 ----
  192.84.134.75                   #afsna.na.infn.it
  >ba.infn.it             #INFN, Sezione di Bari
  193.206.185.235                 #baafsserver.ba.infn.it
+ 193.206.185.236                 #debsrv.ba.infn.it
  >kloe.infn.it           #INFN, KLOE experiment at Laboratori di Frascati
  192.135.25.111                  #kloeafs1.lnf.infn.it
  192.135.25.112                  #kloeafs2.lnf.infn.it
***************
*** 451,461 ****
  >laroia.net             #Laroia Networks
  66.66.102.254                   #supercore.laroia.net
  >sinenomine.net         #Sine Nomine Associates
! 66.92.236.139                   #afs.sinenomine.net
  >slackers.net           #The Slackers' Network
  63.201.48.27                    #alexandria.slackers.net
  >tproa.net              #The People's Republic of Ames
  209.234.76.70                   #service-3.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
--- 466,478 ----
  >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
  209.234.76.70                   #service-3.tproa.net
+ 209.234.76.75                   #service-4.tproa.net
+ 209.234.76.76                   #service-5.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
***************
*** 484,505 ****
  >oc7.org                #The OC7 Project
  128.2.122.140                   #knife.oc7.org
  207.22.77.170                   #spoon.oc7.org
! >openafs.org            #OpenAFS Project
! 18.7.14.88                      #grand-opening.mit.edu
! 128.2.191.224                   #penn.central.org
! 130.237.48.87                   #andrew.e.kth.se
! >e.kth.se               #Royal Institute of Technology, Elektro
  130.237.32.145                  #sonen.e.kth.se
  130.237.48.7                    #anden.e.kth.se
  130.237.48.244                  #fadern.e.kth.se
  >hallf.kth.se           #Royal Institute of Technology, HALLF
! 130.237.24.141                  #rasmus13.hallf.kth.se
! 130.237.24.152                  #rasmus3.hallf.kth.se
! 130.237.24.177                  #rasmus29.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
! 130.237.202.12                  #afsdb2.isk.kth.se
! 130.237.206.13                  #afsdb1.isk.kth.se
! 130.237.209.141                 #afsdb3.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
--- 501,516 ----
  >oc7.org                #The OC7 Project
  128.2.122.140                   #knife.oc7.org
  207.22.77.170                   #spoon.oc7.org
! >kth.se                 #Royal Institute of Technology, Stockholm, Sweden
  130.237.32.145                  #sonen.e.kth.se
  130.237.48.7                    #anden.e.kth.se
  130.237.48.244                  #fadern.e.kth.se
  >hallf.kth.se           #Royal Institute of Technology, HALLF
! 130.237.24.11                   #afs1.hallf.kth.se
! 130.237.24.104                  #afs2.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
! 130.237.202.3                   #afsdb1.isk.kth.se
! 130.237.209.39                  #ezri.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
***************
*** 543,548 ****
--- 554,566 ----
  193.2.120.2                     #solkan.p-ng.si
  >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
+ 129.215.64.16                   #afsdb0.inf.ed.ac.uk
+ 129.215.64.17                   #afsdb1.inf.ed.ac.uk
+ 129.215.64.18                   #afsdb2.inf.ed.ac.uk
+ >ic.ac.uk               #Imperial College London
+ 155.198.63.148                  #icafs2.cc.ic.ac.uk
+ 155.198.63.149                  #icafs1.cc.ic.ac.uk
  >hep.man.ac.uk          #Manchester HEP
  194.36.2.3                      #afs1.hep.man.ac.uk
  194.36.2.4                      #afs2.hep.man.ac.uk
Index: openafs/src/packaging/MacOS/afslogo.jpg
Index: openafs/src/packaging/MacOS/background.jpg
Index: openafs/src/platform/Makefile.in
diff -c openafs/src/platform/Makefile.in:1.2.2.3 openafs/src/platform/Makefile.in:removed
*** openafs/src/platform/Makefile.in:1.2.2.3	Tue Aug  1 17:53:29 2006
--- openafs/src/platform/Makefile.in	Tue Oct 17 22:48:34 2006
***************
*** 1,26 ****
- # 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
- 
- # Common elements for Makefiles for all system types.
- 
- srcdir=@srcdir@
- include @TOP_OBJDIR@/src/config/Makefile.config
- include ../config/Makefile.version
- 
- all:
- 	cd $(MKAFS_OSTYPE) ; \
- 	echo $(MAKE) all; \
- 	$(MAKE) all
- dest:
- 	cd $(MKAFS_OSTYPE) ; \
- 	echo $(MAKE) DEST=${DEST} dest; \
- 	$(MAKE) DEST=${DEST} dest
- install:
- 	cd $(MKAFS_OSTYPE) ; \
- 	echo $(MAKE) DESTDIR=${DESTDIR} install; \
- 	$(MAKE) DESTDIR=${DESTDIR} install
- 
--- 0 ----
Index: openafs/src/platform/AIX/Makefile.in
diff -c openafs/src/platform/AIX/Makefile.in:1.1.2.2 openafs/src/platform/AIX/Makefile.in:removed
*** openafs/src/platform/AIX/Makefile.in:1.1.2.2	Tue Aug  1 17:53:36 2006
--- openafs/src/platform/AIX/Makefile.in	Tue Oct 17 22:48:34 2006
***************
*** 1,14 ****
- # 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
- 
- SHELL=/bin/sh
- 
- # We have no platform-specific stuff for this platform (yet).
- all:
- install:
- dest:
- clean:
--- 0 ----
Index: openafs/src/platform/DARWIN/Makefile.in
diff -c openafs/src/platform/DARWIN/Makefile.in:1.2.2.5 openafs/src/platform/DARWIN/Makefile.in:removed
*** openafs/src/platform/DARWIN/Makefile.in:1.2.2.5	Tue Aug  1 23:49:35 2006
--- openafs/src/platform/DARWIN/Makefile.in	Tue Oct 17 22:48:34 2006
***************
*** 1,30 ****
- # 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
- 
- srcdir=@srcdir@
- include @TOP_OBJDIR@/src/config/Makefile.config
- include ../../config/Makefile.version
- 
- all: afssettings
- 
- afssettings: afssettings.m 
- 	${CC} ${CFLAGS} -o afssettings afssettings.m -framework Foundation
- 
- install: \
- 	${DESTDIR}${sbindir}/afssettings
- 
- dest: \
- 	${DEST}/etc/afssettings
- 
- ${DESTDIR}${sbindir}/afssettings: afssettings
- 	${INSTALL} -s $? $@
- 
- ${DEST}/etc/afssettings: afssettings
- 	${INSTALL} -s $? $@
- 
- clean:
- 	$(RM) -f *.o core afssettings AFS_component_version_number.c 
--- 0 ----
Index: openafs/src/platform/DARWIN/afssettings.m
diff -c openafs/src/platform/DARWIN/afssettings.m:1.1.4.2 openafs/src/platform/DARWIN/afssettings.m:removed
*** openafs/src/platform/DARWIN/afssettings.m:1.1.4.2	Tue Aug  1 17:38:46 2006
--- openafs/src/platform/DARWIN/afssettings.m	Tue Oct 17 22:48:34 2006
***************
*** 1,173 ****
- /*
-  * Copyright (c) 2003, 2006 Apple Computer, Inc. All rights reserved.
-  *
-  * @APPLE_LICENSE_HEADER_START@
-  * 
-  * This file contains Original Code and/or Modifications of Original Code
-  * as defined in and that are subject to the Apple Public Source License
-  * Version 2.0 (the 'License'). You may not use this file except in
-  * compliance with the License. Please obtain a copy of the License at
-  * http://www.opensource.apple.com/apsl/ and read it before using this
-  * file.
-  * 
-  * The Original Code and all software distributed under the License are
-  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
-  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
-  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
-  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
-  * Please see the License for the specific language governing rights and
-  * limitations under the License.
-  * 
-  * @APPLE_LICENSE_HEADER_END@
-  */
- #import <Foundation/Foundation.h>
- #import <stdio.h>
- #import <err.h>
- #import <sys/types.h>
- #import <sys/mount.h>
- #import <sys/sysctl.h>
- #import <afs/sysctl.h>
- 
- enum Type {
-     TypeNode = 0,
-     TypeNum,
-     TypeStr
- };
- 
- typedef struct _setting {
-     NSString *key;
-     int selector;
-     enum Type type;
-     struct _setting *children;
- } Setting;
- 
- Setting s_darwin_all[] = {
-     {@"RealModes", AFS_SC_DARWIN_ALL_REALMODES, TypeNum, NULL},
-     {NULL, 0, 0, NULL}
- };
- Setting s_darwin[] = {
-     {@"All", AFS_SC_DARWIN_ALL, TypeNode, s_darwin_all},
-     {@"Darwin12", AFS_SC_DARWIN_12, TypeNode, NULL},
-     {@"Darwin13", AFS_SC_DARWIN_13, TypeNode, NULL},
-     {@"Darwin14", AFS_SC_DARWIN_14, TypeNode, NULL},
-     {@"Darwin60", AFS_SC_DARWIN_60, TypeNode, NULL},
-     {@"Darwin70", AFS_SC_DARWIN_70, TypeNode, NULL},
-     {@"Darwin80", AFS_SC_DARWIN_80, TypeNode, NULL},
-     {@"Darwin90", AFS_SC_DARWIN_90, TypeNode, NULL},
-     {NULL, 0, 0, NULL}
- };
- Setting s_first[] = {
-     {@"All", AFS_SC_ALL, TypeNode, NULL},
-     {@"Darwin", AFS_SC_DARWIN, TypeNode, s_darwin},
-     {NULL, 0, 0, NULL}
- };
- Setting s_top = {NULL, -1, TypeNode, s_first};
- 
- int oid[CTL_MAXNAME] = {CTL_VFS};
- NSString *path = @"/var/db/openafs/etc/config/settings.plist";
- 
- char *oidString(int *oid, int len);
- void init(void);
- void walk(id obj, Setting *s, int level);
- 
- void
- init(void)
- {
-     int oidmax[] = {CTL_VFS, VFS_GENERIC, VFS_MAXTYPENUM};
-     int oidvfs[] = {CTL_VFS, VFS_GENERIC, VFS_CONF, 0};
-     int max;
-     struct vfsconf conf;
-     size_t len;
-     int i;
- 
-     len = sizeof(max);
-     if(sysctl(oidmax, 3, &max, &len, NULL, 0) < 0)
- 	err(1, "sysctl VFS_MAXTYPENUM");
-     for(i = max; --i >= 0; ) {
- 	oidvfs[3] = i;
- 	len = sizeof(conf);
- 	if(sysctl(oidvfs, 4, &conf, &len, NULL, 0) < 0)
- 	    continue;
- 	if(strcmp("afs", conf.vfc_name) == 0) {
- 	    s_top.selector = conf.vfc_typenum;
- 	    break;
- 	}
-     }
-     if(s_top.selector < 0)
- 	errx(1, "AFS is not loaded");
- }
- 
- char *
- oidString(int *oid, int len)
- {
-     static char buf[256];
-     char *cp = buf;
- 
-     for(;;) {
- 	sprintf(cp, "%d", *oid++);
- 	if(--len <= 0)
- 	    break;
- 	cp += strlen(cp);
- 	*cp++ = '.';
-     }
-     return buf;
- }
- 
- void
- walk(id obj, Setting *s, int level)
- {
-     Setting *child;
-     id newobj;
-     int intval;
-     const char *cp;
-     int level1 = level + 1;
- 
-     oid[level] = s->selector;
-     switch(s->type) {
-       case TypeNode:
- 	for(child = s->children; child->key; child++) {
- 	    if(child->type == TypeNode && !child->children)
- 		continue;
- 	    newobj = [obj objectForKey: child->key];
- 	    if(newobj)
- 		walk(newobj, child, level1);
- 	}
- 	break;
-       case TypeNum:
- 	intval = [obj intValue];
- 	if(sysctl(oid, level1, NULL, NULL, &intval, sizeof(intval)) < 0)
- 	    err(1, "sysctl %s => %d", oidString(oid, level1), intval);
- 	break;
-       case TypeStr:
- 	cp = [obj UTF8String];
- 	if(sysctl(oid, level1, NULL, NULL, (void *)cp, strlen(cp)) < 0)
- 	    err(1, "sysctl %s => %s", oidString(oid, level1), cp);
- 	break;
-     }
- }
- 
- main()
- {
-     NSData *plistData;
-     id plist;
-     NSString *error;
-     NSPropertyListFormat format;
-     NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
- 
-     init();
-     plistData = [NSData dataWithContentsOfFile: path];
-     if(plistData) {
- 	plist = [NSPropertyListSerialization propertyListFromData: plistData
- 	  mutabilityOption: NSPropertyListImmutable
- 	  format: &format
- 	  errorDescription: &error
- 	];
- 	if(plist)
- 	    walk(plist, &s_top, 1);
- 	else
- 	    errx(1, "%s: %s", [path UTF8String], [error UTF8String]);
-     }
- 
-     [pool release];
-     return 0;
- }
--- 0 ----
Index: openafs/src/platform/FBSD/Makefile.in
diff -c openafs/src/platform/FBSD/Makefile.in:1.1.2.2 openafs/src/platform/FBSD/Makefile.in:removed
*** openafs/src/platform/FBSD/Makefile.in:1.1.2.2	Tue Aug  1 17:53:41 2006
--- openafs/src/platform/FBSD/Makefile.in	Tue Oct 17 22:48:34 2006
***************
*** 1,14 ****
- # 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
- 
- SHELL=/bin/sh
- 
- # We have no platform-specific stuff for this platform (yet).
- all:
- install:
- dest:
- clean:
--- 0 ----
Index: openafs/src/platform/HPUX/Makefile.in
diff -c openafs/src/platform/HPUX/Makefile.in:1.1.2.2 openafs/src/platform/HPUX/Makefile.in:removed
*** openafs/src/platform/HPUX/Makefile.in:1.1.2.2	Tue Aug  1 17:53:41 2006
--- openafs/src/platform/HPUX/Makefile.in	Tue Oct 17 22:48:34 2006
***************
*** 1,14 ****
- # 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
- 
- SHELL=/bin/sh
- 
- # We have no platform-specific stuff for this platform (yet).
- all:
- install:
- dest:
- clean:
--- 0 ----
Index: openafs/src/platform/IRIX/Makefile.in
diff -c openafs/src/platform/IRIX/Makefile.in:1.1.2.2 openafs/src/platform/IRIX/Makefile.in:removed
*** openafs/src/platform/IRIX/Makefile.in:1.1.2.2	Tue Aug  1 17:53:41 2006
--- openafs/src/platform/IRIX/Makefile.in	Tue Oct 17 22:48:34 2006
***************
*** 1,14 ****
- # 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
- 
- SHELL=/bin/sh
- 
- # We have no platform-specific stuff for this platform (yet).
- all:
- install:
- dest:
- clean:
--- 0 ----
Index: openafs/src/platform/LINUX/Makefile.in
diff -c openafs/src/platform/LINUX/Makefile.in:1.1.2.2 openafs/src/platform/LINUX/Makefile.in:removed
*** openafs/src/platform/LINUX/Makefile.in:1.1.2.2	Tue Aug  1 17:53:42 2006
--- openafs/src/platform/LINUX/Makefile.in	Tue Oct 17 22:48:34 2006
***************
*** 1,14 ****
- # 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
- 
- SHELL=/bin/sh
- 
- # We have no platform-specific stuff for this platform (yet).
- all:
- install:
- dest:
- clean:
--- 0 ----
Index: openafs/src/platform/NBSD/Makefile.in
diff -c openafs/src/platform/NBSD/Makefile.in:1.1.2.2 openafs/src/platform/NBSD/Makefile.in:removed
*** openafs/src/platform/NBSD/Makefile.in:1.1.2.2	Tue Aug  1 17:53:42 2006
--- openafs/src/platform/NBSD/Makefile.in	Tue Oct 17 22:48:34 2006
***************
*** 1,14 ****
- # 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
- 
- SHELL=/bin/sh
- 
- # We have no platform-specific stuff for this platform (yet).
- all:
- install:
- dest:
- clean:
--- 0 ----
Index: openafs/src/platform/OBSD/Makefile.in
diff -c openafs/src/platform/OBSD/Makefile.in:1.1.2.2 openafs/src/platform/OBSD/Makefile.in:removed
*** openafs/src/platform/OBSD/Makefile.in:1.1.2.2	Tue Aug  1 17:53:42 2006
--- openafs/src/platform/OBSD/Makefile.in	Tue Oct 17 22:48:34 2006
***************
*** 1,14 ****
- # 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
- 
- SHELL=/bin/sh
- 
- # We have no platform-specific stuff for this platform (yet).
- all:
- install:
- dest:
- clean:
--- 0 ----
Index: openafs/src/platform/SOLARIS/Makefile.in
diff -c openafs/src/platform/SOLARIS/Makefile.in:1.1.2.2 openafs/src/platform/SOLARIS/Makefile.in:removed
*** openafs/src/platform/SOLARIS/Makefile.in:1.1.2.2	Tue Aug  1 17:53:42 2006
--- openafs/src/platform/SOLARIS/Makefile.in	Tue Oct 17 22:48:34 2006
***************
*** 1,14 ****
- # 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
- 
- SHELL=/bin/sh
- 
- # We have no platform-specific stuff for this platform (yet).
- all:
- install:
- dest:
- clean:
--- 0 ----
Index: openafs/src/ptserver/ptuser.c
diff -c openafs/src/ptserver/ptuser.c:1.25.2.2 openafs/src/ptserver/ptuser.c:1.25.2.6
*** openafs/src/ptserver/ptuser.c:1.25.2.2	Mon Jul  3 23:57:24 2006
--- openafs/src/ptserver/ptuser.c	Fri Oct 13 09:09:06 2006
***************
*** 15,21 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptuser.c,v 1.25.2.2 2006/07/04 03:57:24 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
--- 15,21 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptuser.c,v 1.25.2.6 2006/10/13 13:09:06 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
***************
*** 71,77 ****
      afs_int32 code;
      struct rx_connection *serverconns[MAXSERVERS];
      struct rx_securityClass *sc[3];
!     static struct afsconf_dir *tdir = (struct afsconf_dir *)0;	/* only do this once */
      static char tconfDir[100] = "";
      static char tcell[64] = "";
      struct ktc_token ttoken;
--- 71,77 ----
      afs_int32 code;
      struct rx_connection *serverconns[MAXSERVERS];
      struct rx_securityClass *sc[3];
!     static struct afsconf_dir *tdir = (struct afsconf_dir *)NULL;	/* only do this once */
      static char tconfDir[100] = "";
      static char tcell[64] = "";
      struct ktc_token ttoken;
***************
*** 117,132 ****
      }
  #endif /* defined(UKERNEL) */
  
!     if (tdir == 0 || strcmp(confDir, tconfDir) || strcmp(cell, tcell)) {
  	/*
  	 * force re-evaluation.  we either don't have an afsconf_dir,
           * the directory has changed or the cell has changed.
  	 */
  	if (tdir && !gottdir) {
  	    afsconf_Close(tdir);
!             tdir = (struct afsconf_dir *)0;
          }
! 	pruclient = (struct ubik_client *)0;
          refresh = 1;
      }
  
--- 117,132 ----
      }
  #endif /* defined(UKERNEL) */
  
!     if (tdir == NULL || strcmp(confDir, tconfDir) || strcmp(cell, tcell)) {
  	/*
  	 * force re-evaluation.  we either don't have an afsconf_dir,
           * the directory has changed or the cell has changed.
  	 */
  	if (tdir && !gottdir) {
  	    afsconf_Close(tdir);
!             tdir = (struct afsconf_dir *)NULL;
          }
! 	pruclient = (struct ubik_client *)NULL;
          refresh = 1;
      }
  
***************
*** 163,170 ****
       * want, don't get a new one. Unless the security level is 2 in
       * which case we will get one (and re-read the key file).
       */
!     if (pruclient && (lastLevel == secLevel) && (secLevel != 2))
  	return 0;
  
      code = rx_Init(0);
      if (code) {
--- 163,171 ----
       * want, don't get a new one. Unless the security level is 2 in
       * which case we will get one (and re-read the key file).
       */
!     if (pruclient && (lastLevel == secLevel) && (secLevel != 2)) {
  	return 0;
+     }
  
      code = rx_Init(0);
      if (code) {
***************
*** 216,221 ****
--- 217,223 ----
  					      ttoken.ticket);
  	}
      }
+ 
      if (scIndex == 1)
  	return PRBADARG;
      if ((scIndex == 0) && (sc[0] == 0))
***************
*** 623,629 ****
      if (*id == ANONYMOUSID)
  	return PRNOENT;
      code = ubik_PR_ListEntry(pruclient, 0, *id, &aentry);
-       //code = ubik_PR_ListEntry(pruclient, 0, *id, &aentry);
      if (code)
  	return code;
      /* this should be done in one RPC, but I'm lazy. */
--- 625,630 ----
***************
*** 680,686 ****
  	if (oid == ANONYMOUSID)
  	    return PRNOENT;
      }
!     code = ubik_PR_ChangeEntry(pruclient, 0, id, newname, oid, newid);
      return code;
  }
  
--- 681,687 ----
  	if (oid == ANONYMOUSID)
  	    return PRNOENT;
      }
!     code = ubik_PR_ChangeEntry(pruclient, 0, id, newname, oid, *newid);
      return code;
  }
  
Index: openafs/src/rx/rx_getaddr.c
diff -c openafs/src/rx/rx_getaddr.c:1.23.4.4 openafs/src/rx/rx_getaddr.c:1.23.4.5
*** openafs/src/rx/rx_getaddr.c:1.23.4.4	Thu Jun 15 11:20:56 2006
--- openafs/src/rx/rx_getaddr.c	Wed Oct 11 07:31:38 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_getaddr.c,v 1.23.4.4 2006/06/15 15:20:56 shadow Exp $");
  
  #ifndef AFS_DJGPP_ENV
  #ifndef KERNEL
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_getaddr.c,v 1.23.4.5 2006/10/11 11:31:38 jaltman Exp $");
  
  #ifndef AFS_DJGPP_ENV
  #ifndef KERNEL
***************
*** 301,307 ****
  			maskBuffer[count] = a->sin_addr.s_addr;
  		    else
  			maskBuffer[count] = htonl(0xffffffff);
! 		    memset(&ifr, sizeof(ifr), 0);
  		    ifr.ifr_addr.sa_family = AF_INET;
  		    strncpy(ifr.ifr_name, sdl->sdl_data, sdl->sdl_nlen);
  		    if (ioctl(s, SIOCGIFMTU, (caddr_t) & ifr) < 0)
--- 301,307 ----
  			maskBuffer[count] = a->sin_addr.s_addr;
  		    else
  			maskBuffer[count] = htonl(0xffffffff);
! 		    memset(&ifr, 0, sizeof(ifr));
  		    ifr.ifr_addr.sa_family = AF_INET;
  		    strncpy(ifr.ifr_name, sdl->sdl_data, sdl->sdl_nlen);
  		    if (ioctl(s, SIOCGIFMTU, (caddr_t) & ifr) < 0)
Index: openafs/src/rx/DARWIN/rx_knet.c
diff -c openafs/src/rx/DARWIN/rx_knet.c:1.12 openafs/src/rx/DARWIN/rx_knet.c:1.12.4.1
*** openafs/src/rx/DARWIN/rx_knet.c:1.12	Tue Jan 17 12:08:36 2006
--- openafs/src/rx/DARWIN/rx_knet.c	Fri Sep 15 20:11:55 2006
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/DARWIN/rx_knet.c,v 1.12 2006/01/17 17:08:36 shadow Exp $");
  
  #include "rx/rx_kcommon.h"
  
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/DARWIN/rx_knet.c,v 1.12.4.1 2006/09/16 00:11:55 shadow Exp $");
  
  #include "rx/rx_kcommon.h"
  
***************
*** 127,133 ****
--- 127,135 ----
  		*addr = *(struct sockaddr_in *)sa;
  	} else
  	    printf("Unknown socket family %d in NetReceive\n", sa->sa_family);
+ #ifndef AFS_DARWIN80_ENV
  	FREE(sa, M_SONAME);
+ #endif
      }
      return code;
  }
Index: openafs/src/rx/LINUX/rx_knet.c
diff -c openafs/src/rx/LINUX/rx_knet.c:1.32 openafs/src/rx/LINUX/rx_knet.c:1.32.2.1
*** openafs/src/rx/LINUX/rx_knet.c:1.32	Thu Mar  2 01:39:45 2006
--- openafs/src/rx/LINUX/rx_knet.c	Fri Sep 22 07:18:38 2006
***************
*** 16,22 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/LINUX/rx_knet.c,v 1.32 2006/03/02 06:39:45 shadow Exp $");
  
  #include <linux/version.h>
  #ifdef AFS_LINUX22_ENV
--- 16,22 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/LINUX/rx_knet.c,v 1.32.2.1 2006/09/22 11:18:38 shadow Exp $");
  
  #include <linux/version.h>
  #ifdef AFS_LINUX22_ENV
***************
*** 209,217 ****
--- 209,225 ----
  
      if (&tasklist_lock)
        read_lock(&tasklist_lock);
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+     else
+       rcu_read_lock();
+ #endif
      listener = find_task_by_pid(rxk_ListenerPid);
      if (&tasklist_lock)
         read_unlock(&tasklist_lock);
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+     else
+       rcu_read_unlock();
+ #endif
      while (rxk_ListenerPid) {
  	flush_signals(listener);
  	force_sig(SIGKILL, listener);
Index: openafs/src/ubik/uinit.c
diff -c openafs/src/ubik/uinit.c:1.7 openafs/src/ubik/uinit.c:1.7.8.1
*** openafs/src/ubik/uinit.c:1.7	Tue Oct 19 00:40:48 2004
--- openafs/src/ubik/uinit.c	Fri Sep 15 19:22:27 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/uinit.c,v 1.7 2004/10/19 04:40:48 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.1 2006/09/15 23:22:27 jaltman Exp $");
  
  #include <afs/stds.h>
  #ifdef AFS_NT40_ENV
***************
*** 87,92 ****
--- 87,93 ----
  	}
  	code = afsconf_ClientAuth(tdir, &sc, &scIndex);	/* sets sc,scIndex */
  	if (code) {
+ 	    afsconf_Close(tdir);
  	    fprintf(stderr,
  		    "%s: Could not get security object for -localAuth\n",
  		    funcName);
***************
*** 96,101 ****
--- 97,103 ----
  	    afsconf_GetCellInfo(tdir, tdir->cellName, serviceid,
  				&info);
  	if (code) {
+ 	    afsconf_Close(tdir);
  	    fprintf(stderr,
  		    "%s: can't find cell %s's hosts in %s/%s\n",
  		    funcName, cellName, AFSDIR_SERVER_ETC_DIRPATH,
Index: openafs/src/viced/afsfileprocs.c
diff -c openafs/src/viced/afsfileprocs.c:1.113.2.9 openafs/src/viced/afsfileprocs.c:1.113.2.11
*** openafs/src/viced/afsfileprocs.c:1.113.2.9	Tue Sep  5 12:33:25 2006
--- openafs/src/viced/afsfileprocs.c	Mon Sep 25 21:37:23 2006
***************
*** 29,35 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/afsfileprocs.c,v 1.113.2.9 2006/09/05 16:33:25 shadow 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.11 2006/09/26 01:37:23 shadow Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
***************
*** 1175,1186 ****
  			("CopyOnWrite failed: volume %u in partition %s  (tried reading %u, read %u, wrote %u, errno %u) volume needs salvage\n",
  			 V_id(volptr), volptr->partition->name, length, rdlen,
  			 wrlen, errno));
! #ifdef FAST_RESTART		/* if running in no-salvage, don't core the server */
! 		ViceLog(0, ("CopyOnWrite failed: taking volume offline\n"));
! #elif defined(AFS_DEMAND_ATTACH_FS)
  		ViceLog(0, ("CopyOnWrite failed: requesting salvage\n"));
! #else /* Avoid further corruption and try to get a core. */
! 		assert(0);
  #endif
  		/* Decrement this inode so salvager doesn't find it. */
  		FDH_REALLYCLOSE(newFdP);
--- 1175,1184 ----
  			("CopyOnWrite failed: volume %u in partition %s  (tried reading %u, read %u, wrote %u, errno %u) volume needs salvage\n",
  			 V_id(volptr), volptr->partition->name, length, rdlen,
  			 wrlen, errno));
! #if defined(AFS_DEMAND_ATTACH_FS)
  		ViceLog(0, ("CopyOnWrite failed: requesting salvage\n"));
! #else
! 		ViceLog(0, ("CopyOnWrite failed: taking volume offline\n"));
  #endif
  		/* Decrement this inode so salvager doesn't find it. */
  		FDH_REALLYCLOSE(newFdP);
***************
*** 7276,7284 ****
--- 7274,7286 ----
      sys2et[ENAMETOOLONG] = UAENAMETOOLONG;
      sys2et[ENOLCK] = UAENOLCK;
      sys2et[ENOSYS] = UAENOSYS;
+ #if (ENOTEMPTY != EEXIST)
      sys2et[ENOTEMPTY] = UAENOTEMPTY;
+ #endif
      sys2et[ELOOP] = UAELOOP;
+ #if (EWOULDBLOCK != EAGAIN)
      sys2et[EWOULDBLOCK] = UAEWOULDBLOCK;
+ #endif
      sys2et[ENOMSG] = UAENOMSG;
      sys2et[EIDRM] = UAEIDRM;
      sys2et[ECHRNG] = UAECHRNG;
Index: openafs/src/viced/host.c
diff -c openafs/src/viced/host.c:1.93.2.12 openafs/src/viced/host.c:1.93.2.13
*** openafs/src/viced/host.c:1.93.2.12	Tue Sep  5 18:05:11 2006
--- openafs/src/viced/host.c	Sun Oct  8 23:24:51 2006
***************
*** 13,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/host.c,v 1.93.2.12 2006/09/05 22:05:11 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
--- 13,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/host.c,v 1.93.2.13 2006/10/09 03:24:51 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
***************
*** 1122,1129 ****
  	held = (*proc) (host, held, param);
  	if (!H_ENUMERATE_ISSET_HELD(held))
  	    h_Release_r(host); /* this might free up the host */
! 	if (H_ENUMERATE_ISSET_BAIL(held))
  	    break;
      }
  }				/*h_Enumerate_r */
  
--- 1122,1132 ----
  	held = (*proc) (host, held, param);
  	if (!H_ENUMERATE_ISSET_HELD(held))
  	    h_Release_r(host); /* this might free up the host */
! 	if (H_ENUMERATE_ISSET_BAIL(held)) {
! 	    if (!H_ENUMERATE_ISSET_HELD(nheld))
! 		h_Release_r(next); /* this might free up the host */
  	    break;
+ 	}
      }
  }				/*h_Enumerate_r */
  
Index: openafs/src/viced/viced.c
diff -c openafs/src/viced/viced.c:1.75.2.7 openafs/src/viced/viced.c:1.75.2.8
*** openafs/src/viced/viced.c:1.75.2.7	Sun Sep  3 01:53:14 2006
--- openafs/src/viced/viced.c	Fri Sep 15 19:22:27 2006
***************
*** 22,28 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/viced.c,v 1.75.2.7 2006/09/03 05:53:14 shadow Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
--- 22,28 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/viced.c,v 1.75.2.8 2006/09/15 23:22:27 jaltman Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
***************
*** 1597,1602 ****
--- 1597,1603 ----
  			     info.hostAddr[i].sin_port, USER_SERVICE_ID, sc,
  			     scIndex);
      code = ubik_ClientInit(serverconns, &cstruct);
+     afsconf_Close(tdir);
      if (code) {
  	ViceLog(0, ("vl_Initialize: ubik client init failed.\n"));
  	return code;
Index: openafs/src/vol/clone.c
diff -c openafs/src/vol/clone.c:1.19 openafs/src/vol/clone.c:1.19.2.2
*** openafs/src/vol/clone.c:1.19	Wed Apr 26 11:43:17 2006
--- openafs/src/vol/clone.c	Thu Sep 28 09:01:47 2006
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/clone.c,v 1.19 2006/04/26 15:43:17 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.2 2006/09/28 13:01:47 jaltman Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
***************
*** 262,268 ****
  		    Log("IH_INC failed: %x, %s, %u errno %d\n",
  			V_linkHandle(rwvp), PrintInode(NULL, rwinode),
  			V_parentId(rwvp), errno);
! 		    assert(0);
  		}
  		inodeinced = 1;
  	    }
--- 262,269 ----
  		    Log("IH_INC failed: %x, %s, %u errno %d\n",
  			V_linkHandle(rwvp), PrintInode(NULL, rwinode),
  			V_parentId(rwvp), errno);
! 		    VForceOffline_r(rwvp, 0);
! 		    ERROR_EXIT(EIO);
  		}
  		inodeinced = 1;
  	    }
***************
*** 314,320 ****
  		    Log("IH_DEC failed: %x, %s, %u errno %d\n",
  			V_linkHandle(rwvp), PrintInode(NULL, rwinode),
  			V_parentId(rwvp), errno);
! 		    assert(0);
  		}
  	    }
  	    /* And if the directory was marked clone, unmark it */
--- 315,322 ----
  		    Log("IH_DEC failed: %x, %s, %u errno %d\n",
  			V_linkHandle(rwvp), PrintInode(NULL, rwinode),
  			V_parentId(rwvp), errno);
! 		    VForceOffline_r(rwvp, 0);
! 		    ERROR_EXIT(EIO);
  		}
  	    }
  	    /* And if the directory was marked clone, unmark it */
Index: openafs/src/vol/namei_ops.c
diff -c openafs/src/vol/namei_ops.c:1.28.2.4 openafs/src/vol/namei_ops.c:1.28.2.6
*** openafs/src/vol/namei_ops.c:1.28.2.4	Tue Sep  5 11:02:29 2006
--- openafs/src/vol/namei_ops.c	Wed Sep 20 01:55:32 2006
***************
*** 13,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/namei_ops.c,v 1.28.2.4 2006/09/05 15:02:29 shadow Exp $");
  
  #ifdef AFS_NAMEI_ENV
  #include <stdio.h>
--- 13,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/namei_ops.c,v 1.28.2.6 2006/09/20 05:55:32 shadow Exp $");
  
  #ifdef AFS_NAMEI_ENV
  #include <stdio.h>
***************
*** 27,35 ****
  #include <sys/file.h>
  #include <sys/param.h>
  #include <lock.h>
- #ifdef AFS_AIX_ENV
- #include <sys/lockf.h>
- #endif
  #if defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV)
  #include <unistd.h>
  #endif
--- 27,32 ----
***************
*** 69,74 ****
--- 66,103 ----
  
  /*@printflike@*/ extern void Log(const char *format, ...);
  
+ #ifndef LOCK_SH
+ #define   LOCK_SH   1    /* shared lock */
+ #define   LOCK_EX   2    /* exclusive lock */
+ #define   LOCK_NB   4    /* don't block when locking */
+ #define   LOCK_UN   8    /* unlock */
+ #endif
+ 
+ #ifndef HAVE_FLOCK
+ #include <fcntl.h>
+ 
+ /*
+  * This function emulates a subset of flock()
+  */
+ int 
+ emul_flock(int fd, int cmd)
+ {    struct flock f;
+ 
+     memset(&f, 0, sizeof (f));
+ 
+     if (cmd & LOCK_UN)
+         f.l_type = F_UNLCK;
+     if (cmd & LOCK_SH)
+         f.l_type = F_RDLCK;
+     if (cmd & LOCK_EX)
+         f.l_type = F_WRLCK;
+ 
+     return fcntl(fd, (cmd & LOCK_NB) ? F_SETLK : F_SETLKW, &f);
+ }
+ 
+ #define flock(f,c)      emul_flock(f,c)
+ #endif
+ 
  extern char *volutil_PartitionName_r(int volid, char *buf, int buflen);
  int Testing=0;
  
***************
*** 871,888 ****
      ssize_t rc;
      int index;
  
-     if (!VALID_INO(ino)) return 0;
      /* there's no linktable yet. the salvager will create one later */
      if (h->fd_fd == -1 && fixup)
         return 1;
      namei_GetLCOffsetAndIndexFromIno(ino, &offset, &index);
  
      if (lockit) {
- #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV)
- 	if (lockf(h->fd_fd, F_LOCK, 0) < 0)
- #else
  	if (flock(h->fd_fd, LOCK_EX) < 0)
- #endif
  	    return -1;
      }
  
--- 900,912 ----
***************
*** 917,927 ****
  
    bad_getLinkByte:
      if (lockit)
- #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV)
- 	lockf(h->fd_fd, F_ULOCK, 0);
- #else
  	flock(h->fd_fd, LOCK_UN);
- #endif
      return -1;
  }
  
--- 941,947 ----
***************
*** 948,958 ****
  	return -1;
  
      /* Only one manipulates at a time. */
- #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV)
-     if (lockf(fdP->fd_fd, F_LOCK, 0) < 0) {
- #else
      if (flock(fdP->fd_fd, LOCK_EX) < 0) {
- #endif
  	FDH_REALLYCLOSE(fdP);
  	return -1;
      }
--- 968,974 ----
***************
*** 988,1007 ****
  	goto badGetFreeTag;
      }
      FDH_SYNC(fdP);
- #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV)
-     lockf(fdP->fd_fd, F_ULOCK, 0);
- #else
      flock(fdP->fd_fd, LOCK_UN);
- #endif
      FDH_REALLYCLOSE(fdP);
      return col;;
  
    badGetFreeTag:
- #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV)
-     lockf(fdP->fd_fd, F_ULOCK, 0);
- #else
      flock(fdP->fd_fd, LOCK_UN);
- #endif
      FDH_REALLYCLOSE(fdP);
      return -1;
  }
--- 1004,1015 ----
***************
*** 1024,1034 ****
      namei_GetLCOffsetAndIndexFromIno(ino, &offset, &index);
  
      if (!locked) {
- #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV)
- 	if (lockf(fdP->fd_fd, F_LOCK, 0) < 0) {
- #else
  	if (flock(fdP->fd_fd, LOCK_EX) < 0) {
- #endif
  	    return -1;
  	}
      }
--- 1032,1038 ----
***************
*** 1067,1077 ****
  
  
    bad_SetLinkCount:
- #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV)
-     lockf(fdP->fd_fd, F_ULOCK, 0);
- #else
      flock(fdP->fd_fd, LOCK_UN);
- #endif
  
      return code;
  }
--- 1071,1077 ----
Index: openafs/src/volser/dumpstuff.c
diff -c openafs/src/volser/dumpstuff.c:1.29.2.2 openafs/src/volser/dumpstuff.c:1.29.2.3
*** openafs/src/volser/dumpstuff.c:1.29.2.2	Fri Jul 14 15:35:20 2006
--- openafs/src/volser/dumpstuff.c	Fri Oct 13 09:09:07 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/dumpstuff.c,v 1.29.2.2 2006/07/14 19:35:20 shadow Exp $");
  
  #include <sys/types.h>
  #include <ctype.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/dumpstuff.c,v 1.29.2.3 2006/10/13 13:09:07 shadow Exp $");
  
  #include <sys/types.h>
  #include <ctype.h>
***************
*** 535,545 ****
      afs_sfsize_t size;
  #ifdef	AFS_AIX_ENV
  #include <sys/statfs.h>
! #ifdef AFS_LARGEFILE_ENV
      struct statfs64 tstatfs;
! #else /* !AFS_LARGEFILE_ENV */
      struct statfs tstatfs;
! #endif /* !AFS_LARGEFILE_ENV */
      int statfs_code;
  #endif
  
--- 535,545 ----
      afs_sfsize_t size;
  #ifdef	AFS_AIX_ENV
  #include <sys/statfs.h>
! #if defined(AFS_AIX52_ENV) && defined(AFS_LARGEFILE_ENV)
      struct statfs64 tstatfs;
! #else /* !AFS_AIX52_ENV || !AFS_LARGEFILE_ENV */
      struct statfs tstatfs;
! #endif /* !AFS_AIX52_ENV || !AFS_LARGEFILE_ENV */
      int statfs_code;
  #endif
  
***************
*** 555,570 ****
      /* Unfortunately in AIX valuable fields such as st_blksize are 
       * gone from the stat structure.
       */
! #ifdef AFS_LARGEFILE_ENV
      statfs_code = fstatfs64(handleP->fd_fd, &tstatfs);
! #else /* !AFS_LARGEFILE_ENV */
      statfs_code = fstatfs(handleP->fd_fd, &tstatfs);
! #endif /* !AFS_LARGEFILE_ENV */
      if (statfs_code != 0) {
          Log("DumpFile: fstatfs returned error code %d on descriptor %d\n", errno, handleP->fd_fd);
  	return VOLSERDUMPERROR;
      }
!     howMany = tstatfs.f_bsize;
      Log("DumpFile: fstatfs returned block size of %lld; howMany=%lld", tstatfs.f_bsize, howMany);
  #else
      howMany = status.st_blksize;
--- 555,570 ----
      /* Unfortunately in AIX valuable fields such as st_blksize are 
       * gone from the stat structure.
       */
! #if defined(AFS_AIX52_ENV) && defined(AFS_LARGEFILE_ENV)
      statfs_code = fstatfs64(handleP->fd_fd, &tstatfs);
! #else /* !AFS_AIX52_ENV || !AFS_LARGEFILE_ENV */
      statfs_code = fstatfs(handleP->fd_fd, &tstatfs);
! #endif /* !AFS_AIX52_ENV || !AFS_LARGEFILE_ENV */
      if (statfs_code != 0) {
          Log("DumpFile: fstatfs returned error code %d on descriptor %d\n", errno, handleP->fd_fd);
  	return VOLSERDUMPERROR;
      }
!     howMany = (afs_sfsize_t) tstatfs.f_bsize;
      Log("DumpFile: fstatfs returned block size of %lld; howMany=%lld", tstatfs.f_bsize, howMany);
  #else
      howMany = status.st_blksize;
