Index: openafs/src/NTMakefile
diff -c openafs/src/NTMakefile:1.27.2.5 openafs/src/NTMakefile:1.27.2.7
*** openafs/src/NTMakefile:1.27.2.5	Wed Oct 10 12:06:30 2007
--- openafs/src/NTMakefile	Fri Feb  1 21:48:12 2008
***************
*** 409,415 ****
       $(NTMAKE)
       $(CD) ..\..
  
! libadmin: tbutc
       echo ***** $@
  	$(DOCD) $(SRC)\$@
  	$(CD) $(SRC)\$@
--- 409,443 ----
       $(NTMAKE)
       $(CD) ..\..
  
! talocale: tbutc
!      echo ***** $@
! 	$(DOCD) $(SRC)\WINNT\$@
! 	$(CD) $(SRC)\WINNT\$@
! 	$(NTMAKE)
! 	$(CD) ..\..\..
! 
! license: talocale
!      echo ***** $@
! 	$(DOCD) $(SRC)\WINNT\$@
! 	$(CD) $(SRC)\WINNT\$@
! 	$(NTMAKE)
! 	$(CD) ..\..\..
! 
! client_osi: license
!      echo ***** $@
! 	$(DOCD) $(SRC)\WINNT\$@
! 	$(CD) $(SRC)\WINNT\$@
! 	$(NTMAKE)
! 	$(CD) ..\..\..
! 
! afsd: client_osi
!      echo ***** $@
! 	$(DOCD) $(SRC)\WINNT\$@
! 	$(CD) $(SRC)\WINNT\$@
! 	$(NTMAKE)
! 	$(CD) ..\..\..
! 
! libadmin: afsd
       echo ***** $@
  	$(DOCD) $(SRC)\$@
  	$(CD) $(SRC)\$@
***************
*** 472,506 ****
  	$(NTMAKE)
  	$(CD) ..\..\..
  
! talocale: admintest
!      echo ***** $@
! 	$(DOCD) $(SRC)\WINNT\$@
! 	$(CD) $(SRC)\WINNT\$@
! 	$(NTMAKE)
! 	$(CD) ..\..\..
! 
! license: talocale
!      echo ***** $@
! 	$(DOCD) $(SRC)\WINNT\$@
! 	$(CD) $(SRC)\WINNT\$@
! 	$(NTMAKE)
! 	$(CD) ..\..\..
! 
! client_osi: license
!      echo ***** $@
! 	$(DOCD) $(SRC)\WINNT\$@
! 	$(CD) $(SRC)\WINNT\$@
! 	$(NTMAKE)
! 	$(CD) ..\..\..
! 
! afsd: client_osi
!      echo ***** $@
! 	$(DOCD) $(SRC)\WINNT\$@
! 	$(CD) $(SRC)\WINNT\$@
! 	$(NTMAKE)
! 	$(CD) ..\..\..
! 
! afsadmsvr: afsd
       echo ***** $@
  	$(DOCD) $(SRC)\WINNT\$@
  	$(CD) $(SRC)\WINNT\$@
--- 500,506 ----
  	$(NTMAKE)
  	$(CD) ..\..\..
  
! afsadmsvr: admintest
       echo ***** $@
  	$(DOCD) $(SRC)\WINNT\$@
  	$(CD) $(SRC)\WINNT\$@
Index: openafs/src/WINNT/afsd/NTMakefile
diff -c openafs/src/WINNT/afsd/NTMakefile:1.46.2.6 openafs/src/WINNT/afsd/NTMakefile:1.46.2.9
*** openafs/src/WINNT/afsd/NTMakefile:1.46.2.6	Thu Aug 23 23:21:49 2007
--- openafs/src/WINNT/afsd/NTMakefile	Fri Feb  8 21:32:19 2008
***************
*** 190,196 ****
      $(DESTDIR)\lib\afs\afsreg.lib
  
  $(CONF_DLLFILE): $(CONFOBJS) $(OUT)\libafsconf.res $(CONF_DLLLIBS)
! 	$(DLLGUILINK) -def:libafsconf.def dnsapi.lib mpr.lib
          $(_VC_MANIFEST_EMBED_DLL)
  	$(DLLPREP)
  	$(COPY) $*.lib $(ILIBDIR)
--- 190,196 ----
      $(DESTDIR)\lib\afs\afsreg.lib
  
  $(CONF_DLLFILE): $(CONFOBJS) $(OUT)\libafsconf.res $(CONF_DLLLIBS)
! 	$(DLLGUILINK) -def:libafsconf.def dnsapi.lib mpr.lib shell32.lib
          $(_VC_MANIFEST_EMBED_DLL)
  	$(DLLPREP)
  	$(COPY) $*.lib $(ILIBDIR)
***************
*** 250,256 ****
  	adsiid.lib \
  	activeds.lib \
  	user32.lib \
!         userenv.lib
  
  $(LOGON_DLLFILE): $(LOGON_DLLOBJS) $(LOGON_DLLLIBS)
  	$(DLLGUILINK) $(LOGONLINKFLAGS) -def:afslogon.def $(LOGON_DLLSDKLIBS)
--- 250,257 ----
  	adsiid.lib \
  	activeds.lib \
  	user32.lib \
!         userenv.lib \
!         shell32.lib
  
  $(LOGON_DLLFILE): $(LOGON_DLLOBJS) $(LOGON_DLLLIBS)
  	$(DLLGUILINK) $(LOGONLINKFLAGS) -def:afslogon.def $(LOGON_DLLSDKLIBS)
***************
*** 358,382 ****
  
  # klog.exe
  $(EXEDIR)\klog.exe: $(OUT)\cklog.obj $(OUT)\klog.res $(EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
  # tokens.exe
  $(EXEDIR)\tokens.exe: $(OUT)\ctokens.obj $(OUT)\tokens.res $(EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
  # unlog.exe
  $(EXEDIR)\unlog.exe: $(OUT)\cunlog.obj $(OUT)\unlog.res $(EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
  # afscpcc.exe
  $(EXEDIR)\afscpcc.exe: $(OUT)\afscpcc.obj $(OUT)\afscpcc.res $(LOGON_DLLLIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib userenv.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
--- 359,383 ----
  
  # klog.exe
  $(EXEDIR)\klog.exe: $(OUT)\cklog.obj $(OUT)\klog.res $(EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
  # tokens.exe
  $(EXEDIR)\tokens.exe: $(OUT)\ctokens.obj $(OUT)\tokens.res $(EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
  # unlog.exe
  $(EXEDIR)\unlog.exe: $(OUT)\cunlog.obj $(OUT)\unlog.res $(EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
  # afscpcc.exe
  $(EXEDIR)\afscpcc.exe: $(OUT)\afscpcc.obj $(OUT)\afscpcc.res $(LOGON_DLLLIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib userenv.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
***************
*** 396,412 ****
          secur32.lib \
          ole32.lib \
          oleaut32.lib \
!         iphlpapi.lib
  
  AFSD_EXELIBS =\
  	$(DESTDIR)\lib\libosi.lib \
- 	$(DESTDIR)\lib\afsrpc.lib \
- 	$(DESTDIR)\lib\afsauthent.lib \
  	$(DESTDIR)\lib\afs\mtafsvldb.lib \
  	$(DESTDIR)\lib\afs\mtafsint.lib \
  	$(DESTDIR)\lib\libafsconf.lib \
  	$(DESTDIR)\lib\afs\afsreg.lib \
- 	$(DESTDIR)\lib\afs\afsutil.lib \
  	$(DESTDIR)\lib\afspthread.lib \
          $(LANAHELPERLIB)
  
--- 397,413 ----
          secur32.lib \
          ole32.lib \
          oleaut32.lib \
!         iphlpapi.lib shell32.lib
  
  AFSD_EXELIBS =\
  	$(DESTDIR)\lib\libosi.lib \
  	$(DESTDIR)\lib\afs\mtafsvldb.lib \
  	$(DESTDIR)\lib\afs\mtafsint.lib \
+ 	$(DESTDIR)\lib\afsrpc.lib \
+ 	$(DESTDIR)\lib\afs\afsutil.lib \
+ 	$(DESTDIR)\lib\afsauthent.lib \
  	$(DESTDIR)\lib\libafsconf.lib \
  	$(DESTDIR)\lib\afs\afsreg.lib \
  	$(DESTDIR)\lib\afspthread.lib \
          $(LANAHELPERLIB)
  
***************
*** 423,446 ****
  
  # fs.exe
  $(EXEDIR)\fs.exe: $(FSOBJS) $(OUT)\fs.res $(EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
  # cmdebug.exe
  $(EXEDIR)\cmdebug.exe: $(CMDBGOBJS) $(OUT)\cmdebug.res $(EXELIBS2)
! 	$(EXECONLINK) $(EXELIBS2) dnsapi.lib mpr.lib iphlpapi.lib rpcrt4.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
  # symlink.exe
  $(EXEDIR)\symlink.exe: $(SLOBJS) $(OUT)\symlink.res  $(EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
  # afsshare.exe
! $(EXEDIR)\afsshare.exe: $(OUT)\afsshare.obj $(OUT)\afsshare.res
  	$(EXECONLINK)
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
--- 424,447 ----
  
  # fs.exe
  $(EXEDIR)\fs.exe: $(FSOBJS) $(OUT)\fs.res $(EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
  # cmdebug.exe
  $(EXEDIR)\cmdebug.exe: $(CMDBGOBJS) $(OUT)\cmdebug.res $(EXELIBS2)
! 	$(EXECONLINK) $(EXELIBS2) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib rpcrt4.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
  # symlink.exe
  $(EXEDIR)\symlink.exe: $(SLOBJS) $(OUT)\symlink.res  $(EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
  # afsshare.exe
! $(EXEDIR)\afsshare.exe: $(OUT)\afsshare.obj $(OUT)\afsshare.res $(EXELIBS)
  	$(EXECONLINK)
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
Index: openafs/src/WINNT/afsd/afsd_init.c
diff -c openafs/src/WINNT/afsd/afsd_init.c:1.79.2.23 openafs/src/WINNT/afsd/afsd_init.c:1.79.2.27
*** openafs/src/WINNT/afsd/afsd_init.c:1.79.2.23	Mon Dec 24 00:24:14 2007
--- openafs/src/WINNT/afsd/afsd_init.c	Fri Feb  1 16:39:40 2008
***************
*** 465,471 ****
              }
              else	/* add a new server without a cell */
              {
!                 tsp = cm_NewServer(&saddr, CM_SERVER_VLDB, NULL); /* refcount = 1 */
                  tsp->ipRank = (USHORT)dwRank;
              }
          }
--- 465,471 ----
              }
              else	/* add a new server without a cell */
              {
!                 tsp = cm_NewServer(&saddr, CM_SERVER_VLDB, NULL, CM_FLAG_NOPROBE); /* refcount = 1 */
                  tsp->ipRank = (USHORT)dwRank;
              }
          }
***************
*** 535,541 ****
              }
              else	/* add a new server without a cell */
              {
!                 tsp = cm_NewServer(&saddr, CM_SERVER_FILE, NULL); /* refcount = 1 */
                  tsp->ipRank = (USHORT)dwRank;
              }
          }
--- 535,541 ----
              }
              else	/* add a new server without a cell */
              {
!                 tsp = cm_NewServer(&saddr, CM_SERVER_FILE, NULL, CM_FLAG_NOPROBE); /* refcount = 1 */
                  tsp->ipRank = (USHORT)dwRank;
              }
          }
***************
*** 1270,1276 ****
                code, cm_freelanceEnabled, (code ? "<none>" : rootCellName));
      if (code != 0 && !cm_freelanceEnabled) 
      {
!         *reasonP = "can't find root cell name in CellServDB";
          return -1;
      }   
      else if (cm_freelanceEnabled)
--- 1270,1276 ----
                code, cm_freelanceEnabled, (code ? "<none>" : rootCellName));
      if (code != 0 && !cm_freelanceEnabled) 
      {
!         *reasonP = "can't find root cell name in " AFS_CELLSERVDB;
          return -1;
      }   
      else if (cm_freelanceEnabled)
***************
*** 1282,1288 ****
          afsi_log("cm_GetCell addr %x", PtrToUlong(cm_data.rootCellp));
          if (cm_data.rootCellp == NULL) 
          {
!             *reasonP = "can't find root cell in afsdcell.ini";
              return -1;
          }
      }
--- 1282,1288 ----
          afsi_log("cm_GetCell addr %x", PtrToUlong(cm_data.rootCellp));
          if (cm_data.rootCellp == NULL) 
          {
!             *reasonP = "can't find root cell in " AFS_CELLSERVDB;
              return -1;
          }
      }
Index: openafs/src/WINNT/afsd/afsd_service.c
diff -c openafs/src/WINNT/afsd/afsd_service.c:1.52.4.21 openafs/src/WINNT/afsd/afsd_service.c:1.52.4.23
*** openafs/src/WINNT/afsd/afsd_service.c:1.52.4.21	Sun Jan  6 01:26:04 2008
--- openafs/src/WINNT/afsd/afsd_service.c	Sat Feb  2 17:27:11 2008
***************
*** 344,350 ****
  		    powerStateSuspended = 1;
  		    if (osVersion.dwMajorVersion >= 6) {
                          cm_SuspendSCache();
! 			smb_StopListeners();
                      }
                      dwRet = NO_ERROR;                       
                      break;                                  
--- 344,350 ----
  		    powerStateSuspended = 1;
  		    if (osVersion.dwMajorVersion >= 6) {
                          cm_SuspendSCache();
! 			smb_StopListeners(0);
                      }
                      dwRet = NO_ERROR;                       
                      break;                                  
***************
*** 353,366 ****
  		    powerStateSuspended = 1;
  		    if (osVersion.dwMajorVersion >= 6) {
                          cm_SuspendSCache();
! 			smb_StopListeners();
                      }
                      dwRet = NO_ERROR;                       
                      break;                                  
                  case PBT_APMRESUMECRITICAL:             
                      afsi_log("SERVICE_CONTROL_APMRESUMECRITICAL"); 
  		    if (osVersion.dwMajorVersion >= 6)
! 			smb_RestartListeners();
                      dwRet = NO_ERROR;                       
                      break;                                  
                  case PBT_APMRESUMESUSPEND:                                                        
--- 353,366 ----
  		    powerStateSuspended = 1;
  		    if (osVersion.dwMajorVersion >= 6) {
                          cm_SuspendSCache();
! 			smb_StopListeners(0);
                      }
                      dwRet = NO_ERROR;                       
                      break;                                  
                  case PBT_APMRESUMECRITICAL:             
                      afsi_log("SERVICE_CONTROL_APMRESUMECRITICAL"); 
  		    if (osVersion.dwMajorVersion >= 6)
! 			smb_RestartListeners(0);
                      dwRet = NO_ERROR;                       
                      break;                                  
                  case PBT_APMRESUMESUSPEND:                                                        
***************
*** 393,400 ****
  		    /* This is the message delivered once all devices are up */
                      afsi_log("SERVICE_CONTROL_APMRESUMEAUTOMATIC"); 
  		    powerStateSuspended = 0;
! 		    if (osVersion.dwMajorVersion >= 6)
! 			smb_RestartListeners();
                      dwRet = NO_ERROR;                       
                      break;                                  
                  default:                                                                          
--- 393,401 ----
  		    /* This is the message delivered once all devices are up */
                      afsi_log("SERVICE_CONTROL_APMRESUMEAUTOMATIC"); 
  		    powerStateSuspended = 0;
! 		    if (osVersion.dwMajorVersion >= 6) {
! 			smb_SetLanAdapterChangeDetected();
!                     }
                      dwRet = NO_ERROR;                       
                      break;                                  
                  default:                                                                          
***************
*** 441,447 ****
  
      dwResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, szKeyName, 0, KEY_QUERY_VALUE, &hKey);
      if (dwResult != ERROR_SUCCESS)
!         return;
  
      while (dwIndex < MAX_DRIVES) {
          dwDriveSize = sizeof(szDriveToMapTo);
--- 442,448 ----
  
      dwResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, szKeyName, 0, KEY_QUERY_VALUE, &hKey);
      if (dwResult != ERROR_SUCCESS)
!         return 0;
  
      while (dwIndex < MAX_DRIVES) {
          dwDriveSize = sizeof(szDriveToMapTo);
Index: openafs/src/WINNT/afsd/afskfw.c
diff -c openafs/src/WINNT/afsd/afskfw.c:1.28.4.12 openafs/src/WINNT/afsd/afskfw.c:1.28.4.15
*** openafs/src/WINNT/afsd/afskfw.c:1.28.4.12	Thu Oct 18 01:21:35 2007
--- openafs/src/WINNT/afsd/afskfw.c	Fri Feb  8 21:32:19 2008
***************
*** 497,502 ****
--- 497,530 ----
          FreeLibrary(hKrb5);
  }
  
+ typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
+ static int IsWow64()
+ {
+     static int init = TRUE;
+     static int bIsWow64 = FALSE;
+ 
+     if (init) {
+         HMODULE hModule;
+         LPFN_ISWOW64PROCESS fnIsWow64Process = NULL;
+ 
+         hModule = GetModuleHandle(TEXT("kernel32"));
+         if (hModule) {
+             fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress(hModule, "IsWow64Process");
+   
+             if (NULL != fnIsWow64Process)
+             {
+                 if (!fnIsWow64Process(GetCurrentProcess(),&bIsWow64))
+                 {
+                     // on error, assume FALSE.
+                     // in other words, do nothing.
+                 }
+             }
+             FreeLibrary(hModule);
+         }
+         init = FALSE;
+     }
+     return bIsWow64;
+ }
  
  int
  KFW_accept_dotted_usernames(void)
***************
*** 506,512 ****
      DWORD value = 1;
  
      code = RegOpenKeyEx(HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY,
!                          0, KEY_QUERY_VALUE, &parmKey);
      if (code == ERROR_SUCCESS) {
          len = sizeof(value);
          code = RegQueryValueEx(parmKey, "AcceptDottedPrincipalNames", NULL, NULL,
--- 534,540 ----
      DWORD value = 1;
  
      code = RegOpenKeyEx(HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY,
!                          0, (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &parmKey);
      if (code == ERROR_SUCCESS) {
          len = sizeof(value);
          code = RegQueryValueEx(parmKey, "AcceptDottedPrincipalNames", NULL, NULL,
***************
*** 515,521 ****
      }
      if (code != ERROR_SUCCESS) {
          code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_OPENAFS_SUBKEY,
!                              0, KEY_QUERY_VALUE, &parmKey);
          if (code == ERROR_SUCCESS) {
              len = sizeof(value);
              code = RegQueryValueEx(parmKey, "AcceptDottedPrincipalNames", NULL, NULL,
--- 543,549 ----
      }
      if (code != ERROR_SUCCESS) {
          code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_OPENAFS_SUBKEY,
!                              0, (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &parmKey);
          if (code == ERROR_SUCCESS) {
              len = sizeof(value);
              code = RegQueryValueEx(parmKey, "AcceptDottedPrincipalNames", NULL, NULL,
***************
*** 535,541 ****
      DWORD use524 = 0;
  
      code = RegOpenKeyEx(HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY,
!                          0, KEY_QUERY_VALUE, &parmKey);
      if (code == ERROR_SUCCESS) {
          len = sizeof(use524);
          code = RegQueryValueEx(parmKey, "Use524", NULL, NULL,
--- 563,569 ----
      DWORD use524 = 0;
  
      code = RegOpenKeyEx(HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY,
!                          0, (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &parmKey);
      if (code == ERROR_SUCCESS) {
          len = sizeof(use524);
          code = RegQueryValueEx(parmKey, "Use524", NULL, NULL,
***************
*** 544,550 ****
      }
      if (code != ERROR_SUCCESS) {
          code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_OPENAFS_SUBKEY,
!                              0, KEY_QUERY_VALUE, &parmKey);
          if (code == ERROR_SUCCESS) {
              len = sizeof(use524);
              code = RegQueryValueEx(parmKey, "Use524", NULL, NULL,
--- 572,578 ----
      }
      if (code != ERROR_SUCCESS) {
          code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_OPENAFS_SUBKEY,
!                              0, (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &parmKey);
          if (code == ERROR_SUCCESS) {
              len = sizeof(use524);
              code = RegQueryValueEx(parmKey, "Use524", NULL, NULL,
***************
*** 563,569 ****
      DWORD enableKFW = 1;
  
      code = RegOpenKeyEx(HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY,
!                          0, KEY_QUERY_VALUE, &parmKey);
      if (code == ERROR_SUCCESS) {
          len = sizeof(enableKFW);
          code = RegQueryValueEx(parmKey, "EnableKFW", NULL, NULL,
--- 591,597 ----
      DWORD enableKFW = 1;
  
      code = RegOpenKeyEx(HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY,
!                          0, (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &parmKey);
      if (code == ERROR_SUCCESS) {
          len = sizeof(enableKFW);
          code = RegQueryValueEx(parmKey, "EnableKFW", NULL, NULL,
***************
*** 573,579 ****
      
      if (code != ERROR_SUCCESS) {
          code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_OPENAFS_SUBKEY,
!                              0, KEY_QUERY_VALUE, &parmKey);
          if (code == ERROR_SUCCESS) {
              len = sizeof(enableKFW);
              code = RegQueryValueEx(parmKey, "EnableKFW", NULL, NULL,
--- 601,607 ----
      
      if (code != ERROR_SUCCESS) {
          code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_OPENAFS_SUBKEY,
!                              0, (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &parmKey);
          if (code == ERROR_SUCCESS) {
              len = sizeof(enableKFW);
              code = RegQueryValueEx(parmKey, "EnableKFW", NULL, NULL,
***************
*** 657,662 ****
--- 685,691 ----
      krb5_principal principal = 0;
      char * pname = NULL;
      const char * ccname = NULL;
+     const char * cctype = NULL;
      krb5_error_code code = 0;
      krb5_error_code cc_code = 0;
      krb5_cc_cursor cur;
***************
*** 676,681 ****
--- 705,713 ----
      ccname = pkrb5_cc_get_name(ctx, cc);
      if (!ccname) goto cleanup;
  
+     cctype = pkrb5_cc_get_type(ctx, cc);
+     if (!cctype) goto cleanup;
+ 
      // Search the existing list to see if we have a match 
      if ( next ) {
          for ( ; next ; next = next->next ) {
***************
*** 690,696 ****
          next->next = princ_cc_data;
          princ_cc_data = next;
          next->principal = _strdup(pname);
!         next->ccache_name = _strdup(ccname);
          next->from_lsa = lsa;
          next->expired = 1;
          next->expiration_time = 0;
--- 722,730 ----
          next->next = princ_cc_data;
          princ_cc_data = next;
          next->principal = _strdup(pname);
!         next->ccache_name = malloc(strlen(ccname) + strlen(cctype) + 2);
!         if (next->ccache_name) 
!             sprintf(next->ccache_name, "%s:%s", cctype, ccname);
          next->from_lsa = lsa;
          next->expired = 1;
          next->expiration_time = 0;
***************
*** 2618,2624 ****
                   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 */
--- 2652,2658 ----
                   struct ktc_token *atoken)
  {
      static char lastcell[MAXCELLCHARS+1] = { 0 };
!     static char confdir[512] = { 0 };
  #ifdef AFS_ID_TO_NAME
      char username_copy[BUFSIZ];
  #endif /* AFS_ID_TO_NAME */
***************
*** 2628,2641 ****
      afs_int32 id;
  #endif /* ALLOW_REGISTER */
  
!     if (confname[0] == '\0') {
!         strncpy(confname, AFSDIR_CLIENT_ETC_DIRPATH, sizeof(confname));
!         confname[sizeof(confname) - 2] = '\0';
!     }
  
      strcpy(lastcell, aserver->cell);
  
!     if (!pr_Initialize (0, confname, aserver->cell)) {
          char sname[PR_MAXNAMELEN];
          strncpy(sname, username, PR_MAXNAMELEN);
          sname[PR_MAXNAMELEN-1] = '\0';    
--- 2662,2673 ----
      afs_int32 id;
  #endif /* ALLOW_REGISTER */
  
!     if (confdir[0] == '\0')
!         cm_GetConfigDir(confdir, sizeof(confdir));
  
      strcpy(lastcell, aserver->cell);
  
!     if (!pr_Initialize (0, confdir, aserver->cell)) {
          char sname[PR_MAXNAMELEN];
          strncpy(sname, username, PR_MAXNAMELEN);
          sname[PR_MAXNAMELEN-1] = '\0';    
***************
*** 2678,2684 ****
              strncpy(aclient->cell, realm_of_user, MAXKTCREALMLEN - 1);
              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();
--- 2710,2716 ----
              strncpy(aclient->cell, realm_of_user, MAXKTCREALMLEN - 1);
              if (status = ktc_SetToken(aserver, atoken, aclient, 0))
                  return status;
!             if (status = pr_Initialize(1L, confdir, aserver->cell))
                  return status;
              status = pr_CreateUser(username, &id);
  	    pr_End();
Index: openafs/src/WINNT/afsd/afskfw.h
diff -c openafs/src/WINNT/afsd/afskfw.h:1.4.4.2 openafs/src/WINNT/afsd/afskfw.h:1.4.4.3
*** openafs/src/WINNT/afsd/afskfw.h:1.4.4.2	Mon Jul 24 10:13:17 2006
--- openafs/src/WINNT/afsd/afskfw.h	Fri Feb  1 16:39:41 2008
***************
*** 37,42 ****
--- 37,43 ----
  #include <afs/stds.h>
  #include <afs/auth.h>
  #include <afs/cellconfig.h>
+ #include <cm_config.h>
  #include <rxkad.h>
  
  #define MAXCELLCHARS   64
Index: openafs/src/WINNT/afsd/afslogon.c
diff -c openafs/src/WINNT/afsd/afslogon.c:1.45.2.12 openafs/src/WINNT/afsd/afslogon.c:1.45.2.13
*** openafs/src/WINNT/afsd/afslogon.c:1.45.2.12	Tue Dec 11 23:25:38 2007
--- openafs/src/WINNT/afsd/afslogon.c	Mon Jan 28 14:51:20 2008
***************
*** 29,34 ****
--- 29,39 ----
  #include "afskfw.h"
  #include "lanahelper.h"
  
+ /* Allocated in Windows Driver Kit */
+ #ifndef WNNC_NET_OPENAFS
+ #define WNNC_NET_OPENAFS     0x00390000
+ #endif
+ 
  #include <WINNT\afsreg.h>
  
  DWORD TraceOption = 0;
***************
*** 217,223 ****
      switch (index) {
      case WNNC_NET_TYPE:
          /* Don't have our own type; use somebody else's. */
!         return WNNC_NET_SUN_PC_NFS;
  
      case WNNC_START:
          /* Say we are already started, even though we might wait after we receive NPLogonNotify */
--- 222,228 ----
      switch (index) {
      case WNNC_NET_TYPE:
          /* Don't have our own type; use somebody else's. */
!         return WNNC_NET_OPENAFS;
  
      case WNNC_START:
          /* Say we are already started, even though we might wait after we receive NPLogonNotify */
Index: openafs/src/WINNT/afsd/afsshare.c
diff -c openafs/src/WINNT/afsd/afsshare.c:1.8 openafs/src/WINNT/afsd/afsshare.c:1.8.4.1
*** openafs/src/WINNT/afsd/afsshare.c:1.8	Sat Nov  5 01:47:46 2005
--- openafs/src/WINNT/afsd/afsshare.c	Fri Feb  8 21:32:19 2008
***************
*** 32,38 ****
                          0,
                          NULL,
                          REG_OPTION_NON_VOLATILE,
!                         KEY_READ|KEY_WRITE,
                          NULL,
                          &hkSubmounts,
                          NULL) == ERROR_SUCCESS) 
--- 32,38 ----
                          0,
                          NULL,
                          REG_OPTION_NON_VOLATILE,
!                         (IsWow64()?KEY_WOW64_64KEY:0)|KEY_READ|KEY_WRITE,
                          NULL,
                          &hkSubmounts,
                          NULL) == ERROR_SUCCESS) 
***************
*** 50,56 ****
                                  0,
                                  NULL,
                                  REG_OPTION_NON_VOLATILE,
!                                 KEY_READ,
                                  NULL,
                                  &hkParameters,
                                  NULL) == ERROR_SUCCESS) 
--- 50,56 ----
                                  0,
                                  NULL,
                                  REG_OPTION_NON_VOLATILE,
!                                 (IsWow64()?KEY_WOW64_64KEY:0)|KEY_READ,
                                  NULL,
                                  &hkParameters,
                                  NULL) == ERROR_SUCCESS) 
Index: openafs/src/WINNT/afsd/cm.h
diff -c openafs/src/WINNT/afsd/cm.h:1.17.2.7 openafs/src/WINNT/afsd/cm.h:1.17.2.11
*** openafs/src/WINNT/afsd/cm.h:1.17.2.7	Sat Dec 22 23:52:58 2007
--- openafs/src/WINNT/afsd/cm.h	Fri Feb  8 21:32:19 2008
***************
*** 14,238 ****
  #define AFS_PTHREAD_ENV 1
  #endif
  #include <rx/rx.h>
- #ifdef DJGPP      /* we need these for vldbentry decl., etc. */
  #include <afs/vldbint.h>
  #include <afs/afsint.h>
- #endif /* DJGPP */
- 
- /* from .xg file */
- /* FIXME: these were "long" but Windows NT wants "int" */
- int VL_GetEntryByID(struct rx_connection *, afs_int32, afs_int32, struct vldbentry *);
- int VL_GetEntryByNameO(struct rx_connection *, char *, struct vldbentry *);
- int VL_ProbeServer(struct rx_connection *);
- int VL_GetEntryBYIDN(struct rx_connection *, afs_int32, afs_int32, struct nvldbentry *);
- int VL_GetEntryByNameN(struct rx_connection *, char *, struct nvldbentry *);
- 
- /* from .xg file */
- int StartRXAFS_FetchData (struct rx_call *,
- 	struct AFSFid *Fid,
- 	afs_int32 Pos, 
- 	afs_int32 Length);
- int EndRXAFS_FetchData (struct rx_call *,
- 	struct AFSFetchStatus *OutStatus, 
- 	struct AFSCallBack *CallBack, 
- 	struct AFSVolSync *Sync);
- 
- int RXAFS_FetchACL(struct rx_connection *,
- 	struct AFSFid *Fid, 
- 	struct AFSOpaque *AccessList, 
- 	struct AFSFetchStatus *OutStatus, 
- 	struct AFSVolSync *Sync);
- 
- int RXAFS_FetchStatus (struct rx_connection *,
- 	struct AFSFid *Fid, 
- 	struct AFSFetchStatus *OutStatus, 
- 	struct AFSCallBack *CallBack, 
- 	struct AFSVolSync *Sync);
- 
- int StartRXAFS_StoreData (struct rx_call *,
- 	struct AFSFid *Fid, 
- 	struct AFSStoreStatus *InStatus, 
- 	afs_uint32 Pos, 
- 	afs_uint32 Length, 
- 	afs_uint32 FileLength);
- 
- int EndRXAFS_StoreData(struct rx_call *,
- 	struct AFSFetchStatus *OutStatus, 
- 	struct AFSVolSync *Sync);
- 
- int StartRXAFS_FetchData64(struct rx_call *z_call,
- 	struct AFSFid * Fid,
- 	afs_int64 Pos,
- 	afs_int64 Length);
- 
- int EndRXAFS_FetchData64(struct rx_call *z_call,
-         struct AFSFetchStatus * OutStatus,
- 	struct AFSCallBack * CallBack,
- 	struct AFSVolSync * Sync);
- 
- afs_int32 SRXAFS_FetchData64(struct rx_call *z_call,
- 	struct AFSFid * Fid,
- 	afs_int64 Pos,
- 	afs_int64 Length,
- 	struct AFSFetchStatus * OutStatus,
- 	struct AFSCallBack * CallBack,
- 	struct AFSVolSync * Sync);
- 
- int StartRXAFS_StoreData64(struct rx_call *z_call,
- 	struct AFSFid * Fid,
- 	struct AFSStoreStatus * InStatus,
- 	afs_uint64 Pos,
- 	afs_uint64 Length,
- 	afs_uint64 FileLength);
- 
- int EndRXAFS_StoreData64(struct rx_call *z_call,
- 	struct AFSFetchStatus * OutStatus,
- 	struct AFSVolSync * Sync);
- 
- afs_int32 SRXAFS_StoreData64(struct rx_call *z_call,
- 	struct AFSFid * Fid,
- 	struct AFSStoreStatus * InStatus,
- 	afs_uint64 Pos,
- 	afs_uint64 Length,
- 	afs_uint64 FileLength,
- 	struct AFSFetchStatus * OutStatus,
- 	struct AFSVolSync * Sync);
- 
- int RXAFS_StoreACL (struct rx_connection *,
- 	struct AFSFid *Fid, 
- 	struct AFSOpaque *AccessList,  
- 	struct AFSFetchStatus *OutStatus, 
- 	struct AFSVolSync *Sync);
- 
- int RXAFS_StoreStatus(struct rx_connection *,
- 	struct AFSFid *Fid, 
- 	struct AFSStoreStatus *InStatus, 
- 	struct AFSFetchStatus *OutStatus, 
- 	struct AFSVolSync *Sync);
- 
- int RXAFS_RemoveFile (struct rx_connection *,
- 	struct AFSFid *DirFid, 
- 	char *namep,
- 	struct AFSFetchStatus *OutStatus, 
- 	struct AFSVolSync *Sync);
- 
- int RXAFS_CreateFile (struct rx_connection *,
- 	struct AFSFid *DirFid, 
- 	char *Name,
- 	struct AFSStoreStatus *InStatus, 
- 	struct AFSFid *OutFid, 
- 	struct AFSFetchStatus *OutFidStatus, 
- 	struct AFSFetchStatus *OutDirStatus, 
- 	struct AFSCallBack *CallBack, 
- 	struct AFSVolSync *Sync);
- 
- int RXAFS_Rename (struct rx_connection *,
- 	struct AFSFid *OldDirFid, 
- 	char *OldName,
- 	struct AFSFid *NewDirFid, 
- 	char *NewName,
- 	struct AFSFetchStatus *OutOldDirStatus, 
- 	struct AFSFetchStatus *OutNewDirStatus, 
- 	struct AFSVolSync *Sync);
- 
- int RXAFS_Symlink (struct rx_connection *,
- 	struct AFSFid *DirFid, 
- 	char *name,
- 	char *LinkContents,
- 	struct AFSStoreStatus *InStatus,
- 	struct AFSFid *OutFid, 
- 	struct AFSFetchStatus *OutFidStatus, 
- 	struct AFSFetchStatus *OutDirStatus, 
- 	struct AFSVolSync *Sync);
- 
- int RXAFS_Link (struct rx_connection *,
- 	struct AFSFid *DirFid, 
- 	char *Name,
- 	struct AFSFid *ExistingFid, 
- 	struct AFSFetchStatus *OutFidStatus, 
- 	struct AFSFetchStatus *OutDirStatus, 
- 	struct AFSVolSync *Sync);
- 
- int RXAFS_MakeDir (struct rx_connection *,
- 	struct AFSFid *DirFid, 
- 	char *name,
- 	struct AFSStoreStatus *InStatus, 
- 	struct AFSFid *OutFid, 
- 	struct AFSFetchStatus *OutFidStatus, 
- 	struct AFSFetchStatus *OutDirStatus, 
- 	struct AFSCallBack *CallBack, 
- 	struct AFSVolSync *Sync);
- 
- int RXAFS_RemoveDir (struct rx_connection *,
- 	struct AFSFid *DirFid, 
- 	char *Name,
- 	struct AFSFetchStatus *OutDirStatus, 
- 	struct AFSVolSync *Sync);
- 
- int RXAFS_GetStatistics (struct rx_connection *,
- 	struct ViceStatistics *Statistics);
- 
- int RXAFS_GiveUpCallBacks (struct rx_connection *,
- 	struct AFSCBFids *Fids_Array,
- 	struct AFSCBs *CallBacks_Array);
- 
- int RXAFS_GetVolumeInfo (struct rx_connection *,
- 	char *VolumeName,
- 	struct VolumeInfo *Volumeinfo);
- 
- int RXAFS_GetVolumeStatus (struct rx_connection *,
- 	afs_int32 Volumeid, 
- 	struct AFSFetchVolumeStatus *Volumestatus, 
- 	char **name,
-         char **offlineMsg,
-         char **motd);
- 
- int RXAFS_SetVolumeStatus (struct rx_connection *,
- 	afs_int32 Volumeid, 
- 	struct AFSStoreVolumeStatus *Volumestatus,
- 	char *name,
- 	char *olm,
- 	char *motd);
- 
- int RXAFS_GetRootVolume (struct rx_connection *,
- 	char **VolumeName);
- 
- int RXAFS_CheckToken (struct rx_connection *,
- 	afs_int32 ViceId,
- 	struct AFSOpaque *token);
- 
- int RXAFS_GetTime (struct rx_connection *,
- 	afs_uint32 *Seconds, 
- 	afs_uint32 *USeconds);
- 
- int RXAFS_BulkStatus (struct rx_connection *,
- 	struct AFSCBFids *FidsArray,
- 	struct AFSBulkStats *StatArray,
- 	struct AFSCBs *CBArray,
- 	struct AFSVolSync *Sync);
- 
- int RXAFS_SetLock (struct rx_connection *,
- 	struct AFSFid *Fid, 
- 	int Type, 
- 	struct AFSVolSync *Sync);
- 
- int RXAFS_ExtendLock (struct rx_connection *,
- 	struct AFSFid *Fid, 
- 	struct AFSVolSync *Sync);
- 
- int RXAFS_ReleaseLock (struct rx_connection *,
- 	struct AFSFid *Fid, 
- 	struct AFSVolSync *Sync);
- 
- /* This interface is to supported the AFS/DFS Protocol Translator */
- int RXAFS_Lookup (struct rx_connection *,
- 	struct AFSFid *DirFid,
- 	char *Name,
- 	struct AFSFid *OutFid,
- 	struct AFSFetchStatus *OutFidStatus,
- 	struct AFSFetchStatus *OutDirStatus,
- 	struct AFSCallBack *CallBack,
- 	struct AFSVolSync *Sync);
  
  #define CM_DEFAULT_CALLBACKPORT         7001
  
--- 14,21 ----
***************
*** 245,250 ****
--- 28,35 ----
  #define CM_FLAG_NOMOUNTCHASE	0x20		/* don't follow mount points */
  #define CM_FLAG_DIRSEARCH	0x40		/* for directory search */
  #define CM_FLAG_CHECKPATH	0x80		/* Path instead of File */
+ #define CM_FLAG_NOPROBE         0x100           /* For use with cm_GetCellxxx - do not probe server status */
+ #define CM_FLAG_DFS_REFERRAL    0x200           /* The request is a DFS Referral - the last char of the lookup name may be missing */
  
  /* error codes */
  #define CM_ERROR_BASE			0x66543200
***************
*** 304,309 ****
--- 89,95 ----
  #define CM_ERROR_INEXACT_MATCH          (CM_ERROR_BASE+54)
  #define CM_ERROR_BPLUS_NOMATCH          (CM_ERROR_BASE+55)
  #define CM_ERROR_EAS_NOT_SUPPORTED      (CM_ERROR_BASE+56)
+ #define CM_ERROR_RANGE_NOT_LOCKED       (CM_ERROR_BASE+57)
  
  /* Used by cm_FollowMountPoint and cm_GetVolumeByName */
  #define RWVOL	0
Index: openafs/src/WINNT/afsd/cm_aclent.c
diff -c openafs/src/WINNT/afsd/cm_aclent.c:1.14.2.2 openafs/src/WINNT/afsd/cm_aclent.c:1.14.2.3
*** openafs/src/WINNT/afsd/cm_aclent.c:1.14.2.2	Thu Oct 25 00:49:00 2007
--- openafs/src/WINNT/afsd/cm_aclent.c	Tue Feb  5 12:11:45 2008
***************
*** 80,86 ****
  
      for (aclp = scp->randomACLp; aclp; aclp = aclp->nextp) {
          if (aclp->userp == userp) {
!             if (aclp->tgtLifetime && aclp->tgtLifetime <= osi_Time()) {
                  /* ticket expired */
                  osi_QRemoveHT((osi_queue_t **) &cm_data.aclLRUp, (osi_queue_t **) &cm_data.aclLRUEndp, &aclp->q);
                  CleanupACLEnt(aclp);
--- 80,86 ----
  
      for (aclp = scp->randomACLp; aclp; aclp = aclp->nextp) {
          if (aclp->userp == userp) {
!             if (aclp->tgtLifetime && aclp->tgtLifetime <= time(NULL)) {
                  /* ticket expired */
                  osi_QRemoveHT((osi_queue_t **) &cm_data.aclLRUp, (osi_queue_t **) &cm_data.aclLRUEndp, &aclp->q);
                  CleanupACLEnt(aclp);
Index: openafs/src/WINNT/afsd/cm_aclent.h
diff -c openafs/src/WINNT/afsd/cm_aclent.h:1.6 openafs/src/WINNT/afsd/cm_aclent.h:1.6.2.1
*** openafs/src/WINNT/afsd/cm_aclent.h:1.6	Sat Apr 22 15:44:28 2006
--- openafs/src/WINNT/afsd/cm_aclent.h	Tue Feb  5 12:11:45 2008
***************
*** 26,32 ****
      struct cm_scache *backp;	/* back ptr to vnode */
      struct cm_user *userp;	/* user whose access is cached */
      afs_uint32 randomAccess;	/* watch for more rights in acl.h */
!     unsigned long tgtLifetime;	/* time this expires */
  } cm_aclent_t;
  
  extern osi_rwlock_t cm_aclLock;
--- 26,32 ----
      struct cm_scache *backp;	/* back ptr to vnode */
      struct cm_user *userp;	/* user whose access is cached */
      afs_uint32 randomAccess;	/* watch for more rights in acl.h */
!     afs_uint32 tgtLifetime;	/* time this expires */
  } cm_aclent_t;
  
  extern osi_rwlock_t cm_aclLock;
Index: openafs/src/WINNT/afsd/cm_callback.c
diff -c openafs/src/WINNT/afsd/cm_callback.c:1.41.4.28 openafs/src/WINNT/afsd/cm_callback.c:1.41.4.33
*** openafs/src/WINNT/afsd/cm_callback.c:1.41.4.28	Wed Dec 26 11:22:19 2007
--- openafs/src/WINNT/afsd/cm_callback.c	Thu Feb  7 16:21:20 2008
***************
*** 361,368 ****
      cm_server_t *tsp = NULL;
      cm_cell_t* cellp = NULL;
  
      MUTEX_ENTER(&callp->lock);
! 
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
--- 361,369 ----
      cm_server_t *tsp = NULL;
      cm_cell_t* cellp = NULL;
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_ENTER(&callp->lock);
! #endif
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
***************
*** 371,377 ****
          if (tsp)
              cellp = tsp->cellp;
  
!         if (cellp)
              osi_Log2(afsd_logp, "SRXAFSCB_CallBack from host 0x%x port %d",
                       ntohl(host),
                       ntohs(port));
--- 372,378 ----
          if (tsp)
              cellp = tsp->cellp;
  
!         if (!cellp)
              osi_Log2(afsd_logp, "SRXAFSCB_CallBack from host 0x%x port %d",
                       ntohl(host),
                       ntohs(port));
***************
*** 395,402 ****
          else
              cm_RevokeCallback(callp, cellp, tfidp);
      }
! 
      MUTEX_EXIT(&callp->lock);
      return 0;
  }
  
--- 396,404 ----
          else
              cm_RevokeCallback(callp, cellp, tfidp);
      }
! #ifdef HOLD_CALL_MUTEX
      MUTEX_EXIT(&callp->lock);
+ #endif
      return 0;
  }
  
***************
*** 436,443 ****
      unsigned long host = 0;
      unsigned short port = 0;
  
      MUTEX_ENTER(&callp->lock);
! 
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
--- 438,446 ----
      unsigned long host = 0;
      unsigned short port = 0;
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_ENTER(&callp->lock);
! #endif
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
***************
*** 518,524 ****
--- 521,529 ----
              cm_PutServer(tsp);
  	} 
      }
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_EXIT(&callp->lock);
+ #endif
      return 0;
  }
  
***************
*** 550,557 ****
      unsigned long host = 0;
      unsigned short port = 0;
  
      MUTEX_ENTER(&callp->lock);
! 
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
--- 555,563 ----
      unsigned long host = 0;
      unsigned short port = 0;
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_ENTER(&callp->lock);
! #endif
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
***************
*** 561,567 ****
--- 567,575 ----
                ntohl(host),
                ntohs(port));
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_EXIT(&callp->lock);
+ #endif
      return 0;
  }
  
***************
*** 656,663 ****
      unsigned long host = 0;
      unsigned short port = 0;
  
      MUTEX_ENTER(&callp->lock);
! 
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
--- 664,672 ----
      unsigned long host = 0;
      unsigned short port = 0;
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_ENTER(&callp->lock);
! #endif
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
***************
*** 700,706 ****
--- 709,717 ----
          code = 0;
      }
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_EXIT(&callp->lock);
+ #endif
      return code;
  }
  
***************
*** 716,723 ****
      unsigned long host = 0;
      unsigned short port = 0;
  
      MUTEX_ENTER(&callp->lock);
! 
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
--- 727,735 ----
      unsigned long host = 0;
      unsigned short port = 0;
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_ENTER(&callp->lock);
! #endif
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
***************
*** 809,815 ****
--- 821,829 ----
    fcnDone:
      lock_ReleaseRead(&cm_scacheLock);
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_EXIT(&callp->lock);
+ #endif
      return (code);
  }
  
***************
*** 825,832 ****
      unsigned long host = 0;
      unsigned short port = 0;
  
      MUTEX_ENTER(&callp->lock);
! 
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
--- 839,847 ----
      unsigned long host = 0;
      unsigned short port = 0;
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_ENTER(&callp->lock);
! #endif
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
***************
*** 923,929 ****
--- 938,946 ----
    fcnDone:
      lock_ReleaseRead(&cm_scacheLock);
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_EXIT(&callp->lock);
+ #endif
      return (code);
  }
  
***************
*** 936,943 ****
      unsigned long host = 0;
      unsigned short port = 0;
  
      MUTEX_ENTER(&callp->lock);
! 
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
--- 953,961 ----
      unsigned long host = 0;
      unsigned short port = 0;
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_ENTER(&callp->lock);
! #endif
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
***************
*** 947,953 ****
--- 965,973 ----
               ntohl(host), ntohs(port));
      *vp = -1;
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_EXIT(&callp->lock);
+ #endif
      return RXGEN_OPCODE;
  }
  
***************
*** 961,968 ****
      unsigned long host = 0;
      unsigned short port = 0;
  
      MUTEX_ENTER(&callp->lock);
! 
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
--- 981,989 ----
      unsigned long host = 0;
      unsigned short port = 0;
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_ENTER(&callp->lock);
! #endif
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
***************
*** 971,977 ****
--- 992,1000 ----
      osi_Log2(afsd_logp, "SRXAFSCB_GetXStats from host 0x%x port %d - not implemented",
               ntohl(host), ntohs(port));
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_EXIT(&callp->lock);
+ #endif
      return RXGEN_OPCODE;
  }
  
***************
*** 999,1006 ****
      unsigned long host = 0;
      unsigned short port = 0;
  
      MUTEX_ENTER(&callp->lock);
! 
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
--- 1022,1030 ----
      unsigned long host = 0;
      unsigned short port = 0;
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_ENTER(&callp->lock);
! #endif
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
***************
*** 1026,1032 ****
--- 1050,1058 ----
              cm_NetMtu[i] : rx_mtu;
      }
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_EXIT(&callp->lock);
+ #endif
      return 0;
  }
  
***************
*** 1036,1042 ****
      char *p = NULL;
  
      if (UuidToString((UUID *)serverUuid, &p) == RPC_S_OK) {
!         osi_Log1(afsd_logp, "SRXAFSCB_InitCallBackState3 %s ->",p);
          RpcStringFree(&p);
      } else
          osi_Log0(afsd_logp, "SRXAFSCB_InitCallBackState3 - no server Uuid ->");
--- 1062,1068 ----
      char *p = NULL;
  
      if (UuidToString((UUID *)serverUuid, &p) == RPC_S_OK) {
!         osi_Log1(afsd_logp, "SRXAFSCB_InitCallBackState3 %s ->",osi_LogSaveString(afsd_logp,p));
          RpcStringFree(&p);
      } else
          osi_Log0(afsd_logp, "SRXAFSCB_InitCallBackState3 - no server Uuid ->");
***************
*** 1055,1062 ****
      char *p,*q;
      int code = 0;
  
      MUTEX_ENTER(&callp->lock);
! 
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
--- 1081,1089 ----
      char *p,*q;
      int code = 0;
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_ENTER(&callp->lock);
! #endif
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
***************
*** 1079,1118 ****
                    ntohl(host),
                    ntohs(port));
  
      MUTEX_EXIT(&callp->lock);
      return code;
  }
  
  /* debug interface */
! int 
! SRXAFSCB_GetCellByNum(struct rx_call *callp, afs_int32 a_cellnum,
!                       char **a_name, serverList *a_hosts)
  {
      afs_int32 sn;
      cm_cell_t * cellp;
      cm_serverRef_t * serverRefp; 
-     struct rx_connection *connp;
-     struct rx_peer *peerp;
-     unsigned long host = 0;
-     unsigned short port = 0;
  
!     MUTEX_ENTER(&callp->lock);
! 
!     if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
!         host = rx_HostOf(peerp);
!         port = rx_PortOf(peerp);
!     }
! 
!     osi_Log3(afsd_logp, "SRXAFSCB_GetCellByNum(%d) from host 0x%x port %d",
!              a_cellnum, ntohl(host), ntohs(port));
! 
!     a_hosts->serverList_val = 0;
!     a_hosts->serverList_len = 0;
! 
!     cellp = cm_FindCellByID(a_cellnum);
      if (!cellp) {
          *a_name = strdup("");
-         MUTEX_EXIT(&callp->lock);
          return 0;
      }
  
--- 1106,1128 ----
                    ntohl(host),
                    ntohs(port));
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_EXIT(&callp->lock);
+ #endif
      return code;
  }
  
  /* debug interface */
! static int 
! GetCellCommon(afs_int32 a_cellnum, char **a_name, serverList *a_hosts)
  {
      afs_int32 sn;
      cm_cell_t * cellp;
      cm_serverRef_t * serverRefp; 
  
!     cellp = cm_FindCellByID(a_cellnum, CM_FLAG_NOPROBE);
      if (!cellp) {
          *a_name = strdup("");
          return 0;
      }
  
***************
*** 1134,1145 ****
      }
  
      lock_ReleaseRead(&cm_serverLock);
-     MUTEX_EXIT(&callp->lock);
      return 0;
  }
  
  /* debug interface */
  int 
  SRXAFSCB_TellMeAboutYourself( struct rx_call *callp, 
                                struct interfaceAddr *addr,
                                Capabilities * capabilities)
--- 1144,1188 ----
      }
  
      lock_ReleaseRead(&cm_serverLock);
      return 0;
  }
  
  /* debug interface */
  int 
+ SRXAFSCB_GetCellByNum(struct rx_call *callp, afs_int32 a_cellnum,
+                       char **a_name, serverList *a_hosts)
+ {
+     struct rx_connection *connp;
+     struct rx_peer *peerp;
+     unsigned long host = 0;
+     unsigned short port = 0;
+     int rc;
+ 
+ #ifdef HOLD_CALL_MUTEX
+     MUTEX_ENTER(&callp->lock);
+ #endif
+     if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
+         host = rx_HostOf(peerp);
+         port = rx_PortOf(peerp);
+     }
+ 
+     osi_Log3(afsd_logp, "SRXAFSCB_GetCellByNum(%d) from host 0x%x port %d",
+              a_cellnum, ntohl(host), ntohs(port));
+ 
+     a_hosts->serverList_val = 0;
+     a_hosts->serverList_len = 0;
+ 
+ 
+     rc = GetCellCommon(a_cellnum, a_name, a_hosts);
+ 
+ #ifdef HOLD_CALL_MUTEX
+     MUTEX_EXIT(&callp->lock);
+ #endif
+     return rc;
+ }
+ 
+ /* debug interface */
+ int 
  SRXAFSCB_TellMeAboutYourself( struct rx_call *callp, 
                                struct interfaceAddr *addr,
                                Capabilities * capabilities)
***************
*** 1158,1165 ****
      unsigned long host = 0;
      unsigned short port = 0;
  
      MUTEX_ENTER(&callp->lock);
! 
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
--- 1201,1209 ----
      unsigned long host = 0;
      unsigned short port = 0;
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_ENTER(&callp->lock);
! #endif
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
***************
*** 1191,1197 ****
--- 1235,1243 ----
      capabilities->Capabilities_len = dataBytes / sizeof(afs_int32);
      capabilities->Capabilities_val = dataBuffP;
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_EXIT(&callp->lock);
+ #endif
      return 0;
  }
  
***************
*** 1228,1235 ****
      unsigned long host = 0;
      unsigned short port = 0;
  
      MUTEX_ENTER(&callp->lock);
! 
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
--- 1274,1282 ----
      unsigned long host = 0;
      unsigned short port = 0;
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_ENTER(&callp->lock);
! #endif
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
***************
*** 1242,1248 ****
--- 1289,1297 ----
      *a_srvr_addr = 0xffffffff;
      *a_srvr_rank = 0xffffffff;
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_EXIT(&callp->lock);
+ #endif
      return 0;
  }
  
***************
*** 1271,1284 ****
  int SRXAFSCB_GetCellServDB(struct rx_call *callp, afs_int32 index, char **a_name, 
                             serverList *a_hosts)
  {
-     char *t_name;
      struct rx_connection *connp;
      struct rx_peer *peerp;
      unsigned long host = 0;
      unsigned short port = 0;
  
      MUTEX_ENTER(&callp->lock);
! 
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
--- 1320,1334 ----
  int SRXAFSCB_GetCellServDB(struct rx_call *callp, afs_int32 index, char **a_name, 
                             serverList *a_hosts)
  {
      struct rx_connection *connp;
      struct rx_peer *peerp;
      unsigned long host = 0;
      unsigned short port = 0;
+     int rc;
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_ENTER(&callp->lock);
! #endif
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
***************
*** 1287,1298 ****
      osi_Log2(afsd_logp, "SRXAFSCB_GetCellServDB from host 0x%x port %d - not implemented",
               ntohl(host), ntohs(port));
  
!     t_name = (char *)malloc(AFSNAMEMAX);
!     t_name[0] = '\0';
!     *a_name = t_name;
!     a_hosts->serverList_len = 0;
! 
!     MUTEX_EXIT(&callp->lock);
      return 0;
  }
  
--- 1337,1350 ----
      osi_Log2(afsd_logp, "SRXAFSCB_GetCellServDB from host 0x%x port %d - not implemented",
               ntohl(host), ntohs(port));
  
! #ifdef AFS_FREELANCE_CLIENT
!     if (cm_freelanceEnabled && index == 0) {
!         rc = GetCellCommon(AFS_FAKE_ROOT_CELL_ID, a_name, a_hosts);
!     } else
! #endif
!     {
!         rc = GetCellCommon(index+1, a_name, a_hosts);
!     }
      return 0;
  }
  
***************
*** 1324,1331 ****
      unsigned long host = 0;
      unsigned short port = 0;
  
      MUTEX_ENTER(&callp->lock);
! 
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
--- 1376,1384 ----
      unsigned long host = 0;
      unsigned short port = 0;
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_ENTER(&callp->lock);
! #endif
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
***************
*** 1343,1349 ****
--- 1396,1404 ----
      }
      *a_name = t_name;
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_EXIT(&callp->lock);
+ #endif
      return 0;
  }
  
***************
*** 1423,1430 ****
      unsigned long host = 0;
      unsigned short port = 0;
  
      MUTEX_ENTER(&callp->lock);
! 
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
--- 1478,1486 ----
      unsigned long host = 0;
      unsigned short port = 0;
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_ENTER(&callp->lock);
! #endif
      if ((connp = rx_ConnectionOf(callp)) && (peerp = rx_PeerOf(connp))) {
          host = rx_HostOf(peerp);
          port = rx_PortOf(peerp);
***************
*** 1452,1458 ****
--- 1508,1516 ----
      config->cacheConfig_val = t_config;
      config->cacheConfig_len = (*configCount)/sizeof(afs_uint32);
  
+ #ifdef HOLD_CALL_MUTEX
      MUTEX_EXIT(&callp->lock);
+ #endif
      return 0;
  }
  
***************
*** 1874,1881 ****
                  lock_ReleaseMutex(&scp->mx);
                  cm_CallbackNotifyChange(scp);
  
-                 cm_ReleaseSCacheNoLock(scp);
                  lock_ObtainWrite(&cm_scacheLock);
              }
          }
      }
--- 1932,1939 ----
                  lock_ReleaseMutex(&scp->mx);
                  cm_CallbackNotifyChange(scp);
  
                  lock_ObtainWrite(&cm_scacheLock);
+                 cm_ReleaseSCacheNoLock(scp);
              }
          }
      }
***************
*** 1911,1919 ****
              lock_ObtainMutex(&tsp->mx);
              if (!(tsp->flags & CM_SERVERFLAG_DOWN)) {
                  tsp->flags |= CM_SERVERFLAG_DOWN;
!                 tsp->downTime = osi_Time();
              }
              cm_ForceNewConnections(tsp);
              /* Now update the volume status */
              for (tsrvp = tsp->vols; tsrvp; tsrvp = tsrvp->nextp) {
                  for (i=0; i<NUM_SERVER_VOLS; i++) {
--- 1969,1978 ----
              lock_ObtainMutex(&tsp->mx);
              if (!(tsp->flags & CM_SERVERFLAG_DOWN)) {
                  tsp->flags |= CM_SERVERFLAG_DOWN;
!                 tsp->downTime = time(NULL);
              }
              cm_ForceNewConnections(tsp);
+ 
              /* Now update the volume status */
              for (tsrvp = tsp->vols; tsrvp; tsrvp = tsrvp->nextp) {
                  for (i=0; i<NUM_SERVER_VOLS; i++) {
***************
*** 1923,1929 ****
                          cm_InitReq(&req);
  
                          code = cm_GetVolumeByID(tsp->cellp, tsrvp->ids[i], cm_rootUserp,
!                                                  &req, CM_GETVOL_FLAG_NO_LRU_UPDATE, &volp);
                          if (code == 0) {    
                              cm_UpdateVolumeStatus(volp, tsrvp->ids[i]);
                              cm_PutVolume(volp);
--- 1982,1988 ----
                          cm_InitReq(&req);
  
                          code = cm_GetVolumeByID(tsp->cellp, tsrvp->ids[i], cm_rootUserp,
!                                                  &req, CM_GETVOL_FLAG_NO_LRU_UPDATE | CM_GETVOL_FLAG_NO_RESET, &volp);
                          if (code == 0) {    
                              cm_UpdateVolumeStatus(volp, tsrvp->ids[i]);
                              cm_PutVolume(volp);
Index: openafs/src/WINNT/afsd/cm_cell.c
diff -c openafs/src/WINNT/afsd/cm_cell.c:1.23.2.9 openafs/src/WINNT/afsd/cm_cell.c:1.23.2.12
*** openafs/src/WINNT/afsd/cm_cell.c:1.23.2.9	Fri Dec 28 02:13:15 2007
--- openafs/src/WINNT/afsd/cm_cell.c	Fri Feb  1 16:39:41 2008
***************
*** 35,42 ****
      cm_server_t *tsp;
      cm_serverRef_t *tsrp;
      cm_cell_t *cellp;
          
!     cellp = rockp;
  
      /* if this server was previously created by fs setserverprefs */
      if ( tsp = cm_FindServer(addrp, CM_SERVER_VLDB))
--- 35,45 ----
      cm_server_t *tsp;
      cm_serverRef_t *tsrp;
      cm_cell_t *cellp;
+     cm_cell_rock_t *cellrockp = (cm_cell_rock_t *)rockp;
+     afs_uint32 probe;
          
!     cellp = cellrockp->cellp;
!     probe = !(cellrockp->flags & CM_FLAG_NOPROBE);
  
      /* if this server was previously created by fs setserverprefs */
      if ( tsp = cm_FindServer(addrp, CM_SERVER_VLDB))
***************
*** 51,57 ****
          }
      }       
      else
!         tsp = cm_NewServer(addrp, CM_SERVER_VLDB, cellp);
  
      /* Insert the vlserver into a sorted list, sorted by server rank */
      tsrp = cm_NewServerRef(tsp, 0);
--- 54,60 ----
          }
      }       
      else
!         tsp = cm_NewServer(addrp, CM_SERVER_VLDB, cellp, probe ? 0 : CM_FLAG_NOPROBE);
  
      /* Insert the vlserver into a sorted list, sorted by server rank */
      tsrp = cm_NewServerRef(tsp, 0);
***************
*** 68,76 ****
   * and check to make sure we have a valid set of volume servers
   * this function must be called with a Write Lock on cm_cellLock
   */
! cm_cell_t *cm_UpdateCell(cm_cell_t * cp)
  {
      long code = 0;
  
      if (cp == NULL)
          return NULL;
--- 71,80 ----
   * and check to make sure we have a valid set of volume servers
   * this function must be called with a Write Lock on cm_cellLock
   */
! static cm_cell_t *cm_UpdateCell(cm_cell_t * cp, afs_uint32 flags)
  {
      long code = 0;
+     cm_cell_rock_t rock;
  
      if (cp == NULL)
          return NULL;
***************
*** 92,104 ****
              cp->vlServersp = NULL;
          }
  
!         code = cm_SearchCellFile(cp->name, NULL, cm_AddCellProc, cp);
  #ifdef AFS_AFSDB_ENV
          if (code) {
              if (cm_dnsEnabled) {
                  int ttl;
  
!                 code = cm_SearchCellByDNS(cp->name, NULL, &ttl, cm_AddCellProc, cp);
                  if (code == 0) {   /* got cell from DNS */
                      cp->flags |= CM_CELLFLAG_DNS;
                      cp->flags &= ~CM_CELLFLAG_VLSERVER_INVALID;
--- 96,110 ----
              cp->vlServersp = NULL;
          }
  
!         rock.cellp = cp;
!         rock.flags = flags;
!         code = cm_SearchCellFile(cp->name, NULL, cm_AddCellProc, &rock);
  #ifdef AFS_AFSDB_ENV
          if (code) {
              if (cm_dnsEnabled) {
                  int ttl;
  
!                 code = cm_SearchCellByDNS(cp->name, NULL, &ttl, cm_AddCellProc, &rock);
                  if (code == 0) {   /* got cell from DNS */
                      cp->flags |= CM_CELLFLAG_DNS;
                      cp->flags &= ~CM_CELLFLAG_VLSERVER_INVALID;
***************
*** 123,129 ****
      return code ? NULL : cp;
  }
  
! /* load up a cell structure from the cell database, afsdcell.ini */
  cm_cell_t *cm_GetCell(char *namep, afs_uint32 flags)
  {
      return cm_GetCell_Gen(namep, NULL, flags);
--- 129,135 ----
      return code ? NULL : cp;
  }
  
! /* load up a cell structure from the cell database, AFS_CELLSERVDB */
  cm_cell_t *cm_GetCell(char *namep, afs_uint32 flags)
  {
      return cm_GetCell_Gen(namep, NULL, flags);
***************
*** 136,141 ****
--- 142,148 ----
      char fullname[200]="";
      int  hasWriteLock = 0;
      afs_uint32 hash;
+     cm_cell_rock_t rock;
  
      if (!strcmp(namep,SMB_IOCTL_FILENAME_NOSLASH))
          return NULL;
***************
*** 162,168 ****
      lock_ReleaseRead(&cm_cellLock);
  
      if (cp) {
!         cm_UpdateCell(cp);
      } else if (flags & CM_FLAG_CREATE) {
          lock_ObtainWrite(&cm_cellLock);
          hasWriteLock = 1;
--- 169,175 ----
      lock_ReleaseRead(&cm_cellLock);
  
      if (cp) {
!         cm_UpdateCell(cp, flags);
      } else if (flags & CM_FLAG_CREATE) {
          lock_ObtainWrite(&cm_cellLock);
          hasWriteLock = 1;
***************
*** 200,206 ****
          memset(cp, 0, sizeof(cm_cell_t));
          cp->magic = CM_CELL_MAGIC;
          
!         code = cm_SearchCellFile(namep, fullname, cm_AddCellProc, cp);
          if (code) {
              osi_Log3(afsd_logp,"in cm_GetCell_gen cm_SearchCellFile(%s) returns code= %d fullname= %s", 
                        osi_LogSaveString(afsd_logp,namep), code, osi_LogSaveString(afsd_logp,fullname));
--- 207,215 ----
          memset(cp, 0, sizeof(cm_cell_t));
          cp->magic = CM_CELL_MAGIC;
          
!         rock.cellp = cp;
!         rock.flags = flags;
!         code = cm_SearchCellFile(namep, fullname, cm_AddCellProc, &rock);
          if (code) {
              osi_Log3(afsd_logp,"in cm_GetCell_gen cm_SearchCellFile(%s) returns code= %d fullname= %s", 
                        osi_LogSaveString(afsd_logp,namep), code, osi_LogSaveString(afsd_logp,fullname));
***************
*** 209,215 ****
              if (cm_dnsEnabled) {
                  int ttl;
  
!                 code = cm_SearchCellByDNS(namep, fullname, &ttl, cm_AddCellProc, cp);
                  if ( code ) {
                      osi_Log3(afsd_logp,"in cm_GetCell_gen cm_SearchCellByDNS(%s) returns code= %d fullname= %s", 
                               osi_LogSaveString(afsd_logp,namep), code, osi_LogSaveString(afsd_logp,fullname));
--- 218,224 ----
              if (cm_dnsEnabled) {
                  int ttl;
  
!                 code = cm_SearchCellByDNS(namep, fullname, &ttl, cm_AddCellProc, &rock);
                  if ( code ) {
                      osi_Log3(afsd_logp,"in cm_GetCell_gen cm_SearchCellByDNS(%s) returns code= %d fullname= %s", 
                               osi_LogSaveString(afsd_logp,namep), code, osi_LogSaveString(afsd_logp,fullname));
***************
*** 288,294 ****
      return cp;
  }
  
! cm_cell_t *cm_FindCellByID(afs_int32 cellID)
  {
      cm_cell_t *cp;
      afs_uint32 hash;
--- 297,303 ----
      return cp;
  }
  
! cm_cell_t *cm_FindCellByID(afs_int32 cellID, afs_uint32 flags)
  {
      cm_cell_t *cp;
      afs_uint32 hash;
***************
*** 304,310 ****
      lock_ReleaseRead(&cm_cellLock);	
  
      if (cp)
!         cm_UpdateCell(cp);
  
      return cp;
  }
--- 313,319 ----
      lock_ReleaseRead(&cm_cellLock);	
  
      if (cp)
!         cm_UpdateCell(cp, flags);
  
      return cp;
  }
Index: openafs/src/WINNT/afsd/cm_cell.h
diff -c openafs/src/WINNT/afsd/cm_cell.h:1.7.6.5 openafs/src/WINNT/afsd/cm_cell.h:1.7.6.7
*** openafs/src/WINNT/afsd/cm_cell.h:1.7.6.5	Wed Jun 27 20:34:26 2007
--- openafs/src/WINNT/afsd/cm_cell.h	Thu Jan 31 00:49:00 2008
***************
*** 36,41 ****
--- 36,47 ----
  #define CM_CELLFLAG_IN_NAMEHASH        0x10
  #define CM_CELLFLAG_IN_IDHASH          0x20
  
+ typedef struct cm_cell_rock {
+     cm_cell_t * cellp;
+     afs_uint32  flags;
+ } cm_cell_rock_t;
+ 
+ 
  #define CM_CELL_NAME_HASH(name)  (SDBMHash(name) % cm_data.cellHashTableSize)
  
  #define CM_CELL_ID_HASH(id)   ((unsigned long) id % cm_data.cellHashTableSize)
***************
*** 50,56 ****
  
  extern cm_cell_t *cm_GetCell_Gen(char *namep, char *newnamep, afs_uint32 flags);
  
! extern cm_cell_t *cm_FindCellByID(afs_int32 cellID);
  
  extern void cm_ChangeRankCellVLServer(cm_server_t *tsp);
  
--- 56,62 ----
  
  extern cm_cell_t *cm_GetCell_Gen(char *namep, char *newnamep, afs_uint32 flags);
  
! extern cm_cell_t *cm_FindCellByID(afs_int32 cellID, afs_uint32 flags);
  
  extern void cm_ChangeRankCellVLServer(cm_server_t *tsp);
  
***************
*** 64,67 ****
--- 70,75 ----
  
  extern void cm_AddCellToIDHashTable(cm_cell_t * cellp);
  
+ extern long cm_AddCellProc(void *rockp, struct sockaddr_in *addrp, char *namep);
+ 
  #endif /* __CELL_H_ENV_ */
Index: openafs/src/WINNT/afsd/cm_config.c
diff -c openafs/src/WINNT/afsd/cm_config.c:1.26.4.1 openafs/src/WINNT/afsd/cm_config.c:1.26.4.3
*** openafs/src/WINNT/afsd/cm_config.c:1.26.4.1	Wed Jun 27 20:34:26 2007
--- openafs/src/WINNT/afsd/cm_config.c	Fri Feb  1 21:48:13 2008
***************
*** 7,19 ****
   * directory or online at http://www.openafs.org/dl/license10.html
   */
  
- #ifndef DJGPP
  #include <windows.h>
  #include <winsock2.h>
- #else
- #include <sys/socket.h>
- #include <netdb.h>
- #endif /* !DJGPP */
  #include <stdlib.h>
  #include <stdio.h>
  #include <string.h>
--- 7,14 ----
***************
*** 31,57 ****
  #include <afs/afsint.h>
  #endif
  
- 
- 
- /* TODO: these should be pulled in from dirpath.h */
- #if !defined(DJGPP) && !defined(AFS_WIN95_ENV)
- #define AFS_THISCELL "ThisCell"
- #endif
- #define AFS_CELLSERVDB_UNIX "CellServDB"
- #define AFS_CELLSERVDB_NT "afsdcell.ini"
- #ifndef AFSDIR_CLIENT_ETC_DIRPATH
- #define AFSDIR_CLIENT_ETC_DIRPATH "c:/afs"
- #endif
- #if defined(DJGPP) || defined(AFS_WIN95_ENV)
- #define AFS_CELLSERVDB AFS_CELLSERVDB_UNIX
- #ifdef DJGPP
- extern char cm_confDir[];
- extern int errno;
- #endif /* DJGPP */
- #else
- #define AFS_CELLSERVDB AFS_CELLSERVDB_UNIX
- #endif /* DJGPP || WIN95 */
- 
  static long cm_ParsePair(char *lineBufferp, char *leftp, char *rightp)
  {
      char *tp;
--- 26,31 ----
***************
*** 152,195 ****
      int foundCell = 0;
      long code;
      int tracking = 1, partial = 0;
- #if defined(DJGPP) || defined(AFS_WIN95_ENV)
-     char *afsconf_path;
-     DWORD dwSize;
- #endif
  
      if ( IsWindowsModule(cellNamep) )
  	return -3;
  
!     cm_GetCellServDB(wdir);
      tfilep = fopen(wdir, "r");
  
! #if defined(DJGPP) || defined(AFS_WIN95_ENV)
!     if (!tfilep) {
!         /* If we are using DJGPP client, cellservdb will be in afsconf dir. */
!         /* If we are in Win95 here, we are linking with klog etc. and are
!         using DJGPP client even though DJGPP is not defined.  So we still
!         need to check AFSCONF for location. */
!         dwSize = GetEnvironmentVariable("AFSCONF", NULL, 0);
!         afsconf_path = malloc(dwSize);
!         dwSize = GetEnvironmentVariable("AFSCONF", afsconf_path, dwSize);
!         if (!afsconf_path)
!             strcpy(wdir, AFSDIR_CLIENT_ETC_DIRPATH);
!         else {
!             strcpy(wdir, afsconf_path);
!             free(afsconf_path);
!         }
!         strcat(wdir, "/");
!         strcat(wdir, AFS_CELLSERVDB);
!         /*fprintf(stderr, "opening cellservdb file %s\n", wdir);*/
!         tfilep = fopen(wdir, "r");
!         if (!tfilep) 
! 	    return -2;
!     }
! #else
!     /* If we are NT or higher, we don't do DJGPP, So just fail */
!     if ( !tfilep )
          return -2;
- #endif
  
      bestp = fopen(wdir, "r");
      
--- 126,140 ----
      int foundCell = 0;
      long code;
      int tracking = 1, partial = 0;
  
      if ( IsWindowsModule(cellNamep) )
  	return -3;
  
!     cm_GetCellServDB(wdir, sizeof(wdir));
      tfilep = fopen(wdir, "r");
  
!     if (!tfilep) 
          return -2;
  
      bestp = fopen(wdir, "r");
      
***************
*** 273,279 ****
              else inRightCell = 0;
          }
          else {
- #if !defined(DJGPP) && !defined(AFS_WIN95_ENV)
              valuep = strchr(lineBuffer, '#');
  	    if (valuep == NULL) {
  		fclose(tfilep);
--- 218,223 ----
***************
*** 289,297 ****
              while (valuep[strlen(valuep) - 1] == ' ' || valuep[strlen(valuep) - 1] == '\t') 
                  valuep[strlen(valuep) - 1] = '\0';
  
- #endif /* !DJGPP */
  	    if (inRightCell) {
- #if !defined(DJGPP) && !defined(AFS_WIN95_ENV)
  		/* add the server to the VLDB list */
                  WSASetLastError(0);
                  thp = gethostbyname(valuep);
--- 233,239 ----
***************
*** 308,316 ****
  			(*procp)(rockp, &vlSockAddr, valuep);
                      foundCell = 1;
  		}
- #else
-                 thp = 0;
- #endif /* !DJGPP */
                  if (!thp) {
                      long ip_addr;
  		    int c1, c2, c3, c4;
--- 250,255 ----
***************
*** 379,527 ****
  #endif /* AFS_AFSDB_ENV */
  }
  
! #if !defined(DJGPP) && !defined(AFS_WIN95_ENV)
! /* look up the CellServDBDir's name in the Registry 
!  * or use the Client Dirpath value to produce a CellServDB 
!  * filename
   */
! long cm_GetCellServDB(char *cellNamep)
  {
- #if !defined(DJGPP)
- 	DWORD code, dummyLen;
- 	HKEY parmKey;
      int tlen;
! 
! 	code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_OPENAFS_SUBKEY,
! 				0, KEY_QUERY_VALUE, &parmKey);
! 	if (code != ERROR_SUCCESS)
!         goto dirpath;
! 
! 	dummyLen = 256;
! 	code = RegQueryValueEx(parmKey, "CellServDBDir", NULL, NULL,
! 				cellNamep, &dummyLen);
! 	RegCloseKey (parmKey);
! 
!   dirpath:
! 	if (code != ERROR_SUCCESS || cellNamep[0] == 0)
!         strcpy(cellNamep, AFSDIR_CLIENT_ETC_DIRPATH);
  
      /* add trailing backslash, if required */
      tlen = (int)strlen(cellNamep);
!     if (cellNamep[tlen-1] != '\\') 
!         strcat(cellNamep, "\\");
! #else
!     strcpy(cellNamep, cm_confDir);
!     strcat(cellNamep,"/");
! #endif /* !DJGPP */
          
!     strcat(cellNamep, AFS_CELLSERVDB);
! 	return 0;
  }
  
  /* look up the root cell's name in the Registry */
  long cm_GetRootCellName(char *cellNamep)
  {
! 	DWORD code, dummyLen;
! 	HKEY parmKey;
  
! 	code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,
! 				0, KEY_QUERY_VALUE, &parmKey);
! 	if (code != ERROR_SUCCESS)
! 		return -1;
  
! 	dummyLen = 256;
! 	code = RegQueryValueEx(parmKey, "Cell", NULL, NULL,
  				cellNamep, &dummyLen);
! 	RegCloseKey (parmKey);
! 	if (code != ERROR_SUCCESS || cellNamep[0] == 0)
! 		return -1;
! 
! 	return 0;
! }
! #else
! /* look up the root cell's name in the THISCELL file */
! long cm_GetRootCellName(char *cellNamep)
! {
!         FILE *thisCell;
!         char thisCellPath[256];
!         char *newline;
!         DWORD dwSize;
! 
! #ifdef DJGPP
!         strcpy(thisCellPath, cm_confDir);
! #else
!         /* Win 95 */
!         char *afsconf_path;
!         dwSize = GetEnvironmentVariable("AFSCONF", NULL, 0);
!         afsconf_path = malloc(dwSize);
!         dwSize = GetEnvironmentVariable("AFSCONF", afsconf_path, dwSize);
!         if (!afsconf_path)
!           strcpy(thisCellPath, AFSDIR_CLIENT_ETC_DIRPATH);
!         else {
!           strcpy(thisCellPath, afsconf_path);
!           free(afsconf_path);
!         }
! #endif
!         strcat(thisCellPath,"/");
! 
!         strcat(thisCellPath, AFS_THISCELL);
!         thisCell = fopen(thisCellPath, "r");
!         if (thisCell == NULL)
!           return -1;
! 
!         fgets(cellNamep, 256, thisCell);
!         fclose(thisCell);
! 
!         newline = strrchr(cellNamep,'\n');
!         if (newline) *newline = '\0';
!         newline = strrchr(cellNamep,'\r');
!         if (newline) *newline = '\0';
  
!         return 0;
  }
- #endif /* !DJGPP */
  
  cm_configFile_t *cm_CommonOpen(char *namep, char *rwp)
  {
      char wdir[256];
-     long tlen;
      FILE *tfilep;
  
! #if !defined(DJGPP) && !defined(AFS_WIN95_ENV)
!     strcpy(wdir, AFSDIR_CLIENT_ETC_DIRPATH);
!         
!     /* add trailing backslash, if required */
!     tlen = (long)(strlen(wdir));
!     if (wdir[tlen-1] != '\\') strcat(wdir, "\\");
! #else
! #ifdef DJGPP
!     strcpy(wdir,cm_confDir);
! #else
!     DWORD dwSize;
!     char *afsconf_path;
!     
!     dwSize = GetEnvironmentVariable("AFSCONF", NULL, 0);
!     afsconf_path = malloc(dwSize);
!     dwSize = GetEnvironmentVariable("AFSCONF", afsconf_path, dwSize);
! 
!     if (!afsconf_path)
! 	strcpy(wdir, AFSDIR_CLIENT_ETC_DIRPATH);
!     else {
! 	strcpy(wdir, afsconf_path);
! 	free(afsconf_path);
!     }
! #endif /* !DJGPP */
!     strcat(wdir,"/");
! #endif /* DJGPP || WIN95 */
  
!     strcat(wdir, namep);
          
      tfilep = fopen(wdir, rwp);
  
      return ((cm_configFile_t *) tfilep);        
  }	
  
- #ifndef DJGPP
  long cm_WriteConfigString(char *labelp, char *valuep)
  {
      DWORD code, dummyDisp;
--- 318,381 ----
  #endif /* AFS_AFSDB_ENV */
  }
  
! /* use cm_GetConfigDir() plus AFS_CELLSERVDB to 
!  * generate the fully qualified name of the CellServDB 
!  * file.
   */
! long cm_GetCellServDB(char *cellNamep, afs_uint32 len)
  {
      int tlen;
!     
!     cm_GetConfigDir(cellNamep, len);
  
      /* add trailing backslash, if required */
      tlen = (int)strlen(cellNamep);
!     if (cellNamep[tlen-1] != '\\') {
!         strncat(cellNamep, "\\", len);
!         cellNamep[len-1] = '\0';
!     }
          
!     strncat(cellNamep, AFS_CELLSERVDB, len);
!     cellNamep[len-1] = '\0';
!     return 0;
  }
  
  /* look up the root cell's name in the Registry */
  long cm_GetRootCellName(char *cellNamep)
  {
!     DWORD code, dummyLen;
!     HKEY parmKey;
  
!     code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,
!                         0, KEY_QUERY_VALUE, &parmKey);
!     if (code != ERROR_SUCCESS)
!         return -1;
  
!     dummyLen = 256;
!     code = RegQueryValueEx(parmKey, "Cell", NULL, NULL,
  				cellNamep, &dummyLen);
!     RegCloseKey (parmKey);
!     if (code != ERROR_SUCCESS || cellNamep[0] == 0)
!         return -1;
  
!     return 0;
  }
  
  cm_configFile_t *cm_CommonOpen(char *namep, char *rwp)
  {
      char wdir[256];
      FILE *tfilep;
  
!     cm_GetConfigDir(wdir, sizeof(wdir));
  
!     strncat(wdir, namep, sizeof(wdir));
!     wdir[sizeof(wdir)-1] = '\0';
          
      tfilep = fopen(wdir, rwp);
  
      return ((cm_configFile_t *) tfilep);        
  }	
  
  long cm_WriteConfigString(char *labelp, char *valuep)
  {
      DWORD code, dummyDisp;
***************
*** 541,707 ****
  
      return (long)0;
  }
- #endif /* !DJGPP */
  
- #ifndef DJGPP
  long cm_WriteConfigInt(char *labelp, long value)
  {
! 	DWORD code, dummyDisp;
! 	HKEY parmKey;
  
! 	code = RegCreateKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,
! 				0, "container", 0, KEY_SET_VALUE, NULL,
! 				&parmKey, &dummyDisp);
! 	if (code != ERROR_SUCCESS)
! 		return -1;
! 
! 	code = RegSetValueEx(parmKey, labelp, 0, REG_DWORD,
! 			     (LPBYTE)&value, sizeof(value));
! 	RegCloseKey (parmKey);
! 	if (code != ERROR_SUCCESS)
! 		return -1;
  
! 	return 0;
  }
- #endif /* !DJGPP */
  
  cm_configFile_t *cm_OpenCellFile(void)
  {
!         cm_configFile_t *cfp;
  
! 	cfp = cm_CommonOpen("afsdcel2.ini", "w");
! 	return cfp;
  }
  
  long cm_AppendPrunedCellList(cm_configFile_t *ofp, char *cellNamep)
  {
! 	cm_configFile_t *tfilep;	/* input file */
!         char *tp;
!         char lineBuffer[256];
!         char *valuep;
!         int inRightCell;
!         int foundCell;
! 
!         tfilep = cm_CommonOpen(AFS_CELLSERVDB, "r");
!         if (!tfilep) return -1;
! 
! 	foundCell = 0;
! 
! 	/* have we seen the cell line for the guy we're looking for? */
! 	inRightCell = 0;
! 	while (1) {
! 	        tp = fgets(lineBuffer, sizeof(lineBuffer), (FILE *)tfilep);
!                 if (tp == NULL) {
! 			if (feof((FILE *)tfilep)) {
! 				/* hit EOF */
! 				fclose((FILE *)tfilep);
! 				return 0;
! 			}
!                 }
!                 
!                 /* turn trailing cr or lf into null */
!                 tp = strchr(lineBuffer, '\r');
!                 if (tp) *tp = 0;
!                 tp = strchr(lineBuffer, '\n');
!                 if (tp) *tp = 0;
                  
! 		/* skip blank lines */
!                 if (lineBuffer[0] == 0) {
! 			fprintf((FILE *)ofp, "%s\n", lineBuffer);
!                 	continue;
! 		}
  
!                 if (lineBuffer[0] == '>') {
! 			/* trim off at white space or '#' chars */
!                         tp = strchr(lineBuffer, ' ');
!                         if (tp) *tp = 0;
!                         tp = strchr(lineBuffer, '\t');
!                         if (tp) *tp = 0;
!                         tp = strchr(lineBuffer, '#');
!                         if (tp) *tp = 0;
! 
! 			/* now see if this is the right cell */
!                 	if (strcmp(lineBuffer+1, cellNamep) == 0) {
! 				/* found the cell we're looking for */
! 	                        inRightCell = 1;
! 			}
!                         else {
!                         	inRightCell = 0;
!                                 fprintf((FILE *)ofp, "%s\n", lineBuffer);
! 			}
!                 }
!                 else {
!                 	valuep = strchr(lineBuffer, '#');
! 			if (valuep == NULL) return -2;
!                         valuep++;	/* skip the "#" */
! 			if (!inRightCell) {
!                                 fprintf((FILE *)ofp, "%s\n", lineBuffer);
!                         }
!                 }	/* a vldb line */
!         }		/* while loop processing all lines */
! }
  
  long cm_AppendNewCell(cm_configFile_t *filep, char *cellNamep)
  {
! 	fprintf((FILE *)filep, ">%s\n", cellNamep);
!         return 0;
  }
  
  long cm_AppendNewCellLine(cm_configFile_t *filep, char *linep)
  {
! 	fprintf((FILE *)filep, "%s\n", linep);
!         return 0;
  }
  
  long cm_CloseCellFile(cm_configFile_t *filep)
  {
!     char wdir[256];
!     char sdir[256];
      long code;
      long closeCode;
!     int tlen;
! #ifdef AFS_WIN95_ENV
!     char *afsconf_path;
!     DWORD dwSize;
! #endif
! 	closeCode = fclose((FILE *)filep);
! 
! #if !defined(DJGPP) && !defined(AFS_WIN95_ENV)
!     strcpy(wdir, AFSDIR_CLIENT_ETC_DIRPATH);
!         
! 	/* add trailing backslash, if required */
!     tlen = (int)strlen(wdir);
!     if (wdir[tlen-1] != '\\') strcat(wdir, "\\");
! #else
! #ifdef DJGPP
!     strcpy(wdir,cm_confDir);
! #else
!     dwSize = GetEnvironmentVariable("AFSCONF", NULL, 0);
!     afsconf_path = malloc(dwSize);
!     dwSize = GetEnvironmentVariable("AFSCONF", afsconf_path, dwSize);
!     if (!afsconf_path)
!         strcpy(wdir, AFSDIR_CLIENT_ETC_DIRPATH);
!     else {
!         strcpy(wdir, afsconf_path);
!         free(afsconf_path);
!     }
! #endif /* !DJGPP */
!     strcat(wdir,"/");
! #endif /* DJGPP || WIN95 */
  
      strcpy(sdir, wdir);
  
! 	if (closeCode != 0) {
! 		/* something went wrong, preserve original database */
!         strcat(wdir, "afsdcel2.ini");
          unlink(wdir);
          return closeCode;
      }
  
!     strcat(wdir, AFS_CELLSERVDB);
!     strcat(sdir, "afsdcel2.ini");	/* new file */
  
!     unlink(wdir);			/* delete old file */
  
      code = rename(sdir, wdir);	/* do the rename */
  
--- 395,535 ----
  
      return (long)0;
  }
  
  long cm_WriteConfigInt(char *labelp, long value)
  {
!     DWORD code, dummyDisp;
!     HKEY parmKey;
  
!     code = RegCreateKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,
!                            0, "container", 0, KEY_SET_VALUE, NULL,
!                            &parmKey, &dummyDisp);
!     if (code != ERROR_SUCCESS)
!         return -1;
  
!     code = RegSetValueEx(parmKey, labelp, 0, REG_DWORD,
!                           (LPBYTE)&value, sizeof(value));
!     RegCloseKey (parmKey);
!     if (code != ERROR_SUCCESS)
!         return -1;
! 
!     return 0;
  }
  
  cm_configFile_t *cm_OpenCellFile(void)
  {
!     cm_configFile_t *cfp;
  
!     cfp = cm_CommonOpen(AFS_CELLSERVDB ".new", "w");
!     return cfp;
  }
  
  long cm_AppendPrunedCellList(cm_configFile_t *ofp, char *cellNamep)
  {
!     cm_configFile_t *tfilep;	/* input file */
!     char *tp;
!     char lineBuffer[256];
!     char *valuep;
!     int inRightCell;
!     int foundCell;
! 
!     tfilep = cm_CommonOpen(AFS_CELLSERVDB, "r");
!     if (!tfilep) 
!         return -1;
! 
!     foundCell = 0;
! 
!     /* have we seen the cell line for the guy we're looking for? */
!     inRightCell = 0;
!     while (1) {
!         tp = fgets(lineBuffer, sizeof(lineBuffer), (FILE *)tfilep);
!         if (tp == NULL) {
!             if (feof((FILE *)tfilep)) {
!                 /* hit EOF */
!                 fclose((FILE *)tfilep);
!                 return 0;
!             }
!         }
! 
!         /* turn trailing cr or lf into null */
!         tp = strchr(lineBuffer, '\r');
!         if (tp) *tp = 0;
!         tp = strchr(lineBuffer, '\n');
!         if (tp) *tp = 0;
                  
!         /* skip blank lines */
!         if (lineBuffer[0] == 0) {
!             fprintf((FILE *)ofp, "%s\n", lineBuffer);
!             continue;
!         }
  
!         if (lineBuffer[0] == '>') {
!             /* trim off at white space or '#' chars */
!             tp = strchr(lineBuffer, ' ');
!             if (tp) *tp = 0;
!             tp = strchr(lineBuffer, '\t');
!             if (tp) *tp = 0;
!             tp = strchr(lineBuffer, '#');
!             if (tp) *tp = 0;
! 
!             /* now see if this is the right cell */
!             if (strcmp(lineBuffer+1, cellNamep) == 0) {
!                 /* found the cell we're looking for */
!                 inRightCell = 1;
!             }
!             else {
!                 inRightCell = 0;
!                 fprintf((FILE *)ofp, "%s\n", lineBuffer);
!             }
!         }
!         else {
!             valuep = strchr(lineBuffer, '#');
!             if (valuep == NULL) return -2;
!             valuep++;	/* skip the "#" */
!             if (!inRightCell) {
!                 fprintf((FILE *)ofp, "%s\n", lineBuffer);
!             }
!         }	/* a vldb line */
!     }		/* while loop processing all lines */
! }       
  
  long cm_AppendNewCell(cm_configFile_t *filep, char *cellNamep)
  {
!     fprintf((FILE *)filep, ">%s\n", cellNamep);
!     return 0;
  }
  
  long cm_AppendNewCellLine(cm_configFile_t *filep, char *linep)
  {
!     fprintf((FILE *)filep, "%s\n", linep);
!     return 0;
  }
  
  long cm_CloseCellFile(cm_configFile_t *filep)
  {
!     char wdir[260];
!     char sdir[260];
      long code;
      long closeCode;
!     closeCode = fclose((FILE *)filep);
  
+     cm_GetConfigDir(wdir, sizeof(wdir));
      strcpy(sdir, wdir);
  
!     if (closeCode != 0) {
!         /* something went wrong, preserve original database */
!         strncat(wdir, AFS_CELLSERVDB ".new", sizeof(wdir));
!         wdir[sizeof(wdir)-1] = '\0';
          unlink(wdir);
          return closeCode;
      }
  
!     strncat(wdir, AFS_CELLSERVDB, sizeof(wdir));
!     wdir[sizeof(wdir)-1] = '\0';
!     strncat(sdir, AFS_CELLSERVDB ".new", sizeof(sdir));/* new file */
!     sdir[sizeof(sdir)-1] = '\0';
  
!     unlink(sdir);			/* delete old file */
  
      code = rename(sdir, wdir);	/* do the rename */
  
***************
*** 711,746 ****
      return code;
  }   
  
! void cm_GetConfigDir(char *dir)
  {
! 	char wdir[256];
!     int tlen;
! #ifdef AFS_WIN95_ENV
!     char *afsconf_path;
!     DWORD dwSize;
! #endif
  
! #if !defined(DJGPP) && !defined(AFS_WIN95_ENV)
!     strcpy(wdir, AFSDIR_CLIENT_ETC_DIRPATH);
!         
! 	/* add trailing backslash, if required */
!     tlen = (int)strlen(wdir);
!     if (wdir[tlen-1] != '\\') strcat(wdir, "\\");
! #else
! #ifdef DJGPP
!     strcpy(wdir,cm_confDir);
! #else
!     dwSize = GetEnvironmentVariable("AFSCONF", NULL, 0);
!     afsconf_path = malloc(dwSize);
!     dwSize = GetEnvironmentVariable("AFSCONF", afsconf_path, dwSize);
!     if (!afsconf_path)
!         strcpy(wdir, AFSDIR_CLIENT_ETC_DIRPATH);
!     else {
!         strcpy(wdir, afsconf_path);
!         free(afsconf_path);
      }
- #endif /* !DJGPP */
-     strcat(wdir,"\\");
- #endif /* DJGPP || WIN95 */
-     strcpy(dir, wdir);
  }
--- 539,553 ----
      return code;
  }   
  
! void cm_GetConfigDir(char *dir, afs_uint32 len)
  {
!     char * dirp = NULL;
  
!     if (!afssw_GetClientCellServDBDir(&dirp)) {
!         strncpy(dir, dirp, len);
!         dir[len-1] = '\0';
!         free(dirp);
!     } else {
!         dir[0] = '\0';
      }
  }
Index: openafs/src/WINNT/afsd/cm_config.h
diff -c openafs/src/WINNT/afsd/cm_config.h:1.8.6.3 openafs/src/WINNT/afsd/cm_config.h:1.8.6.4
*** openafs/src/WINNT/afsd/cm_config.h:1.8.6.3	Fri Dec 28 02:09:11 2007
--- openafs/src/WINNT/afsd/cm_config.h	Fri Feb  1 16:39:41 2008
***************
*** 21,29 ****
  #ifndef __CM_CONFIG_INTERFACES_ONLY__
  
  #include <stdio.h>
- #ifdef DJGPP
- #include <netinet/in.h>
- #endif /* DJGPP */
  
  typedef FILE cm_configFile_t;
  
--- 21,26 ----
***************
*** 51,59 ****
  
  extern long cm_CloseCellFile(cm_configFile_t *filep);
  
! extern long cm_GetCellServDB(char *cellNamep);
  
! extern void cm_GetConfigDir(char *dir);
  
  #endif /* __CM_CONFIG_INTERFACES_ONLY__ */
  
--- 48,61 ----
  
  extern long cm_CloseCellFile(cm_configFile_t *filep);
  
! extern long cm_GetCellServDB(char *cellNamep, afs_uint32 len);
  
! extern void cm_GetConfigDir(char *dir, afs_uint32 len);
! 
! /* TODO: these should be pulled in from dirpath.h */
! #define AFS_THISCELL "ThisCell"
! #define AFS_CELLSERVDB_UNIX "CellServDB"
! #define AFS_CELLSERVDB AFS_CELLSERVDB_UNIX
  
  #endif /* __CM_CONFIG_INTERFACES_ONLY__ */
  
Index: openafs/src/WINNT/afsd/cm_conn.c
diff -c openafs/src/WINNT/afsd/cm_conn.c:1.49.2.25 openafs/src/WINNT/afsd/cm_conn.c:1.49.2.30
*** openafs/src/WINNT/afsd/cm_conn.c:1.49.2.25	Wed Nov 14 12:19:41 2007
--- openafs/src/WINNT/afsd/cm_conn.c	Thu Feb  7 09:48:53 2008
***************
*** 122,128 ****
          return CM_ERROR_INVAL;
      }
  
!     cellp = cm_FindCellByID(fidp->cell);
      if (!cellp) 
          return CM_ERROR_NOSUCHCELL;
  
--- 122,128 ----
          return CM_ERROR_INVAL;
      }
  
!     cellp = cm_FindCellByID(fidp->cell, 0);
      if (!cellp) 
          return CM_ERROR_NOSUCHCELL;
  
***************
*** 226,232 ****
              }
          } 
          if (cellp == NULL && fidp) {
!             cellp = cm_FindCellByID(fidp->cell);
          }
      }
  
--- 226,232 ----
              }
          } 
          if (cellp == NULL && fidp) {
!             cellp = cm_FindCellByID(fidp->cell, 0);
          }
      }
  
***************
*** 278,286 ****
           * background daemon thread as they become available 
           */
          if (timeLeft > 7 && fidp) {
-             cm_volume_t *volp;
-             cm_vol_state_t *statep;
- 
              thrd_Sleep(5000);
  
              code = cm_GetVolumeByID(cellp, fidp->volume, userp, reqp, 
--- 278,283 ----
***************
*** 394,410 ****
                          else if (fidp->volume == volp->bk.ID)
                              statep = &volp->bk;
                      }
-             
-                     cm_PutVolume(volp);
                  }
                  break;
              }
          }
          lock_ReleaseWrite(&cm_serverLock);
          
!         if (statep)
              cm_UpdateVolumeStatus(volp, statep->ID);
!         
          if (free_svr_list) {
              cm_FreeServerList(&serversp, 0);
              *serverspp = serversp;
--- 391,407 ----
                          else if (fidp->volume == volp->bk.ID)
                              statep = &volp->bk;
                      }
                  }
                  break;
              }
          }
          lock_ReleaseWrite(&cm_serverLock);
          
!         if (statep) {
              cm_UpdateVolumeStatus(volp, statep->ID);
!             cm_PutVolume(volp);
!         }
! 
          if (free_svr_list) {
              cm_FreeServerList(&serversp, 0);
              *serverspp = serversp;
***************
*** 480,497 ****
                  free_svr_list = 1;
              }
          }
          for (tsrp = serversp; tsrp; tsrp=tsrp->next) {
              if (tsrp->server == serverp) {
                  /* REDIRECT */
!                 if (errorCode == VNOVOL || errorCode == VMOVED) {
                      tsrp->status = srv_deleted;
!                     if (fidp) {
!                         cm_ForceUpdateVolume(fidp, userp, reqp);
!                     }
!                 } else 
                      tsrp->status = srv_offline;
              }
          }   
          if (free_svr_list) {
              cm_FreeServerList(&serversp, 0);
              *serverspp = serversp;
--- 477,517 ----
                  free_svr_list = 1;
              }
          }
+         lock_ObtainWrite(&cm_serverLock);
          for (tsrp = serversp; tsrp; tsrp=tsrp->next) {
              if (tsrp->server == serverp) {
                  /* REDIRECT */
!                 if (errorCode == VMOVED) {
                      tsrp->status = srv_deleted;
!                 } else {
                      tsrp->status = srv_offline;
+                 }
+ 
+                 if (fidp) { /* File Server query */
+                     code = cm_GetVolumeByID(cellp, fidp->volume, userp, reqp, 
+                                              CM_GETVOL_FLAG_NO_LRU_UPDATE, 
+                                              &volp);
+                     if (code == 0) {
+                         if (fidp->volume == volp->rw.ID)
+                             statep = &volp->rw;
+                         else if (fidp->volume == volp->ro.ID)
+                             statep = &volp->ro;
+                         else if (fidp->volume == volp->bk.ID)
+                             statep = &volp->bk;
+                     }
+                 }   
              }
          }   
+         lock_ReleaseWrite(&cm_serverLock);
+ 
+         if (fidp && errorCode == VMOVED)
+             cm_ForceUpdateVolume(fidp, userp, reqp);
+ 
+         if (statep) {
+             cm_UpdateVolumeStatus(volp, statep->ID);
+             cm_PutVolume(volp);
+         }
+ 
          if (free_svr_list) {
              cm_FreeServerList(&serversp, 0);
              *serverspp = serversp;
***************
*** 563,569 ****
  	if (reqp->flags & CM_REQ_NEW_CONN_FORCED) {
              if (!(serverp->flags & CM_SERVERFLAG_DOWN)) {
                  serverp->flags |= CM_SERVERFLAG_DOWN;
!                 serverp->downTime = osi_Time();
              }
          } else {
  	    reqp->flags |= CM_REQ_NEW_CONN_FORCED;
--- 583,589 ----
  	if (reqp->flags & CM_REQ_NEW_CONN_FORCED) {
              if (!(serverp->flags & CM_SERVERFLAG_DOWN)) {
                  serverp->flags |= CM_SERVERFLAG_DOWN;
!                 serverp->downTime = time(NULL);
              }
          } else {
  	    reqp->flags |= CM_REQ_NEW_CONN_FORCED;
Index: openafs/src/WINNT/afsd/cm_daemon.c
diff -c openafs/src/WINNT/afsd/cm_daemon.c:1.16.4.22 openafs/src/WINNT/afsd/cm_daemon.c:1.16.4.25
*** openafs/src/WINNT/afsd/cm_daemon.c:1.16.4.22	Sat Jan  5 12:56:29 2008
--- openafs/src/WINNT/afsd/cm_daemon.c	Thu Jan 10 18:00:41 2008
***************
*** 50,55 ****
--- 50,56 ----
  
  static int daemon_ShutdownFlag = 0;
  static int cm_nDaemons = 0;
+ static time_t lastIPAddrChange = 0;
  
  static EVENT_HANDLE cm_Daemon_ShutdownEvent = NULL;
  static EVENT_HANDLE cm_IPAddrDaemon_ShutdownEvent = NULL;
***************
*** 74,90 ****
          thrd_SetEvent(cm_IPAddrDaemon_ShutdownEvent);
          Result = NotifyAddrChange(NULL,NULL);
          if (Result == NO_ERROR && daemon_ShutdownFlag == 0) {
!             smb_LanAdapterChange();
              thrd_ResetEvent(cm_IPAddrDaemon_ShutdownEvent);
- 	    Sleep(2500);
-             if (daemon_ShutdownFlag == 0) {
-                 osi_Log0(afsd_logp, "cm_IpAddrDaemon CheckDownServers");
-                 cm_CheckServers(CM_FLAG_CHECKVLDBSERVERS | CM_FLAG_CHECKUPSERVERS | CM_FLAG_CHECKDOWNSERVERS, NULL);
-                 cm_ForceNewConnectionsAllServers();
-                 cm_CheckServers(CM_FLAG_CHECKFILESERVERS | CM_FLAG_CHECKUPSERVERS | CM_FLAG_CHECKDOWNSERVERS, NULL);
-                 smb_CheckVCs();
-                 cm_VolStatus_Network_Addr_Change();
-             }
  	}	
      }
  
--- 75,83 ----
          thrd_SetEvent(cm_IPAddrDaemon_ShutdownEvent);
          Result = NotifyAddrChange(NULL,NULL);
          if (Result == NO_ERROR && daemon_ShutdownFlag == 0) {
!             lastIPAddrChange = osi_Time();
!             smb_SetLanAdapterChangeDetected();
              thrd_ResetEvent(cm_IPAddrDaemon_ShutdownEvent);
  	}	
      }
  
***************
*** 355,360 ****
--- 348,354 ----
      HMODULE hHookDll;
      char * name = "cm_Daemon_ShutdownEvent";
      int configureFirewall = IsWindowsFirewallPresent();
+     int bAddrChangeCheck = 0;
  
      cm_Daemon_ShutdownEvent = thrd_CreateEvent(NULL, FALSE, FALSE, name);
      if ( GetLastError() == ERROR_ALREADY_EXISTS )
***************
*** 401,407 ****
  	/* check to see if the listener threads halted due to network 
  	 * disconnect or other issues.  If so, attempt to restart them.
  	 */
! 	smb_RestartListeners();
  
          if (daemon_ShutdownFlag == 1)
              break;
--- 395,401 ----
  	/* check to see if the listener threads halted due to network 
  	 * disconnect or other issues.  If so, attempt to restart them.
  	 */
! 	smb_RestartListeners(0);
  
          if (daemon_ShutdownFlag == 1)
              break;
***************
*** 429,437 ****
  
          /* find out what time it is */
          now = osi_Time();
  
          /* check down servers */
!         if (now > lastDownServerCheck + cm_daemonCheckDownInterval &&
              daemon_ShutdownFlag == 0) {
              lastDownServerCheck = now;
  	    osi_Log0(afsd_logp, "cm_Daemon CheckDownServers");
--- 423,440 ----
  
          /* find out what time it is */
          now = osi_Time();
+         
+         /* Determine whether an address change took place that we need to respond to */
+         if (bAddrChangeCheck)
+             bAddrChangeCheck = 0;
+ 
+         if (lastIPAddrChange != 0 && lastIPAddrChange + 2500 < now) {
+             bAddrChangeCheck = 1;
+             lastIPAddrChange = 0;
+         }
  
          /* check down servers */
!         if ((bAddrChangeCheck || now > lastDownServerCheck + cm_daemonCheckDownInterval) &&
              daemon_ShutdownFlag == 0) {
              lastDownServerCheck = now;
  	    osi_Log0(afsd_logp, "cm_Daemon CheckDownServers");
***************
*** 441,448 ****
  	    now = osi_Time();
          }
  
          /* check up servers */
!         if (now > lastUpServerCheck + cm_daemonCheckUpInterval &&
              daemon_ShutdownFlag == 0) {
              lastUpServerCheck = now;
  	    osi_Log0(afsd_logp, "cm_Daemon CheckUpServers");
--- 444,454 ----
  	    now = osi_Time();
          }
  
+         if (bAddrChangeCheck)
+             cm_ForceNewConnectionsAllServers();
+ 
          /* check up servers */
!         if ((bAddrChangeCheck || now > lastUpServerCheck + cm_daemonCheckUpInterval) &&
              daemon_ShutdownFlag == 0) {
              lastUpServerCheck = now;
  	    osi_Log0(afsd_logp, "cm_Daemon CheckUpServers");
***************
*** 452,457 ****
--- 458,468 ----
  	    now = osi_Time();
          }
  
+         if (bAddrChangeCheck) {
+             smb_CheckVCs();
+             cm_VolStatus_Network_Addr_Change();
+         }
+ 
          if (now > lastVolCheck + cm_daemonCheckVolInterval &&
              daemon_ShutdownFlag == 0) {
              lastVolCheck = now;
***************
*** 471,477 ****
              now = osi_Time();
          }
  
!         if (now > lastBusyVolCheck + cm_daemonCheckOfflineVolInterval &&
              daemon_ShutdownFlag == 0) {
              lastVolCheck = now;
              cm_CheckOfflineVolumes();
--- 482,488 ----
              now = osi_Time();
          }
  
!         if ((bAddrChangeCheck || now > lastBusyVolCheck + cm_daemonCheckOfflineVolInterval) &&
              daemon_ShutdownFlag == 0) {
              lastVolCheck = now;
              cm_CheckOfflineVolumes();
***************
*** 529,535 ****
          if (daemon_ShutdownFlag == 1) {
              break;
          }
! 	thrd_Sleep(30 * 1000);		/* sleep 30 seconds */
      }
      thrd_SetEvent(cm_Daemon_ShutdownEvent);
  }       
--- 540,546 ----
          if (daemon_ShutdownFlag == 1) {
              break;
          }
! 	thrd_Sleep(10000);		/* sleep 10 seconds */
      }
      thrd_SetEvent(cm_Daemon_ShutdownEvent);
  }       
Index: openafs/src/WINNT/afsd/cm_freelance.c
diff -c openafs/src/WINNT/afsd/cm_freelance.c:1.33.2.4 openafs/src/WINNT/afsd/cm_freelance.c:1.33.2.6
*** openafs/src/WINNT/afsd/cm_freelance.c:1.33.2.4	Sun Nov  4 19:24:46 2007
--- openafs/src/WINNT/afsd/cm_freelance.c	Fri Feb  1 16:39:41 2008
***************
*** 477,483 ****
      char line[512];
      char*t, *t2;
      cm_localMountPoint_t* aLocalMountPoint;
!     char hdir[120];
      long code;
      char rootCellName[256];
  #if !defined(DJGPP)
--- 477,483 ----
      char line[512];
      char*t, *t2;
      cm_localMountPoint_t* aLocalMountPoint;
!     char hdir[260];
      long code;
      char rootCellName[256];
  #if !defined(DJGPP)
***************
*** 686,692 ****
      /* What follows is the old code to read freelance mount points 
       * out of a text file modified to copy the data into the registry
       */
!     cm_GetConfigDir(hdir);
      strcat(hdir, AFS_FREELANCE_INI);
      // open the ini file for reading
      fp = fopen(hdir, "r");
--- 686,692 ----
      /* What follows is the old code to read freelance mount points 
       * out of a text file modified to copy the data into the registry
       */
!     cm_GetConfigDir(hdir, sizeof(hdir));
      strcat(hdir, AFS_FREELANCE_INI);
      // open the ini file for reading
      fp = fopen(hdir, "r");
***************
*** 821,827 ****
  }
  
  #if !defined(DJGPP)
! long cm_FreelanceMountPointExists(char * filename)
  {
      char* cp;
      char line[512];
--- 821,827 ----
  }
  
  #if !defined(DJGPP)
! long cm_FreelanceMountPointExists(char * filename, int prefix_ok)
  {
      char* cp;
      char line[512];
***************
*** 889,894 ****
--- 889,899 ----
                  found = 1;
                  break;
              }
+ 
+             if (prefix_ok && strlen(shortname) - strlen(filename) == 1 && !strncmp(shortname, filename, strlen(filename))) {
+                 found = 1;
+                 break;
+             }
          }
          RegCloseKey(hkFreelance);
      }
***************
*** 898,904 ****
      return found;
  }
  
! long cm_FreelanceSymlinkExists(char * filename)
  {
      char* cp;
      char line[512];
--- 903,909 ----
      return found;
  }
  
! long cm_FreelanceSymlinkExists(char * filename, int prefix_ok)
  {
      char* cp;
      char line[512];
***************
*** 946,951 ****
--- 951,961 ----
                  found = 1;
                  break;
              }
+ 
+             if (prefix_ok && strlen(shortname) - strlen(filename) == 1 && !strncmp(shortname, filename, strlen(filename))) {
+                 found = 1;
+                 break;
+             }
          }
          for ( dwIndex = 0; dwIndex < dwSymlinks; dwIndex++ ) {
              TCHAR szValueName[16];
***************
*** 975,981 ****
  long cm_FreelanceAddMount(char *filename, char *cellname, char *volume, int rw, cm_fid_t *fidp)
  {
      FILE *fp;
!     char hfile[120];
      char line[512];
      char fullname[200];
      int n;
--- 985,991 ----
  long cm_FreelanceAddMount(char *filename, char *cellname, char *volume, int rw, cm_fid_t *fidp)
  {
      FILE *fp;
!     char hfile[260];
      char line[512];
      char fullname[200];
      int n;
***************
*** 1009,1016 ****
      }
  
  #if !defined(DJGPP)
!     if ( cm_FreelanceMountPointExists(filename) ||
!          cm_FreelanceSymlinkExists(filename) )
          return -1;
  #endif
      
--- 1019,1026 ----
      }
  
  #if !defined(DJGPP)
!     if ( cm_FreelanceMountPointExists(filename, 0) ||
!          cm_FreelanceSymlinkExists(filename, 0) )
          return -1;
  #endif
      
***************
*** 1076,1082 ****
      } else 
  #endif
      {
!         cm_GetConfigDir(hfile);
          strcat(hfile, AFS_FREELANCE_INI);
          fp = fopen(hfile, "r+");
          if (!fp)
--- 1086,1092 ----
      } else 
  #endif
      {
!         cm_GetConfigDir(hfile, sizeof(hfile));
          strcat(hfile, AFS_FREELANCE_INI);
          fp = fopen(hfile, "r+");
          if (!fp)
***************
*** 1110,1116 ****
      char* cp;
      char line[512];
      char shortname[200];
!     char hfile[120], hfile2[120];
      FILE *fp1, *fp2;
      int found=0;
  #if !defined(DJGPP)
--- 1120,1126 ----
      char* cp;
      char line[512];
      char shortname[200];
!     char hfile[260], hfile2[260];
      FILE *fp1, *fp2;
      int found=0;
  #if !defined(DJGPP)
***************
*** 1165,1171 ****
      } else 
  #endif
      {
!         cm_GetConfigDir(hfile);
          strcat(hfile, AFS_FREELANCE_INI);
          strcpy(hfile2, hfile);
          strcat(hfile2, "2");
--- 1175,1181 ----
      } else 
  #endif
      {
!         cm_GetConfigDir(hfile, sizeof(hfile));
          strcat(hfile, AFS_FREELANCE_INI);
          strcpy(hfile2, hfile);
          strcat(hfile2, "2");
***************
*** 1246,1253 ****
      }
  
  #if !defined(DJGPP)
!     if ( cm_FreelanceMountPointExists(filename) ||
!          cm_FreelanceSymlinkExists(filename) )
          return CM_ERROR_EXISTS;
  #endif
  
--- 1256,1263 ----
      }
  
  #if !defined(DJGPP)
!     if ( cm_FreelanceMountPointExists(filename, 0) ||
!          cm_FreelanceSymlinkExists(filename, 0) )
          return CM_ERROR_EXISTS;
  #endif
  
Index: openafs/src/WINNT/afsd/cm_freelance.h
diff -c openafs/src/WINNT/afsd/cm_freelance.h:1.12.6.1 openafs/src/WINNT/afsd/cm_freelance.h:1.12.6.2
*** openafs/src/WINNT/afsd/cm_freelance.h:1.12.6.1	Sat Dec 22 22:39:59 2007
--- openafs/src/WINNT/afsd/cm_freelance.h	Mon Jan 28 02:23:35 2008
***************
*** 19,24 ****
--- 19,26 ----
  extern long cm_FreelanceAddMount(char *filename, char *cellname, char *volume, int rw, cm_fid_t *fidp);
  extern long cm_FreelanceRemoveSymlink(char *toremove);
  extern long cm_FreelanceAddSymlink(char *filename, char *destination, cm_fid_t *fidp);
+ extern long cm_FreelanceMountPointExists(char * filename, int prefix_ok);
+ extern long cm_FreelanceSymlinkExists(char * filename, int prefix_ok);
  extern int cm_clearLocalMountPointChange();
  extern int cm_FakeRootFid(cm_fid_t *fidp);
  
Index: openafs/src/WINNT/afsd/cm_ioctl.c
diff -c openafs/src/WINNT/afsd/cm_ioctl.c:1.73.2.29 openafs/src/WINNT/afsd/cm_ioctl.c:1.73.2.35
*** openafs/src/WINNT/afsd/cm_ioctl.c:1.73.2.29	Fri Jan  4 02:58:40 2008
--- openafs/src/WINNT/afsd/cm_ioctl.c	Tue Feb  5 15:49:30 2008
***************
*** 211,218 ****
  /* parse the passed-in file name and do a namei on it.  If we fail,
   * return an error code, otherwise return the vnode located in *scpp.
   */
  long cm_ParseIoctlPath(smb_ioctl_t *ioctlp, cm_user_t *userp, cm_req_t *reqp,
! 	cm_scache_t **scpp)
  {
      long code;
  #ifndef AFSIFS
--- 211,220 ----
  /* parse the passed-in file name and do a namei on it.  If we fail,
   * return an error code, otherwise return the vnode located in *scpp.
   */
+ #define CM_PARSE_FLAG_LITERAL 1
+ 
  long cm_ParseIoctlPath(smb_ioctl_t *ioctlp, cm_user_t *userp, cm_req_t *reqp,
! 	cm_scache_t **scpp, afs_uint32 flags)
  {
      long code;
  #ifndef AFSIFS
***************
*** 221,227 ****
  #endif
      char * relativePath;
      char * lastComponent = NULL;
!     afs_uint32 follow = 0;
  
      relativePath = ioctlp->inDatap;
      /* setup the next data value for the caller to use */
--- 223,229 ----
  #endif
      char * relativePath;
      char * lastComponent = NULL;
!     afs_uint32 follow = (flags & CM_PARSE_FLAG_LITERAL ? CM_FLAG_NOMOUNTCHASE : CM_FLAG_FOLLOW);
  
      relativePath = ioctlp->inDatap;
      /* setup the next data value for the caller to use */
***************
*** 236,245 ****
       *    \\netbios-name\submount\path\.
       *    \\netbios-name\submount\path\file
       */
!     TranslateExtendedChars(relativePath);
  
      /* This is usually nothing, but for StatMountPoint it is the file name. */
!     TranslateExtendedChars(ioctlp->inDatap);
  
  #ifdef AFSIFS
      /* we have passed the whole path, including the afs prefix.
--- 238,253 ----
       *    \\netbios-name\submount\path\.
       *    \\netbios-name\submount\path\file
       */
! 
! 	/* We do not perform path name translation on the ioctl path data 
! 	 * because these paths were not translated by Windows through the
! 	 * file system API.  Therefore, they are not OEM characters but 
! 	 * whatever the display character set is.
! 	 */
!     // TranslateExtendedChars(relativePath);
  
      /* This is usually nothing, but for StatMountPoint it is the file name. */
!     // TranslateExtendedChars(ioctlp->inDatap);
  
  #ifdef AFSIFS
      /* we have passed the whole path, including the afs prefix.
***************
*** 247,253 ****
         and it returns the correct (full) path.  therefore, there is
         no drive letter, and the path is absolute. */
      code = cm_NameI(cm_data.rootSCachep, relativePath,
!                      CM_FLAG_CASEFOLD | follow,
                       userp, "", reqp, scpp);
  
      if (code) {
--- 255,261 ----
         and it returns the correct (full) path.  therefore, there is
         no drive letter, and the path is absolute. */
      code = cm_NameI(cm_data.rootSCachep, relativePath,
!                      CM_FLAG_CASEFOLD,
                       userp, "", reqp, scpp);
  
      if (code) {
***************
*** 300,306 ****
  		code = cm_NameI(substRootp, p, CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
  				 userp, NULL, reqp, &iscp);
  		if (code == 0)
! 		    code = cm_NameI(iscp, lastComponent, CM_FLAG_CASEFOLD | CM_FLAG_NOMOUNTCHASE,
  				    userp, NULL, reqp, scpp);
  		if (iscp)
  		    cm_ReleaseSCache(iscp);
--- 308,314 ----
  		code = cm_NameI(substRootp, p, CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
  				 userp, NULL, reqp, &iscp);
  		if (code == 0)
! 		    code = cm_NameI(iscp, lastComponent, CM_FLAG_CASEFOLD | follow,
  				    userp, NULL, reqp, scpp);
  		if (iscp)
  		    cm_ReleaseSCache(iscp);
***************
*** 347,353 ****
  		code = cm_NameI(substRootp, p, CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
  				 userp, NULL, reqp, &iscp);
  		if (code == 0)
! 		    code = cm_NameI(iscp, lastComponent, CM_FLAG_CASEFOLD | CM_FLAG_NOMOUNTCHASE,
  				    userp, NULL, reqp, scpp);
  		if (iscp)
  		    cm_ReleaseSCache(iscp);
--- 355,361 ----
  		code = cm_NameI(substRootp, p, CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
  				 userp, NULL, reqp, &iscp);
  		if (code == 0)
! 		    code = cm_NameI(iscp, lastComponent, CM_FLAG_CASEFOLD | follow,
  				    userp, NULL, reqp, scpp);
  		if (iscp)
  		    cm_ReleaseSCache(iscp);
***************
*** 379,390 ****
  	    code = cm_NameI(substRootp, relativePath, CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
  			     userp, NULL, reqp, &iscp);
  	    if (code == 0)
! 		code = cm_NameI(iscp, lastComponent, CM_FLAG_CASEFOLD | CM_FLAG_NOMOUNTCHASE,
  				 userp, NULL, reqp, scpp);
  	    if (iscp)
  		cm_ReleaseSCache(iscp);
  	} else {
! 	    code = cm_NameI(substRootp, relativePath, CM_FLAG_CASEFOLD,
  			     userp, NULL, reqp, scpp);
  	}
          if (code) {
--- 387,398 ----
  	    code = cm_NameI(substRootp, relativePath, CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
  			     userp, NULL, reqp, &iscp);
  	    if (code == 0)
! 		code = cm_NameI(iscp, lastComponent, CM_FLAG_CASEFOLD | follow,
  				 userp, NULL, reqp, scpp);
  	    if (iscp)
  		cm_ReleaseSCache(iscp);
  	} else {
! 	    code = cm_NameI(substRootp, relativePath, CM_FLAG_CASEFOLD | follow,
  			     userp, NULL, reqp, scpp);
  	}
          if (code) {
***************
*** 405,416 ****
  
  void cm_SkipIoctlPath(smb_ioctl_t *ioctlp)
  {
!     long temp;
          
!     temp = (long) strlen(ioctlp->inDatap) + 1;
      ioctlp->inDatap += temp;
  }       
  
  
  /* format the specified path to look like "/afs/<cellname>/usr", by
   * adding "/afs" (if necessary) in front, changing any \'s to /'s, and
--- 413,454 ----
  
  void cm_SkipIoctlPath(smb_ioctl_t *ioctlp)
  {
!     size_t temp;
          
!     temp = strlen(ioctlp->inDatap) + 1;
      ioctlp->inDatap += temp;
  }       
  
+ /* 
+  * Must be called before cm_ParseIoctlPath or cm_SkipIoctlPath 
+  */
+ static cm_ioctlQueryOptions_t * 
+ cm_IoctlGetQueryOptions(struct smb_ioctl *ioctlp, struct cm_user *userp)
+ {
+     afs_uint32 pathlen = strlen(ioctlp->inDatap) + 1;
+     char *p = ioctlp->inDatap + pathlen;
+     cm_ioctlQueryOptions_t * optionsp = NULL;
+ 
+     if (ioctlp->inCopied > p - ioctlp->inAllocp) {
+         optionsp = (cm_ioctlQueryOptions_t *)p;
+         if (optionsp->size < 12 /* minimum size of struct */)
+             optionsp = NULL;
+     }
+ 
+     return optionsp;
+ }
+ 
+ /* 
+  * Must be called after cm_ParseIoctlPath or cm_SkipIoctlPath
+  * or any other time that ioctlp->inDatap points at the 
+  * cm_ioctlQueryOptions_t object.
+  */
+ static void
+ cm_IoctlSkipQueryOptions(struct smb_ioctl *ioctlp, struct cm_user *userp)
+ {
+     cm_ioctlQueryOptions_t * optionsp = (cm_ioctlQueryOptions_t *)ioctlp->inDatap;
+     ioctlp->inDatap += optionsp->size;
+ }
  
  /* format the specified path to look like "/afs/<cellname>/usr", by
   * adding "/afs" (if necessary) in front, changing any \'s to /'s, and
***************
*** 576,586 ****
      int tlen;
      cm_req_t req;
      struct rx_connection * callp;
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp);
!     if (code) return code;
  
      /* now make the get acl call */
  #ifdef AFS_FREELANCE_CLIENT
--- 614,637 ----
      int tlen;
      cm_req_t req;
      struct rx_connection * callp;
+     cm_ioctlQueryOptions_t *optionsp;
+     afs_uint32 flags = 0;
  
      cm_InitReq(&req);
  
!     optionsp = cm_IoctlGetQueryOptions(ioctlp, userp);
!     if (optionsp && CM_IOCTL_QOPTS_HAVE_LITERAL(optionsp))
!         flags |= (optionsp->literal ? CM_PARSE_FLAG_LITERAL : 0);
! 
!     if (optionsp && CM_IOCTL_QOPTS_HAVE_FID(optionsp)) {
!         cm_SkipIoctlPath(ioctlp);
! 
!         code = cm_GetSCache(&optionsp->fid, &scp, userp, &req);
!     } else {
!         code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp, flags);
!     }
!     if (code) 
!         return code;
  
      /* now make the get acl call */
  #ifdef AFS_FREELANCE_CLIENT
***************
*** 623,633 ****
      cm_scache_t *scp;
      cm_cell_t *cellp;
      cm_req_t req;
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp);
!     if (code) return code;
  
  #ifdef AFS_FREELANCE_CLIENT
      if ( cm_freelanceEnabled && 
--- 674,696 ----
      cm_scache_t *scp;
      cm_cell_t *cellp;
      cm_req_t req;
+     cm_ioctlQueryOptions_t *optionsp;
+     afs_uint32 flags = 0;
  
      cm_InitReq(&req);
  
!     optionsp = cm_IoctlGetQueryOptions(ioctlp, userp);
!     if (optionsp && CM_IOCTL_QOPTS_HAVE_LITERAL(optionsp))
!         flags |= (optionsp->literal ? CM_PARSE_FLAG_LITERAL : 0);
! 
!     if (optionsp && CM_IOCTL_QOPTS_HAVE_FID(optionsp)) {
!         cm_SkipIoctlPath(ioctlp);
!         code = cm_GetSCache(&optionsp->fid, &scp, userp, &req);
!     } else {
!         code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp, flags);
!     }
!     if (code) 
!         return code;
  
  #ifdef AFS_FREELANCE_CLIENT
      if ( cm_freelanceEnabled && 
***************
*** 640,646 ****
      } else 
  #endif /* AFS_FREELANCE_CLIENT */
      {
!         cellp = cm_FindCellByID(scp->fid.cell);
          if (cellp) {
              StringCbCopyA(ioctlp->outDatap, SMB_IOCTL_MAXDATA - (ioctlp->outDatap - ioctlp->outAllocp), cellp->name);
              ioctlp->outDatap += strlen(ioctlp->outDatap) + 1;
--- 703,709 ----
      } else 
  #endif /* AFS_FREELANCE_CLIENT */
      {
!         cellp = cm_FindCellByID(scp->fid.cell, CM_FLAG_NOPROBE);
          if (cellp) {
              StringCbCopyA(ioctlp->outDatap, SMB_IOCTL_MAXDATA - (ioctlp->outDatap - ioctlp->outAllocp), cellp->name);
              ioctlp->outDatap += strlen(ioctlp->outDatap) + 1;
***************
*** 668,674 ****
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp);
      if (code) return code;
  	
  #ifdef AFS_FREELANCE_CLIENT
--- 731,737 ----
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp, 0);
      if (code) return code;
  	
  #ifdef AFS_FREELANCE_CLIENT
***************
*** 715,720 ****
--- 778,785 ----
  
      cm_InitReq(&req);
  
+     cm_SkipIoctlPath(ioctlp);	/* we don't care about the path */
+ 
      lock_ObtainWrite(&cm_scacheLock);
      for (i=0; i<cm_data.scacheHashTableSize; i++) {
          for (scp = cm_data.scacheHashTablep[i]; scp; scp = scp->nextp) {
***************
*** 739,750 ****
      unsigned long volume;
      unsigned long cell;
      cm_req_t req;
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp);
!     if (code) return code;
!         
  #ifdef AFS_FREELANCE_CLIENT
      if ( scp->fid.cell == AFS_FAKE_ROOT_CELL_ID && scp->fid.volume == AFS_FAKE_ROOT_VOL_ID ) {
  	code = CM_ERROR_NOACCESS;
--- 804,827 ----
      unsigned long volume;
      unsigned long cell;
      cm_req_t req;
+     cm_ioctlQueryOptions_t *optionsp;
+     afs_uint32 flags = 0;
  
      cm_InitReq(&req);
  
!     optionsp = cm_IoctlGetQueryOptions(ioctlp, userp);
!     if (optionsp && CM_IOCTL_QOPTS_HAVE_LITERAL(optionsp))
!         flags |= (optionsp->literal ? CM_PARSE_FLAG_LITERAL : 0);
! 
!     if (optionsp && CM_IOCTL_QOPTS_HAVE_FID(optionsp)) {
!         cm_SkipIoctlPath(ioctlp);
!         code = cm_GetSCache(&optionsp->fid, &scp, userp, &req);
!     } else {
!         code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp, flags);
!     }
!     if (code) 
!         return code;
! 
  #ifdef AFS_FREELANCE_CLIENT
      if ( scp->fid.cell == AFS_FAKE_ROOT_CELL_ID && scp->fid.volume == AFS_FAKE_ROOT_VOL_ID ) {
  	code = CM_ERROR_NOACCESS;
***************
*** 765,776 ****
      long code;
      cm_scache_t *scp;
      cm_req_t req;
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp);
!     if (code) return code;
!         
  #ifdef AFS_FREELANCE_CLIENT
      if ( scp->fid.cell == AFS_FAKE_ROOT_CELL_ID && scp->fid.volume == AFS_FAKE_ROOT_VOL_ID ) {
  	code = CM_ERROR_NOACCESS;
--- 842,865 ----
      long code;
      cm_scache_t *scp;
      cm_req_t req;
+     cm_ioctlQueryOptions_t *optionsp;
+     afs_uint32 flags = 0;
  
      cm_InitReq(&req);
  
!     optionsp = cm_IoctlGetQueryOptions(ioctlp, userp);
!     if (optionsp && CM_IOCTL_QOPTS_HAVE_LITERAL(optionsp))
!         flags |= (optionsp->literal ? CM_PARSE_FLAG_LITERAL : 0);
! 
!     if (optionsp && CM_IOCTL_QOPTS_HAVE_FID(optionsp)) {
!         cm_SkipIoctlPath(ioctlp);
!         code = cm_GetSCache(&optionsp->fid, &scp, userp, &req);
!     } else {
!         code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp, flags);
!     }
!     if (code) 
!         return code;
! 
  #ifdef AFS_FREELANCE_CLIENT
      if ( scp->fid.cell == AFS_FAKE_ROOT_CELL_ID && scp->fid.volume == AFS_FAKE_ROOT_VOL_ID ) {
  	code = CM_ERROR_NOACCESS;
***************
*** 802,808 ****
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp);
      if (code) return code;
  
  #ifdef AFS_FREELANCE_CLIENT
--- 891,897 ----
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp, 0);
      if (code) return code;
  
  #ifdef AFS_FREELANCE_CLIENT
***************
*** 811,817 ****
      } else
  #endif
      {
!         cellp = cm_FindCellByID(scp->fid.cell);
          osi_assertx(cellp, "null cm_cell_t");
  
          if (scp->flags & CM_SCACHEFLAG_RO) {
--- 900,906 ----
      } else
  #endif
      {
!         cellp = cm_FindCellByID(scp->fid.cell, 0);
          osi_assertx(cellp, "null cm_cell_t");
  
          if (scp->flags & CM_SCACHEFLAG_RO) {
***************
*** 900,910 ****
      char *MOTD;
      cm_req_t req;
      struct rx_connection * callp;
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp);
!     if (code) return code;
  
  #ifdef AFS_FREELANCE_CLIENT
      if ( scp->fid.cell == AFS_FAKE_ROOT_CELL_ID && scp->fid.volume == AFS_FAKE_ROOT_VOL_ID ) {
--- 989,1011 ----
      char *MOTD;
      cm_req_t req;
      struct rx_connection * callp;
+     cm_ioctlQueryOptions_t *optionsp;
+     afs_uint32 flags = 0;
  
      cm_InitReq(&req);
  
!     optionsp = cm_IoctlGetQueryOptions(ioctlp, userp);
!     if (optionsp && CM_IOCTL_QOPTS_HAVE_LITERAL(optionsp))
!         flags |= (optionsp->literal ? CM_PARSE_FLAG_LITERAL : 0);
! 
!     if (optionsp && CM_IOCTL_QOPTS_HAVE_FID(optionsp)) {
!         cm_SkipIoctlPath(ioctlp);
!         code = cm_GetSCache(&optionsp->fid, &scp, userp, &req);
!     } else {
!         code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp, flags);
!     }
!     if (code) 
!         return code;
  
  #ifdef AFS_FREELANCE_CLIENT
      if ( scp->fid.cell == AFS_FAKE_ROOT_CELL_ID && scp->fid.volume == AFS_FAKE_ROOT_VOL_ID ) {
***************
*** 963,975 ****
      register char *cp;
      cm_fid_t fid;
      cm_req_t req;
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp);
      if (code) return code;
  
      memset(&fid, 0, sizeof(cm_fid_t));
      fid.volume = scp->fid.volume;
      fid.vnode  = scp->fid.vnode;
      fid.unique = scp->fid.unique;
--- 1064,1083 ----
      register char *cp;
      cm_fid_t fid;
      cm_req_t req;
+     cm_ioctlQueryOptions_t * optionsp;
+     afs_uint32 flags = 0;
  
      cm_InitReq(&req);
  
!     optionsp = cm_IoctlGetQueryOptions(ioctlp, userp);
!     if (optionsp && CM_IOCTL_QOPTS_HAVE_LITERAL(optionsp))
!         flags |= (optionsp->literal ? CM_PARSE_FLAG_LITERAL : 0);
! 
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp, flags);
      if (code) return code;
  
      memset(&fid, 0, sizeof(cm_fid_t));
+     fid.cell   = scp->fid.cell;
      fid.volume = scp->fid.volume;
      fid.vnode  = scp->fid.vnode;
      fid.unique = scp->fid.unique;
***************
*** 987,1003 ****
      return 0;
  }
  
  long cm_IoctlGetOwner(struct smb_ioctl *ioctlp, struct cm_user *userp)
  {
      cm_scache_t *scp;
      register long code;
      register char *cp;
      cm_req_t req;
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp);
!     if (code) return code;
  
      /* Copy all this junk into msg->im_data, keeping track of the lengths. */
      cp = ioctlp->outDatap;
--- 1095,1162 ----
      return 0;
  }
  
+ long cm_IoctlGetFileType(struct smb_ioctl *ioctlp, struct cm_user *userp)
+ {
+     cm_scache_t *scp;
+     register long code;
+     register char *cp;
+     afs_uint32 fileType = 0;
+     cm_req_t req;
+     cm_ioctlQueryOptions_t * optionsp;
+     afs_uint32 flags = 0;
+ 
+     cm_InitReq(&req);
+ 
+     optionsp = cm_IoctlGetQueryOptions(ioctlp, userp);
+     if (optionsp && CM_IOCTL_QOPTS_HAVE_LITERAL(optionsp))
+         flags |= (optionsp->literal ? CM_PARSE_FLAG_LITERAL : 0);
+ 
+     if (optionsp && CM_IOCTL_QOPTS_HAVE_FID(optionsp)) {
+         cm_SkipIoctlPath(ioctlp);
+         code = cm_GetSCache(&optionsp->fid, &scp, userp, &req);
+     } else {
+         code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp, flags);
+     }
+     if (code) 
+         return code;
+ 
+     fileType = scp->fileType;
+     cm_ReleaseSCache(scp);
+ 
+     /* Copy all this junk into msg->im_data, keeping track of the lengths. */
+     cp = ioctlp->outDatap;
+     memcpy(cp, (char *)&fileType, sizeof(fileType));
+     cp += sizeof(fileType);
+ 
+     /* return new size */
+     ioctlp->outDatap = cp;
+ 
+     return 0;
+ }
+ 
  long cm_IoctlGetOwner(struct smb_ioctl *ioctlp, struct cm_user *userp)
  {
      cm_scache_t *scp;
      register long code;
      register char *cp;
      cm_req_t req;
+     cm_ioctlQueryOptions_t *optionsp;
+     afs_uint32 flags = 0;
  
      cm_InitReq(&req);
  
!     optionsp = cm_IoctlGetQueryOptions(ioctlp, userp);
!     if (optionsp && CM_IOCTL_QOPTS_HAVE_LITERAL(optionsp))
!         flags |= (optionsp->literal ? CM_PARSE_FLAG_LITERAL : 0);
! 
!     if (optionsp && CM_IOCTL_QOPTS_HAVE_FID(optionsp)) {
!         cm_SkipIoctlPath(ioctlp);
!         code = cm_GetSCache(&optionsp->fid, &scp, userp, &req);
!     } else {
!         code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp, flags);
!     }
!     if (code) 
!         return code;
  
      /* Copy all this junk into msg->im_data, keeping track of the lengths. */
      cp = ioctlp->outDatap;
***************
*** 1025,1070 ****
      unsigned long volume;
      char *cp;
      cm_req_t req;
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp);
!     if (code) return code;
!         
      volume = scp->fid.volume;
  
!     cellp = cm_FindCellByID(scp->fid.cell);
  
      cm_ReleaseSCache(scp);
  
      if (!cellp)
  	return CM_ERROR_NOSUCHCELL;
  
!     code = cm_GetVolumeByID(cellp, volume, userp, &req, CM_GETVOL_FLAG_CREATE, &tvp);
!     if (code) 
!         return code;
  	
!     cp = ioctlp->outDatap;
          
!     lock_ObtainMutex(&tvp->mx);
!     tsrpp = cm_GetVolServers(tvp, volume);
!     lock_ObtainRead(&cm_serverLock);
!     for (current = *tsrpp; current; current = current->next) {
!         tsp = current->server;
!         memcpy(cp, (char *)&tsp->addr.sin_addr.s_addr, sizeof(long));
!         cp += sizeof(long);
!     }
!     lock_ReleaseRead(&cm_serverLock);
!     cm_FreeServerList(tsrpp, 0);
!     lock_ReleaseMutex(&tvp->mx);
  
!     /* still room for terminating NULL, add it on */
!     volume = 0;	/* reuse vbl */
!     memcpy(cp, (char *)&volume, sizeof(long));
!     cp += sizeof(long);
  
!     ioctlp->outDatap = cp;
!     cm_PutVolume(tvp);
      return 0;
  }       
  
--- 1184,1265 ----
      unsigned long volume;
      char *cp;
      cm_req_t req;
+     cm_ioctlQueryOptions_t *optionsp;
+     afs_uint32 flags = 0;
  
      cm_InitReq(&req);
  
!     optionsp = cm_IoctlGetQueryOptions(ioctlp, userp);
!     if (optionsp && CM_IOCTL_QOPTS_HAVE_LITERAL(optionsp))
!         flags |= (optionsp->literal ? CM_PARSE_FLAG_LITERAL : 0);
! 
!     if (optionsp && CM_IOCTL_QOPTS_HAVE_FID(optionsp)) {
!         cm_SkipIoctlPath(ioctlp);
!         code = cm_GetSCache(&optionsp->fid, &scp, userp, &req);
!     } else {
!         code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp, flags);
!     }
!     if (code) 
!         return code;
! 
      volume = scp->fid.volume;
  
!     cellp = cm_FindCellByID(scp->fid.cell, 0);
  
      cm_ReleaseSCache(scp);
  
      if (!cellp)
  	return CM_ERROR_NOSUCHCELL;
  
! #ifdef AFS_FREELANCE_CLIENT
!     if ( cellp->cellID == AFS_FAKE_ROOT_CELL_ID) {
!         struct in_addr addr;
! 
!         addr.s_net = 127;
!         addr.s_host = 0;
!         addr.s_lh = 0;
!         addr.s_impno = 1;
! 
!         cp = ioctlp->outDatap;
!         
!         memcpy(cp, (char *)&addr, sizeof(addr));
!         cp += sizeof(addr);
! 
!         /* still room for terminating NULL, add it on */
!         addr.s_addr = 0;
!         memcpy(cp, (char *)&addr, sizeof(addr));
!         cp += sizeof(addr);
! 
!         ioctlp->outDatap = cp;
!     } else 
! #endif
!     {
!         code = cm_GetVolumeByID(cellp, volume, userp, &req, CM_GETVOL_FLAG_CREATE, &tvp);
!         if (code) 
!             return code;
  	
!         cp = ioctlp->outDatap;
          
!         lock_ObtainMutex(&tvp->mx);
!         tsrpp = cm_GetVolServers(tvp, volume);
!         lock_ObtainRead(&cm_serverLock);
!         for (current = *tsrpp; current; current = current->next) {
!             tsp = current->server;
!             memcpy(cp, (char *)&tsp->addr.sin_addr.s_addr, sizeof(long));
!             cp += sizeof(long);
!         }
!         lock_ReleaseRead(&cm_serverLock);
!         cm_FreeServerList(tsrpp, 0);
!         lock_ReleaseMutex(&tvp->mx);
  
!         /* still room for terminating NULL, add it on */
!         volume = 0;	/* reuse vbl */
!         memcpy(cp, (char *)&volume, sizeof(long));
!         cp += sizeof(long);
  
!         ioctlp->outDatap = cp;
!         cm_PutVolume(tvp);
!     }
      return 0;
  }       
  
***************
*** 1078,1084 ****
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &dscp);
      if (code) return code;
  
      cp = ioctlp->inDatap;
--- 1273,1279 ----
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &dscp, 0);
      if (code) return code;
  
      cp = ioctlp->inDatap;
***************
*** 1119,1125 ****
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &dscp);
      if (code) return code;
  
      cp = ioctlp->inDatap;
--- 1314,1320 ----
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &dscp, 0);
      if (code) return code;
  
      cp = ioctlp->inDatap;
***************
*** 1214,1227 ****
       */
      if (haveCell) {
          /* have cell name, too */
!         cellp = cm_GetCell(cp, 0);
          if (!cellp) 
              return CM_ERROR_NOSUCHCELL;
      }
      else cellp = (cm_cell_t *) 0;
      if (!cellp && (temp & 2)) {
          /* use local cell */
!         cellp = cm_FindCellByID(1);
      }
      if (!(temp & 1)) {	/* if not fast, call server checker routine */
          /* check down servers */
--- 1409,1422 ----
       */
      if (haveCell) {
          /* have cell name, too */
!         cellp = cm_GetCell(cp, (temp & 1) ? CM_FLAG_NOPROBE : 0);
          if (!cellp) 
              return CM_ERROR_NOSUCHCELL;
      }
      else cellp = (cm_cell_t *) 0;
      if (!cellp && (temp & 2)) {
          /* use local cell */
!         cellp = cm_FindCellByID(1, 0);
      }
      if (!(temp & 1)) {	/* if not fast, call server checker routine */
          /* check down servers */
***************
*** 1403,1410 ****
          return CM_ERROR_NOMORETOKENS;	/* mapped to EDOM */
  }
  
- extern long cm_AddCellProc(void *rockp, struct sockaddr_in *addrp, char *namep);
- 
  long cm_IoctlNewCell(struct smb_ioctl *ioctlp, struct cm_user *userp)
  {
      /* NT cache manager will read cell information from CellServDB each time
--- 1598,1603 ----
***************
*** 1417,1422 ****
--- 1610,1617 ----
       */  
    
      cm_cell_t *cp;
+     cm_cell_rock_t rock;
+ 
    
      cm_SkipIoctlPath(ioctlp);
      lock_ObtainWrite(&cm_cellLock);
***************
*** 1428,1439 ****
          /* delete all previous server lists - cm_FreeServerList will ask for write on cm_ServerLock*/
          cm_FreeServerList(&cp->vlServersp, CM_FREESERVERLIST_DELETE);
          cp->vlServersp = NULL;
!         code = cm_SearchCellFile(cp->name, cp->name, cm_AddCellProc, cp);
  #ifdef AFS_AFSDB_ENV
          if (code) {
              if (cm_dnsEnabled) {
                  int ttl;
!                 code = cm_SearchCellByDNS(cp->name, cp->name, &ttl, cm_AddCellProc, cp);
                  if ( code == 0 ) { /* got cell from DNS */
                      cp->flags |= CM_CELLFLAG_DNS;
                      cp->flags &= ~CM_CELLFLAG_VLSERVER_INVALID;
--- 1623,1636 ----
          /* delete all previous server lists - cm_FreeServerList will ask for write on cm_ServerLock*/
          cm_FreeServerList(&cp->vlServersp, CM_FREESERVERLIST_DELETE);
          cp->vlServersp = NULL;
!         rock.cellp = cp;
!         rock.flags = 0;
!         code = cm_SearchCellFile(cp->name, cp->name, cm_AddCellProc, &rock);
  #ifdef AFS_AFSDB_ENV
          if (code) {
              if (cm_dnsEnabled) {
                  int ttl;
!                 code = cm_SearchCellByDNS(cp->name, cp->name, &ttl, cm_AddCellProc, &rock);
                  if ( code == 0 ) { /* got cell from DNS */
                      cp->flags |= CM_CELLFLAG_DNS;
                      cp->flags &= ~CM_CELLFLAG_VLSERVER_INVALID;
***************
*** 1666,1672 ****
          }
          else	/* add a new server without a cell */
          {
!             tsp = cm_NewServer(&tmp, type, NULL); /* refcount = 1 */
              tsp->ipRank = rank;
          }
  	lock_ObtainMutex(&tsp->mx);
--- 1863,1869 ----
          }
          else	/* add a new server without a cell */
          {
!             tsp = cm_NewServer(&tmp, type, NULL, CM_FLAG_NOPROBE); /* refcount = 1 */
              tsp->ipRank = rank;
          }
  	lock_ObtainMutex(&tsp->mx);
***************
*** 1885,1891 ****
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &dscp);
      if (code) return code;
  
      cp = ioctlp->inDatap;
--- 2082,2088 ----
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &dscp, 0);
      if (code) return code;
  
      cp = ioctlp->inDatap;
***************
*** 1943,1949 ****
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &dscp);
      if (code) return code;
  
      cp = ioctlp->inDatap;
--- 2140,2146 ----
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &dscp, 0);
      if (code) return code;
  
      cp = ioctlp->inDatap;
***************
*** 1972,1978 ****
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &dscp);
      if (code) return code;
  
      cp = ioctlp->inDatap;
--- 2169,2175 ----
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &dscp, 0);
      if (code) return code;
  
      cp = ioctlp->inDatap;
***************
*** 2164,2170 ****
          tp += sizeof(int);
  
          /* cell name */
!         cellp = cm_GetCell(tp, CM_FLAG_CREATE);
          if (!cellp) 
              return CM_ERROR_NOSUCHCELL;
          tp += strlen(tp) + 1;
--- 2361,2367 ----
          tp += sizeof(int);
  
          /* cell name */
!         cellp = cm_GetCell(tp, CM_FLAG_CREATE | CM_FLAG_NOPROBE);
          if (!cellp) 
              return CM_ERROR_NOSUCHCELL;
          tp += strlen(tp) + 1;
***************
*** 2934,2943 ****
      cm_vol_state_t *statep;
      afs_uint32 volume;
      cm_req_t req;
  
      cm_InitReq(&req);
  
!     code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp);
      if (code) 
          return code;
          
--- 3131,3151 ----
      cm_vol_state_t *statep;
      afs_uint32 volume;
      cm_req_t req;
+     cm_ioctlQueryOptions_t *optionsp;
+     afs_uint32 flags = 0;
  
      cm_InitReq(&req);
  
!     optionsp = cm_IoctlGetQueryOptions(ioctlp, userp);
!     if (optionsp && CM_IOCTL_QOPTS_HAVE_LITERAL(optionsp))
!         flags |= (optionsp->literal ? CM_PARSE_FLAG_LITERAL : 0);
! 
!     if (optionsp && CM_IOCTL_QOPTS_HAVE_FID(optionsp)) {
!         cm_SkipIoctlPath(ioctlp);
!         code = cm_GetSCache(&optionsp->fid, &scp, userp, &req);
!     } else {
!         code = cm_ParseIoctlPath(ioctlp, userp, &req, &scp, flags);
!     }
      if (code) 
          return code;
          
***************
*** 2950,2956 ****
      {
          volume = scp->fid.volume;
  
!         cellp = cm_FindCellByID(scp->fid.cell);
  
          cm_ReleaseSCache(scp);
  
--- 3158,3164 ----
      {
          volume = scp->fid.volume;
  
!         cellp = cm_FindCellByID(scp->fid.cell, 0);
  
          cm_ReleaseSCache(scp);
  
***************
*** 3042,3048 ****
      }
  
      if (testp->fid.cell > 0) {
!         cellp = cm_FindCellByID(testp->fid.cell);
      }
  
      if (!cellp)
--- 3250,3256 ----
      }
  
      if (testp->fid.cell > 0) {
!         cellp = cm_FindCellByID(testp->fid.cell, 0);
      }
  
      if (!cellp)
Index: openafs/src/WINNT/afsd/cm_ioctl.h
diff -c openafs/src/WINNT/afsd/cm_ioctl.h:1.14.2.4 openafs/src/WINNT/afsd/cm_ioctl.h:1.14.2.5
*** openafs/src/WINNT/afsd/cm_ioctl.h:1.14.2.4	Fri Jan  4 02:58:40 2008
--- openafs/src/WINNT/afsd/cm_ioctl.h	Tue Jan 15 22:19:52 2008
***************
*** 13,18 ****
--- 13,25 ----
  #ifndef __CM_IOCTL_INTERFACES_ONLY__
  #include "smb.h"
  #include "cm_user.h"
+ #else
+ typedef struct cm_fid {
+         unsigned long cell;
+         unsigned long volume;
+         unsigned long vnode;
+         unsigned long unique;
+ } cm_fid_t;
  #endif /* __CM_IOCTL_INTERFACES_ONLY__ */
  
  /* the following four structures are used for fs get/set serverprefs command*/
***************
*** 45,50 ****
--- 52,98 ----
          afs_uint64 parms[CM_IOCTLCACHEPARMS];
  } cm_cacheParms_t;
  
+ /* 
+  * The cm_IoctlQueryOptions structure is designed to be extendible.
+  * None of the fields are required but when specified 
+  * by the client and understood by the server will be 
+  * used to more precisely specify the desired data.
+  *
+  * size must be set to the size of the structure 
+  * sent by the client including any variable length
+  * data appended to the end of the static structure.
+  *
+  * field_flags are used to determine which fields have
+  * been filled in and should be used.
+  *
+  * variable length data can be specified with fields
+  * that include offsets to data appended to the 
+  * structure.
+  *
+  * when adding new fields you must:
+  *  - add the field
+  *  - define a CM_IOCTL_QOPTS_FIELD_xxx bit flag
+  *  - define a CM_IOCTL_QOPTS_HAVE_xxx macro
+  *
+  * It is critical that flags be consistent across all
+  * implementations of the pioctl interface for a given
+  * platform.  This should be considered a public 
+  * interface used by third party application developers.
+  */
+ 
+ typedef struct cm_IoctlQueryOptions {
+     afs_uint32  size; 
+     afs_uint32  field_flags;
+     afs_uint32  literal;
+     cm_fid_t    fid;
+ } cm_ioctlQueryOptions_t;
+ 
+ /* field flags -  */
+ #define CM_IOCTL_QOPTS_FIELD_LITERAL 1
+ #define CM_IOCTL_QOPTS_FIELD_FID     2
+ 
+ #define CM_IOCTL_QOPTS_HAVE_LITERAL(p) (p->size >= 12 && (p->field_flags & CM_IOCTL_QOPTS_FIELD_LITERAL))
+ #define CM_IOCTL_QOPTS_HAVE_FID(p)     (p->size >= 28 && (p->field_flags & CM_IOCTL_QOPTS_FIELD_FID))
  
  #define MAXNUMSYSNAMES    16      /* max that current constants allow */
  #define   MAXSYSNAME      128     /* max sysname (i.e. @sys) size */
***************
*** 171,176 ****
--- 219,226 ----
  
  extern long cm_IoctlPathAvailability(struct smb_ioctl * ioctlp, struct cm_user *userp);
  
+ extern long cm_IoctlGetFileType(smb_ioctl_t *ioctlp, cm_user_t *userp);
+ 
  extern long cm_IoctlVolStatTest(struct smb_ioctl *ioctlp, struct cm_user *userp);
  
  #endif /* __CM_IOCTL_INTERFACES_ONLY__ */
Index: openafs/src/WINNT/afsd/cm_scache.c
diff -c openafs/src/WINNT/afsd/cm_scache.c:1.35.2.54 openafs/src/WINNT/afsd/cm_scache.c:1.35.2.56
*** openafs/src/WINNT/afsd/cm_scache.c:1.35.2.54	Fri Dec 28 10:47:43 2007
--- openafs/src/WINNT/afsd/cm_scache.c	Thu Feb  7 20:21:46 2008
***************
*** 774,780 ****
      /* otherwise, we need to find the volume */
      if (!cm_freelanceEnabled || !isRoot) {
          lock_ReleaseWrite(&cm_scacheLock);	/* for perf. reasons */
!         cellp = cm_FindCellByID(fidp->cell);
          if (!cellp) 
              return CM_ERROR_NOSUCHCELL;
  
--- 774,780 ----
      /* otherwise, we need to find the volume */
      if (!cm_freelanceEnabled || !isRoot) {
          lock_ReleaseWrite(&cm_scacheLock);	/* for perf. reasons */
!         cellp = cm_FindCellByID(fidp->cell, 0);
          if (!cellp) 
              return CM_ERROR_NOSUCHCELL;
  
***************
*** 879,885 ****
      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;
--- 879,885 ----
      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;
***************
*** 894,900 ****
  	}
      }
  
!     lock_ReleaseRead(&cm_scacheLock);
  
      return pscp;
  }
--- 894,900 ----
  	}
      }
  
!     lock_ReleaseWrite(&cm_scacheLock);
  
      return pscp;
  }
***************
*** 1546,1552 ****
      if (!(flags & CM_MERGEFLAG_FORCE) && dataVersion < scp->dataVersion) {
          struct cm_cell *cellp;
  
!         cellp = cm_FindCellByID(scp->fid.cell);
          if (scp->cbServerp) {
              struct cm_volume *volp = NULL;
  
--- 1546,1552 ----
      if (!(flags & CM_MERGEFLAG_FORCE) && dataVersion < scp->dataVersion) {
          struct cm_cell *cellp;
  
!         cellp = cm_FindCellByID(scp->fid.cell, 0);
          if (scp->cbServerp) {
              struct cm_volume *volp = NULL;
  
***************
*** 1731,1736 ****
--- 1731,1737 ----
  #endif
  {
      osi_assertx(scp != NULL, "null cm_scache_t");
+     lock_AssertWrite(&cm_scacheLock);
      scp->refCount++;
  #ifdef DEBUG_REFCOUNT
      osi_Log2(afsd_logp,"cm_HoldSCacheNoLock scp 0x%p ref %d",scp, scp->refCount);
***************
*** 1761,1766 ****
--- 1762,1768 ----
  #endif
  {
      osi_assertx(scp != NULL, "null cm_scache_t");
+     lock_AssertWrite(&cm_scacheLock);
      if (scp->refCount == 0)
  	osi_Log1(afsd_logp,"cm_ReleaseSCacheNoLock about to panic scp 0x%x",scp);
      osi_assertx(scp->refCount-- >= 0, "cm_scache_t refCount 0");
Index: openafs/src/WINNT/afsd/cm_server.c
diff -c openafs/src/WINNT/afsd/cm_server.c:1.25.2.17 openafs/src/WINNT/afsd/cm_server.c:1.25.2.24
*** openafs/src/WINNT/afsd/cm_server.c:1.25.2.17	Sun Jan  6 18:12:59 2008
--- openafs/src/WINNT/afsd/cm_server.c	Thu Feb  7 15:29:19 2008
***************
*** 29,34 ****
--- 29,36 ----
  osi_rwlock_t cm_serverLock;
  
  cm_server_t *cm_allServersp;
+ afs_uint32   cm_numFileServers = 0;
+ afs_uint32   cm_numVldbServers = 0;
  
  void
  cm_ForceNewConnectionsAllServers(void)
***************
*** 154,160 ****
  	/* mark server as down */
          if (!(tsp->flags & CM_SERVERFLAG_DOWN)) {
              tsp->flags |= CM_SERVERFLAG_DOWN;
!             tsp->downTime = osi_Time();
          }
  	if (code != VRESTARTING)
  	    cm_ForceNewConnections(tsp);
--- 156,162 ----
  	/* mark server as down */
          if (!(tsp->flags & CM_SERVERFLAG_DOWN)) {
              tsp->flags |= CM_SERVERFLAG_DOWN;
!             tsp->downTime = time(NULL);
          }
  	if (code != VRESTARTING)
  	    cm_ForceNewConnections(tsp);
***************
*** 175,182 ****
--- 177,186 ----
                      if (tsrvp->ids[i] != 0) {
                          cm_InitReq(&req);
  
+                         lock_ReleaseMutex(&tsp->mx);
                          code = cm_GetVolumeByID(tsp->cellp, tsrvp->ids[i], cm_rootUserp,
                                                  &req, CM_GETVOL_FLAG_NO_LRU_UPDATE, &volp);
+                         lock_ObtainMutex(&tsp->mx);
                          if (code == 0) {
                              cm_UpdateVolumeStatus(volp, tsrvp->ids[i]);
                              cm_PutVolume(volp);
***************
*** 194,201 ****
      lock_ReleaseMutex(&tsp->mx);
  }
  
! 
! void cm_CheckServers(long flags, cm_cell_t *cellp)
  {
      /* ping all file servers, up or down, with unauthenticated connection,
       * to find out whether we have all our callbacks from the server still.
--- 198,206 ----
      lock_ReleaseMutex(&tsp->mx);
  }
  
! #define MULTI_CHECKSERVERS 1
! #ifndef MULTI_CHECKSERVERS
! void cm_CheckServers(afs_uint32 flags, cm_cell_t *cellp)
  {
      /* ping all file servers, up or down, with unauthenticated connection,
       * to find out whether we have all our callbacks from the server still.
***************
*** 249,254 ****
--- 254,758 ----
      }
      lock_ReleaseWrite(&cm_serverLock);
  }       
+ #else /* MULTI_CHECKSERVERS */
+ void cm_CheckServers(afs_uint32 flags, cm_cell_t *cellp)
+ {
+     /* 
+      * The goal of this function is to probe simultaneously 
+      * probe all of the up/down servers (vldb/file) as 
+      * specified by flags in the minimum number of RPCs.
+      * Effectively that means use one multi_RXAFS_GetCapabilities()
+      * followed by possibly one multi_RXAFS_GetTime() and 
+      * one multi_VL_ProbeServer().
+      *
+      * To make this work we must construct the list of vldb
+      * and file servers that are to be probed as well as the
+      * associated data structures.
+      */
+ 
+     int srvAddrCount = 0;
+     struct srvAddr **addrs = NULL;
+     cm_conn_t **conns = NULL;
+     struct rx_connection **rxconns = NULL;
+     cm_req_t req;
+     afs_int32 i, j, nconns = 0;
+     afs_int32 *conntimer, *results;
+     Capabilities *caps = NULL;
+     cm_server_t ** serversp, *tsp;
+     afs_uint32 isDown, wasDown;
+     afs_uint32 code;
+     time_t start, end, *deltas;
+     afs_int32 secs;
+     afs_int32 usecs;
+     char hoststr[16];
+ 
+     cm_InitReq(&req);
+ 
+     j = max(cm_numFileServers,cm_numVldbServers);
+     conns = (cm_conn_t **)malloc(j * sizeof(cm_conn_t *));
+     rxconns = (struct rx_connection **)malloc(j * sizeof(struct rx_connection *));
+     conntimer = (afs_int32 *)malloc(j * sizeof (afs_int32));
+     deltas = (time_t *)malloc(j * sizeof (time_t));
+     results = (afs_int32 *)malloc(j * sizeof (afs_int32));
+     serversp = (cm_server_t **)malloc(j * sizeof(cm_server_t *));
+     caps = (Capabilities *)malloc(j * sizeof(Capabilities));
+ 
+     memset(caps, 0, j * sizeof(Capabilities));
+ 
+     if ((flags & CM_FLAG_CHECKFILESERVERS) || 
+         !(flags & (CM_FLAG_CHECKFILESERVERS|CM_FLAG_CHECKVLDBSERVERS)))
+     {
+         lock_ObtainWrite(&cm_serverLock);
+         nconns = 0;
+         for (nconns=0, tsp = cm_allServersp; tsp; tsp = tsp->allNextp) {
+             if (tsp->type != CM_SERVER_FILE || 
+                 tsp->cellp == NULL ||           /* SetPref only */
+                 cellp && cellp != tsp->cellp)
+                 continue;
+ 
+             cm_GetServerNoLock(tsp);
+             lock_ReleaseWrite(&cm_serverLock);
+ 
+             lock_ObtainMutex(&tsp->mx);
+             isDown = tsp->flags & CM_SERVERFLAG_DOWN;
+ 
+             if ((tsp->flags & CM_SERVERFLAG_PINGING) ||
+                 !((isDown && (flags & CM_FLAG_CHECKDOWNSERVERS)) ||
+                    (!isDown && (flags & CM_FLAG_CHECKUPSERVERS)))) {
+                 lock_ReleaseMutex(&tsp->mx);
+                 lock_ObtainWrite(&cm_serverLock);
+                 continue;
+             }
+ 
+             tsp->flags |= CM_SERVERFLAG_PINGING;
+             lock_ReleaseMutex(&tsp->mx);
+ 
+             serversp[nconns] = tsp;
+             code = cm_ConnByServer(tsp, cm_rootUserp, &conns[nconns]);
+             if (code) {
+ 	            lock_ObtainWrite(&cm_serverLock);
+                 cm_PutServerNoLock(tsp);
+                 continue;
+             }
+             lock_ObtainWrite(&cm_serverLock);
+ 			rxconns[nconns] = cm_GetRxConn(conns[nconns]);
+             if (conntimer[nconns] = (isDown ? 1 : 0))
+                 rx_SetConnDeadTime(rxconns[nconns], 10);
+ 
+             nconns++;
+         }
+         lock_ReleaseWrite(&cm_serverLock);
+ 
+         /* Perform the multi call */
+         start = time(NULL);
+         multi_Rx(rxconns,nconns)
+         {
+             multi_RXAFS_GetCapabilities(&caps[multi_i]);
+             results[multi_i]=multi_error;
+         } multi_End;
+ 
+ 
+         /* Process results of servers that support RXAFS_GetCapabilities */
+         for (i=0; i<nconns; i++) {
+             /* Leave the servers that did not support GetCapabilities alone */
+             if (results[i] == RXGEN_OPCODE)
+                 continue;
+ 
+             if (conntimer[i])
+                 rx_SetConnDeadTime(rxconns[i], ConnDeadtimeout);
+             rx_PutConnection(rxconns[i]);
+             cm_PutConn(conns[i]);
+ 
+             tsp = serversp[i];
+             cm_GCConnections(tsp);
+ 
+             lock_ObtainMutex(&tsp->mx);
+             wasDown = tsp->flags & CM_SERVERFLAG_DOWN;
+ 
+             if (results[i] >= 0)  {
+                 /* mark server as up */
+                 tsp->flags &= ~CM_SERVERFLAG_DOWN;
+                 tsp->downTime = 0;
+ 
+                 /* we currently handle 32-bits of capabilities */
+                 if (caps[i].Capabilities_len > 0) {
+                     tsp->capabilities = caps[i].Capabilities_val[0];
+                     free(caps[i].Capabilities_val);
+                     caps[i].Capabilities_len = 0;
+                     caps[i].Capabilities_val = 0;
+                 } else {
+                     tsp->capabilities = 0;
+                 }
+ 
+                 afs_inet_ntoa_r(tsp->addr.sin_addr.S_un.S_addr, hoststr);
+                 osi_Log3(afsd_logp, "cm_MultiPingServer server %s (%s) is up with caps 0x%x",
+                           osi_LogSaveString(afsd_logp, hoststr), 
+                           tsp->type == CM_SERVER_VLDB ? "vldb" : "file",
+                           tsp->capabilities);
+ 
+                 /* Now update the volume status if necessary */
+                 if (wasDown) {
+                     cm_server_vols_t * tsrvp;
+                     cm_volume_t * volp;
+                     int i;
+ 
+                     for (tsrvp = tsp->vols; tsrvp; tsrvp = tsrvp->nextp) {
+                         for (i=0; i<NUM_SERVER_VOLS; i++) {
+                             if (tsrvp->ids[i] != 0) {
+                                 cm_InitReq(&req);
+ 
+                                 lock_ReleaseMutex(&tsp->mx);
+                                 code = cm_GetVolumeByID(tsp->cellp, tsrvp->ids[i], cm_rootUserp,
+                                                          &req, CM_GETVOL_FLAG_NO_LRU_UPDATE, &volp);
+                                 lock_ObtainMutex(&tsp->mx);
+                                 if (code == 0) {
+                                     cm_UpdateVolumeStatus(volp, tsrvp->ids[i]);
+                                     cm_PutVolume(volp);
+                                 }
+                             }
+                         }
+                     }
+                 }
+             } else {
+                 /* mark server as down */
+                 if (!(tsp->flags & CM_SERVERFLAG_DOWN)) {
+                     tsp->flags |= CM_SERVERFLAG_DOWN;
+                     tsp->downTime = time(NULL);
+                 }
+                 if (code != VRESTARTING)
+                     cm_ForceNewConnections(tsp);
+ 
+                 afs_inet_ntoa_r(tsp->addr.sin_addr.S_un.S_addr, hoststr);
+                 osi_Log3(afsd_logp, "cm_MultiPingServer server %s (%s) is down with caps 0x%x",
+                           osi_LogSaveString(afsd_logp, hoststr), 
+                           tsp->type == CM_SERVER_VLDB ? "vldb" : "file",
+                           tsp->capabilities);
+ 
+                 /* Now update the volume status if necessary */
+                 if (!wasDown) {
+                     cm_server_vols_t * tsrvp;
+                     cm_volume_t * volp;
+                     int i;
+ 
+                     for (tsrvp = tsp->vols; tsrvp; tsrvp = tsrvp->nextp) {
+                         for (i=0; i<NUM_SERVER_VOLS; i++) {
+                             if (tsrvp->ids[i] != 0) {
+                                 cm_InitReq(&req);
+ 
+                                 lock_ReleaseMutex(&tsp->mx);
+                                 code = cm_GetVolumeByID(tsp->cellp, tsrvp->ids[i], cm_rootUserp,
+                                                          &req, CM_GETVOL_FLAG_NO_LRU_UPDATE, &volp);
+                                 lock_ObtainMutex(&tsp->mx);
+                                 if (code == 0) {
+                                     cm_UpdateVolumeStatus(volp, tsrvp->ids[i]);
+                                     cm_PutVolume(volp);
+                                 }
+                             }
+                         }
+                     }
+                 }
+             }
+ 
+             if (tsp->waitCount == 0)
+                 tsp->flags &= ~CM_SERVERFLAG_PINGING;
+             else 
+                 osi_Wakeup((LONG_PTR)tsp);
+             
+             lock_ReleaseMutex(&tsp->mx);
+ 
+             cm_PutServer(tsp);
+         }
+ 
+         /* 
+          * At this point we have handled any responses that did not indicate
+          * that RXAFS_GetCapabilities is not supported.
+          */
+         for ( i=0, j=0; i<nconns; i++) {
+             if (results[i] == RXGEN_OPCODE) {
+                 if (i != j) {
+                     conns[j] = conns[i];
+                     rxconns[j] = rxconns[i];
+                     serversp[j] = serversp[i];
+                 }
+                 j++;
+             }
+         }
+         nconns = j;
+ 
+         /* Perform the multi call */
+         start = time(NULL);
+         multi_Rx(rxconns,nconns)
+         {
+             secs = usecs = 0;
+             multi_RXAFS_GetTime(&secs, &usecs);
+             end = time(NULL);
+             results[multi_i]=multi_error;
+             if ((start == end) && !multi_error)
+                 deltas[multi_i] = end - secs;
+         } multi_End;
+ 
+ 
+         /* Process Results of servers that only support RXAFS_GetTime */
+         for (i=0; i<nconns; i++) {
+             /* Leave the servers that did not support GetCapabilities alone */
+             if (conntimer[i])
+                 rx_SetConnDeadTime(rxconns[i], ConnDeadtimeout);
+             rx_PutConnection(rxconns[i]);
+             cm_PutConn(conns[i]);
+ 
+             tsp = serversp[i];
+             cm_GCConnections(tsp);
+ 
+             lock_ObtainMutex(&tsp->mx);
+             wasDown = tsp->flags & CM_SERVERFLAG_DOWN;
+ 
+             if (results[i] >= 0)  {
+                 /* mark server as up */
+                 tsp->flags &= ~CM_SERVERFLAG_DOWN;
+                 tsp->downTime = 0;
+                 tsp->capabilities = 0;
+ 
+                 afs_inet_ntoa_r(tsp->addr.sin_addr.S_un.S_addr, hoststr);
+                 osi_Log3(afsd_logp, "cm_MultiPingServer server %s (%s) is up with caps 0x%x",
+                           osi_LogSaveString(afsd_logp, hoststr), 
+                           tsp->type == CM_SERVER_VLDB ? "vldb" : "file",
+                           tsp->capabilities);
+ 
+                 /* Now update the volume status if necessary */
+                 if (wasDown) {
+                     cm_server_vols_t * tsrvp;
+                     cm_volume_t * volp;
+                     int i;
+ 
+                     for (tsrvp = tsp->vols; tsrvp; tsrvp = tsrvp->nextp) {
+                         for (i=0; i<NUM_SERVER_VOLS; i++) {
+                             if (tsrvp->ids[i] != 0) {
+                                 cm_InitReq(&req);
+ 
+                                 lock_ReleaseMutex(&tsp->mx);
+                                 code = cm_GetVolumeByID(tsp->cellp, tsrvp->ids[i], cm_rootUserp,
+                                                          &req, CM_GETVOL_FLAG_NO_LRU_UPDATE, &volp);
+                                 lock_ObtainMutex(&tsp->mx);
+                                 if (code == 0) {
+                                     cm_UpdateVolumeStatus(volp, tsrvp->ids[i]);
+                                     cm_PutVolume(volp);
+                                 }
+                             }
+                         }
+                     }
+                 }
+             } else {
+                 /* mark server as down */
+                 if (!(tsp->flags & CM_SERVERFLAG_DOWN)) {
+                     tsp->flags |= CM_SERVERFLAG_DOWN;
+                     tsp->downTime = time(NULL);
+                 }
+                 if (code != VRESTARTING)
+                     cm_ForceNewConnections(tsp);
+ 
+                 afs_inet_ntoa_r(tsp->addr.sin_addr.S_un.S_addr, hoststr);
+                 osi_Log3(afsd_logp, "cm_MultiPingServer server %s (%s) is down with caps 0x%x",
+                           osi_LogSaveString(afsd_logp, hoststr), 
+                           tsp->type == CM_SERVER_VLDB ? "vldb" : "file",
+                           tsp->capabilities);
+ 
+                 /* Now update the volume status if necessary */
+                 if (!wasDown) {
+                     cm_server_vols_t * tsrvp;
+                     cm_volume_t * volp;
+                     int i;
+ 
+                     for (tsrvp = tsp->vols; tsrvp; tsrvp = tsrvp->nextp) {
+                         for (i=0; i<NUM_SERVER_VOLS; i++) {
+                             if (tsrvp->ids[i] != 0) {
+                                 cm_InitReq(&req);
+ 
+                                 lock_ReleaseMutex(&tsp->mx);
+                                 code = cm_GetVolumeByID(tsp->cellp, tsrvp->ids[i], cm_rootUserp,
+                                                          &req, CM_GETVOL_FLAG_NO_LRU_UPDATE, &volp);
+                                 lock_ObtainMutex(&tsp->mx);
+                                 if (code == 0) {
+                                     cm_UpdateVolumeStatus(volp, tsrvp->ids[i]);
+                                     cm_PutVolume(volp);
+                                 }
+                             }
+                         }
+                     }
+                 }
+             }
+ 
+             if (tsp->waitCount == 0)
+                 tsp->flags &= ~CM_SERVERFLAG_PINGING;
+             else 
+                 osi_Wakeup((LONG_PTR)tsp);
+             
+             lock_ReleaseMutex(&tsp->mx);
+ 
+             cm_PutServer(tsp);
+         }
+     }
+ 
+     if ((flags & CM_FLAG_CHECKVLDBSERVERS) || 
+         !(flags & (CM_FLAG_CHECKFILESERVERS|CM_FLAG_CHECKVLDBSERVERS)))
+     {
+         lock_ObtainWrite(&cm_serverLock);
+         nconns = 0;
+         for (nconns=0, tsp = cm_allServersp; tsp; tsp = tsp->allNextp) {
+             if (tsp->type != CM_SERVER_VLDB ||
+                 tsp->cellp == NULL ||           /* SetPref only */
+                 cellp && cellp != tsp->cellp)
+                 continue;
+ 
+             cm_GetServerNoLock(tsp);
+             lock_ReleaseWrite(&cm_serverLock);
+ 
+             lock_ObtainMutex(&tsp->mx);
+             isDown = tsp->flags & CM_SERVERFLAG_DOWN;
+ 
+             if ((tsp->flags & CM_SERVERFLAG_PINGING) ||
+                 !((isDown && (flags & CM_FLAG_CHECKDOWNSERVERS)) ||
+                    (!isDown && (flags & CM_FLAG_CHECKUPSERVERS)))) {
+                 lock_ReleaseMutex(&tsp->mx);
+                 lock_ObtainWrite(&cm_serverLock);
+                 continue;
+             }
+ 
+             tsp->flags |= CM_SERVERFLAG_PINGING;
+             lock_ReleaseMutex(&tsp->mx);
+ 
+             serversp[nconns] = tsp;
+             code = cm_ConnByServer(tsp, cm_rootUserp, &conns[nconns]);
+             if (code) {
+ 	            lock_ObtainWrite(&cm_serverLock);
+                 cm_PutServerNoLock(tsp);
+                 continue;
+             }
+             lock_ObtainWrite(&cm_serverLock);
+             rxconns[nconns] = cm_GetRxConn(conns[nconns]);
+             conntimer[nconns] = (isDown ? 1 : 0);
+             if (isDown)
+                 rx_SetConnDeadTime(rxconns[nconns], 10);
+ 
+             nconns++;
+         }
+         lock_ReleaseWrite(&cm_serverLock);
+ 
+         /* Perform the multi call */
+         start = time(NULL);
+         multi_Rx(rxconns,nconns)
+         {
+             multi_VL_ProbeServer();
+             results[multi_i]=multi_error;
+         } multi_End;
+ 
+ 
+         /* Process results of servers that support RXAFS_GetCapabilities */
+         for (i=0; i<nconns; i++) {
+             if (conntimer[i])
+                 rx_SetConnDeadTime(rxconns[i], ConnDeadtimeout);
+             rx_PutConnection(rxconns[i]);
+             cm_PutConn(conns[i]);
+ 
+             tsp = serversp[i];
+             cm_GCConnections(tsp);
+ 
+             lock_ObtainMutex(&tsp->mx);
+             wasDown = tsp->flags & CM_SERVERFLAG_DOWN;
+ 
+             if (results[i] >= 0)  {
+                 /* mark server as up */
+                 tsp->flags &= ~CM_SERVERFLAG_DOWN;
+                 tsp->downTime = 0;
+                 tsp->capabilities = 0;
+ 
+                 afs_inet_ntoa_r(tsp->addr.sin_addr.S_un.S_addr, hoststr);
+                 osi_Log3(afsd_logp, "cm_MultiPingServer server %s (%s) is up with caps 0x%x",
+                           osi_LogSaveString(afsd_logp, hoststr), 
+                           tsp->type == CM_SERVER_VLDB ? "vldb" : "file",
+                           tsp->capabilities);
+ 
+                 /* Now update the volume status if necessary */
+                 if (wasDown) {
+                     cm_server_vols_t * tsrvp;
+                     cm_volume_t * volp;
+                     int i;
+ 
+                     for (tsrvp = tsp->vols; tsrvp; tsrvp = tsrvp->nextp) {
+                         for (i=0; i<NUM_SERVER_VOLS; i++) {
+                             if (tsrvp->ids[i] != 0) {
+                                 cm_InitReq(&req);
+ 
+                                 lock_ReleaseMutex(&tsp->mx);
+                                 code = cm_GetVolumeByID(tsp->cellp, tsrvp->ids[i], cm_rootUserp,
+                                                          &req, CM_GETVOL_FLAG_NO_LRU_UPDATE, &volp);
+                                 lock_ObtainMutex(&tsp->mx);
+                                 if (code == 0) {
+                                     cm_UpdateVolumeStatus(volp, tsrvp->ids[i]);
+                                     cm_PutVolume(volp);
+                                 }
+                             }
+                         }
+                     }
+                 }
+             } else {
+                 /* mark server as down */
+                 if (!(tsp->flags & CM_SERVERFLAG_DOWN)) {
+                     tsp->flags |= CM_SERVERFLAG_DOWN;
+                     tsp->downTime = time(NULL);
+                 }
+                 if (code != VRESTARTING)
+                     cm_ForceNewConnections(tsp);
+ 
+                 afs_inet_ntoa_r(tsp->addr.sin_addr.S_un.S_addr, hoststr);
+                 osi_Log3(afsd_logp, "cm_MultiPingServer server %s (%s) is down with caps 0x%x",
+                           osi_LogSaveString(afsd_logp, hoststr), 
+                           tsp->type == CM_SERVER_VLDB ? "vldb" : "file",
+                           tsp->capabilities);
+ 
+                 /* Now update the volume status if necessary */
+                 if (!wasDown) {
+                     cm_server_vols_t * tsrvp;
+                     cm_volume_t * volp;
+                     int i;
+ 
+                     for (tsrvp = tsp->vols; tsrvp; tsrvp = tsrvp->nextp) {
+                         for (i=0; i<NUM_SERVER_VOLS; i++) {
+                             if (tsrvp->ids[i] != 0) {
+                                 cm_InitReq(&req);
+ 
+                                 lock_ReleaseMutex(&tsp->mx);
+                                 code = cm_GetVolumeByID(tsp->cellp, tsrvp->ids[i], cm_rootUserp,
+                                                          &req, CM_GETVOL_FLAG_NO_LRU_UPDATE, &volp);
+                                 lock_ObtainMutex(&tsp->mx);
+                                 if (code == 0) {
+                                     cm_UpdateVolumeStatus(volp, tsrvp->ids[i]);
+                                     cm_PutVolume(volp);
+                                 }
+                             }
+                         }
+                     }
+                 }
+             }
+ 
+             if (tsp->waitCount == 0)
+                 tsp->flags &= ~CM_SERVERFLAG_PINGING;
+             else 
+                 osi_Wakeup((LONG_PTR)tsp);
+             
+             lock_ReleaseMutex(&tsp->mx);
+ 
+             cm_PutServer(tsp);
+         }
+     }
+ 
+     free(conns);
+     free(rxconns);
+     free(conntimer);
+     free(deltas);
+     free(results);
+     free(caps);
+ }
+ #endif /* MULTI_CHECKSERVERS */
  
  void cm_InitServer(void)
  {
***************
*** 363,369 ****
      } /* and of for loop */
  }
  
! cm_server_t *cm_NewServer(struct sockaddr_in *socketp, int type, cm_cell_t *cellp) {
      cm_server_t *tsp;
  
      osi_assertx(socketp->sin_family == AF_INET, "unexpected socket family");
--- 867,873 ----
      } /* and of for loop */
  }
  
! cm_server_t *cm_NewServer(struct sockaddr_in *socketp, int type, cm_cell_t *cellp, afs_uint32 flags) {
      cm_server_t *tsp;
  
      osi_assertx(socketp->sin_family == AF_INET, "unexpected socket family");
***************
*** 376,391 ****
          tsp->refCount = 1;
          lock_InitializeMutex(&tsp->mx, "cm_server_t mutex");
          tsp->addr = *socketp;
-         tsp->flags = CM_SERVERFLAG_DOWN;	/* assume down; ping will mark up if available */
  
          cm_SetServerPrefs(tsp); 
  
          lock_ObtainWrite(&cm_serverLock); 	/* get server lock */
          tsp->allNextp = cm_allServersp;
          cm_allServersp = tsp;
          lock_ReleaseWrite(&cm_serverLock); 	/* release server lock */
  
!         cm_PingServer(tsp);			/* Obtain Capabilities and check up/down state */
      }
      return tsp;
  }
--- 880,907 ----
          tsp->refCount = 1;
          lock_InitializeMutex(&tsp->mx, "cm_server_t mutex");
          tsp->addr = *socketp;
  
          cm_SetServerPrefs(tsp); 
  
          lock_ObtainWrite(&cm_serverLock); 	/* get server lock */
          tsp->allNextp = cm_allServersp;
          cm_allServersp = tsp;
+ 
+         switch (type) {
+         case CM_SERVER_VLDB:
+             cm_numVldbServers++;
+             break;      
+         case CM_SERVER_FILE:
+             cm_numFileServers++;
+             break;
+         }
+ 
          lock_ReleaseWrite(&cm_serverLock); 	/* release server lock */
  
!         if ( !(flags & CM_FLAG_NOPROBE) ) {
!             tsp->flags = CM_SERVERFLAG_DOWN;	/* assume down; ping will mark up if available */
!             cm_PingServer(tsp);	                /* Obtain Capabilities and check up/down state */
!         }
      }
      return tsp;
  }
***************
*** 659,664 ****
--- 1175,1189 ----
          cm_GCConnections(serverp);  /* connsp */
  
  	if (!(serverp->flags & CM_SERVERFLAG_PREF_SET)) {
+             switch (serverp->type) {
+             case CM_SERVER_VLDB:
+                 cm_numVldbServers--;
+                 break;      
+             case CM_SERVER_FILE:
+                 cm_numFileServers--;
+                 break;
+             }
+ 
  	    lock_FinalizeMutex(&serverp->mx);
  	    if ( cm_allServersp == serverp )
  		cm_allServersp = serverp->allNextp;
Index: openafs/src/WINNT/afsd/cm_server.h
diff -c openafs/src/WINNT/afsd/cm_server.h:1.13.2.9 openafs/src/WINNT/afsd/cm_server.h:1.13.2.11
*** openafs/src/WINNT/afsd/cm_server.h:1.13.2.9	Thu Aug  2 16:46:12 2007
--- openafs/src/WINNT/afsd/cm_server.h	Tue Feb  5 12:38:02 2008
***************
*** 82,88 ****
  #define CM_MAXINTERFACE_ADDR          16
  
  extern cm_server_t *cm_NewServer(struct sockaddr_in *addrp, int type,
! 	struct cm_cell *cellp);
  
  extern cm_serverRef_t *cm_NewServerRef(struct cm_server *serverp, afs_uint32 volID);
  
--- 82,88 ----
  #define CM_MAXINTERFACE_ADDR          16
  
  extern cm_server_t *cm_NewServer(struct sockaddr_in *addrp, int type,
! 	struct cm_cell *cellp, afs_uint32 flags);
  
  extern cm_serverRef_t *cm_NewServerRef(struct cm_server *serverp, afs_uint32 volID);
  
***************
*** 102,108 ****
  
  extern void cm_InitServer(void);
  
! extern void cm_CheckServers(long flags, struct cm_cell *cellp);
  
  extern cm_server_t *cm_allServersp;
  
--- 102,108 ----
  
  extern void cm_InitServer(void);
  
! extern void cm_CheckServers(afs_uint32 flags, struct cm_cell *cellp);
  
  extern cm_server_t *cm_allServersp;
  
Index: openafs/src/WINNT/afsd/cm_utils.c
diff -c openafs/src/WINNT/afsd/cm_utils.c:1.11.4.6 openafs/src/WINNT/afsd/cm_utils.c:1.11.4.7
*** openafs/src/WINNT/afsd/cm_utils.c:1.11.4.6	Wed Oct 31 11:36:02 2007
--- openafs/src/WINNT/afsd/cm_utils.c	Thu Jan 31 02:31:56 2008
***************
*** 239,264 ****
  
      if (error < 0) 
          error = CM_ERROR_TIMEDOUT;
!     else if (error == 30) 
          error = CM_ERROR_READONLY;
!     else if (error == 13) 
          error = CM_ERROR_NOACCESS;
!     else if (error == 18) 
          error = CM_ERROR_CROSSDEVLINK;
!     else if (error == 17) 
          error = CM_ERROR_EXISTS;
!     else if (error == 20) 
          error = CM_ERROR_NOTDIR;
!     else if (error == 2)	/* ENOENT */
          error = CM_ERROR_NOSUCHFILE;
!     else if (error == 11           /* EAGAIN, most servers */
               || error == 35 	   /* EAGAIN, Digital UNIX */
               || error == WSAEWOULDBLOCK)
          error = CM_ERROR_WOULDBLOCK;
      else if (error == VDISKFULL
!               || error == 28)   /* ENOSPC */ 
          error = CM_ERROR_SPACE;
      else if (error == VOVERQUOTA
                || error == 49    /* EDQUOT on Solaris */
                || error == 88    /* EDQUOT on AIX */
                || error == 69    /* EDQUOT on Digital UNIX and HPUX */
--- 239,265 ----
  
      if (error < 0) 
          error = CM_ERROR_TIMEDOUT;
!     else if (error == EROFS) 
          error = CM_ERROR_READONLY;
!     else if (error == EACCES) 
          error = CM_ERROR_NOACCESS;
!     else if (error == EXDEV) 
          error = CM_ERROR_CROSSDEVLINK;
!     else if (error == EEXIST) 
          error = CM_ERROR_EXISTS;
!     else if (error == ENOTDIR) 
          error = CM_ERROR_NOTDIR;
!     else if (error == ENOENT)
          error = CM_ERROR_NOSUCHFILE;
!     else if (error == EAGAIN
               || error == 35 	   /* EAGAIN, Digital UNIX */
               || error == WSAEWOULDBLOCK)
          error = CM_ERROR_WOULDBLOCK;
      else if (error == VDISKFULL
!               || error == ENOSPC)
          error = CM_ERROR_SPACE;
      else if (error == VOVERQUOTA
+               || error == EDQUOT
                || error == 49    /* EDQUOT on Solaris */
                || error == 88    /* EDQUOT on AIX */
                || error == 69    /* EDQUOT on Digital UNIX and HPUX */
***************
*** 267,273 ****
          error = CM_ERROR_QUOTA;
      else if (error == VNOVNODE)
          error = CM_ERROR_BADFD;
!     else if (error == 21)
          return CM_ERROR_ISDIR;
      return error;
  }
--- 268,274 ----
          error = CM_ERROR_QUOTA;
      else if (error == VNOVNODE)
          error = CM_ERROR_BADFD;
!     else if (error == EISDIR)
          return CM_ERROR_ISDIR;
      return error;
  }
***************
*** 292,306 ****
  
      if (error < 0) 
          error = CM_ERROR_TIMEDOUT;
!     else if (error == 30) 
          error = CM_ERROR_READONLY;
!     else if (error == 20) 
          error = CM_ERROR_NOTDIR;
!     else if (error == 13) 
          error = CM_ERROR_NOACCESS;
!     else if (error == 2) 
          error = CM_ERROR_NOSUCHFILE;
!     else if (error == 17		/* AIX */
                || error == 66		/* SunOS 4, Digital UNIX */
                || error == 93		/* Solaris 2, IRIX */
                || error == 247)	/* HP/UX */
--- 293,308 ----
  
      if (error < 0) 
          error = CM_ERROR_TIMEDOUT;
!     else if (error == EROFS) 
          error = CM_ERROR_READONLY;
!     else if (error == ENOTDIR) 
          error = CM_ERROR_NOTDIR;
!     else if (error == EACCES) 
          error = CM_ERROR_NOACCESS;
!     else if (error == ENOENT) 
          error = CM_ERROR_NOSUCHFILE;
!     else if (error == ENOTEMPTY 
!               || error == 17		/* AIX */
                || error == 66		/* SunOS 4, Digital UNIX */
                || error == 93		/* Solaris 2, IRIX */
                || error == 247)	/* HP/UX */
Index: openafs/src/WINNT/afsd/cm_vnodeops.c
diff -c openafs/src/WINNT/afsd/cm_vnodeops.c:1.69.2.50 openafs/src/WINNT/afsd/cm_vnodeops.c:1.69.2.56
*** openafs/src/WINNT/afsd/cm_vnodeops.c:1.69.2.50	Sat Jan  5 17:20:30 2008
--- openafs/src/WINNT/afsd/cm_vnodeops.c	Sun Feb 10 19:18:32 2008
***************
*** 1086,1092 ****
          /* normal mt pt */
          strcpy(volNamep, mpNamep+1);
  
!         cellp = cm_FindCellByID(scp->fid.cell);
      }
  
      if (!cellp) {
--- 1086,1092 ----
          /* normal mt pt */
          strcpy(volNamep, mpNamep+1);
  
!         cellp = cm_FindCellByID(scp->fid.cell, 0);
      }
  
      if (!cellp) {
***************
*** 1284,1310 ****
              else
                  return CM_ERROR_NOSUCHFILE;
          }
!         else {  /* nonexistent dir on freelance root, so add it */
              char fullname[200] = ".";
              int  found = 0;
  
              osi_Log1(afsd_logp,"cm_Lookup adding mount for non-existent directory: %s", 
                        osi_LogSaveString(afsd_logp,namep));
              if (namep[0] == '.') {
                  if (cm_GetCell_Gen(&namep[1], &fullname[1], CM_FLAG_CREATE)) {
                      found = 1;
!                     if ( stricmp(&namep[1], &fullname[1]) )
                          code = cm_FreelanceAddSymlink(namep, fullname, &rock.fid);
-                     else
-                         code = cm_FreelanceAddMount(namep, &fullname[1], "root.cell.", 1, &rock.fid);
                  }
              } else {
                  if (cm_GetCell_Gen(namep, fullname, CM_FLAG_CREATE)) {
                      found = 1;
!                     if ( stricmp(namep, fullname) )
                          code = cm_FreelanceAddSymlink(namep, fullname, &rock.fid);
-                     else
-                         code = cm_FreelanceAddMount(namep, fullname, "root.cell.", 0, &rock.fid);
                  }
              }
              if (!found || code < 0) {   /* add mount point failed, so give up */
--- 1284,1324 ----
              else
                  return CM_ERROR_NOSUCHFILE;
          }
! 		else if (!strchr(namep, '#') && !strchr(namep, '%') &&
!                          strcmp(namep, "srvsvc") && strcmp(namep, "wkssvc")) { 
!             /* nonexistent dir on freelance root, so add it */
              char fullname[200] = ".";
              int  found = 0;
  
              osi_Log1(afsd_logp,"cm_Lookup adding mount for non-existent directory: %s", 
                        osi_LogSaveString(afsd_logp,namep));
+ 
+             /* 
+              * There is an ugly behavior where a share name "foo" will be searched
+              * for as "fo".  If the searched for name differs by an already existing
+              * symlink or mount point in the Freelance directory, do not add the 
+              * new value automatically.
+              */
+ 
              if (namep[0] == '.') {
                  if (cm_GetCell_Gen(&namep[1], &fullname[1], CM_FLAG_CREATE)) {
                      found = 1;
!                     if (!cm_FreelanceMountPointExists(fullname, 0))
!                         code = cm_FreelanceAddMount(fullname, &fullname[1], "root.cell.", 1, &rock.fid);
!                     if ( stricmp(&namep[1], &fullname[1]) && 
! 						!cm_FreelanceMountPointExists(namep, flags & CM_FLAG_DFS_REFERRAL ? 1 : 0) &&
! 						!cm_FreelanceSymlinkExists(namep, flags & CM_FLAG_DFS_REFERRAL ? 1 : 0))
                          code = cm_FreelanceAddSymlink(namep, fullname, &rock.fid);
                  }
              } else {
                  if (cm_GetCell_Gen(namep, fullname, CM_FLAG_CREATE)) {
                      found = 1;
!                     if (!cm_FreelanceMountPointExists(fullname, 0))
!                         code = cm_FreelanceAddMount(fullname, fullname, "root.cell.", 0, &rock.fid);
!                     if ( stricmp(namep, fullname) && 
! 						!cm_FreelanceMountPointExists(namep, flags & CM_FLAG_DFS_REFERRAL ? 1 : 0) &&
! 						!cm_FreelanceSymlinkExists(namep, flags & CM_FLAG_DFS_REFERRAL ? 1 : 0))
                          code = cm_FreelanceAddSymlink(namep, fullname, &rock.fid);
                  }
              }
              if (!found || code < 0) {   /* add mount point failed, so give up */
***************
*** 1939,1944 ****
--- 1953,1959 ----
                              if (!cm_FidCmp(&nscp->fid, &fids[i]))
                                  break;
                          }
+                         fid_count = i+1;
                      } else {
                          /* add the new fid to the list */
                          for ( i=0; i<fid_count; i++) {
***************
*** 4727,4733 ****
          lock_ReleaseRead(&cm_scacheLock);
  
          /* The lock didn't exist anyway. *shrug* */
!         return 0;
      }
  
      lock_ReleaseRead(&cm_scacheLock);
--- 4742,4748 ----
          lock_ReleaseRead(&cm_scacheLock);
  
          /* The lock didn't exist anyway. *shrug* */
!         return CM_ERROR_RANGE_NOT_LOCKED;
      }
  
      lock_ReleaseRead(&cm_scacheLock);
Index: openafs/src/WINNT/afsd/cm_volume.c
diff -c openafs/src/WINNT/afsd/cm_volume.c:1.14.4.23 openafs/src/WINNT/afsd/cm_volume.c:1.14.4.27
*** openafs/src/WINNT/afsd/cm_volume.c:1.14.4.23	Fri Jan  4 02:44:40 2008
--- openafs/src/WINNT/afsd/cm_volume.c	Thu Feb  7 01:14:59 2008
***************
*** 451,457 ****
              tsp = cm_FindServer(&tsockAddr, CM_SERVER_FILE);
              if (!tsp)
                  tsp = cm_NewServer(&tsockAddr, CM_SERVER_FILE,
!                                     cellp);
  
              /* if this server was created by fs setserverprefs */
              if ( !tsp->cellp ) 
--- 451,457 ----
              tsp = cm_FindServer(&tsockAddr, CM_SERVER_FILE);
              if (!tsp)
                  tsp = cm_NewServer(&tsockAddr, CM_SERVER_FILE,
!                                     cellp, 0);
  
              /* if this server was created by fs setserverprefs */
              if ( !tsp->cellp ) 
***************
*** 617,641 ****
          
      /* return it held */
      if (volp) {
! 	lock_ObtainMutex(&volp->mx);
          
! 	code = 0;
! 	if (volp->flags & CM_VOLUMEFLAG_RESET) {
! 	    code = cm_UpdateVolume(cellp, userp, reqp, volp);
! 	    if (code == 0)
! 		volp->flags &= ~CM_VOLUMEFLAG_RESET;
! 	}
! 	lock_ReleaseMutex(&volp->mx);
! 	if (code == 0) {
! 	    *outVolpp = volp;
! 
!             lock_ObtainWrite(&cm_volumeLock);
!             cm_AdjustVolumeLRU(volp);
!             lock_ReleaseWrite(&cm_volumeLock);
          } else
! 	    cm_PutVolume(volp);
  
! 	return code;
      }
          
      /* otherwise, we didn't find it so consult the VLDB */
--- 617,643 ----
          
      /* return it held */
      if (volp) {
!         lock_ObtainMutex(&volp->mx);
          
!         code = 0;
!         if ((volp->flags & CM_VOLUMEFLAG_RESET) && !(flags & CM_GETVOL_FLAG_NO_RESET)) {
!             code = cm_UpdateVolume(cellp, userp, reqp, volp);
!             if (code == 0)
!                 volp->flags &= ~CM_VOLUMEFLAG_RESET;
!         }
!         lock_ReleaseMutex(&volp->mx);
!         if (code == 0) {
!             *outVolpp = volp;
! 
!             if (!(flags & CM_GETVOL_FLAG_NO_LRU_UPDATE)) {
!                 lock_ObtainWrite(&cm_volumeLock);
!                 cm_AdjustVolumeLRU(volp);
!                 lock_ReleaseWrite(&cm_volumeLock);
!             }
          } else
!             cm_PutVolume(volp);
  
!         return code;
      }
          
      /* otherwise, we didn't find it so consult the VLDB */
***************
*** 784,793 ****
      }
  
      /* if we get here we are holding the mutex */
!     if (volp->flags & CM_VOLUMEFLAG_RESET) {
! 	code = cm_UpdateVolume(cellp, userp, reqp, volp);
! 	if (code == 0)
! 	    volp->flags &= ~CM_VOLUMEFLAG_RESET;
      }	
      lock_ReleaseMutex(&volp->mx);
  
--- 786,795 ----
      }
  
      /* if we get here we are holding the mutex */
!     if ((volp->flags & CM_VOLUMEFLAG_RESET) && !(flags & CM_GETVOL_FLAG_NO_RESET)) {
!         code = cm_UpdateVolume(cellp, userp, reqp, volp);
!         if (code == 0)
!             volp->flags &= ~CM_VOLUMEFLAG_RESET;
      }	
      lock_ReleaseMutex(&volp->mx);
  
***************
*** 796,808 ****
          code = CM_ERROR_NOSUCHVOLUME;
  
      if (code == 0) {
! 	*outVolpp = volp;
! 
!         lock_ObtainWrite(&cm_volumeLock);
!         cm_AdjustVolumeLRU(volp);
!         lock_ReleaseWrite(&cm_volumeLock);
      } else
! 	cm_PutVolume(volp);
  
      return code;
  }	
--- 798,812 ----
          code = CM_ERROR_NOSUCHVOLUME;
  
      if (code == 0) {
! 		*outVolpp = volp;
! 		
! 		if (!(flags & CM_GETVOL_FLAG_NO_LRU_UPDATE)) {
! 	        lock_ObtainWrite(&cm_volumeLock);
! 			cm_AdjustVolumeLRU(volp);
! 			lock_ReleaseWrite(&cm_volumeLock);
! 		}
      } else
! 		cm_PutVolume(volp);
  
      return code;
  }	
***************
*** 818,824 ****
  
      if (!fidp) return;
  
!     cellp = cm_FindCellByID(fidp->cell);
      if (!cellp) return;
  
      /* search for the volume */
--- 822,828 ----
  
      if (!fidp) return;
  
!     cellp = cm_FindCellByID(fidp->cell, 0);
      if (!cellp) return;
  
      /* search for the volume */
***************
*** 1018,1023 ****
--- 1022,1028 ----
                  serversp->status = srv_not_busy;
          }
  
+         lock_ReleaseMutex(&volp->mx);
          do {
              code = cm_ConnFromVolume(volp, volp->rw.ID, cm_rootUserp, &req, &connp);
              if (code) 
***************
*** 1031,1036 ****
--- 1036,1042 ----
          } while (cm_Analyze(connp, cm_rootUserp, &req, NULL, NULL, NULL, NULL, code));
          code = cm_MapRPCError(code, &req);
  
+         lock_ObtainMutex(&volp->mx);
          if (code == 0 && volStat.Online) {
              cm_VolumeStatusNotification(volp, volp->rw.ID, volp->rw.state, vl_online);
              volp->rw.state = vl_online;
***************
*** 1051,1056 ****
--- 1057,1063 ----
                  serversp->status = srv_not_busy;
          }
  
+         lock_ReleaseMutex(&volp->mx);
          do {
              code = cm_ConnFromVolume(volp, volp->ro.ID, cm_rootUserp, &req, &connp);
              if (code) 
***************
*** 1064,1069 ****
--- 1071,1077 ----
          } while (cm_Analyze(connp, cm_rootUserp, &req, NULL, NULL, NULL, NULL, code));
          code = cm_MapRPCError(code, &req);
  
+         lock_ObtainMutex(&volp->mx);
          if (code == 0 && volStat.Online) {
              cm_VolumeStatusNotification(volp, volp->ro.ID, volp->ro.state, vl_online);
              volp->ro.state = vl_online;
***************
*** 1084,1089 ****
--- 1092,1098 ----
                  serversp->status = srv_not_busy;
          }
  
+         lock_ReleaseMutex(&volp->mx);
          do {
              code = cm_ConnFromVolume(volp, volp->bk.ID, cm_rootUserp, &req, &connp);
              if (code) 
***************
*** 1097,1102 ****
--- 1106,1112 ----
          } while (cm_Analyze(connp, cm_rootUserp, &req, NULL, NULL, NULL, NULL, code));
          code = cm_MapRPCError(code, &req);
  
+         lock_ObtainMutex(&volp->mx);
          if (code == 0 && volStat.Online) {
              cm_VolumeStatusNotification(volp, volp->bk.ID, volp->bk.state, vl_online);
              volp->bk.state = vl_online;
Index: openafs/src/WINNT/afsd/cm_volume.h
diff -c openafs/src/WINNT/afsd/cm_volume.h:1.5.6.7 openafs/src/WINNT/afsd/cm_volume.h:1.5.6.8
*** openafs/src/WINNT/afsd/cm_volume.h:1.5.6.7	Thu Nov 29 11:11:44 2007
--- openafs/src/WINNT/afsd/cm_volume.h	Thu Jan 24 10:31:13 2008
***************
*** 62,67 ****
--- 62,68 ----
  
  #define CM_GETVOL_FLAG_CREATE               1
  #define CM_GETVOL_FLAG_NO_LRU_UPDATE        2
+ #define CM_GETVOL_FLAG_NO_RESET		    4
  
  /* hash define.  Must not include the cell, since the callback revocation code
   * doesn't necessarily know the cell in the case of a multihomed server
Index: openafs/src/WINNT/afsd/fs.c
diff -c openafs/src/WINNT/afsd/fs.c:1.32.4.16 openafs/src/WINNT/afsd/fs.c:1.32.4.19
*** openafs/src/WINNT/afsd/fs.c:1.32.4.16	Fri Jan  4 02:58:40 2008
--- openafs/src/WINNT/afsd/fs.c	Fri Feb  8 21:32:19 2008
***************
*** 702,708 ****
      DWORD enabled = 0;
  
      code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,
!                          0, KEY_QUERY_VALUE, &parmKey);
      if (code == ERROR_SUCCESS) {
          dummyLen = sizeof(cm_freelanceEnabled);
          code = RegQueryValueEx(parmKey, "FreelanceClient", NULL, NULL,
--- 702,708 ----
      DWORD enabled = 0;
  
      code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,
!                          0, (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &parmKey);
      if (code == ERROR_SUCCESS) {
          dummyLen = sizeof(cm_freelanceEnabled);
          code = RegQueryValueEx(parmKey, "FreelanceClient", NULL, NULL,
***************
*** 721,727 ****
      DWORD enabled = 0;
  
      code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,
!                          0, KEY_QUERY_VALUE, &parmKey);
      if (code == ERROR_SUCCESS) {
          dummyLen = sizeof(buffer);
          code = RegQueryValueEx(parmKey, "NetbiosName", NULL, NULL,
--- 721,727 ----
      DWORD enabled = 0;
  
      code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,
!                          0, (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &parmKey);
      if (code == ERROR_SUCCESS) {
          dummyLen = sizeof(buffer);
          code = RegQueryValueEx(parmKey, "NetbiosName", NULL, NULL,
***************
*** 1112,1117 ****
--- 1112,1118 ----
      afs_int32 tc, code, id;
      char *nm;
      char cell[MAXCELLCHARS];
+     char confDir[257];
  
      for ( nm = aname; tc = *nm; nm++) {
  	/* all must be '-' or digit to be bad */
***************
*** 1124,1130 ****
      if (code)
          return 0;
  
!     pr_Initialize(1, AFSDIR_CLIENT_ETC_DIRPATH, cell);
      code = pr_SNameToId(aname, &id);
      pr_End();
  
--- 1125,1133 ----
      if (code)
          return 0;
  
!     cm_GetConfigDir(confDir, sizeof(confDir));
! 
!     pr_Initialize(1, confDir, cell);
      code = pr_SNameToId(aname, &id);
      pr_End();
  
***************
*** 1374,1384 ****
      afs_int32 code;
      struct ViceIoctl blob;
      struct cmd_item *ti;
- 
      int error = 0;
  
      for(ti=as->parms[0].items; ti; ti=ti->next) {
! 	blob.in_size = blob.out_size = 0;
  	code = pioctl(ti->data, VIOCFLUSH, &blob, 0);
  	if (code) {
  	    if (errno == EMFILE) {
--- 1377,1399 ----
      afs_int32 code;
      struct ViceIoctl blob;
      struct cmd_item *ti;
      int error = 0;
+     int literal = 0;
+     cm_ioctlQueryOptions_t options;
  
+     if (as->parms[1].items)
+         literal = 1;
+     
      for(ti=as->parms[0].items; ti; ti=ti->next) {
!         /* once per file */
!         memset(&options, 0, sizeof(options));
!         options.size = sizeof(options);
!         options.field_flags |= CM_IOCTL_QOPTS_FIELD_LITERAL;
!         options.literal = literal;
! 	blob.in_size = options.size;    /* no variable length data */
!         blob.in = &options;
! 
! 	blob.out_size = 0;
  	code = pioctl(ti->data, VIOCFLUSH, &blob, 0);
  	if (code) {
  	    if (errno == EMFILE) {
***************
*** 1470,1485 ****
      return error;
  }
  
! #ifndef WIN32
! /* 
!  * Why is VenusFid declared in the kernel-only section of afs.h, 
!  * if it's the exported interface of the (UNIX) cache manager?
!  */
! struct VenusFid {
!     afs_int32 Cell;
!     AFSFid Fid;
! };
! #endif /* WIN32 */
  
  static int 
  ExamineCmd(struct cmd_syndesc *as, void *arock)
--- 1485,1515 ----
      return error;
  }
  
! /* values match cache manager File Types */
! static char *
! filetypestr(afs_uint32 type)
! {
!     char * s = "Object";
! 
!     switch (type) {
!     case 1:     /* file */
!         s = "File";
!         break;
!     case 2:
!         s = "Directory";
!         break;
!     case 3:
!         s = "Symlink";
!         break;
!     case 4:
!         s = "Mountpoint";
!         break;
!     case 5:
!         s = "DfsLink";
!         break;
!     }
!     return s;
! }
  
  static int 
  ExamineCmd(struct cmd_syndesc *as, void *arock)
***************
*** 1490,1527 ****
      struct VolumeStatus *status;
      char *name, *offmsg, *motd;
      int error = 0;
!     
      SetDotDefault(&as->parms[0].items);
      for(ti=as->parms[0].items; ti; ti=ti->next) {
          cm_fid_t fid;
  	afs_uint32 owner[2];
  	char cell[MAXCELLCHARS];
  
! 	code = GetCell(ti->data, cell);
! 	if (code) {
! 	    Die(errno, ti->data);
! 	    error = 1;
! 	    continue;
! 	}
! 
! 	/* once per file */
! 	blob.in_size = 0;
  
          blob.out_size = sizeof(cm_fid_t);
          blob.out = (char *) &fid;
          if (0 == pioctl(ti->data, VIOCGETFID, &blob, 1)) {
!             printf("File %s (%u.%u.%u) contained in cell %s\n",
!                     ti->data, fid.volume, fid.vnode, fid.unique,
!                     cell);
          }
  
  	blob.out_size = 2 * sizeof(afs_uint32);
          blob.out = (char *) &owner;
  	if (0 == pioctl(ti->data, VIOCGETOWNER, &blob, 1)) {
  	    char oname[PR_MAXNAMELEN] = "(unknown)";
  
  	    /* Go to the PRDB and see if this all number username is valid */
! 	    pr_Initialize(1, AFSDIR_CLIENT_ETC_DIRPATH, cell);
  	    pr_SIdToName(owner[0], oname);
  	    printf("Owner %s (%u) Group %u\n", oname, owner[0], owner[1]);
          }
--- 1520,1583 ----
      struct VolumeStatus *status;
      char *name, *offmsg, *motd;
      int error = 0;
!     int literal = 0;
!     cm_ioctlQueryOptions_t options;
! 
!     if (as->parms[1].items)
!         literal = 1;
! 
      SetDotDefault(&as->parms[0].items);
      for(ti=as->parms[0].items; ti; ti=ti->next) {
          cm_fid_t fid;
+         afs_uint32 filetype;
  	afs_uint32 owner[2];
  	char cell[MAXCELLCHARS];
  
!         /* once per file */
!         memset(&fid, 0, sizeof(fid));
!         memset(&options, 0, sizeof(options));
!         filetype = 0;
!         options.size = sizeof(options);
!         options.field_flags |= CM_IOCTL_QOPTS_FIELD_LITERAL;
!         options.literal = literal;
! 	blob.in_size = options.size;    /* no variable length data */
!         blob.in = &options;
  
          blob.out_size = sizeof(cm_fid_t);
          blob.out = (char *) &fid;
          if (0 == pioctl(ti->data, VIOCGETFID, &blob, 1)) {
!             options.field_flags |= CM_IOCTL_QOPTS_FIELD_FID;
!             options.fid = fid;
!         } else {
! 	    Die(errno, ti->data);
! 	    error = 1;
! 	    continue;
          }
  
+         blob.out_size = sizeof(filetype);
+         blob.out = &filetype;
+ 
+         code = pioctl(ti->data, VIOC_GETFILETYPE, &blob, 1);
+ 
+         blob.out_size = MAXCELLCHARS;
+         blob.out = cell;
+ 
+         code = pioctl(ti->data, VIOC_FILE_CELL_NAME, &blob, 1);
+         printf("%s %s (%u.%u.%u) contained in cell %s\n",
+                 filetypestr(filetype),
+                 ti->data, fid.volume, fid.vnode, fid.unique,
+                 code ? "unknown-cell" : cell);
+ 
  	blob.out_size = 2 * sizeof(afs_uint32);
          blob.out = (char *) &owner;
  	if (0 == pioctl(ti->data, VIOCGETOWNER, &blob, 1)) {
  	    char oname[PR_MAXNAMELEN] = "(unknown)";
+             char confDir[257];
  
  	    /* Go to the PRDB and see if this all number username is valid */
!             cm_GetConfigDir(confDir, sizeof(confDir));
! 
!             pr_Initialize(1, confDir, cell);
  	    pr_SIdToName(owner[0], oname);
  	    printf("Owner %s (%u) Group %u\n", oname, owner[0], owner[1]);
          }
***************
*** 1606,1617 ****
      afs_int32 *hosts;
      char *tp;
      int error = 0;
      
      SetDotDefault(&as->parms[0].items);
      for(ti=as->parms[0].items; ti; ti=ti->next) {
! 	/* once per file */
! 	blob.out_size = MAXSIZE;
! 	blob.in_size = 0;
  	blob.out = space;
  	memset(space, 0, sizeof(space));
  	code = pioctl(ti->data, VIOCWHEREIS, &blob, 1);
--- 1662,1705 ----
      afs_int32 *hosts;
      char *tp;
      int error = 0;
+     int literal = 0;
+     cm_ioctlQueryOptions_t options;
+ 
+     if (as->parms[1].items)
+         literal = 1;
      
      SetDotDefault(&as->parms[0].items);
      for(ti=as->parms[0].items; ti; ti=ti->next) {
!         cm_fid_t fid;
!         afs_uint32 filetype;
! 
!         /* once per file */
!         memset(&fid, 0, sizeof(fid));
!         memset(&options, 0, sizeof(options));
!         filetype = 0;
!         options.size = sizeof(options);
!         options.field_flags |= CM_IOCTL_QOPTS_FIELD_LITERAL;
!         options.literal = literal;
! 	blob.in_size = options.size;    /* no variable length data */
!         blob.in = &options;
!         
!         blob.out_size = sizeof(cm_fid_t);
!         blob.out = (char *) &fid;
!         if (0 == pioctl(ti->data, VIOCGETFID, &blob, 1)) {
!             options.field_flags |= CM_IOCTL_QOPTS_FIELD_FID;
!             options.fid = fid;
!         } else {
! 	    Die(errno, ti->data);
! 	    error = 1;
! 	    continue;
!         }
! 
!         blob.out_size = sizeof(filetype);
!         blob.out = &filetype;
! 
!         code = pioctl(ti->data, VIOC_GETFILETYPE, &blob, 1);
! 
!         blob.out_size = MAXSIZE;
  	blob.out = space;
  	memset(space, 0, sizeof(space));
  	code = pioctl(ti->data, VIOCWHEREIS, &blob, 1);
***************
*** 1621,1627 ****
  	    continue;
  	}
  	hosts = (afs_int32 *) space;
! 	printf("File %s is on host%s ", ti->data, 
                  (hosts[0] && !hosts[1]) ? "": "s");
  	for(j=0; j<MAXHOSTS; j++) {
  	    if (hosts[j] == 0) 
--- 1709,1717 ----
  	    continue;
  	}
  	hosts = (afs_int32 *) space;
! 	printf("%s %s is on host%s ", 
!                 filetypestr(filetype),
!                 ti->data,
                  (hosts[0] && !hosts[1]) ? "": "s");
  	for(j=0; j<MAXHOSTS; j++) {
  	    if (hosts[j] == 0) 
***************
*** 2575,2586 ****
  {
      afs_int32 code;
      struct cmd_item *ti;
      int error = 0;
!     char cell[MAXCELLCHARS]="";
      
      SetDotDefault(&as->parms[0].items);
      for(ti=as->parms[0].items; ti; ti=ti->next) {
!         code = GetCell(ti->data, cell);
  	if (code) {
  	    if (errno == ENOENT)
  		fprintf(stderr,"%s: no such cell as '%s'\n", pn, ti->data);
--- 2665,2714 ----
  {
      afs_int32 code;
      struct cmd_item *ti;
+     struct ViceIoctl blob;
      int error = 0;
!     int literal = 0;
!     cm_ioctlQueryOptions_t options;
! 
!     if (as->parms[1].items)
!         literal = 1;
      
      SetDotDefault(&as->parms[0].items);
      for(ti=as->parms[0].items; ti; ti=ti->next) {
!         cm_fid_t fid;
!         afs_uint32 filetype;
! 	char cell[MAXCELLCHARS];
! 
!         /* once per file */
!         memset(&fid, 0, sizeof(fid));
!         memset(&options, 0, sizeof(options));
!         filetype = 0;
!         options.size = sizeof(options);
!         options.field_flags |= CM_IOCTL_QOPTS_FIELD_LITERAL;
!         options.literal = literal;
! 	blob.in_size = options.size;    /* no variable length data */
!         blob.in = &options;
! 
!         blob.out_size = sizeof(cm_fid_t);
!         blob.out = (char *) &fid;
!         if (0 == pioctl(ti->data, VIOCGETFID, &blob, 1)) {
!             options.field_flags |= CM_IOCTL_QOPTS_FIELD_FID;
!             options.fid = fid;
!         } else {
! 	    Die(errno, ti->data);
! 	    error = 1;
! 	    continue;
!         }
! 
!         blob.out_size = sizeof(filetype);
!         blob.out = &filetype;
! 
!         code = pioctl(ti->data, VIOC_GETFILETYPE, &blob, 1);
! 
!         blob.out_size = MAXCELLCHARS;
!         blob.out = cell;
! 
!         code = pioctl(ti->data, VIOC_FILE_CELL_NAME, &blob, 1);
  	if (code) {
  	    if (errno == ENOENT)
  		fprintf(stderr,"%s: no such cell as '%s'\n", pn, ti->data);
***************
*** 2589,2595 ****
  	    error = 1;
  	    continue;
  	}
!         printf("File %s lives in cell '%s'\n", ti->data, cell);
      }
      return error;
  }
--- 2717,2725 ----
  	    error = 1;
  	    continue;
  	}
!         printf("%s %s lives in cell '%s'\n",
!                 filetypestr(filetype),
!                 ti->data, cell);
      }
      return error;
  }
***************
*** 2625,2630 ****
--- 2755,2761 ----
  }
  */
  
+ #ifndef AFS_NT40_ENV
  static int
  MonitorCmd(struct cmd_syndesc *as, void *arock)
  {
***************
*** 2684,2689 ****
--- 2815,2821 ----
      }
      return 0;
  }
+ #endif /* AFS_NT40_ENV */
  
  static int
  SysNameCmd(struct cmd_syndesc *as, void *arock)
***************
*** 2755,2760 ****
--- 2887,2893 ----
      return 0;
  }
  
+ #ifndef AFS_NT40_ENV
  static char *exported_types[] = {"null", "nfs", ""};
  static int ExportAfsCmd(struct cmd_syndesc *as, void *arock)
  {
***************
*** 2856,2862 ****
      }
      return 0;
  }
! 
  
  static int
  GetCellCmd(struct cmd_syndesc *as, void *arock)
--- 2989,2995 ----
      }
      return 0;
  }
! #endif
  
  static int
  GetCellCmd(struct cmd_syndesc *as, void *arock)
***************
*** 2968,3012 ****
      return error;
  }
  
- #ifdef WIN32
  static int
  GetCellName(char *cellNamep, struct afsconf_cell *infop)
  {
      strcpy(infop->name, cellNamep);
      return 0;
  }
- #else
- static int
- GetCellName(char *cellName, struct afsconf_cell *info)
- {
-     struct afsconf_dir *tdir;
-     int code;
- 
-     tdir = afsconf_Open(AFSDIR_CLIENT_ETC_CLIENTNAME);
-     if (!tdir) {
- 	fprintf(stderr,
-                 "Could not process files in configuration directory (%s).\n",
-                  AFSDIR_CLIENT_ETC_CLIENTNAME);
- 	return -1;
-     }
- 
-     code = afsconf_GetCellInfo(tdir, cellName, AFSCONF_VLDBSERVICE, info);
-     if (code) {
- 	fprintf(stderr,"fs: cell %s not in %s/CellServDB\n", cellName, 
-                 AFSDIR_CLIENT_ETC_CLIENTNAME);
- 	return code;
-     }
- 
-     return 0;
- }
- #endif /* not WIN32 */
  
  static int
  VLDBInit(int noAuthFlag, struct afsconf_cell *info)
  {
      afs_int32 code;
  
!     code = ugen_ClientInit(noAuthFlag, AFSDIR_CLIENT_ETC_DIRPATH, 
  			   info->name, 0, &uclient, 
                             NULL, pn, rxkad_clear,
                             VLDB_MAXSERVERS, AFSCONF_VLDBSERVICE, 50,
--- 3101,3122 ----
      return error;
  }
  
  static int
  GetCellName(char *cellNamep, struct afsconf_cell *infop)
  {
      strcpy(infop->name, cellNamep);
      return 0;
  }
  
  static int
  VLDBInit(int noAuthFlag, struct afsconf_cell *info)
  {
      afs_int32 code;
+     char confDir[257];
+ 
+     cm_GetConfigDir(confDir, sizeof(confDir));
  
!     code = ugen_ClientInit(noAuthFlag, confDir, 
  			   info->name, 0, &uclient, 
                             NULL, pn, rxkad_clear,
                             VLDB_MAXSERVERS, AFSCONF_VLDBSERVICE, 50,
***************
*** 3926,3932 ****
                          0, 
                          "AFS", 
                          REG_OPTION_NON_VOLATILE,
!                         KEY_WRITE,
                          NULL, 
                          &hkCSCPolicy,
                          NULL );
--- 4036,4042 ----
                          0, 
                          "AFS", 
                          REG_OPTION_NON_VOLATILE,
!                         (IsWow64()?KEY_WOW64_64KEY:0)|KEY_WRITE,
                          NULL, 
                          &hkCSCPolicy,
                          NULL );
***************
*** 3974,3980 ****
                          0, 
                          "AFS", 
                          REG_OPTION_NON_VOLATILE,
!                         KEY_READ|KEY_QUERY_VALUE,
                          NULL, 
                          &hkCSCPolicy,
                          NULL );
--- 4084,4090 ----
                          0, 
                          "AFS", 
                          REG_OPTION_NON_VOLATILE,
!                         (IsWow64()?KEY_WOW64_64KEY:0)|KEY_READ|KEY_QUERY_VALUE,
                          NULL, 
                          &hkCSCPolicy,
                          NULL );
***************
*** 4486,4491 ****
--- 4596,4602 ----
  
      ts = cmd_CreateSyntax("flush", FlushCmd, NULL, "flush file from cache");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
+     cmd_AddParm(ts, "-literal", CMD_FLAG, CMD_OPTIONAL, "literal evaluation of mountpoints and symlinks");
      
  #ifndef WIN32
      ts = cmd_CreateSyntax("flushmount", FlushMountCmd, NULL,
***************
*** 4508,4513 ****
--- 4619,4625 ----
  
      ts = cmd_CreateSyntax("examine", ExamineCmd, NULL, "display file/volume status");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
+     cmd_AddParm(ts, "-literal", CMD_FLAG, CMD_OPTIONAL, "literal evaluation of mountpoints and symlinks");
      cmd_CreateAlias(ts, "lv");
      cmd_CreateAlias(ts, "listvol");
      
***************
*** 4597,4605 ****
--- 4709,4719 ----
  
      ts = cmd_CreateSyntax("whichcell", WhichCellCmd, NULL, "list file's cell");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
+     cmd_AddParm(ts, "-literal", CMD_FLAG, CMD_OPTIONAL, "literal evaluation of mountpoints and symlinks");
  
      ts = cmd_CreateSyntax("whereis", WhereIsCmd, NULL, "list file's location");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
+     cmd_AddParm(ts, "-literal", CMD_FLAG, CMD_OPTIONAL, "literal evaluation of mountpoints and symlinks");
  
      ts = cmd_CreateSyntax("wscell", WSCellCmd, NULL, "list workstation's cell");
      
***************
*** 4607,4617 ****
       ts = cmd_CreateSyntax("primarycell", PrimaryCellCmd, 0, "obsolete (listed primary cell)");
       */
      
      ts = cmd_CreateSyntax("monitor", MonitorCmd, NULL, "set cache monitor host address");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "host name or 'off'");
      cmd_CreateAlias(ts, "mariner");
!     
!    
      ts = cmd_CreateSyntax("getcellstatus", GetCellCmd, NULL, "get cell status");
      cmd_AddParm(ts, "-cell", CMD_LIST, 0, "cell name");
      
--- 4721,4732 ----
       ts = cmd_CreateSyntax("primarycell", PrimaryCellCmd, 0, "obsolete (listed primary cell)");
       */
      
+ #ifndef AFS_NT40_ENV
      ts = cmd_CreateSyntax("monitor", MonitorCmd, NULL, "set cache monitor host address");
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "host name or 'off'");
      cmd_CreateAlias(ts, "mariner");
! #endif
! 
      ts = cmd_CreateSyntax("getcellstatus", GetCellCmd, NULL, "get cell status");
      cmd_AddParm(ts, "-cell", CMD_LIST, 0, "cell name");
      
***************
*** 4628,4640 ****
      ts = cmd_CreateSyntax("sysname", SysNameCmd, NULL, "get/set sysname (i.e. @sys) value");
      cmd_AddParm(ts, "-newsys", CMD_LIST, CMD_OPTIONAL, "new sysname");
  
      ts = cmd_CreateSyntax("exportafs", ExportAfsCmd, NULL, "enable/disable translators to AFS");
      cmd_AddParm(ts, "-type", CMD_SINGLE, 0, "exporter name");
      cmd_AddParm(ts, "-start", CMD_SINGLE, CMD_OPTIONAL, "start/stop translator ('on' or 'off')");
      cmd_AddParm(ts, "-convert", CMD_SINGLE, CMD_OPTIONAL, "convert from afs to unix mode ('on or 'off')");
      cmd_AddParm(ts, "-uidcheck", CMD_SINGLE, CMD_OPTIONAL, "run on strict 'uid check' mode ('on' or 'off')");
      cmd_AddParm(ts, "-submounts", CMD_SINGLE, CMD_OPTIONAL, "allow nfs mounts to subdirs of /afs/.. ('on' or 'off')");
! 
  
      ts = cmd_CreateSyntax("storebehind", StoreBehindCmd, NULL, 
  			  "store to server after file close");
--- 4743,4756 ----
      ts = cmd_CreateSyntax("sysname", SysNameCmd, NULL, "get/set sysname (i.e. @sys) value");
      cmd_AddParm(ts, "-newsys", CMD_LIST, CMD_OPTIONAL, "new sysname");
  
+ #ifndef AFS_NT40_ENV
      ts = cmd_CreateSyntax("exportafs", ExportAfsCmd, NULL, "enable/disable translators to AFS");
      cmd_AddParm(ts, "-type", CMD_SINGLE, 0, "exporter name");
      cmd_AddParm(ts, "-start", CMD_SINGLE, CMD_OPTIONAL, "start/stop translator ('on' or 'off')");
      cmd_AddParm(ts, "-convert", CMD_SINGLE, CMD_OPTIONAL, "convert from afs to unix mode ('on or 'off')");
      cmd_AddParm(ts, "-uidcheck", CMD_SINGLE, CMD_OPTIONAL, "run on strict 'uid check' mode ('on' or 'off')");
      cmd_AddParm(ts, "-submounts", CMD_SINGLE, CMD_OPTIONAL, "allow nfs mounts to subdirs of /afs/.. ('on' or 'off')");
! #endif
  
      ts = cmd_CreateSyntax("storebehind", StoreBehindCmd, NULL, 
  			  "store to server after file close");
Index: openafs/src/WINNT/afsd/fs_utils.c
diff -c openafs/src/WINNT/afsd/fs_utils.c:1.10.2.2 openafs/src/WINNT/afsd/fs_utils.c:1.10.2.4
*** openafs/src/WINNT/afsd/fs_utils.c:1.10.2.2	Sun Aug 19 20:07:59 2007
--- openafs/src/WINNT/afsd/fs_utils.c	Fri Feb  8 21:32:19 2008
***************
*** 175,181 ****
  
      /* compute the # itself */
      while(tc = *as) {
! 	if (!ismeta(tc, base)) return -1;
  	total *= base;
  	total += getmeta(tc);
  	as++;
--- 175,181 ----
  
      /* compute the # itself */
      while(tc = *as) {
! 	if (!ismeta(base, tc)) return -1;
  	total *= base;
  	total += getmeta(tc);
  	as++;
***************
*** 197,203 ****
      char *pmount=mountRoot;
      DWORD len=sizeof(mountRoot)-1;
      printf("int mountroot \n");
!     if ((RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY, 0, KEY_QUERY_VALUE, &parmKey)!= ERROR_SUCCESS) 
           || (RegQueryValueEx(parmKey, "Mountroot", NULL, NULL,(LPBYTE)(mountRoot), &len)!= ERROR_SUCCESS)
           || (len==sizeof(mountRoot)-1)
           ) 
--- 197,204 ----
      char *pmount=mountRoot;
      DWORD len=sizeof(mountRoot)-1;
      printf("int mountroot \n");
!     if ((RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY, 0, 
!                       (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &parmKey)!= ERROR_SUCCESS)
           || (RegQueryValueEx(parmKey, "Mountroot", NULL, NULL,(LPBYTE)(mountRoot), &len)!= ERROR_SUCCESS)
           || (len==sizeof(mountRoot)-1)
           ) 
***************
*** 215,218 ****
      strcpy(cm_back_slash_mount_root+1,pmount);
      cm_back_slash_mount_root[0]='\\';
  }
- 
--- 216,218 ----
Index: openafs/src/WINNT/afsd/lanahelper.cpp
diff -c openafs/src/WINNT/afsd/lanahelper.cpp:1.12.2.5 openafs/src/WINNT/afsd/lanahelper.cpp:1.12.2.6
*** openafs/src/WINNT/afsd/lanahelper.cpp:1.12.2.5	Mon Oct  1 16:03:44 2007
--- openafs/src/WINNT/afsd/lanahelper.cpp	Mon Jan 28 19:21:52 2008
***************
*** 572,579 ****
  	rv = RegQueryValueEx(hkConfig, szNetbiosNameValue, NULL, NULL, (LPBYTE) &regNbName, &dummyLen);
  	if(rv != ERROR_SUCCESS) 
  	    strcpy(regNbName, "AFS");
! 	else 
! 	    regNbName[15] = 0;
  
  	RegCloseKey(hkConfig);
      } else {
--- 572,581 ----
  	rv = RegQueryValueEx(hkConfig, szNetbiosNameValue, NULL, NULL, (LPBYTE) &regNbName, &dummyLen);
  	if(rv != ERROR_SUCCESS) 
  	    strcpy(regNbName, "AFS");
! 	else {
!             /* Max Suffix Length is 6 */
! 	    regNbName[6] = 0;
!         }
  
  	RegCloseKey(hkConfig);
      } else {
***************
*** 617,642 ****
      if(regNbName[0] &&
  	(regLana >=0 && lana_IsLoopback((lana_number_t) regLana,FALSE))) 	
      {
!         strncpy(nbName,regNbName,15);
!         nbName[16] = 0;
          strupr(nbName);
      } else {
- 	char * dot;
- 
  	if(flags & LANA_NETBIOS_NAME_SUFFIX) {
! 	    strcpy(nbName,"-AFS");
  	} else {
  	    dummyLen = sizeof(hostname);
  	    // assume we are not a cluster.
  	    rv = GetComputerName(hostname, &dummyLen);
  	    if(!SUCCEEDED(rv)) { // should not happen, but...
  		return rv;
  	    }
! 	    strncpy(nbName, hostname, 11);
! 	    nbName[11] = 0;
  	    if(dot = strchr(nbName,'.'))
  		*dot = 0;
! 	    strcat(nbName,"-AFS");
  	}
      }
  
--- 619,648 ----
      if(regNbName[0] &&
  	(regLana >=0 && lana_IsLoopback((lana_number_t) regLana,FALSE))) 	
      {
!         strncpy(nbName,regNbName,14);
!         nbName[14] = 0;
          strupr(nbName);
      } else {
  	if(flags & LANA_NETBIOS_NAME_SUFFIX) {
! 	    _snprintf(nbName, MAX_NB_NAME_LENGTH, "-%s", regNbName);
!             nbName[14] = 0;
  	} else {
+             char * dot;
+ 
  	    dummyLen = sizeof(hostname);
  	    // assume we are not a cluster.
  	    rv = GetComputerName(hostname, &dummyLen);
  	    if(!SUCCEEDED(rv)) { // should not happen, but...
  		return rv;
  	    }
! 	    strncpy(nbName, hostname, MAX_NB_NAME_LENGTH);
!             nbName[MAX_NB_NAME_LENGTH-1] = 0;
! 	    nbName[MAX_NB_NAME_LENGTH-strlen(regNbName)-2] = 0;
  	    if(dot = strchr(nbName,'.'))
  		*dot = 0;
!             strncat(nbName, "-", MAX_NB_NAME_LENGTH);
! 	    strncat(nbName, regNbName, MAX_NB_NAME_LENGTH);
!             nbName[MAX_NB_NAME_LENGTH-1] = 0;
  	}
      }
  
Index: openafs/src/WINNT/afsd/lanahelper.h
diff -c openafs/src/WINNT/afsd/lanahelper.h:1.5.6.1 openafs/src/WINNT/afsd/lanahelper.h:1.5.6.3
*** openafs/src/WINNT/afsd/lanahelper.h:1.5.6.1	Sat Oct 21 16:47:48 2006
--- openafs/src/WINNT/afsd/lanahelper.h	Mon Jan 28 19:21:52 2008
***************
*** 35,42 ****
  
    typedef BYTE lana_number_t;
  
- #define LANA_INVALID 0xff
- 
      struct LANAINFO
      {
          lana_number_t lana_number;
--- 35,40 ----
***************
*** 44,50 ****
      };
  
  #define LANA_INVALID 0xff
! #define MAX_NB_NAME_LENGTH 17
  
  #define LANA_NETBIOS_NAME_SUFFIX 1
  #define LANA_NETBIOS_NAME_FULL 0
--- 42,48 ----
      };
  
  #define LANA_INVALID 0xff
! #define MAX_NB_NAME_LENGTH 16
  
  #define LANA_NETBIOS_NAME_SUFFIX 1
  #define LANA_NETBIOS_NAME_FULL 0
Index: openafs/src/WINNT/afsd/libafsconf.def
diff -c openafs/src/WINNT/afsd/libafsconf.def:1.4 openafs/src/WINNT/afsd/libafsconf.def:1.4.6.1
*** openafs/src/WINNT/afsd/libafsconf.def:1.4	Fri Mar 11 00:33:23 2005
--- openafs/src/WINNT/afsd/libafsconf.def	Fri Feb  1 16:39:41 2008
***************
*** 23,26 ****
          cm_GetConfigDir                 @16
          afs_uuid_create                 @17
          afs_uuid_equal                  @18
!   
\ No newline at end of file
--- 23,26 ----
          cm_GetConfigDir                 @16
          afs_uuid_create                 @17
          afs_uuid_equal                  @18
!         cm_GetCellServDB                @19
Index: openafs/src/WINNT/afsd/smb.c
diff -c openafs/src/WINNT/afsd/smb.c:1.118.2.50 openafs/src/WINNT/afsd/smb.c:1.118.2.58
*** openafs/src/WINNT/afsd/smb.c:1.118.2.50	Sun Jan  6 01:26:06 2008
--- openafs/src/WINNT/afsd/smb.c	Fri Feb  8 21:32:19 2008
***************
*** 64,72 ****
  osi_rwlock_t smb_globalLock;
  osi_rwlock_t smb_rctLock;
  osi_mutex_t  smb_ListenerLock;
   
! char smb_LANadapter = -1;
  unsigned char smb_sharename[NCBNAMSZ+1] = {0};
  
  BOOL isGateway = FALSE;
  
--- 64,74 ----
  osi_rwlock_t smb_globalLock;
  osi_rwlock_t smb_rctLock;
  osi_mutex_t  smb_ListenerLock;
+ osi_mutex_t  smb_StartedLock;
   
! unsigned char smb_LANadapter = LANA_INVALID;
  unsigned char smb_sharename[NCBNAMSZ+1] = {0};
+ int  smb_LanAdapterChangeDetected = 0;
  
  BOOL isGateway = FALSE;
  
***************
*** 96,101 ****
--- 98,104 ----
  EVENT_HANDLE **NCBreturns;
  EVENT_HANDLE **NCBShutdown;
  EVENT_HANDLE *smb_ServerShutdown;
+ EVENT_HANDLE ListenerShutdown[256];
  DWORD NCBsessions[NCB_MAX];
  NCB *NCBs[NCB_MAX];
  struct smb_packet *bufs[NCB_MAX];
***************
*** 106,112 ****
  int lanas[SESSION_MAX];
  BOOL dead_sessions[SESSION_MAX];
  LANA_ENUM lana_list;
- 
  /* for raw I/O */
  osi_mutex_t smb_RawBufLock;
  #ifdef DJGPP
--- 109,114 ----
***************
*** 180,186 ****
  /* forward decl */
  void smb_DispatchPacket(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp,
  			NCB *ncbp, raw_write_cont_t *rwcp);
! int smb_NetbiosInit(void);
  #ifdef DJGPP
  #ifndef AFS_WIN95_ENV
  DWORD smb_ServerExceptionFilter(void);
--- 182,188 ----
  /* forward decl */
  void smb_DispatchPacket(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp,
  			NCB *ncbp, raw_write_cont_t *rwcp);
! int smb_NetbiosInit(int);
  #ifdef DJGPP
  #ifndef AFS_WIN95_ENV
  DWORD smb_ServerExceptionFilter(void);
***************
*** 2824,2834 ****
          NTStatus = 0xC09820FBL;	/* SMB use standard */
      }
      else if (code == CM_ERROR_QUOTA) {
- #ifdef COMMENT
          NTStatus = 0xC0000044L;	/* Quota exceeded */
- #else
-         NTStatus = 0xC000007FL;	/* Disk full */
- #endif
      }
      else if (code == CM_ERROR_SPACE) {
          NTStatus = 0xC000007FL;	/* Disk full */
--- 2826,2832 ----
***************
*** 2887,2893 ****
      } 
      else if (code == CM_ERROR_BAD_LEVEL) {
  	NTStatus = 0xC0000148L;	/* Invalid Level */
!     } else {
          NTStatus = 0xC0982001L;	/* SMB non-specific error */
      }
  
--- 2885,2895 ----
      } 
      else if (code == CM_ERROR_BAD_LEVEL) {
  	NTStatus = 0xC0000148L;	/* Invalid Level */
!     } 
!     else if (code == CM_ERROR_RANGE_NOT_LOCKED) {
! 	NTStatus = 0xC000007EL;	/* Range Not Locked */
!     } 
!     else {
          NTStatus = 0xC0982001L;	/* SMB non-specific error */
      }
  
***************
*** 8451,8456 ****
--- 8453,8464 ----
      time_t now;
  #endif /* DJGPP */
      INT_PTR lana = (INT_PTR) parmp;
+     char eventName[MAX_PATH];
+ 
+     sprintf(eventName,"smb_Listener_lana_%d", (char)lana);
+     ListenerShutdown[lana] = thrd_CreateEvent(NULL, FALSE, FALSE, eventName);
+     if ( GetLastError() == ERROR_ALREADY_EXISTS )
+         thrd_ResetEvent(ListenerShutdown[lana]);
  
      ncbp = GetNCB();
  #ifdef DJGPP
***************
*** 8484,8510 ****
  #else /* DJGPP */
          code = Netbios(ncbp, dos_ncb);
  #endif
! 	if (code == NRC_BRIDGE) {
  	    int lanaRemaining = 0;
  
!             if (smb_ListenerState == SMB_LISTENER_STOPPED || smbShutdownFlag == 1) {
! #ifndef DJGPP
!                 ExitThread(1);
! #else
!                 thrd_Exit(1);
! #endif
              }
  
! 	    osi_Log2(smb_logp,
!                      "NCBLISTEN lana=%d failed with NRC_BRIDGE.  Listener thread exiting.",
!                      ncbp->ncb_lana_num, code);
  
  	    for (i = 0; i < lana_list.length; i++) {
! 		if (lana_list.lana[i] == ncbp->ncb_lana_num) {
! 		    smb_StopListener(ncbp, lana_list.lana[i]);
! 		    lana_list.lana[i] = 255;
  		}
! 		if (lana_list.lana[i] != 255)
  		    lanaRemaining++;
  	    }
  
--- 8492,8527 ----
  #else /* DJGPP */
          code = Netbios(ncbp, dos_ncb);
  #endif
!         if (code == NRC_NAMERR) {
!             /* An smb shutdown or Vista resume must have taken place */
! 	    osi_Log2(smb_logp,
!                      "NCBLISTEN lana=%d failed with NRC_NAMERR.",
!                      ncbp->ncb_lana_num, code);
! 
!             if (lock_TryMutex(&smb_StartedLock)) {
!                 lana_list.lana[i] = LANA_INVALID;
!                 lock_ReleaseMutex(&smb_StartedLock);
!             }
!             break;
!         } else if (code == NRC_BRIDGE || code != 0) {
  	    int lanaRemaining = 0;
  
!             while (!lock_TryMutex(&smb_StartedLock)) {
!                 if (smb_ListenerState == SMB_LISTENER_STOPPED || smbShutdownFlag == 1)
!                     goto exit_thread;
!                 Sleep(50);
              }
  
!             osi_Log2(smb_logp,
!                      "NCBLISTEN lana=%d failed with %s.  Listener thread exiting.",
!                      ncbp->ncb_lana_num, ncb_error_string(code));
  
  	    for (i = 0; i < lana_list.length; i++) {
! 		if (lana_list.lana[i] == lana) {
! 		    smb_StopListener(ncbp, lana_list.lana[i], FALSE);
! 		    lana_list.lana[i] = LANA_INVALID;
  		}
! 		if (lana_list.lana[i] != LANA_INVALID)
  		    lanaRemaining++;
  	    }
  
***************
*** 8515,8550 ****
  #endif
                                                );
  		smb_ListenerState = SMB_LISTENER_STOPPED;
! 		smb_LANadapter = -1;
  		lana_list.length = 0;
  	    }
! 	    FreeNCB(ncbp);
! 	    return;
! 	} else if (code != 0) {
  #ifndef DJGPP
              char tbuffer[AFSPATHMAX];
  #endif
  
              /* terminate silently if shutdown flag is set */
!             if (smb_ListenerState == SMB_LISTENER_STOPPED || smbShutdownFlag == 1) {
! #ifndef DJGPP
!                 ExitThread(1);
! #else
!                 thrd_Exit(1);
! #endif
              }
  
!             osi_Log2(smb_logp, 
!                      "NCBLISTEN lana=%d failed with code %d",
!                      ncbp->ncb_lana_num, code);
              osi_Log0(smb_logp, 
                       "Client exiting due to network failure. Please restart client.\n");
  
  #ifndef DJGPP
              sprintf(tbuffer, 
                       "Client exiting due to network failure.  Please restart client.\n"
!                      "NCBLISTEN lana=%d failed with code %d",
!                      ncbp->ncb_lana_num, code);
              if (showErrors)
                  code = (*smb_MBfunc)(NULL, tbuffer, "AFS Client Service: Fatal Error",
                                        MB_OK|MB_SERVICE_NOTIFICATION);
--- 8532,8567 ----
  #endif
                                                );
  		smb_ListenerState = SMB_LISTENER_STOPPED;
! 		smb_LANadapter = LANA_INVALID;
  		lana_list.length = 0;
  	    }
!             lock_ReleaseMutex(&smb_StartedLock);
! 	    break;
! 	}
! #if 0
!         else if (code != 0) {
  #ifndef DJGPP
              char tbuffer[AFSPATHMAX];
  #endif
  
              /* terminate silently if shutdown flag is set */
!             while (!lock_TryMutex(&smb_StartedLock)) {
!                 if (smb_ListenerState == SMB_LISTENER_STOPPED || smbShutdownFlag == 1)
!                     goto exit_thread;
!                 Sleep(50);
              }
  
!             osi_Log3(smb_logp, 
!                      "NCBLISTEN lana=%d failed with code %d [%s]",
!                      ncbp->ncb_lana_num, code, ncb_error_string(code));
              osi_Log0(smb_logp, 
                       "Client exiting due to network failure. Please restart client.\n");
  
  #ifndef DJGPP
              sprintf(tbuffer, 
                       "Client exiting due to network failure.  Please restart client.\n"
!                      "NCBLISTEN lana=%d failed with code %d [%s]",
!                      ncbp->ncb_lana_num, code, ncb_error_string(code));
              if (showErrors)
                  code = (*smb_MBfunc)(NULL, tbuffer, "AFS Client Service: Fatal Error",
                                        MB_OK|MB_SERVICE_NOTIFICATION);
***************
*** 8557,8563 ****
--- 8574,8584 ----
              fprintf(stderr, "Please restart client.\n");
              afs_exit(AFS_EXITCODE_NETWORK_FAILURE);
  #endif /* !DJGPP */
+ 
+             lock_ReleaseMutex(&smb_StartedLock);
+             break;
          }
+ #endif /* 0 */
  
          /* check for remote conns */
          /* first get remote name and insert null terminator */
***************
*** 8751,8784 ****
          lock_ReleaseMutex(&smb_ListenerLock);
      }	/* dispatch while loop */
  
      FreeNCB(ncbp);
  }
  
  
! void smb_LanAdapterChange(void) {
      lana_number_t lanaNum;
      BOOL          bGateway;
      char          NetbiosName[MAX_NB_NAME_LENGTH] = "";
      int           change = 0;
  
      if (!powerStateSuspended && 
          SUCCEEDED(lana_GetUncServerNameEx(NetbiosName, &lanaNum, &bGateway, 
!                                           LANA_NETBIOS_NAME_FULL))) {
!         if (smb_LANadapter != lanaNum ||
!             isGateway != bGateway ||
!             strcmp(cm_NetbiosName, NetbiosName))
              change = 1;
      } 
  
      if (change) {
          afsi_log("Lan Adapter Change detected");
!         smb_StopListeners();
!         smb_RestartListeners();
      }
  }
  
  /* initialize Netbios */
! int smb_NetbiosInit(void)
  {
      NCB *ncbp;
  #ifdef DJGPP
--- 8772,8869 ----
          lock_ReleaseMutex(&smb_ListenerLock);
      }	/* dispatch while loop */
  
+ exit_thread:
      FreeNCB(ncbp);
+     thrd_SetEvent(ListenerShutdown[lana]);
+     return;
+ }
+ 
+ static void
+ smb_LanAdapterChangeThread(void *param)
+ {
+     /* 
+      * Give the IPAddrDaemon thread a chance
+      * to block before we trigger.
+      */
+     Sleep(30000);
+     smb_LanAdapterChange(0);
  }
  
+ void smb_SetLanAdapterChangeDetected(void)
+ {
+     int lpid;
+     thread_t phandle;
+ 
+     lock_ObtainMutex(&smb_StartedLock);
  
!     if (!powerStateSuspended) {
!         phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_LanAdapterChangeThread,
!                               NULL, 0, &lpid, "smb_LanAdapterChange");
!         osi_assertx(phandle != NULL, "smb_LanAdapterChangeThread thread creation failure");
!         thrd_CloseHandle(phandle);
!     }
! 
!     smb_LanAdapterChangeDetected = 1;
!     lock_ReleaseMutex(&smb_StartedLock);
! }
! 
! void smb_LanAdapterChange(int locked) {
      lana_number_t lanaNum;
      BOOL          bGateway;
      char          NetbiosName[MAX_NB_NAME_LENGTH] = "";
      int           change = 0;
+     LANA_ENUM     temp_list;           
+     long          code;
+     int           i;
+ 
+ 
+     afsi_log("smb_LanAdapterChange");
+ 
+     if (!locked)
+         lock_ObtainMutex(&smb_StartedLock);
+     
+     smb_LanAdapterChangeDetected = 0;
  
      if (!powerStateSuspended && 
          SUCCEEDED(lana_GetUncServerNameEx(NetbiosName, &lanaNum, &bGateway, 
!                                           LANA_NETBIOS_NAME_FULL)) &&
!         lanaNum != LANA_INVALID && smb_LANadapter != lanaNum) {
!         if ( isGateway != bGateway ||
!              strcmp(cm_NetbiosName, NetbiosName) ) {
              change = 1;
+         } else {
+             NCB *ncbp = GetNCB();
+             ncbp->ncb_command = NCBENUM;
+             ncbp->ncb_buffer = (PUCHAR)&temp_list;
+             ncbp->ncb_length = sizeof(temp_list);
+             code = Netbios(ncbp);
+             if (code == 0) {
+                 if (temp_list.length != lana_list.length)
+                     change = 1;
+                 else {
+                     for (i=0; i<lana_list.length; i++) {
+                         if ( temp_list.lana[i] != lana_list.lana[i] ) {
+                             change = 1;
+                             break;
+                         }
+                     }
+                 }
+             }
+ 	    FreeNCB(ncbp);
+         }
      } 
  
      if (change) {
          afsi_log("Lan Adapter Change detected");
!         smb_StopListeners(1);
!         smb_RestartListeners(1);
      }
+     if (!locked)
+         lock_ReleaseMutex(&smb_StartedLock);
  }
  
  /* initialize Netbios */
! int smb_NetbiosInit(int locked)
  {
      NCB *ncbp;
  #ifdef DJGPP
***************
*** 8791,8796 ****
--- 8876,8891 ----
      int lana_found = 0;
      lana_number_t lanaNum;
  
+     if (!locked)
+         lock_ObtainMutex(&smb_StartedLock);
+ 
+     if (smb_ListenerState != SMB_LISTENER_UNINITIALIZED &&
+          smb_ListenerState != SMB_LISTENER_STOPPED) {
+ 
+         if (!locked)
+             lock_ReleaseMutex(&smb_StartedLock);
+         return 0;
+     }
      /* setup the NCB system */
      ncbp = GetNCB();
  #ifdef DJGPP
***************
*** 8801,8807 ****
      if (SUCCEEDED(code = lana_GetUncServerNameEx(cm_NetbiosName, &lanaNum, &isGateway, LANA_NETBIOS_NAME_FULL))) {
          smb_LANadapter = (lanaNum == LANA_INVALID)? -1: lanaNum;
  
!         if (smb_LANadapter != -1)
              afsi_log("LAN adapter number %d", smb_LANadapter);
          else
              afsi_log("LAN adapter number not determined");
--- 8896,8902 ----
      if (SUCCEEDED(code = lana_GetUncServerNameEx(cm_NetbiosName, &lanaNum, &isGateway, LANA_NETBIOS_NAME_FULL))) {
          smb_LANadapter = (lanaNum == LANA_INVALID)? -1: lanaNum;
  
!         if (smb_LANadapter != LANA_INVALID)
              afsi_log("LAN adapter number %d", smb_LANadapter);
          else
              afsi_log("LAN adapter number not determined");
***************
*** 8827,8833 ****
  
  
  #ifndef DJGPP
!     if (smb_LANadapter == -1) {
          ncbp->ncb_command = NCBENUM;
          ncbp->ncb_buffer = (PUCHAR)&lana_list;
          ncbp->ncb_length = sizeof(lana_list);
--- 8922,8928 ----
  
  
  #ifndef DJGPP
!     if (smb_LANadapter == LANA_INVALID) {
          ncbp->ncb_command = NCBENUM;
          ncbp->ncb_buffer = (PUCHAR)&lana_list;
          ncbp->ncb_length = sizeof(lana_list);
***************
*** 8855,8861 ****
              code = ncbp->ncb_retcode;
          if (code != 0) {
              afsi_log("Netbios NCBRESET lana %d error code %d", lana_list.lana[i], code);
!             lana_list.lana[i] = 255;  /* invalid lana */
          } else {
              afsi_log("Netbios NCBRESET lana %d succeeded", lana_list.lana[i]);
          }
--- 8950,8956 ----
              code = ncbp->ncb_retcode;
          if (code != 0) {
              afsi_log("Netbios NCBRESET lana %d error code %d", lana_list.lana[i], code);
!             lana_list.lana[i] = LANA_INVALID;  /* invalid lana */
          } else {
              afsi_log("Netbios NCBRESET lana %d succeeded", lana_list.lana[i]);
          }
***************
*** 8863,8869 ****
  #else
      /* for DJGPP, there is no NCBENUM and NCBRESET is a real reset.  so
         we will just fake the LANA list */
!     if (smb_LANadapter == -1) {
          for (i = 0; i < 8; i++)
  	    lana_list.lana[i] = i;
          lana_list.length = 8;
--- 8958,8964 ----
  #else
      /* for DJGPP, there is no NCBENUM and NCBRESET is a real reset.  so
         we will just fake the LANA list */
!     if (smb_LANadapter == LANA_INVALID) {
          for (i = 0; i < 8; i++)
  	    lana_list.lana[i] = i;
          lana_list.length = 8;
***************
*** 8917,8923 ****
          else {
              afsi_log("Netbios NCBADDNAME lana %d error code %d", lana, code);
              if (code == NRC_BRIDGE) {    /* invalid LANA num */
!                 lana_list.lana[l] = 255;
                  continue;
              }
              else if (code == NRC_DUPNAME) {
--- 9012,9018 ----
          else {
              afsi_log("Netbios NCBADDNAME lana %d error code %d", lana, code);
              if (code == NRC_BRIDGE) {    /* invalid LANA num */
!                 lana_list.lana[l] = LANA_INVALID;
                  continue;
              }
              else if (code == NRC_DUPNAME) {
***************
*** 8937,8943 ****
                      afsi_log("Netbios NCBDELNAME lana %d error code %d\n", lana, code);
                  }
                  if (code != 0 || delname_tried) {
!                     lana_list.lana[l] = 255;
                  }
                  else if (code == 0) {
                      if (!delname_tried) {
--- 9032,9038 ----
                      afsi_log("Netbios NCBDELNAME lana %d error code %d\n", lana, code);
                  }
                  if (code != 0 || delname_tried) {
!                     lana_list.lana[l] = LANA_INVALID;
                  }
                  else if (code == 0) {
                      if (!delname_tried) {
***************
*** 8949,8958 ****
              }
              else {
                  afsi_log("Netbios NCBADDNAME lana %d error code %d", lana, code);
!                 lana_list.lana[l] = 255;  /* invalid lana */
              }
          }
          if (code == 0) {
              lana_found = 1;   /* at least one worked */
  #ifdef DJGPP
              break;
--- 9044,9054 ----
              }
              else {
                  afsi_log("Netbios NCBADDNAME lana %d error code %d", lana, code);
!                 lana_list.lana[l] = LANA_INVALID;  /* invalid lana */
              }
          }
          if (code == 0) {
+             smb_LANadapter = lana;
              lana_found = 1;   /* at least one worked */
  #ifdef DJGPP
              break;
***************
*** 8964,8970 ****
      if (!lana_found) {
          afsi_log("No valid LANA numbers found!");
  	lana_list.length = 0;
! 	smb_LANadapter = -1;
  	smb_ListenerState = SMB_LISTENER_STOPPED;
          cm_VolStatus_Network_Stopped(cm_NetbiosName
  #ifdef _WIN64
--- 9060,9066 ----
      if (!lana_found) {
          afsi_log("No valid LANA numbers found!");
  	lana_list.length = 0;
! 	smb_LANadapter = LANA_INVALID;
  	smb_ListenerState = SMB_LISTENER_STOPPED;
          cm_VolStatus_Network_Stopped(cm_NetbiosName
  #ifdef _WIN64
***************
*** 8976,8993 ****
      /* we're done with the NCB now */
      FreeNCB(ncbp);
  
!     return ((lana_list.length > 0 && smb_LANadapter != -1) ? 1 : 0);
  }
  
! void smb_StartListeners()
  {
      int i;
      int lpid;
      thread_t phandle;
  
!     if (smb_ListenerState == SMB_LISTENER_STARTED)
  	return;
!     
      smb_ListenerState = SMB_LISTENER_STARTED;
      cm_VolStatus_Network_Started(cm_NetbiosName
  #ifdef _WIN64
--- 9072,9103 ----
      /* we're done with the NCB now */
      FreeNCB(ncbp);
  
!     afsi_log("smb_NetbiosInit smb_LANadapter=%d",smb_LANadapter);
!     if (lana_list.length > 0)
!         osi_assert(smb_LANadapter != LANA_INVALID);
! 
!     if (!locked)
!         lock_ReleaseMutex(&smb_StartedLock);
! 
!     return (lana_list.length > 0 ? 1 : 0);
  }
  
! void smb_StartListeners(int locked)
  {
      int i;
      int lpid;
      thread_t phandle;
  
!     if (!locked)
!         lock_ObtainMutex(&smb_StartedLock);
! 
!     if (smb_ListenerState == SMB_LISTENER_STARTED) {
!         if (!locked)
!             lock_ReleaseMutex(&smb_StartedLock);
  	return;
!     }
! 
!     afsi_log("smb_StartListeners");
      smb_ListenerState = SMB_LISTENER_STARTED;
      cm_VolStatus_Network_Started(cm_NetbiosName
  #ifdef _WIN64
***************
*** 8996,9023 ****
                                    );
  
      for (i = 0; i < lana_list.length; i++) {
!         if (lana_list.lana[i] == 255) 
              continue;
          phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_Listener,
                                 (void*)lana_list.lana[i], 0, &lpid, "smb_Listener");
          osi_assertx(phandle != NULL, "smb_Listener thread creation failure");
          thrd_CloseHandle(phandle);
      }
  }
  
! void smb_RestartListeners()
  {
!     if (!powerStateSuspended) {
  	if (smb_ListenerState == SMB_LISTENER_STOPPED) {
! 		if (smb_NetbiosInit())
! 		    smb_StartListeners();
! 	}
! 	if (smb_LANadapter == -1)
! 		smb_LanAdapterChange();
      }
  }
  
! void smb_StopListener(NCB *ncbp, int lana)
  {
      long code;
  
--- 9106,9143 ----
                                    );
  
      for (i = 0; i < lana_list.length; i++) {
!         if (lana_list.lana[i] == LANA_INVALID) 
              continue;
          phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_Listener,
                                 (void*)lana_list.lana[i], 0, &lpid, "smb_Listener");
          osi_assertx(phandle != NULL, "smb_Listener thread creation failure");
          thrd_CloseHandle(phandle);
      }
+     if (!locked)
+         lock_ReleaseMutex(&smb_StartedLock);
  }
  
! void smb_RestartListeners(int locked)
  {
!     if (!locked)
!         lock_ObtainMutex(&smb_StartedLock);
! 
!     if (powerStateSuspended)
!         afsi_log("smb_RestartListeners called while suspended");
! 
!     if (!powerStateSuspended && smb_ListenerState != SMB_LISTENER_UNINITIALIZED) {
  	if (smb_ListenerState == SMB_LISTENER_STOPPED) {
!             if (smb_NetbiosInit(1))
!                 smb_StartListeners(1);
!         } else if (smb_LanAdapterChangeDetected) {
!             smb_LanAdapterChange(1);
!         }
      }
+     if (!locked)
+         lock_ReleaseMutex(&smb_StartedLock);
  }
  
! void smb_StopListener(NCB *ncbp, int lana, int wait)
  {
      long code;
  
***************
*** 9043,9058 ****
      } else {
  	afsi_log("Netbios NCBRESET lana %d succeeded", lana);
      }
  }
  
! void smb_StopListeners(void)
  {
      NCB *ncbp;
      int lana, l;
  
!     if (smb_ListenerState == SMB_LISTENER_STOPPED)
  	return;
  
      smb_ListenerState = SMB_LISTENER_STOPPED;
      cm_VolStatus_Network_Stopped(cm_NetbiosName
  #ifdef _WIN64
--- 9163,9188 ----
      } else {
  	afsi_log("Netbios NCBRESET lana %d succeeded", lana);
      }
+ 
+     if (wait)
+         thrd_WaitForSingleObject_Event(ListenerShutdown[lana], INFINITE);
  }
  
! void smb_StopListeners(int locked)
  {
      NCB *ncbp;
      int lana, l;
  
!     if (!locked)
!         lock_ObtainMutex(&smb_StartedLock);
! 
!     if (smb_ListenerState == SMB_LISTENER_STOPPED) {
!         if (!locked)
!             lock_ReleaseMutex(&smb_StartedLock);
  	return;
+     }
  
+     afsi_log("smb_StopListeners");
      smb_ListenerState = SMB_LISTENER_STOPPED;
      cm_VolStatus_Network_Stopped(cm_NetbiosName
  #ifdef _WIN64
***************
*** 9066,9084 ****
      for (l = 0; l < lana_list.length; l++) {
          lana = lana_list.lana[l];
  
! 	if (lana != 255) {
! 	    smb_StopListener(ncbp, lana);
  
  	    /* mark the adapter invalid */
! 	    lana_list.lana[l] = 255;  /* invalid lana */
  	}
      }
  
      /* force a re-evaluation of the network adapters */
      lana_list.length = 0;
!     smb_LANadapter = -1;
      FreeNCB(ncbp);
!     Sleep(1000);	/* give the listener threads a chance to exit */
  }
  
  void smb_Init(osi_log_t *logp, int useV3,
--- 9196,9215 ----
      for (l = 0; l < lana_list.length; l++) {
          lana = lana_list.lana[l];
  
! 	if (lana != LANA_INVALID) {
! 	    smb_StopListener(ncbp, lana, TRUE);
  
  	    /* mark the adapter invalid */
! 	    lana_list.lana[l] = LANA_INVALID;  /* invalid lana */
  	}
      }
  
      /* force a re-evaluation of the network adapters */
      lana_list.length = 0;
!     smb_LANadapter = LANA_INVALID;
      FreeNCB(ncbp);
!     if (!locked)
!         lock_ReleaseMutex(&smb_StartedLock);
  }
  
  void smb_Init(osi_log_t *logp, int useV3,
***************
*** 9099,9104 ****
--- 9230,9236 ----
  #endif /* DJGPP */
      EVENT_HANDLE retHandle;
      char eventName[MAX_PATH];
+     int startListeners = 0;
  
      smb_TlsRequestSlot = TlsAlloc();
  
***************
*** 9138,9143 ****
--- 9270,9276 ----
      lock_InitializeMutex(&smb_RawBufLock, "smb raw buffer lock");
  
      lock_InitializeMutex(&smb_ListenerLock, "smb listener lock");
+     lock_InitializeMutex(&smb_StartedLock, "smb started lock");
  	
      /* 4 Raw I/O buffers */
  #ifndef DJGPP
***************
*** 9186,9192 ****
      smb_ncbFreeListp = NULL;
      smb_packetFreeListp = NULL;
  
!     smb_NetbiosInit();
  
      /* Initialize listener and server structures */
      numVCs = 0;
--- 9319,9326 ----
      smb_ncbFreeListp = NULL;
      smb_packetFreeListp = NULL;
  
!     lock_ObtainMutex(&smb_StartedLock);
!     startListeners = smb_NetbiosInit(1);
  
      /* Initialize listener and server structures */
      numVCs = 0;
***************
*** 9453,9460 ****
      }
  
      /* Start listeners, waiters, servers, and daemons */
! 
!     smb_StartListeners();
  
  #ifndef DJGPP
      phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_ClientWaiter,
--- 9587,9594 ----
      }
  
      /* Start listeners, waiters, servers, and daemons */
!     if (startListeners)
!         smb_StartListeners(1);
  
  #ifndef DJGPP
      phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_ClientWaiter,
***************
*** 9489,9494 ****
--- 9623,9629 ----
      smb_ListShares();
  #endif
  
+     lock_ReleaseMutex(&smb_StartedLock);
      return;
  }
  
***************
*** 9558,9564 ****
      /* Delete Netbios name */
      memset((char *)ncbp, 0, sizeof(NCB));
      for (i = 0; i < lana_list.length; i++) {
!         if (lana_list.lana[i] == 255) continue;
          ncbp->ncb_command = NCBDELNAME;
          ncbp->ncb_lana_num = lana_list.lana[i];
          memcpy(ncbp->ncb_name,smb_sharename,NCBNAMSZ);
--- 9693,9699 ----
      /* Delete Netbios name */
      memset((char *)ncbp, 0, sizeof(NCB));
      for (i = 0; i < lana_list.length; i++) {
!         if (lana_list.lana[i] == LANA_INVALID) continue;
          ncbp->ncb_command = NCBDELNAME;
          ncbp->ncb_lana_num = lana_list.lana[i];
          memcpy(ncbp->ncb_name,smb_sharename,NCBNAMSZ);
***************
*** 9781,9785 ****
  
  long smb_IsNetworkStarted(void)
  {
!     return (smb_ListenerState == SMB_LISTENER_STARTED && smbShutdownFlag == 0);
  }
--- 9916,9924 ----
  
  long smb_IsNetworkStarted(void)
  {
!     long rc;
!     lock_ObtainWrite(&smb_globalLock);
!     rc = (smb_ListenerState == SMB_LISTENER_STARTED && smbShutdownFlag == 0);
!     lock_ReleaseWrite(&smb_globalLock);
!     return rc;
  }
Index: openafs/src/WINNT/afsd/smb.h
diff -c openafs/src/WINNT/afsd/smb.h:1.41.2.21 openafs/src/WINNT/afsd/smb.h:1.41.2.23
*** openafs/src/WINNT/afsd/smb.h:1.41.2.21	Sat Jan  5 12:56:30 2008
--- openafs/src/WINNT/afsd/smb.h	Thu Jan 10 18:00:41 2008
***************
*** 755,765 ****
  extern void smb_UpdateServerPriority(void);
  extern void smb_SetRequestStartTime(void);
  extern void smb_ResetServerPriority(void);
! extern void smb_RestartListeners(void);
! extern void smb_StopListeners(void);
! extern void smb_StopListener(NCB *ncbp, int lana);
  extern long smb_IsNetworkStarted(void);
! extern void smb_LanAdapterChange(void);
  
  #define SMB_LISTENER_UNINITIALIZED -1
  #define SMB_LISTENER_STOPPED 0
--- 755,767 ----
  extern void smb_UpdateServerPriority(void);
  extern void smb_SetRequestStartTime(void);
  extern void smb_ResetServerPriority(void);
! extern void smb_RestartListeners(int);
! extern void smb_StopListeners(int);
! extern void smb_StopListener(NCB *ncbp, int lana, int wait);
  extern long smb_IsNetworkStarted(void);
! extern void smb_LanAdapterChange(int);
! extern void smb_SetLanAdapterChangeDetected(void);
! 
  
  #define SMB_LISTENER_UNINITIALIZED -1
  #define SMB_LISTENER_STOPPED 0
Index: openafs/src/WINNT/afsd/smb3.c
diff -c openafs/src/WINNT/afsd/smb3.c:1.95.2.49 openafs/src/WINNT/afsd/smb3.c:1.95.2.51
*** openafs/src/WINNT/afsd/smb3.c:1.95.2.49	Sat Dec 22 23:52:58 2007
--- openafs/src/WINNT/afsd/smb3.c	Mon Jan 28 02:23:35 2008
***************
*** 170,176 ****
      for (i=0;i<len;i++) {
          if(!(i%16)) {
              if(i) {
!                 osi_Log0(smb_logp, osi_LogSaveString(smb_logp, buf));
                  strcat(buf,"\r\n");
                  OutputDebugString(buf);
              }
--- 170,176 ----
      for (i=0;i<len;i++) {
          if(!(i%16)) {
              if(i) {
!                 osi_Log1(smb_logp, "%s", osi_LogSaveString(smb_logp, buf));
                  strcat(buf,"\r\n");
                  OutputDebugString(buf);
              }
***************
*** 191,197 ****
          buf[j] = (k>32 && k<127)?k:'.';
      }    
      if(i) {
!         osi_Log0(smb_logp, osi_LogSaveString(smb_logp, buf));
          strcat(buf,"\r\n");
          OutputDebugString(buf);
      }   
--- 191,197 ----
          buf[j] = (k>32 && k<127)?k:'.';
      }    
      if(i) {
!         osi_Log1(smb_logp, "%s", osi_LogSaveString(smb_logp, buf));
          strcat(buf,"\r\n");
          OutputDebugString(buf);
      }   
***************
*** 3640,3648 ****
              /* 
               * We have a requested path.  Check to see if it is something 
               * we know about.
               */
              code = cm_NameI(cm_data.rootSCachep, &requestFileName[nbnLen+2],
!                             CM_FLAG_FOLLOW | CM_FLAG_CASEFOLD,
                              userp, NULL, &req, &scp);
              if (code == 0) {
                  /* Yes it is. */
--- 3640,3652 ----
              /* 
               * We have a requested path.  Check to see if it is something 
               * we know about.
+ 			 *
+ 			 * But be careful because the name that we might be searching
+ 			 * for might be a known name with the final character stripped
+ 			 * off.  If we 
               */
              code = cm_NameI(cm_data.rootSCachep, &requestFileName[nbnLen+2],
!                             CM_FLAG_FOLLOW | CM_FLAG_CASEFOLD | CM_FLAG_DFS_REFERRAL,
                              userp, NULL, &req, &scp);
              if (code == 0) {
                  /* Yes it is. */
Index: openafs/src/WINNT/afsd/smb_iocons.h
diff -c openafs/src/WINNT/afsd/smb_iocons.h:1.10.4.5 openafs/src/WINNT/afsd/smb_iocons.h:1.10.4.6
*** openafs/src/WINNT/afsd/smb_iocons.h:1.10.4.5	Fri Jan  4 02:58:40 2008
--- openafs/src/WINNT/afsd/smb_iocons.h	Tue Jan 15 22:19:52 2008
***************
*** 93,98 ****
--- 93,99 ----
  #define VIOC_RXSTAT_PEER                0x2f
  #define VIOC_UUIDCTL                    0x30
  #define VIOC_PATH_AVAILABILITY          0x31
+ #define VIOC_GETFILETYPE                0x32
  
  #define VIOC_VOLSTAT_TEST               0x3F
  /* Not to exceed SMB_IOCTL_MAXPROCS from smb_ioctl.h */
Index: openafs/src/WINNT/afsd/smb_ioctl.c
diff -c openafs/src/WINNT/afsd/smb_ioctl.c:1.25.2.7 openafs/src/WINNT/afsd/smb_ioctl.c:1.25.2.8
*** openafs/src/WINNT/afsd/smb_ioctl.c:1.25.2.7	Fri Jan  4 02:58:40 2008
--- openafs/src/WINNT/afsd/smb_ioctl.c	Tue Jan 15 22:19:52 2008
***************
*** 85,90 ****
--- 85,91 ----
          smb_ioctlProcsp[VIOC_RXSTAT_PEER] = cm_IoctlRxStatPeer;
          smb_ioctlProcsp[VIOC_UUIDCTL] = cm_IoctlUUIDControl;
          smb_ioctlProcsp[VIOC_PATH_AVAILABILITY] = cm_IoctlPathAvailability;
+         smb_ioctlProcsp[VIOC_GETFILETYPE] = cm_IoctlGetFileType;
          smb_ioctlProcsp[VIOC_VOLSTAT_TEST] = cm_IoctlVolStatTest;
  }
  
Index: openafs/src/WINNT/afsd/symlink.c
diff -c openafs/src/WINNT/afsd/symlink.c:1.8.4.4 openafs/src/WINNT/afsd/symlink.c:1.8.4.5
*** openafs/src/WINNT/afsd/symlink.c:1.8.4.4	Wed Oct 31 00:09:17 2007
--- openafs/src/WINNT/afsd/symlink.c	Fri Feb  8 21:32:20 2008
***************
*** 101,107 ****
      DWORD enabled = 0;
  
      code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,
!                          0, KEY_QUERY_VALUE, &parmKey);
      if (code == ERROR_SUCCESS) {
          dummyLen = sizeof(buffer);
          code = RegQueryValueEx(parmKey, "NetbiosName", NULL, NULL,
--- 101,107 ----
      DWORD enabled = 0;
  
      code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,
!                          0, (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &parmKey);
      if (code == ERROR_SUCCESS) {
          dummyLen = sizeof(buffer);
          code = RegQueryValueEx(parmKey, "NetbiosName", NULL, NULL,
Index: openafs/src/WINNT/afsreg/afsreg.c
diff -c openafs/src/WINNT/afsreg/afsreg.c:1.2 openafs/src/WINNT/afsreg/afsreg.c:1.2.32.1
*** openafs/src/WINNT/afsreg/afsreg.c:1.2	Sat Nov  4 05:01:47 2000
--- openafs/src/WINNT/afsreg/afsreg.c	Fri Feb  8 21:32:22 2008
***************
*** 29,34 ****
--- 29,63 ----
  static long CopySubkeys(const char *srcName, HKEY srcKey,
  			const char *dupName, HKEY dupKey);
  
+ typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
+ int IsWow64(void)
+ {
+     static int init = TRUE;
+     static int bIsWow64 = FALSE;
+ 
+     if (init) {
+         HMODULE hModule;
+         LPFN_ISWOW64PROCESS fnIsWow64Process = NULL;
+ 
+         hModule = GetModuleHandle(TEXT("kernel32"));
+         if (hModule) {
+             fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress(hModule, "IsWow64Process");
+   
+             if (NULL != fnIsWow64Process)
+             {
+                 if (!fnIsWow64Process(GetCurrentProcess(),&bIsWow64))
+                 {
+                     // on error, assume FALSE.
+                     // in other words, do nothing.
+                 }
+             }       
+             FreeLibrary(hModule);
+         }
+         init = FALSE;
+     }
+     return bIsWow64;
+ }
+ 
  
  /* ----------------------- exported functions ----------------------- */
  
***************
*** 86,94 ****
      if (create) {
  	status = RegCreateKeyEx(key, subKeyName,
  				(DWORD)0, "AFS", REG_OPTION_NON_VOLATILE,
! 				mode, NULL, resultKeyP, &keyDisp);
      } else {
! 	status = RegOpenKeyEx(key, subKeyName, (DWORD)0, mode, resultKeyP);
      }
  
      if (resultKeyDispP) {
--- 115,123 ----
      if (create) {
  	status = RegCreateKeyEx(key, subKeyName,
  				(DWORD)0, "AFS", REG_OPTION_NON_VOLATILE,
! 				(IsWow64()?KEY_WOW64_64KEY:0)|mode, NULL, resultKeyP, &keyDisp);
      } else {
! 	status = RegOpenKeyEx(key, subKeyName, (DWORD)0, (IsWow64()?KEY_WOW64_64KEY:0)|mode, resultKeyP);
      }
  
      if (resultKeyDispP) {
***************
*** 240,246 ****
  	/* determine if delete failed due to subkeys */
  	HKEY subKey;
  
! 	status = RegOpenKeyEx(key, subKeyName, 0, KEY_ALL_ACCESS, &subKey);
  	if (status == ERROR_SUCCESS) {
  	    char *keyEnum;
  
--- 269,275 ----
  	/* determine if delete failed due to subkeys */
  	HKEY subKey;
  
! 	status = RegOpenKeyEx(key, subKeyName, 0, (IsWow64()?KEY_WOW64_64KEY:0)|KEY_ALL_ACCESS, &subKey);
  	if (status == ERROR_SUCCESS) {
  	    char *keyEnum;
  
Index: openafs/src/WINNT/afsreg/afsreg.h
diff -c openafs/src/WINNT/afsreg/afsreg.h:1.6.4.1 openafs/src/WINNT/afsreg/afsreg.h:1.6.4.2
*** openafs/src/WINNT/afsreg/afsreg.h:1.6.4.1	Sun Jun 25 22:25:49 2006
--- openafs/src/WINNT/afsreg/afsreg.h	Fri Feb  8 21:32:22 2008
***************
*** 234,239 ****
--- 234,242 ----
  RegDupKeyAlt(const char *sourceKey,
  	     const char *targetKey);
  
+ extern int 
+ IsWow64(void);
+ 
  #ifdef __cplusplus
  };
  #endif
Index: openafs/src/WINNT/afsreg/afssw.c
diff -c openafs/src/WINNT/afsreg/afssw.c:1.4.4.1 openafs/src/WINNT/afsreg/afssw.c:1.4.4.3
*** openafs/src/WINNT/afsreg/afssw.c:1.4.4.1	Sun Jun 25 22:25:49 2006
--- openafs/src/WINNT/afsreg/afssw.c	Sat Feb  2 08:43:23 2008
***************
*** 11,16 ****
--- 11,17 ----
  #include <afs/stds.h>
  
  #include <windows.h>
+ #include <shlobj.h>
  #include <stdlib.h>
  #include <stddef.h>
  #include <string.h>
***************
*** 77,85 ****
  int
  afssw_GetClientCellServDBDir(char **bufPP)   /* [out] data buffer */
  {
!     return StringDataRead(AFSREG_CLT_OPENAFS_KEY,
  			  AFSREG_CLT_OPENAFS_CELLSERVDB_DIR_VALUE,
! 			  bufPP);
  }
  
  
--- 78,146 ----
  int
  afssw_GetClientCellServDBDir(char **bufPP)   /* [out] data buffer */
  {
!     char wdir[512];
!     int tlen;
!     char *path = NULL;
!     DWORD cbPath;
! 
!     cbPath = GetEnvironmentVariable("AFSCONF", NULL, 0);
!     if (cbPath) {
!         cbPath += 2;
!         path = malloc(cbPath);
!     }
!     if (path) {
!         GetEnvironmentVariable("AFSCONF", path, cbPath);
!         tlen = (int)strlen(path);
!         if (path[tlen-1] != '\\') {
!             strncat(path, "\\", cbPath);
!             path[cbPath-1] = '\0';
!         }
!         *bufPP = path;
!         return 0;
!     }
! 
!     if (!StringDataRead(AFSREG_CLT_OPENAFS_KEY,
  			  AFSREG_CLT_OPENAFS_CELLSERVDB_DIR_VALUE,
!                          &path)) {
!         tlen = (int)strlen(path);
!         if (path[tlen-1] != '\\') {
!             strncat(path, "\\", cbPath);
!             path[cbPath-1] = '\0';
!         }
!         *bufPP = path;
!         return 0;
!     }
! 
!     /*
!      * Try to find the All Users\Application Data\OpenAFS\Client directory.
!      * If it exists and it contains a CellServDB file, return that. 
!      * Otherwise, return the Install Directory for backward compatibility.
!      */
!     if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_COMMON_APPDATA, NULL, 
!                                     SHGFP_TYPE_CURRENT, wdir)))
!     {   HANDLE fh;
! 
!         tlen = (int)strlen(wdir);
!         if (wdir[tlen-1] != '\\') {
!             strncat(wdir, "\\", sizeof(wdir));
!             wdir[sizeof(wdir)-1] = '\0';
!             tlen++;
!         }
!         strncat(wdir, "OpenAFS\\Client\\CellServDB", sizeof(wdir)); 
!         wdir[sizeof(wdir)-1] = '\0';
! 
!         fh = CreateFile(wdir, GENERIC_READ, FILE_SHARE_READ, NULL, 
!                         OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
!         if (fh != INVALID_HANDLE_VALUE) {
!             CloseHandle(fh);
!             tlen += (int)strlen("OpenAFS\\Client\\");
!             wdir[tlen] = '\0';
!             *bufPP = strdup(wdir);
!             return 0;
!         }
!     }
! 
!     return afssw_GetClientInstallDir(bufPP);
  }
  
  
Index: openafs/src/WINNT/afsreg/afssw.h
diff -c openafs/src/WINNT/afsreg/afssw.h:1.3 openafs/src/WINNT/afsreg/afssw.h:1.3.14.1
*** openafs/src/WINNT/afsreg/afssw.h:1.3	Wed Jul 21 10:06:13 2004
--- openafs/src/WINNT/afsreg/afssw.h	Fri Feb  1 21:48:13 2008
***************
*** 23,31 ****
  afssw_GetClientCellServDBDir(char **bufPP);
  
  extern int
- afssw_GetClientCellDir(char **bufPP);
- 
- extern int
  afssw_GetClientCellName(char **bufPP);
  
  extern int
--- 23,28 ----
Index: openafs/src/WINNT/bosctlsvc/NTMakefile
diff -c openafs/src/WINNT/bosctlsvc/NTMakefile:1.6 openafs/src/WINNT/bosctlsvc/NTMakefile:1.6.4.1
*** openafs/src/WINNT/bosctlsvc/NTMakefile:1.6	Sun Nov 20 20:56:16 2005
--- openafs/src/WINNT/bosctlsvc/NTMakefile	Sat Feb  2 08:43:23 2008
***************
*** 27,33 ****
  
  EXESDKLIBS=\
      ole32.lib \
!     oleaut32.lib
  
  $(EXEFILE): $(EXEOBJS) $(EXELIBS)
  	$(EXECONLINK) $(EXESDKLIBS)
--- 27,34 ----
  
  EXESDKLIBS=\
      ole32.lib \
!     oleaut32.lib \
!     shell32.lib
  
  $(EXEFILE): $(EXEOBJS) $(EXELIBS)
  	$(EXECONLINK) $(EXESDKLIBS)
Index: openafs/src/WINNT/client_config/cellservdb.c
diff -c openafs/src/WINNT/client_config/cellservdb.c:1.5 openafs/src/WINNT/client_config/cellservdb.c:1.5.6.1
*** openafs/src/WINNT/client_config/cellservdb.c:1.5	Fri Mar 11 00:34:33 2005
--- openafs/src/WINNT/client_config/cellservdb.c	Fri Feb  1 19:24:49 2008
***************
*** 15,28 ****
  #include <memory.h>
  #include <malloc.h>
  #include "cellservdb.h"
  
- #ifdef AFS_NT40_ENV
  #include <windows.h>
  #include <winsock2.h>
- #else
- #include <sys/socket.h>
- #endif
- #include <WINNT\afsreg.h>
  
  /*
   * PROTOTYPES _________________________________________________________________
--- 15,24 ----
  #include <memory.h>
  #include <malloc.h>
  #include "cellservdb.h"
+ #include <afs/cm_config.h>
  
  #include <windows.h>
  #include <winsock2.h>
  
  /*
   * PROTOTYPES _________________________________________________________________
***************
*** 66,103 ****
  
  void CSDB_GetFileName (char *pszFilename)
  {
! #ifdef AFS_NT40_ENV
!    /* Find the appropriate CellServDB */
!     char * clientdir = 0;
! 	DWORD code, dummyLen;
! 	HKEY parmKey;
!     int tlen;
! 
! 	code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_OPENAFS_SUBKEY,
! 				0, KEY_QUERY_VALUE, &parmKey);
! 	if (code != ERROR_SUCCESS)
!         goto dirpath;
! 
! 	dummyLen = MAX_CSDB_PATH;
! 	code = RegQueryValueEx(parmKey, "CellServDBDir", NULL, NULL,
! 				pszFilename, &dummyLen);
! 	RegCloseKey (parmKey);
! 
!   dirpath:
! 	if (code != ERROR_SUCCESS || pszFilename[0] == 0) {
!         afssw_GetClientInstallDir(&clientdir);
!         if (clientdir) {
!             strncpy(pszFilename, clientdir, MAX_CSDB_PATH);
!             pszFilename[MAX_CSDB_PATH - 1] = '\0';
!         }
!     }
!     if (pszFilename[ strlen(pszFilename)-1 ] != '\\')
!       strcat (pszFilename, "\\");
! 
!    strcat (pszFilename, "CellServDB");
! #else
!    strcpy (pszFilename, "/usr/vice/etc/CellServDB");
! #endif
  }
  
  
--- 62,68 ----
  
  void CSDB_GetFileName (char *pszFilename)
  {
!     cm_GetCellServDB(pszFilename, MAX_CSDB_PATH);
  }
  
  
***************
*** 191,201 ****
           {
           for (pLine = pCellServDB->pFirst; pLine; pLine = pLine->pNext)
              {
- #ifdef AFS_NT40_ENV
              sprintf (szLine, "%s\r\n", pLine->szLine);
- #else
-             sprintf (szLine, "%s\n", pLine->szLine);
- #endif
              fwrite (szLine, 1, strlen(szLine), pFile);
              }
  
--- 156,162 ----
Index: openafs/src/WINNT/client_creds/NTMakefile
diff -c openafs/src/WINNT/client_creds/NTMakefile:1.16.4.3 openafs/src/WINNT/client_creds/NTMakefile:1.16.4.4
*** openafs/src/WINNT/client_creds/NTMakefile:1.16.4.3	Tue Dec 12 19:26:36 2006
--- openafs/src/WINNT/client_creds/NTMakefile	Fri Feb  8 21:32:23 2008
***************
*** 66,71 ****
--- 66,72 ----
      	$(DESTDIR)\lib\afsdes.lib \
  	$(DESTDIR)\lib\afsauthent.lib \
  	$(DESTDIR)\lib\libafsconf.lib \
+ 	$(DESTDIR)\lib\afs\afsreg.lib \
      	$(DESTDIR)\lib\afskfw.lib
  
  ############################################################################
Index: openafs/src/WINNT/client_creds/advtab.cpp
diff -c openafs/src/WINNT/client_creds/advtab.cpp:1.9 openafs/src/WINNT/client_creds/advtab.cpp:1.9.4.1
*** openafs/src/WINNT/client_creds/advtab.cpp:1.9	Sat Nov  5 01:47:53 2005
--- openafs/src/WINNT/client_creds/advtab.cpp	Fri Feb  8 21:32:23 2008
***************
*** 295,301 ****
     g.fStartup = IsDlgButtonChecked (hDlg, IDC_STARTUP);
  
     HKEY hk;
!    if (RegCreateKey (HKEY_LOCAL_MACHINE, TEXT(AFSREG_CLT_SVC_PARAM_SUBKEY), &hk) == 0)
        {
        DWORD dwSize = sizeof(g.fStartup);
        DWORD dwType = REG_DWORD;
--- 295,302 ----
     g.fStartup = IsDlgButtonChecked (hDlg, IDC_STARTUP);
  
     HKEY hk;
!    if (RegCreateKeyEx (HKEY_LOCAL_MACHINE, TEXT(AFSREG_CLT_SVC_PARAM_SUBKEY), 0, NULL, 0,
!                         (IsWow64()?KEY_WOW64_64KEY:0)|KEY_WRITE, NULL, &hk, NULL) == 0)
        {
        DWORD dwSize = sizeof(g.fStartup);
        DWORD dwType = REG_DWORD;
Index: openafs/src/WINNT/client_creds/creds.cpp
diff -c openafs/src/WINNT/client_creds/creds.cpp:1.14 openafs/src/WINNT/client_creds/creds.cpp:1.14.4.1
*** openafs/src/WINNT/client_creds/creds.cpp:1.14	Wed Jul  6 20:23:29 2005
--- openafs/src/WINNT/client_creds/creds.cpp	Fri Feb  8 21:32:23 2008
***************
*** 155,161 ****
  {
     *pszGateway = TEXT('\0');
     HKEY hk;
!    if (RegOpenKey (HKEY_LOCAL_MACHINE, TEXT(AFSREG_CLT_SVC_PARAM_SUBKEY), &hk) == 0)
        {
        DWORD dwSize = MAX_PATH;
        DWORD dwType = REG_SZ;
--- 155,162 ----
  {
     *pszGateway = TEXT('\0');
     HKEY hk;
!    if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, TEXT(AFSREG_CLT_SVC_PARAM_SUBKEY), 0,
!                       (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &hk) == 0)
        {
        DWORD dwSize = MAX_PATH;
        DWORD dwType = REG_SZ;
***************
*** 237,243 ****
        {
        rc = TRUE;
        }
!    else if (RegOpenKey (HKEY_LOCAL_MACHINE, TEXT(AFSREG_CLT_SVC_PARAM_SUBKEY), &hk) == 0)
        {
        TCHAR szCell[ MAX_PATH ];
        DWORD dwSize = sizeof(szCell);
--- 238,245 ----
        {
        rc = TRUE;
        }
!    else if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, TEXT(AFSREG_CLT_SVC_PARAM_SUBKEY), 0,
!                            (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &hk) == 0)
        {
        TCHAR szCell[ MAX_PATH ];
        DWORD dwSize = sizeof(szCell);
***************
*** 451,457 ****
          int rc;
          HKEY hk;
  
!         if (RegOpenKey (HKEY_CURRENT_USER, TEXT(AFSREG_USER_OPENAFS_SUBKEY), &hk) == 0)
          {
              DWORD dwSize = sizeof(szCellA);
              DWORD dwType = REG_SZ;
--- 453,460 ----
          int rc;
          HKEY hk;
  
!         if (RegOpenKeyEx (HKEY_CURRENT_USER, TEXT(AFSREG_USER_OPENAFS_SUBKEY), 0,
!                         (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &hk) == 0)
          {
              DWORD dwSize = sizeof(szCellA);
              DWORD dwType = REG_SZ;
Index: openafs/src/WINNT/client_creds/main.cpp
diff -c openafs/src/WINNT/client_creds/main.cpp:1.16 openafs/src/WINNT/client_creds/main.cpp:1.16.4.1
*** openafs/src/WINNT/client_creds/main.cpp:1.16	Mon Nov 21 19:36:35 2005
--- openafs/src/WINNT/client_creds/main.cpp	Fri Feb  8 21:32:23 2008
***************
*** 178,184 ****
     if (fInstall)
        {
        HKEY hk;
!       if (RegCreateKey (HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY, &hk) == 0)
           {
           DWORD dwSize = sizeof(g.fStartup);
           DWORD dwType = REG_DWORD;
--- 178,185 ----
     if (fInstall)
        {
        HKEY hk;
!       if (RegCreateKeyEx (HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY, 0, NULL, 0,
!                          (IsWow64()?KEY_WOW64_64KEY:0)|KEY_WRITE, NULL, &hk, NULL) == 0)
           {
           DWORD dwSize = sizeof(g.fStartup);
           DWORD dwType = REG_DWORD;
***************
*** 213,226 ****
        return FALSE;
  
     HKEY hk;
!     if (RegOpenKey (HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY, &hk) == 0)
      {
          DWORD dwSize = sizeof(g.fStartup);
          DWORD dwType = REG_DWORD;
          RegQueryValueEx (hk, TEXT("ShowTrayIcon"), NULL, &dwType, (PBYTE)&g.fStartup, &dwSize);
          RegCloseKey (hk);
      }
!     else if (RegOpenKey (HKEY_LOCAL_MACHINE, AFSREG_CLT_OPENAFS_SUBKEY, &hk) == 0)
        {
        DWORD dwSize = sizeof(g.fStartup);
        DWORD dwType = REG_DWORD;
--- 214,229 ----
        return FALSE;
  
     HKEY hk;
!     if (RegOpenKeyEx (HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY, 0,
!                        (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &hk) == 0)
      {
          DWORD dwSize = sizeof(g.fStartup);
          DWORD dwType = REG_DWORD;
          RegQueryValueEx (hk, TEXT("ShowTrayIcon"), NULL, &dwType, (PBYTE)&g.fStartup, &dwSize);
          RegCloseKey (hk);
      }
!     else if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, AFSREG_CLT_OPENAFS_SUBKEY, 0,
!                             (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &hk) == 0)
        {
        DWORD dwSize = sizeof(g.fStartup);
        DWORD dwType = REG_DWORD;
***************
*** 399,405 ****
     BOOL fInstalled = FALSE;
     HKEY hk;
  
!    if (RegOpenKey (HKEY_LOCAL_MACHINE, AFSREG_SVR_SVC_SUBKEY, &hk) == 0)
        {
        fInstalled = TRUE;
        RegCloseKey (hk);
--- 402,409 ----
     BOOL fInstalled = FALSE;
     HKEY hk;
  
!    if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, AFSREG_SVR_SVC_SUBKEY, 0,
!                       (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &hk) == 0)
        {
        fInstalled = TRUE;
        RegCloseKey (hk);
Index: openafs/src/WINNT/client_creds/misc.cpp
diff -c openafs/src/WINNT/client_creds/misc.cpp:1.4 openafs/src/WINNT/client_creds/misc.cpp:1.4.6.1
*** openafs/src/WINNT/client_creds/misc.cpp:1.4	Fri Mar 11 00:35:09 2005
--- openafs/src/WINNT/client_creds/misc.cpp	Fri Feb  8 21:32:23 2008
***************
*** 57,63 ****
     g.aCreds[ iCreds ].fRemind = TRUE;
  
     HKEY hk;
!    if (RegOpenKey (HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY "\\Reminders", &hk) == 0)
        {
        DWORD dwValue = 1;
        DWORD dwSize = sizeof(dwValue);
--- 57,64 ----
     g.aCreds[ iCreds ].fRemind = TRUE;
  
     HKEY hk;
!    if (RegOpenKeyEx (HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY "\\Reminders", 0,
!                     (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &hk) == 0)
        {
        DWORD dwValue = 1;
        DWORD dwSize = sizeof(dwValue);
***************
*** 72,78 ****
  void SaveRemind (size_t iCreds)
  {
     HKEY hk;
!    if (RegCreateKey (HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY "\\Reminders", &hk) == 0)
        {
        DWORD dwValue = g.aCreds[ iCreds ].fRemind;
        RegSetValueEx (hk, g.aCreds[ iCreds ].szCell, NULL, REG_DWORD, (PBYTE)&dwValue, sizeof(DWORD));
--- 73,80 ----
  void SaveRemind (size_t iCreds)
  {
     HKEY hk;
!    if (RegCreateKeyEx (HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY "\\Reminders", 0, NULL, 0,
!                       (IsWow64()?KEY_WOW64_64KEY:0)|KEY_WRITE, NULL, &hk, NULL) == 0)
        {
        DWORD dwValue = g.aCreds[ iCreds ].fRemind;
        RegSetValueEx (hk, g.aCreds[ iCreds ].szCell, NULL, REG_DWORD, (PBYTE)&dwValue, sizeof(DWORD));
***************
*** 128,131 ****
  
     return NULL;
  }
- 
--- 130,132 ----
Index: openafs/src/WINNT/client_creds/settings.cpp
diff -c openafs/src/WINNT/client_creds/settings.cpp:1.2 openafs/src/WINNT/client_creds/settings.cpp:1.2.32.1
*** openafs/src/WINNT/client_creds/settings.cpp:1.2	Sat Nov  4 05:02:47 2000
--- openafs/src/WINNT/client_creds/settings.cpp	Fri Feb  8 21:32:23 2008
***************
*** 15,20 ****
--- 15,21 ----
  #include <windows.h>
  #include <winerror.h>
  #include <WINNT/TaLocale.h>
+ #include "afscreds.h"
  #include "settings.h"
  
  
***************
*** 88,94 ****
  void EraseSettings (HKEY hkParent, LPCTSTR pszBase, LPCTSTR pszValue)
  {
     HKEY hk;
!    if (RegOpenKey (hkParent, pszBase, &hk) == 0)
        {
        RegDeleteValue (hk, pszValue);
        RegCloseKey (hk);
--- 89,96 ----
  void EraseSettings (HKEY hkParent, LPCTSTR pszBase, LPCTSTR pszValue)
  {
     HKEY hk;
!    if (RegOpenKeyEx (hkParent, pszBase, 0,
!                       (IsWow64()?KEY_WOW64_64KEY:0)|KEY_SET_VALUE, &hk) == 0)
        {
        RegDeleteValue (hk, pszValue);
        RegCloseKey (hk);
***************
*** 105,111 ****
     BOOL rc = FALSE;
  
     HKEY hkFinal;
!    if (RegOpenKey (hk, pszBase, &hkFinal) == ERROR_SUCCESS)
        {
        DWORD dwType;
        DWORD dwSize = (DWORD)cbData;
--- 107,114 ----
     BOOL rc = FALSE;
  
     HKEY hkFinal;
!    if (RegOpenKeyEx (hk, pszBase, 0,
!                       (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &hkFinal) == ERROR_SUCCESS)
        {
        DWORD dwType;
        DWORD dwSize = (DWORD)cbData;
***************
*** 127,133 ****
     size_t cb = 0;
  
     HKEY hkFinal;
!    if (RegOpenKey (hk, pszBase, &hkFinal) == ERROR_SUCCESS)
        {
        DWORD dwType;
        DWORD dwSize = 0;
--- 130,137 ----
     size_t cb = 0;
  
     HKEY hkFinal;
!    if (RegOpenKeyEx (hk, pszBase, 0,
!                       (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &hkFinal) == ERROR_SUCCESS)
        {
        DWORD dwType;
        DWORD dwSize = 0;
***************
*** 153,159 ****
     BOOL rc = FALSE;
  
     HKEY hkFinal;
!    if (RegCreateKey (hk, pszBase, &hkFinal) == ERROR_SUCCESS)
        {
        DWORD dwSize = (DWORD)cbData;
  
--- 157,164 ----
     BOOL rc = FALSE;
  
     HKEY hkFinal;
!    if (RegCreateKeyEx (hk, pszBase, 0, NULL, 0,
!                         (IsWow64()?KEY_WOW64_64KEY:0)|KEY_WRITE, NULL, &hkFinal, NULL) == ERROR_SUCCESS)
        {
        DWORD dwSize = (DWORD)cbData;
  
***************
*** 173,179 ****
  BOOL RegDeltreeKey (HKEY hk, LPTSTR pszKey)
  {
     HKEY hkSub;
!    if (RegOpenKey (hk, pszKey, &hkSub) == 0)
        {
        TCHAR szFound[ MAX_PATH ];
        while (RegEnumKey (hkSub, 0, szFound, MAX_PATH) == 0)
--- 178,185 ----
  BOOL RegDeltreeKey (HKEY hk, LPTSTR pszKey)
  {
     HKEY hkSub;
!    if (RegOpenKeyEx (hk, pszKey, 0,
!                       (IsWow64()?KEY_WOW64_64KEY:0)|KEY_WRITE, &hkSub) == 0)
        {
        TCHAR szFound[ MAX_PATH ];
        while (RegEnumKey (hkSub, 0, szFound, MAX_PATH) == 0)
Index: openafs/src/WINNT/client_creds/shortcut.cpp
diff -c openafs/src/WINNT/client_creds/shortcut.cpp:1.10 openafs/src/WINNT/client_creds/shortcut.cpp:1.10.4.1
*** openafs/src/WINNT/client_creds/shortcut.cpp:1.10	Wed Jul  6 20:23:29 2005
--- openafs/src/WINNT/client_creds/shortcut.cpp	Fri Feb  8 21:32:23 2008
***************
*** 114,120 ****
         TCHAR szParams[ 64 ] = TEXT(AFSCREDS_SHORTCUT_OPTIONS);
  
         code = RegOpenKeyEx(HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY,
!                             0, KEY_QUERY_VALUE, &hk);
         if (code == ERROR_SUCCESS) {
             len = sizeof(szParams);
             type = REG_SZ;
--- 114,120 ----
         TCHAR szParams[ 64 ] = TEXT(AFSCREDS_SHORTCUT_OPTIONS);
  
         code = RegOpenKeyEx(HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY,
!                             0, (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &hk);
         if (code == ERROR_SUCCESS) {
             len = sizeof(szParams);
             type = REG_SZ;
***************
*** 124,130 ****
         }
         if (code != ERROR_SUCCESS) {
             code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_OPENAFS_SUBKEY,
!                                 0, KEY_QUERY_VALUE, &hk);
             if (code == ERROR_SUCCESS) {
                 len = sizeof(szParams);
                 type = REG_SZ;
--- 124,130 ----
         }
         if (code != ERROR_SUCCESS) {
             code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_OPENAFS_SUBKEY,
!                                 0, (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &hk);
             if (code == ERROR_SUCCESS) {
                 len = sizeof(szParams);
                 type = REG_SZ;
Index: openafs/src/WINNT/client_creds/window.cpp
diff -c openafs/src/WINNT/client_creds/window.cpp:1.16.4.1 openafs/src/WINNT/client_creds/window.cpp:1.16.4.2
*** openafs/src/WINNT/client_creds/window.cpp:1.16.4.1	Tue Oct 10 11:54:33 2006
--- openafs/src/WINNT/client_creds/window.cpp	Fri Feb  8 21:32:23 2008
***************
*** 260,266 ****
      GetString (szUser, IDS_UNKNOWN);
  
      HKEY hk;
!     if (RegOpenKey (HKEY_LOCAL_MACHINE, AFSREG_CLT_SW_VERSION_SUBKEY, &hk) == 0)
      {
          DWORD dwSize = sizeof(szVersion);
          DWORD dwType = REG_SZ;
--- 260,267 ----
      GetString (szUser, IDS_UNKNOWN);
  
      HKEY hk;
!     if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, AFSREG_CLT_SW_VERSION_SUBKEY, 0,
!                        (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &hk) == 0)
      {
          DWORD dwSize = sizeof(szVersion);
          DWORD dwType = REG_SZ;
***************
*** 460,473 ****
  {
      HKEY hk;
  
!     if (RegOpenKey (HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY, &hk) == 0)
      {
          DWORD dwSize = sizeof(g.fStartup);
          DWORD dwType = REG_DWORD;
          RegQueryValueEx (hk, TEXT("ShowTrayIcon"), NULL, &dwType, (PBYTE)&g.fStartup, &dwSize);
          RegCloseKey (hk);
      }
!     else if (RegOpenKey (HKEY_LOCAL_MACHINE, AFSREG_CLT_OPENAFS_SUBKEY, &hk) == 0)
      {
        DWORD dwSize = sizeof(g.fStartup);
        DWORD dwType = REG_DWORD;
--- 461,476 ----
  {
      HKEY hk;
  
!     if (RegOpenKeyEx (HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY, 0,
!                        (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &hk) == 0)
      {
          DWORD dwSize = sizeof(g.fStartup);
          DWORD dwType = REG_DWORD;
          RegQueryValueEx (hk, TEXT("ShowTrayIcon"), NULL, &dwType, (PBYTE)&g.fStartup, &dwSize);
          RegCloseKey (hk);
      }
!     else if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, AFSREG_CLT_OPENAFS_SUBKEY, 0,
!                            (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &hk) == 0)
      {
        DWORD dwSize = sizeof(g.fStartup);
        DWORD dwType = REG_DWORD;
***************
*** 800,806 ****
     g.fStartup = IsDlgButtonChecked (hDlg, IDC_STARTUP);
  
      HKEY hk;
!     if (RegCreateKey (HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY, &hk) == 0)
      {
          DWORD dwSize = sizeof(g.fStartup);
          DWORD dwType = REG_DWORD;
--- 803,810 ----
     g.fStartup = IsDlgButtonChecked (hDlg, IDC_STARTUP);
  
      HKEY hk;
!     if (RegCreateKeyEx (HKEY_CURRENT_USER, AFSREG_USER_OPENAFS_SUBKEY, 0, NULL, 0,
!                          (IsWow64()?KEY_WOW64_64KEY:0)|KEY_WRITE, NULL, &hk, NULL) == 0)
      {
          DWORD dwSize = sizeof(g.fStartup);
          DWORD dwType = REG_DWORD;
Index: openafs/src/WINNT/client_exp/NTMakefile
diff -c openafs/src/WINNT/client_exp/NTMakefile:1.9.4.2 openafs/src/WINNT/client_exp/NTMakefile:1.9.4.4
*** openafs/src/WINNT/client_exp/NTMakefile:1.9.4.2	Tue Oct 10 11:49:34 2006
--- openafs/src/WINNT/client_exp/NTMakefile	Fri Feb  8 21:32:24 2008
***************
*** 44,49 ****
--- 44,50 ----
  	$(OUT)\unlog_dlg.obj \
  	$(OUT)\volumeinfo.obj \
  	$(OUT)\make_symbolic_link_dlg.obj \
+         $(OUT)\symlinks_dlg.obj \
  	$(OUT)\AFS_component_version_number.obj
  
  AFSD = ..\afsd
***************
*** 59,64 ****
--- 60,66 ----
  	$(DESTDIR)\lib\afsauthent.lib \
  	$(DESTDIR)\lib\libafsconf.lib \
  	$(DESTDIR)\lib\libosi.lib \
+         $(DESTDIR)\lib\afs\afsreg.lib  \
  	$(DESTDIR)\lib\afs\TaLocale.lib \
  	$(DESTDIR)\lib\afs\afsutil.lib
  
Index: openafs/src/WINNT/client_exp/afs_shl_ext.cpp
diff -c openafs/src/WINNT/client_exp/afs_shl_ext.cpp:1.6.4.3 openafs/src/WINNT/client_exp/afs_shl_ext.cpp:1.6.4.4
*** openafs/src/WINNT/client_exp/afs_shl_ext.cpp:1.6.4.3	Tue Jan 30 07:42:43 2007
--- openafs/src/WINNT/client_exp/afs_shl_ext.cpp	Fri Feb  8 21:32:24 2008
***************
*** 17,24 ****
  #include <winsock2.h>
  #include "help.h"
  #include "shell_ext.h"
! #include "winreg.h"
! 
  #ifdef _DEBUG
  #define new DEBUG_NEW
  #undef THIS_FILE
--- 17,26 ----
  #include <winsock2.h>
  #include "help.h"
  #include "shell_ext.h"
! #include <winreg.h>
! extern "C" {
! #include "WINNT\afsreg.h"
! }
  #ifdef _DEBUG
  #define new DEBUG_NEW
  #undef THIS_FILE
***************
*** 300,306 ****
      lResult = RegOpenKeyEx( hKey,
  			    pszSubKey,
  			    0,
! 			    KEY_ALL_ACCESS,
  			    &thKey);
      if(NOERROR == lResult)
      {
--- 302,308 ----
      lResult = RegOpenKeyEx( hKey,
  			    pszSubKey,
  			    0,
! 			    (IsWow64()?KEY_WOW64_64KEY:0)|KEY_ALL_ACCESS,
  			    &thKey);
      if(NOERROR == lResult)
      {
***************
*** 344,346 ****
--- 346,349 ----
      return S_OK;
  }	
  
+ 
Index: openafs/src/WINNT/client_exp/gui2fs.cpp
diff -c openafs/src/WINNT/client_exp/gui2fs.cpp:1.19.4.2 openafs/src/WINNT/client_exp/gui2fs.cpp:1.19.4.5
*** openafs/src/WINNT/client_exp/gui2fs.cpp:1.19.4.2	Mon Feb 12 22:09:20 2007
--- openafs/src/WINNT/client_exp/gui2fs.cpp	Fri Feb  8 21:32:24 2008
***************
*** 21,26 ****
--- 21,27 ----
  #include "results_dlg.h"
  #include "volume_inf.h"
  #include "mount_points_dlg.h"
+ #include "symlinks_dlg.h"
  #include "hourglass.h"
  #include "down_servers_dlg.h"
  
***************
*** 992,997 ****
--- 993,1007 ----
      return strMountPointInfo;
  }       
  
+ CString ParseSymlink(const CString strFile, CString strSymlink)
+ {
+     CString strSymlinkInfo;
+ 
+     strSymlinkInfo = strFile + "\t" + strSymlink;
+ 
+     return strSymlinkInfo;
+ }       
+ 
  BOOL IsPathInAfs(const CHAR *strPath)
  {
      struct ViceIoctl blob;
***************
*** 999,1011 ****
  
      HOURGLASS hourglass;
  
      blob.in_size = 0;
      blob.out_size = MAXSIZE;
      blob.out = space;
  
      code = pioctl((LPTSTR)((LPCTSTR)strPath), VIOC_FILE_CELL_NAME, &blob, 1);
!     if (code)
          return FALSE;
      return TRUE;
  }
  
--- 1009,1031 ----
  
      HOURGLASS hourglass;
  
+     char buf[512];
+     sprintf(buf, "IsPathInAfs(%s)", strPath);
+     OutputDebugString(buf);
+ 
      blob.in_size = 0;
      blob.out_size = MAXSIZE;
      blob.out = space;
  
      code = pioctl((LPTSTR)((LPCTSTR)strPath), VIOC_FILE_CELL_NAME, &blob, 1);
! 
!     sprintf(buf, "VIOC_FILE_CELL_NAME=%d", code);
!     OutputDebugString(buf);
! 
!     if (code) {
! 	if ((errno == EINVAL) || (errno == ENOENT))
          return FALSE;
+     }
      return TRUE;
  }
  
***************
*** 1034,1040 ****
      DWORD enabled = 0;
  
      code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,
!                          0, KEY_QUERY_VALUE, &parmKey);
      if (code == ERROR_SUCCESS) {
          dummyLen = sizeof(buffer);
          code = RegQueryValueEx(parmKey, "NetbiosName", NULL, NULL,
--- 1054,1060 ----
      DWORD enabled = 0;
  
      code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,
!                          0, (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &parmKey);
      if (code == ERROR_SUCCESS) {
          dummyLen = sizeof(buffer);
          code = RegQueryValueEx(parmKey, "NetbiosName", NULL, NULL,
***************
*** 1514,1519 ****
--- 1534,1543 ----
  
      HOURGLASS hourglass;
  
+     char buf[512];
+     sprintf(buf, "IsSymlink(%s)", true_name);
+     OutputDebugString(buf);
+ 
      last_component = (char *) strrchr(true_name, '\\');
      if (!last_component)
          last_component = (char *) strrchr(true_name, '/');
***************
*** 1550,1555 ****
--- 1574,1582 ----
          fs_StripDriveLetter(true_name, strip_name, sizeof(strip_name));
      }
  
+     sprintf(buf, "last_component=%s", last_component);
+     OutputDebugString(buf);
+ 
      blob.in = last_component;
      blob.in_size = strlen(last_component)+1;
      blob.out_size = MAXSIZE;
***************
*** 1569,1576 ****
--- 1596,1609 ----
      register char *tp;
      char szCurItem[1024];
  
+     HOURGLASS hourglass;
+ 
      strcpy(szCurItem, name);
  	
+     char buf[512];
+     sprintf(buf, "IsMountPoint(%s)", name);
+     OutputDebugString(buf);
+ 
      tp = (char *)strrchr(szCurItem, '\\');
      if (tp) {
          strncpy(tbuffer, szCurItem, code = tp - szCurItem + 1);  /* the dir name */
***************
*** 1596,1601 ****
--- 1629,1637 ----
          fs_StripDriveLetter(tp, tp, 0);
      }
  
+     sprintf(buf, "last_component=%s", tp);
+     OutputDebugString(buf);
+ 
      blob.in = tp;
      blob.in_size = strlen(tp)+1;
      blob.out = lsbuffer;
***************
*** 1959,1965 ****
      return TRUE;
  }
  
! UINT MakeSymbolicLink(const char *strName, const char *strDir)
  {
      struct ViceIoctl blob;
      char space[MAXSIZE];
--- 1995,2001 ----
      return TRUE;
  }
  
! UINT MakeSymbolicLink(const char *strName, const char *strTarget)
  {
      struct ViceIoctl blob;
      char space[MAXSIZE];
***************
*** 1970,2014 ****
      HOURGLASS hourglass;
      static char message[2048];
  
!     strcpy(path, strDir);
      parent = Parent(path);
  
!     sprintf(message,"MakeSymbolicLink: path = %s parent = %s\n",path,parent);
      OutputDebugString(message);
  
-     /*lets confirm its a good symlink*/
-     if (!IsPathInAfs(path)) {
- 	const char * nbname = NetbiosName();
- 	int len = strlen(nbname);
- 
- 	if (parent[0] == '\\' && parent[1] == '\\' &&
- 	    parent[len+2] == '\\' &&
- 	    parent[len+3] == '\0' &&
- 	    !strnicmp(nbname,&parent[2],len))
- 	{
- 	    sprintf(path,"%sall\\%s", parent, &strDir[strlen(parent)]);
- 	    parent = Parent(path);
- 	    sprintf(message,"MakeSymbolicLink: new path = %s parent = %s\n",path,parent);
- 	    OutputDebugString(message);
- 
- 	    if (!IsPathInAfs(parent)) {
- 		ShowMessageBox(IDS_MAKE_LNK_NOT_AFS_ERROR, MB_ICONERROR, IDS_MAKE_LNK_NOT_AFS_ERROR);
- 		return TRUE;
- 	    }
- 	} else {
- 	    ShowMessageBox(IDS_MAKE_LNK_NOT_AFS_ERROR, MB_ICONERROR, IDS_MAKE_LNK_NOT_AFS_ERROR);
- 	    return TRUE;
- 	}
-     }
- 
      if ( IsFreelanceRoot(parent) && !IsAdmin() ) {
  	ShowMessageBox(IDS_NOT_AFS_CLIENT_ADMIN_ERROR, MB_ICONERROR, IDS_NOT_AFS_CLIENT_ADMIN_ERROR);
  	return FALSE;
      }
  
!     LPTSTR lpsz = new TCHAR[strlen(strDir)+1];
      _tcscpy(lpsz, strName);
!     strcpy(space, strDir);
      blob.out_size = 0;
      blob.in_size = 1 + strlen(space);
      blob.in = space;
--- 2006,2025 ----
      HOURGLASS hourglass;
      static char message[2048];
  
!     strcpy(path, strName);
      parent = Parent(path);
  
!     sprintf(message,"MakeSymbolicLink: name = %s target = %s parent = %s\n",strName,strTarget, parent);
      OutputDebugString(message);
  
      if ( IsFreelanceRoot(parent) && !IsAdmin() ) {
  	ShowMessageBox(IDS_NOT_AFS_CLIENT_ADMIN_ERROR, MB_ICONERROR, IDS_NOT_AFS_CLIENT_ADMIN_ERROR);
  	return FALSE;
      }
  
!     LPTSTR lpsz = new TCHAR[strlen(strTarget)+1];
      _tcscpy(lpsz, strName);
!     strcpy(space, strTarget);
      blob.out_size = 0;
      blob.in_size = 1 + strlen(space);
      blob.in = space;
***************
*** 2082,2084 ****
--- 2093,2180 ----
      ASSERT(strlen(space)<MAX_PATH);
      strncpy(strPath,space,nlenPath);
  }       
+ 
+ BOOL ListSymlink(CStringArray& files)
+ {
+     register LONG code;
+     struct ViceIoctl blob;
+     int error;
+     char orig_name[1024];			/* Original name, may be modified */
+     char true_name[1024];			/* ``True'' dirname (e.g., symlink target) */
+     char parent_dir[1024];			/* Parent directory of true name */
+     register char *last_component;	/* Last component of true name */
+     CStringArray symlinks;
+     
+     HOURGLASS hourglass;
+ 
+     error = 0;
+ 
+     for (int i = 0; i < files.GetSize(); i++) {
+         strcpy(orig_name, files[i]);
+         strcpy(true_name, orig_name);
+ 
+         /*
+          * Find rightmost slash, if any.
+          */
+         last_component = (char *)strrchr(true_name, '\\');
+         if (last_component) {
+             /*
+              * Found it.  Designate everything before it as the parent directory,
+              * everything after it as the final component.
+              */
+             strncpy(parent_dir, true_name, last_component - true_name + 1);
+             parent_dir[last_component - true_name + 1] = 0;
+             last_component++;   /* Skip the slash */
+ 
+ 	    if (!IsPathInAfs(parent_dir)) {
+ 		const char * nbname = NetbiosName();
+ 		int len = strlen(nbname);
+ 
+ 		if (parent_dir[0] == '\\' && parent_dir[1] == '\\' &&
+ 		    parent_dir[len+2] == '\\' &&
+ 		    parent_dir[len+3] == '\0' &&
+ 		    !strnicmp(nbname,&parent_dir[2],len))
+ 		{
+ 		    sprintf(parent_dir,"\\\\%s\\all\\", nbname);
+ 		}
+ 	    }
+         }
+         else {
+             /*
+              * No slash appears in the given file name.  Set parent_dir to the current
+              * directory, and the last component as the given name.
+              */
+             fs_ExtractDriveLetter(true_name, parent_dir);
+             strcat(parent_dir, ".");
+             last_component = true_name;
+             fs_StripDriveLetter(true_name, true_name, sizeof(true_name));
+         }
+ 
+         blob.in = last_component;
+         blob.in_size = strlen(last_component) + 1;
+         blob.out_size = MAXSIZE;
+         blob.out = space;
+         memset(space, 0, MAXSIZE);
+ 
+         code = pioctl(parent_dir, VIOC_LISTSYMLINK, &blob, 1);
+         if (code == 0) {
+             int nPos = strlen(space) - 1;
+             if (space[nPos] == '.')
+                 space[nPos] = 0;
+             symlinks.Add(ParseSymlink(StripPath(files[i]), space));
+         } else {
+             error = 1;
+             if (errno == EINVAL)
+                 symlinks.Add(GetMessageString(IDS_NOT_SYMLINK_ERROR, StripPath(files[i])));
+             else
+                 symlinks.Add(GetMessageString(IDS_LIST_MOUNT_POINT_ERROR, GetAfsError(errno, StripPath(files[i]))));
+         }
+     }
+ 
+     CSymlinksDlg dlg;
+     dlg.SetSymlinks(symlinks);
+     dlg.DoModal();
+ 
+     return !error;
+ }
+ 
Index: openafs/src/WINNT/client_exp/gui2fs.h
diff -c openafs/src/WINNT/client_exp/gui2fs.h:1.7 openafs/src/WINNT/client_exp/gui2fs.h:1.7.4.1
*** openafs/src/WINNT/client_exp/gui2fs.h:1.7	Wed Aug 31 20:00:41 2005
--- openafs/src/WINNT/client_exp/gui2fs.h	Sat Jan 12 18:31:24 2008
***************
*** 42,46 ****
--- 42,47 ----
  BOOL IsMountPoint(const char * name);
  UINT MakeSymbolicLink(const char *,const char *);
  void ListSymbolicLinkPath(const char *strName,char *strPath,UINT nlenPath);
+ BOOL ListSymlink(CStringArray& files);
  const char * NetbiosName(void);
  #endif //__GUI2FS_H__
Index: openafs/src/WINNT/client_exp/help.h
diff -c openafs/src/WINNT/client_exp/help.h:1.2 openafs/src/WINNT/client_exp/help.h:1.2.32.1
*** openafs/src/WINNT/client_exp/help.h:1.2	Sat Nov  4 05:02:52 2000
--- openafs/src/WINNT/client_exp/help.h	Sat Jan 12 18:31:24 2008
***************
*** 32,37 ****
--- 32,38 ----
  #define SUBMOUNTS_HELP_ID			44
  #define ADD_SUBMT_HELP_ID			45
  #define EDIT_PATH_NAME_HELP_ID		46
+ #define SYMLINK_HELP_ID                 47
  
  void SetHelpPath(const char *pszDefaultHelpFilePath);
  void ShowHelp(HWND hWnd, DWORD nHelpID);
Index: openafs/src/WINNT/client_exp/make_symbolic_link_dlg.cpp
diff -c openafs/src/WINNT/client_exp/make_symbolic_link_dlg.cpp:1.2 openafs/src/WINNT/client_exp/make_symbolic_link_dlg.cpp:1.2.8.1
*** openafs/src/WINNT/client_exp/make_symbolic_link_dlg.cpp:1.2	Thu Oct 28 12:37:57 2004
--- openafs/src/WINNT/client_exp/make_symbolic_link_dlg.cpp	Wed Feb  6 12:53:55 2008
***************
*** 66,102 ****
  
  void CMakeSymbolicLinkDlg::OnOK() 
  {
! 	char space[64];
! 	UINT code;
! 	int i;
! 	UpdateData(TRUE);
! 	CString strName;
! 	CString strDir;
! 	m_Name.GetWindowText(strName);
! 	m_Dir.GetWindowText(strDir);
      if (!IsPathInAfs(m_sBase)) {
! 		MessageBeep((UINT)-1);
! 		strDir+=" - Path is not in AFS directory";
! 		AfxMessageBox(strDir,MB_OK);
! 		return;
! 	} 
! 	if (m_sBase.GetLength()>MAX_PATH-2)
! 	{
! 		MessageBeep((UINT)-1);
! 		ShowMessageBox(IDS_CURRENT_DIRECTORY_PATH_TOO_LONG,MB_OK,IDS_CURRENT_DIRECTORY_PATH_TOO_LONG);
! 	}
! 	if (!SetCurrentDirectory(m_sBase))
! 	{
! 		MessageBeep((UINT)-1);
! 		ShowMessageBox(IDS_UNABLE_TO_SET_CURRENT_DIRECTORY,MB_OK,IDS_UNABLE_TO_SET_CURRENT_DIRECTORY);
! 		return;
! 	}
! 	if ((code=MakeSymbolicLink(strName,strDir))!=0){
! 		MessageBeep((UINT)-1);
! 		ShowMessageBox(IDS_UNABLE_TO_CREATE_SYMBOLIC_LINK,MB_OK,IDS_UNABLE_TO_CREATE_SYMBOLIC_LINK,code);
! 		return;
! 	}
! 	CDialog::OnOK();
  }
  /*
  void CMakeSymbolicLinkDlg::OnChangeName() 
--- 66,102 ----
  
  void CMakeSymbolicLinkDlg::OnOK() 
  {
!     char space[64];
!     UINT code;
!     int i;
!     UpdateData(TRUE);
!     CString strName;
!     CString strTarget;
!     m_Name.GetWindowText(strName);
!     m_Dir.GetWindowText(strTarget);
      if (!IsPathInAfs(m_sBase)) {
!         MessageBeep((UINT)-1);
!         strTarget+=" - Path is not in AFS directory";
!         AfxMessageBox(strTarget,MB_OK);
!         return;
!     } 
!     if (m_sBase.GetLength()>MAX_PATH-2)
!     {
!         MessageBeep((UINT)-1);
!         ShowMessageBox(IDS_CURRENT_DIRECTORY_PATH_TOO_LONG,MB_OK,IDS_CURRENT_DIRECTORY_PATH_TOO_LONG);
!     }
!     if (!SetCurrentDirectory(m_sBase))
!     {
!         MessageBeep((UINT)-1);
!         ShowMessageBox(IDS_UNABLE_TO_SET_CURRENT_DIRECTORY,MB_OK,IDS_UNABLE_TO_SET_CURRENT_DIRECTORY);
!         return;
!     }
!     if ((code=MakeSymbolicLink(strName,strTarget))!=0){
!         MessageBeep((UINT)-1);
!         ShowMessageBox(IDS_UNABLE_TO_CREATE_SYMBOLIC_LINK,MB_OK,IDS_UNABLE_TO_CREATE_SYMBOLIC_LINK,code);
!         return;
!     }
!     CDialog::OnOK();
  }
  /*
  void CMakeSymbolicLinkDlg::OnChangeName() 
Index: openafs/src/WINNT/client_exp/resource.h
diff -c openafs/src/WINNT/client_exp/resource.h:1.8.4.1 openafs/src/WINNT/client_exp/resource.h:1.8.4.2
*** openafs/src/WINNT/client_exp/resource.h:1.8.4.1	Thu Aug 31 07:35:12 2006
--- openafs/src/WINNT/client_exp/resource.h	Sat Jan 12 18:31:24 2008
***************
*** 118,124 ****
  #define IDS_REALLY_REMOVE_SYMLINK              118
  
  #define IDS_SYMBOLICLINK_ADD                   128
! #define IDS_SYMBOLICLINK_EDIT                  129
  #define IDS_SYMBOLICLINK_REMOVE                130
  #define IDS_SYMBOLIC_LINK_ITEM                 131
  #define IDS_UNABLE_TO_CREATE_SYMBOLIC_LINK     132
--- 118,124 ----
  #define IDS_REALLY_REMOVE_SYMLINK              118
  
  #define IDS_SYMBOLICLINK_ADD                   128
! #define IDS_SYMBOLICLINK_SHOW                  129
  #define IDS_SYMBOLICLINK_REMOVE                130
  #define IDS_SYMBOLIC_LINK_ITEM                 131
  #define IDS_UNABLE_TO_CREATE_SYMBOLIC_LINK     132
***************
*** 129,134 ****
--- 129,135 ----
  #define IDS_NOT_AFS_CLIENT_ADMIN_ERROR         137
  #define IDS_WARNING			       138
  #define IDS_VOLUME_NOT_IN_CELL_WARNING         139
+ #define IDS_NOT_SYMLINK_ERROR                  140
  
  #define IDM_AUTHENTICATION                    0
  #define IDM_ACL_SET                           1
***************
*** 148,154 ****
  #define IDM_ACL_CLEAN                         15
  #define IDM_SUBMOUNTS_EDIT                    16
  #define IDM_REMOVE_SYMLINK                    17
!                                            
  #define ID_GET_TOKENS                   917
  #define ID_DISCARD_TOKENS               918
  #define IDD_KLOG_DIALOG                 920
--- 149,156 ----
  #define IDM_ACL_CLEAN                         15
  #define IDM_SUBMOUNTS_EDIT                    16
  #define IDM_REMOVE_SYMLINK                    17
! #define IDM_SYMBOLICLINK_SHOW		      18
! 
  #define ID_GET_TOKENS                   917
  #define ID_DISCARD_TOKENS               918
  #define IDD_KLOG_DIALOG                 920
***************
*** 177,182 ****
--- 179,186 ----
  #define ID_REMOVE_SYMLINK               957
  #define ID_SYMBOLICLINK_ADD             958
  #define ID_SYMBOLICLINK_REMOVE          959
+ #define ID_SYMBOLICLINK_SHOW            960
+ #define IDD_SYMLINKS                    961
  #define IDC_LIST                        1001
  #define IDC_PASSWORD                    1002
  #define IDC_OFFLINE_MSG                 1003
Index: openafs/src/WINNT/client_exp/shell_ext.cpp
diff -c openafs/src/WINNT/client_exp/shell_ext.cpp:1.12.4.2 openafs/src/WINNT/client_exp/shell_ext.cpp:1.12.4.4
*** openafs/src/WINNT/client_exp/shell_ext.cpp:1.12.4.2	Tue Jan 30 07:42:43 2007
--- openafs/src/WINNT/client_exp/shell_ext.cpp	Fri Feb  8 21:32:24 2008
***************
*** 76,82 ****
      m_bIsOverlayEnabled=FALSE;
      if (FAILED(hr))
  	m_pAlloc = NULL;
!     RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,0, KEY_QUERY_VALUE, &NPKey);
      LSPsize=sizeof(ShellOption);
      code=RegQueryValueEx(NPKey, "ShellOption", NULL,
  			  &LSPtype, (LPBYTE)&ShellOption, &LSPsize);
--- 76,82 ----
      m_bIsOverlayEnabled=FALSE;
      if (FAILED(hr))
  	m_pAlloc = NULL;
!     RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_SVC_PARAM_SUBKEY,0, (IsWow64()?KEY_WOW64_64KEY:0)|KEY_QUERY_VALUE, &NPKey);
      LSPsize=sizeof(ShellOption);
      code=RegQueryValueEx(NPKey, "ShellOption", NULL,
  			  &LSPtype, (LPBYTE)&ShellOption, &LSPsize);
***************
*** 183,189 ****
  // IConextMenu Functions
  /////////////////////////////////////////////////////////////////////////////
  STDMETHODIMP CShellExt::XMenuExt::QueryContextMenu(HMENU hMenu,UINT indexMenu,
!     UINT idCmdFirst, UINT idCmdLast,UINT uFlags)
  {
      METHOD_PROLOGUE(CShellExt, MenuExt);
  
--- 183,189 ----
  // IConextMenu Functions
  /////////////////////////////////////////////////////////////////////////////
  STDMETHODIMP CShellExt::XMenuExt::QueryContextMenu(HMENU hMenu,UINT indexMenu,
! 						   UINT idCmdFirst, UINT idCmdLast,UINT uFlags)
  {
      METHOD_PROLOGUE(CShellExt, MenuExt);
  
***************
*** 207,213 ****
  	    DeleteMenu (hMenu, iItem, MF_BYPOSITION);
  	    continue;
  	}
! 	if ((!lstrcmp(szItemText,"Cu&t"))&&(pThis->m_bIsSymlink)) {		/*same for cut*/
  	    DeleteMenu (hMenu, iItem, MF_BYPOSITION);
  	    continue;
  	}
--- 207,213 ----
  	    DeleteMenu (hMenu, iItem, MF_BYPOSITION);
  	    continue;
  	}
! 	if ((!lstrcmp(szItemText,"Cu&t"))&&(pThis->m_bIsSymlink)) {	/*same for cut*/
  	    DeleteMenu (hMenu, iItem, MF_BYPOSITION);
  	    continue;
  	}
***************
*** 218,228 ****
      HMENU hAfsMenu = CreatePopupMenu();
      int indexAfsMenu = 0;
  
-     // The Authentication item has been removed from the AFS menu because
-     // there is now a tray icon to handle authentication.
-     //
-     //::InsertMenu(hAfsMenu, indexAfsMenu++, MF_STRING | MF_BYPOSITION, idCmdFirst + IDM_AUTHENTICATION, GetMessageString(IDS_AUTHENTICATION_ITEM));
- 
      // Only enable the ACL menu item if a single directory is selected
      int nSingleDirOnly = MF_GRAYED;
      if (pThis->m_bDirSelected && (pThis->m_astrFileNames.GetSize() == 1))
--- 218,223 ----
***************
*** 259,280 ****
  
      HMENU hSymbolicMenu = CreatePopupMenu();
      int indexSymbolicMenu = 0;
      ::InsertMenu(hSymbolicMenu, indexSymbolicMenu++, MF_STRING | MF_BYPOSITION, idCmdFirst + IDM_SYMBOLICLINK_ADD, GetMessageString(IDS_SYMBOLICLINK_ADD));
!     // ::InsertMenu(hSymbolicMenu, indexSymbolicMenu, MF_STRING | MF_BYPOSITION, idCmdFirst + IDM_SYMBOLICLINK_EDIT, GetMessageString(IDS_SYMBOLICLINK_EDIT));
!     // ::EnableMenuItem(hSymbolicMenu,indexSymbolicMenu++,((pThis->m_bIsSymlink)?MF_ENABLED:MF_GRAYED)|MF_BYPOSITION);
!     ::InsertMenu(hSymbolicMenu, indexSymbolicMenu, MF_STRING | MF_BYPOSITION, idCmdFirst + IDM_SYMBOLICLINK_REMOVE, GetMessageString(IDS_SYMBOLICLINK_REMOVE));
!     ::EnableMenuItem(hSymbolicMenu,indexSymbolicMenu++,((pThis->m_bIsSymlink)?MF_ENABLED:MF_GRAYED)|MF_BYPOSITION);
      ::InsertMenu(hAfsMenu, indexAfsMenu++, MF_STRING | MF_BYPOSITION | MF_POPUP, (UINT)hSymbolicMenu, GetMessageString(IDS_SYMBOLIC_LINK_ITEM));
  
      // The Submounts menu has been removed because the AFS tray icon
      // and control panel now support mapping drives directly to an AFS
      // path.
      //
!     // HMENU hSubmountMenu = CreatePopupMenu();
!     // int indexSubmountMenu = 0;
!     // ::InsertMenu(hSubmountMenu, indexSubmountMenu++, MF_STRING | MF_BYPOSITION | nSingleDirOnly, idCmdFirst + IDM_SUBMOUNTS_CREATE, GetMessageString(IDS_SUBMOUNTS_CREATE_ITEM));
!     // ::InsertMenu(hSubmountMenu, indexSubmountMenu++, MF_STRING | MF_BYPOSITION, idCmdFirst + IDM_SUBMOUNTS_EDIT, GetMessageString(IDS_SUBMOUNTS_EDIT_ITEM));
!     // ::InsertMenu(hAfsMenu, indexAfsMenu++, MF_STRING | MF_BYPOSITION | MF_POPUP, (UINT)hSubmountMenu, GetMessageString(IDS_SUBMOUNTS_ITEM));
  
      // Add a separator
      ::InsertMenu (hMenu, indexMenu + indexShellMenu++, MF_STRING | MF_BYPOSITION | MF_SEPARATOR, 0, TEXT(""));
--- 254,281 ----
  
      HMENU hSymbolicMenu = CreatePopupMenu();
      int indexSymbolicMenu = 0;
+     int nSymlinkSelected = MF_GRAYED;
+     for (int n = pThis->m_astrFileNames.GetSize() - 1 ; n >= 0; n--) {
+ 	if ( IsSymlink(pThis->m_astrFileNames[n]) ) {
+ 	    nSymlinkSelected = MF_ENABLED;
+ 	    break;
+ 	}
+     }
+ 
      ::InsertMenu(hSymbolicMenu, indexSymbolicMenu++, MF_STRING | MF_BYPOSITION, idCmdFirst + IDM_SYMBOLICLINK_ADD, GetMessageString(IDS_SYMBOLICLINK_ADD));
!     ::InsertMenu(hSymbolicMenu, indexSymbolicMenu++, MF_STRING | MF_BYPOSITION | nSymlinkSelected, idCmdFirst + IDM_SYMBOLICLINK_SHOW, GetMessageString(IDS_SYMBOLICLINK_SHOW));
!     ::InsertMenu(hSymbolicMenu, indexSymbolicMenu++, MF_STRING | MF_BYPOSITION | nSymlinkSelected, idCmdFirst + IDM_SYMBOLICLINK_REMOVE, GetMessageString(IDS_SYMBOLICLINK_REMOVE));
      ::InsertMenu(hAfsMenu, indexAfsMenu++, MF_STRING | MF_BYPOSITION | MF_POPUP, (UINT)hSymbolicMenu, GetMessageString(IDS_SYMBOLIC_LINK_ITEM));
  
      // The Submounts menu has been removed because the AFS tray icon
      // and control panel now support mapping drives directly to an AFS
      // path.
      //
!     //HMENU hSubmountMenu = CreatePopupMenu();
!     //int indexSubmountMenu = 0;
!     //::InsertMenu(hSubmountMenu, indexSubmountMenu++, MF_STRING | MF_BYPOSITION | nSingleDirOnly, idCmdFirst + IDM_SUBMOUNTS_CREATE, GetMessageString(IDS_SUBMOUNTS_CREATE_ITEM));
!     //::InsertMenu(hSubmountMenu, indexSubmountMenu++, MF_STRING | MF_BYPOSITION, idCmdFirst + IDM_SUBMOUNTS_EDIT, GetMessageString(IDS_SUBMOUNTS_EDIT_ITEM));
!     //::InsertMenu(hAfsMenu, indexAfsMenu++, MF_STRING | MF_BYPOSITION | MF_POPUP, (UINT)hSubmountMenu, GetMessageString(IDS_SUBMOUNTS_ITEM));
  
      // Add a separator
      ::InsertMenu (hMenu, indexMenu + indexShellMenu++, MF_STRING | MF_BYPOSITION | MF_SEPARATOR, 0, TEXT(""));
***************
*** 418,424 ****
  	dlg.DoModal();
  	break;
      }
! 		
      case IDM_REMOVE_SYMLINK:	{
  	if (files.GetSize()>1)
  	    break;
--- 419,429 ----
  	dlg.DoModal();
  	break;
      }
! 
!     case IDM_SYMBOLICLINK_SHOW:	
! 	ListSymlink(files);
! 	break;
! 
      case IDM_REMOVE_SYMLINK:	{
  	if (files.GetSize()>1)
  	    break;
***************
*** 502,507 ****
--- 507,516 ----
  	nCmdStrID = ID_SYMBOLICLINK_ADD;
  	break;
  		
+     case IDM_SYMBOLICLINK_SHOW:
+ 	nCmdStrID = ID_SYMBOLICLINK_SHOW;
+ 	break;
+ 
      case IDM_SYMBOLICLINK_REMOVE: 
  	nCmdStrID = ID_SYMBOLICLINK_REMOVE;
  	break;
Index: openafs/src/WINNT/client_exp/submounts_dlg.cpp
diff -c openafs/src/WINNT/client_exp/submounts_dlg.cpp:1.5 openafs/src/WINNT/client_exp/submounts_dlg.cpp:1.5.6.1
*** openafs/src/WINNT/client_exp/submounts_dlg.cpp:1.5	Fri Mar 11 00:35:12 2005
--- openafs/src/WINNT/client_exp/submounts_dlg.cpp	Fri Feb  8 21:32:24 2008
***************
*** 50,56 ****
                      0, 
                      "AFS", 
                      REG_OPTION_NON_VOLATILE,
!                     KEY_READ,
                      NULL, 
                      &hkSubmounts,
                      NULL );
--- 50,56 ----
                      0, 
                      "AFS", 
                      REG_OPTION_NON_VOLATILE,
!                     (IsWow64()?KEY_WOW64_64KEY:0)|KEY_READ,
                      NULL, 
                      &hkSubmounts,
                      NULL );
***************
*** 171,177 ****
                      0, 
                      "AFS", 
                      REG_OPTION_NON_VOLATILE,
!                     KEY_READ|KEY_WRITE|KEY_QUERY_VALUE,
                      NULL, 
                      &hkSubmounts,
                      NULL );
--- 171,177 ----
                      0, 
                      "AFS", 
                      REG_OPTION_NON_VOLATILE,
!                     (IsWow64()?KEY_WOW64_64KEY:0)|KEY_READ|KEY_WRITE|KEY_QUERY_VALUE,
                      NULL, 
                      &hkSubmounts,
                      NULL );
***************
*** 253,259 ****
                      0, 
                      "AFS", 
                      REG_OPTION_NON_VOLATILE,
!                     KEY_WRITE,
                      NULL, 
                      &hkSubmounts,
                      NULL );
--- 253,259 ----
                      0, 
                      "AFS", 
                      REG_OPTION_NON_VOLATILE,
!                     (IsWow64()?KEY_WOW64_64KEY:0)|KEY_WRITE,
                      NULL, 
                      &hkSubmounts,
                      NULL );
***************
*** 275,281 ****
                      0, 
                      "AFS", 
                      REG_OPTION_NON_VOLATILE,
!                     KEY_WRITE,
                      NULL, 
                      &hkSubmounts,
                      NULL );
--- 275,281 ----
                      0, 
                      "AFS", 
                      REG_OPTION_NON_VOLATILE,
!                     (IsWow64()?KEY_WOW64_64KEY:0)|KEY_WRITE,
                      NULL, 
                      &hkSubmounts,
                      NULL );
Index: openafs/src/WINNT/client_exp/symlinks_dlg.cpp
diff -c /dev/null openafs/src/WINNT/client_exp/symlinks_dlg.cpp:1.1.2.2
*** /dev/null	Mon Feb 11 10:58:12 2008
--- openafs/src/WINNT/client_exp/symlinks_dlg.cpp	Sat Jan 12 18:31:24 2008
***************
*** 0 ****
--- 1,84 ----
+ /*
+  * 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
+  */
+ 
+ extern "C" {
+ #include <afs/param.h>
+ #include <afs/stds.h>
+ }
+ 
+ #include "stdafx.h"
+ #include "afs_shl_ext.h"
+ #include "symlinks_dlg.h"
+ 
+ #ifdef _DEBUG
+ #define new DEBUG_NEW
+ #undef THIS_FILE
+ static char THIS_FILE[] = __FILE__;
+ #endif
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ // CSymlinksDlg dialog
+ 
+ 
+ CSymlinksDlg::CSymlinksDlg(CWnd* pParent /*=NULL*/)
+ 	: CDialog()
+ {
+ 	InitModalIndirect (TaLocale_GetDialogResource (CSymlinksDlg::IDD), pParent);
+ 
+ 	//{{AFX_DATA_INIT(CSymlinksDlg)
+ 		// NOTE: the ClassWizard will add member initialization here
+ 	//}}AFX_DATA_INIT
+ }
+ 
+ 
+ void CSymlinksDlg::DoDataExchange(CDataExchange* pDX)
+ {
+ 	CDialog::DoDataExchange(pDX);
+ 	//{{AFX_DATA_MAP(CSymlinksDlg)
+ 	DDX_Control(pDX, IDC_LIST, m_List);
+ 	//}}AFX_DATA_MAP
+ }
+ 
+ 
+ BEGIN_MESSAGE_MAP(CSymlinksDlg, CDialog)
+ 	//{{AFX_MSG_MAP(CSymlinksDlg)
+ 	ON_BN_CLICKED(IDHELP, OnHelp)
+ 	//}}AFX_MSG_MAP
+ END_MESSAGE_MAP()
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ // CSymlinksDlg message handlers
+ 
+ BOOL CSymlinksDlg::OnInitDialog() 
+ {
+ 	CDialog::OnInitDialog();
+ 
+ 	int tabs[] = { 64 };
+ 	
+ 	m_List.SetTabStops(sizeof(tabs) / sizeof(int), tabs);
+ 
+ 	for (int i = 0; i < m_Symlinks.GetSize(); i++)
+ 		m_List.AddString(m_Symlinks[i]);
+ 
+ 	return TRUE;  // return TRUE unless you set the focus to a control
+ 	              // EXCEPTION: OCX Property Pages should return FALSE
+ }
+ 
+ void CSymlinksDlg::SetSymlinks(const CStringArray& symlinks)
+ {
+ 	m_Symlinks.RemoveAll();
+ 
+ 	m_Symlinks.Copy(symlinks);
+ }
+ 
+ void CSymlinksDlg::OnHelp() 
+ {
+ 	ShowHelp(m_hWnd, SYMLINK_HELP_ID);
+ }
+ 
Index: openafs/src/WINNT/client_exp/symlinks_dlg.h
diff -c /dev/null openafs/src/WINNT/client_exp/symlinks_dlg.h:1.1.2.2
*** /dev/null	Mon Feb 11 10:58:12 2008
--- openafs/src/WINNT/client_exp/symlinks_dlg.h	Sat Jan 12 18:31:24 2008
***************
*** 0 ****
--- 1,43 ----
+ /*
+  * 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
+  */
+ 
+ class CSymlinksDlg : public CDialog
+ {
+ 	CStringArray m_Symlinks;
+ 	
+ // Construction
+ public:
+ 	CSymlinksDlg(CWnd* pParent = NULL);   // standard constructor
+ 
+ 	void SetSymlinks(const CStringArray& mountPoints);
+ 
+ // Dialog Data
+ 	//{{AFX_DATA(CSymlinksDlg)
+ 	enum { IDD = IDD_SYMLINKS };
+ 	CListBox	m_List;
+ 	//}}AFX_DATA
+ 
+ 
+ // Overrides
+ 	// ClassWizard generated virtual function overrides
+ 	//{{AFX_VIRTUAL(CSymlinksDlg)
+ 	protected:
+ 	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
+ 	//}}AFX_VIRTUAL
+ 
+ // Implementation
+ protected:
+ 
+ 	// Generated message map functions
+ 	//{{AFX_MSG(CSymlinksDlg)
+ 	virtual BOOL OnInitDialog();
+ 	afx_msg void OnHelp();
+ 	//}}AFX_MSG
+ 	DECLARE_MESSAGE_MAP()
+ };
Index: openafs/src/WINNT/client_exp/lang/en_US/afs_shl_ext.rc
diff -c openafs/src/WINNT/client_exp/lang/en_US/afs_shl_ext.rc:1.10.4.1 openafs/src/WINNT/client_exp/lang/en_US/afs_shl_ext.rc:1.10.4.2
*** openafs/src/WINNT/client_exp/lang/en_US/afs_shl_ext.rc:1.10.4.1	Thu Aug 31 07:35:12 2006
--- openafs/src/WINNT/client_exp/lang/en_US/afs_shl_ext.rc	Sat Jan 12 18:31:25 2008
***************
*** 318,329 ****
      LISTBOX         IDC_LIST,10,20,280,115,LBS_SORT | LBS_USETABSTOPS | 
                      LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL | 
                      WS_TABSTOP
!     LTEXT           "File",IDC_STATIC,10,11,13,8
      LTEXT           "Volume",IDC_STATIC,75,11,27,8
      LTEXT           "Cell",IDC_STATIC,155,11,15,8
      LTEXT           "Type",IDC_STATIC,230,11,20,8
  END
  
  IDD_DOWN_SERVERS DIALOG DISCARDABLE  0, 0, 209, 163
  STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
  CAPTION "Down Servers"
--- 318,343 ----
      LISTBOX         IDC_LIST,10,20,280,115,LBS_SORT | LBS_USETABSTOPS | 
                      LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL | 
                      WS_TABSTOP
!     LTEXT           "Name",IDC_STATIC,10,11,20,8
      LTEXT           "Volume",IDC_STATIC,75,11,27,8
      LTEXT           "Cell",IDC_STATIC,155,11,15,8
      LTEXT           "Type",IDC_STATIC,230,11,20,8
  END
  
+ IDD_SYMLINKS DIALOG DISCARDABLE  0, 0, 299, 168
+ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+ CAPTION "Symlinks"
+ FONT 8, "MS Sans Serif"
+ BEGIN
+     DEFPUSHBUTTON   "Close",IDOK,65,145,50,14
+     PUSHBUTTON      "Help",9,180,145,50,14
+     LISTBOX         IDC_LIST,10,20,280,115,LBS_SORT | LBS_USETABSTOPS | 
+                     LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL | 
+                     WS_TABSTOP
+     LTEXT           "Name",IDC_STATIC,10,11,20,8
+     LTEXT           "Target",IDC_STATIC,75,11,27,8
+ END
+ 
  IDD_DOWN_SERVERS DIALOG DISCARDABLE  0, 0, 209, 163
  STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
  CAPTION "Down Servers"
***************
*** 650,656 ****
  STRINGTABLE DISCARDABLE 
  BEGIN
      IDS_SYMBOLICLINK_ADD                  "&Add"
!     IDS_SYMBOLICLINK_EDIT                 "&Edit..."
      IDS_SYMBOLICLINK_REMOVE               "&Remove"
      IDS_SYMBOLIC_LINK_ITEM                "Symbolic &Link"
      IDS_UNABLE_TO_CREATE_SYMBOLIC_LINK    "Unable to create symbolic link: %o."
--- 664,670 ----
  STRINGTABLE DISCARDABLE 
  BEGIN
      IDS_SYMBOLICLINK_ADD                  "&Add"
!     IDS_SYMBOLICLINK_SHOW                 "&Show"
      IDS_SYMBOLICLINK_REMOVE               "&Remove"
      IDS_SYMBOLIC_LINK_ITEM                "Symbolic &Link"
      IDS_UNABLE_TO_CREATE_SYMBOLIC_LINK    "Unable to create symbolic link: %o."
***************
*** 661,666 ****
--- 675,684 ----
      IDS_NOT_AFS_CLIENT_ADMIN_ERROR        "Must be AFS Client Administrators to modify the root.afs volume."
      IDS_WARNING				  "Warning"
      IDS_VOLUME_NOT_IN_CELL_WARNING	  "Volume %s does not exist in cell %s.\n"
+     IDS_NOT_SYMLINK_ERROR                 "%o is not a symbolic link."
+     ID_SYMBOLICLINK_ADD         "symlink make"
+     ID_SYMBOLICLINK_SHOW        "symlink list"
+     ID_SYMBOLICLINK_REMOVE      "symlink remove"
  END
  
  STRINGTABLE DISCARDABLE 
Index: openafs/src/WINNT/client_osi/NTMakefile
diff -c openafs/src/WINNT/client_osi/NTMakefile:1.10.4.1 openafs/src/WINNT/client_osi/NTMakefile:1.10.4.2
*** openafs/src/WINNT/client_osi/NTMakefile:1.10.4.1	Mon Nov 20 13:04:53 2006
--- openafs/src/WINNT/client_osi/NTMakefile	Sat Feb  2 08:43:23 2008
***************
*** 46,52 ****
  
  EXELIBS = \
  	rpcrt4.lib rpcns4.lib \
! 	Ws2_32.lib \
  	$(DESTDIR)\lib\libosi.lib
  
  ############################################################################
--- 46,52 ----
  
  EXELIBS = \
  	rpcrt4.lib rpcns4.lib \
! 	Ws2_32.lib shell32.lib \
  	$(DESTDIR)\lib\libosi.lib
  
  ############################################################################
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.24 openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm:1.5.4.26
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm:1.5.4.24	Fri Dec 28 14:47:11 2007
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm	Wed Feb  6 12:58:17 2008
***************
*** 57,63 ****
  
  <h1>OpenAFS for Windows</h1>
  
! <h2>Version 1.5.29</h2>
  
  <p class=MsoNormal>&nbsp; </p>
  
--- 57,63 ----
  
  <h1>OpenAFS for Windows</h1>
  
! <h2>Version 1.5.31</h2>
  
  <p class=MsoNormal>&nbsp; </p>
  
***************
*** 80,86 ****
  <span
  style='font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span><a
! href="ReleaseNotes/relnotes-frames.htm">OpenAFS for Windows 1.5.29
  Release Notes</a></p>
  
  <p style='margin-left:36.0pt;text-indent:-18.0pt;'>
--- 80,86 ----
  <span
  style='font-family:Symbol'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span><a
! href="ReleaseNotes/relnotes-frames.htm">OpenAFS for Windows 1.5.31
  Release Notes</a></p>
  
  <p style='margin-left:36.0pt;text-indent:-18.0pt;'>
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm
diff -c openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm:1.1.6.24 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm:1.1.6.26
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm:1.1.6.24	Fri Dec 28 14:47:19 2007
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm	Wed Feb  6 12:58:20 2008
***************
*** 18,24 ****
  .shape {behavior:url(#default#VML);}
  </style>
  <![endif]-->
! <title>OpenAFS for Windows 1.5.29 Release Notes</title>
  <!--[if gte mso 9]><xml>
   <o:DocumentProperties>
    <o:Revision>1</o:Revision>
--- 18,24 ----
  .shape {behavior:url(#default#VML);}
  </style>
  <![endif]-->
! <title>OpenAFS for Windows 1.5.31 Release Notes</title>
  <!--[if gte mso 9]><xml>
   <o:DocumentProperties>
    <o:Revision>1</o:Revision>
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes-frames.htm
diff -c openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes-frames.htm:1.1.4.26 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes-frames.htm:1.1.4.28
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes-frames.htm:1.1.4.26	Fri Dec 28 14:47:19 2007
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes-frames.htm	Wed Feb  6 12:58:20 2008
***************
*** 8,14 ****
  <meta name=Generator content="Microsoft Word 11">
  <meta name=Originator content="Microsoft Word 11">
  <link rel=File-List href="relnotes-frames_files/filelist.xml">
! <title>OpenAFS for Windows 1.5.29 Release Notes</title>
  <!--[if gte mso 9]><xml>
   <w:WordDocument>
    <w:Zoom>0</w:Zoom>
--- 8,14 ----
  <meta name=Generator content="Microsoft Word 11">
  <meta name=Originator content="Microsoft Word 11">
  <link rel=File-List href="relnotes-frames_files/filelist.xml">
! <title>OpenAFS for Windows 1.5.31 Release Notes</title>
  <!--[if gte mso 9]><xml>
   <w:WordDocument>
    <w:Zoom>0</w:Zoom>
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm
diff -c openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm:1.6.4.30 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm:1.6.4.32
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm:1.6.4.30	Fri Dec 28 14:47:19 2007
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm	Wed Feb  6 12:58:20 2008
***************
*** 19,25 ****
  .shape {behavior:url(#default#VML);}
  </style>
  <![endif]-->
! <title>OpenAFS for Windows 1.5.29 Release Notes</title>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
   name="PostalCode"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
--- 19,25 ----
  .shape {behavior:url(#default#VML);}
  </style>
  <![endif]-->
! <title>OpenAFS for Windows 1.5.31 Release Notes</title>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
   name="PostalCode"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
***************
*** 41,62 ****
  <!--[if gte mso 9]><xml>
   <o:DocumentProperties>
    <o:LastAuthor>Jeffrey Altman</o:LastAuthor>
!   <o:Revision>3</o:Revision>
!   <o:TotalTime>930</o:TotalTime>
    <o:Created>2006-11-29T17:26:00Z</o:Created>
!   <o:LastSaved>2007-06-22T13:42:00Z</o:LastSaved>
    <o:Pages>1</o:Pages>
!   <o:Words>18300</o:Words>
!   <o:Characters>104312</o:Characters>
    <o:Company>Secure Endpoints Inc.</o:Company>
!   <o:Lines>869</o:Lines>
!   <o:Paragraphs>244</o:Paragraphs>
!   <o:CharactersWithSpaces>122368</o:CharactersWithSpaces>
    <o:Version>11.9999</o:Version>
   </o:DocumentProperties>
  </xml><![endif]--><!--[if gte mso 9]><xml>
   <w:WordDocument>
-   <w:Zoom>0</w:Zoom>
    <w:GrammarState>Clean</w:GrammarState>
    <w:ValidateAgainstSchemas/>
    <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
--- 41,61 ----
  <!--[if gte mso 9]><xml>
   <o:DocumentProperties>
    <o:LastAuthor>Jeffrey Altman</o:LastAuthor>
!   <o:Revision>4</o:Revision>
!   <o:TotalTime>1619</o:TotalTime>
    <o:Created>2006-11-29T17:26:00Z</o:Created>
!   <o:LastSaved>2008-01-08T16:12:00Z</o:LastSaved>
    <o:Pages>1</o:Pages>
!   <o:Words>18828</o:Words>
!   <o:Characters>107322</o:Characters>
    <o:Company>Secure Endpoints Inc.</o:Company>
!   <o:Lines>894</o:Lines>
!   <o:Paragraphs>251</o:Paragraphs>
!   <o:CharactersWithSpaces>125899</o:CharactersWithSpaces>
    <o:Version>11.9999</o:Version>
   </o:DocumentProperties>
  </xml><![endif]--><!--[if gte mso 9]><xml>
   <w:WordDocument>
    <w:GrammarState>Clean</w:GrammarState>
    <w:ValidateAgainstSchemas/>
    <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
***************
*** 150,156 ****
  	font-size:16.0pt;
  	font-family:Albany;}
  h2
! 	{margin-top:12.0pt;
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
--- 149,156 ----
  	font-size:16.0pt;
  	font-family:Albany;}
  h2
! 	{mso-style-link:"Heading 2 Char";
! 	margin-top:12.0pt;
  	margin-right:0pt;
  	margin-bottom:6.0pt;
  	margin-left:0pt;
***************
*** 479,484 ****
--- 479,498 ----
  	font-family:Thorndale;
  	mso-ascii-font-family:Thorndale;
  	mso-hansi-font-family:Thorndale;}
+ span.Heading2Char
+ 	{mso-style-name:"Heading 2 Char";
+ 	mso-style-locked:yes;
+ 	mso-style-link:"Heading 2";
+ 	mso-ansi-font-size:14.0pt;
+ 	mso-bidi-font-size:14.0pt;
+ 	font-family:Albany;
+ 	mso-ascii-font-family:Albany;
+ 	mso-hansi-font-family:Albany;
+ 	mso-ansi-language:EN-US;
+ 	mso-fareast-language:EN-US;
+ 	mso-bidi-language:AR-SA;
+ 	font-weight:bold;
+ 	font-style:italic;}
  span.GramE
  	{mso-style-name:"";
  	mso-gram-e:yes;}
***************
*** 492,499 ****
  	{page:Section1;}
   /* List Definitions */
   @list l0
! 	{mso-list-id:947470015;
! 	mso-list-template-ids:-1445297118;}
  @list l0:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
--- 506,513 ----
  	{page:Section1;}
   /* List Definitions */
   @list l0
! 	{mso-list-id:770122590;
! 	mso-list-template-ids:-194212550;}
  @list l0:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
***************
*** 571,577 ****
  	mso-bidi-language:#0400;}
  </style>
  <![endif]--><!--[if gte mso 9]><xml>
!  <o:shapedefaults v:ext="edit" spidmax="5122"/>
  </xml><![endif]--><!--[if gte mso 9]><xml>
   <o:shapelayout v:ext="edit">
    <o:idmap v:ext="edit" data="1"/>
--- 585,591 ----
  	mso-bidi-language:#0400;}
  </style>
  <![endif]--><!--[if gte mso 9]><xml>
!  <o:shapedefaults v:ext="edit" spidmax="7170"/>
  </xml><![endif]--><!--[if gte mso 9]><xml>
   <o:shapelayout v:ext="edit">
    <o:idmap v:ext="edit" data="1"/>
***************
*** 583,595 ****
  
  <div class=Section1>
  
! <p class=MsoTitle>OpenAFS for Windows 1.5.29<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
--- 597,609 ----
  
  <div class=Section1>
  
! <p class=MsoTitle>OpenAFS for Windows 1.5.31<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
***************
*** 663,672 ****
  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="_Toc184788738"></a><a name="_Toc152605032"></a><a
  name="_Toc115416098"></a><a name="_Toc139993082"></a><a name="_Toc126872163"></a><a
  name="_Toc115417109"></a><a name="_Toc115417037"></a><span style='mso-bookmark:
! _Toc184788738'><span style='mso-bookmark:_Toc152605032'><span style='mso-bookmark:
  _Toc115416098'>1. Installer Options</span></span></span></h1>
  
  <p class=MsoNormal>It can be installed either as a new installation or an
--- 677,686 ----
  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="_Toc190064014"></a><a name="_Toc152605032"></a><a
  name="_Toc115416098"></a><a name="_Toc139993082"></a><a name="_Toc126872163"></a><a
  name="_Toc115417109"></a><a name="_Toc115417037"></a><span style='mso-bookmark:
! _Toc190064014'><span style='mso-bookmark:_Toc152605032'><span style='mso-bookmark:
  _Toc115416098'>1. Installer Options</span></span></span></h1>
  
  <p class=MsoNormal>It can be installed either as a new installation or an
***************
*** 684,698 ****
  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="_Toc184788739"></a><a name="_Toc152605033"></a><a
  name="_Toc115416099"></a><a name="_Toc139993083"></a><a name="_Toc126872164"></a><a
  name="_Toc115417110"></a><a name="_Toc115417038"></a><span style='mso-bookmark:
! _Toc184788739'><span style='mso-bookmark:_Toc152605033'><span style='mso-bookmark:
  _Toc115416099'>2. System Requirements</span></span></span></h1>
  
! <h2><a name="_Toc184788740"></a><a name="_Toc152605034"></a><a
  name="_Toc115416100"></a><a name="_Toc139993084"></a><a name="_Toc126872165"></a><a
! name="_Toc115417039"></a><span style='mso-bookmark:_Toc184788740'><span
  style='mso-bookmark:_Toc152605034'><span style='mso-bookmark:_Toc115416100'>2.1
  Supported Operating Systems</span></span></span></h2>
  
--- 698,712 ----
  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="_Toc190064015"></a><a name="_Toc152605033"></a><a
  name="_Toc115416099"></a><a name="_Toc139993083"></a><a name="_Toc126872164"></a><a
  name="_Toc115417110"></a><a name="_Toc115417038"></a><span style='mso-bookmark:
! _Toc190064015'><span style='mso-bookmark:_Toc152605033'><span style='mso-bookmark:
  _Toc115416099'>2. System Requirements</span></span></span></h1>
  
! <h2><a name="_Toc190064016"></a><a name="_Toc152605034"></a><a
  name="_Toc115416100"></a><a name="_Toc139993084"></a><a name="_Toc126872165"></a><a
! name="_Toc115417039"></a><span style='mso-bookmark:_Toc190064016'><span
  style='mso-bookmark:_Toc152605034'><span style='mso-bookmark:_Toc115416100'>2.1
  Supported Operating Systems</span></span></span></h2>
  
***************
*** 739,749 ****
  <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 2008 Server (32-bit and 64-bit Intel) [experimental]</p>
  
! <h3><a name="_Toc184788741"></a><a name="_Toc152605035"></a><a
  name="_Toc115416101"></a><a name="_Toc139993085"></a><a name="_Toc126872166"></a><span
! style='mso-bookmark:_Toc184788741'><span style='mso-bookmark:_Toc152605035'><span
  style='mso-bookmark:_Toc115416101'>2.1.1 Unsupported Operating Systems</span></span></span></h3>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
--- 753,763 ----
  <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 2008 Server (32-bit and 64-bit Intel)</p>
  
! <h3><a name="_Toc190064017"></a><a name="_Toc152605035"></a><a
  name="_Toc115416101"></a><a name="_Toc139993085"></a><a name="_Toc126872166"></a><span
! style='mso-bookmark:_Toc190064017'><span style='mso-bookmark:_Toc152605035'><span
  style='mso-bookmark:_Toc115416101'>2.1.1 Unsupported Operating Systems</span></span></span></h3>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt'><span
***************
*** 776,784 ****
  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="_Toc184788742"></a><a name="_Toc152605036"></a><a
  name="_Toc115416102"></a><a name="_Toc139993086"></a><a name="_Toc126872167"></a><a
! name="_Toc115417040"></a><span style='mso-bookmark:_Toc184788742'><span
  style='mso-bookmark:_Toc152605036'><span style='mso-bookmark:_Toc115416102'>2.2
  Disk Space</span></span></span></h2>
  
--- 790,798 ----
  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="_Toc190064018"></a><a name="_Toc152605036"></a><a
  name="_Toc115416102"></a><a name="_Toc139993086"></a><a name="_Toc126872167"></a><a
! name="_Toc115417040"></a><span style='mso-bookmark:_Toc190064018'><span
  style='mso-bookmark:_Toc152605036'><span style='mso-bookmark:_Toc115416102'>2.2
  Disk Space</span></span></span></h2>
  
***************
*** 786,811 ****
  the default AFSCache file.&nbsp;&nbsp; (The size of the AFSCache file may be
  adjusted via the Registry after installation.)</p>
  
! <h2><a name="_Toc184788743"></a><a name="_Toc152605037"></a><a
  name="_Toc115416103"></a><a name="_Toc139993087"></a><a name="_Toc126872168"></a><a
! name="_Toc115417041"></a><span style='mso-bookmark:_Toc184788743'><span
  style='mso-bookmark:_Toc152605037'><span style='mso-bookmark:_Toc115416103'>2.3
  Additional Software</span> Packages</span></span></h2>
  
  <p class=MsoNormal><a href="http://web.mit.edu/kerberos/dist/index.html">MIT
! Kerberos for Windows</a> 2.6.x or 3.1.x if Kerberos v5 authentication support
  is desired.<span style='mso-spacerun:yes'>  </span>The recommended release is
  version 3.2.2.<span style='mso-spacerun:yes'>  </span></p>
  
! <h1><a name="_Toc184788744"></a><a name="_Toc152605038"></a><a
  name="_Toc115416104"></a><a name="_Toc139993088"></a><a name="_Toc126872169"></a><a
  name="_Toc115417111"></a><a name="_Toc115417042"></a><span style='mso-bookmark:
! _Toc184788744'><span style='mso-bookmark:_Toc152605038'><span style='mso-bookmark:
  _Toc115416104'>3. Operational Notes</span></span></span></h1>
  
! <h2><a name="_Toc184788745"></a><a name="_Toc152605039"></a><a
  name="_Toc115416105"></a><a name="_Toc139993089"></a><a name="_Toc126872170"></a><a
! name="_Toc115417043"></a><span style='mso-bookmark:_Toc184788745'><span
  style='mso-bookmark:_Toc152605039'><span style='mso-bookmark:_Toc115416105'>3.1.
  Requirements for Kerberos v5 Authentication</span></span></span></h2>
  
--- 800,825 ----
  the default AFSCache file.&nbsp;&nbsp; (The size of the AFSCache file may be
  adjusted via the Registry after installation.)</p>
  
! <h2><a name="_Toc190064019"></a><a name="_Toc152605037"></a><a
  name="_Toc115416103"></a><a name="_Toc139993087"></a><a name="_Toc126872168"></a><a
! name="_Toc115417041"></a><span style='mso-bookmark:_Toc190064019'><span
  style='mso-bookmark:_Toc152605037'><span style='mso-bookmark:_Toc115416103'>2.3
  Additional Software</span> Packages</span></span></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 v5 authentication support
  is desired.<span style='mso-spacerun:yes'>  </span>The recommended release is
  version 3.2.2.<span style='mso-spacerun:yes'>  </span></p>
  
! <h1><a name="_Toc190064020"></a><a name="_Toc152605038"></a><a
  name="_Toc115416104"></a><a name="_Toc139993088"></a><a name="_Toc126872169"></a><a
  name="_Toc115417111"></a><a name="_Toc115417042"></a><span style='mso-bookmark:
! _Toc190064020'><span style='mso-bookmark:_Toc152605038'><span style='mso-bookmark:
  _Toc115416104'>3. Operational Notes</span></span></span></h1>
  
! <h2><a name="_Toc190064021"></a><a name="_Toc152605039"></a><a
  name="_Toc115416105"></a><a name="_Toc139993089"></a><a name="_Toc126872170"></a><a
! name="_Toc115417043"></a><span style='mso-bookmark:_Toc190064021'><span
  style='mso-bookmark:_Toc152605039'><span style='mso-bookmark:_Toc115416105'>3.1.
  Requirements for Kerberos v5 Authentication</span></span></span></h2>
  
***************
*** 830,843 ****
  The OpenAFS client requires that all of the AFS Servers with which it
  communicates support the use of Kerberos v5 tickets as tokens. If Kerberos v5
  based tokens are presented to an AFS server that does not support them, the
! server will be unable to communicate with the client when tokens are present.
! Kerberos v5 based tokens are supported by OpenAFS release 1.2.8 or later.<span
  style='mso-spacerun:yes'>  </span>IBM Transarc servers do not support Kerberos
  v5.</p>
  
! <h3><a name="_Toc184788746"></a><a name="_Toc152605040"></a><a
  name="_Toc115416106"></a><a name="_Toc139993090"></a><a name="_Toc126872171"></a><span
! style='mso-bookmark:_Toc184788746'><span style='mso-bookmark:_Toc152605040'><span
  style='mso-bookmark:_Toc115416106'>3.1.1. Active Directory</span></span></span></h3>
  
  <p class=MsoNormal>Microsoft Windows Active Directory can be used as a Kerberos
--- 844,857 ----
  The OpenAFS client requires that all of the AFS Servers with which it
  communicates support the use of Kerberos v5 tickets as tokens. If Kerberos v5
  based tokens are presented to an AFS server that does not support them, the
! server will be unable to communicate with the client when tokens are present. Kerberos
! v5 based tokens are supported by OpenAFS release 1.2.8 or later.<span
  style='mso-spacerun:yes'>  </span>IBM Transarc servers do not support Kerberos
  v5.</p>
  
! <h3><a name="_Toc190064022"></a><a name="_Toc152605040"></a><a
  name="_Toc115416106"></a><a name="_Toc139993090"></a><a name="_Toc126872171"></a><span
! style='mso-bookmark:_Toc190064022'><span style='mso-bookmark:_Toc152605040'><span
  style='mso-bookmark:_Toc115416106'>3.1.1. Active Directory</span></span></span></h3>
  
  <p class=MsoNormal>Microsoft Windows Active Directory can be used as a Kerberos
***************
*** 869,889 ****
  style='mso-spacerun:yes'>  </span>This flag cannot be used if AFS service
  tickets are obtained via cross-realm using an Active Directory user principal.</p>
  
! <h3><a name="_Toc184788747"></a><a name="_Toc152605041"></a><a
  name="_Toc115416107"></a><a name="_Toc139993091"></a><a name="_Toc126872172"></a><span
! style='mso-bookmark:_Toc184788747'><span style='mso-bookmark:_Toc152605041'><span
  style='mso-bookmark:_Toc115416107'>3.1.2. Using the krb524 service</span></span></span></h3>
  
  <p class=MsoNormal>Some organizations have AFS cell names and Kerberos realm
! names which differ by more then just lower and upper case and rely on a modification
! to krb524d which maps a Kerberos v5 ticket from realm FOO to a Kerberos v4
! 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 v5 tickets as AFS (2b) tokens.
! This is the first building block necessary to break away from the limitations
! of Kerberos v4 with AFS.&nbsp; By using Kerberos v5 directly we avoid the
! security holes inherent in Kerberos v4 cross-realm.&nbsp; We also gain access
! to cryptographically stronger algorithms for authentication and encryption. </p>
  
  <p class=MsoNormal>Another reason for using Kerberos v5 directly is because the
  krb524 service runs on a port (4444/udp) which has increasingly been blocked by
--- 883,907 ----
  style='mso-spacerun:yes'>  </span>This flag cannot be used if AFS service
  tickets are obtained via cross-realm using an Active Directory user principal.</p>
  
! <p class=MsoNormal>Note that an Active Directory computer object cannot be used
! for the afs service principal.</p>
! 
! <h3><a name="_Toc190064023"></a><a name="_Toc152605041"></a><a
  name="_Toc115416107"></a><a name="_Toc139993091"></a><a name="_Toc126872172"></a><span
! style='mso-bookmark:_Toc190064023'><span style='mso-bookmark:_Toc152605041'><span
  style='mso-bookmark:_Toc115416107'>3.1.2. Using the krb524 service</span></span></span></h3>
  
  <p class=MsoNormal>Some organizations have AFS cell names and Kerberos realm
! names which differ by more then just lower and upper case and rely on a
! modification to krb524d which maps a Kerberos v5 ticket from realm FOO to a
! Kerberos v4 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 v5 tickets as AFS (2b)
! tokens. This is the first building block necessary to break away from the
! limitations of Kerberos v4 with AFS.&nbsp; By using Kerberos v5 directly we
! avoid the security holes inherent in Kerberos v4 cross-realm.&nbsp; We also
! gain access to cryptographically stronger algorithms for authentication and
! encryption. </p>
  
  <p class=MsoNormal>Another reason for using Kerberos v5 directly is because the
  krb524 service runs on a port (4444/udp) which has increasingly been blocked by
***************
*** 904,911 ****
  secondary realm name that can be treated as equivalent to the cell name for
  authentication. </p>
  
! <h3><a name="_Toc184788748"></a><a name="_Toc152605042"></a><a
! name="_3.1.3._Network_Identity"></a><span style='mso-bookmark:_Toc184788748'><span
  style='mso-bookmark:_Toc152605042'>3.1.3. Network Identity Manager P</span>rovider</span></h3>
  
  <p class=MsoNormal>As of release 1.5.9, OpenAFS for Windows includes a Network
--- 922,929 ----
  secondary realm name that can be treated as equivalent to the cell name for
  authentication. </p>
  
! <h3><a name="_Toc190064024"></a><a name="_Toc152605042"></a><a
! name="_3.1.3._Network_Identity"></a><span style='mso-bookmark:_Toc190064024'><span
  style='mso-bookmark:_Toc152605042'>3.1.3. Network Identity Manager P</span>rovider</span></h3>
  
  <p class=MsoNormal>As of release 1.5.9, OpenAFS for Windows includes a Network
***************
*** 949,957 ****
  <p class=MsoNormal>The Network Identity Manager replaces the former KFW ticket
  manager, Leash”, and when combined with the OpenAFS Provider, it is intended to
  be used as a replacement for the AFS System Tray Tool (afscreds.exe).<span
! style='mso-spacerun:yes'>  </span>Unlike both Leash and the AFS System Tray Tool,
! Network Identity Manager with the OpenAFS Provider can easily manage AFS tokens
! for multiple cells from one or more Kerberos v5 identities.</p>
  
  <p class=MsoNormal align=center style='text-align:center'><!--[if gte vml 1]><v:shape
   id="_x0000_i1026" type="#_x0000_t75" style='width:406.5pt;height:294.75pt'>
--- 967,975 ----
  <p class=MsoNormal>The Network Identity Manager replaces the former KFW ticket
  manager, Leash”, and when combined with the OpenAFS Provider, it is intended to
  be used as a replacement for the AFS System Tray Tool (afscreds.exe).<span
! style='mso-spacerun:yes'>  </span>Unlike both Leash and the AFS System Tray
! Tool, Network Identity Manager with the OpenAFS Provider can easily manage AFS
! tokens for multiple cells from one or more Kerberos v5 identities.</p>
  
  <p class=MsoNormal align=center style='text-align:center'><!--[if gte vml 1]><v:shape
   id="_x0000_i1026" type="#_x0000_t75" style='width:406.5pt;height:294.75pt'>
***************
*** 979,987 ****
  login.<span style='mso-spacerun:yes'>   </span>A shortcut to the OpenAFS
  Control Panel is also provided.</p>
  
! <h2><a name="_Toc184788749"></a><a name="_Toc152605043"></a><a
  name="_Toc115416108"></a><a name="_Toc139993092"></a><a name="_Toc126872173"></a><a
! name="_Toc115417044"></a><span style='mso-bookmark:_Toc184788749'><span
  style='mso-bookmark:_Toc152605043'><span style='mso-bookmark:_Toc115416108'>3.2.
  Use of the Microsoft Loopback Adapter</span> by the AFS Client Service</span></span></h2>
  
--- 997,1005 ----
  login.<span style='mso-spacerun:yes'>   </span>A shortcut to the OpenAFS
  Control Panel is also provided.</p>
  
! <h2><a name="_Toc190064025"></a><a name="_Toc152605043"></a><a
  name="_Toc115416108"></a><a name="_Toc139993092"></a><a name="_Toc126872173"></a><a
! name="_Toc115417044"></a><span style='mso-bookmark:_Toc190064025'><span
  style='mso-bookmark:_Toc152605043'><span style='mso-bookmark:_Toc115416108'>3.2.
  Use of the Microsoft Loopback Adapter</span> by the AFS Client Service</span></span></h2>
  
***************
*** 1001,1010 ****
  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;
--- 1019,1028 ----
  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;
***************
*** 1033,1047 ****
  
  <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="_Toc184788750"></a><a name="_Toc152605044"></a><a
  name="_Toc115416109"></a><a name="_Toc139993093"></a><a name="_Toc126872174"></a><a
! name="_Toc115417045"></a><span style='mso-bookmark:_Toc184788750'><span
  style='mso-bookmark:_Toc152605044'><span style='mso-bookmark:_Toc115416109'>3.3.
  Using Freelance (Dynamic Root) Mode to Improve Mobility</span></span></span></h2>
  
--- 1051,1065 ----
  
  <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="_Toc190064026"></a><a name="_Toc152605044"></a><a
  name="_Toc115416109"></a><a name="_Toc139993093"></a><a name="_Toc126872174"></a><a
! name="_Toc115417045"></a><span style='mso-bookmark:_Toc190064026'><span
  style='mso-bookmark:_Toc152605044'><span style='mso-bookmark:_Toc115416109'>3.3.
  Using Freelance (Dynamic Root) Mode to Improve Mobility</span></span></span></h2>
  
***************
*** 1053,1060 ****
  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
--- 1071,1078 ----
  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
***************
*** 1062,1069 ****
  volume from mount points and symlinks stored in the local registry.</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
--- 1080,1087 ----
  volume from mount points and symlinks stored in the local registry.</p>
  
  <p class=MsoNormal>The content of the fake “root.afs” volume is dynamically
! generated 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
***************
*** 1076,1083 ****
  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>
--- 1094,1101 ----
  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>
***************
*** 1110,1118 ****
  <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="_Toc184788751"></a><a name="_Toc152605045"></a><a
  name="_Toc115416110"></a><a name="_Toc139993094"></a><a name="_Toc126872175"></a><a
! name="_Toc115417046"></a><span style='mso-bookmark:_Toc184788751'><span
  style='mso-bookmark:_Toc152605045'><span style='mso-bookmark:_Toc115416110'>3.4.
  Locating AFS Volume Database Servers</span> via DNS</span></span> </h2>
  
--- 1128,1136 ----
  <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="_Toc190064027"></a><a name="_Toc152605045"></a><a
  name="_Toc115416110"></a><a name="_Toc139993094"></a><a name="_Toc126872175"></a><a
! name="_Toc115417046"></a><span style='mso-bookmark:_Toc190064027'><span
  style='mso-bookmark:_Toc152605045'><span style='mso-bookmark:_Toc115416110'>3.4.
  Locating AFS Volume Database Servers</span> via DNS</span></span> </h2>
  
***************
*** 1121,1129 ****
  are not present in the client's CellServDB file
  (\%PROGRAMFILES%\OpenAFS\Client\CellServDB).</p>
  
! <h2><a name="_Toc184788752"></a><a name="_Toc152605046"></a><a
  name="_Toc115416111"></a><a name="_Toc139993095"></a><a name="_Toc126872176"></a><a
! name="_Toc115417047"></a><span style='mso-bookmark:_Toc184788752'><span
  style='mso-bookmark:_Toc152605046'><span style='mso-bookmark:_Toc115416111'>3.5.
  Obtaining AFS Tokens as a Integrated Part of Windows Logon</span></span></span></h2>
  
--- 1139,1147 ----
  are not present in the client's CellServDB file
  (\%PROGRAMFILES%\OpenAFS\Client\CellServDB).</p>
  
! <h2><a name="_Toc190064028"></a><a name="_Toc152605046"></a><a
  name="_Toc115416111"></a><a name="_Toc139993095"></a><a name="_Toc126872176"></a><a
! name="_Toc115417047"></a><span style='mso-bookmark:_Toc190064028'><span
  style='mso-bookmark:_Toc152605046'><span style='mso-bookmark:_Toc115416111'>3.5.
  Obtaining AFS Tokens as a Integrated Part of Windows Logon</span></span></span></h2>
  
***************
*** 1149,1168 ****
  style='mso-spacerun:yes'>  </span>Use of the krb524 service can be configured
  via the <a href="#_Value:_Use524">Use524</a> registry value.</p>
  
! <p class=MsoNormal>Integrated Logon will not preserve the Kerberos v5 tickets.
! KFW 3.1 and above implements that functionality.</p>
  
  <p class=MsoNormal>Integrated Logon does not have the ability to cache the
! user's username and password for the purpose of obtaining tokens if the
! 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 about the <a href="#_Value:_TheseCells">TheseCells</a> value.</p>
  
! <h2><a name="_Toc184788753"></a><a name="_Toc152605047"></a><a
  name="_Toc115416112"></a><a name="_Toc139993096"></a><a name="_Toc126872177"></a><a
! name="_Toc115417048"></a><span style='mso-bookmark:_Toc184788753'><span
  style='mso-bookmark:_Toc152605047'><span style='mso-bookmark:_Toc115416112'>3.6.
  AFS System Tray Command Line Options</span></span></span></h2>
  
--- 1167,1195 ----
  style='mso-spacerun:yes'>  </span>Use of the krb524 service can be configured
  via the <a href="#_Value:_Use524">Use524</a> registry value.</p>
  
! <p class=MsoNormal>Integrated Logon will not transfer Kerberos v5 tickets into
! the user’s logon session credential cache. KFW 3.1 and above provides that
! functionality on its own.</p>
  
  <p class=MsoNormal>Integrated Logon does not have the ability to cache the
! user's username and password for the purpose of obtaining tokens if the Kerberos
! KDC is inaccessible at logon time.</p>
  
! <p class=MsoNormal>Integrated Logon supports the ability to obtain tokens for
  multiple cells.&nbsp; For further information on how to configure this feature
  read about the <a href="#_Value:_TheseCells">TheseCells</a> value.</p>
  
! <p class=MsoToc2 style='margin-left:0pt;tab-stops:right dotted 431.5pt'>Integrated
! Logon can be configured based upon the domain of the Windows account used to
! login to the machine. <span style='mso-spacerun:yes'> </span>See <span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc187554205">A.2.1 Domain specific configuration keys for the
! Network Provider</a>.</span></span><span style='mso-fareast-font-family:"Times New Roman";
! mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <h2><a name="_Toc190064029"></a><a name="_Toc152605047"></a><a
  name="_Toc115416112"></a><a name="_Toc139993096"></a><a name="_Toc126872177"></a><a
! name="_Toc115417048"></a><span style='mso-bookmark:_Toc190064029'><span
  style='mso-bookmark:_Toc152605047'><span style='mso-bookmark:_Toc115416112'>3.6.
  AFS System Tray Command Line Options</span></span></span></h2>
  
***************
*** 1171,1178 ****
  style='mso-spacerun:yes'>  </span>afscreds.exe will be removed from the OpenAFS
  in a future release.<o:p></o:p></span></p>
  
! <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>
  
--- 1198,1205 ----
  style='mso-spacerun:yes'>  </span>afscreds.exe will be removed from the OpenAFS
  in a future release.<o:p></o:p></span></p>
  
! <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>
  
***************
*** 1188,1195 ****
  <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>
  
--- 1215,1222 ----
  <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>
  
***************
*** 1218,1226 ****
  basis.&nbsp; See <a href="#_Value___:_AfscredsShortcutParams">AfscredsShortcutParams</a>
  in <a href="#_Appendix_A:_Registry_Values">Appendix A</a>.</p>
  
! <h2><a name="_Toc184788754"></a><a name="_Toc152605048"></a><a
  name="_Toc115416113"></a><a name="_Toc139993097"></a><a name="_Toc126872178"></a><a
! name="_Toc115417049"></a><span style='mso-bookmark:_Toc184788754'><span
  style='mso-bookmark:_Toc152605048'><span style='mso-bookmark:_Toc115416113'>3.7.
  The “AFS Client Admins” Authorization Group</span></span></span></h2>
  
--- 1245,1253 ----
  basis.&nbsp; See <a href="#_Value___:_AfscredsShortcutParams">AfscredsShortcutParams</a>
  in <a href="#_Appendix_A:_Registry_Values">Appendix A</a>.</p>
  
! <h2><a name="_Toc190064030"></a><a name="_Toc152605048"></a><a
  name="_Toc115416113"></a><a name="_Toc139993097"></a><a name="_Toc126872178"></a><a
! name="_Toc115417049"></a><span style='mso-bookmark:_Toc190064030'><span
  style='mso-bookmark:_Toc152605048'><span style='mso-bookmark:_Toc115416113'>3.7.
  The “AFS Client Admins” Authorization Group</span></span></span></h2>
  
***************
*** 1299,1307 ****
  the <a href="#_Value_:_SysName">registry</a> and not via &quot;fs
  sysname&quot;.</p>
  
! <h2><a name="_Toc184788755"></a><a name="_Toc152605049"></a><a
  name="_Toc115416114"></a><a name="_Toc139993098"></a><a name="_Toc126872179"></a><a
! name="_Toc115417050"></a><span style='mso-bookmark:_Toc184788755'><span
  style='mso-bookmark:_Toc152605049'><span style='mso-bookmark:_Toc115416114'>3.8.
  OpenAFS support for UNC paths</span></span></span> </h2>
  
--- 1326,1334 ----
  the <a href="#_Value_:_SysName">registry</a> and not via &quot;fs
  sysname&quot;.</p>
  
! <h2><a name="_Toc190064031"></a><a name="_Toc152605049"></a><a
  name="_Toc115416114"></a><a name="_Toc139993098"></a><a name="_Toc126872179"></a><a
! name="_Toc115417050"></a><span style='mso-bookmark:_Toc190064031'><span
  style='mso-bookmark:_Toc152605049'><span style='mso-bookmark:_Toc115416114'>3.8.
  OpenAFS support for UNC paths</span></span></span> </h2>
  
***************
*** 1325,1333 ****
  <p class=MsoNormal>JPSoftware's web site is <span class=MsoHyperlink><a
  href="http://www.jpsoft.com/">http://www.jpsoft.com</a></span>.</p>
  
! <h2><a name="_Toc184788756"></a><a name="_Toc152605050"></a><a
  name="_Toc115416115"></a><a name="_Toc139993099"></a><a name="_Toc126872180"></a><a
! name="_Toc115417051"></a><span style='mso-bookmark:_Toc184788756'><span
  style='mso-bookmark:_Toc152605050'><span style='mso-bookmark:_Toc115416115'>3.9.
  <span class=GramE>aklog.exe</span></span></span></span></h2>
  
--- 1352,1360 ----
  <p class=MsoNormal>JPSoftware's web site is <span class=MsoHyperlink><a
  href="http://www.jpsoft.com/">http://www.jpsoft.com</a></span>.</p>
  
! <h2><a name="_Toc190064032"></a><a name="_Toc152605050"></a><a
  name="_Toc115416115"></a><a name="_Toc139993099"></a><a name="_Toc126872180"></a><a
! name="_Toc115417051"></a><span style='mso-bookmark:_Toc190064032'><span
  style='mso-bookmark:_Toc152605050'><span style='mso-bookmark:_Toc115416115'>3.9.
  <span class=GramE>aklog.exe</span></span></span></span></h2>
  
***************
*** 1354,1361 ****
  <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>
--- 1381,1387 ----
  <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>
***************
*** 1368,1376 ****
  <p class=preformattedtext>&nbsp;&nbsp; -m = use krb524d to convert Kerberos V
  tickets to Kerberos IV</p>
  
! <h2><a name="_Toc184788757"></a><a name="_Toc152605051"></a><a
  name="_Toc115416116"></a><a name="_Toc139993100"></a><a name="_Toc126872181"></a><a
! name="_Toc115417052"></a><span style='mso-bookmark:_Toc184788757'><span
  style='mso-bookmark:_Toc152605051'><span style='mso-bookmark:_Toc115416116'>3.10.
  OpenAFS Servers on Windows are Unsupported</span></span></span></h2>
  
--- 1394,1402 ----
  <p class=preformattedtext>&nbsp;&nbsp; -m = use krb524d to convert Kerberos V
  tickets to Kerberos IV</p>
  
! <h2><a name="_Toc190064033"></a><a name="_Toc152605051"></a><a
  name="_Toc115416116"></a><a name="_Toc139993100"></a><a name="_Toc126872181"></a><a
! name="_Toc115417052"></a><span style='mso-bookmark:_Toc190064033'><span
  style='mso-bookmark:_Toc152605051'><span style='mso-bookmark:_Toc115416116'>3.10.
  OpenAFS Servers on Windows are Unsupported</span></span></span></h2>
  
***************
*** 1383,1389 ****
  and dynamic network configuration.<span style='mso-spacerun:yes'> 
  </span>Salvager is also known to crash.</p>
  
! <h3><a name="_Toc184788758">3.10.1. OpenAFS Server Installation</a></h3>
  
  <p class=MsoNormal>When the OpenAFS Server is installed, the TransarcAFSServer
  service (bosctlsvc.exe) will be installed and configured.<span
--- 1409,1415 ----
  and dynamic network configuration.<span style='mso-spacerun:yes'> 
  </span>Salvager is also known to crash.</p>
  
! <h3><a name="_Toc190064034">3.10.1. OpenAFS Server Installation</a></h3>
  
  <p class=MsoNormal>When the OpenAFS Server is installed, the TransarcAFSServer
  service (bosctlsvc.exe) will be installed and configured.<span
***************
*** 1394,1408 ****
  </span>However, following the instructions for installing the AFS Servers on
  UNIX it is possible to properly configure the AFS Servers on Microsoft
  Windows.<span style='mso-spacerun:yes'>  </span>The AFS Server binaries,
! configuration files, and log files are installed under %Program
! Files%\OpenAFS\Server.<span style='mso-spacerun:yes'>   </span><span
! style='color:red'><a href="http://www.openafs.org/no-more-des.html"><span
! class=GramE><span style='color:red'>kaserver</span></span><span
! style='color:red'> has been deprecated and its use is strongly discouraged.</span></a></span><span
  style='mso-spacerun:yes'>  </span>Instead, Active Directory or some other
  Kerberos v5 KDC should be used in its place.</p>
  
! <h3><a name="_Toc184788759">3.10.2. Using the AFS Client Service when the
  Server is installed</a></h3>
  
  <p class=MsoNormal>A few notes on the usage of the AFS Client Service if it is
--- 1420,1434 ----
  </span>However, following the instructions for installing the AFS Servers on
  UNIX it is possible to properly configure the AFS Servers on Microsoft
  Windows.<span style='mso-spacerun:yes'>  </span>The AFS Server binaries,
! configuration files, and log files are installed under %Program Files%\OpenAFS\Server.<span
! style='mso-spacerun:yes'>   </span><span style='color:red'><a
! href="http://www.openafs.org/no-more-des.html"><span class=GramE><span
! style='color:red'>kaserver</span></span><span style='color:red'> has been
! deprecated and its use is strongly discouraged.</span></a></span><span
  style='mso-spacerun:yes'>  </span>Instead, Active Directory or some other
  Kerberos v5 KDC should be used in its place.</p>
  
! <h3><a name="_Toc190064035">3.10.2. Using the AFS Client Service when the
  Server is installed</a></h3>
  
  <p class=MsoNormal>A few notes on the usage of the AFS Client Service if it is
***************
*** 1427,1441 ****
  <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 Servers are not aware of power management events nor are they aware of network
! configuration changes.<span style='mso-spacerun:yes'>  </span>It is strongly
! advised that the AFS servers be installed only on systems that will not be
! shutdown or suspended unexpectedly.<span style='mso-spacerun:yes'>   </span>An
! inadvertent shutdown will corrupt volume data.</p>
  
! <h2><a name="_Toc184788760"></a><a name="_Toc152605052"></a><a
  name="_Toc115416117"></a><a name="_Toc139993101"></a><a name="_Toc126872182"></a><a
! name="_Toc115417053"></a><span style='mso-bookmark:_Toc184788760'><span
  style='mso-bookmark:_Toc152605052'><span style='mso-bookmark:_Toc115416117'>3.11.
  OpenAFS Debugging Symbol files</span></span></span></h2>
  
--- 1453,1467 ----
  <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 Servers are not aware of power management events nor are they aware of
! network configuration changes.<span style='mso-spacerun:yes'>  </span>It is
! strongly advised that the AFS servers be installed only on systems that will
! not be shutdown or suspended unexpectedly.<span style='mso-spacerun:yes'>  
! </span>An inadvertent shutdown will corrupt volume data.</p>
  
! <h2><a name="_Toc190064036"></a><a name="_Toc152605052"></a><a
  name="_Toc115416117"></a><a name="_Toc139993101"></a><a name="_Toc126872182"></a><a
! name="_Toc115417053"></a><span style='mso-bookmark:_Toc190064036'><span
  style='mso-bookmark:_Toc152605052'><span style='mso-bookmark:_Toc115416117'>3.11.
  OpenAFS Debugging Symbol files</span></span></span></h2>
  
***************
*** 1468,1508 ****
  or not additional debug statements were compiled into the binaries (release:
  no, debug: yes)</p>
  
! <h2><a name="_Toc184788761"></a><a name="_Toc152605053"></a><a
  name="_Toc115416118"></a><a name="_Toc139993102"></a><a name="_Toc126872183"></a><a
! name="_Toc115417054"></a><span style='mso-bookmark:_Toc184788761'><span
  style='mso-bookmark:_Toc152605053'><span style='mso-bookmark:_Toc115416118'>3.12.
  </span>Large File (64-bit) Support</span></span></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 64-bit file sizes, then the maximum file size remains 2GB.</p>
  
! <h2><a name="_Toc184788762"></a><a name="_Toc152605054"></a><a
  name="_Toc115416119"></a><a name="_Toc139993103"></a><a name="_Toc126872184"></a><a
! name="_Toc115417055"></a><span style='mso-bookmark:_Toc184788762'><span
  style='mso-bookmark:_Toc152605054'><span style='mso-bookmark:_Toc115416119'>3.13.
  Encrypted AFS Network Communication</span></span></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="_Toc184788763"></a><a name="_Toc152605055"></a><a
  name="_Toc115416120"></a><a name="_Toc139993104"></a><a name="_Toc126872185"></a><a
! name="_Toc115417056"></a><span style='mso-bookmark:_Toc184788763'><span
  style='mso-bookmark:_Toc152605055'><span style='mso-bookmark:_Toc115416120'>3.14.
  Authenticated Access to the OpenAFS Client Service</span></span></span></h2>
  
  <p class=MsoNormal>OpenAFS authenticates 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 v5 authentication, the
  Windows SMB client will attempt to retrieve service tickets for
--- 1494,1534 ----
  or not additional debug statements were compiled into the binaries (release:
  no, debug: yes)</p>
  
! <h2><a name="_Toc190064037"></a><a name="_Toc152605053"></a><a
  name="_Toc115416118"></a><a name="_Toc139993102"></a><a name="_Toc126872183"></a><a
! name="_Toc115417054"></a><span style='mso-bookmark:_Toc190064037'><span
  style='mso-bookmark:_Toc152605053'><span style='mso-bookmark:_Toc115416118'>3.12.
  </span>Large File (64-bit) Support</span></span></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 64-bit file sizes, then the maximum file size remains 2GB.</p>
  
! <h2><a name="_Toc190064038"></a><a name="_Toc152605054"></a><a
  name="_Toc115416119"></a><a name="_Toc139993103"></a><a name="_Toc126872184"></a><a
! name="_Toc115417055"></a><span style='mso-bookmark:_Toc190064038'><span
  style='mso-bookmark:_Toc152605054'><span style='mso-bookmark:_Toc115416119'>3.13.
  Encrypted AFS Network Communication</span></span></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="_Toc190064039"></a><a name="_Toc152605055"></a><a
  name="_Toc115416120"></a><a name="_Toc139993104"></a><a name="_Toc126872185"></a><a
! name="_Toc115417056"></a><span style='mso-bookmark:_Toc190064039'><span
  style='mso-bookmark:_Toc152605055'><span style='mso-bookmark:_Toc115416120'>3.14.
  Authenticated Access to the OpenAFS Client Service</span></span></span></h2>
  
  <p class=MsoNormal>OpenAFS authenticates 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 v5 authentication, the
  Windows SMB client will attempt to retrieve service tickets for
***************
*** 1515,1523 ****
  Instead, Windows will internally recognize the request as coming from a local
  logon session.</p>
  
! <h2><a name="_Toc184788764"></a><a name="_Toc152605056"></a><a
  name="_Toc115416121"></a><a name="_Toc139993105"></a><a name="_Toc126872186"></a><a
! name="_Toc115417057"></a><span style='mso-bookmark:_Toc184788764'><span
  style='mso-bookmark:_Toc152605056'><span style='mso-bookmark:_Toc115416121'>3.15.
  No More INI Files</span></span></span></h2>
  
--- 1541,1549 ----
  Instead, Windows will internally recognize the request as coming from a local
  logon session.</p>
  
! <h2><a name="_Toc190064040"></a><a name="_Toc152605056"></a><a
  name="_Toc115416121"></a><a name="_Toc139993105"></a><a name="_Toc126872186"></a><a
! name="_Toc115417057"></a><span style='mso-bookmark:_Toc190064040'><span
  style='mso-bookmark:_Toc152605056'><span style='mso-bookmark:_Toc115416121'>3.15.
  No More INI Files</span></span></span></h2>
  
***************
*** 1525,1542 ****
  in Windows .INI files. &nbsp;&nbsp;The OpenAFS client does not use Windows .INI
  files for the storage of configuration data.&nbsp;&nbsp; All settings are
  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 will relocate the contents of the “afsdcell.ini”
! file to the new CellServDB file.&nbsp; OpenAFS will also import the contents of
! the “afs_freelance.ini” file to the Windows registry.&nbsp;&nbsp; OpenAFS will
! not process the contents of the “afsddbmt.ini”.</p>
  
! <h2><a name="_Toc184788765"></a><a name="_Toc152605057"></a><a
  name="_Toc115416122"></a><a name="_Toc139993106"></a><a name="_Toc126872187"></a><a
! name="_Toc115417058"></a><span style='mso-bookmark:_Toc184788765'><span
  style='mso-bookmark:_Toc152605057'><span style='mso-bookmark:_Toc115416122'>3.16.
  Microsoft Windows Internet Connection Firewall</span></span></span></h2>
  
--- 1551,1571 ----
  in Windows .INI files. &nbsp;&nbsp;The OpenAFS client does not use Windows .INI
  files for the storage of configuration data.&nbsp;&nbsp; All settings are
  stored in the registry (see <a href="#_Appendix_A:_Registry_Values">Appendix A</a>).&nbsp;
! The CellServDB file is now stored in either the %ALLUSERSPROFILE%\Application
! Data\OpenAFS\Client directory or the %PROGRAMFILES%\OpenAFS\Client directory.&nbsp;&nbsp;
! The <i><a href="#_Value___:_CellServDBDir">CellServDBDir</a></i> registry value
! or the AFSCONF environment variable can be used to specify an alternative
! location.</p>
! 
! <p class=MsoNormal>For users converting from IBM AFS clients, during
! installation OpenAFS will relocate the contents of the “afsdcell.ini” file to
! the new CellServDB file.&nbsp; OpenAFS will also import the contents of the
! “afs_freelance.ini” file to the Windows registry.&nbsp;&nbsp; OpenAFS will not
! process the contents of the “afsddbmt.ini”.</p>
  
! <h2><a name="_Toc190064041"></a><a name="_Toc152605057"></a><a
  name="_Toc115416122"></a><a name="_Toc139993106"></a><a name="_Toc126872187"></a><a
! name="_Toc115417058"></a><span style='mso-bookmark:_Toc190064041'><span
  style='mso-bookmark:_Toc152605057'><span style='mso-bookmark:_Toc115416122'>3.16.
  Microsoft Windows Internet Connection Firewall</span></span></span></h2>
  
***************
*** 1548,1556 ****
  to allow SMB authentication to be performed across the Microsoft Loopback
  Adapter.</p>
  
! <h2><a name="_Toc184788766"></a><a name="_Toc152605058"></a><a
  name="_Toc115416123"></a><a name="_Toc139993107"></a><a name="_Toc126872188"></a><a
! name="_Toc115417059"></a><span style='mso-bookmark:_Toc184788766'><span
  style='mso-bookmark:_Toc152605058'><span style='mso-bookmark:_Toc115416123'>3.17.
  Browsing AFS from the Explorer Shell and Office</span></span></span></h2>
  
--- 1577,1585 ----
  to allow SMB authentication to be performed across the Microsoft Loopback
  Adapter.</p>
  
! <h2><a name="_Toc190064042"></a><a name="_Toc152605058"></a><a
  name="_Toc115416123"></a><a name="_Toc139993107"></a><a name="_Toc126872188"></a><a
! name="_Toc115417059"></a><span style='mso-bookmark:_Toc190064042'><span
  style='mso-bookmark:_Toc152605058'><span style='mso-bookmark:_Toc115416123'>3.17.
  Browsing AFS from the Explorer Shell and Office</span></span></span></h2>
  
***************
*** 1559,1567 ****
  significantly enhances the interoperability of AFS volumes within the Explorer
  Shell and Microsoft Office applications.</p>
  
! <h2><a name="_Toc184788767"></a><a name="_Toc152605059"></a><a
  name="_Toc115416124"></a><a name="_Toc139993108"></a><a name="_Toc126872189"></a><a
! name="_Toc115417060"></a><span style='mso-bookmark:_Toc184788767'><span
  style='mso-bookmark:_Toc152605059'><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</span></span></h2>
--- 1588,1596 ----
  significantly enhances the interoperability of AFS volumes within the Explorer
  Shell and Microsoft Office applications.</p>
  
! <h2><a name="_Toc190064043"></a><a name="_Toc152605059"></a><a
  name="_Toc115416124"></a><a name="_Toc139993108"></a><a name="_Toc126872189"></a><a
! name="_Toc115417060"></a><span style='mso-bookmark:_Toc190064043'><span
  style='mso-bookmark:_Toc152605059'><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</span></span></h2>
***************
*** 1570,1577 ****
  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 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
--- 1599,1606 ----
  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
! 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
***************
*** 1596,1607 ****
  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 exclusive lock when accessing files the OpenAFS Client’s
--- 1625,1636 ----
  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 exclusive lock when accessing files the OpenAFS Client’s
***************
*** 1659,1685 ****
  file server, this can be performed using the <a
  href="#_Value:_EnableServerLocks">EnableServerLocks</a> registry value.</p>
  
! <h2><a name="_Toc184788768"></a><a name="_Toc152605060"></a><a
  name="_Toc115416125"></a><a name="_Toc139993109"></a><a name="_Toc126872190"></a><a
! name="_Toc115417061"></a><span style='mso-bookmark:_Toc184788768'><span
  style='mso-bookmark:_Toc152605060'><span style='mso-bookmark:_Toc115416125'>3.19.
  Automatic Discarding of AFS Tokens at Logoff</span></span></span></h2>
  
  <p class=MsoNormal>The OpenAFS Client 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. (<span class=GramE>see</span> <a
  href="#_Appendix_A:_Registry_Values">Appendix A</a>.)</p>
  
! <h2><a name="_Toc184788769"></a><a name="_Toc152605061"></a><a
  name="_Toc115416126"></a><a name="_Toc139993110"></a><a name="_Toc126872191"></a><a
! name="_Toc115417062"></a><span style='mso-bookmark:_Toc184788769'><span
  style='mso-bookmark:_Toc152605061'><span style='mso-bookmark:_Toc115416126'>3.20.
  Windows Terminal Server installations</span></span></span></h2>
  
--- 1688,1715 ----
  file server, this can be performed using the <a
  href="#_Value:_EnableServerLocks">EnableServerLocks</a> registry value.</p>
  
! <h2><a name="_Toc190064044"></a><a name="_Toc152605060"></a><a
  name="_Toc115416125"></a><a name="_Toc139993109"></a><a name="_Toc126872190"></a><a
! name="_Toc115417061"></a><span style='mso-bookmark:_Toc190064044'><span
  style='mso-bookmark:_Toc152605060'><span style='mso-bookmark:_Toc115416125'>3.19.
  Automatic Discarding of AFS Tokens at Logoff</span></span></span></h2>
  
  <p class=MsoNormal>The OpenAFS Client 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. (<span class=GramE>see</span> <a
  href="#_Appendix_A:_Registry_Values">Appendix A</a>.)</p>
  
! <h2><a name="_Toc190064045"></a><a name="_Toc152605061"></a><a
  name="_Toc115416126"></a><a name="_Toc139993110"></a><a name="_Toc126872191"></a><a
! name="_Toc115417062"></a><span style='mso-bookmark:_Toc190064045'><span
  style='mso-bookmark:_Toc152605061'><span style='mso-bookmark:_Toc115416126'>3.20.
  Windows Terminal Server installations</span></span></span></h2>
  
***************
*** 1689,1697 ****
  The AFS Server should not be installed on a machine with Terminal Server
  installed.</p>
  
! <h2><a name="_Toc184788770"></a><a name="_Toc152605062"></a><a
  name="_Toc115416127"></a><a name="_Toc139993111"></a><a name="_Toc126872192"></a><a
! name="_Toc115417063"></a><span style='mso-bookmark:_Toc184788770'><span
  style='mso-bookmark:_Toc152605062'><span style='mso-bookmark:_Toc115416127'>3.21.
  Hidden Dot Files</span></span></span></h2>
  
--- 1719,1727 ----
  The AFS Server should not be installed on a machine with Terminal Server
  installed.</p>
  
! <h2><a name="_Toc190064046"></a><a name="_Toc152605062"></a><a
  name="_Toc115416127"></a><a name="_Toc139993111"></a><a name="_Toc126872192"></a><a
! name="_Toc115417063"></a><span style='mso-bookmark:_Toc190064046'><span
  style='mso-bookmark:_Toc152605062'><span style='mso-bookmark:_Toc115416127'>3.21.
  Hidden Dot Files</span></span></span></h2>
  
***************
*** 1702,1710 ****
  style='mso-spacerun:yes'>  </span>This behavior can be altered via the <a
  href="#_Value:_HideDotFiles">HideDotFiles</a> registry value.</p>
  
! <h2><a name="_Toc184788771"></a><a name="_Toc152605063"></a><a
  name="_Toc115416128"></a><a name="_Toc139993112"></a><a name="_Toc126872193"></a><a
! name="_Toc115417064"></a><span style='mso-bookmark:_Toc184788771'><span
  style='mso-bookmark:_Toc152605063'><span style='mso-bookmark:_Toc115416128'>3.22.
  Status Cache Limits</span></span></span></h2>
  
--- 1732,1740 ----
  style='mso-spacerun:yes'>  </span>This behavior can be altered via the <a
  href="#_Value:_HideDotFiles">HideDotFiles</a> registry value.</p>
  
! <h2><a name="_Toc190064047"></a><a name="_Toc152605063"></a><a
  name="_Toc115416128"></a><a name="_Toc139993112"></a><a name="_Toc126872193"></a><a
! name="_Toc115417064"></a><span style='mso-bookmark:_Toc190064047'><span
  style='mso-bookmark:_Toc152605063'><span style='mso-bookmark:_Toc115416128'>3.22.
  Status Cache Limits</span></span></span></h2>
  
***************
*** 1724,1745 ****
  style='mso-spacerun:yes'>  </span>This can be adjusted using the <a
  href="#_Value:_Stats">Stats</a> registry value.</p>
  
! <h2><a name="_Toc184788772"></a><a name="_Toc152605064"></a><a
  name="_Toc115416129"></a><a name="_Toc139993113"></a><a name="_Toc126872194"></a><a
! name="_Toc115417065"></a><span style='mso-bookmark:_Toc184788772'><span
  style='mso-bookmark:_Toc152605064'><span style='mso-bookmark:_Toc115416129'>3.23.
  NETBIOS over TCP/IP must be enabled</span></span></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.<span
  style='mso-spacerun:yes'>  </span>If you are using the Microsoft Loopback
  Adapter, configure the “Netbios over TCP/IP” setting for the adapter.</p>
  
! <h2><a name="_Toc184788773"></a><a name="_Toc152605065"></a><a
  name="_Toc115416130"></a><a name="_Toc139993114"></a><a name="_Toc126872195"></a><a
! name="_Toc115417066"></a><span style='mso-bookmark:_Toc184788773'><span
  style='mso-bookmark:_Toc152605065'><span style='mso-bookmark:_Toc115416130'>3.24.
  OpenAFS binaries are digitally signed</span></span></span></h2>
  
--- 1754,1775 ----
  style='mso-spacerun:yes'>  </span>This can be adjusted using the <a
  href="#_Value:_Stats">Stats</a> registry value.</p>
  
! <h2><a name="_Toc190064048"></a><a name="_Toc152605064"></a><a
  name="_Toc115416129"></a><a name="_Toc139993113"></a><a name="_Toc126872194"></a><a
! name="_Toc115417065"></a><span style='mso-bookmark:_Toc190064048'><span
  style='mso-bookmark:_Toc152605064'><span style='mso-bookmark:_Toc115416129'>3.23.
  NETBIOS over TCP/IP must be enabled</span></span></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.<span
  style='mso-spacerun:yes'>  </span>If you are using the Microsoft Loopback
  Adapter, configure the “Netbios over TCP/IP” setting for the adapter.</p>
  
! <h2><a name="_Toc190064049"></a><a name="_Toc152605065"></a><a
  name="_Toc115416130"></a><a name="_Toc139993114"></a><a name="_Toc126872195"></a><a
! name="_Toc115417066"></a><span style='mso-bookmark:_Toc190064049'><span
  style='mso-bookmark:_Toc152605065'><span style='mso-bookmark:_Toc115416130'>3.24.
  OpenAFS binaries are digitally signed</span></span></span></h2>
  
***************
*** 1758,1766 ****
  registry value which can be used to disable the signature check.&nbsp; The file
  version check cannot be disabled.</p>
  
! <h2><a name="_Toc184788774"></a><a name="_Toc152605066"></a><a
  name="_Toc115416131"></a><a name="_Toc139993115"></a><a name="_Toc126872196"></a><a
! name="_Toc115417067"></a><span style='mso-bookmark:_Toc184788774'><span
  style='mso-bookmark:_Toc152605066'><span style='mso-bookmark:_Toc115416131'>3.25.
  Maximum Size of the AFSCache File</span></span></span></h2>
  
--- 1788,1796 ----
  registry value which can be used to disable the signature check.&nbsp; The file
  version check cannot be disabled.</p>
  
! <h2><a name="_Toc190064050"></a><a name="_Toc152605066"></a><a
  name="_Toc115416131"></a><a name="_Toc139993115"></a><a name="_Toc126872196"></a><a
! name="_Toc115417067"></a><span style='mso-bookmark:_Toc190064050'><span
  style='mso-bookmark:_Toc152605066'><span style='mso-bookmark:_Toc115416131'>3.25.
  Maximum Size of the AFSCache File</span></span></span></h2>
  
***************
*** 1773,1793 ****
  signature check.<span style='mso-spacerun:yes'>  </span>Significantly larger
  cache sizes can be used on 64-bit Windows.</p>
  
! <h2><a name="_Toc184788775"></a><a name="_Toc152605067"></a><a
  name="_Toc115416132"></a><a name="_Toc139993116"></a><a name="_Toc126872197"></a><a
! name="_Toc115417068"></a><span style='mso-bookmark:_Toc184788775'><span
  style='mso-bookmark:_Toc152605067'><span style='mso-bookmark:_Toc115416132'>3.26.
  Filename Character Sets</span></span></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'>
--- 1803,1823 ----
  signature check.<span style='mso-spacerun:yes'>  </span>Significantly larger
  cache sizes can be used on 64-bit Windows.</p>
  
! <h2><a name="_Toc190064051"></a><a name="_Toc152605067"></a><a
  name="_Toc115416132"></a><a name="_Toc139993116"></a><a name="_Toc126872197"></a><a
! name="_Toc115417068"></a><span style='mso-bookmark:_Toc190064051'><span
  style='mso-bookmark:_Toc152605067'><span style='mso-bookmark:_Toc115416132'>3.26.
  Filename Character Sets</span></span></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'>
***************
*** 1879,1887 ****
  able to access filenames containing the above characters which were created
  without this setting.</p>
  
! <h2><a name="_Toc184788776"></a><a name="_Toc152605068"></a><a
  name="_Toc115416133"></a><a name="_Toc139993117"></a><a name="_Toc126872198"></a><a
! name="_Toc115417069"></a><span style='mso-bookmark:_Toc184788776'><span
  style='mso-bookmark:_Toc152605068'><span style='mso-bookmark:_Toc115416133'>3.27.
  Known Character Set Issues with Roaming Profiles</span></span></span></h2>
  
--- 1909,1917 ----
  able to access filenames containing the above characters which were created
  without this setting.</p>
  
! <h2><a name="_Toc190064052"></a><a name="_Toc152605068"></a><a
  name="_Toc115416133"></a><a name="_Toc139993117"></a><a name="_Toc126872198"></a><a
! name="_Toc115417069"></a><span style='mso-bookmark:_Toc190064052'><span
  style='mso-bookmark:_Toc152605068'><span style='mso-bookmark:_Toc115416133'>3.27.
  Known Character Set Issues with Roaming Profiles</span></span></span></h2>
  
***************
*** 1890,1902 ****
  be represented in the local OEM character set.&nbsp; In this case, attempts to
  write the profile back to AFS will fail during the character set
  conversion.&nbsp; The OpenAFS Client’s CIFS gateway does not support
! UNICODE.&nbsp; To avoid this problem some sites run custom logoff scripts
! (assigned by group policy) which rename all files to use only the supported
! characters for the locale.</p>
  
! <h2><a name="_Toc184788777"></a><a name="_Toc152605069"></a><a
  name="_Toc115416134"></a><a name="_Toc139993118"></a><a name="_Toc126872199"></a><a
! name="_Toc115417070"></a><span style='mso-bookmark:_Toc184788777'><span
  style='mso-bookmark:_Toc152605069'><span style='mso-bookmark:_Toc115416134'>3.28.
  The AFSCache File</span></span></span></h2>
  
--- 1920,1932 ----
  be represented in the local OEM character set.&nbsp; In this case, attempts to
  write the profile back to AFS will fail during the character set
  conversion.&nbsp; The OpenAFS Client’s CIFS gateway does not support
! UNICODE.&nbsp; To avoid this problem some sites run custom logoff scripts (assigned
! by group policy) which rename all files to use only the supported characters
! for the locale.</p>
  
! <h2><a name="_Toc190064053"></a><a name="_Toc152605069"></a><a
  name="_Toc115416134"></a><a name="_Toc139993118"></a><a name="_Toc126872199"></a><a
! name="_Toc115417070"></a><span style='mso-bookmark:_Toc190064053'><span
  style='mso-bookmark:_Toc152605069'><span style='mso-bookmark:_Toc115416134'>3.28.
  The AFSCache File</span></span></span></h2>
  
***************
*** 1914,1922 ****
  gains can be achieved by defragmenting the AFSCache file with Sysinternal's
  Contig utility while the AFS Client Service is stopped.</p>
  
! <h2><a name="_Toc184788778"></a><a name="_Toc152605070"></a><a
  name="_Toc115416135"></a><a name="_Toc139993119"></a><a name="_Toc126872200"></a><a
! name="_Toc115417071"></a><span style='mso-bookmark:_Toc184788778'><span
  style='mso-bookmark:_Toc152605070'><span style='mso-bookmark:_Toc115416135'>3.29.
  Restricting OpenAFS Client Service Start and Stop</span></span></span></h2>
  
--- 1944,1952 ----
  gains can be achieved by defragmenting the AFSCache file with Sysinternal's
  Contig utility while the AFS Client Service is stopped.</p>
  
! <h2><a name="_Toc190064054"></a><a name="_Toc152605070"></a><a
  name="_Toc115416135"></a><a name="_Toc139993119"></a><a name="_Toc126872200"></a><a
! name="_Toc115417071"></a><span style='mso-bookmark:_Toc190064054'><span
  style='mso-bookmark:_Toc152605070'><span style='mso-bookmark:_Toc115416135'>3.29.
  Restricting OpenAFS Client Service Start and Stop</span></span></span></h2>
  
***************
*** 1943,1951 ****
  <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  &nbsp;&nbsp;-show&nbsp; : Show current DACL (SDSF)</p>
  
! <h2><a name="_Toc184788779"></a><a name="_Toc152605071"></a><a
  name="_Toc115416136"></a><a name="_Toc139993120"></a><a name="_Toc126872201"></a><a
! name="_Toc115417072"></a><span style='mso-bookmark:_Toc184788779'><span
  style='mso-bookmark:_Toc152605071'><span style='mso-bookmark:_Toc115416136'>3.30.
  The @sys Name List</span></span></span></h2>
  
--- 1973,1981 ----
  <p class=preformattedtext>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  &nbsp;&nbsp;-show&nbsp; : Show current DACL (SDSF)</p>
  
! <h2><a name="_Toc190064055"></a><a name="_Toc152605071"></a><a
  name="_Toc115416136"></a><a name="_Toc139993120"></a><a name="_Toc126872201"></a><a
! name="_Toc115417072"></a><span style='mso-bookmark:_Toc190064055'><span
  style='mso-bookmark:_Toc152605071'><span style='mso-bookmark:_Toc115416136'>3.30.
  The @sys Name List</span></span></span></h2>
  
***************
*** 1953,1961 ****
  &quot;x86_win32 i386_w2k i386_nt40&quot; for 32-bit x86 systems.&nbsp; The
  default is &quot;amd64_win64&quot; for amd 64-bit versions of Windows.</p>
  
! <h2><a name="_Toc184788780"></a><a name="_Toc152605072"></a><a
  name="_Toc115416137"></a><a name="_Toc139993121"></a><a name="_Toc126872202"></a><a
! name="_Toc115417073"></a><span style='mso-bookmark:_Toc184788780'><span
  style='mso-bookmark:_Toc152605072'><span style='mso-bookmark:_Toc115416137'>3.31.
  Symlinks to AFS UNC paths</span></span></span></h2>
  
--- 1983,1991 ----
  &quot;x86_win32 i386_w2k i386_nt40&quot; for 32-bit x86 systems.&nbsp; The
  default is &quot;amd64_win64&quot; for amd 64-bit versions of Windows.</p>
  
! <h2><a name="_Toc190064056"></a><a name="_Toc152605072"></a><a
  name="_Toc115416137"></a><a name="_Toc139993121"></a><a name="_Toc126872202"></a><a
! name="_Toc115417073"></a><span style='mso-bookmark:_Toc190064056'><span
  style='mso-bookmark:_Toc152605072'><span style='mso-bookmark:_Toc115416137'>3.31.
  Symlinks to AFS UNC paths</span></span></span></h2>
  
***************
*** 1963,1994 ****
  treated the same as symlinks to /afs/...&nbsp; However, please use /afs/... as
  the Windows UNC form will not work on UNIX client.</p>
  
! <h2><a name="_Toc184788781"></a><a name="_Toc152605073"></a><a
  name="_Toc115416138"></a><a name="_Toc139993122"></a><a name="_Toc126872203"></a><a
! name="_Toc115417074"></a><span style='mso-bookmark:_Toc184788781'><span
  style='mso-bookmark:_Toc152605073'><span style='mso-bookmark:_Toc115416138'>3.32.
  Cache Manager Debugging</span></span></span></h2>
  
  <p class=MsoNormal>The OpenAFS Client 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="_Toc184788782"></a><a name="_Toc152605074"></a><a
  name="_Toc115416139"></a><a name="_Toc139993123"></a><a name="_Toc126872204"></a><a
! name="_Toc115417075"></a><span style='mso-bookmark:_Toc184788782'><span
  style='mso-bookmark:_Toc152605074'><span style='mso-bookmark:_Toc115416139'>3.33.
  Windows Logon Caching vs. Kerberos Logons</span></span></span></h2>
  
--- 1993,2045 ----
  treated the same as symlinks to /afs/...&nbsp; However, please use /afs/... as
  the Windows UNC form will not work on UNIX client.</p>
  
! <h2><a name="_Toc190064057"></a><a name="_Toc152605073"></a><a
  name="_Toc115416138"></a><a name="_Toc139993122"></a><a name="_Toc126872203"></a><a
! name="_Toc115417074"></a><span style='mso-bookmark:_Toc190064057'><span
  style='mso-bookmark:_Toc152605073'><span style='mso-bookmark:_Toc115416138'>3.32.
  Cache Manager Debugging</span></span></span></h2>
  
  <p class=MsoNormal>The OpenAFS Client implements the Cache Manager Debugging
! RPC Interface.&nbsp; The CM debugger can be queried with cmdebug.exe.<span
! style='mso-spacerun:yes'>  </span></p>
  
  <p class=preformattedtext>Usage: cmdebug -servers &lt;server machine&gt; [-port
! &lt;IP port&gt;] [-long] [-refcounts]</p>
! 
! <p class=preformattedtext><span style='mso-spacerun:yes'>             </span><span
! style='mso-spacerun:yes'> </span>[-callbacks] [-ctime] [-addrs] [-cache]
! [-cellservdb] [-help]</p>
! 
! <p class=preformattedtext>Where: -long<span style='mso-spacerun:yes'>       
! </span>print all info<o:p></o:p></p>
! 
! <p class=preformattedtext><span style='mso-spacerun:yes'>      
! </span>-refcounts<span style='mso-spacerun:yes'>   </span>print only cache
! entries with positive reference counts<o:p></o:p></p>
  
! <p class=preformattedtext><span style='mso-spacerun:yes'>      
! </span>-callbacks<span style='mso-spacerun:yes'>   </span>print only cache
! entries with callbacks<o:p></o:p></p>
  
! <p class=preformattedtext><span style='mso-spacerun:yes'>      
! </span>-ctime<span style='mso-spacerun:yes'>       </span>print human readable
! expiration time<o:p></o:p></p>
  
! <p class=preformattedtext><span style='mso-spacerun:yes'>      
! </span>-addrs<span style='mso-spacerun:yes'>       </span>print only host
! interfaces<o:p></o:p></p>
  
! <p class=preformattedtext><span style='mso-spacerun:yes'>      
! </span>-cache<span style='mso-spacerun:yes'>       </span>print only cache
! configuration<o:p></o:p></p>
  
! <p class=preformattedtext><span style='mso-spacerun:yes'>       </span>-<span
! class=GramE>cellservdb<span style='mso-spacerun:yes'>  </span>print</span> only
! cellservdb info</p>
! 
! <h2><a name="_Toc190064058"></a><a name="_Toc152605074"></a><a
  name="_Toc115416139"></a><a name="_Toc139993123"></a><a name="_Toc126872204"></a><a
! name="_Toc115417075"></a><span style='mso-bookmark:_Toc190064058'><span
  style='mso-bookmark:_Toc152605074'><span style='mso-bookmark:_Toc115416139'>3.33.
  Windows Logon Caching vs. Kerberos Logons</span></span></span></h2>
  
***************
*** 1997,2005 ****
  multi-domain Windows forest, you must enable Windows logon caching unless the
  workstation is Windows Vista.</p>
  
! <h2><a name="_Toc184788783"></a><a name="_Toc152605075"></a><a
  name="_Toc115416140"></a><a name="_Toc139993124"></a><a name="_Toc126872205"></a><a
! name="_Toc115417076"></a><span style='mso-bookmark:_Toc184788783'><span
  style='mso-bookmark:_Toc152605075'><span style='mso-bookmark:_Toc115416140'>3.34.
  Initial Server Preferences</span></span></span></h2>
  
--- 2048,2056 ----
  multi-domain Windows forest, you must enable Windows logon caching unless the
  workstation is Windows Vista.</p>
  
! <h2><a name="_Toc190064059"></a><a name="_Toc152605075"></a><a
  name="_Toc115416140"></a><a name="_Toc139993124"></a><a name="_Toc126872205"></a><a
! name="_Toc115417076"></a><span style='mso-bookmark:_Toc190064059'><span
  style='mso-bookmark:_Toc152605075'><span style='mso-bookmark:_Toc115416140'>3.34.
  Initial Server Preferences</span></span></span></h2>
  
***************
*** 2010,2018 ****
  &quot;<a href="#_Regkey:_[HKLMSOFTWAREOpenAFSClie_2">Server Preferences</a>&quot;
  keys.</p>
  
! <h2><a name="_Toc184788784"></a><a name="_Toc152605076"></a><a
  name="_Toc115416141"></a><a name="_Toc139993125"></a><a name="_Toc126872206"></a><a
! name="_Toc115417077"></a><span style='mso-bookmark:_Toc184788784'><span
  style='mso-bookmark:_Toc152605076'><span style='mso-bookmark:_Toc115416141'>3.35.
  File Timestamps</span></span></span></h2>
  
--- 2061,2069 ----
  &quot;<a href="#_Regkey:_[HKLMSOFTWAREOpenAFSClie_2">Server Preferences</a>&quot;
  keys.</p>
  
! <h2><a name="_Toc190064060"></a><a name="_Toc152605076"></a><a
  name="_Toc115416141"></a><a name="_Toc139993125"></a><a name="_Toc126872206"></a><a
! name="_Toc115417077"></a><span style='mso-bookmark:_Toc190064060'><span
  style='mso-bookmark:_Toc152605076'><span style='mso-bookmark:_Toc115416141'>3.35.
  File Timestamps</span></span></span></h2>
  
***************
*** 2034,2042 ****
  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="_Toc184788785"></a><a name="_Toc152605077"></a><a
  name="_Toc115416142"></a><a name="_Toc139993126"></a><a name="_Toc126872207"></a><a
! name="_Toc115417078"></a><span style='mso-bookmark:_Toc184788785'><span
  style='mso-bookmark:_Toc152605077'><span style='mso-bookmark:_Toc115416142'>3.36.
  Windows RPC client support must be installed</span></span></span> </h2>
  
--- 2085,2093 ----
  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="_Toc190064061"></a><a name="_Toc152605077"></a><a
  name="_Toc115416142"></a><a name="_Toc139993126"></a><a name="_Toc126872207"></a><a
! name="_Toc115417078"></a><span style='mso-bookmark:_Toc190064061'><span
  style='mso-bookmark:_Toc152605077'><span style='mso-bookmark:_Toc115416142'>3.36.
  Windows RPC client support must be installed</span></span></span> </h2>
  
***************
*** 2050,2076 ****
  <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="_Toc184788786"></a><a name="_Toc152605078"></a><a
  name="_Toc115416143"></a><a name="_Toc139993127"></a><a name="_Toc126872208"></a><a
! name="_Toc115417079"></a><span style='mso-bookmark:_Toc184788786'><span
  style='mso-bookmark:_Toc152605078'><span style='mso-bookmark:_Toc115416143'>3.37.
  Generating Minidumps of the OpenAFS Client Service</span></span></span></h2>
  
  <p class=MsoNormal>OpenAFS 1.4 added 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="_Toc184788787"></a><a name="_Toc152605079"></a><a
  name="_Toc115416144"></a><a name="_Toc139993128"></a><a name="_Toc126872209"></a><a
! name="_Toc115417080"></a><span style='mso-bookmark:_Toc184788787'><span
  style='mso-bookmark:_Toc152605079'><span style='mso-bookmark:_Toc115416144'>3.38.
  AFS Client Universally Unique Identifiers (UUIDs) vs. System Cloning</span></span></span></h2>
  
--- 2101,2127 ----
  <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="_Toc190064062"></a><a name="_Toc152605078"></a><a
  name="_Toc115416143"></a><a name="_Toc139993127"></a><a name="_Toc126872208"></a><a
! name="_Toc115417079"></a><span style='mso-bookmark:_Toc190064062'><span
  style='mso-bookmark:_Toc152605078'><span style='mso-bookmark:_Toc115416143'>3.37.
  Generating Minidumps of the OpenAFS Client Service</span></span></span></h2>
  
  <p class=MsoNormal>OpenAFS 1.4 added 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="_Toc190064063"></a><a name="_Toc152605079"></a><a
  name="_Toc115416144"></a><a name="_Toc139993128"></a><a name="_Toc126872209"></a><a
! name="_Toc115417080"></a><span style='mso-bookmark:_Toc190064063'><span
  style='mso-bookmark:_Toc152605079'><span style='mso-bookmark:_Toc115416144'>3.38.
  AFS Client Universally Unique Identifiers (UUIDs) vs. System Cloning</span></span></span></h2>
  
***************
*** 2108,2142 ****
  installer by performing an administrative install via <i style='mso-bidi-font-style:
  normal'>msiexec.exe /a</i>.</p>
  
! <h2><a name="_Toc184788788"></a><a name="_Toc139993129"></a><a
  name="_Toc152605080"><span style='mso-bookmark:_Toc139993129'><span
! style='mso-bookmark:_Toc184788788'>3.39. Delayed Write Errors with Microsoft
  Office Applications</span></span></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="#_Value:_ConnDeadTimeout">registry</a>.</p>
  
! <h2><a name="_Toc184788789"></a><a name="_Toc152605081"></a><a
  name="_Toc139993130"><span style='mso-bookmark:_Toc152605081'><span
! style='mso-bookmark:_Toc184788789'>3.40. Global Drives (aka </span></span></a><st1:Street
! w:st="on"><st1:address w:st="on"><span style='mso-bookmark:_Toc184788789'><span
    style='mso-bookmark:_Toc152605081'>Service Drive</span></span></st1:address></st1:Street><span
! style='mso-bookmark:_Toc184788789'><span style='mso-bookmark:_Toc152605081'>
! Letters) are no longer supported by Microsoft</span></span></h2>
  
  <p class=MsoBodyText>The Global DriveAuto-mount feature has been deprecated due
  to the following Microsoft KB article.</p>
--- 2159,2193 ----
  installer by performing an administrative install via <i style='mso-bidi-font-style:
  normal'>msiexec.exe /a</i>.</p>
  
! <h2><a name="_Toc190064064"></a><a name="_Toc139993129"></a><a
  name="_Toc152605080"><span style='mso-bookmark:_Toc139993129'><span
! style='mso-bookmark:_Toc190064064'>3.39. Delayed Write Errors with Microsoft
  Office Applications</span></span></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="#_Value:_ConnDeadTimeout">registry</a>.</p>
  
! <h2><a name="_Toc190064065"></a><a name="_Toc152605081"></a><a
  name="_Toc139993130"><span style='mso-bookmark:_Toc152605081'><span
! style='mso-bookmark:_Toc190064065'>3.40. Global Drives (aka </span></span></a><st1:Street
! w:st="on"><st1:address w:st="on"><span style='mso-bookmark:_Toc190064065'><span
    style='mso-bookmark:_Toc152605081'>Service Drive</span></span></st1:address></st1:Street><span
! style='mso-bookmark:_Toc190064065'><span style='mso-bookmark:_Toc152605081'> Letters)
! are no longer supported by Microsoft</span></span></h2>
  
  <p class=MsoBodyText>The Global DriveAuto-mount feature has been deprecated due
  to the following Microsoft KB article.</p>
***************
*** 2154,2162 ****
  applications should be modified to use of \\AFS\&lt;cellname&gt;\&lt;path&gt;
  instead of drive letters.</p>
  
! <h2><a name="_Toc184788790"></a><a name="_Toc139993131"></a><a
  name="_Toc152605082"><span style='mso-bookmark:_Toc139993131'><span
! style='mso-bookmark:_Toc184788790'>3.41. 64-bit Microsoft Windows Installations</span></span></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
--- 2205,2213 ----
  applications should be modified to use of \\AFS\&lt;cellname&gt;\&lt;path&gt;
  instead of drive letters.</p>
  
! <h2><a name="_Toc190064066"></a><a name="_Toc139993131"></a><a
  name="_Toc152605082"><span style='mso-bookmark:_Toc139993131'><span
! style='mso-bookmark:_Toc190064066'>3.41. 64-bit Microsoft Windows Installations</span></span></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
***************
*** 2167,2197 ****
  for Windows can be used with the 32-bit OpenAFS Tools to manage AFS tokens.</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="_Toc184788791"></a><a name="_Toc152605083"></a><a
  name="_Toc139993132"><span style='mso-bookmark:_Toc152605083'><span
! style='mso-bookmark:_Toc184788791'>3.42. Known Issues with Microsoft Windows </span></span></a><st1:place
! w:st="on"><span style='mso-bookmark:_Toc184788791'><span style='mso-bookmark:
   _Toc152605083'>Vista</span></span></st1:place></h2>
  
  <p class=MsoBodyText>OpenAFS for Windows works with Microsoft Windows Vista
  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) may 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>Due to a feature change in Windows Vista’s Plug-n-Play
  network stack, during a standby/hibernate operation the MSLA is disabled just
! as any other piece of hardware would be.<span style='mso-spacerun:yes'> 
  </span>This causes the OpenAFS Client’s network binding to be lost.<span
  style='mso-spacerun:yes'>  </span>As a result, it takes anywhere from 30 to 90
  seconds after the operating system is resumed for access to the OpenAFS Client
  and the AFS file space to become available.<span style='mso-spacerun:yes'> 
! </span>Until the network bindings have be re-established ticket managers and
  other tools will report that the AFS Client Service may not have been started.</p>
  
  <p class=MsoBodyText>Windows Vista implements <a
--- 2218,2249 ----
  for Windows can be used with the 32-bit OpenAFS Tools to manage AFS tokens.</p>
  
  <p class=MsoBodyText>OpenAFS on 64-bit Windows benefits from the lifting of the
! 2GB process memory restriction that is present in 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="_Toc190064067"></a><a name="_Toc152605083"></a><a
  name="_Toc139993132"><span style='mso-bookmark:_Toc152605083'><span
! style='mso-bookmark:_Toc190064067'>3.42. Known Issues with Microsoft Windows </span></span></a><st1:place
! w:st="on"><span style='mso-bookmark:_Toc190064067'><span style='mso-bookmark:
   _Toc152605083'>Vista</span></span></st1:place></h2>
  
  <p class=MsoBodyText>OpenAFS for Windows works with Microsoft Windows Vista
  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>Due to a feature change in Windows Vista’s Plug-n-Play
  network stack, during a standby/hibernate operation the MSLA is disabled just
! as any other hardware device would be.<span style='mso-spacerun:yes'> 
  </span>This causes the OpenAFS Client’s network binding to be lost.<span
  style='mso-spacerun:yes'>  </span>As a result, it takes anywhere from 30 to 90
  seconds after the operating system is resumed for access to the OpenAFS Client
  and the AFS file space to become available.<span style='mso-spacerun:yes'> 
! </span>Until the network bindings have been re-established, ticket managers and
  other tools will report that the AFS Client Service may not have been started.</p>
  
  <p class=MsoBodyText>Windows Vista implements <a
***************
*** 2220,2228 ****
  href="http://support.microsoft.com/kb/917607">Windows Vista does not include a
  help engine for this format.</a> </p>
  
! <h2><a name="_Toc115416145"></a><a name="_Toc184788792"></a><a
  name="_Toc139993133"></a><a name="_Toc126872210"></a><a name="_Toc115417081"></a><span
! style='mso-bookmark:_Toc115416145'><span style='mso-bookmark:_Toc184788792'>3.43.
  New AFS Share Name Syntax Provides Direct Access to Volumes</span></span></h2>
  
  <p class=MsoBodyText><span style='mso-bookmark:_Toc115416145'>Starting with the
--- 2272,2280 ----
  href="http://support.microsoft.com/kb/917607">Windows Vista does not include a
  help engine for this format.</a> </p>
  
! <h2><a name="_Toc115416145"></a><a name="_Toc190064068"></a><a
  name="_Toc139993133"></a><a name="_Toc126872210"></a><a name="_Toc115417081"></a><span
! style='mso-bookmark:_Toc115416145'><span style='mso-bookmark:_Toc190064068'>3.43.
  New AFS Share Name Syntax Provides Direct Access to Volumes</span></span></h2>
  
  <p class=MsoBodyText><span style='mso-bookmark:_Toc115416145'>Starting with the
***************
*** 2249,2265 ****
  <p class=MsoBodyText><span style='mso-bookmark:_Toc115416145'><span
  style='mso-tab-count:1'>            </span>\\AFS\athena.mit.edu# 537235559\</span></p>
  
! <h2><span style='mso-bookmark:_Toc115416145'><a name="_Toc184788793">3.44.
  Differences between Windows and UNIX “fs examine”</a></span></h2>
  
  <p class=MsoBodyText><span style='mso-bookmark:_Toc115416145'>The OpenAFS for
  Windows version of “fs examine” provide two additional lines of output when
  compared to the UNIX implementation.<span style='mso-spacerun:yes'> 
  </span>These lines include the owner and group information for the file as well
! as the volume status.</span></p>
  
  <pre><span style='mso-bookmark:_Toc115416145'>[C:\]fs examine \\afs\athena#user.jaltman</span></pre><pre><span
! style='mso-bookmark:_Toc115416145'>File \\afs\athena#user.jaltman (537235559.1.1) contained in cell athena.mit.edu</span></pre><pre><span
  style='mso-bookmark:_Toc115416145'><b style='mso-bidi-font-weight:normal'>Owner jaltman (28180) Group 0<o:p></o:p></b></span></pre><pre><span
  style='mso-bookmark:_Toc115416145'>Volume status for vid = 537235559 named user.jaltman is</span></pre><pre><span
  style='mso-bookmark:_Toc115416145'>Current disk quota is 1500000</span></pre><pre><span
--- 2301,2319 ----
  <p class=MsoBodyText><span style='mso-bookmark:_Toc115416145'><span
  style='mso-tab-count:1'>            </span>\\AFS\athena.mit.edu# 537235559\</span></p>
  
! <h2><span style='mso-bookmark:_Toc115416145'><a name="_Toc190064069">3.44.
  Differences between Windows and UNIX “fs examine”</a></span></h2>
  
  <p class=MsoBodyText><span style='mso-bookmark:_Toc115416145'>The OpenAFS for
  Windows version of “fs examine” provide two additional lines of output when
  compared to the UNIX implementation.<span style='mso-spacerun:yes'> 
  </span>These lines include the owner and group information for the file as well
! as the volume status.<span style='mso-spacerun:yes'>  </span>The Windows output
! will also indicate the type of object {File, Directory, Mountpoint, <span
! class=GramE>Symlink, …}</span> that was examined.</span></p>
  
  <pre><span style='mso-bookmark:_Toc115416145'>[C:\]fs examine \\afs\athena#user.jaltman</span></pre><pre><span
! style='mso-bookmark:_Toc115416145'>Directory \\afs\athena#user.jaltman (537235559.1.1) contained in cell athena.mit.edu</span></pre><pre><span
  style='mso-bookmark:_Toc115416145'><b style='mso-bidi-font-weight:normal'>Owner jaltman (28180) Group 0<o:p></o:p></b></span></pre><pre><span
  style='mso-bookmark:_Toc115416145'>Volume status for vid = 537235559 named user.jaltman is</span></pre><pre><span
  style='mso-bookmark:_Toc115416145'>Current disk quota is 1500000</span></pre><pre><span
***************
*** 2268,2285 ****
  style='mso-bookmark:_Toc115416145'>Volume is online <b style='mso-bidi-font-weight:
  normal'><o:p></o:p></b></span></pre>
  
! <h1><span style='mso-bookmark:_Toc115416145'><a name="_Toc184788794">4. How to
  Debug Problems with OpenAFS for Windows:</a></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="_Toc184788795"></a><a name="_Toc139993134"></a><a
  name="_Toc126872211"></a><a name="_Toc115417082"></a><span style='mso-bookmark:
! _Toc184788795'>4.1. <span class=GramE>pioctl</span> debugging (</span><a
! href="#_Value:_IoctlDebug"><span style='mso-bookmark:_Toc184788795'>IoctlDebug</span><span
! style='mso-bookmark:_Toc184788795'></span></a><span style='mso-bookmark:_Toc184788795'>
  registry key)</span></h2>
  
  <p class=MsoNormal>pioctl (path-based ioctl) calls are used by various tools to
--- 2322,2362 ----
  style='mso-bookmark:_Toc115416145'>Volume is online <b style='mso-bidi-font-weight:
  normal'><o:p></o:p></b></span></pre>
  
! <h2><span style='mso-bookmark:_Toc115416145'><a name="_Toc190064070">3.45.
! Literal evaluation of AFS objects via fs commands</a></span></h2>
! 
! <p class=MsoBodyText><span style='mso-bookmark:_Toc115416145'>Beginning with
! the 1.5.31 release, the fs commands <i style='mso-bidi-font-style:normal'>examine</i>,
! <i style='mso-bidi-font-style:normal'>flush</i>, <i style='mso-bidi-font-style:
! normal'>whereis</i>, and <i style='mso-bidi-font-style:normal'>whichcell</i>
! provide a new command-line parameter, <i style='mso-bidi-font-style:normal'>-literal</i>.
! <span style='mso-spacerun:yes'> </span>When specified, if the evaluated object
! is a symlink or a mountpoint the resulting output will describe the specified
! object and not the object that is the target of the symlink or mountpoint.</span></p>
! 
! <h2><span style='mso-bookmark:_Toc115416145'><a name="_Toc190064071">3.46. Out
! of Quota errors</a></span></h2>
! 
! <p class=MsoBodyText><span style='mso-bookmark:_Toc115416145'>Prior to the
! 1.5.31 release, out of quota errors were reported to the calling application as
! an out of space error. <span style='mso-spacerun:yes'> </span>As of 1.5.31, an
! out of space error will indicate that the partition on which the volume is
! located is in fact out of space. <span style='mso-spacerun:yes'> </span>Whereas
! an out of quota error indicates that the user does not have permission to
! allocate additional space.</span></p>
! 
! <h1><span style='mso-bookmark:_Toc115416145'><a name="_Toc190064072">4. How to
  Debug Problems with OpenAFS for Windows:</a></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="_Toc190064073"></a><a name="_Toc139993134"></a><a
  name="_Toc126872211"></a><a name="_Toc115417082"></a><span style='mso-bookmark:
! _Toc190064073'>4.1. <span class=GramE>pioctl</span> debugging (</span><a
! href="#_Value:_IoctlDebug"><span style='mso-bookmark:_Toc190064073'>IoctlDebug</span><span
! style='mso-bookmark:_Toc190064073'></span></a><span style='mso-bookmark:_Toc190064073'>
  registry key)</span></h2>
  
  <p class=MsoNormal>pioctl (path-based ioctl) calls are used by various tools to
***************
*** 2345,2364 ****
  the Microsoft KnowledgeBase can be used as a reference to help you determine
  the configuration probem with your system.</p>
  
! <h2><a name="_Toc184788796"></a><a name="_Toc139993135"></a><a
  name="_Toc126872212"></a><a name="_Toc115417083"></a><span style='mso-bookmark:
! _Toc184788796'>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
--- 2422,2440 ----
  the Microsoft KnowledgeBase can be used as a reference to help you determine
  the configuration probem with your system.</p>
  
! <h2><a name="_Toc190064074"></a><a name="_Toc139993135"></a><a
  name="_Toc126872212"></a><a name="_Toc115417083"></a><span style='mso-bookmark:
! _Toc190064074'>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
***************
*** 2366,2374 ****
  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="_Toc184788797"></a><a name="_Toc139993136"></a><a
  name="_Toc126872213"></a><a name="_Toc115417084"></a><span style='mso-bookmark:
! _Toc184788797'>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
--- 2442,2450 ----
  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="_Toc190064075"></a><a name="_Toc139993136"></a><a
  name="_Toc126872213"></a><a name="_Toc115417084"></a><span style='mso-bookmark:
! _Toc190064075'>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
***************
*** 2383,2395 ****
  
  <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="_Toc184788798"></a><a name="_Toc139993137"></a><a
  name="_Toc126872214"></a><a name="_Toc115417085"></a><span style='mso-bookmark:
! _Toc184788798'>4.4. Using SysInternal’s DbgView and ProcMon or 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
--- 2459,2471 ----
  
  <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="_Toc190064076"></a><a name="_Toc139993137"></a><a
  name="_Toc126872214"></a><a name="_Toc115417085"></a><span style='mso-bookmark:
! _Toc190064076'>4.4. Using SysInternal’s DbgView and ProcMon or 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
***************
*** 2405,2412 ****
  <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
--- 2481,2488 ----
  <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
***************
*** 2428,2434 ****
  data can be stored to files for inclusion in <a href="#_5._Reporting_Bugs:">bug
  reports</a>.</p>
  
! <h2><a name="_Toc184788799">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
--- 2504,2510 ----
  data can be stored to files for inclusion in <a href="#_5._Reporting_Bugs:">bug
  reports</a>.</p>
  
! <h2><a name="_Toc190064077">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
***************
*** 2437,2445 ****
  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="_Toc184788800"></a><a name="_Toc139993139"></a><a
  name="_Toc126872216"></a><a name="_Toc115417087"></a><span style='mso-bookmark:
! _Toc184788800'>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
--- 2513,2521 ----
  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="_Toc190064078"></a><a name="_Toc139993139"></a><a
  name="_Toc126872216"></a><a name="_Toc115417087"></a><span style='mso-bookmark:
! _Toc190064078'>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
***************
*** 2451,2463 ****
  
  <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="_Toc184788801"></a><a name="_Toc139993140"></a><a
  name="_Toc126872217"></a><a name="_Toc115417088"></a><span style='mso-bookmark:
! _Toc184788801'>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
--- 2527,2539 ----
  
  <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="_Toc190064079"></a><a name="_Toc139993140"></a><a
  name="_Toc126872217"></a><a name="_Toc115417088"></a><span style='mso-bookmark:
! _Toc190064079'>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
***************
*** 2491,2498 ****
  <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>
--- 2567,2574 ----
  <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>
***************
*** 2506,2543 ****
  <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="_Toc184788802"></a><a name="_Toc139993141"></a><a
  name="_Toc126872218"></a><a name="_Toc115417089"></a><span style='mso-bookmark:
! _Toc184788802'>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><span lang=FR style='mso-ansi-language:FR'>Usage:
! cmdebug -servers &lt;server machine&gt; [-port &lt;IP port&gt;] [-long] <o:p></o:p></span></p>
  
! <p class=preformattedtext style='margin-left:70.9pt'><span lang=FR
! style='mso-ansi-language:FR'>&nbsp;&nbsp; </span>[-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="_Toc184788803"></a><a name="_Toc139993142"></a><a
  name="_Toc126872219"></a><a name="_Toc115417090"></a><span style='mso-bookmark:
! _Toc184788803'>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
--- 2582,2627 ----
  <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="_Toc190064080"></a><a name="_Toc139993141"></a><a
  name="_Toc126872218"></a><a name="_Toc115417089"></a><span style='mso-bookmark:
! _Toc190064080'>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] [-refcounts] </p>
  
! <p class=preformattedtext><span style='mso-spacerun:yes'>       </span>[-callbacks]
! [-ctime] [-addrs] [-cache] [-cellservdb] [-help]<o:p></o:p></p>
  
! <p class=preformattedtext>Where: -long<span style='mso-spacerun:yes'>       
! </span>print all info<o:p></o:p></p>
  
! <p class=preformattedtext><span style='mso-spacerun:yes'>       </span>-refcounts<span
! style='mso-spacerun:yes'>   </span>print only cache entries with positive
! reference counts<o:p></o:p></p>
  
! <p class=preformattedtext><span style='mso-spacerun:yes'>       </span>-callbacks<span
! style='mso-spacerun:yes'>   </span>print only cache entries with callbacks<o:p></o:p></p>
  
! <p class=preformattedtext><span style='mso-spacerun:yes'>       </span>-ctime<span
! style='mso-spacerun:yes'>       </span>print human readable expiration time<o:p></o:p></p>
  
! <p class=preformattedtext><span style='mso-spacerun:yes'>       </span>-addrs<span
! style='mso-spacerun:yes'>       </span>print only host interfaces<o:p></o:p></p>
! 
! <p class=preformattedtext><span style='mso-spacerun:yes'>      
! </span>-cache<span style='mso-spacerun:yes'>       </span>print only cache
! configuration<o:p></o:p></p>
  
! <p class=preformattedtext><span style='mso-spacerun:yes'>       </span><span
! lang=FR style='mso-ansi-language:FR'>-cellservdb<span
! style='mso-spacerun:yes'>  </span>print only cellservdb info<o:p></o:p></span></p>
! 
! <h2><a name="_Toc190064081"></a><a name="_Toc139993142"></a><a
  name="_Toc126872219"></a><a name="_Toc115417090"></a><span style='mso-bookmark:
! _Toc190064081'>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
***************
*** 2547,2553 ****
  <p class=preformattedtext>&nbsp; afsd_service.exe --validate-cache
  &lt;cache-path&gt;</p>
  
! <h2><a name="_Toc184788804">4.10. Token Acquisition Debugging</a></h2>
  
  <p class=MsoNormal>If you are having trouble obtaining tokens with the Network
  Identity Manager AFS credential provider, it is recommended that you verify
--- 2631,2637 ----
  <p class=preformattedtext>&nbsp; afsd_service.exe --validate-cache
  &lt;cache-path&gt;</p>
  
! <h2><a name="_Toc190064082">4.10. Token Acquisition Debugging</a></h2>
  
  <p class=MsoNormal>If you are having trouble obtaining tokens with the Network
  Identity Manager AFS credential provider, it is recommended that you verify
***************
*** 2558,2566 ****
  aklog.exe <i style='mso-bidi-font-style:normal'>–d</i> option will be quite
  helpful in diagnosing Kerberos v5 related problems. </p>
  
! <h1><a name="_Toc184788805"></a><a name="_Toc139993143"></a><a
  name="_Toc126872220"></a><a name="_Toc115417113"></a><a name="_Toc115417091"></a><a
! name="_5._Reporting_Bugs:"></a><span style='mso-bookmark:_Toc184788805'>5.
  Reporting Bugs:</span></h1>
  
  <p class=MsoNormal>Bug reports should be sent to <a
--- 2642,2650 ----
  aklog.exe <i style='mso-bidi-font-style:normal'>–d</i> option will be quite
  helpful in diagnosing Kerberos v5 related problems. </p>
  
! <h1><a name="_Toc190064083"></a><a name="_Toc139993143"></a><a
  name="_Toc126872220"></a><a name="_Toc115417113"></a><a name="_Toc115417091"></a><a
! name="_5._Reporting_Bugs:"></a><span style='mso-bookmark:_Toc190064083'>5.
  Reporting Bugs:</span></h1>
  
  <p class=MsoNormal>Bug reports should be sent to <a
***************
*** 2643,2652 ****
  <p class=MsoNormal>When reporting a error, please be sure to include the
  version of OpenAFS.</p>
  
! <h1><a name="_Toc184788806"></a><a name="_Toc152605095"></a><a
  name="_Toc115416156"></a><a name="_Toc139993144"></a><a name="_Toc126872221"></a><a
  name="_Toc115417114"></a><a name="_Toc115417092"></a><span style='mso-bookmark:
! _Toc184788806'><span style='mso-bookmark:_Toc152605095'><span style='mso-bookmark:
  _Toc115416156'>6. How to Contribute to the Development of OpenAFS for Windows</span></span></span></h1>
  
  <p class=MsoNormal>Contributions to the development of OpenAFS for Windows are
--- 2727,2736 ----
  <p class=MsoNormal>When reporting a error, please be sure to include the
  version of OpenAFS.</p>
  
! <h1><a name="_Toc190064084"></a><a name="_Toc152605095"></a><a
  name="_Toc115416156"></a><a name="_Toc139993144"></a><a name="_Toc126872221"></a><a
  name="_Toc115417114"></a><a name="_Toc115417092"></a><span style='mso-bookmark:
! _Toc190064084'><span style='mso-bookmark:_Toc152605095'><span style='mso-bookmark:
  _Toc115416156'>6. How to Contribute to the Development of OpenAFS for Windows</span></span></span></h1>
  
  <p class=MsoNormal>Contributions to the development of OpenAFS for Windows are
***************
*** 2654,2667 ****
  donations, support contracts, donated developer time, and even donated tech
  writer time.</p>
  
! <h2><a name="_Toc184788807"></a><a name="_Toc152605096"></a><a
  name="_Toc115416157"></a><a name="_Toc139993145"></a><a name="_Toc126872222"></a><a
! name="_Toc115417093"></a><span style='mso-bookmark:_Toc184788807'><span
  style='mso-bookmark:_Toc152605096'><span style='mso-bookmark:_Toc115416157'>6.1.
  The USENIX OpenAFS Fund</span></span></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>
--- 2738,2751 ----
  donations, support contracts, donated developer time, and even donated tech
  writer time.</p>
  
! <h2><a name="_Toc190064085"></a><a name="_Toc152605096"></a><a
  name="_Toc115416157"></a><a name="_Toc139993145"></a><a name="_Toc126872222"></a><a
! name="_Toc115417093"></a><span style='mso-bookmark:_Toc190064085'><span
  style='mso-bookmark:_Toc152605096'><span style='mso-bookmark:_Toc115416157'>6.1.
  The USENIX OpenAFS Fund</span></span></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>
***************
*** 2690,2698 ****
  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="_Toc184788808"></a><a name="_Toc152605097"></a><a
  name="_Toc115417094"></a><a name="_Toc139993146"></a><a name="_Toc126872223"></a><span
! style='mso-bookmark:_Toc184788808'><span style='mso-bookmark:_Toc152605097'><span
  style='mso-bookmark:_Toc115417094'>6.2. Secure Endpoints Inc.</span></span></span>
  </h2>
  
--- 2774,2782 ----
  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="_Toc190064086"></a><a name="_Toc152605097"></a><a
  name="_Toc115417094"></a><a name="_Toc139993146"></a><a name="_Toc126872223"></a><span
! style='mso-bookmark:_Toc190064086'><span style='mso-bookmark:_Toc152605097'><span
  style='mso-bookmark:_Toc115417094'>6.2. Secure Endpoints Inc.</span></span></span>
  </h2>
  
***************
*** 2713,2722 ****
  the OpenAFS for Windows and the <a href="http://web.mit.edu/kerberos/">MIT
  Kerberos for Windows</a> products. </p>
  
! <h2><a name="_Toc184788809"></a><a name="_Toc152605098"></a><a
  name="_Toc115417096"></a><a name="_Toc139993147"></a><a name="_Toc126872224"></a><a
  name="_Toc139993148"></a><a name="_Toc126872225"></a><span style='mso-bookmark:
! _Toc184788809'><span style='mso-bookmark:_Toc152605098'><span style='mso-bookmark:
  _Toc115417096'>6.3. Direct contributions of code and/or documentation</span></span></span>
  </h2>
  
--- 2797,2806 ----
  the OpenAFS for Windows and the <a href="http://web.mit.edu/kerberos/">MIT
  Kerberos for Windows</a> products. </p>
  
! <h2><a name="_Toc190064087"></a><a name="_Toc152605098"></a><a
  name="_Toc115417096"></a><a name="_Toc139993147"></a><a name="_Toc126872224"></a><a
  name="_Toc139993148"></a><a name="_Toc126872225"></a><span style='mso-bookmark:
! _Toc190064087'><span style='mso-bookmark:_Toc152605098'><span style='mso-bookmark:
  _Toc115417096'>6.3. Direct contributions of code and/or documentation</span></span></span>
  </h2>
  
***************
*** 2725,2733 ****
  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="_Toc184788810"></a><a name="_Toc152605099"></a><a
  name="_Toc115417097"></a><a name="_Toc139993149"></a><a name="_Toc126872226"></a><span
! style='mso-bookmark:_Toc184788810'><span style='mso-bookmark:_Toc152605099'><span
  style='mso-bookmark:_Toc115417097'>6.4. OpenAFS for Windows Mailing Lists</span></span></span></h2>
  
  <p class=MsoNormal>If you wish to participate in OpenAFS for Windows
--- 2809,2817 ----
  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="_Toc190064088"></a><a name="_Toc152605099"></a><a
  name="_Toc115417097"></a><a name="_Toc139993149"></a><a name="_Toc126872226"></a><span
! style='mso-bookmark:_Toc190064088'><span style='mso-bookmark:_Toc152605099'><span
  style='mso-bookmark:_Toc115417097'>6.4. OpenAFS for Windows Mailing Lists</span></span></span></h2>
  
  <p class=MsoNormal>If you wish to participate in OpenAFS for Windows
***************
*** 2746,2755 ****
  <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="_Toc184788811"></a><a name="_Toc152605100"></a><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><span style='mso-bookmark:_Toc184788811'><span
  style='mso-bookmark:_Toc152605100'>7. MSI Deployment Guide</span></span></h1>
  
  <b><span style='font-size:16.0pt;font-family:Albany;mso-fareast-font-family:
--- 2830,2839 ----
  <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="_Toc190064089"></a><a name="_Toc152605100"></a><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><span style='mso-bookmark:_Toc190064089'><span
  style='mso-bookmark:_Toc152605100'>7. MSI Deployment Guide</span></span></h1>
  
  <b><span style='font-size:16.0pt;font-family:Albany;mso-fareast-font-family:
***************
*** 2758,2766 ****
  style='page-break-before:always'>
  </span></b>
  
! <h2><a name="_Toc184788812"></a><a name="_Toc152605101"></a><a
  name="_Toc115416159"></a><a name="_Toc139993151"></a><a name="_Toc126872228"></a><a
! name="_Toc115417099"></a><span style='mso-bookmark:_Toc184788812'><span
  style='mso-bookmark:_Toc152605101'><span style='mso-bookmark:_Toc115416159'>7.1.
  Introduction</span></span></span></h2>
  
--- 2842,2850 ----
  style='page-break-before:always'>
  </span></b>
  
! <h2><a name="_Toc190064090"></a><a name="_Toc152605101"></a><a
  name="_Toc115416159"></a><a name="_Toc139993151"></a><a name="_Toc126872228"></a><a
! name="_Toc115417099"></a><span style='mso-bookmark:_Toc190064090'><span
  style='mso-bookmark:_Toc152605101'><span style='mso-bookmark:_Toc115416159'>7.1.
  Introduction</span></span></span></h2>
  
***************
*** 2776,2784 ****
  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="_Toc184788813"></a><a name="_Toc152605102"></a><a
  name="_Toc115416160"></a><a name="_Toc139993152"></a><a name="_Toc126872229"></a><span
! style='mso-bookmark:_Toc184788813'><span style='mso-bookmark:_Toc152605102'><span
  style='mso-bookmark:_Toc115416160'>7.1.1 Requirements</span></span></span></h3>
  
  <p class=MsoNormal>The information in this document applies to MSI packages
--- 2860,2868 ----
  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="_Toc190064091"></a><a name="_Toc152605102"></a><a
  name="_Toc115416160"></a><a name="_Toc139993152"></a><a name="_Toc126872229"></a><span
! style='mso-bookmark:_Toc190064091'><span style='mso-bookmark:_Toc152605102'><span
  style='mso-bookmark:_Toc115416160'>7.1.1 Requirements</span></span></span></h3>
  
  <p class=MsoNormal>The information in this document applies to MSI packages
***************
*** 2787,2796 ****
  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>
--- 2871,2880 ----
  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>
***************
*** 2816,2824 ****
  <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="_Toc184788814"></a><a name="_Toc152605103"></a><a
  name="_Toc115416161"></a><a name="_Toc139993153"></a><a name="_Toc126872230"></a><span
! style='mso-bookmark:_Toc184788814'><span style='mso-bookmark:_Toc152605103'><span
  style='mso-bookmark:_Toc115416161'>7.1.2 Authoring a Transform</span></span></span></h3>
  
  <p class=MsoNormal>Transforms describe a set of modifications to be performed
--- 2900,2908 ----
  <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="_Toc190064092"></a><a name="_Toc152605103"></a><a
  name="_Toc115416161"></a><a name="_Toc139993153"></a><a name="_Toc126872230"></a><span
! style='mso-bookmark:_Toc190064092'><span style='mso-bookmark:_Toc152605103'><span
  style='mso-bookmark:_Toc115416161'>7.1.2 Authoring a Transform</span></span></span></h3>
  
  <p class=MsoNormal>Transforms describe a set of modifications to be performed
***************
*** 2865,2873 ****
  the MSI databases directly when editing openafs-modified.msi.&nbsp; More
  details are given below.</p>
  
! <h2><a name="_Toc184788815"></a><a name="_Toc152605104"></a><a
  name="_Toc115416162"></a><a name="_Toc139993154"></a><a name="_Toc126872231"></a><a
! name="_Toc115417100"></a><span style='mso-bookmark:_Toc184788815'><span
  style='mso-bookmark:_Toc152605104'><span style='mso-bookmark:_Toc115416162'>7.2.
  Configuration Options</span></span></span></h2>
  
--- 2949,2957 ----
  the MSI databases directly when editing openafs-modified.msi.&nbsp; More
  details are given below.</p>
  
! <h2><a name="_Toc190064093"></a><a name="_Toc152605104"></a><a
  name="_Toc115416162"></a><a name="_Toc139993154"></a><a name="_Toc126872231"></a><a
! name="_Toc115417100"></a><span style='mso-bookmark:_Toc190064093'><span
  style='mso-bookmark:_Toc152605104'><span style='mso-bookmark:_Toc115416162'>7.2.
  Configuration Options</span></span></span></h2>
  
***************
*** 2876,2887 ****
  class=GramE>A</span></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="_Toc184788816"></a><a name="_Toc152605105"></a><a
  name="_Toc115416163"></a><a name="_Toc139993155"></a><a name="_Toc126872232"></a><span
! style='mso-bookmark:_Toc184788816'><span style='mso-bookmark:_Toc152605105'><span
  style='mso-bookmark:_Toc115416163'>7.2.1 Configurable Properties</span></span></span></h3>
  
  <p class=MsoNormal>Most configurable properties correspond to registry keys or
--- 2960,2971 ----
  class=GramE>A</span></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="_Toc190064094"></a><a name="_Toc152605105"></a><a
  name="_Toc115416163"></a><a name="_Toc139993155"></a><a name="_Toc126872232"></a><span
! style='mso-bookmark:_Toc190064094'><span style='mso-bookmark:_Toc152605105'><span
  style='mso-bookmark:_Toc115416163'>7.2.1 Configurable Properties</span></span></span></h3>
  
  <p class=MsoNormal>Most configurable properties correspond to registry keys or
***************
*** 2894,2901 ****
  
  <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
--- 2978,2985 ----
  
  <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
***************
*** 2907,2915 ****
  
  <p class=MsoNormal>Numeric values should be authored as decimal strings.</p>
  
! <h4><a name="_Toc184788817"></a><a name="_Toc152605106"></a><a
  name="_Toc115416164"></a><a name="_Toc139993156"></a><a name="_Toc126872233"></a><span
! style='mso-bookmark:_Toc184788817'><span style='mso-bookmark:_Toc152605106'><span
  style='mso-bookmark:_Toc115416164'>7.2.1.1 Setting Properties</span></span></span></h4>
  
  <p class=MsoNormal>In order to set a property,</p>
--- 2991,2999 ----
  
  <p class=MsoNormal>Numeric values should be authored as decimal strings.</p>
  
! <h4><a name="_Toc190064095"></a><a name="_Toc152605106"></a><a
  name="_Toc115416164"></a><a name="_Toc139993156"></a><a name="_Toc126872233"></a><span
! style='mso-bookmark:_Toc190064095'><span style='mso-bookmark:_Toc152605106'><span
  style='mso-bookmark:_Toc115416164'>7.2.1.1 Setting Properties</span></span></span></h4>
  
  <p class=MsoNormal>In order to set a property,</p>
***************
*** 2936,2992 ****
  </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="_Toc184788818"></a><a name="_Toc152605107"></a><a
  name="_Toc115416165"></a><a name="_Toc139993157"></a><a name="_Toc126872234"></a><span
! style='mso-bookmark:_Toc184788818'><span style='mso-bookmark:_Toc152605107'><span
  style='mso-bookmark:_Toc115416165'>7.2.1.2 OpenAFS for Windows Properties</span></span></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="_Toc184788819"></a><a name="_Toc152605108"></a><a
    name="_Toc139993158"></a><a name="_Toc126872235"></a><a name="_Toc115416166"></a><a
!   name="_(Service_parameters):"></a><span style='mso-bookmark:_Toc184788819'><span
    style='mso-bookmark:_Toc152605108'>(Service parameters):</span></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="_Toc184788820"></a><a name="_Toc152605109"></a><a
    name="_Toc139993159"></a><a name="_Toc126872236"></a><a name="_Toc115416167"></a><a
!   name="_(Network_provider):"></a><span style='mso-bookmark:_Toc184788820'><span
    style='mso-bookmark:_Toc152605109'>(Network provider):</span></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="_Toc184788821"></a><a name="_Toc152605110"></a><a
    name="_Toc139993160"></a><a name="_Toc126872237"></a><a name="_Toc115416168"></a><a
!   name="_(OpenAFS_Client):"></a><span style='mso-bookmark:_Toc184788821'><span
    style='mso-bookmark:_Toc152605110'>(OpenAFS Client):</span></span></h5>
    <p class=listcontents style='margin-left:0pt'>[HKLM\SOFTWARE\OpenAFS\Client]</p>
    </td>
   </tr>
  </table>
  
! <h5><a name="_Toc184788822"></a><a name="_Toc152605111"></a><a
  name="_Toc115416169"></a><a name="_Toc139993161"></a><a name="_Toc126872238"></a><span
! style='mso-bookmark:_Toc184788822'><span style='mso-bookmark:_Toc152605111'><span
  style='mso-bookmark:_Toc115416169'>7.2.1.2.1 Registry Properties</span></span></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="_Toc184788823"></a><a name="_Toc152605112"></a><a
    name="_Toc115416170"></a><a name="_Toc139993162"></a><a name="_Toc126872239"></a><span
!   style='mso-bookmark:_Toc184788823'><span style='mso-bookmark:_Toc152605112'><span
    style='mso-bookmark:_Toc115416170'>AFSCACHEPATH</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
--- 3020,3076 ----
  </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="_Toc190064096"></a><a name="_Toc152605107"></a><a
  name="_Toc115416165"></a><a name="_Toc139993157"></a><a name="_Toc126872234"></a><span
! style='mso-bookmark:_Toc190064096'><span style='mso-bookmark:_Toc152605107'><span
  style='mso-bookmark:_Toc115416165'>7.2.1.2 OpenAFS for Windows Properties</span></span></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="_Toc190064097"></a><a name="_Toc152605108"></a><a
    name="_Toc139993158"></a><a name="_Toc126872235"></a><a name="_Toc115416166"></a><a
!   name="_(Service_parameters):"></a><span style='mso-bookmark:_Toc190064097'><span
    style='mso-bookmark:_Toc152605108'>(Service parameters):</span></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="_Toc190064098"></a><a name="_Toc152605109"></a><a
    name="_Toc139993159"></a><a name="_Toc126872236"></a><a name="_Toc115416167"></a><a
!   name="_(Network_provider):"></a><span style='mso-bookmark:_Toc190064098'><span
    style='mso-bookmark:_Toc152605109'>(Network provider):</span></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="_Toc190064099"></a><a name="_Toc152605110"></a><a
    name="_Toc139993160"></a><a name="_Toc126872237"></a><a name="_Toc115416168"></a><a
!   name="_(OpenAFS_Client):"></a><span style='mso-bookmark:_Toc190064099'><span
    style='mso-bookmark:_Toc152605110'>(OpenAFS Client):</span></span></h5>
    <p class=listcontents style='margin-left:0pt'>[HKLM\SOFTWARE\OpenAFS\Client]</p>
    </td>
   </tr>
  </table>
  
! <h5><a name="_Toc190064100"></a><a name="_Toc152605111"></a><a
  name="_Toc115416169"></a><a name="_Toc139993161"></a><a name="_Toc126872238"></a><span
! style='mso-bookmark:_Toc190064100'><span style='mso-bookmark:_Toc152605111'><span
  style='mso-bookmark:_Toc115416169'>7.2.1.2.1 Registry Properties</span></span></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="_Toc190064101"></a><a name="_Toc152605112"></a><a
    name="_Toc115416170"></a><a name="_Toc139993162"></a><a name="_Toc126872239"></a><span
!   style='mso-bookmark:_Toc190064101'><span style='mso-bookmark:_Toc152605112'><span
    style='mso-bookmark:_Toc115416170'>AFSCACHEPATH</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
***************
*** 2996,3004 ****
   </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="_Toc184788824"></a><a name="_Toc152605113"></a><a
    name="_Toc115416171"></a><a name="_Toc139993163"></a><a name="_Toc126872240"></a><span
!   style='mso-bookmark:_Toc184788824'><span style='mso-bookmark:_Toc152605113'><span
    style='mso-bookmark:_Toc115416171'>AFSCACHESIZE</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
--- 3080,3088 ----
   </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="_Toc190064102"></a><a name="_Toc152605113"></a><a
    name="_Toc115416171"></a><a name="_Toc139993163"></a><a name="_Toc126872240"></a><span
!   style='mso-bookmark:_Toc190064102'><span style='mso-bookmark:_Toc152605113'><span
    style='mso-bookmark:_Toc115416171'>AFSCACHESIZE</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
***************
*** 3008,3016 ****
   </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="_Toc184788825"></a><a name="_Toc152605114"></a><a
    name="_Toc115416172"></a><a name="_Toc139993164"></a><a name="_Toc126872241"></a><span
!   style='mso-bookmark:_Toc184788825'><span style='mso-bookmark:_Toc152605114'><span
    style='mso-bookmark:_Toc115416172'>AFSCELLNAME</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
--- 3092,3100 ----
   </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="_Toc190064103"></a><a name="_Toc152605114"></a><a
    name="_Toc115416172"></a><a name="_Toc139993164"></a><a name="_Toc126872241"></a><span
!   style='mso-bookmark:_Toc190064103'><span style='mso-bookmark:_Toc152605114'><span
    style='mso-bookmark:_Toc115416172'>AFSCELLNAME</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
***************
*** 3020,3028 ****
   </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="_Toc184788826"></a><a name="_Toc152605115"></a><a
    name="_Toc115416173"></a><a name="_Toc139993165"></a><a name="_Toc126872242"></a><span
!   style='mso-bookmark:_Toc184788826'><span style='mso-bookmark:_Toc152605115'><span
    style='mso-bookmark:_Toc115416173'>FREELANCEMODE</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
--- 3104,3112 ----
   </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="_Toc190064104"></a><a name="_Toc152605115"></a><a
    name="_Toc115416173"></a><a name="_Toc139993165"></a><a name="_Toc126872242"></a><span
!   style='mso-bookmark:_Toc190064104'><span style='mso-bookmark:_Toc152605115'><span
    style='mso-bookmark:_Toc115416173'>FREELANCEMODE</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
***************
*** 3032,3040 ****
   </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="_Toc184788827"></a><a name="_Toc152605116"></a><a
    name="_Toc115416174"></a><a name="_Toc139993166"></a><a name="_Toc126872243"></a><span
!   style='mso-bookmark:_Toc184788827'><span style='mso-bookmark:_Toc152605116'><span
    style='mso-bookmark:_Toc115416174'>HIDEDOTFILES</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
--- 3116,3124 ----
   </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="_Toc190064105"></a><a name="_Toc152605116"></a><a
    name="_Toc115416174"></a><a name="_Toc139993166"></a><a name="_Toc126872243"></a><span
!   style='mso-bookmark:_Toc190064105'><span style='mso-bookmark:_Toc152605116'><span
    style='mso-bookmark:_Toc115416174'>HIDEDOTFILES</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
***************
*** 3044,3052 ****
   </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="_Toc184788828"></a><a name="_Toc152605117"></a><a
    name="_Toc115416175"></a><a name="_Toc139993167"></a><a name="_Toc126872244"></a><span
!   style='mso-bookmark:_Toc184788828'><span style='mso-bookmark:_Toc152605117'><span
    style='mso-bookmark:_Toc115416175'>LOGONOPTIONS</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Network_provider):">(Network provider)</a></p>
--- 3128,3136 ----
   </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="_Toc190064106"></a><a name="_Toc152605117"></a><a
    name="_Toc115416175"></a><a name="_Toc139993167"></a><a name="_Toc126872244"></a><span
!   style='mso-bookmark:_Toc190064106'><span style='mso-bookmark:_Toc152605117'><span
    style='mso-bookmark:_Toc115416175'>LOGONOPTIONS</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Network_provider):">(Network provider)</a></p>
***************
*** 3059,3067 ****
   </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="_Toc184788829"></a><a name="_Toc152605118"></a><a
    name="_Toc115416176"></a><a name="_Toc139993168"></a><a name="_Toc126872245"></a><span
!   style='mso-bookmark:_Toc184788829'><span style='mso-bookmark:_Toc152605118'><span
    style='mso-bookmark:_Toc115416176'>MOUNTROOT</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
--- 3143,3151 ----
   </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="_Toc190064107"></a><a name="_Toc152605118"></a><a
    name="_Toc115416176"></a><a name="_Toc139993168"></a><a name="_Toc126872245"></a><span
!   style='mso-bookmark:_Toc190064107'><span style='mso-bookmark:_Toc152605118'><span
    style='mso-bookmark:_Toc115416176'>MOUNTROOT</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
***************
*** 3071,3079 ****
   </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="_Toc184788830"></a><a name="_Toc152605119"></a><a
    name="_Toc115416177"></a><a name="_Toc139993169"></a><a name="_Toc126872246"></a><span
!   style='mso-bookmark:_Toc184788830'><span style='mso-bookmark:_Toc152605119'><span
    style='mso-bookmark:_Toc115416177'>NETBIOSNAME</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
--- 3155,3163 ----
   </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="_Toc190064108"></a><a name="_Toc152605119"></a><a
    name="_Toc115416177"></a><a name="_Toc139993169"></a><a name="_Toc126872246"></a><span
!   style='mso-bookmark:_Toc190064108'><span style='mso-bookmark:_Toc152605119'><span
    style='mso-bookmark:_Toc115416177'>NETBIOSNAME</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
***************
*** 3084,3092 ****
   </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="_Toc184788831"></a><a name="_Toc152605120"></a><a
    name="_Toc115416178"></a><a name="_Toc139993170"></a><a name="_Toc126872247"></a><span
!   style='mso-bookmark:_Toc184788831'><span style='mso-bookmark:_Toc152605120'><span
    style='mso-bookmark:_Toc115416178'>NOFINDLANABYNAME</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
--- 3168,3176 ----
   </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="_Toc190064109"></a><a name="_Toc152605120"></a><a
    name="_Toc115416178"></a><a name="_Toc139993170"></a><a name="_Toc126872247"></a><span
!   style='mso-bookmark:_Toc190064109'><span style='mso-bookmark:_Toc152605120'><span
    style='mso-bookmark:_Toc115416178'>NOFINDLANABYNAME</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
***************
*** 3096,3104 ****
   </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="_Toc184788832"></a><a name="_Toc152605121"></a><a
    name="_Toc115416179"></a><a name="_Toc139993171"></a><a name="_Toc126872248"></a><span
!   style='mso-bookmark:_Toc184788832'><span style='mso-bookmark:_Toc152605121'><span
    style='mso-bookmark:_Toc115416179'>RXMAXMTU</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
--- 3180,3188 ----
   </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="_Toc190064110"></a><a name="_Toc152605121"></a><a
    name="_Toc115416179"></a><a name="_Toc139993171"></a><a name="_Toc126872248"></a><span
!   style='mso-bookmark:_Toc190064110'><span style='mso-bookmark:_Toc152605121'><span
    style='mso-bookmark:_Toc115416179'>RXMAXMTU</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
***************
*** 3108,3116 ****
   </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="_Toc184788833"></a><a name="_Toc152605122"></a><a
    name="_Toc115416180"></a><a name="_Toc139993172"></a><a name="_Toc126872249"></a><span
!   style='mso-bookmark:_Toc184788833'><span style='mso-bookmark:_Toc152605122'><span
    style='mso-bookmark:_Toc115416180'>SECURITYLEVEL</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
--- 3192,3200 ----
   </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="_Toc190064111"></a><a name="_Toc152605122"></a><a
    name="_Toc115416180"></a><a name="_Toc139993172"></a><a name="_Toc126872249"></a><span
!   style='mso-bookmark:_Toc190064111'><span style='mso-bookmark:_Toc152605122'><span
    style='mso-bookmark:_Toc115416180'>SECURITYLEVEL</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
***************
*** 3120,3128 ****
   </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="_Toc184788834"></a><a name="_Toc152605123"></a><a
    name="_Toc115416181"></a><a name="_Toc139993173"></a><a name="_Toc126872250"></a><span
!   style='mso-bookmark:_Toc184788834'><span style='mso-bookmark:_Toc152605123'><span
    style='mso-bookmark:_Toc115416181'>SMBAUTHTYPE</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
--- 3204,3212 ----
   </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="_Toc190064112"></a><a name="_Toc152605123"></a><a
    name="_Toc115416181"></a><a name="_Toc139993173"></a><a name="_Toc126872250"></a><span
!   style='mso-bookmark:_Toc190064112'><span style='mso-bookmark:_Toc152605123'><span
    style='mso-bookmark:_Toc115416181'>SMBAUTHTYPE</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
***************
*** 3132,3140 ****
   </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="_Toc184788835"></a><a name="_Toc152605124"></a><a
    name="_Toc115416182"></a><a name="_Toc139993174"></a><a name="_Toc126872251"></a><span
!   style='mso-bookmark:_Toc184788835'><span style='mso-bookmark:_Toc152605124'><span
    style='mso-bookmark:_Toc115416182'>STOREANSIFILENAMES</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(OpenAFS_Client):">(OpenAFS Client)</a></p>
--- 3216,3224 ----
   </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="_Toc190064113"></a><a name="_Toc152605124"></a><a
    name="_Toc115416182"></a><a name="_Toc139993174"></a><a name="_Toc126872251"></a><span
!   style='mso-bookmark:_Toc190064113'><span style='mso-bookmark:_Toc152605124'><span
    style='mso-bookmark:_Toc115416182'>STOREANSIFILENAMES</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(OpenAFS_Client):">(OpenAFS Client)</a></p>
***************
*** 3144,3152 ****
   </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="_Toc184788836"></a><a name="_Toc152605125"></a><a
    name="_Toc115416183"></a><a name="_Toc139993175"></a><a name="_Toc126872252"></a><span
!   style='mso-bookmark:_Toc184788836'><span style='mso-bookmark:_Toc152605125'><span
    style='mso-bookmark:_Toc115416183'>USEDNS</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
--- 3228,3236 ----
   </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="_Toc190064114"></a><a name="_Toc152605125"></a><a
    name="_Toc115416183"></a><a name="_Toc139993175"></a><a name="_Toc126872252"></a><span
!   style='mso-bookmark:_Toc190064114'><span style='mso-bookmark:_Toc152605125'><span
    style='mso-bookmark:_Toc115416183'>USEDNS</span></span></span></h6>
    <p class=MsoList>Registry key&nbsp;&nbsp;&nbsp; : <a
    href="#_(Service_parameters):">(Service parameters)</a></p>
***************
*** 3156,3181 ****
   </tr>
  </table>
  
! <h5><a name="_Toc184788837"></a><a name="_Toc152605126"></a><a
  name="_Toc139993176"></a><a name="_Toc126872253"></a><a name="_Toc115416184"></a><a
! name="_7.2.1.2.2_AFSCreds.exe_Properties"></a><span style='mso-bookmark:_Toc184788837'><span
  style='mso-bookmark:_Toc152605126'>7.2.1.2.2 AFSCreds.exe Properties</span></span></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="_Toc184788838"></a><a name="_Toc152605127"></a><a
    name="_Toc115416185"></a><a name="_Toc139993177"></a><a name="_Toc126872254"></a><span
!   style='mso-bookmark:_Toc184788838'><span style='mso-bookmark:_Toc152605127'><span
    style='mso-bookmark:_Toc115416185'>CREDSSTARTUP</span></span></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
--- 3240,3265 ----
   </tr>
  </table>
  
! <h5><a name="_Toc190064115"></a><a name="_Toc152605126"></a><a
  name="_Toc139993176"></a><a name="_Toc126872253"></a><a name="_Toc115416184"></a><a
! name="_7.2.1.2.2_AFSCreds.exe_Properties"></a><span style='mso-bookmark:_Toc190064115'><span
  style='mso-bookmark:_Toc152605126'>7.2.1.2.2 AFSCreds.exe Properties</span></span></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="_Toc190064116"></a><a name="_Toc152605127"></a><a
    name="_Toc115416185"></a><a name="_Toc139993177"></a><a name="_Toc126872254"></a><span
!   style='mso-bookmark:_Toc190064116'><span style='mso-bookmark:_Toc152605127'><span
    style='mso-bookmark:_Toc115416185'>CREDSSTARTUP</span></span></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
***************
*** 3186,3194 ****
   </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="_Toc184788839"></a><a name="_Toc152605128"></a><a
    name="_Toc115416186"></a><a name="_Toc139993178"></a><a name="_Toc126872255"></a><span
!   style='mso-bookmark:_Toc184788839'><span style='mso-bookmark:_Toc152605128'><span
    style='mso-bookmark:_Toc115416186'>CREDSAUTOINIT</span></span></span></h6>
    <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '-a' or ''</p>
    <p class=MsoList>Enables automatic initialization.</p>
--- 3270,3278 ----
   </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="_Toc190064117"></a><a name="_Toc152605128"></a><a
    name="_Toc115416186"></a><a name="_Toc139993178"></a><a name="_Toc126872255"></a><span
!   style='mso-bookmark:_Toc190064117'><span style='mso-bookmark:_Toc152605128'><span
    style='mso-bookmark:_Toc115416186'>CREDSAUTOINIT</span></span></span></h6>
    <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '-a' or ''</p>
    <p class=MsoList>Enables automatic initialization.</p>
***************
*** 3196,3204 ****
   </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="_Toc184788840"></a><a name="_Toc152605129"></a><a
    name="_Toc115416187"></a><a name="_Toc139993179"></a><a name="_Toc126872256"></a><span
!   style='mso-bookmark:_Toc184788840'><span style='mso-bookmark:_Toc152605129'><span
    style='mso-bookmark:_Toc115416187'>CREDSIPCHDET</span></span></span></h6>
    <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '-n' or ''</p>
    <p class=MsoList>Enables IP address change detection.</p>
--- 3280,3288 ----
   </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="_Toc190064118"></a><a name="_Toc152605129"></a><a
    name="_Toc115416187"></a><a name="_Toc139993179"></a><a name="_Toc126872256"></a><span
!   style='mso-bookmark:_Toc190064118'><span style='mso-bookmark:_Toc152605129'><span
    style='mso-bookmark:_Toc115416187'>CREDSIPCHDET</span></span></span></h6>
    <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '-n' or ''</p>
    <p class=MsoList>Enables IP address change detection.</p>
***************
*** 3206,3214 ****
   </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="_Toc184788841"></a><a name="_Toc152605130"></a><a
    name="_Toc115416188"></a><a name="_Toc139993180"></a><a name="_Toc126872257"></a><span
!   style='mso-bookmark:_Toc184788841'><span style='mso-bookmark:_Toc152605130'><span
    style='mso-bookmark:_Toc115416188'>CREDSQUIET</span></span></span></h6>
    <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '-q' or ''</p>
    <p class=MsoList>Enables quiet mode.</p>
--- 3290,3298 ----
   </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="_Toc190064119"></a><a name="_Toc152605130"></a><a
    name="_Toc115416188"></a><a name="_Toc139993180"></a><a name="_Toc126872257"></a><span
!   style='mso-bookmark:_Toc190064119'><span style='mso-bookmark:_Toc152605130'><span
    style='mso-bookmark:_Toc115416188'>CREDSQUIET</span></span></span></h6>
    <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '-q' or ''</p>
    <p class=MsoList>Enables quiet mode.</p>
***************
*** 3216,3224 ****
   </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="_Toc184788842"></a><a name="_Toc152605131"></a><a
    name="_Toc115416189"></a><a name="_Toc139993181"></a><a name="_Toc126872258"></a><span
!   style='mso-bookmark:_Toc184788842'><span style='mso-bookmark:_Toc152605131'><span
    style='mso-bookmark:_Toc115416189'>CREDSRENEWDRMAP</span></span></span></h6>
    <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '-m' or '’</p>
    <p class=MsoList>Enables renewing drive map at startup.</p>
--- 3300,3308 ----
   </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="_Toc190064120"></a><a name="_Toc152605131"></a><a
    name="_Toc115416189"></a><a name="_Toc139993181"></a><a name="_Toc126872258"></a><span
!   style='mso-bookmark:_Toc190064120'><span style='mso-bookmark:_Toc152605131'><span
    style='mso-bookmark:_Toc115416189'>CREDSRENEWDRMAP</span></span></span></h6>
    <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '-m' or '’</p>
    <p class=MsoList>Enables renewing drive map at startup.</p>
***************
*** 3226,3234 ****
   </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="_Toc184788843"></a><a name="_Toc152605132"></a><a
    name="_Toc115416190"></a><a name="_Toc139993182"></a><a name="_Toc126872259"></a><span
!   style='mso-bookmark:_Toc184788843'><span style='mso-bookmark:_Toc152605132'><span
    style='mso-bookmark:_Toc115416190'>CREDSSHOW</span></span></span></h6>
    <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '-s' or ''</p>
    <p class=MsoList>Enables displaying the credential manager window when
--- 3310,3318 ----
   </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="_Toc190064121"></a><a name="_Toc152605132"></a><a
    name="_Toc115416190"></a><a name="_Toc139993182"></a><a name="_Toc126872259"></a><span
!   style='mso-bookmark:_Toc190064121'><span style='mso-bookmark:_Toc152605132'><span
    style='mso-bookmark:_Toc115416190'>CREDSSHOW</span></span></span></h6>
    <p class=MsoList>Valid values&nbsp;&nbsp;&nbsp; : '-s' or ''</p>
    <p class=MsoList>Enables displaying the credential manager window when
***************
*** 3237,3256 ****
   </tr>
  </table>
  
! <h3><a name="_Toc184788844"></a><a name="_Toc152605133"></a><a
  name="_Toc115416191"></a><a name="_Toc139993183"></a><a name="_Toc126872260"></a><span
! style='mso-bookmark:_Toc184788844'><span style='mso-bookmark:_Toc152605133'><span
  style='mso-bookmark:_Toc115416191'>7.2.2 Existing Registry Entries</span></span></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="_Toc184788845"></a><a name="_Toc152605134"></a><a
  name="_Toc115416192"></a><a name="_Toc139993184"></a><a name="_Toc126872261"></a><span
! style='mso-bookmark:_Toc184788845'><span style='mso-bookmark:_Toc152605134'><span
  style='mso-bookmark:_Toc115416192'>7.2.3 Replacing Configuration Files</span></span></span></h3>
  
  <p class=MsoNormal>The OpenAFS configuration files (CellServDB) can be replaced
--- 3321,3340 ----
   </tr>
  </table>
  
! <h3><a name="_Toc190064122"></a><a name="_Toc152605133"></a><a
  name="_Toc115416191"></a><a name="_Toc139993183"></a><a name="_Toc126872260"></a><span
! style='mso-bookmark:_Toc190064122'><span style='mso-bookmark:_Toc152605133'><span
  style='mso-bookmark:_Toc115416191'>7.2.2 Existing Registry Entries</span></span></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="_Toc190064123"></a><a name="_Toc152605134"></a><a
  name="_Toc115416192"></a><a name="_Toc139993184"></a><a name="_Toc126872261"></a><span
! style='mso-bookmark:_Toc190064123'><span style='mso-bookmark:_Toc152605134'><span
  style='mso-bookmark:_Toc115416192'>7.2.3 Replacing Configuration Files</span></span></span></h3>
  
  <p class=MsoNormal>The OpenAFS configuration files (CellServDB) can be replaced
***************
*** 3293,3301 ****
  
  <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>
--- 3377,3385 ----
  
  <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>
***************
*** 3502,3515 ****
   </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
--- 3586,3599 ----
   </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
***************
*** 3687,3706 ****
  <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="_Toc184788846"></a><a name="_Toc152605135"></a><a
  name="_Toc139993185"></a><a name="_Toc126872262"></a><a name="_Toc115416193"></a><a
! name="_2.3.1_Components_for_Configuration_"></a><span style='mso-bookmark:_Toc184788846'><span
  style='mso-bookmark:_Toc152605135'>7.2.3.1 Components for Configuration Files</span></span></h4>
  
  <p class=preformattedtext style='text-indent:35.45pt'>CellServDB:
  'cpf_CellServDB' (ID {D5BA4C15-DBEC-4292-91FC-B54C30F24F2A})</p>
  
! <h3><a name="_Toc184788847"></a><a name="_Toc152605136"></a><a
  name="_Toc115416194"></a><a name="_Toc139993186"></a><a name="_Toc126872263"></a><span
! style='mso-bookmark:_Toc184788847'><span style='mso-bookmark:_Toc152605136'><span
  style='mso-bookmark:_Toc115416194'>7.2.4 Adding Domain Specific Registry Keys</span></span></span></h3>
  
  <p class=MsoNormal>Following is an example for adding domain specific registry
--- 3771,3790 ----
  <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="_Toc190064124"></a><a name="_Toc152605135"></a><a
  name="_Toc139993185"></a><a name="_Toc126872262"></a><a name="_Toc115416193"></a><a
! name="_2.3.1_Components_for_Configuration_"></a><span style='mso-bookmark:_Toc190064124'><span
  style='mso-bookmark:_Toc152605135'>7.2.3.1 Components for Configuration Files</span></span></h4>
  
  <p class=preformattedtext style='text-indent:35.45pt'>CellServDB:
  'cpf_CellServDB' (ID {D5BA4C15-DBEC-4292-91FC-B54C30F24F2A})</p>
  
! <h3><a name="_Toc190064125"></a><a name="_Toc152605136"></a><a
  name="_Toc115416194"></a><a name="_Toc139993186"></a><a name="_Toc126872263"></a><span
! style='mso-bookmark:_Toc190064125'><span style='mso-bookmark:_Toc152605136'><span
  style='mso-bookmark:_Toc115416194'>7.2.4 Adding Domain Specific Registry Keys</span></span></span></h3>
  
  <p class=MsoNormal>Following is an example for adding domain specific registry
***************
*** 3713,3720 ****
  <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'>
--- 3797,3804 ----
  <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'>
***************
*** 3737,3744 ****
    &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'>
--- 3821,3828 ----
    &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'>
***************
*** 3788,3794 ****
    <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>
--- 3872,3879 ----
    <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>
***************
*** 3854,3861 ****
    : 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>
--- 3939,3945 ----
    : 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>
***************
*** 3870,3878 ****
    <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>
--- 3954,3961 ----
    <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>
***************
*** 3901,3908 ****
    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;
--- 3984,3990 ----
    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;
***************
*** 3923,3930 ****
    : 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>
--- 4005,4011 ----
    : 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>
***************
*** 3943,3951 ****
  (enable integrated logon) and 'LOCALHOST' (disable integrated logon and fail
  logins silently).</p>
  
! <h3><a name="_Toc184788848"></a><a name="_Toc152605137"></a><a
  name="_Toc115416195"></a><a name="_Toc139993187"></a><a name="_Toc126872264"></a><span
! style='mso-bookmark:_Toc184788848'><span style='mso-bookmark:_Toc152605137'><span
  style='mso-bookmark:_Toc115416195'>7.2.5 Adding Site Specific Freelance
  Registry Keys</span></span></span></h3>
  
--- 4024,4032 ----
  (enable integrated logon) and 'LOCALHOST' (disable integrated logon and fail
  logins silently).</p>
  
! <h3><a name="_Toc190064126"></a><a name="_Toc152605137"></a><a
  name="_Toc115416195"></a><a name="_Toc139993187"></a><a name="_Toc126872264"></a><span
! style='mso-bookmark:_Toc190064126'><span style='mso-bookmark:_Toc152605137'><span
  style='mso-bookmark:_Toc115416195'>7.2.5 Adding Site Specific Freelance
  Registry Keys</span></span></span></h3>
  
***************
*** 4159,4168 ****
  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="_Toc184788849"></a><a name="_Toc152605138"></a><a
  name="_Ref115275867"></a><a name="_Toc139993188"></a><a name="_Toc126872265"></a><a
  name="_Toc115417101"></a><a name="_Toc115416196"></a><span style='mso-bookmark:
! _Toc184788849'><span style='mso-bookmark:_Toc152605138'><span style='mso-bookmark:
  _Ref115275867'>7.3 Additional Resources</span></span></span></h2>
  
  <p class=MsoNormal>If you want to add registry keys or files you need to create
--- 4240,4249 ----
  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="_Toc190064127"></a><a name="_Toc152605138"></a><a
  name="_Ref115275867"></a><a name="_Toc139993188"></a><a name="_Toc126872265"></a><a
  name="_Toc115417101"></a><a name="_Toc115416196"></a><span style='mso-bookmark:
! _Toc190064127'><span style='mso-bookmark:_Toc152605138'><span style='mso-bookmark:
  _Ref115275867'>7.3 Additional Resources</span></span></span></h2>
  
  <p class=MsoNormal>If you want to add registry keys or files you need to create
***************
*** 4205,4213 ****
  <p class=MsoNormal>See the Platform SDK documentation for information on
  command line options for MSITRAN.EXE.</p>
  
! <h2><a name="_Toc184788850"></a><a name="_Toc152605139"></a><a
  name="_Toc115416197"></a><a name="_Toc139993189"></a><a name="_Toc126872266"></a><a
! name="_Toc115417102"></a><span style='mso-bookmark:_Toc184788850'><span
  style='mso-bookmark:_Toc152605139'><span style='mso-bookmark:_Toc115416197'>7.4.
  Upgrades</span></span></span></h2>
  
--- 4286,4294 ----
  <p class=MsoNormal>See the Platform SDK documentation for information on
  command line options for MSITRAN.EXE.</p>
  
! <h2><a name="_Toc190064128"></a><a name="_Toc152605139"></a><a
  name="_Toc115416197"></a><a name="_Toc139993189"></a><a name="_Toc126872266"></a><a
! name="_Toc115417102"></a><span style='mso-bookmark:_Toc190064128'><span
  style='mso-bookmark:_Toc152605139'><span style='mso-bookmark:_Toc115416197'>7.4.
  Upgrades</span></span></span></h2>
  
***************
*** 4250,4273 ****
  <p class=MsoNormal>When performing an upgrade with msiexec.exe execute the MSI
  with the repair options &quot;vomus&quot;.</p>
  
! <h1><a name="_Toc184788851"></a><a name="_Toc152605140"></a><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><span style='mso-bookmark:_Toc184788851'><span
  style='mso-bookmark:_Toc152605140'>Appendix A: Registry Values</span></span></h1>
  
! <h2><a name="_Toc184788852"></a><a name="_Toc152605141"></a><a
  name="_Toc115416199"></a><a name="_Toc139993191"></a><a name="_Toc126872268"></a><a
! name="_Toc115417104"></a><span style='mso-bookmark:_Toc184788852'><span
  style='mso-bookmark:_Toc152605141'><span style='mso-bookmark:_Toc115416199'>A.1.
  Service parameters</span></span></span></h2>
  
  <p class=MsoBodyText>The service parameters primarily affect the behavior of
  the AFS client service (afsd_service.exe).</p>
  
! <h3><a name="_Toc184788853"></a><a name="_Toc152605142"></a><a
  name="_Toc115416200"></a><a name="_Toc139993192"></a><a name="_Toc126872269"></a><span
! style='mso-bookmark:_Toc184788853'><span style='mso-bookmark:_Toc152605142'><span
  style='mso-bookmark:_Toc115416200'>Regkey:<br>
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</span></span></span></h3>
  
--- 4331,4354 ----
  <p class=MsoNormal>When performing an upgrade with msiexec.exe execute the MSI
  with the repair options &quot;vomus&quot;.</p>
  
! <h1><a name="_Toc190064129"></a><a name="_Toc152605140"></a><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><span style='mso-bookmark:_Toc190064129'><span
  style='mso-bookmark:_Toc152605140'>Appendix A: Registry Values</span></span></h1>
  
! <h2><a name="_Toc190064130"></a><a name="_Toc152605141"></a><a
  name="_Toc115416199"></a><a name="_Toc139993191"></a><a name="_Toc126872268"></a><a
! name="_Toc115417104"></a><span style='mso-bookmark:_Toc190064130'><span
  style='mso-bookmark:_Toc152605141'><span style='mso-bookmark:_Toc115416199'>A.1.
  Service parameters</span></span></span></h2>
  
  <p class=MsoBodyText>The service parameters primarily affect the behavior of
  the AFS client service (afsd_service.exe).</p>
  
! <h3><a name="_Toc190064131"></a><a name="_Toc152605142"></a><a
  name="_Toc115416200"></a><a name="_Toc139993192"></a><a name="_Toc126872269"></a><span
! style='mso-bookmark:_Toc190064131'><span style='mso-bookmark:_Toc152605142'><span
  style='mso-bookmark:_Toc115416200'>Regkey:<br>
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</span></span></span></h3>
  
***************
*** 4276,4284 ****
   <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="_Toc184788854"></a><a name="_Toc152605143"></a><a
    name="_Toc115416201"></a><a name="_Toc139993193"></a><a name="_Toc126872270"></a><span
!   style='mso-bookmark:_Toc184788854'><span style='mso-bookmark:_Toc152605143'><span
    style='mso-bookmark:_Toc115416201'>Value: LANadapter</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: -1<br>
--- 4357,4365 ----
   <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="_Toc190064132"></a><a name="_Toc152605143"></a><a
    name="_Toc115416201"></a><a name="_Toc139993193"></a><a name="_Toc126872270"></a><span
!   style='mso-bookmark:_Toc190064132'><span style='mso-bookmark:_Toc152605143'><span
    style='mso-bookmark:_Toc115416201'>Value: LANadapter</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: -1<br>
***************
*** 4295,4303 ****
   <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="_Toc184788855"></a><a name="_Toc152605144"></a><a
    name="_Toc139993194"></a><a name="_Toc126872271"></a><a name="_Toc115416202"></a><a
!   name="_Value___:_CacheSize"></a><span style='mso-bookmark:_Toc184788855'><span
    style='mso-bookmark:_Toc152605144'>Value: CacheSize</span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 98304 (CM_CONFIGDEFAULT_CACHESIZE)<br>
--- 4376,4384 ----
   <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="_Toc190064133"></a><a name="_Toc152605144"></a><a
    name="_Toc139993194"></a><a name="_Toc126872271"></a><a name="_Toc115416202"></a><a
!   name="_Value___:_CacheSize"></a><span style='mso-bookmark:_Toc190064133'><span
    style='mso-bookmark:_Toc152605144'>Value: CacheSize</span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 98304 (CM_CONFIGDEFAULT_CACHESIZE)<br>
***************
*** 4308,4316 ****
   <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="_Toc184788856"></a><a name="_Toc152605145"></a><a
    name="_Toc115416203"></a><a name="_Toc139993195"></a><a name="_Toc126872272"></a><span
!   style='mso-bookmark:_Toc184788856'><span style='mso-bookmark:_Toc152605145'><span
    style='mso-bookmark:_Toc115416203'>Value: ChunkSize</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 20 (CM_CONFIGDEFAULT_CHUNKSIZE)<br>
--- 4389,4397 ----
   <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="_Toc190064134"></a><a name="_Toc152605145"></a><a
    name="_Toc115416203"></a><a name="_Toc139993195"></a><a name="_Toc126872272"></a><span
!   style='mso-bookmark:_Toc190064134'><span style='mso-bookmark:_Toc152605145'><span
    style='mso-bookmark:_Toc115416203'>Value: ChunkSize</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 20 (CM_CONFIGDEFAULT_CHUNKSIZE)<br>
***************
*** 4322,4330 ****
   <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="_Toc184788857"></a><a name="_Toc152605146"></a><a
    name="_Toc115416204"></a><a name="_Toc139993196"></a><a name="_Toc126872273"></a><span
!   style='mso-bookmark:_Toc184788857'><span style='mso-bookmark:_Toc152605146'><span
    style='mso-bookmark:_Toc115416204'>Value: Daemons</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 2 (CM_CONFIGDEFAULT_DAEMONS)<br>
--- 4403,4411 ----
   <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="_Toc190064135"></a><a name="_Toc152605146"></a><a
    name="_Toc115416204"></a><a name="_Toc139993196"></a><a name="_Toc126872273"></a><span
!   style='mso-bookmark:_Toc190064135'><span style='mso-bookmark:_Toc152605146'><span
    style='mso-bookmark:_Toc115416204'>Value: Daemons</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 2 (CM_CONFIGDEFAULT_DAEMONS)<br>
***************
*** 4336,4344 ****
   <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="_Toc184788858"></a><a name="_Toc152605147"></a><a
    name="_Toc115416205"></a><a name="_Toc139993197"></a><a name="_Toc126872274"></a><span
!   style='mso-bookmark:_Toc184788858'><span style='mso-bookmark:_Toc152605147'><span
    style='mso-bookmark:_Toc115416205'>Value: ServerThreads</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 25 (CM_CONFIGDEFAULT_SVTHREADS)<br>
--- 4417,4425 ----
   <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="_Toc190064136"></a><a name="_Toc152605147"></a><a
    name="_Toc115416205"></a><a name="_Toc139993197"></a><a name="_Toc126872274"></a><span
!   style='mso-bookmark:_Toc190064136'><span style='mso-bookmark:_Toc152605147'><span
    style='mso-bookmark:_Toc115416205'>Value: ServerThreads</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 25 (CM_CONFIGDEFAULT_SVTHREADS)<br>
***************
*** 4350,4358 ****
   <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="_Toc184788859"></a><a name="_Toc152605148"></a><a
    name="_Toc115416206"></a><a name="_Value:_Stats"></a><a name="_Toc139993198"></a><a
!   name="_Toc126872275"></a><span style='mso-bookmark:_Toc184788859'><span
    style='mso-bookmark:_Toc152605148'><span style='mso-bookmark:_Toc115416206'>Value:
    Stats</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
--- 4431,4439 ----
   <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="_Toc190064137"></a><a name="_Toc152605148"></a><a
    name="_Toc115416206"></a><a name="_Value:_Stats"></a><a name="_Toc139993198"></a><a
!   name="_Toc126872275"></a><span style='mso-bookmark:_Toc190064137'><span
    style='mso-bookmark:_Toc152605148'><span style='mso-bookmark:_Toc115416206'>Value:
    Stats</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
***************
*** 4364,4372 ****
   <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="_Toc184788860"></a><a name="_Toc152605149"></a><a
    name="_Toc139993199"></a><a name="_Toc126872276"></a><a name="_Toc115416207"></a><a
!   name="_Value_:_LogoffPreserveTokens"></a><span style='mso-bookmark:_Toc184788860'><span
    style='mso-bookmark:_Toc152605149'>Value: LogoffPreserveTokens</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default : 0</p>
--- 4445,4453 ----
   <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="_Toc190064138"></a><a name="_Toc152605149"></a><a
    name="_Toc139993199"></a><a name="_Toc126872276"></a><a name="_Toc115416207"></a><a
!   name="_Value_:_LogoffPreserveTokens"></a><span style='mso-bookmark:_Toc190064138'><span
    style='mso-bookmark:_Toc152605149'>Value: LogoffPreserveTokens</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default : 0</p>
***************
*** 4378,4386 ****
   <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="_Toc184788861"></a><a name="_Toc152605150"></a><a
    name="_Toc115416208"></a><a name="_Toc139993200"></a><a name="_Toc126872277"></a><span
!   style='mso-bookmark:_Toc184788861'><span style='mso-bookmark:_Toc152605150'><span
    style='mso-bookmark:_Toc115416208'>Value: RootVolume</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;root.afs&quot;<br>
--- 4459,4467 ----
   <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="_Toc190064139"></a><a name="_Toc152605150"></a><a
    name="_Toc115416208"></a><a name="_Toc139993200"></a><a name="_Toc126872277"></a><span
!   style='mso-bookmark:_Toc190064139'><span style='mso-bookmark:_Toc152605150'><span
    style='mso-bookmark:_Toc115416208'>Value: RootVolume</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;root.afs&quot;<br>
***************
*** 4391,4399 ****
   <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="_Toc184788862"></a><a name="_Toc152605151"></a><a
    name="_Toc139993201"></a><a name="_Toc126872278"></a><a name="_Toc115416209"></a><a
!   name="_Value_:_Mountroot"></a><span style='mso-bookmark:_Toc184788862'><span
    style='mso-bookmark:_Toc152605151'>Value: MountRoot</span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;/afs&quot;<br>
--- 4472,4480 ----
   <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="_Toc190064140"></a><a name="_Toc152605151"></a><a
    name="_Toc139993201"></a><a name="_Toc126872278"></a><a name="_Toc115416209"></a><a
!   name="_Value_:_Mountroot"></a><span style='mso-bookmark:_Toc190064140'><span
    style='mso-bookmark:_Toc152605151'>Value: MountRoot</span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;/afs&quot;<br>
***************
*** 4411,4419 ****
   <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="_Toc184788863"></a><a name="_Toc152605152"></a><a
    name="_Toc139993202"></a><a name="_Toc126872279"></a><a name="_Toc115416210"></a><a
!   name="_Value_:_CachePath"></a><span style='mso-bookmark:_Toc184788863'><span
    style='mso-bookmark:_Toc152605152'>Value: CachePath</span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ or REG_EXPAND_SZ<br>
    Default: &quot;%TEMP%\AFSCache&quot;<br>
--- 4492,4500 ----
   <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="_Toc190064141"></a><a name="_Toc152605152"></a><a
    name="_Toc139993202"></a><a name="_Toc126872279"></a><a name="_Toc115416210"></a><a
!   name="_Value_:_CachePath"></a><span style='mso-bookmark:_Toc190064141'><span
    style='mso-bookmark:_Toc152605152'>Value: CachePath</span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ or REG_EXPAND_SZ<br>
    Default: &quot;%TEMP%\AFSCache&quot;<br>
***************
*** 4426,4434 ****
   <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="_Toc184788864"></a><a name="_Toc152605153"></a><a
    name="_Toc115416211"></a><a name="_Toc139993203"></a><a name="_Toc126872280"></a><span
!   style='mso-bookmark:_Toc184788864'><span style='mso-bookmark:_Toc152605153'><span
    style='mso-bookmark:_Toc115416211'>Value: NonPersistentCaching</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD [0..1]<br>
    Default: 0<br>
--- 4507,4515 ----
   <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="_Toc190064142"></a><a name="_Toc152605153"></a><a
    name="_Toc115416211"></a><a name="_Toc139993203"></a><a name="_Toc126872280"></a><span
!   style='mso-bookmark:_Toc190064142'><span style='mso-bookmark:_Toc152605153'><span
    style='mso-bookmark:_Toc115416211'>Value: NonPersistentCaching</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD [0..1]<br>
    Default: 0<br>
***************
*** 4442,4450 ****
   <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="_Toc184788865"></a><a name="_Toc152605154"></a><a
    name="_Toc115416212"></a><a name="_Toc139993204"></a><a name="_Toc126872281"></a><span
!   style='mso-bookmark:_Toc184788865'><span style='mso-bookmark:_Toc152605154'><span
    style='mso-bookmark:_Toc115416212'>Value: ValidateCache</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD [0..2]<br>
    Default: 1<br>
--- 4523,4531 ----
   <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="_Toc190064143"></a><a name="_Toc152605154"></a><a
    name="_Toc115416212"></a><a name="_Toc139993204"></a><a name="_Toc126872281"></a><span
!   style='mso-bookmark:_Toc190064143'><span style='mso-bookmark:_Toc152605154'><span
    style='mso-bookmark:_Toc115416212'>Value: ValidateCache</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD [0..2]<br>
    Default: 1<br>
***************
*** 4459,4467 ****
   <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="_Toc184788866"></a><a name="_Toc152605155"></a><a
    name="_Toc115416213"></a><a name="_Toc139993205"></a><a name="_Toc126872282"></a><span
!   style='mso-bookmark:_Toc184788866'><span style='mso-bookmark:_Toc152605155'><span
    style='mso-bookmark:_Toc115416213'>Value: TrapOnPanic</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
--- 4540,4548 ----
   <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="_Toc190064144"></a><a name="_Toc152605155"></a><a
    name="_Toc115416213"></a><a name="_Toc139993205"></a><a name="_Toc126872282"></a><span
!   style='mso-bookmark:_Toc190064144'><span style='mso-bookmark:_Toc152605155'><span
    style='mso-bookmark:_Toc115416213'>Value: TrapOnPanic</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
***************
*** 4473,4481 ****
   <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="_Toc184788867"></a><a name="_Toc152605156"></a><a
    name="_Toc139993206"></a><a name="_Toc126872283"></a><a name="_Toc115416214"></a><a
!   name="_Value___:_NetbiosName"></a><span style='mso-bookmark:_Toc184788867'><span
    style='mso-bookmark:_Toc152605156'>Value: NetbiosName</span></span></h5>
    <p class=MsoBodyText>Type: REG_EXPAND_SZ<br>
    Default: &quot;AFS&quot;<br>
--- 4554,4562 ----
   <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="_Toc190064145"></a><a name="_Toc152605156"></a><a
    name="_Toc139993206"></a><a name="_Toc126872283"></a><a name="_Toc115416214"></a><a
!   name="_Value___:_NetbiosName"></a><span style='mso-bookmark:_Toc190064145'><span
    style='mso-bookmark:_Toc152605156'>Value: NetbiosName</span></span></h5>
    <p class=MsoBodyText>Type: REG_EXPAND_SZ<br>
    Default: &quot;AFS&quot;<br>
***************
*** 4488,4496 ****
   <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="_Toc184788868"></a><a name="_Toc152605157"></a><a
    name="_Toc115416215"></a><a name="_Toc139993207"></a><a name="_Toc126872284"></a><span
!   style='mso-bookmark:_Toc184788868'><span style='mso-bookmark:_Toc152605157'><span
    style='mso-bookmark:_Toc115416215'>Value: IsGateway</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
--- 4569,4577 ----
   <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="_Toc190064146"></a><a name="_Toc152605157"></a><a
    name="_Toc115416215"></a><a name="_Toc139993207"></a><a name="_Toc126872284"></a><span
!   style='mso-bookmark:_Toc190064146'><span style='mso-bookmark:_Toc152605157'><span
    style='mso-bookmark:_Toc115416215'>Value: IsGateway</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
***************
*** 4508,4516 ****
   <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="_Toc184788869"></a><a name="_Toc152605158"></a><a
    name="_Toc115416216"></a><a name="_Toc139993208"></a><a name="_Toc126872285"></a><span
!   style='mso-bookmark:_Toc184788869'><span style='mso-bookmark:_Toc152605158'><span
    style='mso-bookmark:_Toc115416216'>Value: ReportSessionStartups</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
--- 4589,4597 ----
   <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="_Toc190064147"></a><a name="_Toc152605158"></a><a
    name="_Toc115416216"></a><a name="_Toc139993208"></a><a name="_Toc126872285"></a><span
!   style='mso-bookmark:_Toc190064147'><span style='mso-bookmark:_Toc152605158'><span
    style='mso-bookmark:_Toc115416216'>Value: ReportSessionStartups</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
***************
*** 4523,4531 ****
   <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="_Toc184788870"></a><a name="_Toc152605159"></a><a
    name="_Toc139993209"></a><a name="_Toc126872286"></a><a name="_Toc115416217"></a><a
!   name="_Value_:_TraceBufferSize"></a><span style='mso-bookmark:_Toc184788870'><span
    style='mso-bookmark:_Toc152605159'>Value: TraceBufferSize</span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 5000 (CM_CONFIGDEFAULT_TRACEBUFSIZE)<br>
--- 4604,4612 ----
   <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="_Toc190064148"></a><a name="_Toc152605159"></a><a
    name="_Toc139993209"></a><a name="_Toc126872286"></a><a name="_Toc115416217"></a><a
!   name="_Value_:_TraceBufferSize"></a><span style='mso-bookmark:_Toc190064148'><span
    style='mso-bookmark:_Toc152605159'>Value: TraceBufferSize</span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 5000 (CM_CONFIGDEFAULT_TRACEBUFSIZE)<br>
***************
*** 4536,4544 ****
   <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="_Toc184788871"></a><a name="_Toc152605160"></a><a
    name="_Toc139993210"></a><a name="_Toc126872287"></a><a name="_Toc115416218"></a><a
!   name="_Value_:_SysName"></a><span style='mso-bookmark:_Toc184788871'><span
    style='mso-bookmark:_Toc152605160'>Value: SysName</span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;x86_win32 i386_w2k i386_nt40&quot; (X86) <br>
--- 4617,4625 ----
   <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="_Toc190064149"></a><a name="_Toc152605160"></a><a
    name="_Toc139993210"></a><a name="_Toc126872287"></a><a name="_Toc115416218"></a><a
!   name="_Value_:_SysName"></a><span style='mso-bookmark:_Toc190064149'><span
    style='mso-bookmark:_Toc152605160'>Value: SysName</span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;x86_win32 i386_w2k i386_nt40&quot; (X86) <br>
***************
*** 4552,4560 ****
   <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="_Toc184788872"></a><a name="_Toc152605161"></a><a
    name="_Toc139993211"></a><a name="_Toc126872288"></a><a name="_Toc115416219"></a><a
!   name="_Value_:_SecurityLevel"></a><span style='mso-bookmark:_Toc184788872'><span
    style='mso-bookmark:_Toc152605161'>Value: SecurityLevel</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
--- 4633,4641 ----
   <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="_Toc190064150"></a><a name="_Toc152605161"></a><a
    name="_Toc139993211"></a><a name="_Toc126872288"></a><a name="_Toc115416219"></a><a
!   name="_Value_:_SecurityLevel"></a><span style='mso-bookmark:_Toc190064150'><span
    style='mso-bookmark:_Toc152605161'>Value: SecurityLevel</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
***************
*** 4565,4573 ****
   <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="_Toc184788873"></a><a name="_Toc152605162"></a><a
    name="_Toc139993212"></a><a name="_Toc126872289"></a><a name="_Toc115416220"></a><a
!   name="_Value_:_UseDNS"></a><span style='mso-bookmark:_Toc184788873'><span
    style='mso-bookmark:_Toc152605162'>Value: UseDNS</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 1<br>
--- 4646,4654 ----
   <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="_Toc190064151"></a><a name="_Toc152605162"></a><a
    name="_Toc139993212"></a><a name="_Toc126872289"></a><a name="_Toc115416220"></a><a
!   name="_Value_:_UseDNS"></a><span style='mso-bookmark:_Toc190064151'><span
    style='mso-bookmark:_Toc152605162'>Value: UseDNS</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 1<br>
***************
*** 4580,4588 ****
   <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="_Toc184788874"></a><a name="_Toc152605163"></a><a
    name="_Toc139993213"></a><a name="_Toc126872290"></a><a name="_Toc115416221"></a><a
!   name="_Value_:_FreelanceClient"></a><span style='mso-bookmark:_Toc184788874'><span
    style='mso-bookmark:_Toc152605163'>Value: FreelanceClient</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
--- 4661,4669 ----
   <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="_Toc190064152"></a><a name="_Toc152605163"></a><a
    name="_Toc139993213"></a><a name="_Toc126872290"></a><a name="_Toc115416221"></a><a
!   name="_Value_:_FreelanceClient"></a><span style='mso-bookmark:_Toc190064152'><span
    style='mso-bookmark:_Toc152605163'>Value: FreelanceClient</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
***************
*** 4593,4602 ****
   <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="_Toc184788875"></a><a name="_Toc152605164"></a><a
    name="_Value:_HideDotFiles"></a><a name="_Toc139993214"></a><a
    name="_Toc126872291"></a><a name="_Toc115416222"></a><a
!   name="_Value_:_HideDotFiles"></a><span style='mso-bookmark:_Toc184788875'><span
    style='mso-bookmark:_Toc152605164'>Value: HideDotFiles</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 1<br>
--- 4674,4683 ----
   <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="_Toc190064153"></a><a name="_Toc152605164"></a><a
    name="_Value:_HideDotFiles"></a><a name="_Toc139993214"></a><a
    name="_Toc126872291"></a><a name="_Toc115416222"></a><a
!   name="_Value_:_HideDotFiles"></a><span style='mso-bookmark:_Toc190064153'><span
    style='mso-bookmark:_Toc152605164'>Value: HideDotFiles</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 1<br>
***************
*** 4609,4617 ****
   <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="_Toc184788876"></a><a name="_Toc152605165"></a><a
    name="_Toc115416223"></a><a name="_Toc139993215"></a><a name="_Toc126872292"></a><span
!   style='mso-bookmark:_Toc184788876'><span style='mso-bookmark:_Toc152605165'><span
    style='mso-bookmark:_Toc115416223'>Value: MaxMpxRequests</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 50<br>
--- 4690,4698 ----
   <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="_Toc190064154"></a><a name="_Toc152605165"></a><a
    name="_Toc115416223"></a><a name="_Toc139993215"></a><a name="_Toc126872292"></a><span
!   style='mso-bookmark:_Toc190064154'><span style='mso-bookmark:_Toc152605165'><span
    style='mso-bookmark:_Toc115416223'>Value: MaxMpxRequests</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 50<br>
***************
*** 4623,4631 ****
   <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="_Toc184788877"></a><a name="_Toc152605166"></a><a
    name="_Toc115416224"></a><a name="_Toc139993216"></a><a name="_Toc126872293"></a><span
!   style='mso-bookmark:_Toc184788877'><span style='mso-bookmark:_Toc152605166'><span
    style='mso-bookmark:_Toc115416224'>Value: MaxVCPerServer</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 100<br>
--- 4704,4712 ----
   <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="_Toc190064155"></a><a name="_Toc152605166"></a><a
    name="_Toc115416224"></a><a name="_Toc139993216"></a><a name="_Toc126872293"></a><span
!   style='mso-bookmark:_Toc190064155'><span style='mso-bookmark:_Toc152605166'><span
    style='mso-bookmark:_Toc115416224'>Value: MaxVCPerServer</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 100<br>
***************
*** 4636,4644 ****
   <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="_Toc184788878"></a><a name="_Toc152605167"></a><a
    name="_Toc139993217"></a><a name="_Toc126872294"></a><a name="_Toc115416225"></a><a
!   name="_Value_:_Cell"></a><span style='mso-bookmark:_Toc184788878'><span
    style='mso-bookmark:_Toc152605167'>Value: Cell</span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;<br>
--- 4717,4725 ----
   <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="_Toc190064156"></a><a name="_Toc152605167"></a><a
    name="_Toc139993217"></a><a name="_Toc126872294"></a><a name="_Toc115416225"></a><a
!   name="_Value_:_Cell"></a><span style='mso-bookmark:_Toc190064156'><span
    style='mso-bookmark:_Toc152605167'>Value: Cell</span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;<br>
***************
*** 4650,4658 ****
   <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="_Toc184788879"></a><a name="_Toc152605168"></a><a
    name="_Toc115416226"></a><a name="_Toc139993218"></a><a name="_Toc126872295"></a><span
!   style='mso-bookmark:_Toc184788879'><span style='mso-bookmark:_Toc152605168'><span
    style='mso-bookmark:_Toc115416226'>Value: RxNoJumbo</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0,1}<br>
    Default: 0<br>
--- 4731,4739 ----
   <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="_Toc190064157"></a><a name="_Toc152605168"></a><a
    name="_Toc115416226"></a><a name="_Toc139993218"></a><a name="_Toc126872295"></a><span
!   style='mso-bookmark:_Toc190064157'><span style='mso-bookmark:_Toc152605168'><span
    style='mso-bookmark:_Toc115416226'>Value: RxNoJumbo</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0,1}<br>
    Default: 0<br>
***************
*** 4664,4672 ****
   <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="_Toc184788880"></a><a name="_Toc152605169"></a><a
    name="_Toc139993219"></a><a name="_Toc126872296"></a><a name="_Toc115416227"></a><a
!   name="_Value_:_RxMaxMTU"></a><span style='mso-bookmark:_Toc184788880'><span
    style='mso-bookmark:_Toc152605169'>Value: RxMaxMTU</span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: -1<br>
--- 4745,4753 ----
   <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="_Toc190064158"></a><a name="_Toc152605169"></a><a
    name="_Toc139993219"></a><a name="_Toc126872296"></a><a name="_Toc115416227"></a><a
!   name="_Value_:_RxMaxMTU"></a><span style='mso-bookmark:_Toc190064158'><span
    style='mso-bookmark:_Toc152605169'>Value: RxMaxMTU</span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: -1<br>
***************
*** 4680,4688 ****
   <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="_Toc184788881"></a><a name="_Toc152605170"></a><a
    name="_Toc139993220"></a><a name="_Toc126872297"></a><a name="_Toc115416228"></a><a
!   name="_Value:_ConnDeadTimeout"></a><span style='mso-bookmark:_Toc184788881'><span
    style='mso-bookmark:_Toc152605170'>Value: ConnDeadTimeout</span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 60 (seconds)<br>
--- 4761,4769 ----
   <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="_Toc190064159"></a><a name="_Toc152605170"></a><a
    name="_Toc139993220"></a><a name="_Toc126872297"></a><a name="_Toc115416228"></a><a
!   name="_Value:_ConnDeadTimeout"></a><span style='mso-bookmark:_Toc190064159'><span
    style='mso-bookmark:_Toc152605170'>Value: ConnDeadTimeout</span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 60 (seconds)<br>
***************
*** 4699,4707 ****
   <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="_Toc184788882"></a><a name="_Toc152605171"></a><a
    name="_Toc115416229"></a><a name="_Toc139993221"></a><a name="_Toc126872298"></a><span
!   style='mso-bookmark:_Toc184788882'><span style='mso-bookmark:_Toc152605171'><span
    style='mso-bookmark:_Toc115416229'>Value: HardDeadTimeout</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 120 (seconds)<br>
--- 4780,4788 ----
   <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="_Toc190064160"></a><a name="_Toc152605171"></a><a
    name="_Toc115416229"></a><a name="_Toc139993221"></a><a name="_Toc126872298"></a><span
!   style='mso-bookmark:_Toc190064160'><span style='mso-bookmark:_Toc152605171'><span
    style='mso-bookmark:_Toc115416229'>Value: HardDeadTimeout</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 120 (seconds)<br>
***************
*** 4713,4721 ****
   <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="_Toc184788883"></a><a name="_Toc152605172"></a><a
    name="_Toc139993222"></a><a name="_Toc126872299"></a><a name="_Toc115416230"></a><a
!   name="_Value__:_TraceOption"></a><span style='mso-bookmark:_Toc184788883'><span
    style='mso-bookmark:_Toc152605172'>Value: TraceOption</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0-15}<br>
    Default: 0</p>
--- 4794,4802 ----
   <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="_Toc190064161"></a><a name="_Toc152605172"></a><a
    name="_Toc139993222"></a><a name="_Toc126872299"></a><a name="_Toc115416230"></a><a
!   name="_Value__:_TraceOption"></a><span style='mso-bookmark:_Toc190064161'><span
    style='mso-bookmark:_Toc152605172'>Value: TraceOption</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0-15}<br>
    Default: 0</p>
***************
*** 4734,4742 ****
   <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="_Toc184788884"></a><a name="_Toc152605173"></a><a
    name="_Toc115416231"></a><a name="_Toc139993223"></a><a name="_Toc126872300"></a><span
!   style='mso-bookmark:_Toc184788884'><span style='mso-bookmark:_Toc152605173'><span
    style='mso-bookmark:_Toc115416231'>Value: AllSubmount</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1</p>
--- 4815,4823 ----
   <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="_Toc190064162"></a><a name="_Toc152605173"></a><a
    name="_Toc115416231"></a><a name="_Toc139993223"></a><a name="_Toc126872300"></a><span
!   style='mso-bookmark:_Toc190064162'><span style='mso-bookmark:_Toc152605173'><span
    style='mso-bookmark:_Toc115416231'>Value: AllSubmount</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1</p>
***************
*** 4749,4757 ****
   <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="_Toc184788885"></a><a name="_Toc152605174"></a><a
    name="_Toc139993224"></a><a name="_Toc126872301"></a><a name="_Toc115416232"></a><a
!   name="_Value___:_NoFindLanaByName"></a><span style='mso-bookmark:_Toc184788885'><span
    style='mso-bookmark:_Toc152605174'>Value: NoFindLanaByName</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0</p>
--- 4830,4838 ----
   <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="_Toc190064163"></a><a name="_Toc152605174"></a><a
    name="_Toc139993224"></a><a name="_Toc126872301"></a><a name="_Toc115416232"></a><a
!   name="_Value___:_NoFindLanaByName"></a><span style='mso-bookmark:_Toc190064163'><span
    style='mso-bookmark:_Toc152605174'>Value: NoFindLanaByName</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0</p>
***************
*** 4762,4770 ****
   <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="_Toc184788886"></a><a name="_Toc152605175"></a><a
    name="_Toc115416233"></a><a name="_Toc139993225"></a><a name="_Toc126872302"></a><span
!   style='mso-bookmark:_Toc184788886'><span style='mso-bookmark:_Toc152605175'><span
    style='mso-bookmark:_Toc115416233'>Value: MaxCPUs</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1..32} or {1..64} depending on the architecture<br>
    Default: &lt;no default&gt;</p>
--- 4843,4851 ----
   <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="_Toc190064164"></a><a name="_Toc152605175"></a><a
    name="_Toc115416233"></a><a name="_Toc139993225"></a><a name="_Toc126872302"></a><span
!   style='mso-bookmark:_Toc190064164'><span style='mso-bookmark:_Toc152605175'><span
    style='mso-bookmark:_Toc115416233'>Value: MaxCPUs</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1..32} or {1..64} depending on the architecture<br>
    Default: &lt;no default&gt;</p>
***************
*** 4776,4784 ****
   <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="_Toc184788887"></a><a name="_Toc152605176"></a><a
    name="_Toc139993226"></a><a name="_Toc126872303"></a><a name="_Toc115416234"></a><a
!   name="_Value___:_smbAuthType"></a><span style='mso-bookmark:_Toc184788887'><span
    style='mso-bookmark:_Toc152605176'>Value: smbAuthType</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0..2}<br>
    Default: 2</p>
--- 4857,4865 ----
   <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="_Toc190064165"></a><a name="_Toc152605176"></a><a
    name="_Toc139993226"></a><a name="_Toc126872303"></a><a name="_Toc115416234"></a><a
!   name="_Value___:_smbAuthType"></a><span style='mso-bookmark:_Toc190064165'><span
    style='mso-bookmark:_Toc152605176'>Value: smbAuthType</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0..2}<br>
    Default: 2</p>
***************
*** 4794,4802 ****
   <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="_Toc184788888"></a><a name="_Toc152605177"></a><a
    name="_Toc139993227"></a><a name="_Toc126872304"></a><a name="_Toc115416235"></a><a
!   name="_Value___:_MaxLogSize"></a><span style='mso-bookmark:_Toc184788888'><span
    style='mso-bookmark:_Toc152605177'>Value: MaxLogSize</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0 .. MAXDWORD}<br>
    Default: 100K</p>
--- 4875,4883 ----
   <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="_Toc190064166"></a><a name="_Toc152605177"></a><a
    name="_Toc139993227"></a><a name="_Toc126872304"></a><a name="_Toc115416235"></a><a
!   name="_Value___:_MaxLogSize"></a><span style='mso-bookmark:_Toc190064166'><span
    style='mso-bookmark:_Toc152605177'>Value: MaxLogSize</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0 .. MAXDWORD}<br>
    Default: 100K</p>
***************
*** 4809,4817 ****
   <tr style='mso-yfti-irow:35;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="_Toc184788889"></a><a name="_Toc152605178"></a><a
    name="_Toc115416236"></a><a name="_Toc139993228"></a><a name="_Toc126872305"></a><span
!   style='mso-bookmark:_Toc184788889'><span style='mso-bookmark:_Toc152605178'><span
    style='mso-bookmark:_Toc115416236'>Value: FlushOnHibernate</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0,1}<br>
    Default: 1</p>
--- 4890,4898 ----
   <tr style='mso-yfti-irow:35;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="_Toc190064167"></a><a name="_Toc152605178"></a><a
    name="_Toc115416236"></a><a name="_Toc139993228"></a><a name="_Toc126872305"></a><span
!   style='mso-bookmark:_Toc190064167'><span style='mso-bookmark:_Toc152605178'><span
    style='mso-bookmark:_Toc115416236'>Value: FlushOnHibernate</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0,1}<br>
    Default: 1</p>
***************
*** 4822,4829 ****
   <tr style='mso-yfti-irow:36;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="_Toc184788890"></a><a name="_Toc152605179"><span
!   style='mso-bookmark:_Toc184788890'>Value: daemonCheckDownInterval</span></a></h5>
    <p class=MsoBodyText>Type: DWORD (seconds)<br>
    Default: 180</p>
    <p class=MsoBodyText><span style='mso-fareast-font-family:"Times New Roman"'>This
--- 4903,4910 ----
   <tr style='mso-yfti-irow:36;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="_Toc190064168"></a><a name="_Toc152605179"><span
!   style='mso-bookmark:_Toc190064168'>Value: daemonCheckDownInterval</span></a></h5>
    <p class=MsoBodyText>Type: DWORD (seconds)<br>
    Default: 180</p>
    <p class=MsoBodyText><span style='mso-fareast-font-family:"Times New Roman"'>This
***************
*** 4834,4841 ****
   <tr style='mso-yfti-irow:37;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="_Toc184788891"></a><a name="_Toc152605180"><span
!   style='mso-bookmark:_Toc184788891'>Value: daemonCheckUpInterval</span></a></h5>
    <p class=MsoBodyText>Type: DWORD (seconds)<br>
    Default: 600</p>
    <p class=MsoBodyText>This value controls how frequently the AFS cache manager
--- 4915,4922 ----
   <tr style='mso-yfti-irow:37;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="_Toc190064169"></a><a name="_Toc152605180"><span
!   style='mso-bookmark:_Toc190064169'>Value: daemonCheckUpInterval</span></a></h5>
    <p class=MsoBodyText>Type: DWORD (seconds)<br>
    Default: 600</p>
    <p class=MsoBodyText>This value controls how frequently the AFS cache manager
***************
*** 4845,4852 ****
   <tr style='mso-yfti-irow:38;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="_Toc184788892"></a><a name="_Toc152605181"><span
!   style='mso-bookmark:_Toc184788892'>Value: daemonCheckVolInterval</span></a></h5>
    <p class=MsoBodyText>Type: DWORD (seconds)<br>
    Default: 3600</p>
    <p class=MsoBodyText><span style='mso-fareast-font-family:"Times New Roman"'>This
--- 4926,4933 ----
   <tr style='mso-yfti-irow:38;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="_Toc190064170"></a><a name="_Toc152605181"><span
!   style='mso-bookmark:_Toc190064170'>Value: daemonCheckVolInterval</span></a></h5>
    <p class=MsoBodyText>Type: DWORD (seconds)<br>
    Default: 3600</p>
    <p class=MsoBodyText><span style='mso-fareast-font-family:"Times New Roman"'>This
***************
*** 4857,4864 ****
   <tr style='mso-yfti-irow:39;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="_Toc184788893"></a><a name="_Toc152605182"><span
!   style='mso-bookmark:_Toc184788893'>Value: daemonCheckCBInterval</span></a></h5>
    <p class=MsoBodyText>Type: DWORD (seconds)<br>
    Default: 60</p>
    <p class=MsoBodyText><span style='mso-fareast-font-family:"Times New Roman"'>This
--- 4938,4945 ----
   <tr style='mso-yfti-irow:39;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="_Toc190064171"></a><a name="_Toc152605182"><span
!   style='mso-bookmark:_Toc190064171'>Value: daemonCheckCBInterval</span></a></h5>
    <p class=MsoBodyText>Type: DWORD (seconds)<br>
    Default: 60</p>
    <p class=MsoBodyText><span style='mso-fareast-font-family:"Times New Roman"'>This
***************
*** 4869,4876 ****
   <tr style='mso-yfti-irow:40;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="_Toc184788894"></a><a name="_Toc152605183"><span
!   style='mso-bookmark:_Toc184788894'>Value: daemonCheckLockInterval</span></a></h5>
    <p class=MsoBodyText>Type: DWORD (seconds)<br>
    Default: 60</p>
    <p class=MsoBodyText><span style='mso-fareast-font-family:"Times New Roman"'>This
--- 4950,4957 ----
   <tr style='mso-yfti-irow:40;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="_Toc190064172"></a><a name="_Toc152605183"><span
!   style='mso-bookmark:_Toc190064172'>Value: daemonCheckLockInterval</span></a></h5>
    <p class=MsoBodyText>Type: DWORD (seconds)<br>
    Default: 60</p>
    <p class=MsoBodyText><span style='mso-fareast-font-family:"Times New Roman"'>This
***************
*** 4881,4888 ****
   <tr style='mso-yfti-irow:41;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="_Toc184788895"></a><a name="_Toc152605184"><span
!   style='mso-bookmark:_Toc184788895'>Value: daemonCheckTokenInterval</span></a></h5>
    <p class=MsoBodyText>Type: DWORD (seconds)<br>
    Default: 180</p>
    <p class=MsoBodyText><span style='mso-fareast-font-family:"Times New Roman"'>This
--- 4962,4969 ----
   <tr style='mso-yfti-irow:41;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="_Toc190064173"></a><a name="_Toc152605184"><span
!   style='mso-bookmark:_Toc190064173'>Value: daemonCheckTokenInterval</span></a></h5>
    <p class=MsoBodyText>Type: DWORD (seconds)<br>
    Default: 180</p>
    <p class=MsoBodyText><span style='mso-fareast-font-family:"Times New Roman"'>This
***************
*** 4893,4899 ****
   <tr style='mso-yfti-irow:42;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="_Toc184788896">Value: daemonCheckOfflineVolInterval</a></h5>
    <p class=MsoBodyText>Type: DWORD (seconds)<br>
    Default: 600</p>
    <p class=MsoBodyText>This value controls how frequently the AFS cache manager
--- 4974,4980 ----
   <tr style='mso-yfti-irow:42;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="_Toc190064174">Value: daemonCheckOfflineVolInterval</a></h5>
    <p class=MsoBodyText>Type: DWORD (seconds)<br>
    Default: 600</p>
    <p class=MsoBodyText>This value controls how frequently the AFS cache manager
***************
*** 4905,4912 ****
   <tr style='mso-yfti-irow:43;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="_Toc184788897"></a><a name="_Toc152605185"><span
!   style='mso-bookmark:_Toc184788897'>Value: CallBackPort</span></a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 7001</p>
    <p class=MsoBodyText>This value specifies which port number should be used
--- 4986,4993 ----
   <tr style='mso-yfti-irow:43;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="_Toc190064175"></a><a name="_Toc152605185"><span
!   style='mso-bookmark:_Toc190064175'>Value: CallBackPort</span></a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 7001</p>
    <p class=MsoBodyText>This value specifies which port number should be used
***************
*** 4920,4927 ****
   <tr style='mso-yfti-irow:44;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="_Toc184788898"></a><a name="_Toc152605186"></a><a
!   name="_Value:_EnableServerLocks"></a><span style='mso-bookmark:_Toc184788898'><span
    style='mso-bookmark:_Toc152605186'>Value: EnableServerLocks</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1, 2}<br>
    Default: 1</p>
--- 5001,5008 ----
   <tr style='mso-yfti-irow:44;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="_Toc190064176"></a><a name="_Toc152605186"></a><a
!   name="_Value:_EnableServerLocks"></a><span style='mso-bookmark:_Toc190064176'><span
    style='mso-bookmark:_Toc152605186'>Value: EnableServerLocks</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1, 2}<br>
    Default: 1</p>
***************
*** 4938,4944 ****
   <tr style='mso-yfti-irow:45;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="_Toc184788899">Value: DeleteReadOnly</a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0</p>
    <p class=MsoBodyText>Determines whether or not the AFS Cache Manager will
--- 5019,5025 ----
   <tr style='mso-yfti-irow:45;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="_Toc190064177">Value: DeleteReadOnly</a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0</p>
    <p class=MsoBodyText>Determines whether or not the AFS Cache Manager will
***************
*** 4954,4960 ****
   <tr style='mso-yfti-irow:46;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="_Toc184788900">Value: BPlusTrees</a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1</p>
    <p class=MsoBodyText>Determines whether or not the AFS Cache Manager uses
--- 5035,5041 ----
   <tr style='mso-yfti-irow:46;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="_Toc190064178">Value: BPlusTrees</a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1</p>
    <p class=MsoBodyText>Determines whether or not the AFS Cache Manager uses
***************
*** 4968,4974 ****
   <tr style='mso-yfti-irow:47;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="_Toc184788901">Value: PrefetchExecutableExtensions</a></h5>
    <p class=MsoBodyText>Type: MULTI_SZ <br>
    Default: none specified</p>
    <p class=MsoNormal>The AFS Cache Manager will pre-fetch the entire contents
--- 5049,5055 ----
   <tr style='mso-yfti-irow:47;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="_Toc190064179">Value: PrefetchExecutableExtensions</a></h5>
    <p class=MsoBodyText>Type: MULTI_SZ <br>
    Default: none specified</p>
    <p class=MsoNormal>The AFS Cache Manager will pre-fetch the entire contents
***************
*** 4981,4987 ****
   <tr style='mso-yfti-irow:48;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="_Toc184788902">Value: OfflineReadOnlyIsValid</a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0</p>
    <p class=MsoBodyText>Determines whether or not cached data from .readonly
--- 5062,5068 ----
   <tr style='mso-yfti-irow:48;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="_Toc190064180">Value: OfflineReadOnlyIsValid</a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0</p>
    <p class=MsoBodyText>Determines whether or not cached data from .readonly
***************
*** 4996,5002 ****
   <tr style='mso-yfti-irow:49;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="_Toc184788903">Value: GiveUpAllCallBacks</a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0</p>
    <p class=MsoNormal>Determines whether or not the AFS Cache Manager will give
--- 5077,5083 ----
   <tr style='mso-yfti-irow:49;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="_Toc190064181">Value: GiveUpAllCallBacks</a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0</p>
    <p class=MsoNormal>Determines whether or not the AFS Cache Manager will give
***************
*** 5012,5018 ****
   <tr style='mso-yfti-irow:50;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="_Toc184788904">Value: FollowBackupPath</a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0</p>
    <p class=MsoNormal>Determines whether or not the AFS Cache Manager will give
--- 5093,5099 ----
   <tr style='mso-yfti-irow:50;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="_Toc190064182">Value: FollowBackupPath</a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0</p>
    <p class=MsoNormal>Determines whether or not the AFS Cache Manager will give
***************
*** 5026,5034 ****
   </tr>
  </table>
  
! <h3><a name="_Toc184788905"></a><a name="_Toc152605187"></a><a
  name="_Toc115416237"></a><a name="_Toc139993229"></a><a name="_Toc126872306"></a><span
! style='mso-bookmark:_Toc184788905'><span style='mso-bookmark:_Toc152605187'><span
  style='mso-bookmark:_Toc115416237'>Regkey<span class=GramE>:</span><br>
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters\GlobalAutoMapper]</span></span></span></h3>
  
--- 5107,5115 ----
   </tr>
  </table>
  
! <h3><a name="_Toc190064183"></a><a name="_Toc152605187"></a><a
  name="_Toc115416237"></a><a name="_Toc139993229"></a><a name="_Toc126872306"></a><span
! style='mso-bookmark:_Toc190064183'><span style='mso-bookmark:_Toc152605187'><span
  style='mso-bookmark:_Toc115416237'>Regkey<span class=GramE>:</span><br>
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters\GlobalAutoMapper]</span></span></span></h3>
  
***************
*** 5038,5046 ****
    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="_Toc184788906"></a><a name="_Toc152605188"></a><a
    name="_Toc115416238"></a><a name="_Toc139993230"></a><a name="_Toc126872307"></a><span
!   style='mso-bookmark:_Toc184788906'><span style='mso-bookmark:_Toc152605188'><span
    style='mso-bookmark:_Toc115416238'>Value: &lt;Drive Letter:&gt; for example
    &quot;G:&quot;</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ</p>
--- 5119,5127 ----
    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="_Toc190064184"></a><a name="_Toc152605188"></a><a
    name="_Toc115416238"></a><a name="_Toc139993230"></a><a name="_Toc126872307"></a><span
!   style='mso-bookmark:_Toc190064184'><span style='mso-bookmark:_Toc152605188'><span
    style='mso-bookmark:_Toc115416238'>Value: &lt;Drive Letter:&gt; for example
    &quot;G:&quot;</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ</p>
***************
*** 5052,5060 ****
   </tr>
  </table>
  
! <h3><a name="_Toc184788907"></a><a name="_Toc152605189"></a><a
  name="_Toc115416239"></a><a name="_Toc139993231"></a><a name="_Toc126872308"></a><span
! style='mso-bookmark:_Toc184788907'><span style='mso-bookmark:_Toc152605189'><span
  style='mso-bookmark:_Toc115416239'>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client]</span></span></span></h3>
  
--- 5133,5141 ----
   </tr>
  </table>
  
! <h3><a name="_Toc190064185"></a><a name="_Toc152605189"></a><a
  name="_Toc115416239"></a><a name="_Toc139993231"></a><a name="_Toc126872308"></a><span
! style='mso-bookmark:_Toc190064185'><span style='mso-bookmark:_Toc152605189'><span
  style='mso-bookmark:_Toc115416239'>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client]</span></span></span></h3>
  
***************
*** 5063,5085 ****
   <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="_Toc184788908"></a><a name="_Toc152605190"></a><a
    name="_Toc139993232"></a><a name="_Toc126872309"></a><a name="_Toc115416240"></a><a
!   name="_Value___:_CellServDBDir"></a><span style='mso-bookmark:_Toc184788908'><span
    style='mso-bookmark:_Toc152605190'>Value: CellServDBDir</span></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="_Toc184788909"></a><a name="_Toc152605191"></a><a
    name="_Toc139993233"></a><a name="_Toc126872310"></a><a name="_Toc115416241"></a><a
!   name="_Value___:_VerifyServiceSignature"></a><span style='mso-bookmark:_Toc184788909'><span
    style='mso-bookmark:_Toc152605191'>Value: VerifyServiceSignature</span></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x1</p>
--- 5144,5167 ----
   <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="_Toc190064186"></a><a name="_Toc152605190"></a><a
    name="_Toc139993232"></a><a name="_Toc126872309"></a><a name="_Toc115416240"></a><a
!   name="_Value___:_CellServDBDir"></a><span style='mso-bookmark:_Toc190064186'><span
    style='mso-bookmark:_Toc152605190'>Value: CellServDBDir</span></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 ProgramData directory is
!   searched and if the CellServDB file is not found, 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="_Toc190064187"></a><a name="_Toc152605191"></a><a
    name="_Toc139993233"></a><a name="_Toc126872310"></a><a name="_Toc115416241"></a><a
!   name="_Value___:_VerifyServiceSignature"></a><span style='mso-bookmark:_Toc190064187'><span
    style='mso-bookmark:_Toc152605191'>Value: VerifyServiceSignature</span></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x1</p>
***************
*** 5088,5106 ****
    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="_Toc184788910"></a><a name="_Toc152605192"></a><a
    name="_Value:_IoctlDebug"></a><a name="_Toc139993234"></a><a
    name="_Toc126872311"></a><a name="_Toc115416242"></a><a
!   name="_Value___:_IoctlDebug"></a><span style='mso-bookmark:_Toc184788910'><span
    style='mso-bookmark:_Toc152605192'>Value: IoctlDebug</span></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x0</p>
--- 5170,5187 ----
    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="_Toc190064188"></a><a name="_Toc152605192"></a><a
    name="_Value:_IoctlDebug"></a><a name="_Toc139993234"></a><a
    name="_Toc126872311"></a><a name="_Toc115416242"></a><a
!   name="_Value___:_IoctlDebug"></a><span style='mso-bookmark:_Toc190064188'><span
    style='mso-bookmark:_Toc152605192'>Value: IoctlDebug</span></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x0</p>
***************
*** 5114,5122 ****
   <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="_Toc184788911"></a><a name="_Toc152605193"></a><a
    name="_Toc115416243"></a><a name="_Toc139993235"></a><a name="_Toc126872312"></a><span
!   style='mso-bookmark:_Toc184788911'><span style='mso-bookmark:_Toc152605193'><span
    style='mso-bookmark:_Toc115416243'>Value: MiniDumpType</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x0 (MiniDumpNormal)</p>
--- 5195,5203 ----
   <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="_Toc190064189"></a><a name="_Toc152605193"></a><a
    name="_Toc115416243"></a><a name="_Toc139993235"></a><a name="_Toc126872312"></a><span
!   style='mso-bookmark:_Toc190064189'><span style='mso-bookmark:_Toc152605193'><span
    style='mso-bookmark:_Toc115416243'>Value: MiniDumpType</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x0 (MiniDumpNormal)</p>
***************
*** 5147,5155 ****
   <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="_Toc184788912"></a><a name="_Toc152605194"></a><a
    name="_Toc139993236"></a><a name="_Toc126872313"></a><a name="_Toc115416244"></a><a
!   name="_Value___:_StoreAnsiFilenames"></a><span style='mso-bookmark:_Toc184788912'><span
    style='mso-bookmark:_Toc152605194'>Value: StoreAnsiFilenames</span></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x0</p>
--- 5228,5236 ----
   <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="_Toc190064190"></a><a name="_Toc152605194"></a><a
    name="_Toc139993236"></a><a name="_Toc126872313"></a><a name="_Toc115416244"></a><a
!   name="_Value___:_StoreAnsiFilenames"></a><span style='mso-bookmark:_Toc190064190'><span
    style='mso-bookmark:_Toc152605194'>Value: StoreAnsiFilenames</span></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x0</p>
***************
*** 5165,5173 ****
   </tr>
  </table>
  
! <h3><a name="_Toc184788913"></a><a name="_Toc152605195"></a><a
  name="_Toc115416245"></a><a name="_Toc139993237"></a><a name="_Toc126872314"></a><span
! style='mso-bookmark:_Toc184788913'><span style='mso-bookmark:_Toc152605195'><span
  style='mso-bookmark:_Toc115416245'>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client\CSCPolicy]</span></span></span></h3>
  
--- 5246,5254 ----
   </tr>
  </table>
  
! <h3><a name="_Toc190064191"></a><a name="_Toc152605195"></a><a
  name="_Toc115416245"></a><a name="_Toc139993237"></a><a name="_Toc126872314"></a><span
! style='mso-bookmark:_Toc190064191'><span style='mso-bookmark:_Toc152605195'><span
  style='mso-bookmark:_Toc115416245'>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client\CSCPolicy]</span></span></span></h3>
  
***************
*** 5177,5185 ****
    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="_Toc184788914"></a><a name="_Toc152605196"></a><a
    name="_Toc115416246"></a><a name="_Toc139993238"></a><a name="_Toc126872315"></a><span
!   style='mso-bookmark:_Toc184788914'><span style='mso-bookmark:_Toc152605196'><span
    style='mso-bookmark:_Toc115416246'>Value: &quot;smb/cifs share name&quot;</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
--- 5258,5266 ----
    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="_Toc190064192"></a><a name="_Toc152605196"></a><a
    name="_Toc115416246"></a><a name="_Toc139993238"></a><a name="_Toc126872315"></a><span
!   style='mso-bookmark:_Toc190064192'><span style='mso-bookmark:_Toc152605196'><span
    style='mso-bookmark:_Toc115416246'>Value: &quot;smb/cifs share name&quot;</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
***************
*** 5192,5200 ****
   </tr>
  </table>
  
! <h3><a name="_Toc184788915"></a><a name="_Toc152605197"></a><a
  name="_Toc139993239"></a><a name="_Toc126872316"></a><a name="_Toc115416247"></a><a
! name="_Regkey:_[HKLM\SOFTWARE\OpenAFS\Clie"></a><span style='mso-bookmark:_Toc184788915'><span
  style='mso-bookmark:_Toc152605197'>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client\Freelance]</span></span></h3>
  
--- 5273,5281 ----
   </tr>
  </table>
  
! <h3><a name="_Toc190064193"></a><a name="_Toc152605197"></a><a
  name="_Toc139993239"></a><a name="_Toc126872316"></a><a name="_Toc115416247"></a><a
! name="_Regkey:_[HKLM\SOFTWARE\OpenAFS\Clie"></a><span style='mso-bookmark:_Toc190064193'><span
  style='mso-bookmark:_Toc152605197'>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client\Freelance]</span></span></h3>
  
***************
*** 5204,5212 ****
    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="_Toc184788916"></a><a name="_Toc152605198"></a><a
    name="_Toc115416248"></a><a name="_Toc139993240"></a><a name="_Toc126872317"></a><span
!   style='mso-bookmark:_Toc184788916'><span style='mso-bookmark:_Toc152605198'><span
    style='mso-bookmark:_Toc115416248'>Value: &quot;numeric value&quot;</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
--- 5285,5293 ----
    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="_Toc190064194"></a><a name="_Toc152605198"></a><a
    name="_Toc115416248"></a><a name="_Toc139993240"></a><a name="_Toc126872317"></a><span
!   style='mso-bookmark:_Toc190064194'><span style='mso-bookmark:_Toc152605198'><span
    style='mso-bookmark:_Toc115416248'>Value: &quot;numeric value&quot;</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
***************
*** 5220,5229 ****
   </tr>
  </table>
  
! <h3><a name="_Toc184788917"></a><a name="_Toc152605199"></a><a
  name="_Toc139993241"></a><a name="_Toc126872318"></a><a name="_Toc115416249"></a><a
  name="_Regkey:_[HKLM\SOFTWARE\OpenAFS\Clie_1"></a><span style='mso-bookmark:
! _Toc184788917'><span style='mso-bookmark:_Toc152605199'>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client\Freelance\Symlinks]</span></span></h3>
  
  <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
--- 5301,5310 ----
   </tr>
  </table>
  
! <h3><a name="_Toc190064195"></a><a name="_Toc152605199"></a><a
  name="_Toc139993241"></a><a name="_Toc126872318"></a><a name="_Toc115416249"></a><a
  name="_Regkey:_[HKLM\SOFTWARE\OpenAFS\Clie_1"></a><span style='mso-bookmark:
! _Toc190064195'><span style='mso-bookmark:_Toc152605199'>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client\Freelance\Symlinks]</span></span></h3>
  
  <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
***************
*** 5232,5240 ****
    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="_Toc184788918"></a><a name="_Toc152605200"></a><a
    name="_Toc115416250"></a><a name="_Toc139993242"></a><a name="_Toc126872319"></a><span
!   style='mso-bookmark:_Toc184788918'><span style='mso-bookmark:_Toc152605200'><span
    style='mso-bookmark:_Toc115416250'>Value: &quot;numeric value&quot;</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
--- 5313,5321 ----
    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="_Toc190064196"></a><a name="_Toc152605200"></a><a
    name="_Toc115416250"></a><a name="_Toc139993242"></a><a name="_Toc126872319"></a><span
!   style='mso-bookmark:_Toc190064196'><span style='mso-bookmark:_Toc152605200'><span
    style='mso-bookmark:_Toc115416250'>Value: &quot;numeric value&quot;</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
***************
*** 5249,5289 ****
   </tr>
  </table>
  
! <h3><a name="_Toc184788919"></a><a name="_Toc152605201"></a><a
  name="_Toc115416251"></a><a name="_Toc139993243"></a><a name="_Toc126872320"></a><span
! style='mso-bookmark:_Toc184788919'><span style='mso-bookmark:_Toc152605201'><span
! style='mso-bookmark:_Toc115416251'>Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client\Submounts]</span></span></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="_Toc184788920"></a><a name="_Toc152605202"></a><a
    name="_Toc115416252"></a><a name="_Toc139993244"></a><a name="_Toc126872321"></a><span
!   style='mso-bookmark:_Toc184788920'><span style='mso-bookmark:_Toc152605202'><span
!   style='mso-bookmark:_Toc115416252'>Value: &quot;submount name&quot;</span></span></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
!   using the AFS Submount mechanism.</p>
    </td>
   </tr>
  </table>
  
! <h3><a name="_Toc184788921"></a><a name="_Toc152605203"></a><a
  name="_Toc139993245"></a><a name="_Toc126872322"></a><a name="_Toc115416253"></a><a
  name="_Regkey:_[HKLM\SOFTWARE\OpenAFS\Clie_2"></a><span style='mso-bookmark:
! _Toc184788921'><span style='mso-bookmark:_Toc152605203'>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client\Server Preferences\VLDB]</span></span></h3>
  
  <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
--- 5330,5465 ----
   </tr>
  </table>
  
! <h3><a name="_Toc190064197"></a><a name="_Toc152605201"></a><a
  name="_Toc115416251"></a><a name="_Toc139993243"></a><a name="_Toc126872320"></a><span
! style='mso-bookmark:_Toc190064197'><span style='mso-bookmark:_Toc152605201'><span
! style='mso-bookmark:_Toc115416251'>Regkey<span class=GramE>:</span><br>
! [HKLM\SOFTWARE\OpenAFS\Client\Realms]</span></span></span></h3>
! 
! <p class=MsoBodyText>The Realms key is used to provide initialization data to be
! used when new identities are added to the Network Identity Manager.<span
! style='mso-spacerun:yes'>  </span>The AFS Provider will search for a subkey
! that matches the realm of the identity.<span style='mso-spacerun:yes'> 
! </span>If such a key exists, its values will be used to populate the AFS
! configuration for the identity.</p>
! 
! <h3><a name="_Toc190064198">Regkey</a><span class=GramE><span style='mso-bookmark:
! _Toc190064198'>:</span></span><span style='mso-bookmark:_Toc190064198'><br>
! [HKLM\SOFTWARE\OpenAFS\Client\Realms\<i style='mso-bidi-font-style:normal'>”Realm
! Name”</i>]</span></h3>
! 
! <p class=MsoBodyText>In addition to the optional values, this key contains one
! subkey for each cell that is to be added to the AFS Provider
! configuration.<span style='mso-spacerun:yes'>  </span></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;mso-yfti-lastrow:yes;
!   height:103.7pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
!   height:103.7pt'>
!   <h5><a name="_Toc190064199"></a><a name="_Toc152605202"></a><a
    name="_Toc115416252"></a><a name="_Toc139993244"></a><a name="_Toc126872321"></a><span
!   style='mso-bookmark:_Toc190064199'><span style='mso-bookmark:_Toc152605202'><span
!   style='mso-bookmark:_Toc115416252'>Value: </span></span></span><span
!   style='mso-bookmark:_Toc190064199'><span style='font-style:normal;mso-bidi-font-style:
!   italic'>AFSEnabled</span></span></h5>
!   <p class=MsoBodyText>Type: REG_DWORD<br>
!   Default: 0x01</p>
!   <p class=MsoBodyText>This key is used to specify whether the new identity
!   should be configured to obtain AFS credentials.<span
!   style='mso-spacerun:yes'>  </span>In general, it is only specified when
!   disabling the acquisition of AFS credentials is desired.<span
!   style='mso-spacerun:yes'>  </span>The default is to obtain AFS credentials.</p>
    </td>
   </tr>
  </table>
  
! <h3><a name="_Toc152605203"></a><a name="_Toc190064200"></a><a
  name="_Toc139993245"></a><a name="_Toc126872322"></a><a name="_Toc115416253"></a><a
  name="_Regkey:_[HKLM\SOFTWARE\OpenAFS\Clie_2"></a><span style='mso-bookmark:
! _Toc152605203'><span style='mso-bookmark:_Toc190064200'>Regkey<span
! class=GramE>:</span><br>
! [HKLM\SOFTWARE\OpenAFS\Client\Realms\<i style='mso-bidi-font-style:normal'>”Realm
! Name”</i>\<i style='mso-bidi-font-style:normal'>”Cell Name”</i>]</span></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:160.7pt'>
!   <td width=594 valign=top style='width:445.2pt;padding:0pt 5.4pt 0pt 5.4pt;
!   height:160.7pt'>
!   <h5><span style='mso-bookmark:_Toc152605203'><a name="_Toc190064201">Value:</a></span><span
!   style='mso-bookmark:_Toc152605203'><span style='mso-bookmark:_Toc190064201'><span
!   style='font-style:normal;mso-bidi-font-style:italic'> MethodName</span></span></span><span
!   style='mso-bookmark:_Toc152605203'><span style='font-style:normal;mso-bidi-font-style:
!   italic'><o:p></o:p></span></span></h5>
!   <p class=MsoBodyText><span style='mso-bookmark:_Toc152605203'>Type: REG_SZ<br>
!   Default: &lt;none&gt;</span></p>
!   <p class=MsoBodyText><span style='mso-bookmark:_Toc152605203'>This key is
!   used to specify the token acquisition method to be used.<span
!   style='mso-spacerun:yes'>  </span>When unspecified, the AFS provider will
!   automatically try Kerberos v5 and then Kerberos v5 (if available).<span
!   style='mso-spacerun:yes'>  </span>As of this writing valid method names
!   include “Auto”, “Kerberos5”, “Kerberos524”, <span class=GramE>“</span>Kerberos4”.</span></p>
!   <p class=MsoBodyText><span style='mso-bookmark:_Toc152605203'>Note:
!   Kerberos524 and Kerberos4 cannot be used with 64-bit Kerberos for Windows.</span></p>
!   </td>
!   <span style='mso-bookmark:_Toc152605203'></span>
!  </tr>
!  <tr style='mso-yfti-irow:1;mso-yfti-lastrow:yes;height:128.35pt'>
!   <td width=594 valign=top style='width:445.2pt;padding:0pt 5.4pt 0pt 5.4pt;
!   height:128.35pt'>
!   <h5><span style='mso-bookmark:_Toc152605203'><a name="_Toc190064202">Value:</a></span><span
!   style='mso-bookmark:_Toc152605203'><span style='mso-bookmark:_Toc190064202'><span
!   style='font-style:normal;mso-bidi-font-style:italic'> Realm</span></span></span><span
!   style='mso-bookmark:_Toc152605203'><span style='font-style:normal;mso-bidi-font-style:
!   italic'><o:p></o:p></span></span></h5>
!   <p class=MsoBodyText><span style='mso-bookmark:_Toc152605203'>Type: REG_SZ<br>
!   Default: &lt;none&gt;</span></p>
!   <p class=MsoBodyText><span style='mso-bookmark:_Toc152605203'>This key is
!   used to specify the realm to be used when acquiring AFS tokens.<span
!   style='mso-spacerun:yes'>  </span>If not specified, the realm will be
!   determined by performing a domain to realm mapping on the domain of a random
!   volume location database server for the cell.</span></p>
!   </td>
!   <span style='mso-bookmark:_Toc152605203'></span>
!  </tr>
! </table>
! 
! <h3><span style='mso-bookmark:_Toc152605203'><a name="_Toc190064203">Regkey</a><span
! class=GramE><span style='mso-bookmark:_Toc190064203'>:</span></span><span
! style='mso-bookmark:_Toc190064203'><br>
! [HKLM\SOFTWARE\OpenAFS\Client\Submounts]</span></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><span style='mso-bookmark:_Toc152605203'><a name="_Toc190064204">Value:
!   &quot;submount name&quot;</a></span></h5>
!   <p class=MsoBodyText><span style='mso-bookmark:_Toc152605203'>Type:
!   REG_EXPAND_SZ<br>
!   Default: &lt;none&gt;</span></p>
!   <p class=MsoBodyText><span style='mso-bookmark:_Toc152605203'>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.</span></p>
!   <p class=MsoBodyText><span style='mso-bookmark:_Toc152605203'>These values
!   used to be stored in afsdsbmt.ini</span></p>
!   <p class=MsoBodyText><span style='mso-bookmark:_Toc152605203'>NOTE: Submounts
!   should no longer be used with OpenAFS. Use the Windows Explorer to create
!   drive mappings to AFS UNC paths instead of using the AFS Submount mechanism.</span></p>
!   </td>
!   <span style='mso-bookmark:_Toc152605203'></span>
!  </tr>
! </table>
! 
! <h3><span style='mso-bookmark:_Toc152605203'><a name="_Toc190064205">Regkey</a><span
! class=GramE><span style='mso-bookmark:_Toc190064205'>:</span></span><span
! style='mso-bookmark:_Toc190064205'><br>
  [HKLM\SOFTWARE\OpenAFS\Client\Server Preferences\VLDB]</span></span></h3>
  
  <table class=MsoNormalTable border=1 cellspacing=3 cellpadding=0
***************
*** 5292,5300 ****
    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="_Toc184788922"></a><a name="_Toc152605204"></a><a
    name="_Toc115416254"></a><a name="_Toc139993246"></a><a name="_Toc126872323"></a><span
!   style='mso-bookmark:_Toc184788922'><span style='mso-bookmark:_Toc152605204'><span
    style='mso-bookmark:_Toc115416254'>Value: &quot;hostname or ip address&quot;</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: &lt;none&gt;</p>
--- 5468,5476 ----
    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="_Toc190064206"></a><a name="_Toc152605204"></a><a
    name="_Toc115416254"></a><a name="_Toc139993246"></a><a name="_Toc126872323"></a><span
!   style='mso-bookmark:_Toc190064206'><span style='mso-bookmark:_Toc152605204'><span
    style='mso-bookmark:_Toc115416254'>Value: &quot;hostname or ip address&quot;</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: &lt;none&gt;</p>
***************
*** 5307,5315 ****
   </tr>
  </table>
  
! <h3><a name="_Toc184788923"></a><a name="_Toc152605205"></a><a
  name="_Toc115416255"></a><a name="_Toc139993247"></a><a name="_Toc126872324"></a><span
! style='mso-bookmark:_Toc184788923'><span style='mso-bookmark:_Toc152605205'><span
  style='mso-bookmark:_Toc115416255'>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client\Server Preferences\File]</span></span></span></h3>
  
--- 5483,5491 ----
   </tr>
  </table>
  
! <h3><a name="_Toc190064207"></a><a name="_Toc152605205"></a><a
  name="_Toc115416255"></a><a name="_Toc139993247"></a><a name="_Toc126872324"></a><span
! style='mso-bookmark:_Toc190064207'><span style='mso-bookmark:_Toc152605205'><span
  style='mso-bookmark:_Toc115416255'>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client\Server Preferences\File]</span></span></span></h3>
  
***************
*** 5319,5327 ****
    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="_Toc184788924"></a><a name="_Toc152605206"></a><a
    name="_Toc115416256"></a><a name="_Toc139993248"></a><a name="_Toc126872325"></a><span
!   style='mso-bookmark:_Toc184788924'><span style='mso-bookmark:_Toc152605206'><span
    style='mso-bookmark:_Toc115416256'>Value: &quot;hostname or ip address&quot;</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: &lt;none&gt;</p>
--- 5495,5503 ----
    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="_Toc190064208"></a><a name="_Toc152605206"></a><a
    name="_Toc115416256"></a><a name="_Toc139993248"></a><a name="_Toc126872325"></a><span
!   style='mso-bookmark:_Toc190064208'><span style='mso-bookmark:_Toc152605206'><span
    style='mso-bookmark:_Toc115416256'>Value: &quot;hostname or ip address&quot;</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: &lt;none&gt;</p>
***************
*** 5334,5350 ****
   </tr>
  </table>
  
! <h2><a name="_Toc184788925"></a><a name="_Toc152605207"></a><a
  name="_Toc115416257"></a><a name="_Toc139993249"></a><a name="_Toc126872326"></a><a
! name="_Toc115417105"></a><span style='mso-bookmark:_Toc184788925'><span
  style='mso-bookmark:_Toc152605207'><span style='mso-bookmark:_Toc115416257'>A.2.
  Integrated Logon Network provider parameters</span></span></span></h2>
  
  <p class=MsoBodyText>Affects the network provider (afslogon.dll).</p>
  
! <h3><a name="_Toc184788926"></a><a name="_Toc152605208"></a><a
  name="_Toc115416258"></a><a name="_Toc139993250"></a><a name="_Toc126872327"></a><span
! style='mso-bookmark:_Toc184788926'><span style='mso-bookmark:_Toc152605208'><span
  style='mso-bookmark:_Toc115416258'>Regkey:
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</span></span></span></h3>
  
--- 5510,5526 ----
   </tr>
  </table>
  
! <h2><a name="_Toc190064209"></a><a name="_Toc152605207"></a><a
  name="_Toc115416257"></a><a name="_Toc139993249"></a><a name="_Toc126872326"></a><a
! name="_Toc115417105"></a><span style='mso-bookmark:_Toc190064209'><span
  style='mso-bookmark:_Toc152605207'><span style='mso-bookmark:_Toc115416257'>A.2.
  Integrated Logon Network provider parameters</span></span></span></h2>
  
  <p class=MsoBodyText>Affects the network provider (afslogon.dll).</p>
  
! <h3><a name="_Toc190064210"></a><a name="_Toc152605208"></a><a
  name="_Toc115416258"></a><a name="_Toc139993250"></a><a name="_Toc126872327"></a><span
! style='mso-bookmark:_Toc190064210'><span style='mso-bookmark:_Toc152605208'><span
  style='mso-bookmark:_Toc115416258'>Regkey:
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</span></span></span></h3>
  
***************
*** 5354,5362 ****
    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="_Toc184788927"></a><a name="_Toc152605209"></a><a
    name="_Toc115416259"></a><a name="_Toc139993251"></a><a name="_Toc126872328"></a><span
!   style='mso-bookmark:_Toc184788927'><span style='mso-bookmark:_Toc152605209'><span
    style='mso-bookmark:_Toc115416259'>Value: FailLoginsSilently</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 0</p>
--- 5530,5538 ----
    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="_Toc190064211"></a><a name="_Toc152605209"></a><a
    name="_Toc115416259"></a><a name="_Toc139993251"></a><a name="_Toc126872328"></a><span
!   style='mso-bookmark:_Toc190064211'><span style='mso-bookmark:_Toc152605209'><span
    style='mso-bookmark:_Toc115416259'>Value: FailLoginsSilently</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 0</p>
***************
*** 5365,5373 ****
   </tr>
  </table>
  
! <h3><a name="_Toc184788928"></a><a name="_Toc152605210"></a><a
  name="_Toc115416260"></a><a name="_Toc139993252"></a><a name="_Toc126872329"></a><span
! style='mso-bookmark:_Toc184788928'><span style='mso-bookmark:_Toc152605210'><span
  style='mso-bookmark:_Toc115416260'>Regkey:<br>
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</span></span></span></h3>
  
--- 5541,5549 ----
   </tr>
  </table>
  
! <h3><a name="_Toc190064212"></a><a name="_Toc152605210"></a><a
  name="_Toc115416260"></a><a name="_Toc139993252"></a><a name="_Toc126872329"></a><span
! style='mso-bookmark:_Toc190064212'><span style='mso-bookmark:_Toc152605210'><span
  style='mso-bookmark:_Toc115416260'>Regkey:<br>
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</span></span></span></h3>
  
***************
*** 5376,5384 ****
   <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="_Toc184788929"></a><a name="_Toc152605211"></a><a
    name="_Toc115416261"></a><a name="_Toc139993253"></a><a name="_Toc126872330"></a><span
!   style='mso-bookmark:_Toc184788929'><span style='mso-bookmark:_Toc152605211'><span
    style='mso-bookmark:_Toc115416261'>Value: NoWarnings</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 0</p>
--- 5552,5560 ----
   <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="_Toc190064213"></a><a name="_Toc152605211"></a><a
    name="_Toc115416261"></a><a name="_Toc139993253"></a><a name="_Toc126872330"></a><span
!   style='mso-bookmark:_Toc190064213'><span style='mso-bookmark:_Toc152605211'><span
    style='mso-bookmark:_Toc115416261'>Value: NoWarnings</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 0</p>
***************
*** 5388,5396 ****
   <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="_Toc184788930"></a><a name="_Toc152605212"></a><a
    name="_Toc115416262"></a><a name="_Toc139993254"></a><a name="_Toc126872331"></a><span
!   style='mso-bookmark:_Toc184788930'><span style='mso-bookmark:_Toc152605212'><span
    style='mso-bookmark:_Toc115416262'>Value: AuthentProviderPath</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: %WINDIR%\SYSTEM32\afslogon.dll</p>
--- 5564,5572 ----
   <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="_Toc190064214"></a><a name="_Toc152605212"></a><a
    name="_Toc115416262"></a><a name="_Toc139993254"></a><a name="_Toc126872331"></a><span
!   style='mso-bookmark:_Toc190064214'><span style='mso-bookmark:_Toc152605212'><span
    style='mso-bookmark:_Toc115416262'>Value: AuthentProviderPath</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: %WINDIR%\SYSTEM32\afslogon.dll</p>
***************
*** 5401,5409 ****
   <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="_Toc184788931"></a><a name="_Toc152605213"></a><a
    name="_Toc115416263"></a><a name="_Toc139993255"></a><a name="_Toc126872332"></a><span
!   style='mso-bookmark:_Toc184788931'><span style='mso-bookmark:_Toc152605213'><span
    style='mso-bookmark:_Toc115416263'>Value: Class</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    NSIS: 0x02</p>
--- 5577,5585 ----
   <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="_Toc190064215"></a><a name="_Toc152605213"></a><a
    name="_Toc115416263"></a><a name="_Toc139993255"></a><a name="_Toc126872332"></a><span
!   style='mso-bookmark:_Toc190064215'><span style='mso-bookmark:_Toc152605213'><span
    style='mso-bookmark:_Toc115416263'>Value: Class</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    NSIS: 0x02</p>
***************
*** 5413,5421 ****
   <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="_Toc184788932"></a><a name="_Toc152605214"></a><a
    name="_Toc115416264"></a><a name="_Toc139993256"></a><a name="_Toc126872333"></a><span
!   style='mso-bookmark:_Toc184788932'><span style='mso-bookmark:_Toc152605214'><span
    style='mso-bookmark:_Toc115416264'>Value: DependOnGroup</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_MULTI_SZ<br>
    NSIS: PNP_TDI</p>
--- 5589,5597 ----
   <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="_Toc190064216"></a><a name="_Toc152605214"></a><a
    name="_Toc115416264"></a><a name="_Toc139993256"></a><a name="_Toc126872333"></a><span
!   style='mso-bookmark:_Toc190064216'><span style='mso-bookmark:_Toc152605214'><span
    style='mso-bookmark:_Toc115416264'>Value: DependOnGroup</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_MULTI_SZ<br>
    NSIS: PNP_TDI</p>
***************
*** 5428,5436 ****
   <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="_Toc184788933"></a><a name="_Toc152605215"></a><a
    name="_Toc115416265"></a><a name="_Toc139993257"></a><a name="_Toc126872334"></a><span
!   style='mso-bookmark:_Toc184788933'><span style='mso-bookmark:_Toc152605215'><span
    style='mso-bookmark:_Toc115416265'>Value: DependOnService</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_MULTI_SZ<br>
    NSIS: Tcpip NETBIOS RpcSs</p>
--- 5604,5612 ----
   <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="_Toc190064217"></a><a name="_Toc152605215"></a><a
    name="_Toc115416265"></a><a name="_Toc139993257"></a><a name="_Toc126872334"></a><span
!   style='mso-bookmark:_Toc190064217'><span style='mso-bookmark:_Toc152605215'><span
    style='mso-bookmark:_Toc115416265'>Value: DependOnService</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_MULTI_SZ<br>
    NSIS: Tcpip NETBIOS RpcSs</p>
***************
*** 5442,5450 ****
   <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="_Toc184788934"></a><a name="_Toc152605216"></a><a
    name="_Toc115416266"></a><a name="_Toc139993258"></a><a name="_Toc126872335"></a><span
!   style='mso-bookmark:_Toc184788934'><span style='mso-bookmark:_Toc152605216'><span
    style='mso-bookmark:_Toc115416266'>Value: Name</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: &quot;OpenAFSDaemon&quot;</p>
--- 5618,5626 ----
   <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="_Toc190064218"></a><a name="_Toc152605216"></a><a
    name="_Toc115416266"></a><a name="_Toc139993258"></a><a name="_Toc126872335"></a><span
!   style='mso-bookmark:_Toc190064218'><span style='mso-bookmark:_Toc152605216'><span
    style='mso-bookmark:_Toc115416266'>Value: Name</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: &quot;OpenAFSDaemon&quot;</p>
***************
*** 5454,5462 ****
   <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="_Toc184788935"></a><a name="_Toc152605217"></a><a
    name="_Toc115416267"></a><a name="_Toc139993259"></a><a name="_Toc126872336"></a><span
!   style='mso-bookmark:_Toc184788935'><span style='mso-bookmark:_Toc152605217'><span
    style='mso-bookmark:_Toc115416267'>Value: ProviderPath</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: %WINDIR%\SYSTEM32\afslogon.dll</p>
--- 5630,5638 ----
   <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="_Toc190064219"></a><a name="_Toc152605217"></a><a
    name="_Toc115416267"></a><a name="_Toc139993259"></a><a name="_Toc126872336"></a><span
!   style='mso-bookmark:_Toc190064219'><span style='mso-bookmark:_Toc152605217'><span
    style='mso-bookmark:_Toc115416267'>Value: ProviderPath</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: %WINDIR%\SYSTEM32\afslogon.dll</p>
***************
*** 5465,5474 ****
   </tr>
  </table>
  
! <h2><a name="_Toc184788936"></a><a name="_Toc152605218"></a><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><span
! style='mso-bookmark:_Toc184788936'><span style='mso-bookmark:_Toc152605218'>A.2.1
  Domain specific configuration keys for the Network Provider</span></span></h2>
  
  <p class=MsoBodyText>The network provider can be configured to have different
--- 5641,5650 ----
   </tr>
  </table>
  
! <h2><a name="_Toc190064220"></a><a name="_Toc152605218"></a><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><span
! style='mso-bookmark:_Toc190064220'><span style='mso-bookmark:_Toc152605218'>A.2.1
  Domain specific configuration keys for the Network Provider</span></span></h2>
  
  <p class=MsoBodyText>The network provider can be configured to have different
***************
*** 5481,5518 ****
  
  <p class=MsoBodyText>Domain specific registry keys are:</p>
  
! <h3><a name="_Toc184788937"></a><a name="_Toc152605219"></a><a
  name="_Toc115416269"></a><a name="_Toc139993261"></a><a name="_Toc126872338"></a><span
! style='mso-bookmark:_Toc184788937'><span style='mso-bookmark:_Toc152605219'><span
  style='mso-bookmark:_Toc115416269'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</span></span></span></h3>
  
  <p class=MsoBodyText>&nbsp; (NP key)</p>
  
! <h3><a name="_Toc184788938"></a><a name="_Toc152605220"></a><a
  name="_Toc115416270"></a><a name="_Toc139993262"></a><a name="_Toc126872339"></a><span
! style='mso-bookmark:_Toc184788938'><span style='mso-bookmark:_Toc152605220'><span
  style='mso-bookmark:_Toc115416270'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain]</span></span></span></h3>
  
  <p class=MsoBodyText>&nbsp; (Domains key)</p>
  
! <h3><a name="_Toc184788939"></a><a name="_Toc152605221"></a><a
  name="_Toc115416271"></a><a name="_Toc139993263"></a><a name="_Toc126872340"></a><span
! style='mso-bookmark:_Toc184788939'><span style='mso-bookmark:_Toc152605221'><span
  style='mso-bookmark:_Toc115416271'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\&quot;domain
  name&quot;]</span></span></span></h3>
  
  <p class=MsoBodyText>&nbsp; (Specific domain key. One per domain.)</p>
  
! <h3><a name="_Toc184788940"></a><a name="_Toc152605222"></a><a
  name="_Toc115416272"></a><a name="_Toc139993264"></a><a name="_Toc126872341"></a><span
! style='mso-bookmark:_Toc184788940'><span style='mso-bookmark:_Toc152605222'><span
  style='mso-bookmark:_Toc115416272'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST]</span></span></span></h3>
  
  <p class=MsoBodyText>&nbsp; (Localhost key)</p>
  
! <h3><a name="_Toc184788941"></a><a name="_Toc152605223"></a><a
  name="_Toc115416273"></a><a name="_Toc139993265"></a><a name="_Toc126872342"></a><span
! style='mso-bookmark:_Toc184788941'><span style='mso-bookmark:_Toc152605223'><span
  style='mso-bookmark:_Toc115416273'>Example:</span></span></span></h3>
  
  <p class=preformattedtext>&nbsp;HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider</p>
--- 5657,5694 ----
  
  <p class=MsoBodyText>Domain specific registry keys are:</p>
  
! <h3><a name="_Toc190064221"></a><a name="_Toc152605219"></a><a
  name="_Toc115416269"></a><a name="_Toc139993261"></a><a name="_Toc126872338"></a><span
! style='mso-bookmark:_Toc190064221'><span style='mso-bookmark:_Toc152605219'><span
  style='mso-bookmark:_Toc115416269'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</span></span></span></h3>
  
  <p class=MsoBodyText>&nbsp; (NP key)</p>
  
! <h3><a name="_Toc190064222"></a><a name="_Toc152605220"></a><a
  name="_Toc115416270"></a><a name="_Toc139993262"></a><a name="_Toc126872339"></a><span
! style='mso-bookmark:_Toc190064222'><span style='mso-bookmark:_Toc152605220'><span
  style='mso-bookmark:_Toc115416270'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain]</span></span></span></h3>
  
  <p class=MsoBodyText>&nbsp; (Domains key)</p>
  
! <h3><a name="_Toc190064223"></a><a name="_Toc152605221"></a><a
  name="_Toc115416271"></a><a name="_Toc139993263"></a><a name="_Toc126872340"></a><span
! style='mso-bookmark:_Toc190064223'><span style='mso-bookmark:_Toc152605221'><span
  style='mso-bookmark:_Toc115416271'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\&quot;domain
  name&quot;]</span></span></span></h3>
  
  <p class=MsoBodyText>&nbsp; (Specific domain key. One per domain.)</p>
  
! <h3><a name="_Toc190064224"></a><a name="_Toc152605222"></a><a
  name="_Toc115416272"></a><a name="_Toc139993264"></a><a name="_Toc126872341"></a><span
! style='mso-bookmark:_Toc190064224'><span style='mso-bookmark:_Toc152605222'><span
  style='mso-bookmark:_Toc115416272'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST]</span></span></span></h3>
  
  <p class=MsoBodyText>&nbsp; (Localhost key)</p>
  
! <h3><a name="_Toc190064225"></a><a name="_Toc152605223"></a><a
  name="_Toc115416273"></a><a name="_Toc139993265"></a><a name="_Toc126872342"></a><span
! style='mso-bookmark:_Toc190064225'><span style='mso-bookmark:_Toc152605223'><span
  style='mso-bookmark:_Toc115416273'>Example:</span></span></span></h3>
  
  <p class=preformattedtext>&nbsp;HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider</p>
***************
*** 5531,5544 ****
  values described in 2.1.1.&nbsp; The effective values are chosen as described
  in 2.1.2.</p>
  
! <h3><a name="_Toc184788942"></a><a name="_Toc152605224"></a><a
  name="_Toc115416274"></a><a name="_Toc139993266"></a><a name="_Toc126872343"></a><span
! style='mso-bookmark:_Toc184788942'><span style='mso-bookmark:_Toc152605224'><span
  style='mso-bookmark:_Toc115416274'>A.2.1.1 Domain specific configuration values</span></span></span></h3>
  
! <h4><a name="_Toc184788943"></a><a name="_Toc152605225"></a><a
  name="_Toc115416275"></a><a name="_Toc139993267"></a><a name="_Toc126872344"></a><span
! style='mso-bookmark:_Toc184788943'><span style='mso-bookmark:_Toc152605225'><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
--- 5707,5720 ----
  values described in 2.1.1.&nbsp; The effective values are chosen as described
  in 2.1.2.</p>
  
! <h3><a name="_Toc190064226"></a><a name="_Toc152605224"></a><a
  name="_Toc115416274"></a><a name="_Toc139993266"></a><a name="_Toc126872343"></a><span
! style='mso-bookmark:_Toc190064226'><span style='mso-bookmark:_Toc152605224'><span
  style='mso-bookmark:_Toc115416274'>A.2.1.1 Domain specific configuration values</span></span></span></h3>
  
! <h4><a name="_Toc190064227"></a><a name="_Toc152605225"></a><a
  name="_Toc115416275"></a><a name="_Toc139993267"></a><a name="_Toc126872344"></a><span
! style='mso-bookmark:_Toc190064227'><span style='mso-bookmark:_Toc152605225'><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
***************
*** 5550,5558 ****
   <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="_Toc184788944"></a><a name="_Toc152605226"></a><a
    name="_Toc139993268"></a><a name="_Toc126872345"></a><a name="_Toc115416276"></a><a
!   name="_Value___:_LogonOptions"></a><span style='mso-bookmark:_Toc184788944'><span
    style='mso-bookmark:_Toc152605226'>Value: LogonOptions</span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 0x01</p>
--- 5726,5734 ----
   <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="_Toc190064228"></a><a name="_Toc152605226"></a><a
    name="_Toc139993268"></a><a name="_Toc126872345"></a><a name="_Toc115416276"></a><a
!   name="_Value___:_LogonOptions"></a><span style='mso-bookmark:_Toc190064228'><span
    style='mso-bookmark:_Toc152605226'>Value: LogonOptions</span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 0x01</p>
***************
*** 5572,5580 ****
   <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="_Toc184788945"></a><a name="_Toc152605227"></a><a
    name="_Toc115416277"></a><a name="_Toc139993269"></a><a name="_Toc126872346"></a><span
!   style='mso-bookmark:_Toc184788945'><span style='mso-bookmark:_Toc152605227'><span
    style='mso-bookmark:_Toc115416277'>Value: FailLoginsSilentl</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD (1|0)<br>
    Default: 0<br>
--- 5748,5756 ----
   <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="_Toc190064229"></a><a name="_Toc152605227"></a><a
    name="_Toc115416277"></a><a name="_Toc139993269"></a><a name="_Toc126872346"></a><span
!   style='mso-bookmark:_Toc190064229'><span style='mso-bookmark:_Toc152605227'><span
    style='mso-bookmark:_Toc115416277'>Value: FailLoginsSilentl</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD (1|0)<br>
    Default: 0<br>
***************
*** 5586,5594 ****
   <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="_Toc184788946"></a><a name="_Toc152605228"></a><a
    name="_Toc115416278"></a><a name="_Toc139993270"></a><a name="_Toc126872347"></a><span
!   style='mso-bookmark:_Toc184788946'><span style='mso-bookmark:_Toc152605228'><span
    style='mso-bookmark:_Toc115416278'>Value: LogonScript</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ or REG_EXPAND_SZ<br>
    Default: (null)<br>
--- 5762,5770 ----
   <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="_Toc190064230"></a><a name="_Toc152605228"></a><a
    name="_Toc115416278"></a><a name="_Toc139993270"></a><a name="_Toc126872347"></a><span
!   style='mso-bookmark:_Toc190064230'><span style='mso-bookmark:_Toc152605228'><span
    style='mso-bookmark:_Toc115416278'>Value: LogonScript</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ or REG_EXPAND_SZ<br>
    Default: (null)<br>
***************
*** 5605,5613 ****
   <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="_Toc184788947"></a><a name="_Toc152605229"></a><a
    name="_Toc115416279"></a><a name="_Toc139993271"></a><a name="_Toc126872348"></a><span
!   style='mso-bookmark:_Toc184788947'><span style='mso-bookmark:_Toc152605229'><span
    style='mso-bookmark:_Toc115416279'>Value: LoginRetryInterval</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 30<br>
--- 5781,5789 ----
   <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="_Toc190064231"></a><a name="_Toc152605229"></a><a
    name="_Toc115416279"></a><a name="_Toc139993271"></a><a name="_Toc126872348"></a><span
!   style='mso-bookmark:_Toc190064231'><span style='mso-bookmark:_Toc152605229'><span
    style='mso-bookmark:_Toc115416279'>Value: LoginRetryInterval</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 30<br>
***************
*** 5621,5629 ****
   <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="_Toc184788948"></a><a name="_Toc152605230"></a><a
    name="_Toc115416280"></a><a name="_Toc139993272"></a><a name="_Toc126872349"></a><span
!   style='mso-bookmark:_Toc184788948'><span style='mso-bookmark:_Toc152605230'><span
    style='mso-bookmark:_Toc115416280'>Value: LoginSleepInterval</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 5<br>
--- 5797,5805 ----
   <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="_Toc190064232"></a><a name="_Toc152605230"></a><a
    name="_Toc115416280"></a><a name="_Toc139993272"></a><a name="_Toc126872349"></a><span
!   style='mso-bookmark:_Toc190064232'><span style='mso-bookmark:_Toc152605230'><span
    style='mso-bookmark:_Toc115416280'>Value: LoginSleepInterval</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 5<br>
***************
*** 5634,5641 ****
   <tr style='mso-yfti-irow:5;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="_Toc184788949"></a><a name="_Value:_Realm"></a><span
!   style='mso-bookmark:_Toc184788949'>Value: Realm</span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: &lt;not set&gt;</p>
    <p class=MsoBodyText>When Kerberos v5 is being used, Realm specifies the
--- 5810,5817 ----
   <tr style='mso-yfti-irow:5;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="_Toc190064233"></a><a name="_Value:_Realm"></a><span
!   style='mso-bookmark:_Toc190064233'>Value: Realm</span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: &lt;not set&gt;</p>
    <p class=MsoBodyText>When Kerberos v5 is being used, Realm specifies the
***************
*** 5647,5655 ****
   <tr style='mso-yfti-irow:6;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="_Toc184788950"></a><a name="_Toc152605231"></a><a
    name="_Toc139993273"></a><a name="_Toc126872350"></a><a name="_Toc115416281"></a><a
!   name="_Value:_TheseCells"></a><span style='mso-bookmark:_Toc184788950'><span
    style='mso-bookmark:_Toc152605231'>Value: TheseCells</span></span></h5>
    <p class=MsoBodyText>Type: REG_MULTI_SZ<br>
    NSIS: &lt;not set&gt;</p>
--- 5823,5831 ----
   <tr style='mso-yfti-irow:6;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="_Toc190064234"></a><a name="_Toc152605231"></a><a
    name="_Toc139993273"></a><a name="_Toc126872350"></a><a name="_Toc115416281"></a><a
!   name="_Value:_TheseCells"></a><span style='mso-bookmark:_Toc190064234'><span
    style='mso-bookmark:_Toc152605231'>Value: TheseCells</span></span></h5>
    <p class=MsoBodyText>Type: REG_MULTI_SZ<br>
    NSIS: &lt;not set&gt;</p>
***************
*** 5660,5668 ****
   </tr>
  </table>
  
! <h3><a name="_Toc184788951"></a><a name="_Toc152605232"></a><a
  name="_Toc115416282"></a><a name="_Toc139993274"></a><a name="_Toc126872351"></a><span
! style='mso-bookmark:_Toc184788951'><span style='mso-bookmark:_Toc152605232'><span
  style='mso-bookmark:_Toc115416282'>A.2.1.2 Selection of effective values for
  domain specific configuration</span></span></span></h3>
  
--- 5836,5844 ----
   </tr>
  </table>
  
! <h3><a name="_Toc190064235"></a><a name="_Toc152605232"></a><a
  name="_Toc115416282"></a><a name="_Toc139993274"></a><a name="_Toc126872351"></a><span
! style='mso-bookmark:_Toc190064235'><span style='mso-bookmark:_Toc152605232'><span
  style='mso-bookmark:_Toc115416282'>A.2.1.2 Selection of effective values for
  domain specific configuration</span></span></span></h3>
  
***************
*** 5692,5712 ****
  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="_Toc184788952"></a><a name="_Toc152605233"></a><a
  name="_Toc115416283"></a><a name="_Toc139993275"></a><a name="_Toc126872352"></a><span
! style='mso-bookmark:_Toc184788952'><span style='mso-bookmark:_Toc152605233'><span
  style='mso-bookmark:_Toc115416283'>A.2.1.3 Exceptions to A.2.1.2</span></span></span></h3>
  
  <p class=MsoBodyText>To retain backwards compatibility, the following
  exceptions are made to 2.1.2.</p>
  
! <h4><a name="_Toc184788953"></a><a name="_Toc152605234"></a><a
  name="_Toc115416284"></a><a name="_Toc139993276"></a><a name="_Toc126872353"></a><span
! style='mso-bookmark:_Toc184788953'><span style='mso-bookmark:_Toc152605234'><span
  style='mso-bookmark:_Toc115416284'>2.1.3.1 'FailLoginsSilently'</span></span></span></h4>
  
  <p class=MsoBodyText>Historically, the 'FailLoginsSilently' value was in
--- 5868,5888 ----
  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="_Toc190064236"></a><a name="_Toc152605233"></a><a
  name="_Toc115416283"></a><a name="_Toc139993275"></a><a name="_Toc126872352"></a><span
! style='mso-bookmark:_Toc190064236'><span style='mso-bookmark:_Toc152605233'><span
  style='mso-bookmark:_Toc115416283'>A.2.1.3 Exceptions to A.2.1.2</span></span></span></h3>
  
  <p class=MsoBodyText>To retain backwards compatibility, the following
  exceptions are made to 2.1.2.</p>
  
! <h4><a name="_Toc190064237"></a><a name="_Toc152605234"></a><a
  name="_Toc115416284"></a><a name="_Toc139993276"></a><a name="_Toc126872353"></a><span
! style='mso-bookmark:_Toc190064237'><span style='mso-bookmark:_Toc152605234'><span
  style='mso-bookmark:_Toc115416284'>2.1.3.1 'FailLoginsSilently'</span></span></span></h4>
  
  <p class=MsoBodyText>Historically, the 'FailLoginsSilently' value was in
***************
*** 5715,5723 ****
  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="_Toc184788954"></a><a name="_Toc152605235"></a><a
  name="_Toc115416285"></a><a name="_Toc139993277"></a><a name="_Toc126872354"></a><span
! style='mso-bookmark:_Toc184788954'><span style='mso-bookmark:_Toc152605235'><span
  style='mso-bookmark:_Toc115416285'>2.1.3.2 'LogonScript'</span></span></span></h4>
  
  <p class=MsoBodyText>If a 'LogonScript' is not specified in the specific domain
--- 5891,5899 ----
  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="_Toc190064238"></a><a name="_Toc152605235"></a><a
  name="_Toc115416285"></a><a name="_Toc139993277"></a><a name="_Toc126872354"></a><span
! style='mso-bookmark:_Toc190064238'><span style='mso-bookmark:_Toc152605235'><span
  style='mso-bookmark:_Toc115416285'>2.1.3.2 'LogonScript'</span></span></span></h4>
  
  <p class=MsoBodyText>If a 'LogonScript' is not specified in the specific domain
***************
*** 5727,5743 ****
  will be used regardless of the high security setting.&nbsp; Please be aware of
  this when setting this value.</p>
  
! <h2><a name="_Toc184788955"></a><a name="_Toc152605236"></a><a
  name="_Toc115416286"></a><a name="_Toc139993278"></a><a name="_Toc126872355"></a><a
! name="_Toc115417107"></a><span style='mso-bookmark:_Toc184788955'><span
  style='mso-bookmark:_Toc152605236'><span style='mso-bookmark:_Toc115416286'>A.3.
  AFS Credentials System Tray Tool parameters</span></span></span></h2>
  
  <p class=MsoBodyText>Affects the behavior of afscreds.exe</p>
  
! <h3><a name="_Toc184788956"></a><a name="_Toc152605237"></a><a
  name="_Toc115416287"></a><a name="_Toc139993279"></a><a name="_Toc126872356"></a><span
! style='mso-bookmark:_Toc184788956'><span style='mso-bookmark:_Toc152605237'><span
  style='mso-bookmark:_Toc115416287'>Regkey:<br>
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</span></span></span></h3>
  
--- 5903,5919 ----
  will be used regardless of the high security setting.&nbsp; Please be aware of
  this when setting this value.</p>
  
! <h2><a name="_Toc190064239"></a><a name="_Toc152605236"></a><a
  name="_Toc115416286"></a><a name="_Toc139993278"></a><a name="_Toc126872355"></a><a
! name="_Toc115417107"></a><span style='mso-bookmark:_Toc190064239'><span
  style='mso-bookmark:_Toc152605236'><span style='mso-bookmark:_Toc115416286'>A.3.
  AFS Credentials System Tray Tool parameters</span></span></span></h2>
  
  <p class=MsoBodyText>Affects the behavior of afscreds.exe</p>
  
! <h3><a name="_Toc190064240"></a><a name="_Toc152605237"></a><a
  name="_Toc115416287"></a><a name="_Toc139993279"></a><a name="_Toc126872356"></a><span
! style='mso-bookmark:_Toc190064240'><span style='mso-bookmark:_Toc152605237'><span
  style='mso-bookmark:_Toc115416287'>Regkey:<br>
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</span></span></span></h3>
  
***************
*** 5746,5754 ****
   <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="_Toc184788957"></a><a name="_Toc152605238"></a><a
    name="_Toc115416288"></a><a name="_Toc139993280"></a><a name="_Toc126872357"></a><span
!   style='mso-bookmark:_Toc184788957'><span style='mso-bookmark:_Toc152605238'><span
    style='mso-bookmark:_Toc115416288'>Value: Gateway</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;&quot;<br>
--- 5922,5930 ----
   <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="_Toc190064241"></a><a name="_Toc152605238"></a><a
    name="_Toc115416288"></a><a name="_Toc139993280"></a><a name="_Toc126872357"></a><span
!   style='mso-bookmark:_Toc190064241'><span style='mso-bookmark:_Toc152605238'><span
    style='mso-bookmark:_Toc115416288'>Value: Gateway</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;&quot;<br>
***************
*** 5760,5768 ****
   <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="_Toc184788958"></a><a name="_Toc152605239"></a><a
    name="_Toc115416289"></a><a name="_Toc139993281"></a><a name="_Toc126872358"></a><span
!   style='mso-bookmark:_Toc184788958'><span style='mso-bookmark:_Toc152605239'><span
    style='mso-bookmark:_Toc115416289'>Value: Cell</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;<br>
--- 5936,5944 ----
   <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="_Toc190064242"></a><a name="_Toc152605239"></a><a
    name="_Toc115416289"></a><a name="_Toc139993281"></a><a name="_Toc126872358"></a><span
!   style='mso-bookmark:_Toc190064242'><span style='mso-bookmark:_Toc152605239'><span
    style='mso-bookmark:_Toc115416289'>Value: Cell</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;<br>
***************
*** 5773,5781 ****
   </tr>
  </table>
  
! <h3><a name="_Toc184788959"></a><a name="_Toc152605240"></a><a
  name="_Toc115416290"></a><a name="_Toc139993282"></a><a name="_Toc126872359"></a><span
! style='mso-bookmark:_Toc184788959'><span style='mso-bookmark:_Toc152605240'><span
  style='mso-bookmark:_Toc115416290'>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client]<br>
  [HKCU\SOFTWARE\OpenAFS\Client]</span></span></span></h3>
--- 5949,5957 ----
   </tr>
  </table>
  
! <h3><a name="_Toc190064243"></a><a name="_Toc152605240"></a><a
  name="_Toc115416290"></a><a name="_Toc139993282"></a><a name="_Toc126872359"></a><span
! style='mso-bookmark:_Toc190064243'><span style='mso-bookmark:_Toc152605240'><span
  style='mso-bookmark:_Toc115416290'>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client]<br>
  [HKCU\SOFTWARE\OpenAFS\Client]</span></span></span></h3>
***************
*** 5785,5793 ****
   <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="_Toc184788960"></a><a name="_Toc152605241"></a><a
    name="_Toc115416291"></a><a name="_Toc139993283"></a><a name="_Toc126872360"></a><span
!   style='mso-bookmark:_Toc184788960'><span style='mso-bookmark:_Toc152605241'><span
    style='mso-bookmark:_Toc115416291'>Value: ShowTrayIcon</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1<br>
--- 5961,5969 ----
   <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="_Toc190064244"></a><a name="_Toc152605241"></a><a
    name="_Toc115416291"></a><a name="_Toc139993283"></a><a name="_Toc126872360"></a><span
!   style='mso-bookmark:_Toc190064244'><span style='mso-bookmark:_Toc152605241'><span
    style='mso-bookmark:_Toc115416291'>Value: ShowTrayIcon</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1<br>
***************
*** 5804,5813 ****
   <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="_Toc184788961"></a><a name="_Toc152605242"></a><a
    name="_Toc115416292"></a><a name="_Value:_EnableKFW"></a><a name=EnableKFW></a><a
    name="_Toc139993284"></a><a name="_Toc126872361"></a><span style='mso-bookmark:
!   _Toc184788961'><span style='mso-bookmark:_Toc152605242'><span
    style='mso-bookmark:_Toc115416292'>Value: EnableKFW</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1<br>
--- 5980,5989 ----
   <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="_Toc190064245"></a><a name="_Toc152605242"></a><a
    name="_Toc115416292"></a><a name="_Value:_EnableKFW"></a><a name=EnableKFW></a><a
    name="_Toc139993284"></a><a name="_Toc126872361"></a><span style='mso-bookmark:
!   _Toc190064245'><span style='mso-bookmark:_Toc152605242'><span
    style='mso-bookmark:_Toc115416292'>Value: EnableKFW</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1<br>
***************
*** 5822,5828 ****
   <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="_Toc184788962">Value: AcceptDottedPrincipalNames</a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1<br>
    Function: KFW_accept_dotted_usernames()</p>
--- 5998,6004 ----
   <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="_Toc190064246">Value: AcceptDottedPrincipalNames</a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1<br>
    Function: KFW_accept_dotted_usernames()</p>
***************
*** 5839,5847 ****
   <tr style='mso-yfti-irow:3;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="_Toc184788963"></a><a name="_Value:_Use524"></a><a name=Use524></a><a
    name="_Toc139993285"></a><a name="_Toc126872362"></a><a
!   name="_Value___:_Use524"></a><span style='mso-bookmark:_Toc184788963'>Value:
    Use524</span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0<br>
--- 6015,6023 ----
   <tr style='mso-yfti-irow:3;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="_Toc190064247"></a><a name="_Value:_Use524"></a><a name=Use524></a><a
    name="_Toc139993285"></a><a name="_Toc126872362"></a><a
!   name="_Value___:_Use524"></a><span style='mso-bookmark:_Toc190064247'>Value:
    Use524</span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0<br>
***************
*** 5856,5864 ****
   <tr style='mso-yfti-irow:4;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="_Toc184788964"></a><a name="_Toc152605244"></a><a
    name="_Toc139993286"></a><a name="_Toc126872363"></a><a name="_Toc115416294"></a><a
!   name="_Value___:_AfscredsShortcutParams"></a><span style='mso-bookmark:_Toc184788964'><span
    style='mso-bookmark:_Toc152605244'>Value: AfscredsShortcutParams</span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;-A -M -N -Q&quot;<br>
--- 6032,6040 ----
   <tr style='mso-yfti-irow:4;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="_Toc190064248"></a><a name="_Toc152605244"></a><a
    name="_Toc139993286"></a><a name="_Toc126872363"></a><a name="_Toc115416294"></a><a
!   name="_Value___:_AfscredsShortcutParams"></a><span style='mso-bookmark:_Toc190064248'><span
    style='mso-bookmark:_Toc152605244'>Value: AfscredsShortcutParams</span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;-A -M -N -Q&quot;<br>
***************
*** 5883,5891 ****
   </tr>
  </table>
  
! <h3><a name="_Toc184788965"></a><a name="_Toc152605245"></a><a
  name="_Toc115416295"></a><a name="_Toc139993287"></a><a name="_Toc126872364"></a><span
! style='mso-bookmark:_Toc184788965'><span style='mso-bookmark:_Toc152605245'><span
  style='mso-bookmark:_Toc115416295'>Regkey:<br>
  [HKCU\SOFTWARE\OpenAFS\Client]</span></span></span></h3>
  
--- 6059,6067 ----
   </tr>
  </table>
  
! <h3><a name="_Toc190064249"></a><a name="_Toc152605245"></a><a
  name="_Toc115416295"></a><a name="_Toc139993287"></a><a name="_Toc126872364"></a><span
! style='mso-bookmark:_Toc190064249'><span style='mso-bookmark:_Toc152605245'><span
  style='mso-bookmark:_Toc115416295'>Regkey:<br>
  [HKCU\SOFTWARE\OpenAFS\Client]</span></span></span></h3>
  
***************
*** 5895,5903 ****
    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="_Toc184788966"></a><a name="_Toc152605246"></a><a
    name="_Toc115416296"></a><a name="_Toc139993288"></a><a name="_Toc126872365"></a><span
!   style='mso-bookmark:_Toc184788966'><span style='mso-bookmark:_Toc152605246'><span
    style='mso-bookmark:_Toc115416296'>Value: Authentication Cell</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;<br>
--- 6071,6079 ----
    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="_Toc190064250"></a><a name="_Toc152605246"></a><a
    name="_Toc115416296"></a><a name="_Toc139993288"></a><a name="_Toc126872365"></a><span
!   style='mso-bookmark:_Toc190064250'><span style='mso-bookmark:_Toc152605246'><span
    style='mso-bookmark:_Toc115416296'>Value: Authentication Cell</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;<br>
***************
*** 5908,5916 ****
   </tr>
  </table>
  
! <h3><a name="_Toc184788967"></a><a name="_Toc152605247"></a><a
  name="_Toc115416297"></a><a name="_Toc139993289"></a><a name="_Toc126872366"></a><span
! style='mso-bookmark:_Toc184788967'><span style='mso-bookmark:_Toc152605247'><span
  style='mso-bookmark:_Toc115416297'>Regkey:<br>
  [HKCU\SOFTWARE\OpenAFS\Client\Reminders]</span></span></span></h3>
  
--- 6084,6092 ----
   </tr>
  </table>
  
! <h3><a name="_Toc190064251"></a><a name="_Toc152605247"></a><a
  name="_Toc115416297"></a><a name="_Toc139993289"></a><a name="_Toc126872366"></a><span
! style='mso-bookmark:_Toc190064251'><span style='mso-bookmark:_Toc152605247'><span
  style='mso-bookmark:_Toc115416297'>Regkey:<br>
  [HKCU\SOFTWARE\OpenAFS\Client\Reminders]</span></span></span></h3>
  
***************
*** 5920,5928 ****
    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="_Toc184788968"></a><a name="_Toc152605248"></a><a
    name="_Toc115416298"></a><a name="_Toc139993290"></a><a name="_Toc126872367"></a><span
!   style='mso-bookmark:_Toc184788968'><span style='mso-bookmark:_Toc152605248'><span
    style='mso-bookmark:_Toc115416298'>Value: &quot;afs cell name&quot;</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: &lt;none&gt;<br>
--- 6096,6104 ----
    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="_Toc190064252"></a><a name="_Toc152605248"></a><a
    name="_Toc115416298"></a><a name="_Toc139993290"></a><a name="_Toc126872367"></a><span
!   style='mso-bookmark:_Toc190064252'><span style='mso-bookmark:_Toc152605248'><span
    style='mso-bookmark:_Toc115416298'>Value: &quot;afs cell name&quot;</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: &lt;none&gt;<br>
***************
*** 5935,5943 ****
   </tr>
  </table>
  
! <h3><a name="_Toc184788969"></a><a name="_Toc152605249"></a><a
  name="_Toc115416299"></a><a name="_Toc139993291"></a><a name="_Toc126872368"></a><span
! style='mso-bookmark:_Toc184788969'><span style='mso-bookmark:_Toc152605249'><span
  style='mso-bookmark:_Toc115416299'>Regkey:<br>
  [HKCU\SOFTWARE\OpenAFS\Client\Active Maps]</span></span></span></h3>
  
--- 6111,6119 ----
   </tr>
  </table>
  
! <h3><a name="_Toc190064253"></a><a name="_Toc152605249"></a><a
  name="_Toc115416299"></a><a name="_Toc139993291"></a><a name="_Toc126872368"></a><span
! style='mso-bookmark:_Toc190064253'><span style='mso-bookmark:_Toc152605249'><span
  style='mso-bookmark:_Toc115416299'>Regkey:<br>
  [HKCU\SOFTWARE\OpenAFS\Client\Active Maps]</span></span></span></h3>
  
***************
*** 5947,5955 ****
    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="_Toc184788970"></a><a name="_Toc152605250"></a><a
    name="_Toc115416300"></a><a name="_Toc139993292"></a><a name="_Toc126872369"></a><span
!   style='mso-bookmark:_Toc184788970'><span style='mso-bookmark:_Toc152605250'><span
    style='mso-bookmark:_Toc115416300'>Value: &quot;upper case drive letter&quot;</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: &lt;none&gt;</p>
--- 6123,6131 ----
    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="_Toc190064254"></a><a name="_Toc152605250"></a><a
    name="_Toc115416300"></a><a name="_Toc139993292"></a><a name="_Toc126872369"></a><span
!   style='mso-bookmark:_Toc190064254'><span style='mso-bookmark:_Toc152605250'><span
    style='mso-bookmark:_Toc115416300'>Value: &quot;upper case drive letter&quot;</span></span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: &lt;none&gt;</p>
***************
*** 5960,5968 ****
   </tr>
  </table>
  
! <h3><a name="_Toc184788971"></a><a name="_Toc152605251"></a><a
  name="_Toc115416301"></a><a name="_Toc139993293"></a><a name="_Toc126872370"></a><span
! style='mso-bookmark:_Toc184788971'><span style='mso-bookmark:_Toc152605251'><span
  style='mso-bookmark:_Toc115416301'>Regkey:<br>
  [HKCU\SOFTWARE\OpenAFS\Client\Mappings]</span></span></span></h3>
  
--- 6136,6144 ----
   </tr>
  </table>
  
! <h3><a name="_Toc190064255"></a><a name="_Toc152605251"></a><a
  name="_Toc115416301"></a><a name="_Toc139993293"></a><a name="_Toc126872370"></a><span
! style='mso-bookmark:_Toc190064255'><span style='mso-bookmark:_Toc152605251'><span
  style='mso-bookmark:_Toc115416301'>Regkey:<br>
  [HKCU\SOFTWARE\OpenAFS\Client\Mappings]</span></span></span></h3>
  
***************
*** 5972,5980 ****
    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="_Toc184788972"></a><a name="_Toc152605252"></a><a
    name="_Toc115416302"></a><a name="_Toc139993294"></a><a name="_Toc126872371"></a><span
!   style='mso-bookmark:_Toc184788972'><span style='mso-bookmark:_Toc152605252'><span
    style='mso-bookmark:_Toc115416302'>Value: &quot;upper case drive letter&quot;</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
--- 6148,6156 ----
    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="_Toc190064256"></a><a name="_Toc152605252"></a><a
    name="_Toc115416302"></a><a name="_Toc139993294"></a><a name="_Toc126872371"></a><span
!   style='mso-bookmark:_Toc190064256'><span style='mso-bookmark:_Toc152605252'><span
    style='mso-bookmark:_Toc115416302'>Value: &quot;upper case drive letter&quot;</span></span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
***************
*** 5985,5993 ****
   </tr>
  </table>
  
! <h2><a name="_Toc184788973"></a><a name="_Toc152605253"></a><a
  name="_Toc115416303"></a><a name="_Toc139993295"></a><a name="_Toc126872372"></a><a
! name="_Toc115417108"></a><span style='mso-bookmark:_Toc184788973'><span
  style='mso-bookmark:_Toc152605253'><span style='mso-bookmark:_Toc115416303'><span
  lang=FR style='mso-ansi-language:FR'>A.4 OpenAFS Client Service Environment
  Variables</span></span></span></span><span lang=FR style='mso-ansi-language:
--- 6161,6169 ----
   </tr>
  </table>
  
! <h2><a name="_Toc190064257"></a><a name="_Toc152605253"></a><a
  name="_Toc115416303"></a><a name="_Toc139993295"></a><a name="_Toc126872372"></a><a
! name="_Toc115417108"></a><span style='mso-bookmark:_Toc190064257'><span
  style='mso-bookmark:_Toc152605253'><span style='mso-bookmark:_Toc115416303'><span
  lang=FR style='mso-ansi-language:FR'>A.4 OpenAFS Client Service Environment
  Variables</span></span></span></span><span lang=FR style='mso-ansi-language:
***************
*** 5997,6005 ****
   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="_Toc184788974"></a><a name="_Toc152605254"></a><a
    name="_Toc115416304"></a><a name="_Toc139993296"></a><a name="_Toc126872373"></a><span
!   style='mso-bookmark:_Toc184788974'><span style='mso-bookmark:_Toc152605254'><span
    style='mso-bookmark:_Toc115416304'>Variable: AFS_RPC_ENCRYPT</span></span></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>
--- 6173,6181 ----
   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="_Toc190064258"></a><a name="_Toc152605254"></a><a
    name="_Toc115416304"></a><a name="_Toc139993296"></a><a name="_Toc126872373"></a><span
!   style='mso-bookmark:_Toc190064258'><span style='mso-bookmark:_Toc152605254'><span
    style='mso-bookmark:_Toc115416304'>Variable: AFS_RPC_ENCRYPT</span></span></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>
***************
*** 6008,6016 ****
   </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="_Toc184788975"></a><a name="_Toc152605255"></a><a
    name="_Toc115416305"></a><a name="_Toc139993297"></a><a name="_Toc126872374"></a><span
!   style='mso-bookmark:_Toc184788975'><span style='mso-bookmark:_Toc152605255'><span
    style='mso-bookmark:_Toc115416305'>Variable: AFS_RPC_PROTSEQ</span></span></span></h5>
    <p class=MsoBodyText>Values:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &quot;ncalrpc&quot;&nbsp; - local RPC<br>
--- 6184,6192 ----
   </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="_Toc190064259"></a><a name="_Toc152605255"></a><a
    name="_Toc115416305"></a><a name="_Toc139993297"></a><a name="_Toc126872374"></a><span
!   style='mso-bookmark:_Toc190064259'><span style='mso-bookmark:_Toc152605255'><span
    style='mso-bookmark:_Toc115416305'>Variable: AFS_RPC_PROTSEQ</span></span></span></h5>
    <p class=MsoBodyText>Values:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &quot;ncalrpc&quot;&nbsp; - local RPC<br>
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.25 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm:1.2.6.27
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm:1.2.6.25	Fri Dec 28 14:47:20 2007
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm	Wed Feb  6 12:58:21 2008
***************
*** 10,36 ****
  <meta name=Originator content="Microsoft Word 11">
  <base target=body>
  <link rel=File-List href="toc_files/filelist.xml">
! <title>OpenAFS for Windows 1.5.29 Table of Contents</title>
  <!--[if gte mso 9]><xml>
   <o:DocumentProperties>
    <o:Author>Jeffrey Altman</o:Author>
    <o:LastAuthor>Jeffrey Altman</o:LastAuthor>
    <o:Revision>1</o:Revision>
!   <o:TotalTime>8</o:TotalTime>
    <o:Created>2006-11-30T04:12:00Z</o:Created>
    <o:LastSaved>2006-11-30T04:14:00Z</o:LastSaved>
    <o:Pages>1</o:Pages>
!   <o:Words>6761</o:Words>
!   <o:Characters>38542</o:Characters>
    <o:Company>Secure Endpoints Inc.</o:Company>
!   <o:Lines>321</o:Lines>
!   <o:Paragraphs>90</o:Paragraphs>
!   <o:CharactersWithSpaces>45213</o:CharactersWithSpaces>
    <o:Version>11.9999</o:Version>
   </o:DocumentProperties>
  </xml><![endif]--><!--[if gte mso 9]><xml>
   <w:WordDocument>
    <w:Zoom>0</w:Zoom>
    <w:ValidateAgainstSchemas/>
    <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
    <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
--- 10,37 ----
  <meta name=Originator content="Microsoft Word 11">
  <base target=body>
  <link rel=File-List href="toc_files/filelist.xml">
! <title>OpenAFS for Windows 1.5.31 Table of Contents</title>
  <!--[if gte mso 9]><xml>
   <o:DocumentProperties>
    <o:Author>Jeffrey Altman</o:Author>
    <o:LastAuthor>Jeffrey Altman</o:LastAuthor>
    <o:Revision>1</o:Revision>
!   <o:TotalTime>9</o:TotalTime>
    <o:Created>2006-11-30T04:12:00Z</o:Created>
    <o:LastSaved>2006-11-30T04:14:00Z</o:LastSaved>
    <o:Pages>1</o:Pages>
!   <o:Words>6991</o:Words>
!   <o:Characters>39855</o:Characters>
    <o:Company>Secure Endpoints Inc.</o:Company>
!   <o:Lines>332</o:Lines>
!   <o:Paragraphs>93</o:Paragraphs>
!   <o:CharactersWithSpaces>46753</o:CharactersWithSpaces>
    <o:Version>11.9999</o:Version>
   </o:DocumentProperties>
  </xml><![endif]--><!--[if gte mso 9]><xml>
   <w:WordDocument>
    <w:Zoom>0</w:Zoom>
+   <w:GrammarState>Clean</w:GrammarState>
    <w:ValidateAgainstSchemas/>
    <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
    <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
***************
*** 228,234 ****
  	mso-bidi-language:#0400;}
  </style>
  <![endif]--><!--[if gte mso 9]><xml>
!  <o:shapedefaults v:ext="edit" spidmax="9218"/>
  </xml><![endif]--><!--[if gte mso 9]><xml>
   <o:shapelayout v:ext="edit">
    <o:idmap v:ext="edit" data="1"/>
--- 229,235 ----
  	mso-bidi-language:#0400;}
  </style>
  <![endif]--><!--[if gte mso 9]><xml>
!  <o:shapedefaults v:ext="edit" spidmax="11266"/>
  </xml><![endif]--><!--[if gte mso 9]><xml>
   <o:shapelayout v:ext="edit">
    <o:idmap v:ext="edit" data="1"/>
***************
*** 245,1327 ****
  <![endif]--><!--[if supportFields]><span style='mso-element:field-end'></span><![endif]--><!--[if supportFields]><span
  style='mso-element:field-begin'></span><span
  style='mso-spacerun:yes'> </span>TOC \h \z \n \u <span style='mso-element:field-separator'></span><![endif]--><span
- style='mso-no-proof:yes'><o:p></o:p></span></p>
- 
- <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788738">1. Installer Options</a></span></span><span
! style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788739">2. System Requirements</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788740">2.1 Supported Operating Systems</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788741">2.1.1 Unsupported Operating Systems</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788742">2.2 Disk Space</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788743">2.3 Additional Software Packages</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788744">3. Operational Notes</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788745">3.1. Requirements for Kerberos v5
  Authentication</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788746">3.1.1. Active Directory</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788747">3.1.2. Using the krb524 service</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788748">3.1.3. Network Identity Manager Provider</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788749">3.2. Use of the Microsoft Loopback Adapter by
  the AFS Client Service</a></span></span><span style='mso-fareast-font-family:
  "Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788750">3.3. Using Freelance (Dynamic Root) Mode to
  Improve Mobility</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788751">3.4. Locating AFS Volume Database Servers via
  DNS</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788752">3.5. Obtaining AFS Tokens as a Integrated
  Part of Windows Logon</a></span></span><span style='mso-fareast-font-family:
  "Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788753">3.6. AFS System Tray Command Line Options</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788754">3.7. The “AFS Client Admins” Authorization
  Group</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788755">3.8. OpenAFS support for UNC paths</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788756">3.9. aklog.exe</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788757">3.10. OpenAFS Servers on Windows are
  Unsupported</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788758">3.10.1. OpenAFS Server Installation</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788759">3.10.2. Using the AFS Client Service when the
  Server is installed</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788760">3.11. OpenAFS Debugging Symbol files</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788761">3.12. Large File (64-bit) Support</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788762">3.13. Encrypted AFS Network Communication</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788763">3.14. Authenticated Access to the OpenAFS
  Client Service</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788764">3.15. No More INI Files</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788765">3.16. Microsoft Windows Internet Connection
  Firewall</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788766">3.17. Browsing AFS from the Explorer Shell
  and Office</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788767">3.18. Byte Range Locking</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788768">3.19. Automatic Discarding of AFS Tokens at
  Logoff</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788769">3.20. Windows Terminal Server installations</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788770">3.21. Hidden Dot Files</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788771">3.22. Status Cache Limits</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788772">3.23. NETBIOS over TCP/IP must be enabled</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788773">3.24. OpenAFS binaries are digitally signed</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788774">3.25. Maximum Size of the AFSCache File</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788775">3.26. Filename Character Sets</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788776">3.27. Known Character Set Issues with Roaming
  Profiles</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788777">3.28. The AFSCache File</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788778">3.29. Restricting OpenAFS Client Service
! Start and Stop</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788779">3.30. The @sys Name List</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788780">3.31. Symlinks to AFS UNC paths</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788781">3.32. Cache Manager Debugging</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788782">3.33. Windows Logon Caching vs. Kerberos
  Logons</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788783">3.34. Initial Server Preferences</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788784">3.35. File Timestamps</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788785">3.36. Windows RPC client support must be
  installed</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788786">3.37. Generating Minidumps of the OpenAFS
! Client Service</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788787">3.38. AFS Client Universally Unique
  Identifiers (UUIDs) vs. System Cloning</a></span></span><span style='mso-fareast-font-family:
  "Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788788">3.39. Delayed Write Errors with Microsoft
  Office Applications</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788789">3.40. Global Drives (aka Service Drive
  Letters) are no longer supported by Microsoft</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788790">3.41. 64-bit Microsoft Windows Installations</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788791">3.42. Known Issues with Microsoft Windows
  Vista</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788792">3.43. New AFS Share Name Syntax Provides
  Direct Access to Volumes</a></span></span><span style='mso-fareast-font-family:
  "Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788793">3.44. Differences between Windows and UNIX
  “fs examine”</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788794">4. How to Debug Problems with OpenAFS for
  Windows:</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788795">4.1. pioctl debugging (IoctlDebug registry
  key)</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788796">4.2. afsd_service initialization log
  (%WinDir%\TEMP\afsd_init.log)</a></span></span><span style='mso-fareast-font-family:
  "Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788797">4.3. afsd_service debug logs (fs trace {-on,
  -off, -dump} -&gt;%WinDir%\TEMP\afsd.log)</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788798">4.4. Using SysInternal’s DbgView and ProcMon
  or FileMon Tools</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788799">4.5. Microsoft MiniDumps<span
  style='mso-spacerun:yes'>  </span>(fs minidump -&gt; %WinDir%\TEMP\afsd.dmp)</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788800">4.6. Single Sign-on (Integrated Logon)
  debugging</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788801">4.7. RX (AFS RPC) debugging (rxdebug)</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788802">4.8. Cache Manager debugging (cmdebug)</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788803">4.9. Persistent Cache consistency check</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788804">4.10. Token Acquisition Debugging</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788805">5. Reporting Bugs:</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788806">6. How to Contribute to the Development of
  OpenAFS for Windows</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788807">6.1. The USENIX OpenAFS Fund</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788808">6.2. Secure Endpoints Inc.</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788809">6.3. Direct contributions of code and/or
  documentation</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788810">6.4. OpenAFS for Windows Mailing Lists</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788811">7. MSI Deployment Guide</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788812">7.1. Introduction</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788813">7.1.1 Requirements</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788814">7.1.2 Authoring a Transform</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788815">7.2. Configuration Options</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788816">7.2.1 Configurable Properties</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc4 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788817">7.2.1.1 Setting Properties</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc4 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788818">7.2.1.2 OpenAFS for Windows Properties</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788819">(Service parameters):</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788820">(Network provider):</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788821">(OpenAFS Client):</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788822">7.2.1.2.1 Registry Properties</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788823">AFSCACHEPATH</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788824">AFSCACHESIZE</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788825">AFSCELLNAME</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788826">FREELANCEMODE</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788827">HIDEDOTFILES</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788828">LOGONOPTIONS</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788829">MOUNTROOT</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788830">NETBIOSNAME</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788831">NOFINDLANABYNAME</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788832">RXMAXMTU</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788833">SECURITYLEVEL</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788834">SMBAUTHTYPE</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788835">STOREANSIFILENAMES</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788836">USEDNS</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788837">7.2.1.2.2 AFSCreds.exe Properties</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788838">CREDSSTARTUP</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788839">CREDSAUTOINIT</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788840">CREDSIPCHDET</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788841">CREDSQUIET</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788842">CREDSRENEWDRMAP</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788843">CREDSSHOW</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788844">7.2.2 Existing Registry Entries</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788845">7.2.3 Replacing Configuration Files</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc4 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788846">7.2.3.1 Components for Configuration Files</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788847">7.2.4 Adding Domain Specific Registry Keys</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788848">7.2.5 Adding Site Specific Freelance Registry
  Keys</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788849">7.3 Additional Resources</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788850">7.4. Upgrades</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788851">Appendix A: Registry Values</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788852">A.1. Service parameters</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788853">Regkey:
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788854">Value: LANadapter</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788855">Value: CacheSize</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788856">Value: ChunkSize</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788857">Value: Daemons</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788858">Value: ServerThreads</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788859">Value: Stats</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788860">Value: LogoffPreserveTokens</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788861">Value: RootVolume</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788862">Value: MountRoot</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788863">Value: CachePath</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788864">Value: NonPersistentCaching</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788865">Value: ValidateCache</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788866">Value: TrapOnPanic</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788867">Value: NetbiosName</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788868">Value: IsGateway</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788869">Value: ReportSessionStartups</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788870">Value: TraceBufferSize</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788871">Value: SysName</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788872">Value: SecurityLevel</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788873">Value: UseDNS</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788874">Value: FreelanceClient</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788875">Value: HideDotFiles</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788876">Value: MaxMpxRequests</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788877">Value: MaxVCPerServer</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788878">Value: Cell</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788879">Value: RxNoJumbo</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788880">Value: RxMaxMTU</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788881">Value: ConnDeadTimeout</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788882">Value: HardDeadTimeout</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788883">Value: TraceOption</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788884">Value: AllSubmount</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788885">Value: NoFindLanaByName</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788886">Value: MaxCPUs</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788887">Value: smbAuthType</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788888">Value: MaxLogSize</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788889">Value: FlushOnHibernate</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788890">Value: daemonCheckDownInterval</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788891">Value: daemonCheckUpInterval</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788892">Value: daemonCheckVolInterval</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788893">Value: daemonCheckCBInterval</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788894">Value: daemonCheckLockInterval</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788895">Value: daemonCheckTokenInterval</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788896">Value: daemonCheckOfflineVolInterval</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788897">Value: CallBackPort</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788898">Value: EnableServerLocks</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788899">Value: DeleteReadOnly</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788900">Value: BPlusTrees</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788901">Value: PrefetchExecutableExtensions</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788902">Value: OfflineReadOnlyIsValid</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788903">Value: GiveUpAllCallBacks</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788904">Value: FollowBackupPath</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788905">Regkey:
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters\GlobalAutoMapper]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788906">Value: &lt;Drive Letter:&gt; for example
  &quot;G:&quot;</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788907">Regkey: [HKLM\SOFTWARE\OpenAFS\Client]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788908">Value: CellServDBDir</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788909">Value: VerifyServiceSignature</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788910">Value: IoctlDebug</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788911">Value: MiniDumpType</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788912">Value: StoreAnsiFilenames</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788913">Regkey:
  [HKLM\SOFTWARE\OpenAFS\Client\CSCPolicy]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788914">Value: &quot;smb/cifs share name&quot;</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788915">Regkey:
  [HKLM\SOFTWARE\OpenAFS\Client\Freelance]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788916">Value: &quot;numeric value&quot;</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788917">Regkey:
  [HKLM\SOFTWARE\OpenAFS\Client\Freelance\Symlinks]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788918">Value: &quot;numeric value&quot;</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788919">Regkey:
  [HKLM\SOFTWARE\OpenAFS\Client\Submounts]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788920">Value: &quot;submount name&quot;</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788921">Regkey: [HKLM\SOFTWARE\OpenAFS\Client\Server
  Preferences\VLDB]</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788922">Value: &quot;hostname or ip address&quot;</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788923">Regkey: [HKLM\SOFTWARE\OpenAFS\Client\Server
  Preferences\File]</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788924">Value: &quot;hostname or ip address&quot;</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788925">A.2. Integrated Logon Network provider
  parameters</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788926">Regkey:
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788927">Value: FailLoginsSilently</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788928">Regkey:
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788929">Value: NoWarnings</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788930">Value: AuthentProviderPath</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788931">Value: Class</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788932">Value: DependOnGroup</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788933">Value: DependOnService</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788934">Value: Name</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788935">Value: ProviderPath</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788936">A.2.1 Domain specific configuration keys for
  the Network Provider</a></span></span><span style='mso-fareast-font-family:
  "Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788937">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788938">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788939">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain&quot;domain
  name&quot;]</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788940">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788941">Example:</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788942">A.2.1.1 Domain specific configuration values</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc4 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788943">[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></span><span
--- 246,1368 ----
  <![endif]--><!--[if supportFields]><span style='mso-element:field-end'></span><![endif]--><!--[if supportFields]><span
  style='mso-element:field-begin'></span><span
  style='mso-spacerun:yes'> </span>TOC \h \z \n \u <span style='mso-element:field-separator'></span><![endif]--><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064014">1. Installer Options</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064015">2. System Requirements</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064016">2.1 Supported Operating Systems</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064017">2.1.1 Unsupported Operating Systems</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064018">2.2 Disk Space</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064019">2.3 Additional Software Packages</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064020">3. Operational Notes</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064021">3.1. Requirements for Kerberos v5
  Authentication</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064022">3.1.1. Active Directory</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064023">3.1.2. Using the krb524 service</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064024">3.1.3. Network Identity Manager Provider</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064025">3.2. Use of the Microsoft Loopback Adapter by
  the AFS Client Service</a></span></span><span style='mso-fareast-font-family:
  "Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064026">3.3. Using Freelance (Dynamic Root) Mode to
  Improve Mobility</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064027">3.4. Locating AFS Volume Database Servers via
  DNS</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064028">3.5. Obtaining AFS Tokens as a Integrated
  Part of Windows Logon</a></span></span><span style='mso-fareast-font-family:
  "Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064029">3.6. AFS System Tray Command Line Options</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064030">3.7. The “AFS Client Admins” Authorization
  Group</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064031">3.8. OpenAFS support for UNC paths</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064032">3.9. aklog.exe</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064033">3.10. OpenAFS Servers on Windows are
  Unsupported</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064034">3.10.1. OpenAFS Server Installation</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064035">3.10.2. Using the AFS Client Service when the
  Server is installed</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064036">3.11. OpenAFS Debugging Symbol files</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064037">3.12. Large File (64-bit) Support</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064038">3.13. Encrypted AFS Network Communication</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064039">3.14. Authenticated Access to the OpenAFS
  Client Service</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064040">3.15. No More INI Files</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064041">3.16. Microsoft Windows Internet Connection
  Firewall</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064042">3.17. Browsing AFS from the Explorer Shell
  and Office</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064043">3.18. Byte Range Locking</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064044">3.19. Automatic Discarding of AFS Tokens at
  Logoff</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064045">3.20. Windows Terminal Server installations</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064046">3.21. Hidden Dot Files</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064047">3.22. Status Cache Limits</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064048">3.23. NETBIOS over TCP/IP must be enabled</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064049">3.24. OpenAFS binaries are digitally signed</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064050">3.25. Maximum Size of the AFSCache File</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064051">3.26. Filename Character Sets</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064052">3.27. Known Character Set Issues with Roaming
  Profiles</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064053">3.28. The AFSCache File</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064054">3.29. Restricting OpenAFS Client Service Start
! and Stop</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064055">3.30. The @sys Name List</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064056">3.31. Symlinks to AFS UNC paths</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064057">3.32. Cache Manager Debugging</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064058">3.33. Windows Logon Caching vs. Kerberos
  Logons</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064059">3.34. Initial Server Preferences</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064060">3.35. File Timestamps</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064061">3.36. Windows RPC client support must be
  installed</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064062">3.37. Generating Minidumps of the OpenAFS Client
! Service</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064063">3.38. AFS Client Universally Unique
  Identifiers (UUIDs) vs. System Cloning</a></span></span><span style='mso-fareast-font-family:
  "Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064064">3.39. Delayed Write Errors with Microsoft
  Office Applications</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064065">3.40. Global Drives (aka Service Drive
  Letters) are no longer supported by Microsoft</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064066">3.41. 64-bit Microsoft Windows Installations</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064067">3.42. Known Issues with Microsoft Windows
  Vista</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064068">3.43. New AFS Share Name Syntax Provides
  Direct Access to Volumes</a></span></span><span style='mso-fareast-font-family:
  "Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064069">3.44. Differences between Windows and UNIX
  “fs examine”</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
+ <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
+ class=MsoHyperlink><span style='mso-no-proof:yes'><a
+ href="relnotes.htm#_Toc190064070">3.45. Literal evaluation of AFS objects via
+ fs commands</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
+ mso-no-proof:yes'><o:p></o:p></span></p>
+ 
+ <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
+ class=MsoHyperlink><span style='mso-no-proof:yes'><a
+ href="relnotes.htm#_Toc190064071">3.46. Out of Quota errors</a></span></span><span
+ style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
+ 
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064072">4. How to Debug Problems with OpenAFS for
  Windows:</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064073">4.1. pioctl debugging (IoctlDebug registry
  key)</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064074">4.2. afsd_service initialization log
  (%WinDir%\TEMP\afsd_init.log)</a></span></span><span style='mso-fareast-font-family:
  "Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064075">4.3. afsd_service debug logs (fs trace {-on,
  -off, -dump} -&gt;%WinDir%\TEMP\afsd.log)</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064076">4.4. Using SysInternal’s DbgView and ProcMon
  or FileMon Tools</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064077">4.5. Microsoft MiniDumps<span
  style='mso-spacerun:yes'>  </span>(fs minidump -&gt; %WinDir%\TEMP\afsd.dmp)</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064078">4.6. Single Sign-on (Integrated Logon)
  debugging</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064079">4.7. RX (AFS RPC) debugging (rxdebug)</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064080">4.8. Cache Manager debugging (cmdebug)</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064081">4.9. Persistent Cache consistency check</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064082">4.10. Token Acquisition Debugging</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064083">5. Reporting Bugs:</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064084">6. How to Contribute to the Development of
  OpenAFS for Windows</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064085">6.1. The USENIX OpenAFS Fund</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064086">6.2. Secure Endpoints Inc.</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064087">6.3. Direct contributions of code and/or
  documentation</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064088">6.4. OpenAFS for Windows Mailing Lists</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064089">7. MSI Deployment Guide</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064090">7.1. Introduction</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064091">7.1.1 Requirements</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064092">7.1.2 Authoring a Transform</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064093">7.2. Configuration Options</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064094">7.2.1 Configurable Properties</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc4 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064095">7.2.1.1 Setting Properties</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc4 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064096">7.2.1.2 OpenAFS for Windows Properties</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064097">(Service parameters):</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064098">(Network provider):</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064099">(OpenAFS Client):</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064100">7.2.1.2.1 Registry Properties</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064101">AFSCACHEPATH</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064102">AFSCACHESIZE</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064103">AFSCELLNAME</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064104">FREELANCEMODE</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064105">HIDEDOTFILES</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064106">LOGONOPTIONS</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064107">MOUNTROOT</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064108">NETBIOSNAME</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064109">NOFINDLANABYNAME</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064110">RXMAXMTU</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064111">SECURITYLEVEL</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064112">SMBAUTHTYPE</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064113">STOREANSIFILENAMES</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064114">USEDNS</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064115">7.2.1.2.2 AFSCreds.exe Properties</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064116">CREDSSTARTUP</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064117">CREDSAUTOINIT</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064118">CREDSIPCHDET</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064119">CREDSQUIET</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064120">CREDSRENEWDRMAP</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064121">CREDSSHOW</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064122">7.2.2 Existing Registry Entries</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064123">7.2.3 Replacing Configuration Files</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc4 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064124">7.2.3.1 Components for Configuration Files</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064125">7.2.4 Adding Domain Specific Registry Keys</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064126">7.2.5 Adding Site Specific Freelance Registry
  Keys</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064127">7.3 Additional Resources</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064128">7.4. Upgrades</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064129">Appendix A: Registry Values</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064130">A.1. Service parameters</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064131">Regkey:
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064132">Value: LANadapter</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064133">Value: CacheSize</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064134">Value: ChunkSize</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064135">Value: Daemons</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064136">Value: ServerThreads</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064137">Value: Stats</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064138">Value: LogoffPreserveTokens</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064139">Value: RootVolume</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064140">Value: MountRoot</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064141">Value: CachePath</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064142">Value: NonPersistentCaching</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064143">Value: ValidateCache</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064144">Value: TrapOnPanic</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064145">Value: NetbiosName</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064146">Value: IsGateway</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064147">Value: ReportSessionStartups</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064148">Value: TraceBufferSize</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064149">Value: SysName</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064150">Value: SecurityLevel</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064151">Value: UseDNS</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064152">Value: FreelanceClient</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064153">Value: HideDotFiles</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064154">Value: MaxMpxRequests</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064155">Value: MaxVCPerServer</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064156">Value: Cell</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064157">Value: RxNoJumbo</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064158">Value: RxMaxMTU</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064159">Value: ConnDeadTimeout</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064160">Value: HardDeadTimeout</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064161">Value: TraceOption</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064162">Value: AllSubmount</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064163">Value: NoFindLanaByName</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064164">Value: MaxCPUs</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064165">Value: smbAuthType</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064166">Value: MaxLogSize</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064167">Value: FlushOnHibernate</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064168">Value: daemonCheckDownInterval</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064169">Value: daemonCheckUpInterval</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064170">Value: daemonCheckVolInterval</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064171">Value: daemonCheckCBInterval</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064172">Value: daemonCheckLockInterval</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064173">Value: daemonCheckTokenInterval</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064174">Value: daemonCheckOfflineVolInterval</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064175">Value: CallBackPort</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064176">Value: EnableServerLocks</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064177">Value: DeleteReadOnly</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064178">Value: BPlusTrees</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064179">Value: PrefetchExecutableExtensions</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064180">Value: OfflineReadOnlyIsValid</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064181">Value: GiveUpAllCallBacks</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064182">Value: FollowBackupPath</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064183">Regkey:
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters\GlobalAutoMapper]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064184">Value: &lt;Drive Letter:&gt; for example
  &quot;G:&quot;</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064185">Regkey: [HKLM\SOFTWARE\OpenAFS\Client]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064186">Value: CellServDBDir</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064187">Value: VerifyServiceSignature</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064188">Value: IoctlDebug</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064189">Value: MiniDumpType</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064190">Value: StoreAnsiFilenames</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064191">Regkey:
  [HKLM\SOFTWARE\OpenAFS\Client\CSCPolicy]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064192">Value: &quot;smb/cifs share name&quot;</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064193">Regkey:
  [HKLM\SOFTWARE\OpenAFS\Client\Freelance]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064194">Value: &quot;numeric value&quot;</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064195">Regkey:
  [HKLM\SOFTWARE\OpenAFS\Client\Freelance\Symlinks]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064196">Value: &quot;numeric value&quot;</a></span></span><span
! style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064197">Regkey: [HKLM\SOFTWARE\OpenAFS\Client\Realms]</a></span></span><span
! style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064198">Regkey: [HKLM\SOFTWARE\OpenAFS\Client\Realms<i
! style='mso-bidi-font-style:normal'>”Realm Name”</i>]</a></span></span><span
! style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064199">Value: AFSEnabled</a></span></span><span
! style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064200">Regkey: [HKLM\SOFTWARE\OpenAFS\Client\Realms<i
! style='mso-bidi-font-style:normal'>”Realm Name””Cell Name”</i>]</a></span></span><span
! style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064201">Value: MethodName</a></span></span><span
! style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064202">Value: Realm</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064203">Regkey:
  [HKLM\SOFTWARE\OpenAFS\Client\Submounts]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064204">Value: &quot;submount name&quot;</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064205">Regkey: [HKLM\SOFTWARE\OpenAFS\Client\Server
  Preferences\VLDB]</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064206">Value: &quot;hostname or ip address&quot;</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064207">Regkey: [HKLM\SOFTWARE\OpenAFS\Client\Server
  Preferences\File]</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064208">Value: &quot;hostname or ip address&quot;</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064209">A.2. Integrated Logon Network provider
  parameters</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064210">Regkey:
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064211">Value: FailLoginsSilently</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064212">Regkey:
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064213">Value: NoWarnings</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064214">Value: AuthentProviderPath</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064215">Value: Class</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064216">Value: DependOnGroup</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064217">Value: DependOnService</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064218">Value: Name</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064219">Value: ProviderPath</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064220">A.2.1 Domain specific configuration keys for
  the Network Provider</a></span></span><span style='mso-fareast-font-family:
  "Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064221">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064222">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064223">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain&quot;domain
  name&quot;]</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064224">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064225">Example:</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064226">A.2.1.1 Domain specific configuration values</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc4 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064227">[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></span><span
***************
*** 1329,1498 ****
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788944">Value: LogonOptions</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788945">Value: FailLoginsSilentl</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788946">Value: LogonScript</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788947">Value: LoginRetryInterval</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788948">Value: LoginSleepInterval</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788949">Value: Realm</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788950">Value: TheseCells</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788951">A.2.1.2 Selection of effective values for
  domain specific configuration</a></span></span><span style='mso-fareast-font-family:
  "Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788952">A.2.1.3 Exceptions to A.2.1.2</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc4 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788953">2.1.3.1 'FailLoginsSilently'</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc4 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788954">2.1.3.2 'LogonScript'</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788955">A.3. AFS Credentials System Tray Tool
  parameters</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788956">Regkey:
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788957">Value: Gateway</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788958">Value: Cell</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788959">Regkey: [HKLM\SOFTWARE\OpenAFS\Client]
  [HKCU\SOFTWARE\OpenAFS\Client]</a></span></span><span style='mso-fareast-font-family:
  "Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788960">Value: ShowTrayIcon</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788961">Value: EnableKFW</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788962">Value: AcceptDottedPrincipalNames</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788963">Value: Use524</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788964">Value: AfscredsShortcutParams</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788965">Regkey: [HKCU\SOFTWARE\OpenAFS\Client]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788966">Value: Authentication Cell</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788967">Regkey:
  [HKCU\SOFTWARE\OpenAFS\Client\Reminders]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788968">Value: &quot;afs cell name&quot;</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788969">Regkey: [HKCU\SOFTWARE\OpenAFS\Client\Active
  Maps]</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788970">Value: &quot;upper case drive letter&quot;</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788971">Regkey:
  [HKCU\SOFTWARE\OpenAFS\Client\Mappings]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788972">Value: &quot;upper case drive letter&quot;</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788973"><span lang=FR style='mso-ansi-language:FR'>A.4
  OpenAFS Client Service Environment Variables</span></a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788974">Variable: AFS_RPC_ENCRYPT</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc184788975">Variable: AFS_RPC_PROTSEQ</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoNormal><!--[if supportFields]><span style='mso-element:field-end'></span><![endif]--><o:p>&nbsp;</o:p></p>
--- 1370,1539 ----
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064228">Value: LogonOptions</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064229">Value: FailLoginsSilentl</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064230">Value: LogonScript</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064231">Value: LoginRetryInterval</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064232">Value: LoginSleepInterval</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064233">Value: Realm</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064234">Value: TheseCells</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064235">A.2.1.2 Selection of effective values for
  domain specific configuration</a></span></span><span style='mso-fareast-font-family:
  "Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064236">A.2.1.3 Exceptions to A.2.1.2</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc4 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064237">2.1.3.1 'FailLoginsSilently'</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc4 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064238">2.1.3.2 'LogonScript'</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064239">A.3. AFS Credentials System Tray Tool
  parameters</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064240">Regkey:
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064241">Value: Gateway</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064242">Value: Cell</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064243">Regkey: [HKLM\SOFTWARE\OpenAFS\Client]
  [HKCU\SOFTWARE\OpenAFS\Client]</a></span></span><span style='mso-fareast-font-family:
  "Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064244">Value: ShowTrayIcon</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064245">Value: EnableKFW</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064246">Value: AcceptDottedPrincipalNames</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064247">Value: Use524</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064248">Value: AfscredsShortcutParams</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064249">Regkey: [HKCU\SOFTWARE\OpenAFS\Client]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064250">Value: Authentication Cell</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064251">Regkey:
  [HKCU\SOFTWARE\OpenAFS\Client\Reminders]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064252">Value: &quot;afs cell name&quot;</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064253">Regkey: [HKCU\SOFTWARE\OpenAFS\Client\Active
  Maps]</a></span></span><span style='mso-fareast-font-family:"Times New Roman";
  mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064254">Value: &quot;upper case drive letter&quot;</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064255">Regkey:
  [HKCU\SOFTWARE\OpenAFS\Client\Mappings]</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064256">Value: &quot;upper case drive letter&quot;</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064257"><span lang=FR style='mso-ansi-language:FR'>A.4
  OpenAFS Client Service Environment Variables</span></a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064258">Variable: AFS_RPC_ENCRYPT</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc190064259">Variable: AFS_RPC_PROTSEQ</a></span></span><span
  style='mso-fareast-font-family:"Times New Roman";mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoNormal><!--[if supportFields]><span style='mso-element:field-end'></span><![endif]--><o:p>&nbsp;</o:p></p>
Index: openafs/src/WINNT/install/NSIS/OpenAFS.nsi
diff -c openafs/src/WINNT/install/NSIS/OpenAFS.nsi:1.88.4.11 openafs/src/WINNT/install/NSIS/OpenAFS.nsi:1.88.4.12
*** openafs/src/WINNT/install/NSIS/OpenAFS.nsi:1.88.4.11	Tue Sep 18 02:05:28 2007
--- openafs/src/WINNT/install/NSIS/OpenAFS.nsi	Wed Jan 30 22:03:13 2008
***************
*** 561,570 ****
    !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"
    File "${AFS_CLIENT_BUILDDIR}\afscpcc.exe"
  !ifdef AFSIFS
  !ifndef DEBUG
    !insertmacro ReplaceDLL "..\..\afsrdr\objfre_w2K_x86\i386\afsrdr.sys" "$SYSDIR\DRIVERS\afsrdr.sys" "$INSTDIR"
  !else
--- 561,571 ----
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscred_en_us.dll" "$INSTDIR\Client\Program\afscred_en_us.dll" "$INSTDIR"
    File "${AFS_CLIENT_BUILDDIR}\afsplhlp.chm"
    
!   !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afslogon.dll" "$INSTDIR\Client\Program\afslogon.dll" "$INSTDIR"
    File "${AFS_CLIENT_BUILDDIR}\afscpcc.exe"
+ 
  !ifdef AFSIFS
+   SetOutPath "$SYSDIR"
  !ifndef DEBUG
    !insertmacro ReplaceDLL "..\..\afsrdr\objfre_w2K_x86\i386\afsrdr.sys" "$SYSDIR\DRIVERS\afsrdr.sys" "$INSTDIR"
  !else
***************
*** 713,720 ****
  
    ; Daemon entries
    WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "" ""
!   WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "ProviderPath" "$SYSDIR\afslogon.dll"
!   WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "AuthentProviderPath" "$SYSDIR\afslogon.dll"
    WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Class" 2
    WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "VerboseLogging" 10
  
--- 714,721 ----
  
    ; Daemon entries
    WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "" ""
!   WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "ProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
!   WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "AuthentProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
    WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Class" 2
    WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "VerboseLogging" 10
  
***************
*** 1168,1176 ****
    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"
    
  DoServer:
     SectionGetFlags ${secServer} $R0
--- 1169,1178 ----
    File "${AFS_DESTDIR}\etc\backup.pdb"
    File "${AFS_CLIENT_BUILDDIR}\afs_cpa.pdb"
    File "${AFS_CLIENT_BUILDDIR}\afscred.pdb"
+   File "${AFS_CLIENT_BUILDDIR}\afslogon.pdb"
+   File "${AFS_CLIENT_BUILDDIR}\afscpcc.pdb"
  
    SetOutPath "$SYSDIR"
    
  DoServer:
     SectionGetFlags ${secServer} $R0
***************
*** 1853,1866 ****
    ;RMDIR /r "$INSTDIR\Server\usr\afs\logs"
    
    Delete /REBOOTOK "$SYSDIR\afsserver.cpl"
!   Delete /REBOOTOK "$SYSDIR\afs_cpa.cpl"
!   Delete /REBOOTOK "$SYSDIR\afslogon.dll"
!   Delete /REBOOTOK "$SYSDIR\afscpcc.exe"
  
    Delete /REBOOTOK "$SYSDIR\afsserver.pdb"
!   Delete /REBOOTOK "$SYSDIR\afs_cpa.pdb"
!   Delete /REBOOTOK "$SYSDIR\afslogon.pdb"
!   Delete /REBOOTOK "$SYSDIR\afscpcc.pdb"
  
    RMDir /r "$INSTDIR\Documentation\html\CmdRef"
    RMDir /r "$INSTDIR\Documentation\html\InstallGd"
--- 1855,1868 ----
    ;RMDIR /r "$INSTDIR\Server\usr\afs\logs"
    
    Delete /REBOOTOK "$SYSDIR\afsserver.cpl"
!   Delete /REBOOTOK "$INSTDIR\Client\Program\afs_cpa.cpl"
!   Delete /REBOOTOK "$INSTDIR\Client\Program\afslogon.dll"
!   Delete /REBOOTOK "$INSTDIR\Client\Program\afscpcc.exe"
  
    Delete /REBOOTOK "$SYSDIR\afsserver.pdb"
!   Delete /REBOOTOK "$INSTDIR\Client\Program\afs_cpa.pdb"
!   Delete /REBOOTOK "$INSTDIR\Client\Program\afslogon.pdb"
!   Delete /REBOOTOK "$INSTDIR\Client\Program\afscpcc.pdb"
  
    RMDir /r "$INSTDIR\Documentation\html\CmdRef"
    RMDir /r "$INSTDIR\Documentation\html\InstallGd"
***************
*** 1871,1877 ****
    RMDir "$INSTDIR\Documentation"
    ; Delete DOC short cut
    Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.exe"
- 
    Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.pdb"
  
    Delete /REBOOTOK "$INSTDIR\SDK\Include\*"
--- 1873,1878 ----
Index: openafs/src/WINNT/install/wix/feature.wxi
diff -c openafs/src/WINNT/install/wix/feature.wxi:1.14.2.7 openafs/src/WINNT/install/wix/feature.wxi:1.14.2.9
*** openafs/src/WINNT/install/wix/feature.wxi:1.14.2.7	Thu Aug 30 22:27:38 2007
--- openafs/src/WINNT/install/wix/feature.wxi	Tue Feb  5 20:14:52 2008
***************
*** 71,76 ****
--- 71,79 ----
                  <ComponentRef Id="cpf_CellServDB" />
                  <ComponentRef Id="cmf_afs_cpa_CPL" />
  
+                 <ComponentRef Id="cmf_afsadminutil_DLL" />
+                 <ComponentRef Id="cmf_afsclientadmin_DLL" />
+                 <ComponentRef Id="cmf_afsvosadmin_DLL" />
                  <ComponentRef Id="cmf_afsrpc_DLL" />
                  <ComponentRef Id="cmf_afsauthent2_DLL" />
                  <ComponentRef Id="cmf_afspthread_DLL" />
***************
*** 119,126 ****
              <Feature Id="feaServer" AllowAdvertise="no" Description="$(loc.StrAFSServerLongDesc)" Display="expand"
                  InstallDefault="followParent" Level="130" Title="$(loc.StrAFSServerDesc)">
  
! 				<ComponentRef Id="rcm_Server" />
! 				<ComponentRef Id="cmp_CommonDir" />
  
                  <ComponentRef Id="cmf_afsserver_CPL" />
                  <ComponentRef Id="cmf_afsbosadmin_DLL" />
--- 122,129 ----
              <Feature Id="feaServer" AllowAdvertise="no" Description="$(loc.StrAFSServerLongDesc)" Display="expand"
                  InstallDefault="followParent" Level="130" Title="$(loc.StrAFSServerDesc)">
  
! 		<ComponentRef Id="rcm_Server" />
! 		<ComponentRef Id="cmp_CommonDir" />
  
                  <ComponentRef Id="cmf_afsserver_CPL" />
                  <ComponentRef Id="cmf_afsbosadmin_DLL" />
***************
*** 299,304 ****
--- 302,310 ----
  		<ComponentRef Id="cmp_CommonDir" />
  
                  <ComponentRef Id="cmf_afsrpc_DLL" />
+                 <ComponentRef Id="cmf_afsadminutil_DLL" />
+                 <ComponentRef Id="cmf_afsclientadmin_DLL" />
+                 <ComponentRef Id="cmf_afsvosadmin_DLL" />
                  <ComponentRef Id="cmf_afsauthent2_DLL" />
                  <ComponentRef Id="cmf_afspthread_DLL" />
                  <ComponentRef Id="cmf_TaAfsAppLib_DLL" />
Index: openafs/src/WINNT/install/wix/files.wxi
diff -c openafs/src/WINNT/install/wix/files.wxi:1.22.2.18 openafs/src/WINNT/install/wix/files.wxi:1.22.2.20
*** openafs/src/WINNT/install/wix/files.wxi:1.22.2.18	Fri Dec  7 16:34:12 2007
--- openafs/src/WINNT/install/wix/files.wxi	Tue Feb  5 20:14:52 2008
***************
*** 21,26 ****
--- 21,35 ----
                      <CreateFolder />
                  </Component>
  
+                 <Component Win64="$(var.Win64)" Id="cmf_afsclientadmin_DLL" Guid="$(var.cmf_afsclientadmin_DLL_guid)">
+                     <File Id="fileafsclientadmin_DLL" Name="afscliad.dll" LongName="afsclientadmin.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsclientadmin.dll"/>
+                 </Component>
+                 <Component Win64="$(var.Win64)" Id="cmf_afsadminutil_DLL" Guid="$(var.cmf_afsadminutil_DLL_guid)">
+                     <File Id="fileafsadminutil_DLL" Name="afsadmut.dll" LongName="afsadminutil.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsadminutil.dll"/>
+                 </Component>
+                 <Component Win64="$(var.Win64)" Id="cmf_afsvosadmin_DLL" Guid="$(var.cmf_afsvosadmin_DLL_guid)">
+                     <File Id="fileafsvosadmin_DLL" Name="afsvosad.dll" LongName="afsvosadmin.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsvosadmin.dll"/>
+                 </Component>
    <?ifndef BinsOnly?>
                  <Component Win64="$(var.Win64)" Id="cmf_afsbosadmin_DLL" Guid="$(var.cmf_afsbosadmin_DLL_guid)">
                      <File Id="fileafsbosadmin_DLL" Name="afsbosad.dll" LongName="afsbosadmin.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsbosadmin.dll"/>
***************
*** 28,48 ****
                  <Component Win64="$(var.Win64)" Id="cmf_afscfgadmin_DLL" Guid="$(var.cmf_afscfgadmin_DLL_guid)">
                      <File Id="fileafscfgadmin_DLL" Name="afscfgad.dll" LongName="afscfgadmin.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afscfgadmin.dll"/>
                  </Component>
-                 <Component Win64="$(var.Win64)" Id="cmf_afsclientadmin_DLL" Guid="$(var.cmf_afsclientadmin_DLL_guid)">
-                     <File Id="fileafsclientadmin_DLL" Name="afscliad.dll" LongName="afsclientadmin.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsclientadmin.dll"/>
-                 </Component>
                  <Component Win64="$(var.Win64)" Id="cmf_afskasadmin_DLL" Guid="$(var.cmf_afskasadmin_DLL_guid)">
                      <File Id="fileafskasadmin_DLL" Name="afskasad.dll" LongName="afskasadmin.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afskasadmin.dll"/>
                  </Component>
                  <Component Win64="$(var.Win64)" Id="cmf_afsptsadmin_DLL" Guid="$(var.cmf_afsptsadmin_DLL_guid)">
                      <File Id="fileafsptsadmin_DLL" Name="afsptsad.dll" LongName="afsptsadmin.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsptsadmin.dll"/>
                  </Component>
-                 <Component Win64="$(var.Win64)" Id="cmf_afsvosadmin_DLL" Guid="$(var.cmf_afsvosadmin_DLL_guid)">
-                     <File Id="fileafsvosadmin_DLL" Name="afsvosad.dll" LongName="afsvosadmin.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsvosadmin.dll"/>
-                 </Component>
-                 <Component Win64="$(var.Win64)" Id="cmf_afsadminutil_DLL" Guid="$(var.cmf_afsadminutil_DLL_guid)">
-                     <File Id="fileafsadminutil_DLL" Name="afsadmut.dll" LongName="afsadminutil.dll" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsadminutil.dll"/>
-                 </Component>
    <?endif?>
  
                  <Component Win64="$(var.Win64)" Id="cmf_afsrpc_DLL" Guid="$(var.cmf_afsrpc_DLL_guid)">
--- 37,48 ----
***************
*** 71,81 ****
                  <Component Win64="$(var.Win64)" Id="cmp_ServerCommonDebug" Guid="$(var.cmp_ServerCommonDebug_guid)">
                      <File Id="fileafsbosadmin_PDB" Name="afsbosad.pdb" LongName="afsbosadmin.pdb" KeyPath="yes" DiskId="1" src="$(var.ServerDir)\afsbosadmin.pdb"/>
                      <File Id="fileafscfgadmin_PDB" Name="afscfgad.pdb" LongName="afscfgadmin.pdb" DiskId="1" src="$(var.ServerDir)\afscfgadmin.pdb"/>
-                     <File Id="fileafsclientadmin_PDB" Name="afscliad.pdb" LongName="afsclientadmin.pdb" DiskId="1" src="$(var.ServerDir)\afsclientadmin.pdb"/>
                      <File Id="fileafskasadmin_PDB" Name="afskasad.pdb" LongName="afskasadmin.pdb" DiskId="1" src="$(var.ServerDir)\afskasadmin.pdb"/>
                      <File Id="fileafsptsadmin_PDB" Name="afsptsad.pdb" LongName="afsptsadmin.pdb" DiskId="1" src="$(var.ServerDir)\afsptsadmin.pdb"/>
-                     <File Id="fileafsvosadmin_PDB" Name="afsvosad.pdb" LongName="afsvosadmin.pdb" DiskId="1" src="$(var.ServerDir)\afsvosadmin.pdb"/>
-                     <File Id="fileafsadminutil_PDB" Name="afsadmut.pdb" LongName="afsadminutil.pdb" DiskId="1" src="$(var.ServerDir)\afsadminutil.pdb"/>
                  </Component>
                <?endif?>
                  <Component Win64="$(var.Win64)" Id="cmp_CommonCommonDebug" Guid="$(var.cmp_CommonCommonDebug_guid)">
--- 71,78 ----
***************
*** 84,89 ****
--- 81,89 ----
                      <File Id="fileafspthread_PDB" Name="afspthrd.pdb" LongName="afspthread.pdb" DiskId="1" src="$(var.LibDir)\afspthread.pdb"/>
                      <File Id="fileTaAfsAppLib_PDB" Name="TaAfsApL.pdb" LongName="TaAfsAppLib.pdb" DiskId="1" src="$(var.ServerDir)\TaAfsAppLib.pdb"/>
                      <File Id="fileafsprocmgmt_PDB" Name="afsprcmg.pdb" LongName="afsprocmgmt.pdb" DiskId="1" src="$(var.ServerDir)\afsprocmgmt.pdb"/>
+                     <File Id="fileafsvosadmin_PDB" Name="afsvosad.pdb" LongName="afsvosadmin.pdb" DiskId="1" src="$(var.ServerDir)\afsvosadmin.pdb"/>
+                     <File Id="fileafsadminutil_PDB" Name="afsadmut.pdb" LongName="afsadminutil.pdb" DiskId="1" src="$(var.ServerDir)\afsadminutil.pdb"/>
+                     <File Id="fileafsclientadmin_PDB" Name="afscliad.pdb" LongName="afsclientadmin.pdb" DiskId="1" src="$(var.ServerDir)\afsclientadmin.pdb"/>
                  </Component>
                <?ifndef BinsOnly ?>
                  <Component Win64="$(var.Win64)" Id="cmp_ClientCommonDebug" Guid="$(var.cmp_ClientCommonDebug_guid)">
Index: openafs/src/WINNT/netidmgr_plugin/afscred.h
diff -c openafs/src/WINNT/netidmgr_plugin/afscred.h:1.1.2.5 openafs/src/WINNT/netidmgr_plugin/afscred.h:1.1.2.6
*** openafs/src/WINNT/netidmgr_plugin/afscred.h:1.1.2.5	Tue Aug 28 12:54:46 2007
--- openafs/src/WINNT/netidmgr_plugin/afscred.h	Fri Feb  1 16:17:15 2008
***************
*** 1,5 ****
  /*
!  * 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
--- 1,5 ----
  /*
!  * Copyright (c) 2005-2008 Secure Endpoints Inc.
   *
   * Permission is hereby granted, free of charge, to any person
   * obtaining a copy of this software and associated documentation
***************
*** 22,28 ****
   * SOFTWARE.
   */
  
! /* $Id: afscred.h,v 1.1.2.5 2007/08/28 16:54:46 jaltman Exp $ */
  
  #ifndef __KHIMAIRA_AFSCRED_H
  #define __KHIMAIRA_AFSCRED_H
--- 22,28 ----
   * SOFTWARE.
   */
  
! /* $Id: afscred.h,v 1.1.2.6 2008/02/01 21:17:15 jaltman Exp $ */
  
  #ifndef __KHIMAIRA_AFSCRED_H
  #define __KHIMAIRA_AFSCRED_H
***************
*** 41,48 ****
  
  #include<langres.h>
  
- #include <afs/cm_config.h>
  #include <afs/stds.h>
  #include <afs/auth.h>
  #include <afs/ptserver.h>
  #include <afs/ptuser.h>
--- 41,48 ----
  
  #include<langres.h>
  
  #include <afs/stds.h>
+ #include <afs/cm_config.h>
  #include <afs/auth.h>
  #include <afs/ptserver.h>
  #include <afs/ptuser.h>
Index: openafs/src/WINNT/netidmgr_plugin/afsnewcreds.c
diff -c openafs/src/WINNT/netidmgr_plugin/afsnewcreds.c:1.1.2.6 openafs/src/WINNT/netidmgr_plugin/afsnewcreds.c:1.1.2.7
*** openafs/src/WINNT/netidmgr_plugin/afsnewcreds.c:1.1.2.6	Tue Aug 28 12:54:46 2007
--- openafs/src/WINNT/netidmgr_plugin/afsnewcreds.c	Tue Jan  8 12:06:39 2008
***************
*** 1,5 ****
  /*
!  * 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
--- 1,5 ----
  /*
!  * Copyright (c) 2005,2006,2007,2008 Secure Endpoints Inc.
   *
   * Permission is hereby granted, free of charge, to any person
   * obtaining a copy of this software and associated documentation
***************
*** 22,28 ****
   * SOFTWARE.
   */
  
! /* $Id: afsnewcreds.c,v 1.1.2.6 2007/08/28 16:54:46 jaltman Exp $ */
  
  #include<afscred.h>
  #include<commctrl.h>
--- 22,28 ----
   * SOFTWARE.
   */
  
! /* $Id: afsnewcreds.c,v 1.1.2.7 2008/01/08 17:06:39 jaltman Exp $ */
  
  #include<afscred.h>
  #include<commctrl.h>
***************
*** 545,550 ****
--- 545,656 ----
      return ok_to_add;
  }
  
+ static void
+ add_token_to_list(afs_cred_list * l,
+                   khm_handle h_gcells,
+                   HKEY hk_gcells,
+                   const wchar_t * c_cell)
+ {
+     khm_size cb;
+     int i;
+     afs_cred_row * r;
+     khm_handle h_cell = NULL;
+     HKEY       hk_cell = NULL;
+     wchar_t wbuf[MAXCELLCHARS];
+     wchar_t wmethod[KHUI_MAXCCH_NAME];
+ 
+     if (FAILED(StringCbLength(c_cell, (MAXCELLCHARS + 1) * sizeof(wchar_t),
+                               &cb)))
+         return;
+     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)
+         return;
+ 
+     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);
+ 
+             /* 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, wmethod, sizeof(wmethod));
+ 
+             khc_write_string(h_cell, L"MethodName", wmethod);
+ 
+             khc_remove_value(h_cell, L"Method", 0);
+         } else {
+             r->method = AFS_TOKEN_AUTO;
+         }
+ 
+         cb = sizeof(wbuf);
+         if (KHM_SUCCEEDED(khc_read_string(h_cell, L"Realm", wbuf, &cb)) &&
+             cb > sizeof(wchar_t)) {
+             r->realm = PMALLOC(cb);
+             StringCbCopy(r->realm, cb, wbuf);
+         } else {
+             r->realm = NULL;
+         }
+ 
+         khc_close_space(h_cell);
+         h_cell = NULL;
+     } else if (hk_gcells &&
+                RegOpenKeyEx(hk_gcells, c_cell, 0, KEY_READ, &hk_cell) == ERROR_SUCCESS) {
+ 
+         DWORD cbd;
+ 
+         cbd = sizeof(wmethod);
+         if (RegQueryValueEx(hk_cell, L"MethodName", NULL, NULL, (LPBYTE) wmethod, &cbd) == ERROR_SUCCESS) {
+             r->method = afs_get_method_id(wmethod);
+         } else {
+             r->method = AFS_TOKEN_AUTO;
+         }
+ 
+         cbd = sizeof(wbuf);
+         if (RegQueryValueEx(hk_cell, L"Realm", NULL, NULL, (LPBYTE) wbuf, &cbd) == ERROR_SUCCESS) {
+             cbd += sizeof(wchar_t);
+             r->realm = PMALLOC(cbd);
+             ZeroMemory(r->realm, cbd);
+             StringCbCopy(r->realm, cbd, wbuf);
+         } else {
+             r->realm = NULL;
+         }
+ 
+         RegCloseKey(hk_cell);
+ 
+     } else {
+         r->realm = NULL;
+         r->method = AFS_TOKEN_AUTO;
+     }
+ 
+     r->flags = 0;
+ }
+ 
  
  void 
  afs_cred_get_identity_creds(afs_cred_list * l, 
***************
*** 598,667 ****
  
      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 = AFS_TOKEN_AUTO;
!         r->flags = DLGROW_FLAG_CONFIG;
! 
!         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) {
--- 704,710 ----
  
      s = ms;
      for(s = ms; s && *s; s = multi_string_next(s)) {
!         add_token_to_list(l, h_cells, NULL, s);
      }
  
      if(ms) {
***************
*** 675,685 ****
          /* 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);
  
--- 718,725 ----
***************
*** 688,730 ****
              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;
              }
          }
  
--- 728,734 ----
              AnsiStrToUnicode(wbuf, sizeof(wbuf), buf);
  
              if (afs_check_add_token_to_identity(wbuf, ident, NULL)) {
!                 add_token_to_list(l, h_gcells, NULL, wbuf);
              }
          }
  
***************
*** 746,812 ****
              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;
  
!                 {
!                     char cell[MAXCELLCHARS];
  
!                     UnicodeStrToAnsi(cell, sizeof(cell), c_cell);
  
!                     if (!afs_check_for_cell_realm_match(ident, cell))
!                         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);
          }
      }
  
--- 750,843 ----
              for (c_cell = defcells;
                   c_cell && *c_cell;
                   c_cell = multi_string_next(c_cell)) {
+                 char cell[MAXCELLCHARS];
  
!                 UnicodeStrToAnsi(cell, sizeof(cell), c_cell);
  
!                 if (!afs_check_for_cell_realm_match(ident, cell))
                      continue;
  
!                 add_token_to_list(l, h_gcells, NULL, c_cell);
                  }
  
!             PFREE(defcells);
!         }
  
!         /* Check HKLM\Software\OpenAFS\Client\Realms\<Realm> registry key as well */
!         {
!             wchar_t idname[KCDB_IDENT_MAXCCH_NAME];
!             wchar_t * realm;
!             wchar_t * cell=NULL;
!             khm_size cb;
!             HKEY hk_realms = NULL, hk_realm = NULL;
  
!             cb = sizeof(idname);
!             kcdb_identity_get_name(ident, idname, &cb);
  
!             realm = wcsrchr(idname, L'@');
!             if (realm == NULL || realm[1] == L'\0')
!                 goto _done_realms;
  
!             realm++;
  
!             if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SOFTWARE\\OpenAFS\\Client\\Realms", 0, KEY_READ, &hk_realms) != ERROR_SUCCESS)
!                 goto _done_realms;
  
!             if (RegOpenKeyEx(hk_realms, realm, 0, KEY_READ, &hk_realm) != ERROR_SUCCESS)
!                 goto _done_realms;
  
!             if (penabled) {
!                 DWORD enabled = 1;
!                 DWORD cbd;
  
!                 cbd = sizeof(enabled);
  
!                 if (RegQueryValueEx(hk_realm, L"AFSEnabled",
!                                     NULL, NULL, (LPBYTE) &enabled, &cbd) == ERROR_SUCCESS) {
!                     *penabled = !!enabled;
                  }
+             }
+ 
+             {
+                 DWORD dwNumCells=0, dwMaxCellLen=0, dwIndex, dwCellBufSz;
+ 
+                 RegQueryInfoKey( hk_realm,
+                                  NULL,  /* lpClass */
+                                  NULL,  /* lpcClass */
+                                  NULL,  /* lpReserved */
+                                  &dwNumCells,  /* lpcSubKeys */
+                                  &dwMaxCellLen,  /* lpcMaxSubKeyLen */
+                                  NULL,  /* lpcMaxClassLen */
+                                  NULL, /* lpcValues */
+                                  NULL,  /* lpcMaxValueNameLen */
+                                  NULL,  /* lpcMaxValueLen */
+                                  NULL,  /* lpcbSecurityDescriptor */
+                                  NULL   /* lpftLastWriteTime */
+                                  );
+ 
+                 dwCellBufSz = (dwMaxCellLen + 1) * sizeof(wchar_t);
+                 cell = PMALLOC(dwCellBufSz);
+                 ZeroMemory(cell, dwCellBufSz);
  
!                 for ( dwIndex=0; dwIndex < dwNumCells; dwIndex++ ) {
!                     if (RegEnumKey( hk_realm, dwIndex, cell, dwCellBufSz) != ERROR_SUCCESS)
!                         goto _done_realms;
! 
!                     if (afs_check_add_token_to_identity(cell, ident, NULL))
!                         add_token_to_list(l, NULL, hk_realm, cell);
!                 }
              }
  
!         _done_realms:
! 
!             if (hk_realm)
!                 RegCloseKey(hk_realm);
! 
!             if (hk_realms)
!                 RegCloseKey(hk_realms);
! 
!             if (cell)
!                 PFREE(cell);
          }
      }
  
Index: openafs/src/afs/afs_call.c
diff -c openafs/src/afs/afs_call.c:1.86.4.19 openafs/src/afs/afs_call.c:1.86.4.20
*** openafs/src/afs/afs_call.c:1.86.4.19	Mon Dec 10 17:42:30 2007
--- openafs/src/afs/afs_call.c	Wed Jan 30 16:05:47 2008
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_call.c,v 1.86.4.19 2007/12/10 22:42:30 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_call.c,v 1.86.4.20 2008/01/30 21:05:47 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 540,545 ****
--- 540,546 ----
  #endif /* RXK_LISTENER_ENV */
  	    afs_osi_Invisible();
  	    afs_RXCallBackServer();
+ 	    afs_osi_Visible();
  	}
  #ifdef AFS_SGI_ENV
  	AFS_GUNLOCK();
***************
*** 568,573 ****
--- 569,575 ----
  	    afs_osi_RxkRegister();
  #endif /* !UKERNEL */
  	    rxk_Listener();
+ 	    afs_osi_Visible();
  	}
  #ifdef	AFS_SGI_ENV
  	AFS_GUNLOCK();
***************
*** 587,592 ****
--- 589,595 ----
  	afs_osi_Wakeup(&afs_initState);
  	afs_osi_Invisible();
  	afs_Daemon();
+ 	afs_osi_Visible();
  #ifdef AFS_SGI_ENV
  	AFS_GUNLOCK();
  	exit(CLD_EXITED, 0);
***************
*** 594,599 ****
--- 597,603 ----
      } else if (parm == AFSOP_START_CS) {
  	afs_osi_Invisible();
  	afs_CheckServerDaemon();
+ 	afs_osi_Visible();
  #ifdef AFS_SGI_ENV
  	AFS_GUNLOCK();
  	exit(CLD_EXITED, 0);
***************
*** 613,618 ****
--- 617,623 ----
  	else
  #endif /* AFS_AIX32_ENV */
  	    afs_BackgroundDaemon();
+ 	afs_osi_Visible();
  #ifdef AFS_SGI_ENV
  	AFS_GUNLOCK();
  	exit(CLD_EXITED, 0);
***************
*** 623,628 ****
--- 628,634 ----
  	/* start the bkg daemon */
  	afs_osi_Invisible();
  	afs_CacheTruncateDaemon();
+ 	afs_osi_Visible();
  #ifdef	AFS_SGI_ENV
  	AFS_GUNLOCK();
  	exit(CLD_EXITED, 0);
***************
*** 634,639 ****
--- 640,646 ----
  	    afs_osi_Sleep(&afs_initState);
  	afs_osi_Invisible();
  	afs_rxevent_daemon();
+ 	afs_osi_Visible();
  #ifdef AFS_SGI_ENV
  	AFS_GUNLOCK();
  	exit(CLD_EXITED, 0);
Index: openafs/src/afs/afs_cell.c
diff -c openafs/src/afs/afs_cell.c:1.34.4.6 openafs/src/afs/afs_cell.c:1.34.4.7
*** openafs/src/afs/afs_cell.c:1.34.4.6	Tue Dec  4 15:31:07 2007
--- openafs/src/afs/afs_cell.c	Sun Jan 27 20:39:18 2008
***************
*** 14,20 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_cell.c,v 1.34.4.6 2007/12/04 20:31:07 shadow Exp $");
  
  #include "afs/stds.h"
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
--- 14,20 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_cell.c,v 1.34.4.7 2008/01/28 01:39:18 shadow Exp $");
  
  #include "afs/stds.h"
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
***************
*** 158,170 ****
  	ObtainReadLock(&afsdb_req_lock);
      };
  
-     afs_osi_FreeStr(afsdb_req.cellname);
      ReleaseReadLock(&afsdb_req_lock);
      ReleaseWriteLock(&afsdb_client_lock);
  
!     if (afsdb_req.cellname) 
  	return 0;
!     else
  	return ENOENT;
  }
  #endif
--- 158,169 ----
  	ObtainReadLock(&afsdb_req_lock);
      };
  
      ReleaseReadLock(&afsdb_req_lock);
      ReleaseWriteLock(&afsdb_client_lock);
  
!     if (afsdb_req.cellname) {
  	return 0;
!     } else
  	return ENOENT;
  }
  #endif
Index: openafs/src/afs/afs_osi.c
diff -c openafs/src/afs/afs_osi.c:1.58.2.4 openafs/src/afs/afs_osi.c:1.58.2.6
*** openafs/src/afs/afs_osi.c:1.58.2.4	Thu Dec 28 16:49:33 2006
--- openafs/src/afs/afs_osi.c	Tue Feb  5 20:32:13 2008
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_osi.c,v 1.58.2.4 2006/12/28 21:49:33 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.c,v 1.58.2.6 2008/02/06 01:32:13 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 177,185 ****
  void
  afs_osi_RxkRegister(void)
  {
- #ifdef AFS_LINUX22_ENV
-     osi_linux_rxkreg();
- #endif
  }
  
  /* procedure for making our processes as invisible as we can */
--- 177,182 ----
***************
*** 205,210 ****
--- 202,220 ----
      AFS_STATCNT(osi_Invisible);
  }
  
+ void
+ afs_osi_Visible(void)
+ {
+ #if defined(AFS_SUN5_ENV)
+     curproc->p_flag &= ~SSYS;
+ #elif defined(AFS_DARWIN80_ENV)
+ #elif defined(AFS_DARWIN_ENV)
+     /* maybe call init_process instead? */
+     current_proc()->p_flag &= ~P_SYSTEM;
+ #elif defined(AFS_XBSD_ENV)
+     curproc->p_flag &= ~P_SYSTEM;
+ #endif
+ }
  
  #if !defined(AFS_LINUX20_ENV) && !defined(AFS_FBSD_ENV)
  /* set the real time */
Index: openafs/src/afs/afs_prototypes.h
diff -c openafs/src/afs/afs_prototypes.h:1.74.2.10 openafs/src/afs/afs_prototypes.h:1.74.2.13
*** openafs/src/afs/afs_prototypes.h:1.74.2.10	Fri Nov 23 09:32:56 2007
--- openafs/src/afs/afs_prototypes.h	Sun Feb 10 23:00:47 2008
***************
*** 499,504 ****
--- 499,505 ----
  /* afs_osi.c */
  extern afs_lock_t afs_ftf;
  extern void afs_osi_Invisible(void);
+ extern void afs_osi_Visible(void);
  extern void afs_osi_RxkRegister(void);
  extern void afs_osi_MaskSignals(void);
  extern void afs_osi_UnmaskRxkSignals(void);
***************
*** 591,597 ****
  #endif
  extern void osi_linux_mask(void);
  extern void osi_linux_unmask(void);
- extern void osi_linux_rxkreg(void);
  extern int setpag(cred_t ** cr, afs_uint32 pagvalue, afs_uint32 * newpag,
  		  int change_parent);
  #endif
--- 592,597 ----
***************
*** 850,855 ****
--- 850,858 ----
  #ifndef afs_strchr
  extern char *afs_strchr(char *s, int c);
  #endif
+ #ifndef afs_strrchr
+ extern char *afs_strrchr(char *s, int c);
+ #endif
  extern char *afs_strdup(char *s);
  extern void print_internet_address(char *preamble, struct srvAddr *sa,
  				   char *postamble, int flag);
Index: openafs/src/afs/afs_util.c
diff -c openafs/src/afs/afs_util.c:1.28.2.6 openafs/src/afs/afs_util.c:1.28.2.7
*** openafs/src/afs/afs_util.c:1.28.2.6	Thu Jul 26 13:05:40 2007
--- openafs/src/afs/afs_util.c	Sun Feb 10 23:00:47 2008
***************
*** 16,22 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_util.c,v 1.28.2.6 2007/07/26 17:05:40 shadow Exp $");
  
  #include "afs/stds.h"
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
--- 16,22 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_util.c,v 1.28.2.7 2008/02/11 04:00:47 shadow Exp $");
  
  #include "afs/stds.h"
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
***************
*** 136,141 ****
--- 136,154 ----
      return NULL;
  }
  #endif
+ #ifndef afs_strrchr
+ char *
+ afs_strrchr(char *s, int c)
+ {
+     char *p = NULL;
+     
+     do {
+ 	if (*s == c)
+ 	    p = (char*) s;
+     } while (*s++);
+     return p;
+ }
+ #endif
  
  char *
  afs_strdup(char *s)
Index: openafs/src/afs/DARWIN/osi_vnodeops.c
diff -c openafs/src/afs/DARWIN/osi_vnodeops.c:1.41.2.10 openafs/src/afs/DARWIN/osi_vnodeops.c:1.41.2.11
*** openafs/src/afs/DARWIN/osi_vnodeops.c:1.41.2.10	Tue Nov 27 15:02:35 2007
--- openafs/src/afs/DARWIN/osi_vnodeops.c	Sun Feb 10 23:00:48 2008
***************
*** 5,11 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_vnodeops.c,v 1.41.2.10 2007/11/27 20:02:35 shadow Exp $");
  
  #include <afs/sysincludes.h>	/* Standard vendor system headers */
  #include <afsincludes.h>	/* Afs-based standard headers */
--- 5,11 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_vnodeops.c,v 1.41.2.11 2008/02/11 04:00:48 shadow Exp $");
  
  #include <afs/sysincludes.h>	/* Standard vendor system headers */
  #include <afsincludes.h>	/* Afs-based standard headers */
***************
*** 1420,1427 ****
  #if !defined(AFS_DARWIN80_ENV) 
      VOP_UNLOCK(fvp, 0, p);
  #endif
!     FREE(fname, M_TEMP);
!     FREE(tname, M_TEMP);
  #ifdef AFS_DARWIN80_ENV
      cache_purge(fdvp);
      cache_purge(fvp);
--- 1420,1437 ----
  #if !defined(AFS_DARWIN80_ENV) 
      VOP_UNLOCK(fvp, 0, p);
  #endif
! #ifdef notdef
!     if (error == EXDEV) {
! 	/* The idea would be to have a userspace handler like afsdb to
! 	 * run mv as the user, thus:
! 	 */
! 	printf("su %d -c /bin/mv /afs/.:mount/%d:%d:%d:%d/%s /afs/.:mount/%d:%d:%d:%d/%s\n",
! 	       (cn_cred(tcnp))->cr_uid, fvc->fid.Cell, fvc->fid.Fid.Volume,
! 	       fvc->fid.Fid.Vnode, fvc->fid.Fid.Unique, fname, 
! 	       tvc->fid.Cell, tvc->fid.Fid.Volume, tvc->fid.Fid.Vnode, 
! 	       tvc->fid.Fid.Unique, tname);
!     }
! #endif
  #ifdef AFS_DARWIN80_ENV
      cache_purge(fdvp);
      cache_purge(fvp);
***************
*** 1446,1451 ****
--- 1456,1463 ----
      vrele(fdvp);
      vrele(fvp);
  #endif
+     FREE(fname, M_TEMP);
+     FREE(tname, M_TEMP);
      return error;
  }
  
Index: openafs/src/afs/FBSD/osi_vnodeops.c
diff -c openafs/src/afs/FBSD/osi_vnodeops.c:1.22 openafs/src/afs/FBSD/osi_vnodeops.c:1.22.6.1
*** openafs/src/afs/FBSD/osi_vnodeops.c:1.22	Fri Apr 29 17:55:58 2005
--- openafs/src/afs/FBSD/osi_vnodeops.c	Tue Jan 15 01:09:11 2008
***************
*** 48,54 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/FBSD/osi_vnodeops.c,v 1.22 2005/04/29 21:55:58 rees Exp $");
  
  #include <afs/sysincludes.h>	/* Standard vendor system headers */
  #include <afsincludes.h>	/* Afs-based standard headers */
--- 48,54 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/FBSD/osi_vnodeops.c,v 1.22.6.1 2008/01/15 06:09:11 shadow Exp $");
  
  #include <afs/sysincludes.h>	/* Standard vendor system headers */
  #include <afsincludes.h>	/* Afs-based standard headers */
***************
*** 746,752 ****
--- 746,756 ----
  	     * now tell them that it is ok to use.
  	     */
  	    if (!code) {
+ #if defined(AFS_FBSD70_ENV)
+ 		if(0) /* XXXX fixme for 7.0 */
+ #else
  		if (m->flags & PG_WANTED)
+ #endif
  		    vm_page_activate(m);
  		else
  		    vm_page_deactivate(m);
Index: openafs/src/afs/LINUX/osi_groups.c
diff -c openafs/src/afs/LINUX/osi_groups.c:1.28.4.8 openafs/src/afs/LINUX/osi_groups.c:1.28.4.11
*** openafs/src/afs/LINUX/osi_groups.c:1.28.4.8	Wed Aug 22 15:39:03 2007
--- openafs/src/afs/LINUX/osi_groups.c	Wed Jan 30 12:30:41 2008
***************
*** 20,26 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_groups.c,v 1.28.4.8 2007/08/22 19:39:03 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.11 2008/01/30 17:30:41 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
***************
*** 223,229 ****
--- 223,233 ----
  }
  
  #ifdef LINUX_KEYRING_SUPPORT
+ #ifdef EXPORTS_KEY_TYPE_KEYRING
+ static struct key_type *__key_type_keyring = &key_type_keyring;
+ #else
  static struct key_type *__key_type_keyring;
+ #endif
  
  static int
  install_session_keyring(struct task_struct *task, struct key *keyring)
***************
*** 623,628 ****
--- 627,633 ----
  
  void osi_keyring_init(void)
  {
+ #ifndef EXPORTS_KEY_TYPE_KEYRING
      struct task_struct *p;
  #ifdef EXPORTED_TASKLIST_LOCK
      if (&tasklist_lock)
***************
*** 647,652 ****
--- 652,658 ----
  #endif
        rcu_read_unlock();
  #endif
+ #endif
  
      register_key_type(&key_type_afs_pag);
  }
Index: openafs/src/afs/LINUX/osi_misc.c
diff -c openafs/src/afs/LINUX/osi_misc.c:1.44.4.3 openafs/src/afs/LINUX/osi_misc.c:1.44.4.4
*** openafs/src/afs/LINUX/osi_misc.c:1.44.4.3	Mon Jul 31 17:27:39 2006
--- openafs/src/afs/LINUX/osi_misc.c	Wed Jan 30 12:26:01 2008
***************
*** 15,21 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_misc.c,v 1.44.4.3 2006/07/31 21:27:39 shadow Exp $");
  
  #include <linux/module.h> /* early to avoid printf->printk mapping */
  #include "afs/sysincludes.h"
--- 15,21 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_misc.c,v 1.44.4.4 2008/01/30 17:26:01 shadow Exp $");
  
  #include <linux/module.h> /* early to avoid printf->printk mapping */
  #include "afs/sysincludes.h"
***************
*** 65,72 ****
  #endif
  }
  
- struct task_struct *rxk_ListenerTask;
- 
  void
  osi_linux_mask(void)
  {
--- 65,70 ----
***************
*** 76,88 ****
      SIG_UNLOCK(current);
  }
  
- void
- osi_linux_rxkreg(void)
- {
-     rxk_ListenerTask = current;
- }
- 
- 
  #if defined(AFS_LINUX24_ENV)
  /* LOOKUP_POSITIVE is becoming the default */
  #ifndef LOOKUP_POSITIVE
--- 74,79 ----
Index: openafs/src/afs/SOLARIS/osi_vfsops.c
diff -c openafs/src/afs/SOLARIS/osi_vfsops.c:1.18.14.4 openafs/src/afs/SOLARIS/osi_vfsops.c:1.18.14.5
*** openafs/src/afs/SOLARIS/osi_vfsops.c:1.18.14.4	Thu Nov  1 12:57:37 2007
--- openafs/src/afs/SOLARIS/osi_vfsops.c	Mon Jan 21 12:37:30 2008
***************
*** 14,20 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/SOLARIS/osi_vfsops.c,v 1.18.14.4 2007/11/01 16:57:37 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 14,20 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/SOLARIS/osi_vfsops.c,v 1.18.14.5 2008/01/21 17:37:30 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 103,108 ****
--- 103,109 ----
      register afs_int32 code = 0;
      struct vrequest treq;
      register struct vcache *tvp = 0;
+     struct vcache *gvp;
      struct proc *proc = ttoproc(curthread);
      struct vnode *vp = afsp->vfs_vnodecovered;
      int locked = 0;
***************
*** 118,123 ****
--- 119,125 ----
  
      AFS_STATCNT(afs_root);
  
+ again:
      if (afs_globalVp && (afs_globalVp->states & CStatd)) {
  	tvp = afs_globalVp;
      } else {
***************
*** 128,135 ****
  	}
  
  	if (afs_globalVp) {
! 	    afs_PutVCache(afs_globalVp);
  	    afs_globalVp = NULL;
  	}
  
  	if (!(code = afs_InitReq(&treq, proc->p_cred))
--- 130,138 ----
  	}
  
  	if (afs_globalVp) {
! 	    gvp = afs_globalVp;
  	    afs_globalVp = NULL;
+ 	    afs_PutVCache(gvp);
  	}
  
  	if (!(code = afs_InitReq(&treq, proc->p_cred))
***************
*** 137,142 ****
--- 140,151 ----
  	    tvp = afs_GetVCache(&afs_rootFid, &treq, NULL, NULL);
  	    /* we really want this to stay around */
  	    if (tvp) {
+ 		if (afs_globalVp) {
+ 		    /* someone else got there before us! */
+ 		    afs_PutVCache(tvp);
+ 		    tvp = 0;
+ 		    goto again;
+ 		}
  		afs_globalVp = tvp;
  	    } else
  		code = ENOENT;
Index: openafs/src/afs/UKERNEL/afs_usrops.c
diff -c openafs/src/afs/UKERNEL/afs_usrops.c:1.30.6.6 openafs/src/afs/UKERNEL/afs_usrops.c:1.30.6.7
*** openafs/src/afs/UKERNEL/afs_usrops.c:1.30.6.6	Mon Nov 26 16:08:40 2007
--- openafs/src/afs/UKERNEL/afs_usrops.c	Thu Jan 31 15:18:36 2008
***************
*** 15,21 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/UKERNEL/afs_usrops.c,v 1.30.6.6 2007/11/26 21:08:40 shadow Exp $");
  
  
  #ifdef	UKERNEL
--- 15,21 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/UKERNEL/afs_usrops.c,v 1.30.6.7 2008/01/31 20:18:36 shadow Exp $");
  
  
  #ifdef	UKERNEL
***************
*** 1004,1009 ****
--- 1004,1015 ----
      return;
  }
  
+ void
+ afs_osi_Visible(void)
+ {
+     return;
+ }
+ 
  int
  osi_GetTime(struct timeval *tv)
  {
Index: openafs/src/afs/VNOPS/afs_vnop_lookup.c
diff -c openafs/src/afs/VNOPS/afs_vnop_lookup.c:1.72.2.3 openafs/src/afs/VNOPS/afs_vnop_lookup.c:1.72.2.4
*** openafs/src/afs/VNOPS/afs_vnop_lookup.c:1.72.2.3	Mon Jul 31 17:27:40 2006
--- openafs/src/afs/VNOPS/afs_vnop_lookup.c	Sun Feb 10 23:00:49 2008
***************
*** 18,24 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_lookup.c,v 1.72.2.3 2006/07/31 21:27:40 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 18,24 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_lookup.c,v 1.72.2.4 2008/02/11 04:00:49 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 57,63 ****
  static int
  EvalMountData(char type, char *data, afs_uint32 states, afs_uint32 cellnum,
                struct volume **avolpp, register struct vrequest *areq,
! 	      afs_uint32 *acellidxp, afs_uint32 *avolnump)
  {
      struct volume *tvp = 0;
      struct VenusFid tfid;
--- 57,63 ----
  static int
  EvalMountData(char type, char *data, afs_uint32 states, afs_uint32 cellnum,
                struct volume **avolpp, register struct vrequest *areq,
! 	      afs_uint32 *acellidxp, afs_uint32 *avolnump, afs_uint32 *avnoidp)
  {
      struct volume *tvp = 0;
      struct VenusFid tfid;
***************
*** 67,79 ****
      afs_int32 prefetch;		/* 1=>None  2=>RO  3=>BK */
      afs_int32 mtptCell, assocCell = 0, hac = 0;
      afs_int32 samecell, roname, len;
!     afs_uint32 volid, cellidx;
  
      cpos = afs_strchr(data, ':');	/* if cell name present */
      if (cpos) {
  	volnamep = cpos + 1;
  	*cpos = 0;
! 	tcell = afs_GetCellByName(data, READ_LOCK);
  	*cpos = ':';
      } else if (cellnum) {
  	volnamep = data;
--- 67,87 ----
      afs_int32 prefetch;		/* 1=>None  2=>RO  3=>BK */
      afs_int32 mtptCell, assocCell = 0, hac = 0;
      afs_int32 samecell, roname, len;
!     afs_uint32 volid, cellidx, vnoid = 0;
  
      cpos = afs_strchr(data, ':');	/* if cell name present */
      if (cpos) {
+ 	cellnum = 0;
  	volnamep = cpos + 1;
  	*cpos = 0;
! 	for (x = data; *x >= '0' && *x <= '9'; x++)
! 	    cellnum = (cellnum * 10) + (*x - '0');
! 	if (cellnum && !*x)
! 	    tcell = afs_GetCell(cellnum, READ_LOCK);
! 	else {
! 	    tcell = afs_GetCellByName(data, READ_LOCK);
! 	               cellnum = 0;
! 	}
  	*cpos = ':';
      } else if (cellnum) {
  	volnamep = data;
***************
*** 92,101 ****
--- 100,121 ----
      }
      afs_PutCell(tcell, READ_LOCK);
  
+     cpos = afs_strrchr(volnamep, ':'); /* if vno present */
+     if (cpos) 
+ 	*cpos = 0;
      /* Look for an all-numeric volume ID */
      volid = 0;
      for (x = volnamep; *x >= '0' && *x <= '9'; x++)
  	volid = (volid * 10) + (*x - '0');
+     if (cpos) {
+ 	*cpos = ':';
+ 	vnoid = 0;
+ 	if (!*x) /* allow vno with numeric volid only */
+ 	    for (x = (cpos + 1); *x >= '0' && *x <= '9'; x++)
+ 		vnoid = (vnoid * 10) + (*x - '0');
+ 	if (*x)
+ 	    vnoid = 0;
+     }
  
      /*
       * If the volume ID was all-numeric, and they didn't ask for a
***************
*** 108,113 ****
--- 128,135 ----
  	    *acellidxp = cellidx;
  	if (avolnump)
  	    *avolnump = volid;
+ 	if (avnoidp)
+ 	    *avnoidp = vnoid;
  	return 0;
      }
  
***************
*** 221,226 ****
--- 243,250 ----
  	*acellidxp = cellidx;
      if (avolnump)
  	*avolnump = tvp->volume;
+     if (avnoidp)
+ 	*avnoidp = vnoid;
      if (avolpp)
  	*avolpp = tvp;
      else
***************
*** 233,238 ****
--- 257,263 ----
  	       struct volume **avolpp, register struct vrequest *areq)
  {
      afs_int32 code;
+     afs_uint32 avnoid;
  
      AFS_STATCNT(EvalMountPoint);
  #ifdef notdef
***************
*** 246,260 ****
  
      /* Determine which cell and volume the mointpoint goes to */
      code = EvalMountData(avc->linkData[0], avc->linkData + 1,
!                          avc->states, avc->fid.Cell, avolpp, areq, 0, 0);
      if (code) return code;
  
      if (avc->mvid == 0)
  	avc->mvid =
  	    (struct VenusFid *)osi_AllocSmallSpace(sizeof(struct VenusFid));
      avc->mvid->Cell = (*avolpp)->cell;
      avc->mvid->Fid.Volume = (*avolpp)->volume;
!     avc->mvid->Fid.Vnode = 1;
      avc->mvid->Fid.Unique = 1;
      avc->states |= CMValid;
  
--- 271,289 ----
  
      /* Determine which cell and volume the mointpoint goes to */
      code = EvalMountData(avc->linkData[0], avc->linkData + 1,
!                          avc->states, avc->fid.Cell, avolpp, areq, 0, 0,
! 			 &avnoid);
      if (code) return code;
  
+     if (!avnoid)
+ 	avnoid = 1;
+ 
      if (avc->mvid == 0)
  	avc->mvid =
  	    (struct VenusFid *)osi_AllocSmallSpace(sizeof(struct VenusFid));
      avc->mvid->Cell = (*avolpp)->cell;
      avc->mvid->Fid.Volume = (*avolpp)->volume;
!     avc->mvid->Fid.Vnode = avnoid;
      avc->mvid->Fid.Unique = 1;
      avc->states |= CMValid;
  
***************
*** 1334,1342 ****
       */
      if (afs_IsDynrootMount(adp)) {
  	struct VenusFid tfid;
! 	afs_uint32 cellidx, volid;
  
! 	code = EvalMountData('%', aname, 0, 0, NULL, &treq, &cellidx, &volid);
  	if (code)
  	    goto done;
  	afs_GetDynrootMountFid(&tfid);
--- 1363,1371 ----
       */
      if (afs_IsDynrootMount(adp)) {
  	struct VenusFid tfid;
! 	afs_uint32 cellidx, volid, vnoid;
  
! 	code = EvalMountData('%', aname, 0, 0, NULL, &treq, &cellidx, &volid, &vnoid);
  	if (code)
  	    goto done;
  	afs_GetDynrootMountFid(&tfid);
Index: openafs/src/afsd/afs.rc.darwin
diff -c openafs/src/afsd/afs.rc.darwin:1.8 openafs/src/afsd/afs.rc.darwin:1.8.2.1
*** openafs/src/afsd/afs.rc.darwin:1.8	Tue Feb 14 19:37:28 2006
--- openafs/src/afsd/afs.rc.darwin	Mon Jan 21 15:57:23 2008
***************
*** 36,54 ****
  if [ -x /usr/sbin/kextstat ]; then KMODSTAT=/usr/sbin/kextstat; fi
  if [ -x /usr/sbin/kmodstat ]; then KMODSTAT=/usr/sbin/kmodstat; fi
  
  
  StartService()
  {
      echo "Starting OpenAFS"
  
!     if [ -f $AFSDOPT ]; then
! 	OPTIONS=`cat $AFSDOPT`
      else
! 	OPTIONS="$MEDIUM -fakestat"
      fi
  
      if [ "${NETWORKUP}" = "-NO-" ]; then
!         echo $OPTIONS | grep -e '-dynroot' || exit
      fi
  
  # Need the commands ps, awk, kill, sleep
--- 36,63 ----
  if [ -x /usr/sbin/kextstat ]; then KMODSTAT=/usr/sbin/kextstat; fi
  if [ -x /usr/sbin/kmodstat ]; then KMODSTAT=/usr/sbin/kmodstat; fi
  
+ if [ -f $CONFIG/afs.conf ]; then
+     . $CONFIG/afs.conf
+ fi
+ 
+ # Check this file second so that if users have altered the file, it will
+ # override the default options
+ if [ -f $AFSDOPT ]; then
+     OPTIONS=`cat $AFSDOPT`
+ fi
  
  StartService()
  {
      echo "Starting OpenAFS"
  
!     if [ -z "$OPTIONS" ] || [ "$OPTIONS" = "AUTOMATIC" ] ; then
! 	AFSD_OPTIONS="$VERBOSE"
      else
! 	AFSD_OPTIONS="$OPTIONS $VERBOSE"
      fi
  
      if [ "${NETWORKUP}" = "-NO-" ]; then
!         echo $AFSD_OPTIONS | grep -e '-dynroot' || exit
      fi
  
  # Need the commands ps, awk, kill, sleep
***************
*** 76,82 ****
      if [ -x /usr/afs/bin/bosserver ]; then
  	echo "Starting AFS Server processes"
  	/usr/afs/bin/bosserver
! 	OPTIONS="$OPTIONS -nosettime"
  	sleep 30
      fi
  
--- 85,91 ----
      if [ -x /usr/afs/bin/bosserver ]; then
  	echo "Starting AFS Server processes"
  	/usr/afs/bin/bosserver
! 	AFSD_OPTIONS="$AFSD_OPTIONS -nosettime"
  	sleep 30
      fi
  
***************
*** 107,113 ****
      done
  
      echo "Starting afsd"
!     $AFSD $OPTIONS
  
  #
  # Call afssettings (if it exists) to set customizable parameters
--- 116,128 ----
      done
  
      echo "Starting afsd"
!     $AFSD $AFSD_OPTIONS
! 
! #
! # From /var/db/openafs/etc/config/afs.conf, call a post-init function or
! # command if it's been defined
! #
!     $AFS_POST_INIT
  
  #
  # Call afssettings (if it exists) to set customizable parameters
***************
*** 118,123 ****
--- 133,146 ----
      fi
  
  #
+ # From /var/db/openafs/etc/config/afs.conf, set a sysname list if one was
+ # configured.
+ #
+     if [ -n "$AFS_SYSNAME" ] ; then
+ 	fs sysname $AFS_SYSNAME
+     fi
+ 
+ #
  # Run package to update the disk
  #
      if [ -f /usr/afsws/etc/package -a -f $PACKAGE ]; then
***************
*** 151,156 ****
--- 174,185 ----
  {
      echo "Stopping AFS"
  
+ #
+ # If a pre-shutdown function was defined in /var/db/openafs/etc/config/afs.conf
+ # was defined, then run it
+ #
+     $AFS_PRE_SHUTDOWN
+ 
      if $KMODSTAT | perl -e 'exit not grep /openafs/, <>' ; then
  	echo "Unmounting /afs"
  	umount -f /afs 2>&1 > /dev/console
Index: openafs/src/afsd/afs.rc.linux
diff -c openafs/src/afsd/afs.rc.linux:1.12 openafs/src/afsd/afs.rc.linux:1.12.4.1
*** openafs/src/afsd/afs.rc.linux:1.12	Sun Oct  2 23:13:26 2005
--- openafs/src/afsd/afs.rc.linux	Mon Jan 21 16:04:53 2008
***************
*** 58,64 ****
     echo
  }
  
! SYSCNF=/etc/sysconfig/afs
  KERNEL_VERSION=`uname -r`
  
  # Gather up options and post startup script name, if present
--- 58,64 ----
     echo
  }
  
! SYSCNF=${SYSCNF:-/etc/sysconfig/afs}
  KERNEL_VERSION=`uname -r`
  
  # Gather up options and post startup script name, if present
***************
*** 69,74 ****
--- 69,78 ----
  CACHEINFO=${CACHEINFO:-/usr/vice/etc/cacheinfo}
  CACHE=${CACHEDIR:-/usr/vice/cache}
  AFS=${AFSDIR:-/afs}
+ AFSD=${AFSD:-/usr/vice/etc/afsd}
+ BOSSERVER=${BOSSERVER:-/usr/afs/bin/bosserver}
+ BOS=${BOS:-/usr/bin/bos}
+ KILLAFS=${KILLAFS:-/usr/vice/etc/killafs}
  
  # is_on returns 1 if value of arg is "on"
  is_on() {
***************
*** 183,189 ****
  	esac
  }
  
! MODLOADDIR=/usr/vice/etc/modload
  # load_client loads the AFS client module if it's not already loaded. 
  load_client() {
  	# If LIBAFS is set, use it.
--- 187,193 ----
  	esac
  }
  
! MODLOADDIR=${MODLOADDIR:-/usr/vice/etc/modload}
  # load_client loads the AFS client module if it's not already loaded. 
  load_client() {
  	# If LIBAFS is set, use it.
***************
*** 279,291 ****
  
  	echo "Starting AFS services..... "
  	# Start bosserver, it if exists
! 	if  is_on $AFS_SERVER && test -x /usr/afs/bin/bosserver  ; then
! 		/usr/afs/bin/bosserver 
  		test "$afs_rh" && touch /var/lock/subsys/afs
  		if is_on $WAIT_FOR_SALVAGE; then
  			# wait for fileserver to finish salvaging
  			sleep 10
! 			while /usr/bin/bos status localhost fs 2>&1 | grep 'Auxiliary.*salvaging'; do
  				echo "Waiting for salvager to finish..... "
  				sleep 10
  			done
--- 283,295 ----
  
  	echo "Starting AFS services..... "
  	# Start bosserver, it if exists
! 	if  is_on $AFS_SERVER && test -x $BOSSERVER  ; then
! 		$BOSSERVER 
  		test "$afs_rh" && touch /var/lock/subsys/afs
  		if is_on $WAIT_FOR_SALVAGE; then
  			# wait for fileserver to finish salvaging
  			sleep 10
! 			while $BOS status localhost fs 2>&1 | grep 'Auxiliary.*salvaging'; do
  				echo "Waiting for salvager to finish..... "
  				sleep 10
  			done
***************
*** 293,302 ****
  	fi
  
  	# Start AFS client
! 	if  is_on $AFS_CLIENT && test -x /usr/vice/etc/afsd  ; then
  		generate_cacheinfo
  		choose_afsdoptions
! 		/usr/vice/etc/afsd ${AFSD_OPTIONS}
  		test "$afs_rh" && touch /var/lock/subsys/afs
  		$AFS_POST_INIT
  	fi
--- 297,306 ----
  	fi
  
  	# Start AFS client
! 	if  is_on $AFS_CLIENT && test -x $AFSD  ; then
  		generate_cacheinfo
  		choose_afsdoptions
! 		$AFSD ${AFSD_OPTIONS}
  		test "$afs_rh" && touch /var/lock/subsys/afs
  		$AFS_POST_INIT
  	fi
***************
*** 309,324 ****
  	echo "Stopping AFS services..... "
  
  	if  is_on $AFS_CLIENT  ; then
! 		if [ -x /usr/vice/etc/killafs ] ; then
! 			runcmd "Sending all processes using /afs the TERM signal ..." /usr/vice/etc/killafs TERM
! 			runcmd "Sending all processes using /afs the KILL signal ..." /usr/vice/etc/killafs KILL
  		fi
  		umount /afs
  	fi
  
! 	if  is_on $AFS_SERVER && test -x /usr/bin/bos ; then
  		echo "Stopping AFS bosserver"
! 		/usr/bin/bos shutdown localhost -localauth -wait
  		killall -HUP bosserver
  	fi
  
--- 313,328 ----
  	echo "Stopping AFS services..... "
  
  	if  is_on $AFS_CLIENT  ; then
! 		if [ -x $KILLAFS ] ; then
! 			runcmd "Sending all processes using /afs the TERM signal ..." $KILLAFS TERM
! 			runcmd "Sending all processes using /afs the KILL signal ..." $KILLAFS KILL
  		fi
  		umount /afs
  	fi
  
! 	if  is_on $AFS_SERVER && test -x $BOS ; then
  		echo "Stopping AFS bosserver"
! 		$BOS shutdown localhost -localauth -wait
  		killall -HUP bosserver
  	fi
  
Index: openafs/src/auth/NTMakefile
diff -c openafs/src/auth/NTMakefile:1.10.4.2 openafs/src/auth/NTMakefile:1.10.4.3
*** openafs/src/auth/NTMakefile:1.10.4.2	Mon Jul  2 20:35:14 2007
--- openafs/src/auth/NTMakefile	Sat Feb  2 08:43:23 2008
***************
*** 85,91 ****
  
  
  $(SETKEY_EXEFILE): $(SETKEY_EXEOBJS) $(EXELIBS)
! 	$(EXECONLINK) dnsapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
--- 85,91 ----
  
  
  $(SETKEY_EXEFILE): $(SETKEY_EXEOBJS) $(EXELIBS)
! 	$(EXECONLINK) dnsapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
Index: openafs/src/bozo/NTMakefile
diff -c openafs/src/bozo/NTMakefile:1.10.4.1 openafs/src/bozo/NTMakefile:1.10.4.2
*** openafs/src/bozo/NTMakefile:1.10.4.1	Tue Jul  4 02:28:23 2006
--- openafs/src/bozo/NTMakefile	Sat Feb  2 08:43:24 2008
***************
*** 70,76 ****
  	$(DESTDIR)\lib\cm_dns.obj
  
  $(BOSSERVER_EXEFILE): $(BOSSERVER_EXEOBJS) $(BOSSERVER_EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
--- 70,76 ----
  	$(DESTDIR)\lib\cm_dns.obj
  
  $(BOSSERVER_EXEFILE): $(BOSSERVER_EXEOBJS) $(BOSSERVER_EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
***************
*** 107,113 ****
  
  
  $(RS_BOS_EXEFILE): $(BOS_EXEOBJS) $(BOS_EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
--- 107,113 ----
  
  
  $(RS_BOS_EXEFILE): $(BOS_EXEOBJS) $(BOS_EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
Index: openafs/src/bozo/bosserver.c
diff -c openafs/src/bozo/bosserver.c:1.32.2.7 openafs/src/bozo/bosserver.c:1.32.2.9
*** openafs/src/bozo/bosserver.c:1.32.2.7	Mon Nov 26 16:08:40 2007
--- openafs/src/bozo/bosserver.c	Sun Feb  3 22:51:41 2008
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bosserver.c,v 1.32.2.7 2007/11/26 21:08:40 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bosserver.c,v 1.32.2.9 2008/02/04 03:51:41 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 71,76 ****
--- 71,77 ----
  struct ktime bozo_nextRestartKT, bozo_nextDayKT;
  int bozo_newKTs;
  int rxBind = 0;
+ int rxkadDisableDotCheck = 0;
  
  #define ADDRSPERSITE 16         /* Same global is in rx/rx_user.c */
  afs_uint32 SHostAddrs[ADDRSPERSITE];
***************
*** 820,825 ****
--- 821,829 ----
  	else if (strcmp(argv[code], "-rxbind") == 0) {
  	    rxBind = 1;
  	}
+ 	else if (strcmp(argv[code], "-allow-dotted-principals") == 0) {
+ 	    rxkadDisableDotCheck = 1;
+ 	}
  	else if (!strcmp(argv[i], "-rxmaxmtu")) {
  	    if ((i + 1) >= argc) {
  		fprintf(stderr, "missing argument for -rxmaxmtu\n"); 
***************
*** 828,834 ****
  	    rxMaxMTU = atoi(argv[++i]);
  	    if ((rxMaxMTU < RX_MIN_PACKET_SIZE) || 
  		(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
! 		printf("rxMaxMTU %d% invalid; must be between %d-%d\n",
  			rxMaxMTU, RX_MIN_PACKET_SIZE, 
  			RX_MAX_PACKET_DATA_SIZE);
  		exit(1);
--- 832,838 ----
  	    rxMaxMTU = atoi(argv[++i]);
  	    if ((rxMaxMTU < RX_MIN_PACKET_SIZE) || 
  		(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
! 		printf("rxMaxMTU %d invalid; must be between %d-%d\n",
  			rxMaxMTU, RX_MIN_PACKET_SIZE, 
  			RX_MAX_PACKET_DATA_SIZE);
  		exit(1);
***************
*** 871,884 ****
  #ifndef AFS_NT40_ENV
  	    printf("Usage: bosserver [-noauth] [-log] "
  		   "[-auditlog <log path>] "
! 		   "[-rxmaxmtu <bytes>] [-rxbind] "
  		   "[-syslog[=FACILITY]] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-nofork] " "[-help]\n");
  #else
  	    printf("Usage: bosserver [-noauth] [-log] "
  		   "[-auditlog <log path>] "
! 		   "[-rxmaxmtu <bytes>] [-rxbind] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-help]\n");
  #endif
--- 875,888 ----
  #ifndef AFS_NT40_ENV
  	    printf("Usage: bosserver [-noauth] [-log] "
  		   "[-auditlog <log path>] "
! 		   "[-rxmaxmtu <bytes>] [-rxbind] [-allow-dotted-principals]"
  		   "[-syslog[=FACILITY]] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-nofork] " "[-help]\n");
  #else
  	    printf("Usage: bosserver [-noauth] [-log] "
  		   "[-auditlog <log path>] "
! 		   "[-rxmaxmtu <bytes>] [-rxbind] [-allow-dotted-principals]"
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-help]\n");
  #endif
***************
*** 1061,1066 ****
--- 1065,1075 ----
      rx_SetMinProcs(tservice, 2);
      rx_SetMaxProcs(tservice, 4);
      rx_SetStackSize(tservice, BOZO_LWP_STACKSIZE);	/* so gethostbyname works (in cell stuff) */
+     if (rxkadDisableDotCheck) {
+         rx_SetSecurityConfiguration(tservice, RXS_CONFIG_FLAGS,
+                                     (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK, 
+                                     NULL);
+     }
  
      tservice =
  	rx_NewServiceHost(host, 0, RX_STATS_SERVICE_ID, "rpcstats", bozo_rxsc,
Index: openafs/src/bucoord/NTMakefile
diff -c openafs/src/bucoord/NTMakefile:1.13.4.1 openafs/src/bucoord/NTMakefile:1.13.4.2
*** openafs/src/bucoord/NTMakefile:1.13.4.1	Wed Sep 19 13:58:48 2007
--- openafs/src/bucoord/NTMakefile	Sat Feb  2 08:43:24 2008
***************
*** 92,98 ****
  	
  
  $(EXEFILE): $(EXEOBJS) $(EXERES) $(EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
--- 92,98 ----
  	
  
  $(EXEFILE): $(EXEOBJS) $(EXERES) $(EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
Index: openafs/src/budb/NTMakefile
diff -c openafs/src/budb/NTMakefile:1.10.4.1 openafs/src/budb/NTMakefile:1.10.4.2
*** openafs/src/budb/NTMakefile:1.10.4.1	Tue Jul  4 02:28:24 2006
--- openafs/src/budb/NTMakefile	Sat Feb  2 08:43:24 2008
***************
*** 81,87 ****
  
  
  $(EXEFILE): $(EXEOBJS)  $(EXELIBS)
! 	$(EXECONLINK) dnsapi.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
--- 81,87 ----
  
  
  $(EXEFILE): $(EXEOBJS)  $(EXELIBS)
! 	$(EXECONLINK) dnsapi.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
Index: openafs/src/butc/NTMakefile
diff -c openafs/src/butc/NTMakefile:1.10.4.1 openafs/src/butc/NTMakefile:1.10.4.2
*** openafs/src/butc/NTMakefile:1.10.4.1	Wed Sep 19 13:58:48 2007
--- openafs/src/butc/NTMakefile	Sat Feb  2 08:43:24 2008
***************
*** 57,63 ****
  $(EXERES): butc.rc AFS_component_version_number.h
  
  $(EXEFILE): $(EXEOBJS) $(EXERES) $(EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
--- 57,63 ----
  $(EXERES): butc.rc AFS_component_version_number.h
  
  $(EXEFILE): $(EXEOBJS) $(EXERES) $(EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
Index: openafs/src/cf/linux-test4.m4
diff -c openafs/src/cf/linux-test4.m4:1.29.2.31 openafs/src/cf/linux-test4.m4:1.29.2.36
*** openafs/src/cf/linux-test4.m4:1.29.2.31	Sat Dec  8 12:46:09 2007
--- openafs/src/cf/linux-test4.m4	Wed Jan 30 12:30:41 2008
***************
*** 728,744 ****
        ac_cv_linux_statfs_takes_dentry=no)])
    AC_MSG_RESULT($ac_cv_linux_statfs_takes_dentry)])
  
  AC_DEFUN([LINUX_LINUX_KEYRING_SUPPORT], [
    AC_MSG_CHECKING([for linux kernel keyring support])
    AC_CACHE_VAL([ac_cv_linux_keyring_support], [
      AC_TRY_KBUILD(
  [#include <linux/rwsem.h>
  #include <linux/key.h>
  #include <linux/keyctl.h>],
  [#ifdef CONFIG_KEYS
  request_key(NULL, NULL, NULL);
! #if !defined(KEY_POS_VIEW) || !defined(KEY_POS_SEARCH)
! #error "Your linux/key.h does not contain KEY_POS_VIEW or KEY_POS_SEARCH"
  #endif
  #else
  #error rebuild your kernel with CONFIG_KEYS
--- 728,761 ----
        ac_cv_linux_statfs_takes_dentry=no)])
    AC_MSG_RESULT($ac_cv_linux_statfs_takes_dentry)])
  
+ 
+ AC_DEFUN([LINUX_KEY_TYPE_H_EXISTS], [
+   AC_MSG_CHECKING([for linux/key-type.h existance])
+   AC_CACHE_VAL([ac_cv_linux_key_type_h_exists], [
+     AC_TRY_KBUILD(
+ [#include <linux/key-type.h>],
+ [return;],
+       ac_cv_linux_key_type_h_exists=yes,
+       ac_cv_linux_key_type_h_exists=no)])
+   AC_MSG_RESULT($ac_cv_linux_key_type_h_exists)
+   if test "x$ac_cv_linux_key_type_h_exists" = "xyes"; then
+     AC_DEFINE([KEY_TYPE_H_EXISTS], 1, [define if linux/key-type.h exists])
+   fi])
+ 
  AC_DEFUN([LINUX_LINUX_KEYRING_SUPPORT], [
    AC_MSG_CHECKING([for linux kernel keyring support])
    AC_CACHE_VAL([ac_cv_linux_keyring_support], [
      AC_TRY_KBUILD(
  [#include <linux/rwsem.h>
+ #ifdef KEY_TYPE_H_EXISTS
+ #include <linux/key-type.h>
+ #endif
  #include <linux/key.h>
  #include <linux/keyctl.h>],
  [#ifdef CONFIG_KEYS
  request_key(NULL, NULL, NULL);
! #if !defined(KEY_POS_VIEW) || !defined(KEY_POS_SEARCH) || !defined(KEY_POS_SETATTR) 
! #error "Your linux/key.h does not contain KEY_POS_VIEW or KEY_POS_SEARCH or KEY_POS_SETATTR"
  #endif
  #else
  #error rebuild your kernel with CONFIG_KEYS
***************
*** 750,755 ****
--- 767,796 ----
      AC_DEFINE([LINUX_KEYRING_SUPPORT], 1, [define if your kernel has keyring support])
    fi])
  
+ 
+ AC_DEFUN([LINUX_EXPORTS_KEY_TYPE_KEYRING], [
+   AC_MSG_CHECKING([for exported key_type_keyring])
+   AC_CACHE_VAL([ac_cv_linux_exports_key_type_keyring], [
+     AC_TRY_KBUILD(
+ [
+ #include <linux/kernel.h>
+ #include <linux/rwsem.h>
+ #ifdef KEY_TYPE_H_EXISTS
+ #include <linux/key-type.h>
+ #endif
+ #include <linux/key.h>
+ ],
+ [
+ printk("%x\n", key_type_keyring);
+ ],
+       ac_cv_linux_exports_key_type_keyring=yes,
+       ac_cv_linux_exports_key_type_keyring=no)])
+   AC_MSG_RESULT($ac_cv_linux_exports_key_type_keyring)
+   if test "x$ac_cv_linux_exports_key_type_keyring" = "xyes"; then
+     AC_DEFINE([EXPORTS_KEY_TYPE_KEYRING], 1, [define if key_type_keyring is exported])
+   fi])
+ 
+ 
  AC_DEFUN([LINUX_KEY_ALLOC_NEEDS_STRUCT_TASK], [
    AC_MSG_CHECKING([if key_alloc() takes a struct task *])
    AC_CACHE_VAL([ac_cv_key_alloc_needs_struct_task], [
***************
*** 768,785 ****
  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()])
--- 809,822 ----
  AC_DEFUN([LINUX_DO_SYNC_READ], [
    AC_MSG_CHECKING([for linux do_sync_read()])
    AC_CACHE_VAL([ac_cv_linux_do_sync_read], [
!     save_CPPFLAGS="$CPPFLAGS"
!     CPPFLAGS="$CPPFLAGS -Werror-implicit-function-declaration"
      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)
!     CPPFLAGS="$save_CPPFLAGS"])
    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()])
***************
*** 788,805 ****
  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()])
--- 825,838 ----
  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], [
!     save_CPPFLAGS="$CPPFLAGS"
!     CPPFLAGS="$CPPFLAGS -Werror-implicit-function-declaration"
      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)
!     CPPFLAGS="$save_CPPFLAGS"])
    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()])
***************
*** 933,948 ****
        ac_cv_linux_fs_struct_fop_has_splice=no)])
    AC_MSG_RESULT($ac_cv_linux_fs_struct_fop_has_splice)])
  
- AC_DEFUN([LINUX_KEY_TYPE_H_EXISTS], [
-   AC_MSG_CHECKING([whether linux/key-type.h exists])
-   AC_CACHE_VAL([ac_cv_linux_key_type_h_exists], [
-     AC_TRY_KBUILD(
- [#include <linux/key-type.h>],
- [return;],
-       ac_cv_linux_key_type_h_exists=yes,
-       ac_cv_linux_key_type_h_exists=no)])
-   AC_MSG_RESULT($ac_cv_linux_key_type_h_exists)])
- 
  AC_DEFUN([LINUX_HAVE_CURRENT_KERNEL_TIME], [
    AC_MSG_CHECKING([for current_kernel_time()])
    AC_CACHE_VAL([ac_cv_linux_have_current_kernel_time], [
--- 966,971 ----
***************
*** 971,978 ****
    AC_CACHE_VAL([ac_cv_linux_sysctl_table_checking], [
      AC_TRY_KBUILD(
  [#include <linux/sysctl.h>],
! [ sysctl_check_table(NULL);],
!       ac_cv_linux_sysctl_table_checking=yes,
!       ac_cv_linux_sysctl_table_checking=no)])
!   AC_MSG_RESULT($ac_cv_linux_sysctl_table_checking)])
  
--- 994,1002 ----
    AC_CACHE_VAL([ac_cv_linux_sysctl_table_checking], [
      AC_TRY_KBUILD(
  [#include <linux/sysctl.h>],
! [ extern int sysctl_check_table(int) __attribute__((weak));
! sysctl_check_table(NULL);],
!  ac_cv_linux_sysctl_table_checking=no,
!  ac_cv_linux_sysctl_table_checking=yes)])
! AC_MSG_RESULT($ac_cv_linux_sysctl_table_checking)])
  
Index: openafs/src/cf/osconf.m4
diff -c openafs/src/cf/osconf.m4:1.83.2.6 openafs/src/cf/osconf.m4:1.83.2.7
*** openafs/src/cf/osconf.m4:1.83.2.6	Mon Nov 12 13:28:35 2007
--- openafs/src/cf/osconf.m4	Tue Jan 15 00:21:18 2008
***************
*** 119,124 ****
--- 119,156 ----
  		SHLIB_LINKER="${MT_CC} -shared"
  		;;
  
+ 	arm_linux24)
+ 		CCOBJ="${CC} -fPIC"
+ 		KERN_OPTMZ=-O2
+ 		LEX="flex -l"
+ 		MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+ 		MT_LIBS="-lpthread"
+ 		PAM_OPTMZ=-O2
+ 		PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
+ 		SHLIB_CFLAGS="-fPIC"
+ 		SHLIB_LDFLAGS="-shared -Xlinker -x"
+ 		TXLIBS="-lncurses"
+ 		XCFLAGS="-D_LARGEFILE64_SOURCE"
+ 		YACC="bison -y"
+ 		SHLIB_LINKER="${MT_CC} -shared"
+ 		;;
+ 
+ 	arm_linux26)
+ 		CCOBJ="${CC} -fPIC"
+ 		KERN_OPTMZ=-O2
+ 		LEX="flex -l"
+ 		MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
+ 		MT_LIBS="-lpthread"
+ 		PAM_OPTMZ=-O2
+ 		PAM_CFLAGS="-Dlinux -DLINUX_PAM -fPIC"
+ 		SHLIB_CFLAGS="-fPIC"
+ 		SHLIB_LDFLAGS="-shared -Xlinker -x"
+ 		TXLIBS="-lncurses"
+ 		XCFLAGS="-D_LARGEFILE64_SOURCE"
+ 		YACC="bison -y"
+ 		SHLIB_LINKER="${MT_CC} -shared"
+ 		;;
+ 
  	hp_ux102)
  		AS="/usr/ccs/bin/as"
  		CC="/opt/ansic/bin/cc -Ae"
Index: openafs/src/cmd/cmd.c
diff -c openafs/src/cmd/cmd.c:1.12.4.2 openafs/src/cmd/cmd.c:1.12.4.3
*** openafs/src/cmd/cmd.c:1.12.4.2	Wed Oct 31 00:09:25 2007
--- openafs/src/cmd/cmd.c	Sun Jan 13 10:35:41 2008
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/cmd/cmd.c,v 1.12.4.2 2007/10/31 04:09:25 shadow Exp $");
  
  #include <sys/types.h>
  #include <ctype.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/cmd/cmd.c,v 1.12.4.3 2008/01/13 15:35:41 jaltman Exp $");
  
  #include <sys/types.h>
  #include <ctype.h>
***************
*** 40,52 ****
  static char *
  NName(char *a1, char *a2)
  {
!     static char tbuffer[80];
      if (strlen(a1) == 0) {
! 	return "";
      } else {
! 	strcpy(tbuffer, a1);
! 	strcat(tbuffer, a2);
! 	return tbuffer;
      }
  }
  
--- 40,53 ----
  static char *
  NName(char *a1, char *a2)
  {
!     static char tbuffer[300];
      if (strlen(a1) == 0) {
!         return "";
      } else {
!         strncpy(tbuffer, a1, sizeof(tbuffer));
!         strncat(tbuffer, a2, sizeof(tbuffer));
!         tbuffer[sizeof(tbuffer)-1]='\0';
!         return tbuffer;
      }
  }
  
Index: openafs/src/config/.cvsignore
diff -c openafs/src/config/.cvsignore:1.5 openafs/src/config/.cvsignore:1.5.14.1
*** openafs/src/config/.cvsignore:1.5	Thu Jun 19 12:28:58 2003
--- openafs/src/config/.cvsignore	Fri Jan 11 17:41:50 2008
***************
*** 1,18 ****
  AFS_component_version_number.c
  Makefile
  Makefile.*_*[0123456789]
  Makefile.version
  Makefile.version-NOCML
  afsconfig.h
  afsconfig.h.in
  config
  mkvers
- Makefile.hp_ux102
- Makefile.hp_ux110
- Makefile.i386_linux22
- Makefile.i386_linux24
- Makefile.sun4x_56
- Makefile.sun4x_57
  param.h.new
  Makefile.config
  stamp-h1
--- 1,13 ----
  AFS_component_version_number.c
  Makefile
  Makefile.*_*[0123456789]
+ Makefile.*_*[0123456789].in
  Makefile.version
  Makefile.version-NOCML
  afsconfig.h
  afsconfig.h.in
  config
  mkvers
  param.h.new
  Makefile.config
  stamp-h1
Index: openafs/src/config/NTMakefile.amd64_w2k
diff -c openafs/src/config/NTMakefile.amd64_w2k:1.24.2.34 openafs/src/config/NTMakefile.amd64_w2k:1.24.2.37
*** openafs/src/config/NTMakefile.amd64_w2k:1.24.2.34	Fri Dec 28 15:19:10 2007
--- openafs/src/config/NTMakefile.amd64_w2k	Sun Feb 10 23:04:05 2008
***************
*** 84,90 ****
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=5
! AFSPRODUCT_VER_PATCH=2900
  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=3100
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
***************
*** 217,222 ****
--- 217,227 ----
      	-DAFS_64BIT_ENV \
  	-DAFS_64BIT_CLIENT \
  	-DAFS_LARGEFILE_ENV \
+ 	-D_USE_DECLSPECS_FOR_SAL=0 \
+ 	-D_USE_ATTRIBUTES_FOR_SAL=0 \
+ 	-D_ATL_SECURE_NO_DEPRECATE \
+ 	-D_AFX_DISABLE_DEPRECATED \
+ 	-D_AFX_SECURE_NO_WARNINGS \
  	 $(AFSDEV_AUXCDEFINES)
  
  # Compiler switches (except include paths and preprocessor defines)
***************
*** 227,233 ****
  # /GF   pool strings and place in read-only memory
  # /Gd   use cdecl calling convention by default
  # /Gy   enable function-level linking
! # /GX   enable C++ exceptions (assumes extern C funcs never throw exceptions)
  # /Os   favor small (over fast) code; seems to avoid 64-bit bugs in VC compiler
  
  afscflags =\
--- 232,238 ----
  # /GF   pool strings and place in read-only memory
  # /Gd   use cdecl calling convention by default
  # /Gy   enable function-level linking
! # /EHsc enable C++ exceptions (assumes extern C funcs never throw exceptions)
  # /Os   favor small (over fast) code; seems to avoid 64-bit bugs in VC compiler
  
  afscflags =\
***************
*** 237,243 ****
  	/Gy \
  	/Os
  
! !IF ("$(AFSVER_CL)"=="1400")
  afscflags = $(afscflags) /EHsc /wd4996
  !ELSE
  afscflags = $(afscflags) /GX
--- 242,248 ----
  	/Gy \
  	/Os
  
! !IF ("$(AFSVER_CL)"=="1400" || "$(AFSVER_CL)"=="1500")
  afscflags = $(afscflags) /EHsc /wd4996
  !ELSE
  afscflags = $(afscflags) /GX
***************
*** 246,252 ****
  !IF ("$(AFSVER_CL)"!="1200")
  afscflags = $(afscflags) /GT /GS
  #/Wp64
! !IF ("$(AFSVER_CL)"!="1400")
  afscflags = $(afscflags) /G7
  !ENDIF
  !ENDIF
--- 251,257 ----
  !IF ("$(AFSVER_CL)"!="1200")
  afscflags = $(afscflags) /GT /GS
  #/Wp64
! !IF ("$(AFSVER_CL)"!="1400" && "$(AFSVER_CL)"!="1500")
  afscflags = $(afscflags) /G7
  !ENDIF
  !ENDIF
***************
*** 278,284 ****
  _VC_MANIFEST_BASENAME = __OAFW.Debug
  !ENDIF
  
! !IF ("$(AFSVER_CL)"=="1400")
  _VC_MANIFEST_EMBED_EXE= \
  if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;1
  
--- 283,289 ----
  _VC_MANIFEST_BASENAME = __OAFW.Debug
  !ENDIF
  
! !IF ("$(AFSVER_CL)"=="1400" || "$(AFSVER_CL)"=="1500")
  _VC_MANIFEST_EMBED_EXE= \
  if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;1
  
***************
*** 302,307 ****
--- 307,315 ----
  !ERROR Must define AFSDEV_WARNLEVEL to be one of 0 through 4.
  !ENDIF
  !ENDIF
+ !IF ("$(AFSDEV_WARNLEVEL)" == "4" && "$(AFSVER_CL)" == "1500")
+ _AFSDEV_WARNLEVEL=3
+ !ENDIF
  
  afscflags = $(afscflags) /W$(AFSDEV_WARNLEVEL)
  
***************
*** 356,365 ****
  
  #################### Link optional build flags set ###########
  
! afslflags = $(afslflags) \
! 	/FIXED:NO /VERBOSE:LIB /MACHINE:X64
  
! !IF ("$(AFSVER_CL)"=="1400")
  afslflags = $(afslflags) /MANIFEST
  !ENDIF
  
--- 364,377 ----
  
  #################### Link optional build flags set ###########
  
! afslflags = $(afslflags) /FIXED:NO /VERBOSE:LIB 
! !IF ("$(AFSVER_CL)"=="1500")
! afslflags = $(afslflags) /MACHINE:AMD64
! !ELSE
! afslflags = $(afslflags) /MACHINE:X64
! !ENDIF
  
! !IF ("$(AFSVER_CL)"=="1400" || "$(AFSVER_CL)"=="1500")
  afslflags = $(afslflags) /MANIFEST
  !ENDIF
  
Index: openafs/src/config/NTMakefile.i386_nt40
diff -c openafs/src/config/NTMakefile.i386_nt40:1.84.2.33 openafs/src/config/NTMakefile.i386_nt40:1.84.2.36
*** openafs/src/config/NTMakefile.i386_nt40:1.84.2.33	Fri Dec 28 15:19:10 2007
--- openafs/src/config/NTMakefile.i386_nt40	Sun Feb 10 23:04:05 2008
***************
*** 84,90 ****
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=5
! AFSPRODUCT_VER_PATCH=2900
  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=3100
  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.34 openafs/src/config/NTMakefile.i386_w2k:1.23.2.37
*** openafs/src/config/NTMakefile.i386_w2k:1.23.2.34	Fri Dec 28 15:19:10 2007
--- openafs/src/config/NTMakefile.i386_w2k	Sun Feb 10 23:04:05 2008
***************
*** 84,90 ****
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=5
! AFSPRODUCT_VER_PATCH=2900
  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=3100
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
***************
*** 245,251 ****
  	/Gy \
  	/Os
  
! !IF ("$(AFSVER_CL)"=="1400")
  afscflags = $(afscflags) /EHsc /wd4996
  !ELSE
  afscflags = $(afscflags) /GX
--- 245,251 ----
  	/Gy \
  	/Os
  
! !IF ("$(AFSVER_CL)"=="1400" || "$(AFSVER_CL)"=="1500")
  afscflags = $(afscflags) /EHsc /wd4996
  !ELSE
  afscflags = $(afscflags) /GX
***************
*** 254,260 ****
  !IF ("$(AFSVER_CL)"!="1200")
  afscflags = $(afscflags) /GT /GS
  #/Wp64
! !IF ("$(AFSVER_CL)"!="1400")
  afscflags = $(afscflags) /G7
  !ENDIF
  !ENDIF
--- 254,260 ----
  !IF ("$(AFSVER_CL)"!="1200")
  afscflags = $(afscflags) /GT /GS
  #/Wp64
! !IF ("$(AFSVER_CL)"!="1400" && "$(AFSVER_CL)"!="1500")
  afscflags = $(afscflags) /G7
  !ENDIF
  !ENDIF
***************
*** 288,294 ****
  _VC_MANIFEST_BASENAME = __OAFW.Debug
  !ENDIF
  
! !IF ("$(AFSVER_CL)"=="1400" || "$(AFSVER_CL)" == "1310")
  _VC_MANIFEST_EMBED_EXE= \
  if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;1
  
--- 288,294 ----
  _VC_MANIFEST_BASENAME = __OAFW.Debug
  !ENDIF
  
! !IF ("$(AFSVER_CL)"=="1500"|| "$(AFSVER_CL)"=="1400" || "$(AFSVER_CL)" == "1310")
  _VC_MANIFEST_EMBED_EXE= \
  if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;1
  
***************
*** 373,379 ****
  afslflags =\
  	/FIXED:NO /VERBOSE:LIB /MACHINE:I386
  
! !IF ("$(AFSVER_CL)"=="1400" || "$(AFSVER_CL)"=="1310")
  afslflags = $(afslflags) /MANIFEST
  !ENDIF
  
--- 373,379 ----
  afslflags =\
  	/FIXED:NO /VERBOSE:LIB /MACHINE:I386
  
! !IF ("$(AFSVER_CL)"=="1500" || "$(AFSVER_CL)"=="1400" || "$(AFSVER_CL)"=="1310")
  afslflags = $(afslflags) /MANIFEST
  !ENDIF
  
Index: openafs/src/config/afs_args.h
diff -c openafs/src/config/afs_args.h:1.20.4.1 openafs/src/config/afs_args.h:1.20.4.2
*** openafs/src/config/afs_args.h:1.20.4.1	Wed Oct 10 13:01:46 2007
--- openafs/src/config/afs_args.h	Wed Jan 30 16:37:24 2008
***************
*** 123,128 ****
--- 123,129 ----
  /* #define AFSOP_STOP_COMPLETE     215  defined in osi.h	      */
  /* #define AFSOP_STOP_RXK_LISTENER   217     defined in osi.h	      */
  #define AFSOP_STOP_AFSDB	218	/* Stop AFSDB handler */
+ #define AFSOP_STOP_NETIF        219     /* Stop Netif poller */
  
  /* Main afs syscall entry; this number may vary per system (i.e. defined in afs/param.h) */
  #ifndef	AFS_SYSCALL
Index: openafs/src/config/afs_sysnames.h
diff -c openafs/src/config/afs_sysnames.h:1.77.2.3 openafs/src/config/afs_sysnames.h:1.77.2.5
*** openafs/src/config/afs_sysnames.h:1.77.2.3	Thu Feb  8 20:13:19 2007
--- openafs/src/config/afs_sysnames.h	Tue Jan 15 01:09:12 2008
***************
*** 184,189 ****
--- 184,191 ----
  #define SYS_NAME_ID_i386_fbsd_53        2108
  #define SYS_NAME_ID_i386_fbsd_60        2112
  #define SYS_NAME_ID_i386_fbsd_61        2113
+ #define SYS_NAME_ID_i386_fbsd_62        2114
+ #define SYS_NAME_ID_i386_fbsd_70        2115
  
  #define SYS_NAME_ID_ia64_linux2		2200
  #define SYS_NAME_ID_ia64_linux22	2201
***************
*** 262,267 ****
--- 264,274 ----
  
  #define SYS_NAME_ID_i64_w2k             3500
  
+ #define SYS_NAME_ID_arm_linux2          3800
+ #define SYS_NAME_ID_arm_linux22         3801
+ #define SYS_NAME_ID_arm_linux24         3802
+ #define SYS_NAME_ID_arm_linux26         3803
+ 
  /*
   * Placeholder to keep system-wide standard flags since this file is included by all 
   * files (i.e in afs/param.h)
Index: openafs/src/config/param.arm_linux24.h
diff -c /dev/null openafs/src/config/param.arm_linux24.h:1.1.2.2
*** /dev/null	Mon Feb 11 10:58:21 2008
--- openafs/src/config/param.arm_linux24.h	Tue Jan 15 00:12:14 2008
***************
*** 0 ****
--- 1,146 ----
+ #ifndef UKERNEL
+ /* This section for kernel libafs compiles only */
+ 
+ #ifndef AFS_PARAM_H
+ #define AFS_PARAM_H
+ 
+ /* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+  * it's a judgment call. If something is obviously i386 specific, use that
+  * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+  * in the sysname is the current version of the client. This takes into
+  * account the perferred OS user space configuration as well as the kernel.
+  */
+ 
+ #define AFS_LINUX20_ENV        1
+ #define AFS_LINUX22_ENV        1
+ #define AFS_LINUX24_ENV        1
+ #define AFS_ARM_LINUX20_ENV   1
+ #define AFS_ARM_LINUX22_ENV   1
+ #define AFS_ARM_LINUX24_ENV   1
+ #define AFS_NONFSTRANS 1
+ 
+ #define AFS_MOUNT_AFS "afs"	/* The name of the filesystem type. */
+ #define AFS_SYSCALL 137
+ #define AFS_64BIT_IOPS_ENV  1
+ #define AFS_NAMEI_ENV     1	/* User space interface to file system */
+ #define AFS_64BIT_ENV		1
+ #define AFS_64BIT_CLIENT	1
+ 
+ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
+ 
+ #ifdef CONFIG_SMP
+ #undef CONFIG_SMP
+ #endif
+ /* Using "AFS_SMP" to map to however many #define's are required to get
+  * MP to compile for Linux
+  */
+ #ifdef AFS_SMP
+ #define CONFIG_SMP 1
+ #ifndef __SMP__
+ #define __SMP__
+ #endif
+ #endif
+ #define AFS_GLOBAL_SUNLOCK
+ 
+ #if defined(MODULE) && defined(CONFIG_MODVERSIONS)
+ #define MODVERSIONS
+ #include <linux/modversions.h>
+ #endif
+ 
+ #endif /* __KERNEL__  && !DUMP_KERNEL */
+ 
+ #include <afs/afs_sysnames.h>
+ #define AFS_USERSPACE_IP_ADDR 1
+ #define RXK_LISTENER_ENV 1
+ #define AFS_GCPAGS       1
+ 
+ #define AFSLITTLE_ENDIAN    1
+ #define AFS_HAVE_FFS        1	/* Use system's ffs. */
+ #define AFS_HAVE_STATVFS    0	/* System doesn't support statvfs */
+ #define AFS_VM_RDWR_ENV            1	/* read/write implemented via VM */
+ #define AFS_USE_GETTIMEOFDAY       1	/* use gettimeofday to implement rx clock */
+ 
+ #ifdef KERNEL
+ #ifndef MIN
+ #define MIN(A,B) ((A) < (B) ? (A) : (B))
+ #endif
+ #ifndef MAX
+ #define MAX(A,B) ((A) > (B) ? (A) : (B))
+ #endif
+ #endif /* KERNEL */
+ 
+ #ifndef KERNEL
+ #define __USE_LARGEFILE64 1
+ #if !defined off64_t
+ #define off64_t __off64_t
+ #endif
+ #endif
+ 
+ /* Machine / Operating system information */
+ #define SYS_NAME       "arm_linux24"
+ #define SYS_NAME_ID    SYS_NAME_ID_arm_linux24
+ 
+ #endif /* AFS_PARAM_H */
+ 
+ 
+ 
+ #else /* !defined(UKERNEL) */
+ 
+ /* This section for user space compiles only */
+ 
+ #ifndef AFS_PARAM_H
+ #define AFS_PARAM_H
+ 
+ /* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+  * it's a judgment call. If something is obviously i386 specific, use that
+  * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+  * in the sysname is the current version of the client. This takes into
+  * account the perferred OS user space configuration as well as the kernel.
+  */
+ 
+ #define UKERNEL                        1	/* user space kernel */
+ #define AFS_ENV                        1
+ #define AFS_USR_LINUX20_ENV    1
+ #define AFS_USR_LINUX22_ENV    1
+ #define AFS_USR_LINUX24_ENV    1
+ #define AFS_NONFSTRANS 1
+ 
+ #define AFS_MOUNT_AFS "afs"	/* The name of the filesystem type. */
+ #define AFS_SYSCALL 137
+ #define AFS_64BIT_IOPS_ENV  1
+ #define AFS_NAMEI_ENV     1	/* User space interface to file system */
+ #include <afs/afs_sysnames.h>
+ 
+ #define AFS_USERSPACE_IP_ADDR 1
+ #define RXK_LISTENER_ENV 1
+ #define AFS_GCPAGS             0	/* if nonzero, garbage collect PAGs */
+ 
+ 
+ /* Machine / Operating system information */
+ #define SYS_NAME       "arm_linux24"
+ #define SYS_NAME_ID    SYS_NAME_ID_arm_linux24
+ #define AFSLITTLE_ENDIAN    1
+ #define AFS_HAVE_FFS        1	/* Use system's ffs. */
+ #define AFS_HAVE_STATVFS    0	/* System doesn't support statvfs */
+ #define AFS_VM_RDWR_ENV            1	/* read/write implemented via VM */
+ 
+ #define        afsio_iov       uio_iov
+ #define        afsio_iovcnt    uio_iovcnt
+ #define        afsio_offset    uio_offset
+ #define        afsio_seg       uio_segflg
+ #define        afsio_fmode     uio_fmode
+ #define        afsio_resid     uio_resid
+ #define        AFS_UIOSYS      1
+ #define        AFS_UIOUSER     UIO_USERSPACE
+ #define        AFS_CLBYTES     MCLBYTES
+ #define        AFS_MINCHANGE   2
+ #define        VATTR_NULL      usr_vattr_null
+ 
+ #define AFS_DIRENT
+ #ifndef CMSERVERPREF
+ #define CMSERVERPREF
+ #endif
+ 
+ #endif /* AFS_PARAM_H */
+ 
+ #endif /* !defined(UKERNEL) */
Index: openafs/src/config/param.arm_linux26.h
diff -c /dev/null openafs/src/config/param.arm_linux26.h:1.1.2.2
*** /dev/null	Mon Feb 11 10:58:21 2008
--- openafs/src/config/param.arm_linux26.h	Tue Jan 15 00:12:14 2008
***************
*** 0 ****
--- 1,152 ----
+ #ifndef UKERNEL
+ /* This section for kernel libafs compiles only */
+ 
+ #ifndef AFS_PARAM_H
+ #define AFS_PARAM_H
+ 
+ /* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+  * it's a judgment call. If something is obviously i386 specific, use that
+  * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+  * in the sysname is the current version of the client. This takes into
+  * account the perferred OS user space configuration as well as the kernel.
+  */
+ 
+ #define AFS_LINUX20_ENV        1
+ #define AFS_LINUX22_ENV        1
+ #define AFS_LINUX24_ENV        1
+ #define AFS_LINUX26_ENV        1
+ #define AFS_ARM_LINUX20_ENV   1
+ #define AFS_ARM_LINUX22_ENV   1
+ #define AFS_ARM_LINUX24_ENV   1
+ #define AFS_ARM_LINUX26_ENV   1
+ 
+ #define AFS_MOUNT_AFS "afs"	/* The name of the filesystem type. */
+ #define AFS_SYSCALL 137
+ #define AFS_64BIT_IOPS_ENV  1
+ #define AFS_NAMEI_ENV     1	/* User space interface to file system */
+ #define AFS_64BIT_ENV		1
+ #define AFS_64BIT_CLIENT	1
+ 
+ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
+ 
+ #ifdef CONFIG_SMP
+ #ifndef AFS_SMP
+ #define AFS_SMP 1
+ #endif
+ #endif
+ /* Using "AFS_SMP" to map to however many #define's are required to get
+  * MP to compile for Linux
+  */
+ #ifdef AFS_SMP
+ #ifndef CONFIG_SMP
+ #define CONFIG_SMP 1
+ #endif
+ #ifndef __SMP__
+ #define __SMP__
+ #endif
+ #endif
+ #define AFS_GLOBAL_SUNLOCK
+ 
+ #endif /* __KERNEL__  && !DUMP_KERNEL */
+ 
+ #include <afs/afs_sysnames.h>
+ #define AFS_USERSPACE_IP_ADDR 1
+ #define RXK_LISTENER_ENV 1
+ #define AFS_GCPAGS       1
+ 
+ #define AFSLITTLE_ENDIAN    1
+ #define AFS_HAVE_FFS        1	/* Use system's ffs. */
+ #define AFS_HAVE_STATVFS    0	/* System doesn't support statvfs */
+ #define AFS_VM_RDWR_ENV            1	/* read/write implemented via VM */
+ #define AFS_USE_GETTIMEOFDAY       1	/* use gettimeofday to implement rx clock */
+ 
+ #ifdef KERNEL
+ #ifndef MIN
+ #define MIN(A,B) ((A) < (B) ? (A) : (B))
+ #endif
+ #ifndef MAX
+ #define MAX(A,B) ((A) > (B) ? (A) : (B))
+ #endif
+ #endif /* KERNEL */
+ 
+ #ifndef KERNEL
+ #define __USE_LARGEFILE64 1
+ #if !defined off64_t
+ #define off64_t __off64_t
+ #endif
+ #endif
+ 
+ /* Machine / Operating system information */
+ #define SYS_NAME       "arm_linux26"
+ #define SYS_NAME_ID    SYS_NAME_ID_arm_linux26
+ 
+ #ifdef __GLIBC__
+ #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
+ #define USE_UCONTEXT
+ #endif
+ #endif
+ #endif /* AFS_PARAM_H */
+ 
+ 
+ 
+ #else /* !defined(UKERNEL) */
+ 
+ /* This section for user space compiles only */
+ 
+ #ifndef AFS_PARAM_H
+ #define AFS_PARAM_H
+ 
+ /* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+  * it's a judgment call. If something is obviously i386 specific, use that
+  * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+  * in the sysname is the current version of the client. This takes into
+  * account the perferred OS user space configuration as well as the kernel.
+  */
+ 
+ #define UKERNEL                        1	/* user space kernel */
+ #define AFS_ENV                        1
+ #define AFS_USR_LINUX20_ENV    1
+ #define AFS_USR_LINUX22_ENV    1
+ #define AFS_USR_LINUX24_ENV    1
+ #define AFS_USR_LINUX26_ENV    1
+ #define AFS_NONFSTRANS 1
+ 
+ #define AFS_MOUNT_AFS "afs"	/* The name of the filesystem type. */
+ #define AFS_SYSCALL 137
+ #define AFS_64BIT_IOPS_ENV  1
+ #define AFS_NAMEI_ENV     1	/* User space interface to file system */
+ #include <afs/afs_sysnames.h>
+ 
+ #define AFS_USERSPACE_IP_ADDR 1
+ #define RXK_LISTENER_ENV 1
+ #define AFS_GCPAGS             0	/* if nonzero, garbage collect PAGs */
+ 
+ 
+ /* Machine / Operating system information */
+ #define SYS_NAME       "arm_linux26"
+ #define SYS_NAME_ID    SYS_NAME_ID_arm_linux26
+ #define AFSLITTLE_ENDIAN    1
+ #define AFS_HAVE_FFS        1	/* Use system's ffs. */
+ #define AFS_HAVE_STATVFS    0	/* System doesn't support statvfs */
+ #define AFS_VM_RDWR_ENV            1	/* read/write implemented via VM */
+ 
+ #define        afsio_iov       uio_iov
+ #define        afsio_iovcnt    uio_iovcnt
+ #define        afsio_offset    uio_offset
+ #define        afsio_seg       uio_segflg
+ #define        afsio_fmode     uio_fmode
+ #define        afsio_resid     uio_resid
+ #define        AFS_UIOSYS      1
+ #define        AFS_UIOUSER     UIO_USERSPACE
+ #define        AFS_CLBYTES     MCLBYTES
+ #define        AFS_MINCHANGE   2
+ #define        VATTR_NULL      usr_vattr_null
+ 
+ #define AFS_DIRENT
+ #ifndef CMSERVERPREF
+ #define CMSERVERPREF
+ #endif
+ 
+ #endif /* AFS_PARAM_H */
+ 
+ #endif /* !defined(UKERNEL) */
Index: openafs/src/config/param.i386_fbsd_62.h
diff -c /dev/null openafs/src/config/param.i386_fbsd_62.h:1.1.2.2
*** /dev/null	Mon Feb 11 10:58:22 2008
--- openafs/src/config/param.i386_fbsd_62.h	Tue Jan 15 01:09:12 2008
***************
*** 0 ****
--- 1,209 ----
+ #ifndef	AFS_PARAM_H
+ #define	AFS_PARAM_H
+ 
+ /* Machine / Operating system information */
+ #define SYS_NAME	"i386_fbsd_62"
+ #define SYS_NAME_ID	SYS_NAME_ID_i386_fbsd_62
+ 
+ #define AFSLITTLE_ENDIAN    1
+ #define AFS_HAVE_FFS        1	/* Use system's ffs. */
+ #define AFS_HAVE_STATVFS    1	/* System doesn't support statvfs */
+ #define AFS_VM_RDWR_ENV	    1	/* read/write implemented via VM */
+ 
+ 
+ #ifndef UKERNEL
+ /* This section for kernel libafs compiles only */
+ 
+ #ifndef IGNORE_STDS_H
+ #include <sys/param.h>
+ #endif
+ 
+ #define AFS_XBSD_ENV 1		/* {Free,Open,Net}BSD */
+ #define AFS_X86_XBSD_ENV 1
+ 
+ #define AFS_NAMEI_ENV     1	/* User space interface to file system */
+ #define AFS_64BIT_ENV 1
+ #define AFS_64BIT_CLIENT 1
+ #define AFS_64BIT_IOPS_ENV 1	/* Needed for NAMEI */
+ #define AFS_FBSD_ENV 1
+ #define AFS_FBSD40_ENV 1
+ #define AFS_FBSD42_ENV 1
+ #define AFS_FBSD43_ENV 1
+ #define AFS_FBSD44_ENV 1
+ #define AFS_FBSD45_ENV 1
+ #define AFS_FBSD46_ENV 1
+ #define AFS_FBSD47_ENV 1
+ #define AFS_FBSD50_ENV 1
+ #define AFS_FBSD51_ENV 1
+ #define AFS_FBSD52_ENV 1
+ #define AFS_FBSD53_ENV 1
+ #define AFS_FBSD60_ENV 1
+ #define AFS_FBSD61_ENV 1
+ #define AFS_FBSD62_ENV 1
+ #define AFS_X86_FBSD_ENV 1
+ #define AFS_X86_FBSD40_ENV 1
+ #define AFS_X86_FBSD42_ENV 1
+ #define AFS_X86_FBSD43_ENV 1
+ #define AFS_X86_FBSD46_ENV 1
+ #define AFS_X86_FBSD47_ENV 1
+ #define AFS_X86_FBSD50_ENV 1
+ #define AFS_X86_FBSD60_ENV 1
+ #define AFS_X86_FBSD62_ENV 1
+ #define AFS_X86_ENV 1
+ #define AFS_NONFSTRANS 1
+ #define FTRUNC O_TRUNC
+ 
+ #define IUPD 0x0010
+ #define IACC 0x0020
+ #define ICHG 0x0040
+ #define IMOD 0x0080
+ 
+ #define IN_LOCK(ip)     lockmgr(&ip->i_lock, LK_EXCLUSIVE, \
+                                 NULL, curproc)
+ #define IN_UNLOCK(ip)   lockmgr(&ip->i_lock, LK_RELEASE, \
+                                 NULL, curproc)
+ 
+ #include <afs/afs_sysnames.h>
+ 
+ #define AFS_VFS_ENV	1
+ #define AFS_VFSINCL_ENV 1
+ #define AFS_GREEDY43_ENV	1
+ #define AFS_ENV  	1
+ 
+ #define AFS_SYSCALL	339
+ #define AFS_MOUNT_AFS	"afs"
+ 
+ #ifndef MOUNT_UFS
+ #define MOUNT_UFS "ufs"
+ #endif
+ 
+ #ifndef	MOUNT_AFS
+ #define	MOUNT_AFS AFS_MOUNT_AFS
+ #endif
+ 
+ #define RXK_LISTENER_ENV 1
+ #define AFS_GCPAGS	        0	/* if nonzero, garbage collect PAGs */
+ #define AFS_USE_GETTIMEOFDAY    1	/* use gettimeofday to implement rx clock */
+ 
+ /* Extra kernel definitions (from kdefs file) */
+ #ifdef _KERNEL
+ #define AFS_GLOBAL_SUNLOCK        1
+ #define	AFS_VFS34	1	/* What is VFS34??? */
+ #define	AFS_SHORTGID	0	/* are group id's short? */
+ #define	afsio_iov	uio_iov
+ #define	afsio_iovcnt	uio_iovcnt
+ #define	afsio_offset	uio_offset
+ #define	afsio_seg	uio_segflg
+ #define	afsio_resid	uio_resid
+ #define	AFS_UIOSYS	UIO_SYSSPACE
+ #define	AFS_UIOUSER	UIO_USERSPACE
+ #define	AFS_CLBYTES	CLBYTES
+ #define	osi_GetTime(x)	microtime(x)
+ #define AFS_KALLOC(x)   osi_fbsd_alloc((x), 1)
+ #undef	AFS_KALLOC_NOSLEEP
+ #define	AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0)
+ #define AFS_KFREE(x,y)  osi_fbsd_free((x))
+ #define	v_count		v_usecount
+ #define v_vfsp		v_mount
+ #define vfs_bsize	mnt_stat.f_bsize
+ #define vfs_fsid	mnt_stat.f_fsid
+ #define va_nodeid	va_fileid
+ #define vfs_vnodecovered mnt_vnodecovered
+ #define direct		dirent
+ #define vnode_t		struct vnode
+ 
+ #ifndef MUTEX_DEFAULT
+ #define MUTEX_DEFAULT   0
+ #endif /* MUTEX_DEFAULT */
+ 
+ #ifndef SSYS
+ #define SSYS            0x00002
+ #endif /* SSYS */
+ 
+ #define p_rcred         p_ucred
+ 
+ #if	!defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
+ enum vcexcl { NONEXCL, EXCL };
+ 
+ #ifdef KERNEL
+ #ifndef MIN
+ #define MIN(A,B) ((A) < (B) ? (A) : (B))
+ #endif
+ #ifndef MAX
+ #define MAX(A,B) ((A) > (B) ? (A) : (B))
+ #endif
+ #endif /* KERNEL */
+ 
+ #endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
+ #endif /* _KERNEL */
+ 
+ #else /* !defined(UKERNEL) */
+ 
+ /* This section for user space compiles only */
+ 
+ #define UKERNEL			1	/* user space kernel */
+ #define AFS_ENV			1
+ #define AFS_VFSINCL_ENV         1
+ #define AFS_USR_FBSD40_ENV	1
+ #define AFS_USR_FBSD42_ENV	1
+ #define AFS_USR_FBSD43_ENV	1
+ #define AFS_USR_FBSD44_ENV	1
+ #define AFS_USR_FBSD45_ENV	1
+ #define AFS_USR_FBSD46_ENV	1
+ #define AFS_USR_FBSD47_ENV	1
+ #define AFS_USR_FBSD50_ENV	1
+ #define AFS_USR_FBSD51_ENV	1
+ #define AFS_USR_FBSD52_ENV	1
+ #define AFS_USR_FBSD53_ENV	1
+ #define AFS_USR_FBSD60_ENV	1
+ #define AFS_USR_FBSD61_ENV	1
+ #define AFS_USR_FBSD62_ENV	1
+ #define AFS_USR_FBSD_ENV	1
+ #define AFS_NONFSTRANS 1
+ 
+ #define AFS_MOUNT_AFS "afs"	/* The name of the filesystem type. */
+ #define AFS_SYSCALL 339
+ #define AFS_NAMEI_ENV         1	/* User space interface to file system */
+ #define AFS_64BIT_ENV 1
+ #define AFS_64BIT_IOPS_ENV    1	/* Needed for NAMEI */
+ #define AFS_USERSPACE_IP_ADDR 1
+ #define RXK_LISTENER_ENV      1
+ #define AFS_GCPAGS	      0	/* if nonzero, garbage collect PAGs */
+ 
+ #include <afs/afs_sysnames.h>
+ 
+ #define	afsio_iov	uio_iov
+ #define	afsio_iovcnt	uio_iovcnt
+ #define	afsio_offset	uio_offset
+ #define	afsio_seg	uio_segflg
+ #define	afsio_fmode	uio_fmode
+ #define	afsio_resid	uio_resid
+ #define	AFS_UIOSYS	1
+ #define	AFS_UIOUSER	UIO_USERSPACE
+ #define	AFS_CLBYTES	MCLBYTES
+ #define	AFS_MINCHANGE	2
+ #define	VATTR_NULL	usr_vattr_null
+ 
+ #define AFS_DIRENT
+ #ifndef CMSERVERPREF
+ #define CMSERVERPREF
+ #endif
+ 
+ #include <sys/param.h>
+ #include <sys/types.h>
+ #include <sys/mount.h>
+ #include <sys/fcntl.h>
+ #include <sys/uio.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <limits.h>
+ 
+ #endif /* !defined(UKERNEL) */
+ 
+ /* general user-space compiles */
+ 
+ #if defined(UKERNEL) || !defined(KERNEL)
+ #define STDLIB_HAS_MALLOC_PROTOS 1
+ #endif
+ 
+ #endif /* AFS_PARAM_H */
Index: openafs/src/config/param.i386_fbsd_70.h
diff -c /dev/null openafs/src/config/param.i386_fbsd_70.h:1.1.2.2
*** /dev/null	Mon Feb 11 10:58:22 2008
--- openafs/src/config/param.i386_fbsd_70.h	Tue Jan 15 01:09:12 2008
***************
*** 0 ****
--- 1,211 ----
+ #ifndef	AFS_PARAM_H
+ #define	AFS_PARAM_H
+ 
+ /* Machine / Operating system information */
+ #define SYS_NAME	"i386_fbsd_70"
+ #define SYS_NAME_ID	SYS_NAME_ID_i386_fbsd_70
+ 
+ #define AFSLITTLE_ENDIAN    1
+ #define AFS_HAVE_FFS        1	/* Use system's ffs. */
+ #define AFS_HAVE_STATVFS    1	/* System doesn't support statvfs */
+ #define AFS_VM_RDWR_ENV	    1	/* read/write implemented via VM */
+ 
+ 
+ #ifndef UKERNEL
+ /* This section for kernel libafs compiles only */
+ 
+ #ifndef IGNORE_STDS_H
+ #include <sys/param.h>
+ #endif
+ 
+ #define AFS_XBSD_ENV 1		/* {Free,Open,Net}BSD */
+ #define AFS_X86_XBSD_ENV 1
+ 
+ #define AFS_NAMEI_ENV     1	/* User space interface to file system */
+ #define AFS_64BIT_ENV 1
+ #define AFS_64BIT_CLIENT 1
+ #define AFS_64BIT_IOPS_ENV 1	/* Needed for NAMEI */
+ #define AFS_FBSD_ENV 1
+ #define AFS_FBSD40_ENV 1
+ #define AFS_FBSD42_ENV 1
+ #define AFS_FBSD43_ENV 1
+ #define AFS_FBSD44_ENV 1
+ #define AFS_FBSD45_ENV 1
+ #define AFS_FBSD46_ENV 1
+ #define AFS_FBSD47_ENV 1
+ #define AFS_FBSD50_ENV 1
+ #define AFS_FBSD51_ENV 1
+ #define AFS_FBSD52_ENV 1
+ #define AFS_FBSD53_ENV 1
+ #define AFS_FBSD60_ENV 1
+ #define AFS_FBSD61_ENV 1
+ #define AFS_FBSD62_ENV 1
+ #define AFS_FBSD70_ENV 1
+ #define AFS_X86_FBSD_ENV 1
+ #define AFS_X86_FBSD40_ENV 1
+ #define AFS_X86_FBSD42_ENV 1
+ #define AFS_X86_FBSD43_ENV 1
+ #define AFS_X86_FBSD46_ENV 1
+ #define AFS_X86_FBSD47_ENV 1
+ #define AFS_X86_FBSD50_ENV 1
+ #define AFS_X86_FBSD60_ENV 1 /* added at 70--ie, some changes should port <-- */
+ #define AFS_X86_FBSD62_ENV 1
+ #define AFS_X86_FBSD70_ENV 1
+ #define AFS_X86_ENV 1
+ #define AFS_NONFSTRANS 1
+ #define FTRUNC O_TRUNC
+ 
+ #define IUPD 0x0010
+ #define IACC 0x0020
+ #define ICHG 0x0040
+ #define IMOD 0x0080
+ 
+ #define IN_LOCK(ip)     lockmgr(&ip->i_lock, LK_EXCLUSIVE, \
+                                 NULL, curproc)
+ #define IN_UNLOCK(ip)   lockmgr(&ip->i_lock, LK_RELEASE, \
+                                 NULL, curproc)
+ 
+ #include <afs/afs_sysnames.h>
+ 
+ #define AFS_VFS_ENV	1
+ #define AFS_VFSINCL_ENV 1
+ #define AFS_GREEDY43_ENV	1
+ #define AFS_ENV  	1
+ 
+ #define AFS_SYSCALL	339
+ #define AFS_MOUNT_AFS	"afs"
+ 
+ #ifndef MOUNT_UFS
+ #define MOUNT_UFS "ufs"
+ #endif
+ 
+ #ifndef	MOUNT_AFS
+ #define	MOUNT_AFS AFS_MOUNT_AFS
+ #endif
+ 
+ #define RXK_LISTENER_ENV 1
+ #define AFS_GCPAGS	        0	/* if nonzero, garbage collect PAGs */
+ #define AFS_USE_GETTIMEOFDAY    1	/* use gettimeofday to implement rx clock */
+ 
+ /* Extra kernel definitions (from kdefs file) */
+ #ifdef _KERNEL
+ #define AFS_GLOBAL_SUNLOCK        1
+ #define	AFS_VFS34	1	/* What is VFS34??? */
+ #define	AFS_SHORTGID	0	/* are group id's short? */
+ #define	afsio_iov	uio_iov
+ #define	afsio_iovcnt	uio_iovcnt
+ #define	afsio_offset	uio_offset
+ #define	afsio_seg	uio_segflg
+ #define	afsio_resid	uio_resid
+ #define	AFS_UIOSYS	UIO_SYSSPACE
+ #define	AFS_UIOUSER	UIO_USERSPACE
+ #define	AFS_CLBYTES	CLBYTES
+ #define	osi_GetTime(x)	microtime(x)
+ #define AFS_KALLOC(x)   osi_fbsd_alloc((x), 1)
+ #undef	AFS_KALLOC_NOSLEEP
+ #define	AFS_KALLOC_NOSLEEP(x) osi_fbsd_alloc((x), 0)
+ #define AFS_KFREE(x,y)  osi_fbsd_free((x))
+ #define	v_count		v_usecount
+ #define v_vfsp		v_mount
+ #define vfs_bsize	mnt_stat.f_bsize
+ #define vfs_fsid	mnt_stat.f_fsid
+ #define va_nodeid	va_fileid
+ #define vfs_vnodecovered mnt_vnodecovered
+ #define direct		dirent
+ #define vnode_t		struct vnode
+ 
+ #ifndef MUTEX_DEFAULT
+ #define MUTEX_DEFAULT   0
+ #endif /* MUTEX_DEFAULT */
+ 
+ #ifndef SSYS
+ #define SSYS            0x00002
+ #endif /* SSYS */
+ 
+ #define p_rcred         p_ucred
+ 
+ #if	!defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
+ enum vcexcl { NONEXCL, EXCL };
+ 
+ #ifdef KERNEL
+ #ifndef MIN
+ #define MIN(A,B) ((A) < (B) ? (A) : (B))
+ #endif
+ #ifndef MAX
+ #define MAX(A,B) ((A) > (B) ? (A) : (B))
+ #endif
+ #endif /* KERNEL */
+ 
+ #endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
+ #endif /* _KERNEL */
+ 
+ #else /* !defined(UKERNEL) */
+ 
+ /* This section for user space compiles only */
+ 
+ #define UKERNEL			1	/* user space kernel */
+ #define AFS_ENV			1
+ #define AFS_VFSINCL_ENV         1
+ #define AFS_USR_FBSD40_ENV	1
+ #define AFS_USR_FBSD42_ENV	1
+ #define AFS_USR_FBSD43_ENV	1
+ #define AFS_USR_FBSD44_ENV	1
+ #define AFS_USR_FBSD45_ENV	1
+ #define AFS_USR_FBSD46_ENV	1
+ #define AFS_USR_FBSD47_ENV	1
+ #define AFS_USR_FBSD50_ENV	1
+ #define AFS_USR_FBSD51_ENV	1
+ #define AFS_USR_FBSD52_ENV	1
+ #define AFS_USR_FBSD53_ENV	1
+ #define AFS_USR_FBSD60_ENV	1
+ #define AFS_USR_FBSD61_ENV	1
+ #define AFS_USR_FBSD70_ENV	1
+ #define AFS_USR_FBSD_ENV	1
+ #define AFS_NONFSTRANS 1
+ 
+ #define AFS_MOUNT_AFS "afs"	/* The name of the filesystem type. */
+ #define AFS_SYSCALL 339
+ #define AFS_NAMEI_ENV         1	/* User space interface to file system */
+ #define AFS_64BIT_ENV 1
+ #define AFS_64BIT_IOPS_ENV    1	/* Needed for NAMEI */
+ #define AFS_USERSPACE_IP_ADDR 1
+ #define RXK_LISTENER_ENV      1
+ #define AFS_GCPAGS	      0	/* if nonzero, garbage collect PAGs */
+ 
+ #include <afs/afs_sysnames.h>
+ 
+ #define	afsio_iov	uio_iov
+ #define	afsio_iovcnt	uio_iovcnt
+ #define	afsio_offset	uio_offset
+ #define	afsio_seg	uio_segflg
+ #define	afsio_fmode	uio_fmode
+ #define	afsio_resid	uio_resid
+ #define	AFS_UIOSYS	1
+ #define	AFS_UIOUSER	UIO_USERSPACE
+ #define	AFS_CLBYTES	MCLBYTES
+ #define	AFS_MINCHANGE	2
+ #define	VATTR_NULL	usr_vattr_null
+ 
+ #define AFS_DIRENT
+ #ifndef CMSERVERPREF
+ #define CMSERVERPREF
+ #endif
+ 
+ #include <sys/param.h>
+ #include <sys/types.h>
+ #include <sys/mount.h>
+ #include <sys/fcntl.h>
+ #include <sys/uio.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <limits.h>
+ 
+ #endif /* !defined(UKERNEL) */
+ 
+ /* general user-space compiles */
+ 
+ #if defined(UKERNEL) || !defined(KERNEL)
+ #define STDLIB_HAS_MALLOC_PROTOS 1
+ #endif
+ 
+ #endif /* AFS_PARAM_H */
Index: openafs/src/des/andrew-conf.h
diff -c openafs/src/des/andrew-conf.h:1.18 openafs/src/des/andrew-conf.h:1.18.2.1
*** openafs/src/des/andrew-conf.h:1.18	Thu Mar  9 01:34:36 2006
--- openafs/src/des/andrew-conf.h	Tue Jan 15 00:12:14 2008
***************
*** 82,88 ****
--- 82,92 ----
  #ifdef AFS_PPC64_LINUX20_ENV
  #include "conf-ppc64-linux.h"
  #else
+ #ifdef AFS_ARM_LINUX20_ENV
+ #include "conf-arm-linux.h"
+ #else
  #include "conf-i386-linux.h"
+ #endif /* AFS_ARM_LINUX20_ENV */
  #endif /* AFS_PPC64_LINUX20_ENV */
  #endif /* AFS_AMD64_LINUX20_ENV */
  #endif /* AFS_IA64_LINUX20_ENV */
Index: openafs/src/des/conf-arm-linux.h
diff -c /dev/null openafs/src/des/conf-arm-linux.h:1.1.2.2
*** /dev/null	Mon Feb 11 10:58:22 2008
--- openafs/src/des/conf-arm-linux.h	Tue Jan 15 00:12:14 2008
***************
*** 0 ****
--- 1,14 ----
+ /*
+  * Copyright 1988 by the Massachusetts Institute of Technology.
+  *
+  * For copying and distribution information, please see the file
+  * <mit-copyright.h>.
+  *
+  * Machine-type definitions: Linux on Intel
+  */
+ 
+ #include <mit-cpyright.h>
+ 
+ #define BITS32
+ #define BIG
+ #define LSBFIRST
Index: openafs/src/fsint/afsint.xg
diff -c openafs/src/fsint/afsint.xg:1.13 openafs/src/fsint/afsint.xg:1.13.14.1
*** openafs/src/fsint/afsint.xg:1.13	Wed Jun  2 02:57:35 2004
--- openafs/src/fsint/afsint.xg	Tue Feb  5 12:26:46 2008
***************
*** 693,703 ****
  ) split = 65538;
  
  GiveUpAllCallBacks(
! ) = 65539;
  
  GetCapabilities(
    Capabilities *capabilities
! ) = 65540;
  
  CallBackRxConnAddr(
    IN afs_int32 *addr
--- 693,703 ----
  ) split = 65538;
  
  GiveUpAllCallBacks(
! ) multi = 65539;
  
  GetCapabilities(
    Capabilities *capabilities
! ) multi = 65540;
  
  CallBackRxConnAddr(
    IN afs_int32 *addr
Index: openafs/src/kauth/NTMakefile
diff -c openafs/src/kauth/NTMakefile:1.11.4.1 openafs/src/kauth/NTMakefile:1.11.4.2
*** openafs/src/kauth/NTMakefile:1.11.4.1	Tue Jul  4 02:28:24 2006
--- openafs/src/kauth/NTMakefile	Sat Feb  2 08:43:25 2008
***************
*** 125,131 ****
  	$(DESTDIR)\lib\afs\afsprocmgmt.lib
  
  $(KASERVER): $(KASERVER_OBJS) $(AFSLIBS) $(KASERVER_EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
--- 125,131 ----
  	$(DESTDIR)\lib\afs\afsprocmgmt.lib
  
  $(KASERVER): $(KASERVER_OBJS) $(AFSLIBS) $(KASERVER_EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
***************
*** 150,156 ****
  	$(OUT)\kas.res
  	
  $(KAS): $(KAS_OBJS) $(AFSLIBS) $(KAUTH_LIBFILE) $(TOKENLIB)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
--- 150,156 ----
  	$(OUT)\kas.res
  	
  $(KAS): $(KAS_OBJS) $(AFSLIBS) $(KAUTH_LIBFILE) $(TOKENLIB)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
***************
*** 164,186 ****
  	$(OUT)\kpasswd.res
  
  $(KPASSWD_EXEFILE): $(KPASSWD_OBJS) $(AFSLIBS) $(KAUTH_LIBFILE) $(TOKENLIB)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
  #kpwvalid.exe
  $(OUT)\kpwvalid.exe: $(OUT)\kpwvalid.obj $(AFSLIBS) $(KAUTH_LIBFILE)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  
  #kdb.exe - Not implemented for NT - because dbm not available on NT
  #kdb.exe: $(OUT)\kdb.obj $(AFSLIBS) $(KAUTH_LIBFILE) 
! #	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
  #       $(_VC_MANIFEST_EMBED_EXE)
  
  #rebuild.exe 
  $(OUT)\rebuild.exe: $(OUT)\rebuild.obj $(OUT)\kautils.obj $(AFSLIBS) 
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  
  ############################################################################
--- 164,186 ----
  	$(OUT)\kpasswd.res
  
  $(KPASSWD_EXEFILE): $(KPASSWD_OBJS) $(AFSLIBS) $(KAUTH_LIBFILE) $(TOKENLIB)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
  #kpwvalid.exe
  $(OUT)\kpwvalid.exe: $(OUT)\kpwvalid.obj $(AFSLIBS) $(KAUTH_LIBFILE)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  
  #kdb.exe - Not implemented for NT - because dbm not available on NT
  #kdb.exe: $(OUT)\kdb.obj $(AFSLIBS) $(KAUTH_LIBFILE) 
! #	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
  #       $(_VC_MANIFEST_EMBED_EXE)
  
  #rebuild.exe 
  $(OUT)\rebuild.exe: $(OUT)\rebuild.obj $(OUT)\kautils.obj $(AFSLIBS) 
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  
  ############################################################################
Index: openafs/src/kauth/krb_udp.c
diff -c openafs/src/kauth/krb_udp.c:1.23.14.3 openafs/src/kauth/krb_udp.c:1.23.14.4
*** openafs/src/kauth/krb_udp.c:1.23.14.3	Mon Nov 26 16:08:42 2007
--- openafs/src/kauth/krb_udp.c	Sun Feb  3 22:59:06 2008
***************
*** 16,22 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/krb_udp.c,v 1.23.14.3 2007/11/26 21:08:42 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 16,22 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/krb_udp.c,v 1.23.14.4 2008/02/04 03:59:06 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 60,65 ****
--- 60,68 ----
  #define	KDC_GEN_ERR	20
  #endif
  
+ #ifndef AFS_NT40_ENV
+ #define closesocket close
+ #endif
  
  int krb_udp_debug = 0;
  
***************
*** 892,902 ****
  	}
      }
      if (sock_kerb >= 0) {
! 	close(sock_kerb);
  	sock_kerb = -1;
      }
      if (sock_kerb5 >= 0) {
! 	close(sock_kerb5);
  	sock_kerb5 = -1;
      }
      printf("UDP SocketListener exiting due to error\n");
--- 895,905 ----
  	}
      }
      if (sock_kerb >= 0) {
! 	closesocket(sock_kerb);
  	sock_kerb = -1;
      }
      if (sock_kerb5 >= 0) {
! 	closesocket(sock_kerb5);
  	sock_kerb5 = -1;
      }
      printf("UDP SocketListener exiting due to error\n");
Index: openafs/src/libadmin/adminutil/NTMakefile
diff -c openafs/src/libadmin/adminutil/NTMakefile:1.8 openafs/src/libadmin/adminutil/NTMakefile:1.8.4.1
*** openafs/src/libadmin/adminutil/NTMakefile:1.8	Sun Nov 20 20:56:55 2005
--- openafs/src/libadmin/adminutil/NTMakefile	Sat Feb  2 08:43:25 2008
***************
*** 143,149 ****
          $(DESTDIR)\lib\afs\afsreg.lib
  
  $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
! 	$(DLLCONLINK) /DEF:afsadminutil.def
          $(_VC_MANIFEST_EMBED_DLL)
  	$(DLLPREP)
  	$(COPY) $*.lib $(ILIBDIR)
--- 143,149 ----
          $(DESTDIR)\lib\afs\afsreg.lib
  
  $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
! 	$(DLLCONLINK) /DEF:afsadminutil.def shell32.lib
          $(_VC_MANIFEST_EMBED_DLL)
  	$(DLLPREP)
  	$(COPY) $*.lib $(ILIBDIR)
Index: openafs/src/libadmin/bos/Makefile.in
diff -c openafs/src/libadmin/bos/Makefile.in:1.7 openafs/src/libadmin/bos/Makefile.in:1.7.14.1
*** openafs/src/libadmin/bos/Makefile.in:1.7	Sat Jan 11 02:34:29 2003
--- openafs/src/libadmin/bos/Makefile.in	Mon Jan 21 13:38:02 2008
***************
*** 12,18 ****
  CFLAGS=${COMMON_CFLAGS} ${MT_CFLAGS}
  CCRULE = ${CC} ${CFLAGS} -c $?
  
! BOZO = ../../bozo/
  
  ADMINOBJS = afs_bosAdmin.o
  
--- 12,18 ----
  CFLAGS=${COMMON_CFLAGS} ${MT_CFLAGS}
  CCRULE = ${CC} ${CFLAGS} -c $?
  
! BOZO = ../../bozo
  
  ADMINOBJS = afs_bosAdmin.o
  
Index: openafs/src/libadmin/cfg/NTMakefile
diff -c openafs/src/libadmin/cfg/NTMakefile:1.6 openafs/src/libadmin/cfg/NTMakefile:1.6.4.2
*** openafs/src/libadmin/cfg/NTMakefile:1.6	Sun Nov 20 20:56:57 2005
--- openafs/src/libadmin/cfg/NTMakefile	Sat Feb  2 08:43:25 2008
***************
*** 55,64 ****
  	$(DESTDIR)\lib\afs\afsvosadmin.lib \
  	$(DESTDIR)\lib\afsrpc.lib \
  	$(DESTDIR)\lib\afsauthent.lib \
! 	$(DESTDIR)\lib\afs\afsreg.lib
  
  $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
! 	$(DLLCONLINK) /DEF:afscfgadmin.def
          $(_VC_MANIFEST_EMBED_DLL)
  	$(DLLPREP)
  	$(COPY) $*.lib $(ILIBDIR)
--- 55,65 ----
  	$(DESTDIR)\lib\afs\afsvosadmin.lib \
  	$(DESTDIR)\lib\afsrpc.lib \
  	$(DESTDIR)\lib\afsauthent.lib \
! 	$(DESTDIR)\lib\afs\afsreg.lib \
!         $(DESTDIR)\lib\libafsconf.lib
  
  $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
! 	$(DLLCONLINK) /DEF:afscfgadmin.def shell32.lib
          $(_VC_MANIFEST_EMBED_DLL)
  	$(DLLPREP)
  	$(COPY) $*.lib $(ILIBDIR)
Index: openafs/src/libadmin/kas/Makefile.in
diff -c openafs/src/libadmin/kas/Makefile.in:1.7 openafs/src/libadmin/kas/Makefile.in:1.7.14.1
*** openafs/src/libadmin/kas/Makefile.in:1.7	Sat Jan 11 02:34:35 2003
--- openafs/src/libadmin/kas/Makefile.in	Mon Jan 21 13:38:02 2008
***************
*** 12,18 ****
  CFLAGS=${COMMON_CFLAGS} ${MT_CFLAGS} -I../../kauth -I${srcdir}/../../kauth
  CCRULE = ${CC} ${CFLAGS} -c $?
  
! KAUTH= ${srcdir}/../../kauth/
  
  ADMINOBJS = afs_kasAdmin.o
  
--- 12,18 ----
  CFLAGS=${COMMON_CFLAGS} ${MT_CFLAGS} -I../../kauth -I${srcdir}/../../kauth
  CCRULE = ${CC} ${CFLAGS} -c $?
  
! KAUTH= ${srcdir}/../../kauth
  
  ADMINOBJS = afs_kasAdmin.o
  
Index: openafs/src/libadmin/pts/Makefile.in
diff -c openafs/src/libadmin/pts/Makefile.in:1.7 openafs/src/libadmin/pts/Makefile.in:1.7.14.1
*** openafs/src/libadmin/pts/Makefile.in:1.7	Sat Jan 11 02:34:36 2003
--- openafs/src/libadmin/pts/Makefile.in	Mon Jan 21 13:38:03 2008
***************
*** 12,18 ****
  CFLAGS=${COMMON_CFLAGS} ${MT_CFLAGS}
  CCRULE = ${CC} ${CFLAGS} -c $?
  
! PTSERVER = ../../ptserver/
  
  ADMINOBJS = \
  	afs_ptsAdmin.o
--- 12,18 ----
  CFLAGS=${COMMON_CFLAGS} ${MT_CFLAGS}
  CCRULE = ${CC} ${CFLAGS} -c $?
  
! PTSERVER = ../../ptserver
  
  ADMINOBJS = \
  	afs_ptsAdmin.o
Index: openafs/src/libadmin/vos/Makefile.in
diff -c openafs/src/libadmin/vos/Makefile.in:1.7 openafs/src/libadmin/vos/Makefile.in:1.7.14.1
*** openafs/src/libadmin/vos/Makefile.in:1.7	Sat Jan 11 02:34:39 2003
--- openafs/src/libadmin/vos/Makefile.in	Mon Jan 21 13:38:03 2008
***************
*** 12,20 ****
  CFLAGS=${COMMON_CFLAGS} ${MT_CFLAGS}
  CCRULE = ${CC} ${CFLAGS} -c $?
  
! VLSERVER = ../../vlserver/
! VOLSER = ../../volser/
! FSINT = ../../fsint/
  
  ADMINOBJS =\
  	afs_vosAdmin.o \
--- 12,20 ----
  CFLAGS=${COMMON_CFLAGS} ${MT_CFLAGS}
  CCRULE = ${CC} ${CFLAGS} -c $?
  
! VLSERVER = ../../vlserver
! VOLSER = ../../volser
! FSINT = ../../fsint
  
  ADMINOBJS =\
  	afs_vosAdmin.o \
Index: openafs/src/libafs/MakefileProto.FBSD.in
diff -c openafs/src/libafs/MakefileProto.FBSD.in:1.27 openafs/src/libafs/MakefileProto.FBSD.in:1.27.4.1
*** openafs/src/libafs/MakefileProto.FBSD.in:1.27	Fri Jan 20 11:40:25 2006
--- openafs/src/libafs/MakefileProto.FBSD.in	Tue Jan 15 01:09:13 2008
***************
*** 30,37 ****
  # System specific build commands and flags
  KSRC = @BSD_KERNEL_PATH@
  KBLD = @BSD_KERNEL_BUILD@
! KDEFS=-Wall -ansi -nostdinc -I/usr/include -D_KERNEL -DKLD_MODULE \
! 	-elf -mpreferred-stack-boundary=2 -fformat-extensions \
  <i386_fbsd_42 i386_fbsd_43 i386_fbsd_44 i386_fbsd_45 i386_fbsd_46 i386_fbsd_47>
  	-include ${KBLD}/opt_global.h \
  <i386_fbsd_60>
--- 30,39 ----
  # System specific build commands and flags
  KSRC = @BSD_KERNEL_PATH@
  KBLD = @BSD_KERNEL_BUILD@
! KDEFS=-Wall -nostdinc -I/usr/include -D_KERNEL -DKLD_MODULE \
! 	-elf -mpreferred-stack-boundary=2 \
! <i386_fbsd_42 i386_fbsd_43 i386_fbsd_44 i386_fbsd_45 i386_fbsd_46 i386_fbsd_47>
! 	-fformat-extensions \
  <i386_fbsd_42 i386_fbsd_43 i386_fbsd_44 i386_fbsd_45 i386_fbsd_46 i386_fbsd_47>
  	-include ${KBLD}/opt_global.h \
  <i386_fbsd_60>
Index: openafs/src/libafsauthent/NTMakefile
diff -c openafs/src/libafsauthent/NTMakefile:1.15 openafs/src/libafsauthent/NTMakefile:1.15.4.1
*** openafs/src/libafsauthent/NTMakefile:1.15	Sun Nov 20 20:57:07 2005
--- openafs/src/libafsauthent/NTMakefile	Sat Feb  2 08:43:25 2008
***************
*** 144,150 ****
          $(DESTDIR)\lib\lanahelper.lib
  
  $(LIBFILE): $(DLLOBJS) $(DLLLIBS) $(RXOBJS)
! 	$(DLLCONLINK) /DEF:afsauthent.def rpcrt4.lib dnsapi.lib mpr.lib secur32.lib
          $(_VC_MANIFEST_EMBED_DLL)
  	$(DLLPREP)
  
--- 144,150 ----
          $(DESTDIR)\lib\lanahelper.lib
  
  $(LIBFILE): $(DLLOBJS) $(DLLLIBS) $(RXOBJS)
! 	$(DLLCONLINK) /DEF:afsauthent.def rpcrt4.lib dnsapi.lib mpr.lib secur32.lib shell32.lib
          $(_VC_MANIFEST_EMBED_DLL)
  	$(DLLPREP)
  
Index: openafs/src/libafsauthent/afsauthent.def
diff -c openafs/src/libafsauthent/afsauthent.def:1.5.2.2 openafs/src/libafsauthent/afsauthent.def:1.5.2.3
*** openafs/src/libafsauthent/afsauthent.def:1.5.2.2	Tue Jul  4 02:28:25 2006
--- openafs/src/libafsauthent/afsauthent.def	Thu Jan 24 11:08:11 2008
***************
*** 114,116 ****
--- 114,117 ----
  	rx_InitHost					@112
  	VOTE_GetSyncSite				@113
  	ubik_RefreshConn				@114
+         rx_SetSecurityConfiguration                     @115
Index: openafs/src/libafsrpc/afsrpc.def
diff -c openafs/src/libafsrpc/afsrpc.def:1.11.4.5 openafs/src/libafsrpc/afsrpc.def:1.11.4.7
*** openafs/src/libafsrpc/afsrpc.def:1.11.4.5	Tue Apr 10 18:09:18 2007
--- openafs/src/libafsrpc/afsrpc.def	Tue Feb  5 12:26:47 2008
***************
*** 220,222 ****
--- 220,228 ----
  	rx_NewServiceHost			@225
          osi_AssertFailU				@226
  	DllMain					@227
+         rx_SetSecurityConfiguration             @228
+ ;        RXAFSCB_ExecuteRequest                  @229
+         EndRXAFS_GetTime                        @230
+         StartRXAFS_GetTime                      @231
+         EndRXAFS_GetCapabilities                @232
+         StartRXAFS_GetCapabilities              @233
Index: openafs/src/libuafs/Makefile.common.in
diff -c openafs/src/libuafs/Makefile.common.in:1.13.4.4 openafs/src/libuafs/Makefile.common.in:1.13.4.5
*** openafs/src/libuafs/Makefile.common.in:1.13.4.4	Mon Jul 31 17:27:41 2006
--- openafs/src/libuafs/Makefile.common.in	Mon Jan 21 13:38:03 2008
***************
*** 839,847 ****
  
  # These files are for the netscape plugin
  
! $(WEBOBJ)/afs_atomlist.o: $(TOP_SRCDIR)/util//afs_atomlist.c
  	$(CRULE2)
! $(WEBOBJ)/afs_lhash.o: $(TOP_SRCDIR)/util//afs_lhash.c
  	$(CRULE2)
  $(WEBOBJ)/afs_analyze.o: $(TOP_SRC_AFS)/afs_analyze.c
  	$(CRULE2)
--- 839,847 ----
  
  # These files are for the netscape plugin
  
! $(WEBOBJ)/afs_atomlist.o: $(TOP_SRCDIR)/util/afs_atomlist.c
  	$(CRULE2)
! $(WEBOBJ)/afs_lhash.o: $(TOP_SRCDIR)/util/afs_lhash.c
  	$(CRULE2)
  $(WEBOBJ)/afs_analyze.o: $(TOP_SRC_AFS)/afs_analyze.c
  	$(CRULE2)
***************
*** 1102,1108 ****
  
  $(JUAFS)/afs_atomlist.o: $(TOP_SRCDIR)/util/afs_atomlist.c
  	$(CRULE1)
! $(JUAFS)/afs_lhash.o: $(TOP_SRCDIR)/util//afs_lhash.c
  	$(CRULE1)
  $(JUAFS)/afs_analyze.o: $(TOP_SRC_AFS)/afs_analyze.c
  	$(CRULE1)
--- 1102,1108 ----
  
  $(JUAFS)/afs_atomlist.o: $(TOP_SRCDIR)/util/afs_atomlist.c
  	$(CRULE1)
! $(JUAFS)/afs_lhash.o: $(TOP_SRCDIR)/util/afs_lhash.c
  	$(CRULE1)
  $(JUAFS)/afs_analyze.o: $(TOP_SRC_AFS)/afs_analyze.c
  	$(CRULE1)
Index: openafs/src/libuafs/MakefileProto.FBSD.in
diff -c openafs/src/libuafs/MakefileProto.FBSD.in:1.11 openafs/src/libuafs/MakefileProto.FBSD.in:1.11.14.1
*** openafs/src/libuafs/MakefileProto.FBSD.in:1.11	Sun Apr 18 02:10:33 2004
--- openafs/src/libuafs/MakefileProto.FBSD.in	Tue Jan 15 01:09:13 2008
***************
*** 19,25 ****
--- 19,29 ----
  
  TEST_CFLAGS=-D_REENTRANT -DAFS_PTHREAD_ENV -DAFS_FBSD40_ENV
  TEST_LDFLAGS=
+ <all -i386_fbsd_62 -i386_fbsd_70>
  TEST_LIBS=-lc_r
+ <i386_fbsd_62 -i386_fbsd_70>
+ TEST_LIBS=-lpthread
+ <all>
  
  LIBUAFS = libuafs.a
  LIBJUAFS = libjuafs.a
Index: openafs/src/lwp/lwp.c
diff -c openafs/src/lwp/lwp.c:1.34.2.3 openafs/src/lwp/lwp.c:1.34.2.4
*** openafs/src/lwp/lwp.c:1.34.2.3	Mon Nov 26 16:08:43 2007
--- openafs/src/lwp/lwp.c	Tue Jan 15 00:12:15 2008
***************
*** 17,23 ****
  #include <afsconfig.h>
  #include <afs/param.h>
  
! RCSID("$Header: /cvs/openafs/src/lwp/lwp.c,v 1.34.2.3 2007/11/26 21:08:43 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
--- 17,23 ----
  #include <afsconfig.h>
  #include <afs/param.h>
  
! RCSID("$Header: /cvs/openafs/src/lwp/lwp.c,v 1.34.2.4 2008/01/15 05:12:15 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
***************
*** 47,57 ****
--- 47,59 ----
  extern void *malloc(int size);
  extern void *realloc(void *ptr, int size);
  #endif
+ #ifndef AFS_ARM_LINUX20_ENV
  #if defined(AFS_OSF_ENV) || defined(AFS_S390_LINUX20_ENV)
  extern int PRE_Block;		/* from preempt.c */
  #else
  extern char PRE_Block;		/* from preempt.c */
  #endif
+ #endif
  
  #define ON		1
  #define OFF		0
***************
*** 367,377 ****
--- 369,381 ----
  	Initialize_PCB(temp, priority, stackmemory, stacksize, ep, parm, name);
  	insert(temp, &runnable[priority]);
  	temp2 = lwp_cpptr;
+ #ifndef AFS_ARM_LINUX20_ENV
  	if (PRE_Block != 0)
  	    Abort_LWP("PRE_Block not 0");
  
  	/* Gross hack: beware! */
  	PRE_Block = 1;
+ #endif
  	lwp_cpptr = temp;
  #if defined(AFS_PARISC_LINUX24_ENV)
  	savecontext(Create_Process_Part2, &temp2->context,
***************
*** 460,470 ****
--- 464,476 ----
  	Initialize_PCB(temp, priority, stackptr, stacksize, ep, parm, name);
  	insert(temp, &runnable[priority]);
  	temp2 = lwp_cpptr;
+ #ifndef AFS_ARM_LINUX20_ENV
  	if (PRE_Block != 0)
  	    Abort_LWP("PRE_Block not 0");
  
  	/* Gross hack: beware! */
  	PRE_Block = 1;
+ #endif
  	lwp_cpptr = temp;
  	savecontext(Create_Process_Part2, &temp2->context,
  		    stackptr + stacksize - sizeof(void *));
***************
*** 956,963 ****
--- 962,971 ----
  	printf("Dispatch %d [PCB at 0x%x] \"%s\"\n", ++dispatch_count,
  	       runnable[i].head, runnable[i].head->name);
  #endif
+ #ifndef AFS_ARM_LINUX20_ENV
      if (PRE_Block != 1)
  	Abort_LWP("PRE_Block not 1");
+ #endif
      lwp_cpptr = runnable[i].head;
  
      returnto(&lwp_cpptr->context);
Index: openafs/src/lwp/process.s
diff -c openafs/src/lwp/process.s:1.12 openafs/src/lwp/process.s:1.12.8.2
*** openafs/src/lwp/process.s:1.12	Wed Aug 11 11:45:37 2004
--- openafs/src/lwp/process.s	Tue Jan 15 09:09:42 2008
***************
*** 12,19 ****
  #include <afs/param.h>
  /*#endif /* AFS_DJGPP_ENV */
  
! #if defined(RIOS)
  
  /*                 I don't know if we have to save the TOC (R2) or not...
   *		   Note that stack-frame is supposed to be aligned on 
   *		   a double-word boundary.
--- 12,74 ----
  #include <afs/param.h>
  /*#endif /* AFS_DJGPP_ENV */
  
! #if defined(__arm32__) || defined(__arm__)
!        /* register definitions */
!        fp      .req    r11
!        ip      .req    r12
!        sp      .req    r13
!        lp      .req    r14
!        pc      .req    r15
!        
!        /*
!           savecontext(f, area1, newsp)
!                int (*f)()#if defined(RIOS);
!                struct savearea *area1;
!                char *newsp;
!        */
! 
!        /* Arguments appear as:	   f in r0, area1 in r1, newsp in r2 */
! 
!        .text
!        .align  0
!        .globl  savecontext
!        .type   savecontext, #function
! savecontext:
!        @ build the frame
!        mov     ip, sp
!        stmfd   sp!, {fp, ip, lr, pc}
!        sub     fp, ip, #4
!        @ stack r0 - r10, current fp
!        stmfd   sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, fp}
!        str     sp, [r1, #0]
!        @ check if newsp is zero
!        movs    r2, r2
!        movne   sp, r2
!        @ call function ...
!        mov     pc, r0
! 
!        /*      should never get here ... */
!        /*      bl      EXT(abort) */
! 
!        /*
!          returnto(area2)
!             struct savearea *area2;
!        */
  
+        /* area2 is in r0. */
+ 
+        .globl returnto
+        .type  returnto, #function
+ returnto:
+        @ restore r0-r10, fp
+        ldr     r0, [r0, #0]
+        ldmfd   r0, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, fp}
+        @ return from function call
+        ldmea   fp, {fp, sp, pc}
+ 
+ #endif /* __arm32__ or __arm__ */
+ 
+ #if defined(RIOS)
  /*                 I don't know if we have to save the TOC (R2) or not...
   *		   Note that stack-frame is supposed to be aligned on 
   *		   a double-word boundary.
Index: openafs/src/packaging/MacOS/OpenAFS.post_install
diff -c openafs/src/packaging/MacOS/OpenAFS.post_install:1.7.2.3 openafs/src/packaging/MacOS/OpenAFS.post_install:1.7.2.4
*** openafs/src/packaging/MacOS/OpenAFS.post_install:1.7.2.3	Wed Oct 24 23:43:39 2007
--- openafs/src/packaging/MacOS/OpenAFS.post_install	Mon Jan 21 15:57:24 2008
***************
*** 44,51 ****
  fi
  rm -f config/afsd.options.broken
  
! if [ ! -f config/afsd.options -a -f config/afsd.options.sample ]; then
!    cp config/afsd.options.sample config/afsd.options
  fi
  
  # testing case -- upgrading from pre 1.2.7, but .last file exists.
--- 44,60 ----
  fi
  rm -f config/afsd.options.broken
  
! # if the user hasn't changed these settings, then they should just use the new
! # afsd.conf file
! rm -f config/afsd.options.old
! echo '-afsdb -stat 2000 -dcache 800 -daemons 3 -volumes 70 -dynroot -fakestat-all' >config/afsd.options.old
! if cmp -s config/afsd.options.old config/afsd.options ; then
!    rm -f config/afsd.options
! fi
! rm -f config/afsd.options.old
! 
! if [ ! -f config/afs.conf -a -f config/afs.conf.sample ]; then
!    cp config/afs.conf.sample config/afs.conf
  fi
  
  # testing case -- upgrading from pre 1.2.7, but .last file exists.
Index: openafs/src/packaging/MacOS/afs.conf
diff -c /dev/null openafs/src/packaging/MacOS/afs.conf:1.1.2.2
*** /dev/null	Mon Feb 11 10:58:23 2008
--- openafs/src/packaging/MacOS/afs.conf	Mon Jan 21 15:57:24 2008
***************
*** 0 ****
--- 1,94 ----
+ # -*- sh -*-
+ # WARNING: this file is ignored if /var/db/openafs/etc/config/afsd.options
+ # exists. 
+ #
+ # 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
+ 
+ # Configuration information for AFS client.
+ 
+ # Set to "-verbose" for a lot of debugging information from afsd.  Only useful
+ # for debugging as it prints a LOT of information.
+ VERBOSE=
+ 
+ # AFS client configuration options.
+ #
+ # Here is a (mostly) complete list of flags that afsd accepts and that are
+ # useful here:
+ #
+ #   -blocks     The number of blocks available in the workstation cache.
+ #   -files      The target number of files in the workstation cache (Default:
+ #               1000).
+ #   -rootvol    The name of the root volume to use.
+ #   -stat       The number of stat cache entries.
+ #   -hosts      List of servers to check for volume location info FOR THE
+ #               HOME CELL.
+ #   -memcache   Use an in-memory cache rather than disk.
+ #   -cachedir   The base directory for the workstation cache.
+ #   -mountdir   The directory on which the AFS is to be mounted.
+ #   -confdir    The configuration directory.
+ #   -nosettime  Don't keep checking the time to avoid drift (default).
+ #   -settime    Keep checking the time to avoid drift.
+ #   -verbose    Be chatty.
+ #   -debug      Print out additional debugging info.
+ #   -daemons    The number of background daemons to start (Default: 2).
+ #   -rmtsys     Also fires up an afs remote sys call (e.g. pioctl, setpag)
+ #               support daemon 
+ #   -chunksize  2^n is the chunksize to be used (Default: use a kernel
+ #               module default).
+ #   -dcache     The number of data cache entries.
+ #   -prealloc   Number of preallocated "small" memory blocks
+ #   -waitclose  Make close calls always synchronous (slows them down, though)
+ #   -files_per_subdir   Number of files per cache subdir (Default: 2048).
+ #
+ # Using the memory cache is not recommended.  It's less stable than the disk
+ # cache and doesn't improve performance as much as it might sound.
+ #
+ # The default behavior is to let afsd automatically choose an apporpriate set
+ # of flags.  This should produce reasonable behavior for most working sets
+ # provided that one is using a modern AFS client (1.4.2 or later).
+ #
+ # You can override that default behavior by setting OPTIONS to a specific set
+ # of flags.
+ OPTIONS="-afsdb -stat 2000 -dcache 800 -daemons 3 -volumes 70 -dynroot -fakestat-all"
+ 
+ # The default value for the client sysname (as returned by fs sysname) is
+ # determined during the kernel module build and is taken from the architecture
+ # and the major Linux kernel version.  Accesses to directories named "@sys" in
+ # AFS will be internally redirected to a directory by this name by the AFS
+ # client, allowing a single path to resolve to different directories depending
+ # on the client architecture.
+ #
+ # If you would like to override the client sysname, uncomment this line and
+ # set the variable to a space-separated list of sysnames.  The AFS client will
+ # attempt to resolve @sys to each directory name in the order given.
+ AFS_SYSNAME=""
+ 
+ # If you want to prefer particular servers for replicated volumes, you can
+ # configure that by defining an afs_server_prefs function here and then
+ # uncommenting the setting of AFS_POST_INIT below.  For more information, see
+ # fs help setserverprefs and fs getserverprefs (for the current values).
+ 
+ #afs_server_prefs() {
+ #    fs setserverprefs <host> <rank>
+ #}
+ 
+ # If you want to always run some command after starting OpenAFS, you can put
+ # it here.  Note that you cannot run multiple commands, even combined with &&
+ # or ; or similar shell meta-characters.  If you want to run multiple
+ # commands, define a shell function instead and put the name of the shell
+ # function here.
+ AFS_POST_INIT=
+ 
+ # Uncomment this line if you defined an afs_server_prefs function.  (If you
+ # have other commands that you also want to run, you'll have to put them in
+ # that function, as you can only run one function.)
+ #AFS_POST_INIT=afs_server_prefs
+ 
+ # If you want to always run some command before shutting down OpenAFS, you can
+ # put it here.  The same caveat applies about multiple commands.
+ AFS_PRE_SHUTDOWN=
Index: openafs/src/packaging/MacOS/buildpkg.sh.in
diff -c openafs/src/packaging/MacOS/buildpkg.sh.in:1.1.2.3 openafs/src/packaging/MacOS/buildpkg.sh.in:1.1.2.4
*** openafs/src/packaging/MacOS/buildpkg.sh.in:1.1.2.3	Fri Nov 23 08:03:05 2007
--- openafs/src/packaging/MacOS/buildpkg.sh.in	Mon Jan 21 15:57:24 2008
***************
*** 131,137 ****
      else
  	echo /Network/afs:/var/db/openafs/cache:30000 > $PKGROOT/private/var/db/openafs/etc/cacheinfo.sample
      fi
!     echo '-afsdb -stat 2000 -dcache 800 -daemons 3 -volumes 70 -dynroot -fakestat-all' > $PKGROOT/private/var/db/openafs/etc/config/afsd.options.sample
  
      strip -X -S $PKGROOT/Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs
  
--- 131,137 ----
      else
  	echo /Network/afs:/var/db/openafs/cache:30000 > $PKGROOT/private/var/db/openafs/etc/cacheinfo.sample
      fi
!     cp afs.conf $PKGROOT/private/var/db/openafs/etc/config/afs.conf.sample
  
      strip -X -S $PKGROOT/Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs
  
Index: openafs/src/packaging/MacOS/decode-panic
diff -c /dev/null openafs/src/packaging/MacOS/decode-panic:1.1.2.2
*** /dev/null	Mon Feb 11 10:58:23 2008
--- openafs/src/packaging/MacOS/decode-panic	Sun Jan 27 13:46:14 2008
***************
*** 0 ****
--- 1,302 ----
+ #!/usr/bin/perl
+ 
+ # decode-panic - decode a Mac OS panic log to show source line numbers
+ # see the end of the file for full documentation and license.
+ 
+ use Carp;
+ use English qw( -no_match_vars ) ;
+ use File::Basename;
+ use File::Temp qw( tempdir );
+ use Getopt::Long;
+ use IO::Dir;
+ use IO::File;
+ use Pod::Usage;
+ use warnings;
+ use strict;
+ 
+ my $panic_file = "/Library/Logs/panic.log";
+ my %crash_info;
+ my $backtrace;
+ my $kextload   = "/sbin/kextload";
+ my $gdb        = "/usr/bin/gdb";
+ my $gdb_file   = "gdb.input";
+ my $temp_dir   = tempdir( "afsdebugXXXXXX", DIR => File::Spec->tmpdir,
+                         TMPDIR => 1, CLEANUP => 1 );
+ my $dump_file  = "/var/db/openafs/logs/crash.dump";
+ 
+ my $option_quiet;
+ my $option_help;
+ my $result = GetOptions ("input=s"  => \$panic_file,
+                          "output=s" => \$dump_file,
+                          "quiet"    => \$option_quiet,
+                          "help"     => \$option_help
+                      );
+ 
+ if ( !$result ) {
+     pod2usage(-message => "Syntax error.",
+               -exitval => 2,
+               -verbose => 1,
+               -output  => \*STDERR);
+     
+     exit;
+ }
+ 
+ if ($option_help) {
+     pod2usage(-message => "",
+               -exitval => 2,
+               -verbose => 3,
+               -output  => \*STDERR);
+     exit;
+ }
+ 
+ # check for necessary programs & panic file
+ for my $program ( $kextload, $gdb ) {
+     if ( ! -x $program ) {
+         if ( $option_quiet ) {
+             exit 1;
+         } else {
+             croak "Can't find $program!\n"
+         }
+     }
+ }
+ 
+ croak "Can't find panic file: $panic_file!\n" if ( ! -r $panic_file );
+ 
+ read_panic( $panic_file, \%crash_info );
+ 
+ generate_symbol_files( $crash_info{"afs_kernel_address"}, $temp_dir );
+ 
+ write_gdb_input_file( $temp_dir, $gdb_file, $crash_info{ "backtrace" } );
+ 
+ my $gdb_output = `$gdb /mach_kernel -batch -x $temp_dir/$gdb_file`;
+ croak "gdb failed!\n" if $CHILD_ERROR;
+ 
+ write_dump_file( $dump_file, \%crash_info, $gdb_output );
+ 
+ # read the panic file and parse out the addresses
+ sub read_panic {
+ 
+     my $filename      = shift;
+     my $hash_ref      = shift;
+ 
+     my $kernel_line;
+     my $line;
+     my @panic_section_positions = ( 0 );
+ 
+     
+     my $panic_fh = IO::File->new( $filename, '<' )
+         or croak "Can't open backtrace file $filename: $OS_ERROR\n";
+ 
+     # find the last panic section as denoted by "*********"
+     while ( $line = <$panic_fh> ) {
+         chomp $line;
+         if ( $line eq "*********" ) {
+             # skip a line
+             $line = <$panic_fh>;
+             push @panic_section_positions, $panic_fh->tell;
+         }
+     }
+ 
+     # ignore the empty last section
+     if ( @panic_section_positions > 2 ) {
+         pop @panic_section_positions
+     }
+ 
+     # Seek to last full panic section
+     # or the beginning of the file if appropriate
+     $panic_fh->seek( $panic_section_positions[-1], 0 );
+ 
+     $hash_ref->{ "date" } = <$panic_fh>;
+     chomp $hash_ref->{ "date" };
+ 
+     while ( $line = <$panic_fh> ) {
+         chomp $line;
+     
+         #skip lines until "Backtrace" is seen
+         $line =~ /^\s*(Backtrace,|Backtrace:)/;
+         $backtrace = $1;
+         last if $backtrace;
+     }
+     
+     if ( !$backtrace ) {
+         if ( $option_quiet ) {
+             exit 1;
+         } else {
+             croak "Couldn't find a backtrace in $filename\n";
+         }
+     }
+     
+     # gather the backtrace addresses
+     if ( $backtrace eq "Backtrace:" ) {
+         # ppc format panic
+         while ( $line = <$panic_fh> ) {
+             chomp $line;
+             last if $line !~ /^\s*(0x[0-9a-fA-F]{8})/;
+             my @memory_addresses = split /\s+/, $line;
+ 
+             # add non-empty array elements to the list
+             push @{ $hash_ref->{ "backtrace" } },
+                 grep { /0x/ } @memory_addresses;
+         }
+     } else {
+         # intel format panic
+         while ( $line = <$panic_fh> ) {
+             chomp $line;
+             last if $line !~ /^\s*0x[0-9a-fA-F]{8} : (0x[0-9a-fA-F]*)/;
+             push @{ $hash_ref->{ "backtrace" } }, $1;
+         }
+     }
+ 
+     # now we need the address for the afs kernel module
+     while ( $line = <$panic_fh> ) {
+         chomp $line;
+         next if ( $line !~ /org\.openafs\.filesystems\.afs/ );
+ 
+         $kernel_line = $line;
+         $line =~ /\@(0x[0-9a-fA-F]+)/;
+         $hash_ref->{ "afs_kernel_address" } = $1;
+         $kernel_line =~ /^\s+([^@]+)@.+/;
+         $hash_ref->{ "afs_info" } = $1;
+ 
+         last;
+     }
+ 
+     # grab the kernel version
+     while ( $line = <$panic_fh> ) {
+         chomp $line;
+         next if ( $line !~ /^Darwin Kernel Version/ );
+         $hash_ref->{ "kernel_version" } = $line;
+     }
+     
+     $panic_fh->close()
+         or croak "Can't close file $filename: $OS_ERROR\n";
+     
+     if ( !$kernel_line ) {
+         if ( $option_quiet ) {
+             exit 1;
+         } else {
+             croak "No OpenAFS reference found in latest panic!";
+         }
+     }
+ }
+ 
+ # generate the symbol files that will be read by gdb
+ sub generate_symbol_files {
+     my $kernel_address   = shift;
+     my $symbol_write_dir = shift;
+ 
+     system( "/sbin/kextload",
+             "-s",  $temp_dir,
+             "-a", 'org.openafs.filesystems.afs@' . $kernel_address,
+             "-n", "/Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.kext/" );
+     if ( $CHILD_ERROR ) {
+         # error
+         croak "kextload failed to run: $OS_ERROR\n";
+     }
+ }
+ 
+ 
+ sub write_gdb_input_file {
+ 
+     my $write_dir     = shift;
+     my $filename      = shift;
+     my $backtrace_ref = shift;
+     
+     my @symbol_files = ( $write_dir . "/org.openafs.filesystems.afs.sym" );
+         
+     my $fh = IO::File->new( $write_dir . "/" . $filename, '>' )
+         or croak "Can't open gdb file $filename for writing: $OS_ERROR\n";
+ 
+     for my $symbol ( @symbol_files ) {
+         print $fh "add-symbol-file $symbol\n";
+     }
+ 
+     print $fh "set print asm-demangle on\n";
+ 
+     for my $address ( @{ $backtrace_ref } ) {
+         print $fh "x/i $address\n";
+     }
+ 
+    $fh->close()
+         or croak "Can't close file $filename: $OS_ERROR\n";
+ }
+ 
+ # write out the pertinent details to a file.
+ sub write_dump_file {
+     my $filename = shift;
+     my $hash_ref = shift;
+     my $output   = shift;
+ 
+     my $log_dir  = dirname $filename;
+ 
+     if ( ! -d $log_dir ) {
+         mkdir $log_dir, 0755;
+         croak "Can't create directory $log_dir: $OS_ERROR\n" if $CHILD_ERROR;
+     }
+ 
+     croak "Can't write to folder $log_dir." if ( ! -w $log_dir );
+ 
+     my $fh = IO::File->new( $filename, '>', 0664 )
+         or croak "Can't open dump file $filename for writing: $OS_ERROR\n";
+     
+     print $fh "Panic Date:      ", $hash_ref->{ "date" }, "\n";
+     print $fh "Kernel Version:  ", $hash_ref->{ "kernel_version" }, "\n";
+     print $fh "OpenAFS Version: ", $hash_ref->{ "afs_info" }, "\n";
+     print $fh "=============\n";
+     print $fh $output;
+     
+     $fh->close()
+         or croak "Can't close file $filename: $OS_ERROR\n";
+ }
+ 
+ __END__
+ 
+ =head1 NAME
+ 
+ decode-panic - decode a Mac OS panic log to show source line numbers
+ 
+ =head1 VERSION
+ 
+ This documentation refers to decode-panic version $Revision: 1.1.2.2 $
+ 
+ =head1 SYNOPSIS
+  
+    decode-panic [-i <input panic log>] [-o <output dump file>] [-q]
+ 
+ =head1 OPTIONS
+ 
+    -i The path to the panic log that should be read
+    -o The path to where the decoded panic log should be written
+    -q Quiet mode - don't complain if there is a problem.
+    -h print full help
+ 
+ =head1 DESCRIPTION
+ 
+ It parses the panic log for Mac OS X kernel panics that are caused by
+ openafs in order to produce a human-readable backtrace.
+ 
+ This program uses crash isolation procedure as outlined in
+ http://developer.apple.com/technotes/tn2002/tn2063.html#IsolatingCrash
+ 
+ Here is an example file that is fed to gdb:
+ 
+    add-symbol-file /tmp/afsdebugt8dGOb/org.openafs.filesystems.afs.sym
+    set print asm-demangle on
+    x/i 0x2ED1F7C0
+    x/i 0x2ED0D1A4
+ 
+ =head1 DEPENDENCIES
+ 
+ This program needs gdb and kextload.
+ 
+ =head1 BUGS AND LIMITATIONS
+ 
+ It clobbers the output file.
+ 
+ =head1 AUTHOR
+ 
+ Copyright 2008. Jason Edgecombe <jason@rampaginggeek.com>
+ 
+ This documentation is covered by the BSD License as written in the
+ doc/LICENSE file in the OpenAFS source tree. This program was written by
+ Jason Edgecombe for OpenAFS.
Index: openafs/src/packaging/RedHat/kmodtool
diff -c openafs/src/packaging/RedHat/kmodtool:1.1.2.2 openafs/src/packaging/RedHat/kmodtool:1.1.2.3
*** openafs/src/packaging/RedHat/kmodtool:1.1.2.2	Thu Oct 11 10:13:23 2007
--- openafs/src/packaging/RedHat/kmodtool	Wed Jan 23 00:30:30 2008
***************
*** 4,9 ****
--- 4,11 ----
  # Copyright (c) 2003-2007 Ville SkyttÃ¤ <ville.skytta@iki.fi>,
  #                         Thorsten Leemhuis <fedora@leemhuis.info>
  #
+ # Modified by Simon Wilkinson for OpenAFS
+ 
  # 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
***************
*** 74,83 ****
--- 76,87 ----
  Group:            System Environment/Kernel
  Provides:         kernel-modules = ${verrel}${variant}
  Provides:         ${kmod_name}-kmod = %{?epoch:%{epoch}:}%{version}-%{release}
+ Provides:         openafs-kernel = %{PACKAGE_VERSION}
  Requires:         ${kdep}
  Requires:         ${kmod_name}-kmod-common >= %{?epoch:%{epoch}:}%{version}
  Requires(post):   /sbin/depmod
  Requires(postun): /sbin/depmod
+ Release:          %{pkgrel}.%(echo ${verrel} | tr - _)
  BuildRequires:    kernel${dashvariant}-devel-%{_target_cpu} = ${verrel}
  %description   -n kmod-${kmod_name}${dashvariant}
  This package provides the ${kmod_name} kernel modules built for the Linux
Index: openafs/src/packaging/RedHat/makesrpm.pl
diff -c /dev/null openafs/src/packaging/RedHat/makesrpm.pl:1.1.2.3
*** /dev/null	Mon Feb 11 10:58:23 2008
--- openafs/src/packaging/RedHat/makesrpm.pl	Tue Jan 15 18:43:40 2008
***************
*** 0 ****
--- 1,136 ----
+ #!/usr/bin/perl
+ 
+ use strict;
+ use warnings;
+ 
+ use IO::Dir;
+ use IO::File;
+ use File::Path;
+ use File::Copy;
+ use File::Temp;
+ 
+ # Build an SRPM for OpenAFS, given a src and doc tarball, release notes,
+ # and ChangeLog.
+ 
+ my $srcball = shift;
+ my $docball = shift;
+ my $relnotes = shift;
+ my $changelog = shift;
+ my $cellservdb = shift;
+ 
+ if (!$srcball && !$docball) {
+   printf "Usage:  <version> <src.tar.gz> <doc.tar.gz> [<relnotes> [<changelog> [<cellservdb>]]]\n";
+   exit(1);
+ }
+ 
+ if (! -f $srcball) {
+   die "Unable to open $srcball\n";
+ }
+ 
+ my $tmpdir = File::Temp::tempdir(CLEANUP => 1);
+ 
+ system("tar -C $tmpdir -xvjf $srcball \*/configure.in ".
+        "\*/src/packaging/RedHat > /dev/null")==0
+   or die "Unable to unpack src tar ball\n";
+ 
+ my $dirh = IO::Dir->new($tmpdir);
+ my $vdir;
+ while (defined($vdir = $dirh->read) && $vdir=~/^\./) {};
+ 
+ die "Unable to find unpacked source code\n" if !$vdir;
+ 
+ my $srcdir = $tmpdir."/".$vdir;
+ 
+ # Work out which version we're dealing with from the configure.in file
+ my $version;
+ my $fh = new IO::File $srcdir."/configure.in"
+   or die "Unable to find unpacked configure.in file";
+ while(<$fh>) {
+   if (/AM_INIT_AUTOMAKE\(openafs,(.*)\)/) {
+     $version = $1;
+     last;
+   }
+ }
+ undef $fh;
+ 
+ # Build the RPM root
+ 
+ print "Building version $version\n";
+ File::Path::mkpath([ $tmpdir."/rpmdir/SPECS",
+ 		     $tmpdir."/rpmdir/SRPMS",
+ 		     $tmpdir."/rpmdir/SOURCES"], 0, 0755);
+ 
+ File::Copy::copy($srcball, 
+ 		 $tmpdir."/rpmdir/SOURCES/openafs-$version-src.tar.bz2")
+   or die "Unable to copy $srcball into position\n";
+ 
+ File::Copy::copy($docball,
+ 		 $tmpdir."/rpmdir/SOURCES/openafs-$version-doc.tar.bz2")
+   or die "Unable to copy $docball into position\n";
+ 
+ # Populate it with all the stuff in the packaging directory, except the 
+ # specfile
+ my $pkgdirh = IO::Dir->new($srcdir."/src/packaging/RedHat")
+   or die "Unable to find RedHat packaging directory\n";
+ my $file;
+ while (defined($file = $pkgdirh->read)) {
+   if (-f $srcdir."/src/packaging/RedHat/".$file) {
+      next if $file eq "openafs.spec.in";
+ 
+      print "Copying $file into place\n";
+      File::Copy::copy($srcdir."/src/packaging/RedHat/".$file, 
+ 		      $tmpdir."/rpmdir/SOURCES/".$file);
+   }
+ }
+ undef $dirh;
+ 
+ # Some files need particular modes.
+ chmod 0755, $tmpdir."/rpmdir/SOURCES/openafs-kernel-version.sh";
+ chmod 0755, $tmpdir."/rpmdir/SOURCES/openafs-kvers-is.sh";
+ 
+ # Create the specfile. Use sed for this, cos its easier
+ system("cat ".$srcdir."/src/packaging/RedHat/openafs.spec.in | ".
+        "sed -e 's/\@VERSION\@/$version/g' ".
+        "    -e 's/\%define afsvers.*/%define afsvers $version/g' ".
+        "    -e 's/\%define pkgvers.*/%define pkgvers $version/g' > ".
+        $tmpdir."/rpmdir/SPECS/openafs.spec") == 0
+   or die "sed failed : $!\n";
+ 
+ if ($cellservdb) {
+     File::Copy::copy($cellservdb,
+ 		     $tmpdir."/rpmdir/SOURCES/$cellservdb")
+ 	or die "Unable to copy $cellservdb into position\n";
+ } else {
+     system("cd ".$tmpdir."/rpmdir/SOURCES && wget `cat ".$srcdir."/src/packaging/RedHat/openafs.spec.in |grep dl/cellservdb |awk '{print \$2}'`")
+ }
+ 
+ if ($relnotes) {
+   File::Copy::copy($relnotes,
+ 		   $tmpdir."/rpmdir/SOURCES/RELNOTES-$version")
+   or die "Unable to copy $relnotes into position\n";
+ } else {
+   print "WARNING: No release notes provided. Using empty file\n";
+   system("touch $tmpdir/rpmdir/SOURCES/RELNOTES-$version");
+ }
+ 
+ if ($changelog) {
+   File::Copy::copy($changelog,
+ 		   $tmpdir."/rpmdir/SOURCES/ChangeLog")
+   or die "Unable to copy $changelog into position\n";
+ } else {
+   print "WARNING: No changelog provided. Using empty file\n";
+   system("touch $tmpdir/rpmdir/SOURCES/ChangeLog");
+ }
+ 
+ # Build an RPM
+ system("rpmbuild -bs --define \"_topdir $tmpdir/rpmdir\" ".
+        "$tmpdir/rpmdir/SPECS/openafs.spec > /dev/null") == 0
+   or die "rpmbuild failed : $!\n";
+ 
+ # Copy it out to somewhere useful
+ File::Copy::copy("$tmpdir/rpmdir/SRPMS/openafs-$version-1.1.src.rpm",
+ 	         "openafs-$version-1.1.src.rpm")
+   or die "Unable to copy output RPM : $!\n";
+ 
+ print "SRPM is openafs-$version-1.1.src.rpm\n";
+ 
Index: openafs/src/packaging/RedHat/openafs-buildall.sh
diff -c openafs/src/packaging/RedHat/openafs-buildall.sh:1.2.2.4 openafs/src/packaging/RedHat/openafs-buildall.sh:1.2.2.5
*** openafs/src/packaging/RedHat/openafs-buildall.sh:1.2.2.4	Thu Oct 18 00:04:10 2007
--- openafs/src/packaging/RedHat/openafs-buildall.sh	Thu Jan 24 18:56:47 2008
***************
*** 4,10 ****
  #
  # Written by:  Derek Atkins <warlord@MIT.EDU>
  #
! # $Revision: 1.2.2.4 $
  #
  
  # Define where the Specfile is located.
--- 4,10 ----
  #
  # Written by:  Derek Atkins <warlord@MIT.EDU>
  #
! # $Revision: 1.2.2.5 $
  #
  
  # Define where the Specfile is located.
***************
*** 35,41 ****
  elif [ `echo $rhrel | grep -c 'Red Hat Linux'` = 1 ] ; then
    ostype='rh'
    osrel=`echo $rhrel | sed -e 's/^.*release \([^ ]*\).*$/\1/' -e 's/\.//g'`
! elif [ `echo $rhrel | grep -c 'SUSE LINUX'` = 1 ] ; then
    ostype='suse'
    specdir=/usr/src/packages/SPECS 
    osrel=`grep VERSION /etc/SuSE-release|awk '{print $3}'`
--- 35,41 ----
  elif [ `echo $rhrel | grep -c 'Red Hat Linux'` = 1 ] ; then
    ostype='rh'
    osrel=`echo $rhrel | sed -e 's/^.*release \([^ ]*\).*$/\1/' -e 's/\.//g'`
! elif [ `echo $rhrel | grep -c 'SUSE'` = 1 ] ; then
    ostype='suse'
    specdir=/usr/src/packages/SPECS 
    osrel=`grep VERSION /etc/SuSE-release|awk '{print $3}'`
Index: openafs/src/packaging/RedHat/openafs-client.init
diff -c openafs/src/packaging/RedHat/openafs-client.init:1.2.2.5 openafs/src/packaging/RedHat/openafs-client.init:1.2.2.6
*** openafs/src/packaging/RedHat/openafs-client.init:1.2.2.5	Mon Nov 12 19:03:11 2007
--- openafs/src/packaging/RedHat/openafs-client.init	Thu Jan 24 18:56:47 2008
***************
*** 4,11 ****
  #
  # chkconfig: 2345 50 50
  # description: OpenAFS is a distributed filesystem.
  #
! # $Revision: 1.2.2.5 $
  
  [ -f /etc/init.d/functions ] && . /etc/init.d/functions
  [ -f /etc/sysconfig/openafs ] && . /etc/sysconfig/openafs
--- 4,12 ----
  #
  # chkconfig: 2345 50 50
  # description: OpenAFS is a distributed filesystem.
+ # Should-Start: dkms
  #
! # $Revision: 1.2.2.6 $
  
  [ -f /etc/init.d/functions ] && . /etc/init.d/functions
  [ -f /etc/sysconfig/openafs ] && . /etc/sysconfig/openafs
Index: openafs/src/packaging/RedHat/openafs.spec.in
diff -c openafs/src/packaging/RedHat/openafs.spec.in:1.2.2.14 openafs/src/packaging/RedHat/openafs.spec.in:1.2.2.18
*** openafs/src/packaging/RedHat/openafs.spec.in:1.2.2.14	Thu Dec 13 15:06:26 2007
--- openafs/src/packaging/RedHat/openafs.spec.in	Thu Jan 24 18:56:47 2008
***************
*** 1,4 ****
! # Openafs Spec $Revision: 1.2.2.14 $
  
  %define afsvers @VERSION@
  %define pkgvers @VERSION@
--- 1,4 ----
! # Openafs Spec $Revision: 1.2.2.18 $
  
  %define afsvers @VERSION@
  %define pkgvers @VERSION@
***************
*** 11,17 ****
  %define osvers 1
  %endif
  
! %{!?fedorakmod: %define fedorakmod 0}
  
  # Determine presence of rpmbuild command line --define arguments used for
  # option specification
--- 11,18 ----
  %define osvers 1
  %endif
  
! %{!?fedorakmod: %define fedorakmod 1}
! %{!?build_dkmspkg: %define build_dkmspkg 1}
  
  # Determine presence of rpmbuild command line --define arguments used for
  # option specification
***************
*** 34,50 ****
  %define kverrel %(%{kmodtool} verrel %{?kernvers} 2>/dev/null)
  
  %define upvar ""
! %ifarch i686
! %define paevar PAE
! %endif
! %ifarch ppc
! %define smpvar smp
! %endif
! %ifarch i686 x86_64
! %define xenvar xen
! %define kdumpvar kdump
! %endif
! %{!?kvariants: %define kvariants %{?upvar} %{?smpvar} %{?paevar} %{?xenvar} %{?kdumpvar}}
  
  %{!?ksrcdir: %define ksrcdir %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}}
  
--- 35,41 ----
  %define kverrel %(%{kmodtool} verrel %{?kernvers} 2>/dev/null)
  
  %define upvar ""
! %{!?kvariants: %define kvariants %{?upvar}}
  
  %{!?ksrcdir: %define ksrcdir %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}}
  
***************
*** 80,85 ****
--- 71,78 ----
  # End legacy kernel build stuff
  %endif 
  
+ %define dkms_version %{osvers}.%{pkgrel}
+ 
  # Set 'debugspec' to 1 if you want to debug the spec file.  This will
  # not remove the installed tree as part of the %clean operation
  %if %{?debugspec:0}%{!?debugspec:1}
***************
*** 90,95 ****
--- 83,94 ----
  # to distribute aklog and asetkey
  %define krb5support %{?_without_krb5:0}%{!?_without_krb5:1}
  
+ %if %{krb5support}
+ %if %{?krb5config:0}%{!?krb5config:1}
+ %define krb5config /usr/kerberos/bin/krb5-config
+ %endif
+ %endif
+ 
  # Set 'bootkernelsupport' to 1 if you want to build the
  # kernel module for Red Hat BOOT Kernels on x86.
  %define bootkernelsupport %{?_with_bootkernel:1}%{!?_with_bootkernel:0}
***************
*** 227,239 ****
  License: IBM Public License
  URL: http://www.openafs.org
  BuildRoot: %{_tmppath}/%{name}-%{version}-root
! Packager: Derek Atkins <warlord@MIT.EDU>
  Group: Networking/Filesystems
  BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel, flex, bison
  %if %{krb5support}
  BuildRequires: krb5-devel
  %endif
! ExclusiveArch: %{ix86} x86_64 ia64
  
  #    http://dl.openafs.org/dl/openafs/candidate/%{afsvers}/...
  Source0: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-src.tar.bz2
--- 226,238 ----
  License: IBM Public License
  URL: http://www.openafs.org
  BuildRoot: %{_tmppath}/%{name}-%{version}-root
! Packager: OpenAFS Gatekeepers <openafs-gatekeepers@openafs.org>
  Group: Networking/Filesystems
  BuildRequires: %{?kdepend:%{kdepend}, } pam-devel, ncurses-devel, flex, bison
  %if %{krb5support}
  BuildRequires: krb5-devel
  %endif
! ExclusiveArch: %{ix86} x86_64 ia64 s390 s390x sparc64 ppc ppc64
  
  #    http://dl.openafs.org/dl/openafs/candidate/%{afsvers}/...
  Source0: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-src.tar.bz2
***************
*** 295,301 ****
                                    will be installed.  You probably don't
                                    need to change this ever.
  
!  --define "fedorakmod 1"	  Build 'Fedora' style kernel modules
  
  To a kernel module for your running kernel, just run:
    rpmbuild --rebuild --target=`uname -m` openafs-%{pkgvers}-%{osvers}.%{pkgrel}.src.rpm
--- 294,309 ----
                                    will be installed.  You probably don't
                                    need to change this ever.
  
!  --define "fedorakmod 0"	  Disable the building of 'Fedora' style kernel 
! 				  modules, and use the old format.
! 
!  --define "kvariants <variants>"  When building Fedora style kernel modules,
!                                   this defines the set of kernel variants
!                                   to build.
!                                   <variants> is a space seperated list which
!                                   may contain one or more of
!                                   '' (for the generic kernel), smp, PAE, xen
!                                   or kdump 
  
  To a kernel module for your running kernel, just run:
    rpmbuild --rebuild --target=`uname -m` openafs-%{pkgvers}-%{osvers}.%{pkgrel}.src.rpm
***************
*** 343,348 ****
--- 351,379 ----
  This package provides basic server support to host files in an AFS
  Cell.
  
+ %if %{build_dkmspkg}
+ %package -n dkms-%{name}
+ Summary:        DKMS-ready kernel source for AFS distributed filesystem
+ Group:          Development/Kernel
+ Provides:       openafs-kernel = %{PACKAGE_VERSION}
+ %if %{fedorakmod}
+ Provides: %{name}-kmod = %{PACKAGE_VERSION}
+ %endif
+ Requires(pre):  dkms
+ Requires(pre):  flex
+ Requires(post): dkms
+ Requires:	%{name}-kmod-common = %{version}
+ 
+ %description -n dkms-%{name}
+ The AFS distributed filesystem.  AFS is a distributed filesystem
+ allowing cross-platform sharing of files among multiple computers.
+ Facilities are provided for access control, authentication, backup and
+ administrative management.
+ 
+ This package provides the source code to allow DKMS to build an
+ AFS kernel module.
+ %endif
+ 
  %if %{build_authlibs}
  %package authlibs
  Summary: OpenAFS authentication shared libraries
***************
*** 810,816 ****
         --with-linux-kernel-headers=${ksrc} \
  %endif
  %if %{krb5support}
! 	--with-krb5-conf=/usr/kerberos/bin/krb5-config \
  %endif
         $config_opts \
         || exit 1
--- 841,847 ----
         --with-linux-kernel-headers=${ksrc} \
  %endif
  %if %{krb5support}
! 	--with-krb5-conf=%{krb5config} \
  %endif
         $config_opts \
         || exit 1
***************
*** 973,978 ****
--- 1004,1031 ----
  install -p -m 644 src/packaging/RedHat/openafs-cacheinfo $uve/cacheinfo
  
  #
+ # install dkms source
+ #
+ install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/src
+ cp -a libafs_tree $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}
+ 
+ cat > $RPM_BUILD_ROOT%{_prefix}/src/%{name}-%{dkms_version}/dkms.conf <<EOF
+ 
+ PACKAGE_VERSION="%{dkms_version}"
+ 
+ # Items below here should not have to change with each driver version
+ PACKAGE_NAME="%{name}"
+ MAKE[0]="SMP=SP; eval \\\`grep CONFIG_SMP /boot/config-\${kernelver_array[0]}\\\`; [ -n \"\\\$CONFIG_SMP\" ] && SMP=MP; ./configure --with-linux-kernel-headers=\${kernel_source_dir}; make MPS=\\\$SMP; mv src/libafs/MODLOAD-*/openafs.ko ."
+ CLEAN="make -C src/libafs clean"
+ 
+ BUILT_MODULE_NAME[0]="\$PACKAGE_NAME"
+ DEST_MODULE_LOCATION[0]="/kernel/3rdparty/\$PACKAGE_NAME/"
+ 
+ AUTOINSTALL=yes
+ 
+ EOF
+ 
+ #
  # install kernel-source
  #
  
***************
*** 1012,1018 ****
  
  # remove unused man pages
  for x in afs_ftpd afs_inetd afs_login afs_rcp afs_rlogind afs_rsh \
!     dkload knfs package runntp; do
  	rm -f $RPM_BUILD_ROOT%{_mandir}/man1/${x}.1
  done
  
--- 1065,1072 ----
  
  # remove unused man pages
  for x in afs_ftpd afs_inetd afs_login afs_rcp afs_rlogind afs_rsh \
!     dkload knfs package runntp symlink symlink_list symlink_make \
!     symlink_remove; do
  	rm -f $RPM_BUILD_ROOT%{_mandir}/man1/${x}.1
  done
  
***************
*** 1032,1038 ****
  	>openafs-man5files
  
  /bin/ls $RPM_BUILD_ROOT%{_mandir}/man8 \
! 	|egrep '^backup|^bos|^butc|^fms|^fstrace|^kas|^uss' \
  	>openafs-man8files
  
  #
--- 1086,1092 ----
  	>openafs-man5files
  
  /bin/ls $RPM_BUILD_ROOT%{_mandir}/man8 \
! 	|egrep '^backup|^bos|^butc|^fms|^fstrace|^kas|^read_tape|^uss' \
  	>openafs-man8files
  
  #
***************
*** 1149,1155 ****
  
    dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
    mkdir -p ${dstdir}
!   install -m 644 ${srcdir}/libafs-%{kverrel}${kvariant}.ko $dstdir/openafs.ko
  done
  %else
  # Install the kernel modules
--- 1203,1209 ----
  
    dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
    mkdir -p ${dstdir}
!   install -m 755 ${srcdir}/libafs-%{kverrel}${kvariant}.ko $dstdir/openafs.ko
  done
  %else
  # Install the kernel modules
***************
*** 1169,1175 ****
  
      mkdir -p ${dstdir}
  
!     install -m 644 ${srcdir}/${modname} ${dstdir}/openafs${kmodend}
  done
  %endif
  %endif
--- 1223,1229 ----
  
      mkdir -p ${dstdir}
  
!     install -m 755 ${srcdir}/${modname} ${dstdir}/openafs${kmodend}
  done
  %endif
  %endif
***************
*** 1256,1261 ****
--- 1310,1324 ----
          chkconfig --del openafs-server
  fi
  
+ %if %{build_dkmspkg}
+ %post -n dkms-%{name}
+ dkms add -m %{name} -v %{dkms_version} --rpm_safe_upgrade
+ dkms build -m %{name} -v %{dkms_version} --rpm_safe_upgrade
+ dkms install -m %{name} -v %{dkms_version} --rpm_safe_upgrade
+ 
+ %preun -n dkms-%{name}
+ dkms remove -m %{namee} -v %{dkms_version} --rpm_safe_upgrade --all ||:
+ %endif
  %endif
  
  %if %{build_modules}
***************
*** 1303,1309 ****
  %endif
  %endif
  
- 
  ##############################################################################
  ###
  ### file lists
--- 1366,1371 ----
***************
*** 1453,1458 ****
--- 1515,1526 ----
  %{_libdir}/libubik.a
  %{_mandir}/man1/rxgen.*
  
+ %if %{build_dkmspkg}
+ %files -n dkms-%{name}
+ %defattr(-,root,root)
+ %{_prefix}/src/%{name}-%{dkms_version}
+ %endif
+ 
  %files kernel-source
  %defattr(-,root,root)
  %{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
Index: openafs/src/ptserver/NTMakefile
diff -c openafs/src/ptserver/NTMakefile:1.14.4.2 openafs/src/ptserver/NTMakefile:1.14.4.3
*** openafs/src/ptserver/NTMakefile:1.14.4.2	Sat Aug 11 19:41:37 2007
--- openafs/src/ptserver/NTMakefile	Sat Feb  2 08:43:25 2008
***************
*** 76,82 ****
  !ENDIF
  
  $(PTSERVER): $(PTSERVER_EXEOBJS) $(RXKADOBJS) $(PTSERVER_EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
--- 76,82 ----
  !ENDIF
  
  $(PTSERVER): $(PTSERVER_EXEOBJS) $(RXKADOBJS) $(PTSERVER_EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
***************
*** 114,125 ****
  	$(DESTDIR)\lib\cm_dns.obj
  
  $(PTS): $(PTS_EXEOBJS) $(PTS_EXELIBS) 
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
  $(PTCLIENT): $(PTCLIENT_EXEOBJS) $(PTS_EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
--- 114,125 ----
  	$(DESTDIR)\lib\cm_dns.obj
  
  $(PTS): $(PTS_EXEOBJS) $(PTS_EXELIBS) 
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
  $(PTCLIENT): $(PTCLIENT_EXEOBJS) $(PTS_EXELIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
***************
*** 211,229 ****
  TEST_LIBS = $(PTS_EXELIBS)
  
  $(OUT)\readgroup.exe: $(OUT)\readgroup.obj $(LIBFILE) $(TEST_LIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  
  $(OUT)\readpwd.exe: $(OUT)\readpwd.obj $(LIBFILE) $(TEST_LIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  
  $(OUT)\testpt.exe: $(OUT)\testpt.obj $(LIBFILE) $(TEST_LIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib 
          $(_VC_MANIFEST_EMBED_EXE)
  
  $(OUT)\db_verify.exe: $(OUT)\db_verify.obj $(OUT)\pterror.obj $(OUT)\display.obj $(LIBFILE) $(TEST_LIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  
  mkdir:
--- 211,229 ----
  TEST_LIBS = $(PTS_EXELIBS)
  
  $(OUT)\readgroup.exe: $(OUT)\readgroup.obj $(LIBFILE) $(TEST_LIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  
  $(OUT)\readpwd.exe: $(OUT)\readpwd.obj $(LIBFILE) $(TEST_LIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  
  $(OUT)\testpt.exe: $(OUT)\testpt.obj $(LIBFILE) $(TEST_LIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib 
          $(_VC_MANIFEST_EMBED_EXE)
  
  $(OUT)\db_verify.exe: $(OUT)\db_verify.obj $(OUT)\pterror.obj $(OUT)\display.obj $(LIBFILE) $(TEST_LIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  
  mkdir:
Index: openafs/src/ptserver/map.c
diff -c openafs/src/ptserver/map.c:1.3.14.2 openafs/src/ptserver/map.c:1.3.14.3
*** openafs/src/ptserver/map.c:1.3.14.2	Sat Aug 11 19:41:37 2007
--- openafs/src/ptserver/map.c	Tue Jan 15 01:09:14 2008
***************
*** 32,43 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/map.c,v 1.3.14.2 2007/08/11 23:41:37 jaltman Exp $");
  
  #ifdef SUPERGROUPS
  #include <errno.h>
  #include "map.h"
  #include "malloc.h"
  
  #undef PRINT_MAP_ERROR
  /* #define MAP_DEBUG /**/
--- 32,47 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/map.c,v 1.3.14.3 2008/01/15 06:09:14 shadow Exp $");
  
  #ifdef SUPERGROUPS
  #include <errno.h>
  #include "map.h"
+ #ifdef STDLIB_HAS_MALLOC_PROTOS
+ #include <stdlib.h>
+ #else
  #include "malloc.h"
+ #endif
  
  #undef PRINT_MAP_ERROR
  /* #define MAP_DEBUG /**/
Index: openafs/src/ptserver/pts.c
diff -c openafs/src/ptserver/pts.c:1.15.2.3 openafs/src/ptserver/pts.c:1.15.2.4
*** openafs/src/ptserver/pts.c:1.15.2.3	Wed Oct 31 00:09:32 2007
--- openafs/src/ptserver/pts.c	Mon Feb  4 12:53:43 2008
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/pts.c,v 1.15.2.3 2007/10/31 04:09:32 shadow Exp $");
  
  #include <stdio.h>
  #include <string.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/pts.c,v 1.15.2.4 2008/02/04 17:53:43 shadow Exp $");
  
  #include <stdio.h>
  #include <string.h>
***************
*** 50,55 ****
--- 50,61 ----
      FILE *s_file;
  } *shead;
  
+ struct authstate {
+     int sec;
+     const char *confdir;
+     char cell[MAXCELLCHARS];
+ };
+ 
  int
  pts_Interactive(struct cmd_syndesc *as, void *arock)
  {
***************
*** 132,163 ****
  int
  GetGlobals(struct cmd_syndesc *as, void *arock)
  {
!     register afs_int32 code;
!     char *cell;
!     afs_int32 sec = 1;
  
      whoami = as->a0name;
  
      if (!strcmp(as->name, "help"))
  	return 0;
!     if (as->parms[16].items)
  	cell = as->parms[16].items->data;
!     else
! 	cell = 0;
!     if (as->parms[17].items)
  	sec = 0;
! 
!     if (as->parms[18].items) {	/* testing? */
! 	code = pr_Initialize(sec, AFSDIR_SERVER_ETC_DIRPATH, cell);
      } else {
! 	code = pr_Initialize(sec, AFSDIR_CLIENT_ETC_DIRPATH, cell);
      }
      if (code) {
  	afs_com_err(whoami, code, "while initializing");
  	return code;
      }
      if (as->parms[19].items)
  	force = 1;
      return code;
  }
  
--- 138,208 ----
  int
  GetGlobals(struct cmd_syndesc *as, void *arock)
  {
!     struct authstate *state = (struct authstate *) arock;
!     afs_int32 code;
!     char *cell = NULL;
!     afs_int32 sec;
!     int changed = 0;
!     const char* confdir;
  
      whoami = as->a0name;
  
      if (!strcmp(as->name, "help"))
  	return 0;
! 
!     if (*state->cell) {
! 	cell = state->cell;
!     }
!     sec = state->sec;
! 
!     if (state->confdir == NULL) {
! 	changed = 1;
!     }
! 
!     if (as->parms[16].items) {
! 	changed = 1;
  	cell = as->parms[16].items->data;
!     }
!     if (as->parms[17].items) { /* -noauth */
! 	changed = 1;
  	sec = 0;
!     }
!     if (as->parms[20].items) { /* -localauth */
! 	changed = 1;
! 	sec = 2;
!     }
!     if (as->parms[21].items) { /* -auth */
! 	changed = 1;
! 	sec = 1;
!     }
!     if (as->parms[18].items || as->parms[20].items) { /* -test, -localauth */
! 	changed = 1;
! 	confdir = AFSDIR_SERVER_ETC_DIRPATH;
!     } else {
! 	if (sec == 2)
! 	    confdir = AFSDIR_SERVER_ETC_DIRPATH;
! 	else
! 	    confdir = AFSDIR_CLIENT_ETC_DIRPATH;
!     }
!     if (changed) {
! 	CleanUp(as, arock);
! 	code = pr_Initialize(sec, confdir, cell);
      } else {
! 	code = 0;
      }
      if (code) {
  	afs_com_err(whoami, code, "while initializing");
  	return code;
      }
+     state->sec = sec;
+     state->confdir = confdir;
+     if (cell && cell != state->cell)
+         strncpy(state->cell, cell, MAXCELLCHARS-1);
+ 
+     force = 0;
      if (as->parms[19].items)
  	force = 1;
+ 
      return code;
  }
  
***************
*** 704,710 ****
  	    pr_ListEntries(flag, startindex, &nentries, &entriesp,
  			   &nextstartindex);
  	if (code) {
! 	    afs_com_err(whoami, code, "; unable to list entries\n");
  	    if (entriesp)
  		free(entriesp);
  	    break;
--- 749,755 ----
  	    pr_ListEntries(flag, startindex, &nentries, &entriesp,
  			   &nextstartindex);
  	if (code) {
! 	    afs_com_err(whoami, code, "; unable to list entries");
  	    if (entriesp)
  		free(entriesp);
  	    break;
***************
*** 972,977 ****
--- 1017,1026 ----
      cmd_AddParm(ts, "-test", CMD_FLAG, CMD_OPTIONAL | CMD_HIDE, test_help);
      cmd_AddParm(ts, "-force", CMD_FLAG, CMD_OPTIONAL,
  		"Continue oper despite reasonable errors");
+     cmd_AddParm(ts, "-localauth", CMD_FLAG, CMD_OPTIONAL,
+ 		"use local authentication");
+     cmd_AddParm(ts, "-auth", CMD_FLAG, CMD_OPTIONAL,
+ 		"use user's authentication (default)");
  }
  
  /*
***************
*** 996,1001 ****
--- 1045,1051 ----
      int parsec;
      char *parsev[CMD_MAXPARMS];
      char *savec;
+     struct authstate state;
  
  #ifdef WIN32
      WSADATA WSAjunk;
***************
*** 1020,1025 ****
--- 1070,1078 ----
      sigaction(SIGSEGV, &nsa, NULL);
  #endif
  
+     memset(&state, 0, sizeof(state));
+     state.sec = 1; /* default is auth */
+ 
      ts = cmd_CreateSyntax("creategroup", CreateGroup, NULL,
  			  "create a new group");
      cmd_AddParm(ts, "-name", CMD_LIST, 0, "group name");
***************
*** 1121,1127 ****
      cmd_AddParm(ts, "-delay", CMD_SINGLE, 0, "seconds");
      add_std_args(ts);
  
!     cmd_SetBeforeProc(GetGlobals, 0);
  
      finished = 1;
      source = stdin;
--- 1174,1180 ----
      cmd_AddParm(ts, "-delay", CMD_SINGLE, 0, "seconds");
      add_std_args(ts);
  
!     cmd_SetBeforeProc(GetGlobals, &state);
  
      finished = 1;
      source = stdin;
Index: openafs/src/ptserver/ptserver.c
diff -c openafs/src/ptserver/ptserver.c:1.25.2.5 openafs/src/ptserver/ptserver.c:1.25.2.7
*** openafs/src/ptserver/ptserver.c:1.25.2.5	Tue Oct 30 11:16:43 2007
--- openafs/src/ptserver/ptserver.c	Sun Feb  3 22:51:41 2008
***************
*** 112,118 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptserver.c,v 1.25.2.5 2007/10/30 15:16:43 shadow Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
--- 112,118 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptserver.c,v 1.25.2.7 2008/02/04 03:51:41 jaltman Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
***************
*** 163,168 ****
--- 163,169 ----
  int restricted = 0;
  int rxMaxMTU = -1;
  int rxBind = 0;
+ int rxkadDisableDotCheck = 0;
  
  #define ADDRSPERSITE 16         /* Same global is in rx/rx_user.c */
  afs_uint32 SHostAddrs[ADDRSPERSITE];
***************
*** 308,313 ****
--- 309,317 ----
  	else if (strncmp(arg, "-rxbind", alen) == 0) {
  	    rxBind = 1;
  	}
+ 	else if (strncmp(arg, "-allow-dotted-principals", alen) == 0) {
+ 	    rxkadDisableDotCheck = 1;
+ 	}
  	else if (strncmp(arg, "-enable_peer_stats", alen) == 0) {
  	    rx_enablePeerRPCStats();
  	} else if (strncmp(arg, "-enable_process_stats", alen) == 0) {
***************
*** 361,367 ****
  	    rxMaxMTU = atoi(argv[++a]);
  	    if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
  		 (rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
! 		printf("rxMaxMTU %d% invalid; must be between %d-%d\n",
  			rxMaxMTU, RX_MIN_PACKET_SIZE,
  			RX_MAX_PACKET_DATA_SIZE);
  		PT_EXIT(1);
--- 365,371 ----
  	    rxMaxMTU = atoi(argv[++a]);
  	    if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
  		 (rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
! 		printf("rxMaxMTU %d invalid; must be between %d-%d\n",
  			rxMaxMTU, RX_MIN_PACKET_SIZE,
  			RX_MAX_PACKET_DATA_SIZE);
  		PT_EXIT(1);
***************
*** 378,383 ****
--- 382,388 ----
  		   "[-p <number of processes>] [-rebuild] "
  		   "[-groupdepth <depth>] "
  		   "[-restricted] [-rxmaxmtu <bytes>] [-rxbind] "
+ 		   "[-allow-dotted-principals] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-default_access default_user_access default_group_access] "
  		   "[-help]\n");
***************
*** 385,390 ****
--- 390,396 ----
  	    printf("Usage: ptserver [-database <db path>] "
  		   "[-auditlog <log path>] "
  		   "[-p <number of processes>] [-rebuild] [-rxbind] "
+ 		   "[-allow-dotted-principals] "
  		   "[-default_access default_user_access default_group_access] "
  		   "[-restricted] [-rxmaxmtu <bytes>] [-rxbind] "
  		   "[-groupdepth <depth>] " "[-help]\n");
***************
*** 398,409 ****
--- 404,417 ----
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-default_access default_user_access default_group_access] "
  		   "[-restricted] [-rxmaxmtu <bytes>] [-rxbind] "
+ 		   "[-allow-dotted-principals] "
  		   "[-help]\n");
  #else /* AFS_NT40_ENV */
  	    printf("Usage: ptserver [-database <db path>] "
  		   "[-auditlog <log path>] "
  		   "[-default_access default_user_access default_group_access] "
  		   "[-restricted] [-rxmaxmtu <bytes>] [-rxbind] "
+ 		   "[-allow-dotted-principals] "
  		   "[-p <number of processes>] [-rebuild] " "[-help]\n");
  #endif
  #endif
***************
*** 552,557 ****
--- 560,570 ----
      }
      rx_SetMinProcs(tservice, 2);
      rx_SetMaxProcs(tservice, lwps);
+     if (rxkadDisableDotCheck) {
+         rx_SetSecurityConfiguration(tservice, RXS_CONFIG_FLAGS,
+                                     (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK,
+                                     NULL);
+     }
  
      tservice =
  	rx_NewServiceHost(host, 0, RX_STATS_SERVICE_ID, "rpcstats", sc, 3,
Index: openafs/src/ptserver/ptuser.c
diff -c openafs/src/ptserver/ptuser.c:1.25.2.11 openafs/src/ptserver/ptuser.c:1.25.2.12
*** openafs/src/ptserver/ptuser.c:1.25.2.11	Tue Oct 30 11:16:43 2007
--- openafs/src/ptserver/ptuser.c	Mon Feb  4 12:53:43 2008
***************
*** 15,21 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptuser.c,v 1.25.2.11 2007/10/30 15:16:43 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
--- 15,21 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptuser.c,v 1.25.2.12 2008/02/04 17:53:43 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
***************
*** 91,101 ****
  	if (!tdir) {
  	    if (confDir && strcmp(confDir, ""))
  		fprintf(stderr,
! 			"libprot: Could not open configuration directory: %s.\n",
! 			confDir);
              else
  		fprintf(stderr,
! 			"libprot: No configuration directory specified.\n");
  	    return -1;
  	}
          gottdir = 1;
--- 91,102 ----
  	if (!tdir) {
  	    if (confDir && strcmp(confDir, ""))
  		fprintf(stderr,
! 			"%s: Could not open configuration directory: %s.\n",
! 			whoami, confDir);
              else
  		fprintf(stderr,
! 			"%s: No configuration directory specified.\n",
! 			whoami);
  	    return -1;
  	}
          gottdir = 1;
***************
*** 173,188 ****
      /* Most callers use secLevel==1, however, the fileserver uses secLevel==2
       * to force use of the KeyFile.  secLevel == 0 implies -noauth was
       * specified. */
!     if ((secLevel == 2) && (afsconf_GetLatestKey(tdir, 0, 0) == 0)) {
! 	/* If secLevel is two assume we're on a file server and use
! 	 * ClientAuthSecure if possible. */
! 	code = afsconf_ClientAuthSecure(tdir, &sc[2], &scIndex);
! 	if (code)
! 	    fprintf(stderr,
! 		    "libprot: clientauthsecure returns %d %s"
! 		    " (so trying noauth)\n", code, afs_error_message(code));
! 	if (code)
! 	    scIndex = 0;	/* use noauth */
  	if (scIndex != 2)
  	    /* if there was a problem, an unauthenticated conn is returned */
  	    sc[scIndex] = sc[2];
--- 174,195 ----
      /* Most callers use secLevel==1, however, the fileserver uses secLevel==2
       * to force use of the KeyFile.  secLevel == 0 implies -noauth was
       * specified. */
!     if (secLevel == 2) {
! 	code = afsconf_GetLatestKey(tdir, 0, 0);
! 	if (code) {
! 	    afs_com_err(whoami, code, 
! 			"(getting key from local KeyFile)\n");
! 	    scIndex = 0; /* use noauth */
! 	} else {
! 	    /* If secLevel is two assume we're on a file server and use
! 	     * ClientAuthSecure if possible. */
! 	    code = afsconf_ClientAuthSecure(tdir, &sc[2], &scIndex);
! 	    if (code) {
! 		afs_com_err(whoami, code,
! 			    "(calling client secure)\n");
! 		scIndex = 0;	/* use noauth */
! 	    }
!         }
  	if (scIndex != 2)
  	    /* if there was a problem, an unauthenticated conn is returned */
  	    sc[scIndex] = sc[2];
***************
*** 192,207 ****
  	sname.instance[0] = 0;
  	strcpy(sname.name, "afs");
  	code = ktc_GetToken(&sname, &ttoken, sizeof(ttoken), NULL);
! 	if (code)
  	    scIndex = 0;
! 	else {
  	    if (ttoken.kvno >= 0 && ttoken.kvno <= 256)
  		/* this is a kerberos ticket, set scIndex accordingly */
  		scIndex = 2;
  	    else {
  		fprintf(stderr,
! 			"libprot: funny kvno (%d) in ticket, proceeding\n",
! 			ttoken.kvno);
  		scIndex = 2;
  	    }
  	    sc[2] =
--- 199,215 ----
  	sname.instance[0] = 0;
  	strcpy(sname.name, "afs");
  	code = ktc_GetToken(&sname, &ttoken, sizeof(ttoken), NULL);
! 	if (code) {
! 	    afs_com_err(whoami, code, "(getting token)");
  	    scIndex = 0;
! 	} else {
  	    if (ttoken.kvno >= 0 && ttoken.kvno <= 256)
  		/* this is a kerberos ticket, set scIndex accordingly */
  		scIndex = 2;
  	    else {
  		fprintf(stderr,
! 			"%s: funny kvno (%d) in ticket, proceeding\n",
! 			whoami, ttoken.kvno);
  		scIndex = 2;
  	    }
  	    sc[2] =
***************
*** 216,223 ****
      if ((scIndex == 0) && (sc[0] == 0))
  	sc[0] = rxnull_NewClientSecurityObject();
      if ((scIndex == 0) && (secLevel != 0))
! 	afs_com_err(whoami, code,
! 		"Could not get afs tokens, running unauthenticated.");
  
      memset(serverconns, 0, sizeof(serverconns));	/* terminate list!!! */
      for (i = 0; i < info.numServers; i++)
--- 224,232 ----
      if ((scIndex == 0) && (sc[0] == 0))
  	sc[0] = rxnull_NewClientSecurityObject();
      if ((scIndex == 0) && (secLevel != 0))
! 	fprintf(stderr,
! 		"%s: Could not get afs tokens, running unauthenticated\n",
! 		whoami);
  
      memset(serverconns, 0, sizeof(serverconns));	/* terminate list!!! */
      for (i = 0; i < info.numServers; i++)
Index: openafs/src/ptserver/utils.c
diff -c openafs/src/ptserver/utils.c:1.15.14.1 openafs/src/ptserver/utils.c:1.15.14.2
*** openafs/src/ptserver/utils.c:1.15.14.1	Tue Oct 30 11:16:43 2007
--- openafs/src/ptserver/utils.c	Mon Feb  4 12:53:43 2008
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/utils.c,v 1.15.14.1 2007/10/30 15:16:43 shadow Exp $");
  
  #include <sys/types.h>
  #include <lock.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/utils.c,v 1.15.14.2 2008/02/04 17:53:43 shadow Exp $");
  
  #include <sys/types.h>
  #include <lock.h>
***************
*** 824,829 ****
--- 824,832 ----
  	return 1;
      if (gid == AUTHUSERID && aid != ANONYMOUSID)
  	return 1;
+     /* check -localauth case */
+     if (gid == SYSADMINID && aid == SYSADMINID)
+         return 1;
      if ((gid == 0) || (aid == 0))
  	return 0;
  #if defined(SUPERGROUPS)
Index: openafs/src/rx/rx.c
diff -c openafs/src/rx/rx.c:1.97.2.11 openafs/src/rx/rx.c:1.97.2.13
*** openafs/src/rx/rx.c:1.97.2.11	Tue Oct 30 11:16:44 2007
--- openafs/src/rx/rx.c	Fri Feb  8 16:21:06 2008
***************
*** 17,23 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx.c,v 1.97.2.11 2007/10/30 15:16:44 shadow Exp $");
  
  #ifdef KERNEL
  #include "afs/sysincludes.h"
--- 17,23 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx.c,v 1.97.2.13 2008/02/08 21:21:06 shadow Exp $");
  
  #ifdef KERNEL
  #include "afs/sysincludes.h"
***************
*** 767,775 ****
      conn->peer = rxi_FindPeer(shost, sport, 0, 1);
      conn->serviceId = sservice;
      conn->securityObject = securityObject;
!     /* This doesn't work in all compilers with void (they're buggy), so fake it
!      * with VOID */
!     conn->securityData = (VOID *) 0;
      conn->securityIndex = serviceSecurityIndex;
      rx_SetConnDeadTime(conn, rx_connDeadTime);
      conn->ackRate = RX_FAST_ACK_RATE;
--- 767,773 ----
      conn->peer = rxi_FindPeer(shost, sport, 0, 1);
      conn->serviceId = sservice;
      conn->securityObject = securityObject;
!     conn->securityData = (void *) 0;
      conn->securityIndex = serviceSecurityIndex;
      rx_SetConnDeadTime(conn, rx_connDeadTime);
      conn->ackRate = RX_FAST_ACK_RATE;
***************
*** 1347,1352 ****
--- 1345,1367 ----
      return 0;
  }
  
+ /* Set configuration options for all of a service's security objects */
+ 
+ afs_int32 
+ rx_SetSecurityConfiguration(struct rx_service *service, 
+ 			    rx_securityConfigVariables type,
+ 			    void *value)
+ {
+     int i;
+     for (i = 0; i<service->nSecurityObjects; i++) {
+ 	if (service->securityObjects[i]) {
+ 	    RXS_SetConfiguration(service->securityObjects[i], NULL, type, 
+ 				 value, NULL);
+ 	}
+     }
+     return 0;
+ }
+ 
  struct rx_service *
  rx_NewService(u_short port, u_short serviceId, char *serviceName,
  	      struct rx_securityClass **securityObjects, int nSecurityObjects,
***************
*** 1826,1834 ****
  void
  rx_SetArrivalProc(register struct rx_call *call,
  		  register void (*proc) (register struct rx_call * call,
! 					register VOID * mh,
  					register int index),
! 		  register VOID * handle, register int arg)
  {
      call->arrivalProc = proc;
      call->arrivalProcHandle = handle;
--- 1841,1849 ----
  void
  rx_SetArrivalProc(register struct rx_call *call,
  		  register void (*proc) (register struct rx_call * call,
! 					register void * mh,
  					register int index),
! 		  register void * handle, register int arg)
  {
      call->arrivalProc = proc;
      call->arrivalProcHandle = handle;
Index: openafs/src/rx/rx.h
diff -c openafs/src/rx/rx.h:1.28.4.3 openafs/src/rx/rx.h:1.28.4.5
*** openafs/src/rx/rx.h:1.28.4.3	Mon Nov 26 16:08:43 2007
--- openafs/src/rx/rx.h	Fri Feb  8 16:21:07 2008
***************
*** 23,34 ****
  #define _RX_
  
  #ifndef KDUMP_RX_LOCK
- /* Substitute VOID (char) for void, because some compilers are confused by void
-  * in some situations */
- #ifndef AFS_NT40_ENV
- #define	VOID	char
- #endif
- 
  #ifdef	KERNEL
  #include "rx_kmutex.h"
  #include "rx_kernel.h"
--- 23,28 ----
***************
*** 258,264 ****
      u_char securityIndex;	/* corresponds to the security class of the */
      /* securityObject for this conn */
      struct rx_securityClass *securityObject;	/* Security object for this connection */
!     VOID *securityData;		/* Private data for this conn's security class */
      u_short securityHeaderSize;	/* Length of security module's packet header data */
      u_short securityMaxTrailerSize;	/* Length of security module's packet trailer data */
  
--- 252,258 ----
      u_char securityIndex;	/* corresponds to the security class of the */
      /* securityObject for this conn */
      struct rx_securityClass *securityObject;	/* Security object for this connection */
!     void *securityData;		/* Private data for this conn's security class */
      u_short securityHeaderSize;	/* Length of security module's packet header data */
      u_short securityMaxTrailerSize;	/* Length of security module's packet trailer data */
  
***************
*** 509,516 ****
      int abortCount;		/* number of times last error was sent */
      u_int lastSendTime;		/* Last time a packet was sent on this call */
      u_int lastReceiveTime;	/* Last time a packet was received for this call */
!     void (*arrivalProc) (register struct rx_call * call, register VOID * mh, register int index);	/* Procedure to call when reply is received */
!     VOID *arrivalProcHandle;	/* Handle to pass to replyFunc */
      int arrivalProcArg;         /* Additional arg to pass to reply Proc */
      afs_uint32 lastAcked;	/* last packet "hard" acked by receiver */
      afs_uint32 startWait;	/* time server began waiting for input data/send quota */
--- 503,510 ----
      int abortCount;		/* number of times last error was sent */
      u_int lastSendTime;		/* Last time a packet was sent on this call */
      u_int lastReceiveTime;	/* Last time a packet was received for this call */
!     void (*arrivalProc) (register struct rx_call * call, register void * mh, register int index);	/* Procedure to call when reply is received */
!     void *arrivalProcHandle;	/* Handle to pass to replyFunc */
      int arrivalProcArg;         /* Additional arg to pass to reply Proc */
      afs_uint32 lastAcked;	/* last packet "hard" acked by receiver */
      afs_uint32 startWait;	/* time server began waiting for input data/send quota */
***************
*** 694,699 ****
--- 688,708 ----
      afs_int32 sparel[8];
  };
  
+ /* Configuration settings */
+ 
+ /* Enum for storing configuration variables which can be set via the 
+  * SetConfiguration method in the rx_securityClass, below
+  */
+ 
+ typedef enum {
+      RXS_CONFIG_FLAGS /* afs_uint32 set of bitwise flags */
+ } rx_securityConfigVariables;
+ 
+ /* For the RXS_CONFIG_FLAGS, the following bit values are defined */
+ 
+ /* Disable the principal name contains dot check in rxkad */
+ #define RXS_CONFIG_FLAGS_DISABLE_DOTCHECK	0x01
+ 
  /* XXXX (rewrite this description) A security class object contains a set of
   * procedures and some private data to implement a security model for rx
   * connections.  These routines are called by rx as appropriate.  Rx knows
***************
*** 734,744 ****
  	int (*op_GetStats) (struct rx_securityClass * aobj,
  			    struct rx_connection * aconn,
  			    struct rx_securityObjectStats * astats);
! 	int (*op_Spare1) (void);
  	int (*op_Spare2) (void);
  	int (*op_Spare3) (void);
      } *ops;
!     VOID *privateData;
      int refCount;
  };
  
--- 743,757 ----
  	int (*op_GetStats) (struct rx_securityClass * aobj,
  			    struct rx_connection * aconn,
  			    struct rx_securityObjectStats * astats);
! 	int (*op_SetConfiguration) (struct rx_securityClass * aobj,
! 				    struct rx_connection * aconn,
! 				    rx_securityConfigVariables atype,
! 				    void * avalue,
! 				    void ** acurrentValue);
  	int (*op_Spare2) (void);
  	int (*op_Spare3) (void);
      } *ops;
!     void *privateData;
      int refCount;
  };
  
***************
*** 756,762 ****
  #define RXS_CheckPacket(obj,call,packet) RXS_OP(obj,CheckPacket,(obj,call,packet))
  #define RXS_DestroyConnection(obj,conn) RXS_OP(obj,DestroyConnection,(obj,conn))
  #define RXS_GetStats(obj,conn,stats) RXS_OP(obj,GetStats,(obj,conn,stats))
! 
  
  
  /* Structure for keeping rx statistics.  Note that this structure is returned
--- 769,775 ----
  #define RXS_CheckPacket(obj,call,packet) RXS_OP(obj,CheckPacket,(obj,call,packet))
  #define RXS_DestroyConnection(obj,conn) RXS_OP(obj,DestroyConnection,(obj,conn))
  #define RXS_GetStats(obj,conn,stats) RXS_OP(obj,GetStats,(obj,conn,stats))
! #define RXS_SetConfiguration(obj, conn, type, value, currentValue) RXS_OP(obj, SetConfiguration,(obj,conn,type,value,currentValue))
  
  
  /* Structure for keeping rx statistics.  Note that this structure is returned
Index: openafs/src/rx/rx_kcommon.c
diff -c openafs/src/rx/rx_kcommon.c:1.56.2.4 openafs/src/rx/rx_kcommon.c:1.56.2.6
*** openafs/src/rx/rx_kcommon.c:1.56.2.4	Thu Feb  8 19:18:45 2007
--- openafs/src/rx/rx_kcommon.c	Wed Jan 30 16:05:48 2008
***************
*** 15,21 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_kcommon.c,v 1.56.2.4 2007/02/09 00:18:45 shadow Exp $");
  
  #include "rx/rx_kcommon.h"
  
--- 15,21 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_kcommon.c,v 1.56.2.6 2008/01/30 21:05:48 shadow Exp $");
  
  #include "rx/rx_kcommon.h"
  
***************
*** 1089,1096 ****
--- 1089,1100 ----
  #ifdef RXK_LISTENER_ENV
  	    afs_termState = AFSOP_STOP_RXK_LISTENER;
  #else
+ #ifdef AFS_SUN510_ENV
+ 	    afs_termState = AFSOP_STOP_NETIF;
+ #else
  	    afs_termState = AFSOP_STOP_COMPLETE;
  #endif
+ #endif
  	    osi_rxWakeup(&afs_termState);
  	    return;
  	}
***************
*** 1202,1207 ****
--- 1206,1214 ----
   * OS's socket receive routine returns as a result of a signal.
   */
  int rxk_ListenerPid;		/* Used to signal process to wakeup at shutdown */
+ #ifdef AFS_LINUX20_ENV
+ struct task_struct *rxk_ListenerTask;
+ #endif
  
  #ifdef AFS_SUN5_ENV
  /*
***************
*** 1231,1236 ****
--- 1238,1244 ----
  
  #ifdef AFS_LINUX20_ENV
      rxk_ListenerPid = current->pid;
+     rxk_ListenerTask = current;
  #endif
  #ifdef AFS_SUN5_ENV
      rxk_ListenerPid = 1;	/* No PID, just a flag that we're alive */
***************
*** 1263,1273 ****
      AFS_GLOCK();
  #endif /* RX_ENABLE_LOCKS */
      if (afs_termState == AFSOP_STOP_RXK_LISTENER) {
  	afs_termState = AFSOP_STOP_COMPLETE;
  	osi_rxWakeup(&afs_termState);
      }
      rxk_ListenerPid = 0;
! #if defined(AFS_LINUX22_ENV) || defined(AFS_SUN5_ENV)
      osi_rxWakeup(&rxk_ListenerPid);
  #endif
  #ifdef AFS_SUN5_ENV
--- 1271,1289 ----
      AFS_GLOCK();
  #endif /* RX_ENABLE_LOCKS */
      if (afs_termState == AFSOP_STOP_RXK_LISTENER) {
+ #ifdef AFS_SUN510_ENV
+ 	afs_termState = AFSOP_STOP_NETIF;
+ #else
  	afs_termState = AFSOP_STOP_COMPLETE;
+ #endif
  	osi_rxWakeup(&afs_termState);
      }
      rxk_ListenerPid = 0;
! #ifdef AFS_LINUX20_ENV
!     rxk_ListenerTask = 0;
!     osi_rxWakeup(&rxk_ListenerTask);
! #endif
! #if defined(AFS_SUN5_ENV)
      osi_rxWakeup(&rxk_ListenerPid);
  #endif
  #ifdef AFS_SUN5_ENV
Index: openafs/src/rx/rx_misc.c
diff -c openafs/src/rx/rx_misc.c:1.13.8.1 openafs/src/rx/rx_misc.c:1.13.8.3
*** openafs/src/rx/rx_misc.c:1.13.8.1	Tue Oct 30 11:16:45 2007
--- openafs/src/rx/rx_misc.c	Thu Jan 31 02:31:59 2008
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_misc.c,v 1.13.8.1 2007/10/30 15:16:45 shadow Exp $");
  
  #ifdef	KERNEL
  #include <afs/sysincludes.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_misc.c,v 1.13.8.3 2008/01/31 07:31:59 jaltman Exp $");
  
  #ifdef	KERNEL
  #include <afs/sysincludes.h>
***************
*** 34,39 ****
--- 34,44 ----
  #ifdef HAVE_UNISTD_H
  #include <unistd.h>
  #endif
+ #ifdef AFS_NT40_ENV
+ #ifndef EDQUOT 
+ #define EDQUOT WSAEDQUOT
+ #endif /* EDQUOT */
+ #endif /* AFS_NT40_ENV */
  #endif
  
  /*
***************
*** 53,60 ****
  
      if (code == ENOSPC)
  	err = VDISKFULL;
! #if !defined(AFS_SUN5_ENV) && !defined(AFS_NT40_ENV) && !defined(AFS_DJGPP_ENV)
!     /* EDQUOT doesn't exist on solaris */
      else if (code == EDQUOT)
  	err = VOVERQUOTA;
  #endif
--- 58,64 ----
  
      if (code == ENOSPC)
  	err = VDISKFULL;
! #ifdef EDQUOT
      else if (code == EDQUOT)
  	err = VOVERQUOTA;
  #endif
***************
*** 76,82 ****
      if (code == VDISKFULL)
  	err = ENOSPC;
      else if (code == VOVERQUOTA)
! #if defined(AFS_SUN5_ENV) || defined(AFS_NT40_ENV) || defined(AFS_DJGPP_ENV)
  	err = ENOSPC;
  #else
  	err = EDQUOT;
--- 80,86 ----
      if (code == VDISKFULL)
  	err = ENOSPC;
      else if (code == VOVERQUOTA)
! #ifndef EDQUOT
  	err = ENOSPC;
  #else
  	err = EDQUOT;
Index: openafs/src/rx/rx_multi.c
diff -c openafs/src/rx/rx_multi.c:1.9 openafs/src/rx/rx_multi.c:1.9.8.1
*** openafs/src/rx/rx_multi.c:1.9	Wed Dec  1 18:36:49 2004
--- openafs/src/rx/rx_multi.c	Fri Feb  8 16:21:07 2008
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_multi.c,v 1.9 2004/12/01 23:36:49 shadow Exp $");
  
  #ifdef	KERNEL
  #include "afs/sysincludes.h"
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_multi.c,v 1.9.8.1 2008/02/08 21:21:07 shadow Exp $");
  
  #ifdef	KERNEL
  #include "afs/sysincludes.h"
***************
*** 55,61 ****
      for (i = 0; i < nConns; i++) {
  	register struct rx_call *call;
  	call = mh->calls[i] = rx_NewCall(conns[i]);
! 	rx_SetArrivalProc(call, multi_Ready, (VOID *) mh, i);
      }
      return mh;
  }
--- 55,61 ----
      for (i = 0; i < nConns; i++) {
  	register struct rx_call *call;
  	call = mh->calls[i] = rx_NewCall(conns[i]);
! 	rx_SetArrivalProc(call, multi_Ready, (void *) mh, i);
      }
      return mh;
  }
***************
*** 95,101 ****
  
  /* Called by Rx when the first reply packet of a call is received, or the call is aborted. */
  void
! multi_Ready(register struct rx_call *call, register VOID *amh,
  	    register int index)
  {
      register struct multi_handle *mh = (struct multi_handle *)amh;
--- 95,101 ----
  
  /* Called by Rx when the first reply packet of a call is received, or the call is aborted. */
  void
! multi_Ready(register struct rx_call *call, register void *amh,
  	    register int index)
  {
      register struct multi_handle *mh = (struct multi_handle *)amh;
Index: openafs/src/rx/rx_prototypes.h
diff -c openafs/src/rx/rx_prototypes.h:1.29.4.6 openafs/src/rx/rx_prototypes.h:1.29.4.7
*** openafs/src/rx/rx_prototypes.h:1.29.4.6	Fri Oct  5 18:18:36 2007
--- openafs/src/rx/rx_prototypes.h	Fri Feb  8 16:21:07 2008
***************
*** 63,71 ****
  extern void rx_SetArrivalProc(register struct rx_call *call,
  			      register void (*proc) (register struct rx_call *
  						    call,
! 						    register VOID * mh,
  						    register int index),
! 			      register VOID * handle, register int arg);
  extern afs_int32 rx_EndCall(register struct rx_call *call, afs_int32 rc);
  extern void rx_Finalize(void);
  extern void rxi_PacketsUnWait(void);
--- 63,71 ----
  extern void rx_SetArrivalProc(register struct rx_call *call,
  			      register void (*proc) (register struct rx_call *
  						    call,
! 						    register void * mh,
  						    register int index),
! 			      register void * handle, register int arg);
  extern afs_int32 rx_EndCall(register struct rx_call *call, afs_int32 rc);
  extern void rx_Finalize(void);
  extern void rxi_PacketsUnWait(void);
***************
*** 453,459 ****
  				       register int nConns);
  extern int multi_Select(register struct multi_handle *mh);
  extern void multi_Ready(register struct rx_call *call,
! 			register VOID *mh, register int index);
  extern void multi_Finalize(register struct multi_handle *mh);
  extern void multi_Finalize_Ignore(register struct multi_handle *mh);
  
--- 453,459 ----
  				       register int nConns);
  extern int multi_Select(register struct multi_handle *mh);
  extern void multi_Ready(register struct rx_call *call,
! 			register void *mh, register int index);
  extern void multi_Finalize(register struct multi_handle *mh);
  extern void multi_Finalize_Ignore(register struct multi_handle *mh);
  
Index: openafs/src/rx/xdr_rec.c
diff -c openafs/src/rx/xdr_rec.c:1.8.4.1 openafs/src/rx/xdr_rec.c:1.8.4.2
*** openafs/src/rx/xdr_rec.c:1.8.4.1	Tue Oct 30 11:16:45 2007
--- openafs/src/rx/xdr_rec.c	Sun Feb  3 23:05:25 2008
***************
*** 47,53 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/xdr_rec.c,v 1.8.4.1 2007/10/30 15:16:45 shadow Exp $");
  
  #include <stdio.h>
  #ifdef HAVE_STDLIB_H
--- 47,53 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/xdr_rec.c,v 1.8.4.2 2008/02/04 04:05:25 jaltman Exp $");
  
  #include <stdio.h>
  #ifdef HAVE_STDLIB_H
***************
*** 108,114 ****
  			      register u_int len);
  static u_int xdrrec_getpos(register XDR * xdrs);
  static bool_t xdrrec_setpos(register XDR * xdrs, u_int pos);
! static afs_int32 *xdrrec_inline(register XDR * xdrs, int len);
  static void xdrrec_destroy(register XDR * xdrs);
  static bool_t flush_out(register RECSTREAM * rstrm, bool_t eor);
  static bool_t fill_input_buf(register RECSTREAM * rstrm);
--- 108,114 ----
  			      register u_int len);
  static u_int xdrrec_getpos(register XDR * xdrs);
  static bool_t xdrrec_setpos(register XDR * xdrs, u_int pos);
! static afs_int32 *xdrrec_inline(register XDR * xdrs, u_int len);
  static void xdrrec_destroy(register XDR * xdrs);
  static bool_t flush_out(register RECSTREAM * rstrm, bool_t eor);
  static bool_t fill_input_buf(register RECSTREAM * rstrm);
***************
*** 335,341 ****
  }
  
  static afs_int32 *
! xdrrec_inline(register XDR * xdrs, int len)
  {
      register RECSTREAM *rstrm = (RECSTREAM *) xdrs->x_private;
      afs_int32 *buf = NULL;
--- 335,341 ----
  }
  
  static afs_int32 *
! xdrrec_inline(register XDR * xdrs, u_int len)
  {
      register RECSTREAM *rstrm = (RECSTREAM *) xdrs->x_private;
      afs_int32 *buf = NULL;
Index: openafs/src/rx/LINUX/rx_knet.c
diff -c openafs/src/rx/LINUX/rx_knet.c:1.32.2.5 openafs/src/rx/LINUX/rx_knet.c:1.32.2.6
*** openafs/src/rx/LINUX/rx_knet.c:1.32.2.5	Tue Jun 12 01:44:05 2007
--- openafs/src/rx/LINUX/rx_knet.c	Wed Jan 30 12:26:05 2008
***************
*** 16,22 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/LINUX/rx_knet.c,v 1.32.2.5 2007/06/12 05:44:05 rra 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.6 2008/01/30 17:26:05 shadow Exp $");
  
  #include <linux/version.h>
  #ifdef AFS_LINUX22_ENV
***************
*** 216,251 ****
  {
      struct task_struct *listener;
      extern int rxk_ListenerPid;
  
!     while (rxk_ListenerPid) {
! #ifdef EXPORTED_TASKLIST_LOCK
! 	if (&tasklist_lock)
! 	   read_lock(&tasklist_lock);
! #endif
! #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
! #ifdef EXPORTED_TASKLIST_LOCK
! 	else
! #endif
! 	   rcu_read_lock();
! #endif
! 	listener = find_task_by_pid(rxk_ListenerPid);
!         if (listener) {
! 	    flush_signals(listener);
! 	    force_sig(SIGKILL, listener);
  	}
! #ifdef EXPORTED_TASKLIST_LOCK
! 	if (&tasklist_lock)
! 	    read_unlock(&tasklist_lock);
! #endif
! #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
! #ifdef EXPORTED_TASKLIST_LOCK
! 	else
! #endif
! 	   rcu_read_unlock();
! #endif
! 	if (!listener)
  	    break;
! 	afs_osi_Sleep(&rxk_ListenerPid);
      }
      sock_release(rx_socket);
      rx_socket = NULL;
--- 216,231 ----
  {
      struct task_struct *listener;
      extern int rxk_ListenerPid;
+     extern struct task_struct *rxk_ListenerTask;
  
!     while (rxk_ListenerTask) {
!         if (rxk_ListenerTask) {
! 	    flush_signals(rxk_ListenerTask);
! 	    force_sig(SIGKILL, rxk_ListenerTask);
  	}
! 	if (!rxk_ListenerTask)
  	    break;
! 	afs_osi_Sleep(&rxk_ListenerTask);
      }
      sock_release(rx_socket);
      rx_socket = NULL;
Index: openafs/src/rx/SOLARIS/rx_knet.c
diff -c openafs/src/rx/SOLARIS/rx_knet.c:1.20.6.1 openafs/src/rx/SOLARIS/rx_knet.c:1.20.6.2
*** openafs/src/rx/SOLARIS/rx_knet.c:1.20.6.1	Thu Oct  4 22:24:39 2007
--- openafs/src/rx/SOLARIS/rx_knet.c	Wed Jan 30 16:05:48 2008
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/SOLARIS/rx_knet.c,v 1.20.6.1 2007/10/05 02:24:39 shadow Exp $");
  
  #ifdef AFS_SUN5_ENV
  #include "rx/rx_kcommon.h"
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/SOLARIS/rx_knet.c,v 1.20.6.2 2008/01/30 21:05:48 shadow Exp $");
  
  #ifdef AFS_SUN5_ENV
  #include "rx/rx_kcommon.h"
***************
*** 592,597 ****
--- 592,605 ----
      uint_t mtu;
      uint64_t flags;
  
+     if (afs_termState == AFSOP_STOP_NETIF) {
+ 	afs_warn("NetIfPoller... ");
+ 	rw_destroy(&afsifinfo_lock);
+ 	ddi_taskq_destroy(afs_taskq);
+ 	afs_termState = AFSOP_STOP_COMPLETE;
+ 	osi_rxWakeup(&afs_termState);
+ 	return;
+     }
      /* Get our permissions */
      cr = CRED();
  
Index: openafs/src/rxgen/rpc_hout.c
diff -c openafs/src/rxgen/rpc_hout.c:1.10.4.2 openafs/src/rxgen/rpc_hout.c:1.10.4.3
*** openafs/src/rxgen/rpc_hout.c:1.10.4.2	Mon Jul  3 15:38:36 2006
--- openafs/src/rxgen/rpc_hout.c	Tue Feb  5 12:18:42 2008
***************
*** 36,42 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxgen/rpc_hout.c,v 1.10.4.2 2006/07/03 19:38:36 shadow Exp $");
  
  #include <stdio.h>
  #include <string.h>
--- 36,42 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxgen/rpc_hout.c,v 1.10.4.3 2008/02/05 17:18:42 jaltman Exp $");
  
  #include <stdio.h>
  #include <string.h>
***************
*** 268,276 ****
  		(1 << DEF_INPARAM) | (1 << DEF_INOUTPARAM));
  	psproc1(defp, 1, "int", "End",
  		(1 << DEF_OUTPARAM) | (1 << DEF_INOUTPARAM));
!     } else {
! 	psproc1(defp, 0, "int", "", 0xFFFFFFFF);
!     }
  
      if (uflag && !kflag)
  	psproc1(defp, 2, "int", "ubik_", 0xFFFFFFFF);
--- 268,276 ----
  		(1 << DEF_INPARAM) | (1 << DEF_INOUTPARAM));
  	psproc1(defp, 1, "int", "End",
  		(1 << DEF_OUTPARAM) | (1 << DEF_INOUTPARAM));
!     } 
!     if (!(!multi_flag && split_flag))
!         psproc1(defp, 0, "int", "", 0xFFFFFFFF);
  
      if (uflag && !kflag)
  	psproc1(defp, 2, "int", "ubik_", 0xFFFFFFFF);
Index: openafs/src/rxkad/private_data.h
diff -c openafs/src/rxkad/private_data.h:1.4.14.3 openafs/src/rxkad/private_data.h:1.4.14.4
*** openafs/src/rxkad/private_data.h:1.4.14.3	Wed Nov 29 16:25:09 2006
--- openafs/src/rxkad/private_data.h	Tue Jan 22 23:18:16 2008
***************
*** 77,82 ****
--- 77,83 ----
      char *get_key_rock;		/* rock for get_key function */
      int (*get_key) ();		/* func. of kvno and server key ptr */
      int (*user_ok) ();		/* func called with new client name */
+     afs_uint32 flags;		/* configuration flags */
  };
  
  /* private data in server-side connection */
Index: openafs/src/rxkad/rxkad_prototypes.h
diff -c openafs/src/rxkad/rxkad_prototypes.h:1.13 openafs/src/rxkad/rxkad_prototypes.h:1.13.6.1
*** openafs/src/rxkad/rxkad_prototypes.h:1.13	Fri Apr 15 14:34:30 2005
--- openafs/src/rxkad/rxkad_prototypes.h	Tue Jan 22 23:18:16 2008
***************
*** 120,127 ****
  				     afs_uint32 * expiration, char *name,
  				     char *instance, char *cell,
  				     afs_int32 * kvno);
! 
! 
  
  /* ticket.c */
  extern int tkt_DecodeTicket(char *asecret, afs_int32 ticketLen,
--- 120,129 ----
  				     afs_uint32 * expiration, char *name,
  				     char *instance, char *cell,
  				     afs_int32 * kvno);
! extern afs_int32 rxkad_SetConfiguration(struct rx_securityClass *aobj,
!                                         struct rx_connection *aconn, 
!                                         rx_securityConfigVariables atype,
!                                         void * avalue, void **aresult);
  
  /* ticket.c */
  extern int tkt_DecodeTicket(char *asecret, afs_int32 ticketLen,
***************
*** 147,152 ****
  			     char *get_key_rock, int serv_kvno, char *name,
  			     char *inst, char *cell, char *session_key,
  			     afs_int32 * host, afs_int32 * start,
! 			     afs_int32 * end);
  
  #endif
--- 149,154 ----
  			     char *get_key_rock, int serv_kvno, char *name,
  			     char *inst, char *cell, char *session_key,
  			     afs_int32 * host, afs_int32 * start,
! 			     afs_int32 * end, afs_int32 disableDotCheck);
  
  #endif
Index: openafs/src/rxkad/rxkad_server.c
diff -c openafs/src/rxkad/rxkad_server.c:1.21.2.4 openafs/src/rxkad/rxkad_server.c:1.21.2.5
*** openafs/src/rxkad/rxkad_server.c:1.21.2.4	Tue Oct 30 11:16:46 2007
--- openafs/src/rxkad/rxkad_server.c	Tue Jan 22 23:18:16 2008
***************
*** 15,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/rxkad_server.c,v 1.21.2.4 2007/10/30 15:16:46 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 15,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/rxkad_server.c,v 1.21.2.5 2008/01/23 04:18:16 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 57,63 ****
      rxkad_CheckPacket,		/* check data packet */
      rxkad_DestroyConnection,
      rxkad_GetStats,
!     0,				/* spare 1 */
      0,				/* spare 2 */
      0,				/* spare 3 */
  };
--- 57,63 ----
      rxkad_CheckPacket,		/* check data packet */
      rxkad_DestroyConnection,
      rxkad_GetStats,
!     rxkad_SetConfiguration,
      0,				/* spare 2 */
      0,				/* spare 3 */
  };
***************
*** 327,333 ****
  	code =
  	    tkt_DecodeTicket5(tix, tlen, tsp->get_key, tsp->get_key_rock,
  			      kvno, client.name, client.instance, client.cell,
! 			      &sessionkey, &host, &start, &end);
  	if (code)
  	    return code;
      }
--- 327,334 ----
  	code =
  	    tkt_DecodeTicket5(tix, tlen, tsp->get_key, tsp->get_key_rock,
  			      kvno, client.name, client.instance, client.cell,
! 			      &sessionkey, &host, &start, &end, 
! 			      tsp->flags & RXS_CONFIG_FLAGS_DISABLE_DOTCHECK);
  	if (code)
  	    return code;
      }
***************
*** 452,454 ****
--- 453,478 ----
      } else
  	return RXKADNOAUTH;
  }
+ 
+ /* Set security object configuration variables */
+ afs_int32 rxkad_SetConfiguration(struct rx_securityClass *aobj,
+                                  struct rx_connection *aconn, 
+                                  rx_securityConfigVariables atype,
+ 		                         void * avalue, void **currentValue)
+ {
+     struct rxkad_sprivate *private = 
+     (struct rxkad_sprivate *) aobj->privateData;
+ 
+     switch (atype) {
+     case RXS_CONFIG_FLAGS:
+         if (currentValue) {
+             *((afs_uint32 *)currentValue) = private->flags;
+         } else { 
+             private->flags = (afs_uint32) avalue;
+         }
+         break;
+     default:
+         break;
+     }
+     return 0;
+ }
Index: openafs/src/rxkad/ticket5.c
diff -c openafs/src/rxkad/ticket5.c:1.10.2.2 openafs/src/rxkad/ticket5.c:1.10.2.3
*** openafs/src/rxkad/ticket5.c:1.10.2.2	Tue Oct 30 11:16:46 2007
--- openafs/src/rxkad/ticket5.c	Tue Jan 22 23:18:16 2008
***************
*** 62,68 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/ticket5.c,v 1.10.2.2 2007/10/30 15:16:46 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "../afs/sysincludes.h"
--- 62,68 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/ticket5.c,v 1.10.2.3 2008/01/23 04:18:16 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "../afs/sysincludes.h"
***************
*** 195,201 ****
  		  int (*get_key) (char *, int, struct ktc_encryptionKey *),
  		  char *get_key_rock, int serv_kvno, char *name, char *inst,
  		  char *cell, char *session_key, afs_int32 * host,
! 		  afs_int32 * start, afs_int32 * end)
  {
      char plain[MAXKRB5TICKETLEN];
      struct ktc_encryptionKey serv_key;
--- 195,201 ----
  		  int (*get_key) (char *, int, struct ktc_encryptionKey *),
  		  char *get_key_rock, int serv_kvno, char *name, char *inst,
  		  char *cell, char *session_key, afs_int32 * host,
! 		  afs_int32 * start, afs_int32 * end, afs_int32 disableCheckdot)
  {
      char plain[MAXKRB5TICKETLEN];
      struct ktc_encryptionKey serv_key;
***************
*** 312,324 ****
  	goto bad_ticket;
      }
  
!     /* 
!      * If the first part of the name_string contains a dot, punt since
!      * then we can't see the diffrence between the kerberos 5
!      * principals foo.root and foo/root later in the fileserver.
!      */
!     if (strchr(decr_part.cname.name_string.val[0], '.') != NULL)
! 	goto bad_ticket;
  
      /* Verify that decr_part.key is of right type */
      switch (decr_part.key.keytype) {
--- 312,326 ----
  	goto bad_ticket;
      }
  
!     if (!disableCheckdot) {
!         /* 
!          * If the first part of the name_string contains a dot, punt since
!          * then we can't see the diffrence between the kerberos 5
!          * principals foo.root and foo/root later in the fileserver.
!          */
!         if (strchr(decr_part.cname.name_string.val[0], '.') != NULL)
! 	    goto bad_ticket;
!     }
  
      /* Verify that decr_part.key is of right type */
      switch (decr_part.key.keytype) {
Index: openafs/src/shlibafsrpc/mapfile.afs_xdr
diff -c openafs/src/shlibafsrpc/mapfile.afs_xdr:1.1.2.2 openafs/src/shlibafsrpc/mapfile.afs_xdr:1.1.2.3
*** openafs/src/shlibafsrpc/mapfile.afs_xdr:1.1.2.2	Tue Apr 10 14:39:55 2007
--- openafs/src/shlibafsrpc/mapfile.afs_xdr	Sun Feb 10 01:03:04 2008
***************
*** 79,85 ****
  	multi_Select;
  	multi_Init;
  	multi_Finalize_Ignore;
! 	add_to_error_table;
          afs_xdr_opaque;
          afs_xdr_string;
          afs_xdr_short;
--- 79,85 ----
  	multi_Select;
  	multi_Init;
  	multi_Finalize_Ignore;
! 	afs_add_to_error_table;
          afs_xdr_opaque;
          afs_xdr_string;
          afs_xdr_short;
***************
*** 138,143 ****
--- 138,148 ----
  	RXSTATS_ClearProcessRPCStats;
  	RXSTATS_ClearPeerRPCStats;
  	TM_GetTimeOfDay;
+ 	strcompose;
+ 	stolower;
+ 	ucstring;
+ 	lcstring;
+ 	AssertionFailed;
  
      local:
  	*;
Index: openafs/src/tbutc/NTMakefile
diff -c openafs/src/tbutc/NTMakefile:1.16.4.1 openafs/src/tbutc/NTMakefile:1.16.4.2
*** openafs/src/tbutc/NTMakefile:1.16.4.1	Thu Sep 20 07:46:07 2007
--- openafs/src/tbutc/NTMakefile	Sat Feb  2 08:43:26 2008
***************
*** 116,122 ****
  $(BUTCRES): butc.rc AFS_component_version_number.h
  
  $(BUTCEXE): $(BUTCOBJS) $(BUTCRES) $(BUTCLIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
--- 116,122 ----
  $(BUTCRES): butc.rc AFS_component_version_number.h
  
  $(BUTCEXE): $(BUTCOBJS) $(BUTCRES) $(BUTCLIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
Index: openafs/src/tests/Makefile.in
diff -c openafs/src/tests/Makefile.in:1.13 openafs/src/tests/Makefile.in:1.13.2.1
*** openafs/src/tests/Makefile.in:1.13	Thu Mar  9 01:34:58 2006
--- openafs/src/tests/Makefile.in	Mon Jan 21 14:42:13 2008
***************
*** 164,172 ****
  
  EXTRA_OBJS = err.o errx.o warn.o warnx.o vwarn.o vwarnx.o verr.o verrx.o warnerr.o snprintf.o 
  
- OpenAFS/OS.pm: OpenAFS/OS-$(MKAFS_OSTYPE).pm
- 	$(CP) OpenAFS/OS-$(MKAFS_OSTYPE).pm OpenAFS/OS.pm
- 
  fsx: fsx.o $(EXTRA_OBJS)
  	$(CC) $(LDFLAGS) -o $@ fsx.o $(EXTRA_OBJS) $(LIBS)
  
--- 164,169 ----
***************
*** 362,374 ****
  
  uninstall:
  
! all: run-tests OpenAFS/OS.pm libxfiles.a libdumpscan.a $(TEST_PROGRAMS)\
  	afsdump_scan afsdump_dirlist afsdump_extract dumptool
  	@chmod +x run-tests
  
  clean:
  	-rm -f xf_errs.c xf_errs.h dumpscan_errs.c dumpscan_errs.h *.o \
! 	$(TARGETS) run-tests $(TEST_PROGRAMS) OS.pm
  
  include ../config/Makefile.version
  
--- 359,371 ----
  
  uninstall:
  
! all: run-tests dirpath.conf OpenAFS/Dirpath.pm libxfiles.a libdumpscan.a $(TEST_PROGRAMS)\
  	afsdump_scan afsdump_dirlist afsdump_extract dumptool
  	@chmod +x run-tests
  
  clean:
  	-rm -f xf_errs.c xf_errs.h dumpscan_errs.c dumpscan_errs.h *.o \
! 	$(TARGETS) run-tests $(TEST_PROGRAMS) OpenAFS/Dirpath.pm
  
  include ../config/Makefile.version
  
***************
*** 381,384 ****
--- 378,431 ----
  check-fast: run-tests $(TEST_PROGRAMS)
  	./run-tests -all -fast
  
+ dirpath.conf: Makefile
+ 	@echo "creating $@"
+ 	@echo "# auto-generated by src/tests/Makefile"      >$@
+ 	@echo "# DO NOT EDIT"                               >>$@
+ 	@echo "afsconfdir=@afsconfdir@"                     >>$@
+ 	@echo "viceetcdir=@viceetcdir@"                     >>$@
+ 	@echo "afssrvbindir=@afssrvbindir@"                 >>$@
+ 	@echo "afssrvsbindir=@afssrvsbindir@"               >>$@
+ 	@echo "afssrvlibexecdir=@afssrvlibexecdir@"         >>$@
+ 	@echo "afsdbdir=@afsdbdir@"                         >>$@
+ 	@echo "afslogsdir=@afslogsdir@"                     >>$@
+ 	@echo "afslocaldir=@afslocaldir@"                   >>$@
+ 	@echo "afsbackupdir=@afsbackupdir@"                 >>$@
+ 	@echo "afsbosconfigdir=@afsbosconfigdir@"           >>$@
+ 	@echo "afskerneldir=@afskerneldir@"                 >>$@
+ 	@echo "initdir=@sysconfdir@"                        >>$@
+ 	@echo "localstatedir=@localstatedir@"               >>$@
+ 	@echo "ostype=@MKAFS_OSTYPE@"                       >>$@
+ 
+ OpenAFS/Dirpath.pm: Makefile
+ 	@echo "Creating OpenAFS/Dirpath.pm"
+ 	@echo "# This is -*- perl -*-"                          >$@
+ 	@echo "# auto-generated by src/tests/Makefile"          >>$@
+ 	@echo "# DO NOT EDIT"                                   >>$@
+ 	@echo "package OpenAFS::Dirpath;"                       >>$@
+ 	@echo "use strict;"                                     >>$@
+ 	@echo "use vars qw( @ISA @EXPORT \$$openafsdirpath);"   >>$@
+ 	@echo "@ISA = qw(Exporter);"                            >>$@
+ 	@echo "require Exporter;"                               >>$@
+ 	@echo "@EXPORT = qw(\$$openafsdirpath);"                >>$@
+ 	@echo ""                                                >>$@
+ 	@echo "\$$openafsdirpath = {"                           >>$@
+ 	@echo "  'afsconfdir'       => '@afsconfdir@',"         >>$@
+ 	@echo "  'viceetcdir'       => '@viceetcdir@',"         >>$@
+ 	@echo "  'afssrvbindir'     => '@afssrvbindir@',"       >>$@
+ 	@echo "  'afssrvsbindir'    => '@afssrvsbindir@',"      >>$@
+ 	@echo "  'afssrvlibexecdir' => '@afssrvlibexecdir@',"   >>$@
+ 	@echo "  'afsdbdir'         => '@afsdbdir@',"           >>$@
+ 	@echo "  'afslogsdir'       => '@afslogsdir@',"         >>$@
+ 	@echo "  'afslocaldir'      => '@afslocaldir@',"        >>$@
+ 	@echo "  'afsbackupdir'     => '@afsbackupdir@',"       >>$@
+ 	@echo "  'afsbosconfigdir'  => '@afsbosconfigdir@',"    >>$@
+ 	@echo "  'afskerneldir'     => '@afskerneldir@',"       >>$@
+ 	@echo "  'initdir'          => '@sysconfdir@',"         >>$@
+ 	@echo "  'localstatedir'    => '@localstatedir@',"      >>$@
+ 	@echo "  'ostype'           => '@MKAFS_OSTYPE@',"       >>$@
+ 	@echo "};"                                              >>$@
+ 	@echo ""                                                >>$@
+ 	@echo "1;"                                              >>$@
+ 
  .PHONY:		all install clean realclean distclean mostlyclean install uninstall check
Index: openafs/src/tests/afs-newcell.pl
diff -c openafs/src/tests/afs-newcell.pl:1.1 openafs/src/tests/afs-newcell.pl:1.1.22.1
*** openafs/src/tests/afs-newcell.pl:1.1	Mon Jan 14 02:49:17 2002
--- openafs/src/tests/afs-newcell.pl	Mon Jan 21 14:42:13 2008
***************
*** 1,18 ****
! #!/usr/bin/env perl -w
  # Copyright (C) 2000 by Sam Hartman
  # This file may be copied either under the terms of the GNU GPL or the IBM Public License
  # either version 2 or later of the GPL or version 1.0 or later of the IPL.
  
! use Term::ReadLine;
  use strict;
  use OpenAFS::ConfigUtils;
  use OpenAFS::Dirpath;
  use OpenAFS::OS;
  use OpenAFS::Auth;
  use Getopt::Long;
! use vars qw($admin $server $cellname $cachesize $part
!           $requirements_met  $shutdown_needed $csdb);
! my $rl = new Term::ReadLine('afs-newcell');
  
  =head1  NAME
  
--- 1,17 ----
! #!/usr/bin/env perl
  # Copyright (C) 2000 by Sam Hartman
  # This file may be copied either under the terms of the GNU GPL or the IBM Public License
  # either version 2 or later of the GPL or version 1.0 or later of the IPL.
  
! use warnings;
  use strict;
+ use Term::ReadLine;
  use OpenAFS::ConfigUtils;
  use OpenAFS::Dirpath;
  use OpenAFS::OS;
  use OpenAFS::Auth;
  use Getopt::Long;
! use Pod::Usage;
  
  =head1  NAME
  
***************
*** 20,39 ****
  
  =head1 SYNOPSIS
  
! B<afs-newcell> [B<--requirements-met>] [B<--admin> admin_user] [B<--cellname> cellname] [B<--cachesize> size] [B<--partition> partition-letter]
  
  =head1 DESCRIPTION
  
- 
  This script sets up the initial AFS database and configures the first
! database/file server. It also sets up an AFS cell's root volumes.  It 
! assumes that you already have a fileserver and database servers.  The 
! fileserver should have an empty root.afs. This script creates root.cell, 
! user, service and populates root.afs.  
! 
! The B<requirements-met> option specifies that the initial requirements
! have been met and that the script can proceed without displaying the
! initial banner or asking for confirmation.
  
  The B<admin> option specifies the name of the administrative user.
  This user will be given system:administrators and susers permission in
--- 19,55 ----
  
  =head1 SYNOPSIS
  
! B<afs-newcell>
!        B<--batch>
!        B<--debug>
!        B<--dont-unwind>
!        B<--help>
!        B<--ostype>=os
!        B<--server>=hostname
!        B<--cellname>=cell
!        B<--partition>=partition
!        B<--admin>=administrator
!        B<--kerberos-type>=authentication_type
!        B<--kerberos-realm>=realm_name
!        B<--kerberos-keytab>=keytab_file
!        B<--skip-make-keyfile>
!        B<--with-dafs>
!        B<--options-fileserver>=options
!        B<--options-volserver>=options
!        B<--options-salvageserver>=options
! 	   B<--options-salvager>=options 
  
  =head1 DESCRIPTION
  
  This script sets up the initial AFS database and configures the first
! database/file server. It also sets up an AFS cell's root volumes.  It assumes
! that you already have a fileserver and database servers installed.  The
! fileserver should have an empty root.afs. This script creates root.cell, user,
! service and populates root.afs.  
! 
! The B<batch> option specifies that the initial requirements have been met and
! that the script can proceed without displaying the initial banner or asking for
! confirmation.
  
  The B<admin> option specifies the name of the administrative user.
  This user will be given system:administrators and susers permission in
***************
*** 41,47 ****
  
  The B<cellname> option specifies the name of the cell.
  
! The B<cachesize> option specifies the size of the AFS cache.
  
  =head1 AUTHOR
  
--- 57,102 ----
  
  The B<cellname> option specifies the name of the cell.
  
! The B<partition> option specifies the partition letter of the AFS partition. The
! default value is 'a', for /vicepa.
! 
! =head1 PREREQUISITES
! 
! The following requirements must be met before running
! this script.
! 
! This machine must have a working, empty filesystem mounted on /vicepa. A
! different partition letter may be specified by the partition command line
! option. For example, to use /vicepb, specify '--partition=b' on the command
! line.
! 
! The OpenAFS client and server binaries must be installed on this machine. 
! 
! A working Kerberos realm with Kerberos4 support must be available. Supported
! Kerberos implementations are Heimdal with Kth-kerberos compatibility, MIT
! Kerberos5, and Kaserver (deprecated).  
! 
! Create the single-DES AFS key and write it to a keytab file using the kerberos
! kadmin program.
!    
! Create a principal called afs/cellname in your realm.  The cell name should be
! all lower case, unlike Kerberos realms which are all upper case.  You can use
! the asetkey command or if you used AFS3 salt to create the key, the bos addkey
! command. The asetkey command is built when OpenAFS built with Kerberos support.
! The asetkey command requires a cell configuration.
! 
! You will need an administrative principal created in a Kerberos realm.  This
! principal will be added to system:administrators and thus will be able to run
! administrative commands.  Generally the user is a root instance of some
! administravie user.  For example if jruser is an administrator then it would be
! reasonable to create jruser/root and specify jruser/root as the user to be
! added in this script using the 'admin' command line option.  You will also need
! to create a keyfile for this adminstrative user which is used by the script to
! obtain a ticket. The keyfile must be located in
! $openafsdirpath->{'afsconfdir'}/krb5.conf.
! 
! The AFS client must not be running on this workstation.  It will be started
! during the execution of this script.
  
  =head1 AUTHOR
  
***************
*** 49,294 ****
  
  =cut
  
- # main script
  
! # mkvol(volume, mount)
! sub mkvol($$) {
!     my ($vol, $mnt) = @_;
!     run("$openafsdirpath->{'afssrvsbindir'}/vos create $server $part $vol -localauth");
!     unwind("$openafsdirpath->{'afssrvsbindir'}/vos remove $server $part $vol -localauth");
!     run("$openafsdirpath->{'afssrvbindir'}/fs mkm $mnt $vol ");
!     run("$openafsdirpath->{'afssrvbindir'}/fs sa $mnt system:anyuser rl");
  }
  
  GetOptions (
!            "requirements-met" => \$requirements_met, 
!            "cellname=s" => \$cellname, 
! 	   "cachesize=s" => \$cachesize,
!            "partition=s" => \$part,
!            "admin=s" => \$admin);
  
- unless ($requirements_met) {
    print <<eoreqs;
!                            Prerequisites
  
! In order to set up a new AFS cell, you must meet the following:
  
! 1) You need a working Kerberos realm with Kerberos4 support.  You
!    should install Heimdal with Kth-kerberos compatibility or MIT
!    Kerberos5.
! 
! 2) You need to create the single-DES AFS key and load it into
!    $openafsdirpath->{'afsconfdir'}/KeyFile.  If your cell's name is the same as
!    your Kerberos realm then create a principal called afs.  Otherwise,
!    create a principal called afs/cellname in your realm.  The cell
!    name should be all lower case, unlike Kerberos realms which are all
!    upper case.  You can use asetkey from the openafs-krb5 package, or
!    if you used AFS3 salt to create the key, the bos addkey command.
! 
! 3) This machine should have a filesystem mounted on /vicepa.  If you
!    do not have a free partition, on Linux you can create a large file by using
!    dd to extract bytes from /dev/zero.  Create a filesystem on this file
!    and mount it using -oloop.  
! 
! 4) You will need an administrative principal created in a Kerberos
!    realm.  This principal will be added to susers and
!    system:administrators and thus will be able to run administrative
!    commands.  Generally the user is a root instance of some administravie
!    user.  For example if jruser is an administrator then it would be
!    reasonable to create jruser/root and specify jruser/root as the user
!    to be added in this script.
  
! 5) The AFS client must not be running on this workstation.  It will be
!    at the end of this script.
  
  eoreqs
  
!   $_ = $rl->readline("Do you meet these requirements? [y/n] ");
!   unless (/^y/i ) {
!     print "Run this script again when you meet the requirements\n";
!     exit(1);
    }
!        
!   if ($> != 0) {
!     die "This script should almost always be run as root.  Use the --requirements-met option to run as non-root.\n";
    }
! }
! open(MOUNT, "mount |") or die "Failed to run mount: $!\n";
! while(<MOUNT>) {
!   if(m:^AFS:) {
!     print "The AFS client is currently running on this workstation.\n";
!     print "Please restart this script after running $openafsinitcmd->{'client-stop'}\n";
!     exit(1);
    }
!   if(m:^/afs on AFS:) {
!     print "The AFS client is currently running on this workstation.\n";
!     print "Please restart this script after running $openafsinitcmd->{'client-stop'}\n";
!     exit(1);
    }
  }
- close MOUNT;
  
! unless ( -f "$openafsdirpath->{'afsconfdir'}/KeyFile") {
!   print "You do not have an AFS keyfile.  Please create this using asetkey from openafs-krb5 or 
! the bos addkey command";
!   exit(1);
  }
  
! print "If the fileserver is not running, this may hang for 30 seconds.\n";
! run("$openafsinitcmd->{'filesrv-stop'}");
! $server = `hostname`;
! chomp $server;
! $admin = $rl->readline("What administrative principal should be used? ") unless $admin;
!  die "Please specify an administrative user\n" unless $admin;
! $admin =~ s:/:.:g;
! if($admin =~ /@/) {
! die "The administrative user must be in the same realm as the cell and no realm may be specified.\n";
! }
! 
! $cellname = $rl->readline("What cellname should be used? ") unless $cellname;
! die "Please specify a cellname\n" unless $cellname;
! 
! if (! -f "$openafsdirpath->{'afsconfdir'}/ThisCell") {
!     open(CELL, "> $openafsdirpath->{'afsconfdir'}/ThisCell");
!     print CELL "${cellname}";
!     close CELL;
! }
! 
! open(CELL, "$openafsdirpath->{'afsconfdir'}/ThisCell") or
!     die "Cannot open $openafsdirpath->{'afsconfdir'}/ThisCell: $!\n";
! 
! my $lcell = <CELL>;
! chomp $lcell;
! close CELL;
! 
! run( "echo \\>$lcell >$openafsdirpath->{'afsconfdir'}/CellServDB");
! $csdb = `host $server|awk '{print $4 " #" $1}'`;
! run( "echo $csdb >>$openafsdirpath->{'afsconfdir'}/CellServDB");
! run("$openafsinitcmd->{'filesrv-start'}");
! unwind("$openafsinitcmd->{'filesrv-stop'}");
! $shutdown_needed = 1;
! run ("$openafsdirpath->{'afssrvbindir'}/bos addhost $server $server -localauth ||true");
! run("$openafsdirpath->{'afssrvbindir'}/bos adduser $server $admin -localauth");
! unwind("$openafsdirpath->{'afssrvbindir'}/bos removeuser $server $admin -localauth");
! if ( -f "$openafsdirpath->{'afsdbdir'}/prdb.DB0" ) {
!   die "Protection database already exists; cell already partially created\n";
!  }
! open(PRDB, "|$openafsdirpath->{'afssrvsbindir'}/pt_util -p $openafsdirpath->{'afsdbdir'}/prdb.DB0 -w ")
! or die "Unable to start pt_util: $!\n";
! print PRDB "$admin 128/20 1 -204 -204\n";
! print PRDB "system:administrators 130/20 -204 -204 -204\n";
! print PRDB" $admin 1\n";
! close PRDB;
! unwind( "rm $openafsdirpath->{'afsdbdir'}/prdb* ");
! # Start up ptserver and vlserver
! run("$openafsdirpath->{'afssrvbindir'}/bos create $server ptserver simple $openafsdirpath->{'afssrvlibexecdir'}/ptserver -localauth");
! unwind("$openafsdirpath->{'afssrvbindir'}/bos delete $server ptserver -localauth");
! 
! run("$openafsdirpath->{'afssrvbindir'}/bos create $server vlserver simple $openafsdirpath->{'afssrvlibexecdir'}/vlserver -localauth");
! unwind("$openafsdirpath->{'afssrvbindir'}/bos delete $server vlserver -localauth");
! 
! run( "$openafsdirpath->{'afssrvbindir'}/bos create $server fs fs ".
!      "-cmd $openafsdirpath->{'afssrvlibexecdir'}/fileserver ".
!      "-cmd $openafsdirpath->{'afssrvlibexecdir'}/volserver ".
!      "-cmd $openafsdirpath->{'afssrvlibexecdir'}/salvager -localauth");
! unwind( "$openafsdirpath->{'afssrvbindir'}/bos delete $server fs -localauth ");
! 
! print "Waiting for database elections: ";
! sleep(30);
! print "done.\n";
! # Past this point we want to control when bos shutdown happens
! $shutdown_needed = 0;
! unwind( "$openafsdirpath->{'afssrvbindir'}/bos shutdown $server -localauth ");
! run("$openafsdirpath->{'afssrvsbindir'}/vos create $server a root.afs -localauth");
! # bring up client
! 
! $cachesize = $rl->readline("What size cache (in 1k blocks)? ") unless $cachesize;
! die "Please specify a cache size\n" unless $cachesize;
! 
! run("echo $lcell >$openafsdirpath->{'viceetcdir'}/ThisCell");
! run("cp $openafsdirpath->{'afsconfdir'}/CellServDB $openafsdirpath->{'viceetcdir'}/CellServDB");
! run("echo /afs:/usr/vice/cache:${cachesize} >$openafsdirpath->{'viceetcdir'}/cacheinfo");
! run("$openafsinitcmd->{'client-forcestart'}");
! my $afs_running = 0;
! open(MOUNT, "mount |") or die "Failed to run mount: $!\n";
! while(<MOUNT>) {
! if(m:^AFS:) {
!        $afs_running = 1;
! }
!        }
! unless ($afs_running) {
! print "*** The AFS client failed to start.\n";
! print  "Please fix whatever problem kept it from running.\n";
!        exit(1);
! }
! unwind("$openafsinitcmd->{'client-stop'}");
! 
! unless ($part) {
!     $part = $rl    ->readline("What partition? [a] ");
!     $part = "a" unless $part;
! }
! 
! &OpenAFS::Auth::authadmin();
! 
! run("$openafsdirpath->{'afssrvbindir'}/fs sa /afs system:anyuser rl");
! 
! run("$openafsdirpath->{'afssrvsbindir'}/vos create $server $part root.cell -localauth");
! unwind("$openafsdirpath->{'afssrvsbindir'}/vos remove $server $part root.cell -localauth");
! # We make root.cell s:anyuser readable after we mount in the next
! # loop.
! open(CELLSERVDB, "$openafsdirpath->{'viceetcdir'}/CellServDB")
!     or die "Unable to open $openafsdirpath->{'viceetcdir'}/CellServDB: $!\n";
! while(<CELLSERVDB>) {
!     chomp;
!     if (/^>\s*([a-z0-9_\-.]+)/ ) {
!        run("$openafsdirpath->{'afssrvbindir'}/fs mkm /afs/$1 root.cell -cell $1 -fast");
!        unwind ("$openafsdirpath->{'afssrvbindir'}/fs rmm /afs/$1");
!    }
! }
! 
! run("$openafsdirpath->{'afssrvbindir'}/fs sa /afs/$lcell system:anyuser rl");
! run ("$openafsdirpath->{'afssrvbindir'}/fs mkm /afs/.$lcell root.cell -cell $lcell -rw");
! unwind ("$openafsdirpath->{'afssrvbindir'}/fs rmm /afs/.$lcell");
! run("$openafsdirpath->{'afssrvbindir'}/fs mkm /afs/.root.afs root.afs -rw");
! unwind ("$openafsdirpath->{'afssrvbindir'}/fs rmm /afs/.root.afs");
! 
! mkvol( "user", "/afs/$lcell/user" );
! unwind( "$openafsdirpath->{'afssrvsbindir'}/vos remove $server $part user -localauth ");
! 
! mkvol( "service", "/afs/$lcell/service" );
! unwind( "$openafsdirpath->{'afssrvsbindir'}/vos remove $server $part service -localauth ");
! 
! mkvol( "rep", "/afs/$lcell/.replicated" );
! unwind( "$openafsdirpath->{'afssrvsbindir'}/vos remove $server $part rep -localauth ");
! run( "$openafsdirpath->{'afssrvbindir'}/fs mkm /afs/$lcell/replicated rep.readonly " );
! 
! run( "$openafsdirpath->{'afssrvsbindir'}/vos addsite $server $part rep -localauth" );
! run( "$openafsdirpath->{'afssrvsbindir'}/vos release rep -localauth" );
! unwind( "$openafsdirpath->{'afssrvsbindir'}/vos remove $server $part rep.readonly -localauth ");
! 
! mkvol( "unrep", "/afs/$lcell/unreplicated" );
! unwind( "$openafsdirpath->{'afssrvsbindir'}/vos remove $server $part unrep -localauth ");
! 
! $lcell =~ /^([^.]*)/;
! my $cellpart = $1;
! run("ln -s /afs/$lcell /afs/$cellpart");
! unwind ("rm /afs/$cellpart");
! run( "ln -s /afs/.$lcell /afs/.$cellpart" );
! unwind ("rm /afs/.$cellpart");
! 
! run( "$openafsdirpath->{'afssrvsbindir'}/vos addsite $server $part root.afs -localauth" );
! run( "$openafsdirpath->{'afssrvsbindir'}/vos addsite $server $part root.cell -localauth" );
! run( "$openafsdirpath->{'afssrvsbindir'}/vos release root.afs -localauth" );
! run( "$openafsdirpath->{'afssrvsbindir'}/vos release root.cell -localauth" );
! unwind( "$openafsdirpath->{'afssrvsbindir'}/vos remove $server $part root.cell.readonly -localauth ");
! unwind( "$openafsdirpath->{'afssrvsbindir'}/vos remove $server $part root.afs.readonly -localauth ");
  
  
  
- @unwinds = ();
  END {
! # If we fail before all the instances are created, we need to perform 
! # our own bos shutdown
!     system("$openafsdirpath->{'afssrvbindir'}/bos shutdown $server -localauth") if $shutdown_needed;
!   run(pop @unwinds) while @unwinds;
    }
--- 104,616 ----
  
  =cut
  
  
! my $term = new Term::ReadLine('afs-newcell');
! my $path = $OpenAFS::Dirpath::openafsdirpath;
! 
! #-----------------------------------------------------------------------------------
! # prompt(message, default_value)
! #
! sub prompt($$) {
!   my ($message,$default) = @_;
!   my $value = $term->readline("$message [$default] ");
!   unless ($value) {
!     $value = $default;
!   }
!   return $value;
! }
! 
! #-----------------------------------------------------------------------------------
! # mkvol(volume, mount, partition)
! #
! sub mkvol($$$$) {
!     my ($vol, $mnt, $srv, $part) = @_;
!     run("$path->{'afssrvsbindir'}/vos create $srv $part $vol -maxquota 0 -localauth");
!     unwind("$path->{'afssrvsbindir'}/vos remove $srv $part $vol -localauth");
!     run("$path->{'afssrvbindir'}/fs mkm $mnt $vol ");
!     run("$path->{'afssrvbindir'}/fs sa $mnt system:anyuser rl");
! }
! 
! #-----------------------------------------------------------------------------------
! # check_program($prog) - verify the program is installed.
! #
! sub check_program($) {
!     my ($program) = @_;
!   unless ( -f $program ) {
!      die "error: Missing program: $program\n";
!   }
!   unless ( -x $program ) {
!      die "error: Not executable: $program\n";
!   }
  }
  
+ #-----------------------------------------------------------------------------------
+ # main script
+ 
+ # options
+ my $batch = 0;
+ my $debug = 0;
+ my $dont_unwind = 0;
+ my $help = 0;
+ my $ostype = $path->{'ostype'};
+ my $server = 'localhost';
+ my $cellname = 'testcell';
+ my $partition = '/vicepa';
+ my $admin = 'admin';
+ my $kerberos_type = 'MIT';
+ my $kerberos_realm = 'TESTCELL';
+ my $kerberos_keytab = "$path->{'afsconfdir'}/krb5.keytab";
+ my $skip_make_keyfile = 0;
+ my $with_dafs = 0;
+ my $options_fileserver = '';
+ my $options_volserver = '';
+ my $options_salvageserver = '';
+ my $options_salvager = '';
+ 
+ $server = `hostname`;
+ chomp $server;
+ 
  GetOptions (
!        "batch" => \$batch, 
!        "debug!" => \$debug,
!        "dont-unwind!" => \$dont_unwind,
!        "help" => \$help,
!        "ostype=s" => \$ostype,
!        "server=s" => \$server,
!        "cellname=s" => \$cellname, 
!        "partition=s" => \$partition,
!        "admin=s" => \$admin,
!        "kerberos-type=s" => \$kerberos_type,
!        "kerberos-realm=s" => \$kerberos_realm,
!        "kerberos-keytab=s" => \$kerberos_keytab,
!        "skip-make-keyfile" => \$skip_make_keyfile,
!        "with-dafs" => \$with_dafs,
!        "options-fileserver=s" => \$options_fileserver,
!        "options-volserver=s" => \$options_volserver,
!        "options-salvageserver=s" => \$options_salvageserver,
!        "options-salvager=s" => \$options_salvager,
!        );
! 
! if ($help) {
!   pod2usage(1);
!   exit 0;
! }
! 
! # print debug messages when running commands.
! $OpenAFS::ConfigUtils::debug = $debug;
! 
! #
! # Verify we have a clean slate before starting.
! #
! my @problems = ();
! my $try_rm_cell = 0;
! 
! if ($> != 0) {
!   push(@problems, "This script should run as root.");
! }
! 
! my @afsconfigfiles = (
!   "$path->{'afsconfdir'}/ThisCell",
!   "$path->{'afsconfdir'}/CellServDB",
!   "$path->{'afsconfdir'}/UserList",
!   "$path->{'afsdbdir'}/prdb.DB0",
!   "$path->{'afsbosconfigdir'}/BosConfig",
! );
! foreach my $configfile (@afsconfigfiles) {
!   if ( -f $configfile ) {
!     push(@problems, "Configuration file already exists, $configfile.");
!     $try_rm_cell = 1;
!   }
! }
! 
! if (@problems) {
!   foreach my $problem (@problems) {
!     print "error: $problem\n";
!   }
!   print "info: Try running afs-rmcell.pl\n" if $try_rm_cell;
!   exit 1;
! }
! 
! #
! # Interactive mode
! #
! unless ($batch) {
  
    print <<eoreqs;
!                            REQUIREMENTS
  
! The following requirements must be meet before running
! this script. See 'pod2text $0' for more details.
  
! 1) A filesystem must be mounted on /vicepa. (See
!    the --partition option for alternative mount points.)
  
! 2) The OpenAFS client and server binaries must be installed.
!    The init scripts to start and stop the client and servers 
!    must be installed and configured. OpenAFS/OS.pm must be 
!    configured for your system. There should be no remants
!    from a previous cell. Run afs-rmcell to remove any.
! 
! 3) A Kerberos realm with Kerberos4 support must be available.
!    Supported Kerberos implementations are Heimdal with
!    Kth-kerberos compatibility, MIT Kerberos 5, and 
!    Kaserver (deprecated). OpenAFS/Auth.pm must be configured
!    for your system.
! 
! 4) A Kerberos keytab file containing the afs principal 
!    and the administrator principal must be be present at
!    $path->{'afsconfdir'}/krb5.keytab.
!    See the asetkey man page for information about creating the
!    keytab file.  The default name of the administrator 
!    principal is 'admin'. See the --admin option for
!    alternative names.
  
  eoreqs
  
!   my $answer = prompt("Does your system meet these requirements? (yes/no)", "no");
!   unless ($answer=~/^y/i ) {
!     print "OK: Aborted.\n";
!   exit 0;
    }
! 
!   print "\nServer options:\n"; 
!   $ostype = prompt("Which OS?", $ostype);
!   $server = prompt("What server name should be used?", $server);
!   $cellname = prompt("What cellname should be used?", $cellname);
!   $partition = prompt("What vice partition?", $partition);
!   $admin = prompt("What administrator username?", $admin);
!   if($admin =~ /@/) {
!     die "error: Please specify the username without the realm name.\n";
    }
! 
!   print "\nKerberos options:\n";
!   $kerberos_type = prompt("Which Kerberos is to be used?", $kerberos_type);
!   if ($kerberos_type!~/kaserver/i) {
!     $kerberos_realm  = prompt("What Kerberos realm?", $kerberos_realm);
!     $kerberos_keytab = prompt("What keytab file?", $kerberos_keytab);
!     $answer = prompt("Create OpenAFS KeyFile from a keytab? (yes/no)", "yes");
!     $skip_make_keyfile = ($answer=~/^y/i) ? 0 : 1;
!   }
! 
!   print "\nFileserver options:\n";
!   $answer = prompt("Use DAFS fileserver (requires DAFS build option)? (yes/no)", "no");
!   $with_dafs = ($answer=~/^y/i) ? 1 : 0;
!   $options_fileserver = prompt("fileserver options:", $options_fileserver);
!   $options_volserver = prompt("volserver options:",  $options_volserver);
!   $options_salvageserver = prompt("salvageserver options:",  $options_salvageserver);
!   $options_salvager = prompt("salvager options:", $options_salvager);
! 
!   print "\nConfirmation:\n";
!   print "OS Type                : $ostype\n";
!   print "Server name            : $server\n";
!   print "Cell name              : $cellname\n";
!   print "Partition              : $partition\n";
!   print "Administrator          : $admin\n";
!   print "Kerberos               : $kerberos_type\n";
!   if ($kerberos_type!~/kaserver/i) {
!     print "Realm                  : $kerberos_realm\n";
!     print "Keytab file            : $kerberos_keytab\n";
!     print "Make KeyFile           : ", $skip_make_keyfile ? "yes" : "no", "\n";
    }
!   print "DAFS fileserver        : ", $with_dafs ? "yes" : "no", "\n";
!   print "fileserver options     : $options_fileserver\n";
!   print "volserver options      : $options_volserver\n";
!   print "salvagerserver options : $options_salvageserver\n";
!   print "salvager options       : $options_salvager\n";
!   print "\n";
! 
!   $answer = prompt("Continue? (yes/no)", "yes");
!   unless ($answer=~/^y/i ) {
!     print "OK: Aborted.\n";
!   exit 0;
!   }
! 
!   # Save the options for the next time.
!   $answer = prompt("Save as command-line options? (yes/no)", "yes");
!   if ($answer=~/^y/i ) {
!     my $switches = "";
!     $switches .= "--batch";
!     $switches .= " --debug"                                          if $debug;
!     $switches .= " --dont_unwind"                                    if $dont_unwind;
!     $switches .= " --ostype='$ostype'"                               if $ostype;
!     $switches .= " --server='$server'"                               if $server;
!     $switches .= " --cellname='$cellname'"                           if $cellname;
!     $switches .= " --partition='$partition'"                         if $partition;
!     $switches .= " --admin='$admin'"                                 if $admin;
!     $switches .= " --kerberos-type='$kerberos_type'"                 if $kerberos_type;
!     $switches .= " --kerberos-realm='$kerberos_realm'"               if $kerberos_realm;
!     $switches .= " --kerberos-keytab='$kerberos_keytab'"             if $kerberos_keytab;
!     $switches .= " --skip-make-keyfile"                              if $skip_make_keyfile;
!     $switches .= " --with-dafs"                                      if $with_dafs;
!     $switches .= " --options-fileserver='$options_fileserver'"       if $options_fileserver;
!     $switches .= " --options-volserver='$options_volserver'"         if $options_volserver;;
!     $switches .= " --options-salvageserver='$options_salvageserver'" if $options_salvageserver;;
!     $switches .= " --options-salvager='$options_salvager'"           if $options_salvager;
!   
!     my $conf = prompt("Filename for save?", "afs-newcell.conf");
!     open(CONF, "> $conf") or die "error: Cannot open file $conf: $!\n";
!     print CONF "$switches\n";
!     close CONF;
    }
  }
  
! if ($debug) {
!   print "debug: afs-newcell options\n";
!   print "debug:  \$batch = '$batch'\n";
!   print "debug:  \$debug = '$debug'\n";
!   print "debug:  \$dont_unwind = '$dont_unwind'\n";
!   print "debug:  \$help = '$help'\n";
!   print "debug:  \$ostype = '$ostype'\n";
!   print "debug:  \$server = '$server'\n";
!   print "debug:  \$cellname = '$cellname'\n";
!   print "debug:  \$partition = '$partition'\n";
!   print "debug:  \$admin = '$admin'\n";
!   print "debug:  \$kerberos_type = '$kerberos_type'\n";
!   print "debug:  \$kerberos_realm = '$kerberos_realm'\n";
!   print "debug:  \$kerberos_keytab = '$kerberos_keytab'\n";
!   print "debug:  \$skip_make_keyfile = '$skip_make_keyfile'\n";
!   print "debug:  \$with_dafs = '$with_dafs'\n";
!   print "debug:  \$options_fileserver = '$options_fileserver'\n";
!   print "debug:  \$options_volserver = '$options_volserver'\n";
!   print "debug:  \$options_salvageserver = '$options_salvageserver'\n";
!   print "debug:  \$options_salvager = '$options_salvager'\n";
  }
  
! # 
! # Create an auth object for the type of kerberos
! # to be used for authentication in our cell.
! #
! my $auth = OpenAFS::Auth::create(
!       'debug'=>$debug,
!       'type'=>$kerberos_type, 
!       'cell'=>$cellname,
!       'realm'=>$kerberos_realm,
!       'keytab'=>$kerberos_keytab,
!       );
! 
! my $os = OpenAFS::OS::create(
!       'debug'=>$debug,
!       'ostype'=>$ostype,
!       );
! 
! #
! # Sanity checks before we begin. Make sure we have correct
! # binaries, directories, and permissions.
! #
! 
! my $bosserver = "$path->{'afssrvsbindir'}/bosserver";
! my $bos       = "$path->{'afssrvbindir'}/bos";
! my $fs        = "$path->{'afssrvbindir'}/fs";
! my $pts       = "$path->{'afssrvbindir'}/pts";
! my $vos       = "$path->{'afssrvsbindir'}/vos";
! 
! check_program($bosserver);
! check_program($bos);
! check_program($fs);
! check_program($pts);
! check_program($vos);
! 
! 
! #
! # Sanity check admin username and convert kerberos 5 notation to afs.
! #
! if ($admin =~ /@/) {
!    die "error: Please specify the username without the realm name.\n";
! }
! my $username = $admin;
! $username=~s:/:.:g;   # convert kerberos separators to afs separators.
  
+ # Shutdown the client and server, if running.
+ run($os->command('client-stop'));
+ run($os->command('fileserver-stop'));
+ 
+ #
+ # Attempt the client setup for this system before we try to create the cell.
+ #
+ $os->configure_client();
+ 
+ #
+ # Create the initial server configuration and the server administrator, temporarily running
+ # with -noauth.
+ #
+ 
+ # bosserver attempts to create the following directories with these limited 
+ # permissions. However, bosserver does not create parent directories as needed, so
+ # the directories are not successfully created when they are more than one level
+ # deep. 
+ run("mkdir -m 0775 -p $path->{'afsconfdir'}");
+ run("mkdir -m 0700 -p $path->{'afslocaldir'}");
+ run("mkdir -m 0700 -p $path->{'afsdbdir'}");
+ run("mkdir -m 0755 -p $path->{'afslogsdir'}"); 
+ run("mkdir -m 0777 -p $path->{'viceetcdir'}");
+ 
+ # In case the directories were created earlier with the wrong permissions.
+ run("chmod 0775 $path->{'afsconfdir'}");
+ run("chmod 0700 $path->{'afslocaldir'}");
+ run("chmod 0700 $path->{'afsdbdir'}");
+ run("chmod 0755 $path->{'afslogsdir'}"); 
+ run("chmod 0777 $path->{'viceetcdir'}");
+ 
+ print "debug: Starting bosserver...\n" if $debug;
+ run("$path->{'afssrvsbindir'}/bosserver -noauth");
+     unwind($os->command('remove', "$path->{'afsconfdir'}/ThisCell"));
+     unwind($os->command('remove', "$path->{'afsconfdir'}/CellServDB"));
+     unwind($os->command('remove', "$path->{'afsconfdir'}/UserList"));
+     unwind($os->command('remove', "$path->{'afsbosconfigdir'}/BosConfig"));
+     unwind($os->command('fileserver-stop'));
+ 
+ run("$bos setcellname $server $cellname -localauth");
+ run("$bos addhost $server $server -localauth");
+ run("$bos adduser $server $username -localauth");
+     unwind("$bos removeuser $server $username -localauth");
+ 
+ #
+ # Create the AFS KeyFile. (This must be done after bosserver creates the configuration files.)
+ #
+ unless ($skip_make_keyfile) {
+   print "debug: Making the keyfile...\n" if $debug;
+   $auth->make_keyfile();
+ }
+ unless ( -f "$path->{'afsconfdir'}/KeyFile") {
+   die "You do not have an AFS keyfile.  Please create this using asetkey or the bos addkey command.\n";
+ }
  
+ # make the krb.conf file if the realm name is different than the cell name.
+ $auth->make_krb_config();
+ 
+ #
+ # Start up the ptserver and vlserver.
+ #
+ print "debug: Starting the ptserver and vlserver...\n" if $debug;
+ run("$bos create $server ptserver simple $path->{'afssrvlibexecdir'}/ptserver -localauth");
+     unwind($os->command('remove', "$path->{'afsdbdir'}/prdb.DB0"));
+     unwind($os->command('remove', "$path->{'afsdbdir'}/prdb.DBSYS1"));
+     unwind("$bos delete $server ptserver -localauth");
+     unwind("$bos stop $server ptserver -localauth");
+ 
+ run("$path->{'afssrvbindir'}/bos create $server vlserver simple $path->{'afssrvlibexecdir'}/vlserver -localauth");
+     unwind($os->command('remove', "$path->{'afsdbdir'}/vldb.DB0"));
+     unwind($os->command('remove', "$path->{'afsdbdir'}/vldb.DBSYS1"));
+     unwind("$bos delete $server vlserver -localauth");
+     unwind("$bos stop $server vlserver -localauth");
+ 
+ #
+ # Start the file server.
+ #
+ print "debug: Starting the fileserver...\n" if $debug;
+ if ($with_dafs) {
+   run( "$bos create $server dafs dafs ".
+        "-cmd $path->{'afssrvlibexecdir'}/fileserver $options_fileserver ".
+        "-cmd $path->{'afssrvlibexecdir'}/volserver $options_volserver ".
+        "-cmd $path->{'afssrvlibexecdir'}/salvageserver $options_salvageserver".
+        "-cmd $path->{'afssrvlibexecdir'}/salvager $options_salvager".
+      "-localauth");
+ }
+ else {
+   run( "$bos create $server fs fs ".
+        "-cmd $path->{'afssrvlibexecdir'}/fileserver $options_fileserver ".
+        "-cmd $path->{'afssrvlibexecdir'}/volserver $options_volserver ".
+        "-cmd $path->{'afssrvlibexecdir'}/salvager $options_salvager ".
+      "-localauth");
+ }
+   unwind("$bos delete $server fs -localauth ");
+   unwind("$bos stop $server fs -localauth ");
+ 
+ #
+ # Create the AFS administrator (with the same name as the server administrator).
+ #
+ print "debug: Creating users...\n" if $debug;
+ sleep(10); # wait to avoid "no quorum elected" errors.
+ 
+ run("$pts createuser -name $username -cell $cellname -noauth");
+ run("$pts adduser $username system:administrators -cell $cellname -noauth");
+ run("$pts membership $username -cell $cellname -noauth");
+ 
+ #
+ # Create the root afs volume.
+ #
+ print "debug: Creating root.afs volume...\n" if $debug;
+ run("$vos create $server $partition root.afs -cell $cellname -noauth");
+     unwind($os->command('remove', "$partition/AFSIDat "));
+     unwind($os->command('remove', "$partition/V*.vol"));
+     unwind($os->command('remove', "$partition/Lock"));
+     unwind("$vos remove $server $partition root.afs -cell $cellname -noauth");
+ 
+ # The initial configuration is done, turn on authorization checking.
+ #run("$bos setauth $server -authrequired on -cell $cellname -localauth");
+ #    unwind("$bos setauth $server -authrequired off -cell $cellname -localauth");
+ 
+ 
+ #
+ # Bring up the AFS client.
+ #
+ print "debug: Starting the OpenAFS client...\n" if $debug;
+ run($os->command('client-start'));
+     unwind($os->command('client-stop'));
+ 
+ #
+ # Run as the administrator.
+ #
+ $auth->authorize($admin);
+ 
+ #
+ # Create the root cell volumes, read-only and read-write.
+ #
+ print "debug: Creating the root volumes...\n" if $debug;
+ run("$fs setacl /afs system:anyuser rl");
+ 
+ run("$vos create $server $partition root.cell -localauth");
+     unwind("$vos remove $server $partition root.cell -localauth");
+ 
+ run("$fs mkmount /afs/$cellname root.cell -cell $cellname -fast");
+     unwind("$fs rmmount /afs/$cellname");
+ 
+ run("$fs setacl /afs/$cellname system:anyuser rl");
+ run("$fs mkmount /afs/.$cellname root.cell -cell $cellname -rw");
+     unwind("$fs rmmount /afs/.$cellname");
+ 
+ #run("$fs mkmount /afs/.root.afs root.afs -rw");
+ #    unwind("$fs rmmmount /afs/.root.afs");
+ 
+ #
+ # Create some volumes in our new cell.
+ #
+ print "debug: Creating the test volumes...\n" if $debug;
+ mkvol("user", "/afs/$cellname/user", $server, $partition);
+ mkvol("service", "/afs/$cellname/service", $server, $partition);
+ mkvol("unrep", "/afs/$cellname/unreplicated", $server, $partition);
+ 
+ # make a read-only volume
+ mkvol("rep", "/afs/$cellname/.replicated", $server, $partition);
+ run("$fs mkmount /afs/$cellname/replicated rep.readonly");
+ run("$vos addsite $server $partition rep -localauth");
+ run("$vos release rep -localauth");
+     unwind("$vos remove $server $partition rep.readonly -localauth");
+ 
+ 
+ #
+ # Create readonly volumes of our roots.
+ #
+ run("$vos addsite $server $partition root.afs -localauth");
+ run("$vos addsite $server $partition root.cell -localauth");
+ run("$vos release root.afs -localauth");
+ run("$vos release root.cell -localauth");
+     unwind("$vos remove $server $partition root.cell.readonly -localauth");
+     unwind("$vos remove $server $partition root.afs.readonly -localauth");
+ 
+ # done.
+ @unwinds = (); # clear unwinds
  
  END {
!   if (!$dont_unwind && scalar @unwinds) {
!     print "\ninfo: Error encountered, unwinding...\n"; 
!     while (@unwinds) {
!       eval { 
!         run(pop(@unwinds));
!       };
!       if ($@) {
!         print "warn: Unwind command failed.\n$@\n"; 
!       }
!     }
    }
+ }
Index: openafs/src/tests/afs-rmcell.pl
diff -c /dev/null openafs/src/tests/afs-rmcell.pl:1.1.2.2
*** /dev/null	Mon Feb 11 10:58:25 2008
--- openafs/src/tests/afs-rmcell.pl	Thu Jan 24 18:50:37 2008
***************
*** 0 ****
--- 1,101 ----
+ #!/usr/bin/env perl
+ #
+ # Remove cell files from this machine. Use with caution!
+ #
+ 
+ use warnings;
+ use strict;
+ use OpenAFS::Dirpath;
+ use OpenAFS::OS;
+ use OpenAFS::ConfigUtils;
+ use Term::ReadLine;
+ use Getopt::Long;
+ use Pod::Usage;
+ 
+ =head1  NAME
+ 
+    afs-rmcell - Delete AFS cell files from this machine.
+ 
+ =head1 SYNOPSIS
+ 
+ B<afs-rmcell> [B<--batch>] [B<--partition-id>=letter] [B<--help>] [B<--debug>]
+ 
+ =head1 DESCRIPTION
+ 
+ This script destroys the AFS database and volume files on this machine.
+ Use with caution!
+ 
+ =cut
+ 
+ my $debug = 0;
+ my $help = 0;
+ my $batch = 0;
+ my $partition_id = 'a';
+ my $path = $OpenAFS::Dirpath::openafsdirpath;
+ my $ostype = $path->{'ostype'};
+ 
+ #-----------------------------------------------------------------------------------
+ # main script
+ 
+ GetOptions(
+   "debug" => \$debug,
+   "help" => \$help,
+   "batch" => \$batch,
+   "partition-id=s" => \$partition_id,
+   "ostype=s" => \$ostype,
+ );
+ 
+ $OpenAFS::ConfigUtils::debug = $debug;
+ 
+ if ($help) {
+   pod2usage(1);
+   exit 0;
+ }
+ 
+ if ($> != 0) {
+   die "error: This script should run as root.\n";
+ }
+ 
+ # To be on the safe side, we do no accept the full partition name, just the letter id.
+ # You'll have to manually delete volume files for unconventional partition names.
+ unless ($partition_id=~/^(([a-z])|([a-h][a-z])|([i][a-v]))$/) {
+   die "error: Invalid partition id specified.\n".
+       "info: Please specify a valid partition abbreviation, for example --partition-id='a' for /vicepa\n";
+ }
+ 
+ unless ($batch) {
+   my $rl = new Term::ReadLine('afs-rmcell');
+   print "\n*** WARNING!! WARNING!! WARNING!! *** \n";
+   print "You are about to permanently DESTROY the OpenAFS configuration, database, and volumes on this machine!\n\n";
+   my $answer = $rl->readline("Do you really want to destroy the AFS cell data? (y/n) [n] ");
+   unless ($answer=~/^y/i ) {
+     print "info: Aborted.\n";
+     exit 0;
+   }
+ }
+ 
+ my $os = OpenAFS::OS::create('ostype'=>$ostype, 'debug'=>$debug);
+ 
+ # make sure the client init script has the correct paths.
+ $os->configure_client(); 
+ 
+ run($os->command('client-stop'));
+ run($os->command('fileserver-stop'));
+ run($os->command('client-forcestop'));
+ 
+ $os->remove("$path->{'afsdbdir'}/prdb.DB0");
+ $os->remove("$path->{'afsdbdir'}/prdb.DBSYS1");
+ $os->remove("$path->{'afsdbdir'}/vldb.DB0");
+ $os->remove("$path->{'afsdbdir'}/vldb.DBSYS1");
+ $os->remove("$path->{'afsbosconfigdir'}/BosConfig");
+ $os->remove("$path->{'afslogsdir'}/*");
+ $os->remove("$path->{'afslocaldir'}/*");
+ $os->remove("$path->{'afsconfdir'}/UserList");
+ $os->remove("$path->{'afsconfdir'}/ThisCell");
+ $os->remove("$path->{'afsconfdir'}/CellServDB");
+ $os->remove("$path->{'afsconfdir'}/KeyFile");
+ $os->remove("$path->{'afsconfdir'}/krb.conf");
+ $os->remove("/vicep$partition_id/AFSIDat ");
+ $os->remove("/vicep$partition_id/V*.vol");
+ $os->remove("/vicep$partition_id/Lock");
+ 
Index: openafs/src/tests/baduniq.pl
diff -c openafs/src/tests/baduniq.pl:1.1 openafs/src/tests/baduniq.pl:1.1.22.1
*** openafs/src/tests/baduniq.pl:1.1	Thu Jan 17 05:47:45 2002
--- openafs/src/tests/baduniq.pl	Mon Jan 21 14:42:13 2008
***************
*** 11,17 ****
  $host = `hostname`;
  &AFS_Init();
  
! &AFS_vos_restore("badvol","localhost","a","/usr/tmp/t.uniq-bad","100","full",);
  &AFS_bos_salvage("localhost","a","badvol",,,,,,);
  &AFS_fs_mkmount("badvol", "badvol",,,);
  if ( -f "badvol/test" ) {
--- 11,17 ----
  $host = `hostname`;
  &AFS_Init();
  
! &AFS_vos_restore("badvol","localhost","a","/tmp/t.uniq-bad","100","full",);
  &AFS_bos_salvage("localhost","a","badvol",,,,,,);
  &AFS_fs_mkmount("badvol", "badvol",,,);
  if ( -f "badvol/test" ) {
Index: openafs/src/tests/bosexec.pl
diff -c openafs/src/tests/bosexec.pl:1.1 openafs/src/tests/bosexec.pl:1.1.22.1
*** openafs/src/tests/bosexec.pl:1.1	Mon Jan 14 02:49:17 2002
--- openafs/src/tests/bosexec.pl	Mon Jan 21 14:42:13 2008
***************
*** 15,25 ****
  &AFS_Init();
  
  &AFS_bos_exec(localhost,"$openafsdirpath->{'afssrvbindir'}/foo.sh",);
! if (-f "/usr/tmp/garbage") {
  } else {
      exit(1);
  }
! unlink "/usr/tmp/garbage";
  exit(0);
  
  
--- 15,25 ----
  &AFS_Init();
  
  &AFS_bos_exec(localhost,"$openafsdirpath->{'afssrvbindir'}/foo.sh",);
! if (-f "/tmp/garbage") {
  } else {
      exit(1);
  }
! unlink "/tmp/garbage";
  exit(0);
  
  
Index: openafs/src/tests/bosinstall.pl
diff -c openafs/src/tests/bosinstall.pl:1.1 openafs/src/tests/bosinstall.pl:1.1.22.1
*** openafs/src/tests/bosinstall.pl:1.1	Mon Jan 14 02:49:17 2002
--- openafs/src/tests/bosinstall.pl	Mon Jan 21 14:42:13 2008
***************
*** 13,19 ****
  
  open(FOO, ">foo.sh"); 
  print FOO "#!/bin/sh\n";
! print FOO "touch /usr/tmp/garbage\n";
  print FOO "exit 0\n";
  close FOO;
  chmod 0755, "foo.sh";
--- 13,19 ----
  
  open(FOO, ">foo.sh"); 
  print FOO "#!/bin/sh\n";
! print FOO "touch /tmp/garbage\n";
  print FOO "exit 0\n";
  close FOO;
  chmod 0755, "foo.sh";
Index: openafs/src/tests/extcopyin
diff -c openafs/src/tests/extcopyin:1.1 openafs/src/tests/extcopyin:1.1.22.1
*** openafs/src/tests/extcopyin:1.1	Mon Jan 14 02:49:17 2002
--- openafs/src/tests/extcopyin	Mon Jan 21 14:42:13 2008
***************
*** 1,11 ****
  #!/bin/sh
  FS=${FS:-${objdir}/../appl/fs/fs}
  ${FS} sa . system:anyuser all || exit 1
! ${objdir}/write-rand /usr/tmp/$$ 262144 || exit 1
! ${objdir}/afscp -i -b 56k /usr/tmp/$$ `pwd`/$$ || exit 1
! diff /usr/tmp/$$ `pwd`/$$ || exit 1
! ${objdir}/afscp -i -b 32k /usr/tmp/$$ `pwd`/$$ || exit 1
! diff /usr/tmp/$$ `pwd`/$$ || exit 1
  exit 0
  
  
--- 1,11 ----
  #!/bin/sh
  FS=${FS:-${objdir}/../appl/fs/fs}
  ${FS} sa . system:anyuser all || exit 1
! ${objdir}/write-rand /tmp/$$ 262144 || exit 1
! ${objdir}/afscp -i -b 56k /tmp/$$ `pwd`/$$ || exit 1
! diff /tmp/$$ `pwd`/$$ || exit 1
! ${objdir}/afscp -i -b 32k /tmp/$$ `pwd`/$$ || exit 1
! diff /tmp/$$ `pwd`/$$ || exit 1
  exit 0
  
  
Index: openafs/src/tests/extcopyout
diff -c openafs/src/tests/extcopyout:1.1 openafs/src/tests/extcopyout:1.1.22.1
*** openafs/src/tests/extcopyout:1.1	Mon Jan 14 02:49:17 2002
--- openafs/src/tests/extcopyout	Mon Jan 21 14:42:13 2008
***************
*** 2,11 ****
  FS=${FS:-${objdir}/../appl/fs/fs}
  ${FS} sa . system:anyuser all || exit 1
  ${objdir}/write-rand $$ 262144 || exit 1
! ${objdir}/afscp -o -b 56k `pwd`/$$ /usr/tmp/$$ || exit 1
! diff /usr/tmp/$$ `pwd`/$$ || exit 1
! ${objdir}/afscp -o -b 32k `pwd`/$$ /usr/tmp/$$ || exit 1
! diff /usr/tmp/$$ `pwd`/$$ || exit 1
  exit 0
  
  
--- 2,11 ----
  FS=${FS:-${objdir}/../appl/fs/fs}
  ${FS} sa . system:anyuser all || exit 1
  ${objdir}/write-rand $$ 262144 || exit 1
! ${objdir}/afscp -o -b 56k `pwd`/$$ /tmp/$$ || exit 1
! diff /tmp/$$ `pwd`/$$ || exit 1
! ${objdir}/afscp -o -b 32k `pwd`/$$ /tmp/$$ || exit 1
! diff /tmp/$$ `pwd`/$$ || exit 1
  exit 0
  
  
Index: openafs/src/tests/hardlink5
diff -c openafs/src/tests/hardlink5:1.1 openafs/src/tests/hardlink5:1.1.22.1
*** openafs/src/tests/hardlink5:1.1	Mon Jan 14 02:49:17 2002
--- openafs/src/tests/hardlink5	Mon Jan 21 14:42:13 2008
***************
*** 1,11 ****
  #!/bin/sh
! # $Id: hardlink5,v 1.1 2002/01/14 07:49:17 shadow Exp $
  
  if test "X$FAST" != "X" ; then echo "Not running $0" ;  exit 0 ; fi
  
  FS=${FS:-${objdir}/../appl/fs/fs}
  
  touch file
! ln file ../../service/file && exit 1
  rm file
  
--- 1,14 ----
  #!/bin/sh
! # $Id: hardlink5,v 1.1.22.1 2008/01/21 19:42:13 shadow Exp $
  
  if test "X$FAST" != "X" ; then echo "Not running $0" ;  exit 0 ; fi
  
  FS=${FS:-${objdir}/../appl/fs/fs}
  
+ # Should not be able to create a hardlink across volumes. In this test
+ # ../../service is mounted on the separate volume. Suppress the expected
+ # error message from the ln command which clutters the test output.
  touch file
! ln file ../../service/file 2>/dev/null && (echo "hardlink ../../service/file should not have been created"; exit 1)
  rm file
  
Index: openafs/src/tests/reauth.pl
diff -c openafs/src/tests/reauth.pl:1.2 openafs/src/tests/reauth.pl:1.2.22.1
*** openafs/src/tests/reauth.pl:1.2	Tue Jan 15 11:26:04 2002
--- openafs/src/tests/reauth.pl	Mon Jan 21 14:42:13 2008
***************
*** 1,12 ****
  #!/usr/bin/env perl
- use Term::ReadLine;
  use strict;
! use OpenAFS::ConfigUtils;
  use OpenAFS::Dirpath;
- use OpenAFS::OS;
  use OpenAFS::Auth;
  use Getopt::Long;
- use vars qw($admin $server $cellname $cachesize $part
-           $requirements_met  $shutdown_needed $csdb);
  
! &OpenAFS::Auth::authadmin();
--- 1,34 ----
  #!/usr/bin/env perl
  use strict;
! use warnings;
  use OpenAFS::Dirpath;
  use OpenAFS::Auth;
  use Getopt::Long;
  
! # options
! my $debug = 0;
! my $cellname = 'testcell';
! my $admin = 'admin';
! my $kerberos_type = 'MIT';
! my $kerberos_realm = 'TESTCELL';
! my $kerberos_keytab = "$openafsdirpath->{'afsconfdir'}/krb5.keytab";
! 
! GetOptions (
!        "debug!" => \$debug,
!        "cellname=s" => \$cellname, 
!        "admin=s" => \$admin,
!        "kerberos-type=s" => \$kerberos_type,
!        "kerberos-realm=s" => \$kerberos_realm,
!        "kerberos-keytab=s" => \$kerberos_keytab,
!        );
! 
! my $auth = OpenAFS::Auth::create(
!       'debug'=>$debug,
!       'type'=>$kerberos_type, 
!       'cell'=>$cellname,
!       'realm'=>$kerberos_realm,
!       'keytab'=>$kerberos_keytab,
!       );
! 
! # Run as the administrator.
! $auth->authorize($admin);
Index: openafs/src/tests/run-tests.in
diff -c openafs/src/tests/run-tests.in:1.5 openafs/src/tests/run-tests.in:1.5.20.1
*** openafs/src/tests/run-tests.in:1.5	Thu Feb 21 01:06:00 2002
--- openafs/src/tests/run-tests.in	Mon Jan 21 14:42:13 2008
***************
*** 1,7 ****
  #!/bin/sh
  #
! # $Id: run-tests.in,v 1.5 2002/02/21 06:06:00 shadow Exp $
  #
  srcdir=@srcdir@
  objdir=`pwd`
  SHELL=/bin/sh
--- 1,20 ----
  #!/bin/sh
  #
! # $Id: run-tests.in,v 1.5.20.1 2008/01/21 19:42:13 shadow Exp $
  #
+ 
+ # Directory paths configured during the build.
+ if test -f dirpath.conf; then
+   . dirpath.conf
+ else
+   echo "error: Missing dirpath.conf file, try make dirpath.conf"
+ fi
+ 
+ if test -f run-test.conf; then
+   . run-test.conf
+ fi  
+ 
+ 
  srcdir=@srcdir@
  objdir=`pwd`
  SHELL=/bin/sh
***************
*** 9,21 ****
  VERSION=@VERSION@
  PACKAGE=@PACKAGE@
  host=@host@
! RUNAS=nobody
! FS=@afssrvbindir@/fs
  export FS
  export SHELL
  
  AFSROOT=${AFSROOT-/afs}
  export AFSROOT
  
  BASIC_TESTS="creat1			\
  	    mkdir1			\
--- 22,43 ----
  VERSION=@VERSION@
  PACKAGE=@PACKAGE@
  host=@host@
! RUNAS=
! FS=${afssrvbindir}/fs
! CELLNAME=${CELLNAME-testcell}
  export FS
  export SHELL
  
+ 
+ PERL5LIB=${PERL5LIB-`pwd`}
  AFSROOT=${AFSROOT-/afs}
+ TESTDIR=${TESTDIR-unreplicated}
+ WORKDIR=$AFSROOT/$CELLNAME/$TESTDIR
  export AFSROOT
+ export TESTDIR
+ export WORKDIR
+ export PERL5LIB
+ 
  
  BASIC_TESTS="creat1			\
  	    mkdir1			\
***************
*** 55,62 ****
  	    aclcopy.pl"
  
  EXEC_TESTS="exec			\
! 	    hello-world			\
! 	    build-openafs"
  
  MMAP_TESTS="append-over-page		\
  	    mmap-shared-write		\
--- 77,83 ----
  	    aclcopy.pl"
  
  EXEC_TESTS="exec			\
! 	    hello-world"
  
  MMAP_TESTS="append-over-page		\
  	    mmap-shared-write		\
***************
*** 184,190 ****
  	    aclcopy.pl			\
  	    exec			\
  	    hello-world			\
- 	    build-openafs		\
  	    append-over-page		\
  	    mmap-shared-write		\
  	    mmap-vs-read2		\
--- 205,210 ----
***************
*** 285,291 ****
    -large) LARGE=yes;;
    -j) PARALLELL="&";;
    -verbose) VERBOSE=yes;;
!   -user) RUNAS=$1; shift;;
    -x) SHELLVERBOSE="-x";;
    -p) PRINT_CACHESIZE="yes";;
    -basic) TESTS="$BASIC_TESTS";TEST_MODE="basic";;
--- 305,311 ----
    -large) LARGE=yes;;
    -j) PARALLELL="&";;
    -verbose) VERBOSE=yes;;
!   -user) RUNAS=$2; shift;;
    -x) SHELLVERBOSE="-x";;
    -p) PRINT_CACHESIZE="yes";;
    -basic) TESTS="$BASIC_TESTS";TEST_MODE="basic";;
***************
*** 304,310 ****
    -help|--help) echo $usage; 
  	echo "tests available: $linebreak"; for a in "$ALL_TESTS"; do echo $a ; done;
  	exit 0;;
!   -version|--version) echo "$0 $Id: run-tests.in,v 1.5 2002/02/21 06:06:00 shadow Exp $"; exit 0;;
    -*) echo "$0: Bad option $1"; echo $usage; exit 1;;
    *) break;;
    esac
--- 324,330 ----
    -help|--help) echo $usage; 
  	echo "tests available: $linebreak"; for a in "$ALL_TESTS"; do echo $a ; done;
  	exit 0;;
!   -version|--version) echo "$0 $Id: run-tests.in,v 1.5.20.1 2008/01/21 19:42:13 shadow Exp $"; exit 0;;
    -*) echo "$0: Bad option $1"; echo $usage; exit 1;;
    *) break;;
    esac
***************
*** 386,392 ****
    if test "$a" = "setgroups" ; then
       b="${objdir}/asu root $b"
    else
!      b="${objdir}/asu $RUNAS $b"
    fi
    tmpdir="`hostname`-$a-`date +%Y-%m-%d-%H-%M-%S`-$$"
    cd $WORKDIR && mkdir $tmpdir && (cd $tmpdir && $b ${PARALLELL})
--- 406,414 ----
    if test "$a" = "setgroups" ; then
       b="${objdir}/asu root $b"
    else
!      if test "X$RUNAS" != "X" ; then
!         b="${objdir}/asu $RUNAS $b"
! 	 fi 
    fi
    tmpdir="`hostname`-$a-`date +%Y-%m-%d-%H-%M-%S`-$$"
    cd $WORKDIR && mkdir $tmpdir && (cd $tmpdir && $b ${PARALLELL})
***************
*** 412,419 ****
--- 434,443 ----
  if test "$FAILEDTESTS"; then
    echo "-----------------------------------------------------------"
    echo "Failed test(s) were: $FAILEDTESTS"
+   exitval=1
  else
    echo "All test(s) were succesful!"
+   exitval=0
  fi
  
  exit $exitval
Index: openafs/src/tests/vosdump.pl
diff -c openafs/src/tests/vosdump.pl:1.1 openafs/src/tests/vosdump.pl:1.1.22.1
*** openafs/src/tests/vosdump.pl:1.1	Mon Jan 14 02:49:18 2002
--- openafs/src/tests/vosdump.pl	Mon Jan 21 14:42:13 2008
***************
*** 11,17 ****
  $host = `hostname`;
  &AFS_Init();
  
! &AFS_vos_dump("service",0,"/usr/tmp/service.dump",);
  
  exit(0);
  
--- 11,17 ----
  $host = `hostname`;
  &AFS_Init();
  
! &AFS_vos_dump("service",0,"/tmp/service.dump",);
  
  exit(0);
  
Index: openafs/src/tests/vosrestore.pl
diff -c openafs/src/tests/vosrestore.pl:1.1 openafs/src/tests/vosrestore.pl:1.1.22.1
*** openafs/src/tests/vosrestore.pl:1.1	Mon Jan 14 02:49:18 2002
--- openafs/src/tests/vosrestore.pl	Mon Jan 21 14:42:13 2008
***************
*** 11,17 ****
  $host = `hostname`;
  &AFS_Init();
  
! &AFS_vos_restore("service2","localhost","a","/usr/tmp/service.dump",,"full",);
  
  exit(0);
  
--- 11,17 ----
  $host = `hostname`;
  &AFS_Init();
  
! &AFS_vos_restore("service2","localhost","a","/tmp/service.dump",,"full",);
  
  exit(0);
  
Index: openafs/src/tests/OpenAFS/Auth.pm
diff -c /dev/null openafs/src/tests/OpenAFS/Auth.pm:1.1.2.2
*** /dev/null	Mon Feb 11 10:58:25 2008
--- openafs/src/tests/OpenAFS/Auth.pm	Thu Jan 24 18:50:38 2008
***************
*** 0 ****
--- 1,343 ----
+ # This is -*- perl -*-
+ 
+ package OpenAFS::Auth;
+ use strict;
+ use warnings;
+ use OpenAFS::Dirpath;
+ use OpenAFS::ConfigUtils;
+ 
+ my $path = $OpenAFS::Dirpath::openafsdirpath;
+ 
+ #
+ # Create an auth type for the specified Kerberos implementation.
+ #
+ # parameters:
+ #   type   -- Kerberos implementation: mit, heimdal, kaserver
+ #   keytab -- path and name of the keytab file for mit and heimdal
+ #   cell   -- cell name. if not specified, attempts to find the 
+ #               cell name in the ThisCell configuration file.
+ #   realm  -- realm name. if not specified, assume the realm name
+ #               is the same as the cell name, in uppercase.
+ #
+ # example:
+ #  my $auth = OpenAFS::Auth::create(
+ #               'type'=>'mit', 
+ #               'keytab'=>'/path/to/file/krb5.keytab');
+ #
+ #  $auth->authorize('admin');
+ #
+ sub create {
+   my $self = {
+      # default values
+      'type' => 'MIT',
+      'keytab' =>  "$path->{'afsconfdir'}/krb5.keytab",
+      'cell' => '',
+      'realm' => '', 
+      'debug' => '0',
+      # user specified values
+      @_,
+   };
+ 
+   # check for supported kerberos type.
+   my $type = $self->{'type'};
+   $self->{'type'} = _check_kerberos_type($type) or 
+     die "Unsupported kerberos type: $type\n";
+ 
+   # create the sub-class for the kerberos type.
+   my $class = "OpenAFS::Auth::$self->{'type'}";
+   $self = bless($self, $class);
+ 
+   # attempt get default values.
+   unless ($self->{'cell'}) {
+     eval {
+       $self->{'cell'} = $self->_lookup_cell_name();
+     }
+   }
+   unless ($self->{'realm'}) {
+     if ($self->{'cell'}) {
+       my $cell = $self->{'cell'};
+       ($self->{'realm'} = $cell) =~ tr[a-z][A-Z];
+     }
+   }
+   unless ($self->{'keytab'}) {
+     $self->{'keytab'} = "$path->{'afsconfdir'}/krb5.keytab";
+   }
+ 
+   # kerberos type specific sanity checks.
+   $self->_sanity_check();
+ 
+   if ($self->debug) {
+     print "debug: Auth::create()\n";
+     foreach my $k (sort keys(%$self)) {
+       print "debug:  $k => $self->{$k}\n";
+     }
+   }
+   return $self;
+ }
+ 
+ #
+ # Check for supported kerberos type, and allow for case insensitivity.
+ #
+ sub _check_kerberos_type {
+   my $type = shift;
+   foreach my $supported ('MIT', 'Heimdal', 'Kaserver') {
+      if ($type =~ /^$supported$/i) {
+         return $supported;
+      }
+   }
+   return undef;
+ }
+ 
+ #
+ # Returns the cell name from the ThisCell configuration file.
+ #
+ sub _lookup_cell_name {
+   my $self = shift;
+   my $cell;
+   open(CELL, "$path->{'afsconfdir'}/ThisCell") 
+     or die "error: Cannot open $path->{'afsconfdir'}/ThisCell: $!\n";
+   $cell = <CELL>;
+   chomp $cell;
+   close CELL;
+   return $cell;
+ }
+ 
+ #
+ # Placeholder for make_keyfile. Sub-classes should override.
+ #
+ sub make_keyfile {
+   my $self = shift;
+   return;
+ }
+ 
+ # 
+ # Make the krb.conf file if the realm name is different
+ # than the cell name. The syntax is something like,
+ #
+ #   UMICH.EDU
+ #   UMICH.EDU fear.ifs.umich.edu admin server
+ #   UMICH.EDU surprise.ifs.umich.edu
+ #   UMICH.EDU ruthless.ifs.umich.edu
+ #
+ sub make_krb_config {
+   my $self = shift;
+   my $cell = $self->{'cell'};
+   my $realm = $self->{'realm'};
+ 
+   if ($realm && $realm ne $cell) {
+     unless ( -d $path->{'afsconfdir'} ) {
+       die "error: OpenAFS configuration directory '$path->{'afsconfdir'}' is missing.\n";
+     }
+     unless ( -w $path->{'afsconfdir'} ) {
+       die "error: Write access to the configuration directory '$path->{'afsconfdir'}' is required.\n";
+     }
+     print "debug: Making $path->{'afsconfdir'}/krb.conf file for realm $realm\n" if $self->{'debug'};
+     open(KRB, "> $path->{'afsconfdir'}/krb.conf") or die "error: Failed to open $path->{'afsconfdir'}/krb.conf, $!\n";
+     print KRB "$realm\n";
+     close KRB;
+   } 
+ }
+ 
+ #
+ # Enable/disable debug messages.
+ #
+ sub debug {
+   my $self = shift;
+   if (@_) {
+     $self->{'debug'} = shift;
+   }
+   return $self->{'debug'};
+ }
+ 
+ 
+ #------------------------------------------------------------------------------------
+ # MIT Kerberos authorization commands.
+ #
+ package OpenAFS::Auth::MIT;
+ use strict;
+ use OpenAFS::Dirpath;
+ use OpenAFS::ConfigUtils;
+ our @ISA = ("OpenAFS::Auth");
+ 
+ #
+ # Sanity checks before we get started.
+ #
+ sub _sanity_check {
+   my $self = shift;
+   unless (defined $path->{'afssrvbindir'}) {
+     die "error: \$path->{'afssrvbindir'} is not defined.\n";
+   }
+   unless (-f "$path->{'afssrvbindir'}/aklog") {
+     die "error: $path->{'afssrvbindir'}/aklog not found.\n";
+   }
+   unless (-x "$path->{'afssrvbindir'}/aklog") {
+     die "error: $path->{'afssrvbindir'}/aklog not executable.\n";
+   }
+   unless ($self->{'realm'}) {
+     die "error: Missing realm parameter Auth::create().\n";
+   }
+   unless ($self->{'keytab'}) {
+     die "error: Missing keytab parameter Auth::create().\n";
+   }
+   unless ( -f $self->{'keytab'} ) {
+     die "error: Kerberos keytab file not found: $self->{'keytab'}\n";
+   }
+   unless ( -f $self->{'keytab'} ) {
+     die "error: Keytab file not found: $self->{'keytab'}\n";
+   }
+ }
+ 
+ #
+ # Create the KeyFile from the Kerberos keytab file. The keytab file
+ # should be created using the Kerberos kadmin command (or with the kadmin.local command
+ # as root on the KDC). See the OpenAFS asetkey man page for details.
+ # 
+ sub make_keyfile {
+   my $self = shift;
+ 
+   # asetkey annoyance. The current asetkey implementation requires the ThisCell and CellServDB files
+   # to be present but they really are not needed to create the KeyFile. This check is done here
+   # rather than in the _sanity_checks() because the ThisCell/CellServerDB are created later in 
+   # the process of creating the new cell.
+   unless ( -f "$path->{'afsconfdir'}/ThisCell" ) {
+     die "error: OpenAFS configuration file is required, $path->{'afsconfdir'}/ThisCell\n";
+   }
+   unless ( -f "$path->{'afsconfdir'}/CellServDB" ) {
+     die "error: OpenAFS configuration file is required, $path->{'afsconfdir'}/CellServDB\n";
+   }
+ 
+   unless ( -f "$path->{'afssrvbindir'}/asetkey" ) {
+     die "error: $path->{'afssrvbindir'}/asetkey is missing.\nWas OpenAFS built with Kerberos support?\n";
+   }
+   unless ( -x "$path->{'afssrvbindir'}/asetkey" ) {
+     die "error: Do not have execute permissions on $path->{'afssrvbindir'}/asetkey\n";
+   }
+   unless ( -d $path->{'afsconfdir'} ) {
+     die "error: OpenAFS configuration directory '$path->{'afsconfdir'}' is missing.\n";
+   }
+   unless ( -w $path->{'afsconfdir'} ) {
+     die "error: Write access to the OpenAFS configuration directory '$path->{'afsconfdir'}' is required.\n";
+   }
+ 
+ 
+   # Run klist to get the kvno of the afs key. Search for afs/cellname@REALM
+   # then afs@REALM. klist must be in the path.
+   my %keys = ();
+   my $kvno;
+   my $principal;
+   my $afs_kvno;
+   my $afs_principal;
+   if ($self->debug) {
+     print "debug: reading $self->{'keytab'} to find afs kvno\n";
+   }
+   open(KLIST, "klist -k $self->{'keytab'} |") or die "make_keyfile: Failed to run klist.";
+   while (<KLIST>) {
+     chomp;
+     next if /^Keytab/;  # skip headers
+     next if /^KVNO/;
+     next if /^----/;
+     ($kvno, $principal) = split;
+     if ($self->debug) {
+       print "debug:  kvno=$kvno principal=$principal\n";
+     }
+     $keys{$principal} = $kvno;
+   }
+   close KLIST;
+   my $cell = $self->{'cell'};
+   my $realm = $self->{'realm'};
+   foreach my $principal ("afs/$cell\@$realm", "afs\@$realm") {
+     if ($self->debug) {
+       print "debug: searching for $principal\n";
+     }
+     if (defined $keys{$principal}) {
+       $afs_principal = $principal;
+       $afs_kvno = $keys{$afs_principal};
+       if ($self->debug) {
+          print "debug: found principal=$afs_principal kvno=$afs_kvno\n";
+       }
+       last;
+     }
+   }
+   unless ($afs_kvno) {
+     die "error: Could not find an afs key matching 'afs/$cell\@$realm' or ".
+       "'afs/$cell' in keytab $self->{'keytab'}\n";
+   }
+ 
+   # Run asetkey on the keytab to create the KeyFile. asetkey must be in the PATH.
+   run("$path->{'afssrvbindir'}/asetkey add $afs_kvno $self->{'keytab'} $afs_principal");
+ }
+ 
+ #
+ # Get kerberos ticket and AFS token for the user.
+ #
+ sub authorize {
+   my $self = shift;
+   my $principal = shift || 'admin';
+   my $opt_aklog = "";
+   $opt_aklog .= " -d" if $self->debug;
+ 
+   run("kinit -k -t $self->{'keytab'} $principal");
+   run("$path->{'afssrvbindir'}/aklog $opt_aklog");
+   run("$path->{'afssrvbindir'}/tokens");
+ }
+ 
+ 
+ #------------------------------------------------------------------------------------
+ package OpenAFS::Auth::Heimdal;
+ use strict;
+ use OpenAFS::Dirpath;
+ use OpenAFS::ConfigUtils;
+ our @ISA = ("OpenAFS::Auth");
+ 
+ #
+ # Various checks during initialization.
+ #
+ sub _sanity_check {
+   my $self = shift;
+   unless ($self->{'realm'}) {
+     die "Missing realm parameter Auth::create().\n";
+   }
+   unless ($self->{'keytab'}) {
+     die "Missing keytab parameter Auth::create().\n";
+   }
+   unless ( -f $self->{'keytab'} ) {
+     die "keytab file not found: $self->{'keytab'}\n";
+   }
+ }
+ 
+ #
+ # Get kerberos ticket and AFS token for the user.
+ #
+ sub authorize {
+   my $self = shift;
+   my $principal = shift || 'admin';  
+   run("kinit -k -t $self->{'keytab'} $principal\@$self->{'realm'} && afslog");
+ }
+ 
+ #------------------------------------------------------------------------------------
+ package OpenAFS::Auth::Kaserver;
+ use strict;
+ use OpenAFS::Dirpath;
+ use OpenAFS::ConfigUtils;
+ our @ISA = ("OpenAFS::Auth");
+ 
+ #
+ # Various checks during initialization.
+ #
+ sub _sanity_check {
+   my $self = shift;
+   unless ($self->{'realm'}) {
+     die "Missing realm parameter Auth::create().\n";
+   }
+ }
+ 
+ #
+ # Get kerberos ticket and AFS token for the user.
+ #
+ sub authorize {
+   my $self = shift;
+   my $principal = shift || 'admin';
+   run("echo \"Proceeding w/o authentication\"|klog -pipe ${principal}\@$self->{'realm'}");
+ }
+ 
+ 1;
Index: openafs/src/tests/OpenAFS/ConfigUtils.pm
diff -c openafs/src/tests/OpenAFS/ConfigUtils.pm:1.1 openafs/src/tests/OpenAFS/ConfigUtils.pm:1.1.22.1
*** openafs/src/tests/OpenAFS/ConfigUtils.pm:1.1	Tue Jan 15 14:22:11 2002
--- openafs/src/tests/OpenAFS/ConfigUtils.pm	Mon Jan 21 14:42:15 2008
***************
*** 3,26 ****
  package OpenAFS::ConfigUtils;
  
  use strict;
! use vars qw( @ISA @EXPORT @unwinds);
  @ISA = qw(Exporter);
  require Exporter;
  @EXPORT = qw(@unwinds run unwind);
  
! sub run ($) {
!   print join(' ', @_);
!   print "\n";
!   system (@_)  == 0
!     or die "Failed: $?\n";
  }
  
  # This subroutine takes a command to run in case of failure.  After
  # each succesful step, this routine should be run with a command to
  # undo the successful step.
! 
! 	 sub unwind($) {
! 	   push @unwinds, $_[0];
! 	 }
  
  1;
--- 3,42 ----
  package OpenAFS::ConfigUtils;
  
  use strict;
! use vars qw( @ISA @EXPORT @unwinds $debug);
  @ISA = qw(Exporter);
  require Exporter;
  @EXPORT = qw(@unwinds run unwind);
  
! $debug = 0;
! 
! #--------------------------------------------------------------------
! # run(cmd) - run a command. Takes a command to be executed or 
! #            a perl code reference to be eval'd.
! sub run($) {
!   my $cmd = shift;
!   if (ref($cmd) eq 'CODE') {
!     eval { &$cmd };
! 	if ($@) {
!       die "ERROR: $@\n";
! 	}
!   }
!   else {
!     if ($debug) {
!       print "debug: $cmd\n";
!     }
!     my $rc = system($cmd);
!     unless ($rc==0) {
!       die "ERROR: Command failed: $cmd\nerror code=$?\n";
!     }
!   }
  }
  
  # This subroutine takes a command to run in case of failure.  After
  # each succesful step, this routine should be run with a command to
  # undo the successful step.
! sub unwind($) {
!    push @unwinds, $_[0];
! }
  
  1;
Index: openafs/src/tests/OpenAFS/OS.pm
diff -c /dev/null openafs/src/tests/OpenAFS/OS.pm:1.1.2.2
*** /dev/null	Mon Feb 11 10:58:25 2008
--- openafs/src/tests/OpenAFS/OS.pm	Thu Jan 24 18:50:38 2008
***************
*** 0 ****
--- 1,312 ----
+ # This is -*- perl -*-
+ 
+ package OpenAFS::OS;
+ use warnings;
+ use strict;
+ use OpenAFS::Dirpath;
+ use OpenAFS::ConfigUtils;
+ 
+ my $path = $OpenAFS::Dirpath::openafsdirpath;
+ 
+ #
+ # Create the named system object for OS specific init scripts 
+ # and commands.
+ #
+ sub create {
+   my $self = {
+     'debug'=>0,
+     'ostype'=>$path->{'ostype'},
+     @_,
+   };
+ 
+   my $class = _get_class($self->{'ostype'});
+   $self = bless($self, $class);
+   $self->{'commands'} = $self->get_commands();
+ 
+   # Put the paths to the cache and afsd into the path
+   # table. Assume legacy paths if the the viceetcdir is set to
+   # the Transarc path.
+   if ($path->{'viceetcdir'} eq '/usr/vice/etc') {
+     # set in the makefile dest targets
+     $path->{'cachedir'} = "/usr/vice"     unless $path->{'cachedir'};  
+     $path->{'afsddir'}  = "/usr/vice/etc" unless $path->{'afsddir'};
+   }
+   else {
+     # set in the makefile install targets
+     $path->{'cachedir'} = "$path->{'localstatedir'}/openafs" unless $path->{'cachedir'};
+     $path->{'afsddir'}  = "$path->{'afssrvsbindir'}"         unless $path->{'afsddir'};
+   }  
+ 
+   return $self;
+ }
+ 
+ # 
+ # _get_class(name) - Return the package name for the ostype
+ #
+ sub _get_class {
+   my $type = shift;
+   if ($type=~/linux/i) {
+     return "OpenAFS::OS::Linux";
+   }
+   die "error: Unknow system type. Valid types are: linux\n";
+ }
+ 
+ #
+ # command(name [,params...]) - Return the command string or code reference.
+ #
+ sub command {
+   my $self = shift;
+   my $name = shift;
+   my $cmd = $self->{'commands'}->{$name};
+   unless (defined $cmd) {
+     die "error: Unsupported command name $name for OS type $self->{'ostype'}\n";
+   }
+   # add parameters if present.
+   if (scalar @_) {
+     if (ref($cmd) eq 'CODE') {
+       $cmd = sub { &$cmd(@_) };
+     }
+     else {
+       $cmd = join(' ', ($cmd, @_));
+     }
+   }
+   return $cmd;
+ }
+ 
+ #--------------------------------------------------------------
+ # Common unix style os commands.
+ package OpenAFS::OS::Unix;
+ use warnings;
+ use strict;
+ use OpenAFS::ConfigUtils;
+ use OpenAFS::Dirpath;
+ our @ISA = qw(OpenAFS::OS);
+ 
+ #
+ # remove(target) - recursive remove
+ #
+ sub remove {
+   my $self = shift;
+   my $target = shift;
+   run("rm -rf $target");
+ }
+ 
+ #
+ # Start the server.
+ #
+ sub fileserver_start {
+   my $self = shift;
+   run("$path->{'afssrvsbindir'}/bosserver");
+ }
+ 
+ #
+ # Stop the server.
+ #
+ sub fileserver_stop {
+   my $self = shift;
+   my @bosserver_pids = $self->find_pids("bosserver");
+   if (scalar @bosserver_pids) {
+     # bosserver is running, try to shutdown with bos.
+     eval {
+       run("$path->{'afssrvbindir'}/bos shutdown localhost -localauth");
+     };
+     if ($@) {
+       warn "WARNING: Shutdown command failed.\n";
+     }
+     # Now shutdown bosserver process itself. Kill all of them
+     # in case there are remants.
+     foreach my $pid (@bosserver_pids) {
+       eval { run("kill $pid") };
+     }
+   }
+ }
+ 
+ #
+ # Restart the server.
+ #
+ sub fileserver_restart {
+   my $self = shift;
+   fileserver_stop();
+   fileserver_start();
+ }
+ 
+ #
+ # Return a list of pids. 
+ # 
+ sub find_pids {
+   my $self = shift;
+   my $process = shift;
+   my @pids = ();
+   my $ps = "ps -e -o pid,cmd";
+   if ($self->{'debug'}) {
+     print("debug: searching for process $process\n");
+   }
+   open(PS, "$ps |") or die "Cannot run command: $ps: $!";
+   while (<PS>) {
+     chomp;
+     my ($pid,$cmd) = split;
+     if ($cmd=~/$process/) {
+       if ($self->{'debug'}) {
+         print("debug:  found $pid $cmd\n");
+       }
+       push(@pids, $pid);
+     }
+   }
+   close PS;
+   return @pids;
+ }
+ 
+ #--------------------------------------------------------------
+ package OpenAFS::OS::Linux;
+ use warnings;
+ use strict;
+ use OpenAFS::ConfigUtils;
+ use OpenAFS::Dirpath;
+ our @ISA = qw(OpenAFS::OS::Unix);
+ 
+ #
+ # OS-specific commands. Defer to init scripts where possible.
+ #
+ sub get_commands {
+   my $self = shift;
+   my $syscnf = "$path->{'initdir'}/testclient.conf";
+ 
+   my $commands = {
+     'client-start'         => "SYSCNF=$syscnf $path->{'initdir'}/afs.rc start",
+     'client-stop'          => "SYSCNF=$syscnf $path->{'initdir'}/afs.rc stop",
+     'client-restart'       => "SYSCNF=$syscnf $path->{'initdir'}/afs.rc restart",
+     'client-forcestop'     => sub { $self->client_forcestop() },
+     'fileserver-start'     => sub { $self->fileserver_start() },
+     'fileserver-stop'      => sub { $self->fileserver_stop() },
+     'fileserver-restart'   => sub { $self->fileserver_restart() },
+     'remove'               => 'rm -rf',
+   };
+   return $commands;
+ } 
+ 
+ #
+ # Setup the init script configuration, including the install paths.
+ # Create the required directories for the client, /afs and the 
+ # cache directory.
+ #
+ # N.B.The cacheinfo file is created by the init script.
+ #
+ sub configure_client {
+   my $self = shift;
+   my $config = {
+     # defaults
+     'cachesize' => '50000',
+     # custom
+     @_,
+   };
+   
+   my $debug = $self->{'debug'};
+   my $syscnf = "$path->{'initdir'}/testclient.conf";
+ 
+   open (SYSCNF, "> $syscnf") or
+     die "error: Cannot open afs.rc configuration file $syscnf, $!\n";
+ 
+   print "debug: creating afs.rc configuration file $syscnf\n" if $debug; 
+   print SYSCNF <<"_SYSCNF_";
+ AFS_CLIENT=on
+ AFS_SERVER=off
+ ENABLE_AFSDB=off
+ ENABLE_DYNROOT=off
+ CACHESIZE=$config->{'cachesize'}
+ OPTIONS="-confdir $path->{'viceetcdir'}"
+ WAIT_FOR_SALVAGE=no
+ AFSDIR=/afs
+ CACHEDIR=$path->{'cachedir'}/cache
+ CACHEINFO=$path->{'viceetcdir'}/cacheinfo
+ VERBOSE=
+ AFS_POST_INIT=
+ AFSD=$path->{'afsddir'}/afsd
+ BOSSERVER=$path->{'afssrvsbindir'}/bosserver
+ BOS=$path->{'afssrvbindir'}/bos
+ KILLAFS=$path->{'viceetcdir'}/killafs
+ MODLOADDIR=$path->{'afskerneldir'} 
+ _SYSCNF_
+   close SYSCNF;
+   if ($debug) {
+     if (open(SYSCNF, "< $syscnf")) {
+       while (<SYSCNF>) {
+         chomp; print "debug:  $_\n";
+       }
+       close SYSCNF;
+     }
+   }
+ 
+   # Create a cache directory if none.
+   unless ( -d "$path->{'cachedir'}/cache" ) {
+     print "debug: making cache directory: $path->{'cachedir'}/cache\n" if $debug;
+     system("mkdir -p $path->{'cachedir'}/cache");
+     system("chmod 0700 $path->{'cachedir'}/cache"); 
+   }
+ 
+   # Create the local /afs directory on which the afs filespace will be mounted. 
+   if ( ! -d "/afs" ) {
+     print "debug: making the local /afs directory.\n" if $debug;
+     system("mkdir /afs");
+     system("chmod 0777 /afs");
+   }
+ }
+ 
+ #
+ # Force the client to stop. The sequence is:
+ #    umount /afs
+ #    /usr/vice/etc/afsd -shutdown
+ #    rmmod openafs (or rmmod libafs)
+ #
+ sub client_forcestop {
+   my $self = shift;
+   print "debug: client forcestop\n" if $self->{'debug'};
+ 
+   eval { 
+     run("umount /afs");
+     sleep 1;
+   };
+   eval { 
+     run("$path->{'afsddir'}/afsd -shutdown");
+   sleep 1;
+   };
+ 
+   # Remove openafs modules still loaded.
+   my $mods = $self->list_modules();
+   if ($mods->{'openafs'}) {
+      eval { run("/sbin/rmmod openafs") };
+   }
+   if ($mods->{'libafs'}) {
+      eval { run("/sbin/rmmod libafs") };
+   }
+ 
+   # Check.
+   $mods = $self->list_modules();
+   if ($mods->{'openafs'}) {
+      print "warning: kernel module still loaded: openafs\n";
+   }
+   if ($mods->{'libafs'}) {
+      print "warning: kernel module still loaded: libafs\n";
+   }
+ 
+   # remove stale lock set by init script.
+   run("rm -f /var/lock/subsys/afs");  
+ }
+ 
+ #
+ # list_modules() - Returns a table of loaded module names.
+ #
+ sub list_modules {
+   my $self = shift;
+   my $mods = {};
+   if (open(LSMOD, "/sbin/lsmod |")) {
+     while(<LSMOD>) {
+     chomp;
+     my ($mod) = split;
+     $mods->{$mod} = 1;
+   }
+     close LSMOD;
+   }
+   return $mods;
+ }
+ 
+ 1;
Index: openafs/src/tests/OpenAFS/config.pm
diff -c openafs/src/tests/OpenAFS/config.pm:1.1 openafs/src/tests/OpenAFS/config.pm:1.1.22.1
*** openafs/src/tests/OpenAFS/config.pm:1.1	Tue Jan 15 14:22:11 2002
--- openafs/src/tests/OpenAFS/config.pm	Mon Jan 21 14:42:15 2008
***************
*** 66,72 ****
  
  =cut
  
! $def_ConfDir = "$openafsdirpath->{'viceetcdir'}";
  #$def_ConfDir = "/usr/vice/etc";
  
  
--- 66,72 ----
  
  =cut
  
! $def_ConfDir = $OpenAFS::Dirpath::openafsdirpath->{'viceetcdir'};
  #$def_ConfDir = "/usr/vice/etc";
  
  
***************
*** 95,101 ****
  =cut
  
  @CmdPath = (split(/:/, $ENV{PATH}),
!             "$openafsdirpath->{'afssrvbindir'}",        # For servers
  	    '/usr/local/bin',      # Many sites put AFS in /usr/local
  	    '/usr/local/etc',
  	    '/usr/afsws/bin',      # For people who use Transarc's
--- 95,101 ----
  =cut
  
  @CmdPath = (split(/:/, $ENV{PATH}),
!             $OpenAFS::Dirpath::openafsdirpath->{'afssrvbindir'},        # For servers
  	    '/usr/local/bin',      # Many sites put AFS in /usr/local
  	    '/usr/local/etc',
  	    '/usr/afsws/bin',      # For people who use Transarc's
Index: openafs/src/ubik/NTMakefile
diff -c openafs/src/ubik/NTMakefile:1.9.4.1 openafs/src/ubik/NTMakefile:1.9.4.2
*** openafs/src/ubik/NTMakefile:1.9.4.1	Tue Jul  4 02:28:26 2006
--- openafs/src/ubik/NTMakefile	Sat Feb  2 08:43:26 2008
***************
*** 68,74 ****
  
  
  $(RS_UDBG_EXEFILE): $(UDBG_EXEOBJS) $(UDBG_EXELIBS)  
! 	$(EXECONLINK) iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)  
  
--- 68,74 ----
  
  
  $(RS_UDBG_EXEFILE): $(UDBG_EXEOBJS) $(UDBG_EXELIBS)  
! 	$(EXECONLINK) iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)  
  
Index: openafs/src/update/NTMakefile
diff -c openafs/src/update/NTMakefile:1.9.4.1 openafs/src/update/NTMakefile:1.9.4.2
*** openafs/src/update/NTMakefile:1.9.4.1	Tue Jul  4 02:28:26 2006
--- openafs/src/update/NTMakefile	Sat Feb  2 08:43:26 2008
***************
*** 51,57 ****
  	$(OUT)\upserver.res
  
  $(UPSERVER):  $(USVR_OBJS) $(LIBS)
! 	$(EXECONLINK) dnsapi.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
--- 51,57 ----
  	$(OUT)\upserver.res
  
  $(UPSERVER):  $(USVR_OBJS) $(LIBS)
! 	$(EXECONLINK) dnsapi.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
***************
*** 67,73 ****
  	$(OUT)\upclient.res
  
  $(UPCLIENT):  $(UCLNT_OBJS)  $(LIBS)
! 	$(EXECONLINK) dnsapi.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
--- 67,73 ----
  	$(OUT)\upclient.res
  
  $(UPCLIENT):  $(UCLNT_OBJS)  $(LIBS)
! 	$(EXECONLINK) dnsapi.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
Index: openafs/src/util/dirpath.c
diff -c openafs/src/util/dirpath.c:1.19.2.1 openafs/src/util/dirpath.c:1.19.2.2
*** openafs/src/util/dirpath.c:1.19.2.1	Mon Nov 20 18:49:18 2006
--- openafs/src/util/dirpath.c	Fri Feb  1 21:48:14 2008
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/dirpath.c,v 1.19.2.1 2006/11/20 23:49:18 rra Exp $");
  
  #include <stddef.h>
  #include <stdlib.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/dirpath.c,v 1.19.2.2 2008/02/02 02:48:14 jaltman Exp $");
  
  #include <stddef.h>
  #include <stdlib.h>
***************
*** 135,141 ****
      FilepathNormalize(ntServerInstallDirShort);
  
      /* get the afs client configuration directory (/usr/vice/etc equivalent) */
!     if (afssw_GetClientInstallDir(&buf)) {
          /* failed */
          status = GetWindowsDirectory(ntClientConfigDirLong, AFSDIR_PATH_MAX);
          if (status == 0 || status > AFSDIR_PATH_MAX) {
--- 135,141 ----
      FilepathNormalize(ntServerInstallDirShort);
  
      /* get the afs client configuration directory (/usr/vice/etc equivalent) */
!     if (afssw_GetClientCellServDBDir(&buf)) {
          /* failed */
          status = GetWindowsDirectory(ntClientConfigDirLong, AFSDIR_PATH_MAX);
          if (status == 0 || status > AFSDIR_PATH_MAX) {
Index: openafs/src/util/errmap_nt.h
diff -c openafs/src/util/errmap_nt.h:1.5 openafs/src/util/errmap_nt.h:1.5.14.1
*** openafs/src/util/errmap_nt.h:1.5	Thu Jul 15 23:38:37 2004
--- openafs/src/util/errmap_nt.h	Thu Jan 31 02:31:59 2008
***************
*** 18,41 ****
  
  /* Define additional local codes beyond NT errno range. */
  
- #define AFS_NT_ERRNO_BASE  100
- 
  /* Overloaded codes. */
  #ifndef EWOULDBLOCK
! #define EWOULDBLOCK        EAGAIN
  #endif
  
  /* New codes */
! #define ELOOP              (AFS_NT_ERRNO_BASE + 1)
! #define EOPNOTSUPP         (AFS_NT_ERRNO_BASE + 2)
! #define EDQUOT		   (AFS_NT_ERRNO_BASE + 3)
! #define ENOTSOCK           (AFS_NT_ERRNO_BASE + 4)
! #define ETIMEDOUT          (AFS_NT_ERRNO_BASE + 5)
! #define ECONNREFUSED       (AFS_NT_ERRNO_BASE + 6)
! #define ESTALE		   (AFS_NT_ERRNO_BASE + 7)
! #define ENOTBLK		   (AFS_NT_ERRNO_BASE + 8)
! #define EOVERFLOW          (AFS_NT_ERRNO_BASE + 9)
! #define ENOMSG             (AFS_NT_ERRNO_BASE + 10)
! #define ETIME              (AFS_NT_ERRNO_BASE + 11)
  
  #endif /* OPENAFS_ERRMAP_NT_H  */
--- 18,43 ----
  
  /* Define additional local codes beyond NT errno range. */
  
  /* Overloaded codes. */
  #ifndef EWOULDBLOCK
! #define EWOULDBLOCK        WSAEWOULDBLOCK
  #endif
  
+ #define ETIMEDOUT          WSAETIMEDOUT
+ #define EDQUOT		   WSAEDQUOT
+ #define ELOOP              WSAELOOP
+ #define EOPNOTSUPP         WSAEOPNOTSUPP
+ #define ENOTSOCK           WSAENOTSOCK
+ #define ECONNREFUSED       WSAECONNREFUSED
+ #define ESTALE		   WSAESTALE
+ 
+ 
  /* New codes */
! #define AFS_NT_ERRNO_BASE  WSABASEERR + 1000
! 
! #define EOVERFLOW          (AFS_NT_ERRNO_BASE + 0)
! #define ENOMSG             (AFS_NT_ERRNO_BASE + 1)
! #define ETIME              (AFS_NT_ERRNO_BASE + 2)
! #define ENOTBLK		   (AFS_NT_ERRNO_BASE + 3)
  
  #endif /* OPENAFS_ERRMAP_NT_H  */
Index: openafs/src/venus/cmdebug.c
diff -c openafs/src/venus/cmdebug.c:1.19.4.6 openafs/src/venus/cmdebug.c:1.19.4.7
*** openafs/src/venus/cmdebug.c:1.19.4.6	Fri Nov  9 19:19:20 2007
--- openafs/src/venus/cmdebug.c	Sat Jan 12 10:44:40 2008
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/cmdebug.c,v 1.19.4.6 2007/11/10 00:19:20 jaltman Exp $");
  
  
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/cmdebug.c,v 1.19.4.7 2008/01/12 15:44:40 jaltman Exp $");
  
  
  #include <sys/types.h>
***************
*** 82,87 ****
--- 82,88 ----
      } else {
  	printf("cmdebug: unsupported server version %d\n", srv_ver);
      }
+     return 0;
  }
  
  #ifndef CAPABILITY_BITS
***************
*** 473,478 ****
--- 474,531 ----
  	return PrintCacheEntries32(aconn, aint32);
  }
  
+ static int
+ PrintCellServDBEntry(struct rx_connection *aconn, afs_int32 cellnum)
+ {
+     static struct cell_cache *cache;
+     int code;
+     char *cellname;
+     serverList sl;
+     unsigned int n;
+     int rc = 0;
+ 
+     cellname = NULL;
+     sl.serverList_len = 0;
+     sl.serverList_val = NULL;
+     code = RXAFSCB_GetCellServDB(aconn, cellnum, &cellname, &sl);
+     if (code)
+ 	return 0;
+ 
+     if ( !cellname || !cellname[0] )
+         goto done;
+ 
+     rc = 1;
+     printf(">%-23s#%s\n", cellname, cellname);
+ 
+     if (sl.serverList_val) {
+         for ( n=0; n<sl.serverList_len; n++) {
+             struct hostent *host;
+             afs_uint32      addr = ntohl(sl.serverList_val[n]);
+ 
+             host = gethostbyaddr((const char *)&addr, sizeof(afs_uint32), AF_INET);
+             printf("%-28s#%s\n", afs_inet_ntoa(addr), 
+                     host ? host->h_name : "");
+         }
+     }
+ 
+   done:
+     if (cellname)
+         free(cellname);
+ 
+     if (sl.serverList_val)
+ 	free(sl.serverList_val);
+ 
+     return rc;
+ }
+ 
+ static void
+ PrintCellServDB(struct rx_connection *aconn) 
+ {
+     afs_int32 index;
+ 
+     for ( index = 0 ; PrintCellServDBEntry(aconn, index); index++ );
+ }
+ 
  int
  CommandProc(struct cmd_syndesc *as, void *arock)
  {
***************
*** 502,519 ****
  	       hostName);
  	exit(1);
      }
!     if (as->parms[5].items) {
  	/* -addrs */
  	PrintInterfaces(conn);
  	return 0;
      }
!     if (as->parms[6].items) {
  	/* -cache */
  	PrintCacheConfig(conn);
  	return 0;
      }
  
!     if (as->parms[7].items)
          print_ctime = 1;
  
      if (as->parms[2].items)
--- 555,579 ----
  	       hostName);
  	exit(1);
      }
! 
!     if (as->parms[6].items) {
  	/* -addrs */
  	PrintInterfaces(conn);
  	return 0;
      }
!     if (as->parms[7].items) {
  	/* -cache */
  	PrintCacheConfig(conn);
  	return 0;
      }
  
!     if (as->parms[8].items) {
! 	/* -cellservdb */
! 	PrintCellServDB(conn);
! 	return 0;
!     }
! 
!     if (as->parms[5].items)
          print_ctime = 1;
  
      if (as->parms[2].items)
***************
*** 568,574 ****
  
      rx_Init(0);
  
!     ts = cmd_CreateSyntax(NULL, CommandProc, NULL, "probe unik server");
      cmd_AddParm(ts, "-servers", CMD_SINGLE, CMD_REQUIRED, "server machine");
      cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "IP port");
      cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL, "print all info");
--- 628,634 ----
  
      rx_Init(0);
  
!     ts = cmd_CreateSyntax(NULL, CommandProc, NULL, "query afs cache manager");
      cmd_AddParm(ts, "-servers", CMD_SINGLE, CMD_REQUIRED, "server machine");
      cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "IP port");
      cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL, "print all info");
***************
*** 576,587 ****
                   "print only cache entries with positive reference counts");
      cmd_AddParm(ts, "-callbacks", CMD_FLAG, CMD_OPTIONAL, 
                   "print only cache entries with callbacks");
      cmd_AddParm(ts, "-addrs", CMD_FLAG, CMD_OPTIONAL,
  		"print only host interfaces");
      cmd_AddParm(ts, "-cache", CMD_FLAG, CMD_OPTIONAL,
  		"print only cache configuration");
!     cmd_AddParm(ts, "-ctime", CMD_FLAG, CMD_OPTIONAL, 
!                 "print human readable expiration time");
  
      cmd_Dispatch(argc, argv);
      exit(0);
--- 636,651 ----
                   "print only cache entries with positive reference counts");
      cmd_AddParm(ts, "-callbacks", CMD_FLAG, CMD_OPTIONAL, 
                   "print only cache entries with callbacks");
+     cmd_AddParm(ts, "-ctime", CMD_FLAG, CMD_OPTIONAL, 
+                 "print human readable expiration time");
+ 
+     
      cmd_AddParm(ts, "-addrs", CMD_FLAG, CMD_OPTIONAL,
  		"print only host interfaces");
      cmd_AddParm(ts, "-cache", CMD_FLAG, CMD_OPTIONAL,
  		"print only cache configuration");
!     cmd_AddParm(ts, "-cellservdb", CMD_FLAG, CMD_OPTIONAL, 
!                 "print only cellservdb info");
  
      cmd_Dispatch(argc, argv);
      exit(0);
Index: openafs/src/viced/host.c
diff -c openafs/src/viced/host.c:1.93.2.26 openafs/src/viced/host.c:1.93.2.27
*** openafs/src/viced/host.c:1.93.2.26	Mon Jan  7 15:23:51 2008
--- openafs/src/viced/host.c	Fri Feb  1 16:33:40 2008
***************
*** 13,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/host.c,v 1.93.2.26 2008/01/07 20:23:51 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.27 2008/02/01 21:33:40 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
***************
*** 1086,1092 ****
  	if (!(held[count] = h_Held_r(host)))
  	    h_Hold_r(host);
      }
!     assert(count == hostCount);
      H_UNLOCK;
      for (i = 0; i < count; i++) {
  	held[i] = (*proc) (list[i], held[i], param);
--- 1086,1095 ----
  	if (!(held[count] = h_Held_r(host)))
  	    h_Hold_r(host);
      }
!     if (count != hostCount) {
! 	ViceLog(0, ("h_Enumerate found %d of %d hosts\n", count, hostCount));
!     }
!     assert(count <= hostCount);
      H_UNLOCK;
      for (i = 0; i < count; i++) {
  	held[i] = (*proc) (list[i], held[i], param);
Index: openafs/src/viced/host.h
diff -c openafs/src/viced/host.h:1.21.2.4 openafs/src/viced/host.h:1.21.2.5
*** openafs/src/viced/host.h:1.21.2.4	Wed Aug  8 12:31:25 2007
--- openafs/src/viced/host.h	Mon Feb  4 13:51:37 2008
***************
*** 231,238 ****
  extern struct host *h_Alloc_r(register struct rx_connection *r_con);
  extern struct host *h_Lookup_r(afs_uint32 hostaddr, afs_uint16 hport,
  			       int *heldp);
- extern void   hashInsert_r(afs_uint32 addr, afs_uint16 port, 
- 			   struct host* host);
  extern struct host *h_LookupUuid_r(afsUUID * uuidp);
  extern void h_Enumerate(int (*proc) (), char *param);
  extern void h_Enumerate_r(int (*proc) (), struct host *enumstart, char *param);
--- 231,236 ----
Index: openafs/src/viced/viced.c
diff -c openafs/src/viced/viced.c:1.75.2.18 openafs/src/viced/viced.c:1.75.2.20
*** openafs/src/viced/viced.c:1.75.2.18	Thu Nov 29 14:26:41 2007
--- openafs/src/viced/viced.c	Tue Jan 22 23:18:16 2008
***************
*** 22,28 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/viced.c,v 1.75.2.18 2007/11/29 19:26:41 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.20 2008/01/23 04:18:16 shadow Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
***************
*** 164,169 ****
--- 164,170 ----
  int printBanner = 0;
  int rxJumbograms = 1;		/* default is to send and receive jumbograms. */
  int rxBind = 0;		/* don't bind */
+ int rxkadDisableDotCheck = 0;      /* disable check for dot in principal name */ 
  int rxMaxMTU = -1;
  afs_int32 implicitAdminRights = PRSFS_LOOKUP;	/* The ADMINISTER right is 
  						 * already implied */
***************
*** 574,584 ****
  
      setThreadId("FsyncCheckLWP");
  
- #ifdef AFS_PTHREAD_ENV
-     assert(pthread_cond_init(&fsync_cond, NULL) == 0);
-     assert(pthread_mutex_init(&fsync_glock_mutex, NULL) == 0);
- #endif
- 
  #ifdef AFS_DEMAND_ATTACH_FS
      FS_STATE_WRLOCK;
      while (fs_state.mode == FS_MODE_NORMAL) {
--- 575,580 ----
***************
*** 895,900 ****
--- 891,897 ----
      strcat(buffer, "[-rxdbge (enable rxevent debugging)] ");
      strcat(buffer, "[-rxmaxmtu <bytes>] ");
      strcat(buffer, "[-rxbind (bind the Rx socket to one address)] ");
+     strcat(buffer, "[-allow-dotted-principals (disable the rxkad principal name dot check)] ");
  #ifdef AFS_DEMAND_ATTACH_FS
      strcat(buffer, "[-fs-state-dont-save (disable state save during shutdown)] ");
      strcat(buffer, "[-fs-state-dont-restore (disable state restore during startup)] ");
***************
*** 1274,1279 ****
--- 1271,1278 ----
  	    rxJumbograms = 0;
  	} else if (!strcmp(argv[i], "-rxbind")) {
  	    rxBind = 1;
+ 	} else if (!strcmp(argv[i], "-allow-dotted-principals")) {
+ 	    rxkadDisableDotCheck = 1;
  	} else if (!strcmp(argv[i], "-rxmaxmtu")) {
  	    if ((i + 1) >= argc) {
  		fprintf(stderr, "missing argument for -rxmaxmtu\n"); 
***************
*** 2087,2092 ****
--- 2086,2096 ----
  		("Failed to initialize RX, probably two servers running.\n"));
  	exit(-1);
      }
+     if (rxkadDisableDotCheck) {
+         rx_SetSecurityConfiguration(tservice, RXS_CONFIG_FLAGS,
+                                     (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK,
+                                     NULL);
+     }
      rx_SetMinProcs(tservice, 3);
      rx_SetMaxProcs(tservice, lwps);
      rx_SetCheckReach(tservice, 1);
***************
*** 2137,2142 ****
--- 2141,2151 ----
      /* allow super users to manage RX statistics */
      rx_SetRxStatUserOk(fs_rxstat_userok);
  
+ #ifdef AFS_PTHREAD_ENV
+     assert(pthread_cond_init(&fsync_cond, NULL) == 0);
+     assert(pthread_mutex_init(&fsync_glock_mutex, NULL) == 0);
+ #endif
+ 
  #if !defined(AFS_DEMAND_ATTACH_FS)
      /* 
       * For DAFS, we do not start the Rx server threads until after
Index: openafs/src/vlserver/NTMakefile
diff -c openafs/src/vlserver/NTMakefile:1.10.4.2 openafs/src/vlserver/NTMakefile:1.10.4.3
*** openafs/src/vlserver/NTMakefile:1.10.4.2	Wed Jul  5 15:21:05 2006
--- openafs/src/vlserver/NTMakefile	Sat Feb  2 08:43:26 2008
***************
*** 89,95 ****
  
  	
  $(VLSERVER): $(VLSERVER_EXEOBJS) $(LIBFILE) $(VLSERVER_EXECLIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
--- 89,95 ----
  
  	
  $(VLSERVER): $(VLSERVER_EXEOBJS) $(LIBFILE) $(VLSERVER_EXECLIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
***************
*** 146,152 ****
  	$(DESTDIR)\lib\afs\afspioctl.lib
  
  $(OUT)\vlclient.exe: $(OUT)\vlclient.obj  $(LIBFILE) $(VLSERVER_EXECLIBS) $(VLCLIENT_LIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  
  
--- 146,152 ----
  	$(DESTDIR)\lib\afs\afspioctl.lib
  
  $(OUT)\vlclient.exe: $(OUT)\vlclient.obj  $(LIBFILE) $(VLSERVER_EXECLIBS) $(VLCLIENT_LIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  
  
Index: openafs/src/vlserver/vldbint.xg
diff -c openafs/src/vlserver/vldbint.xg:1.5 openafs/src/vlserver/vldbint.xg:1.5.18.1
*** openafs/src/vlserver/vldbint.xg:1.5	Sat Jun  8 07:01:59 2002
--- openafs/src/vlserver/vldbint.xg	Tue Feb  5 12:26:47 2008
***************
*** 225,231 ****
   */
  
  ProbeServer(
! ) = VLPROBE;
  
  /*
   * VL_GetEntryByName was renamed to VL_GetEntryByNameO to avoid
--- 225,231 ----
   */
  
  ProbeServer(
! ) multi = VLPROBE;
  
  /*
   * VL_GetEntryByName was renamed to VL_GetEntryByNameO to avoid
Index: openafs/src/vlserver/vlserver.c
diff -c openafs/src/vlserver/vlserver.c:1.22.2.4 openafs/src/vlserver/vlserver.c:1.22.2.6
*** openafs/src/vlserver/vlserver.c:1.22.2.4	Mon Nov 26 16:08:46 2007
--- openafs/src/vlserver/vlserver.c	Sun Feb  3 22:51:41 2008
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vlserver/vlserver.c,v 1.22.2.4 2007/11/26 21:08:46 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vlserver/vlserver.c,v 1.22.2.6 2008/02/04 03:51:41 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 66,71 ****
--- 66,72 ----
  int rxJumbograms = 1;		/* default is to send and receive jumbo grams */
  int rxMaxMTU = -1;
  afs_int32 rxBind = 0;
+ int rxkadDisableDotCheck = 0;
  
  #define ADDRSPERSITE 16         /* Same global is in rx/rx_user.c */
  afs_uint32 SHostAddrs[ADDRSPERSITE];
***************
*** 179,185 ****
  
  	} else if (strcmp(argv[index], "-rxbind") == 0) {
  	    rxBind = 1;
! 
  	} else if (!strcmp(argv[index], "-rxmaxmtu")) {
  	    if ((index + 1) >= argc) {
  		fprintf(stderr, "missing argument for -rxmaxmtu\n"); 
--- 180,187 ----
  
  	} else if (strcmp(argv[index], "-rxbind") == 0) {
  	    rxBind = 1;
! 	} else if (strcmp(argv[index], "-allow-dotted-principals") == 0) {
! 	    rxkadDisableDotCheck = 1;
  	} else if (!strcmp(argv[index], "-rxmaxmtu")) {
  	    if ((index + 1) >= argc) {
  		fprintf(stderr, "missing argument for -rxmaxmtu\n"); 
***************
*** 188,194 ****
  	    rxMaxMTU = atoi(argv[++i]);
  	    if ((rxMaxMTU < RX_MIN_PACKET_SIZE) || 
  		(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
! 		printf("rxMaxMTU %d% invalid; must be between %d-%d\n",
  		       rxMaxMTU, RX_MIN_PACKET_SIZE, 
  		       RX_MAX_PACKET_DATA_SIZE);
  		return -1;
--- 190,196 ----
  	    rxMaxMTU = atoi(argv[++i]);
  	    if ((rxMaxMTU < RX_MIN_PACKET_SIZE) || 
  		(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
! 		printf("rxMaxMTU %d invalid; must be between %d-%d\n",
  		       rxMaxMTU, RX_MIN_PACKET_SIZE, 
  		       RX_MAX_PACKET_DATA_SIZE);
  		return -1;
***************
*** 246,259 ****
  	    /* support help flag */
  #ifndef AFS_NT40_ENV
  	    printf("Usage: vlserver [-p <number of processes>] [-nojumbo] "
! 		   "[-rxmaxmtu <bytes>] [-rxbind] "
  		   "[-auditlog <log path>] "
  		   "[-syslog[=FACILITY]] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-help]\n");
  #else
  	    printf("Usage: vlserver [-p <number of processes>] [-nojumbo] "
! 		   "[-rxmaxmtu <bytes>] [-rxbind] "
  		   "[-auditlog <log path>] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-help]\n");
--- 248,261 ----
  	    /* support help flag */
  #ifndef AFS_NT40_ENV
  	    printf("Usage: vlserver [-p <number of processes>] [-nojumbo] "
! 		   "[-rxmaxmtu <bytes>] [-rxbind] [-allow-dotted-principals] "
  		   "[-auditlog <log path>] "
  		   "[-syslog[=FACILITY]] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-help]\n");
  #else
  	    printf("Usage: vlserver [-p <number of processes>] [-nojumbo] "
! 		   "[-rxmaxmtu <bytes>] [-rxbind] [-allow-dotted-principals] "
  		   "[-auditlog <log path>] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-help]\n");
***************
*** 386,391 ****
--- 388,399 ----
  	lwps = 4;
      rx_SetMaxProcs(tservice, lwps);
  
+     if (rxkadDisableDotCheck) {
+         rx_SetSecurityConfiguration(tservice, RXS_CONFIG_FLAGS,
+                                     (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK,
+                                     NULL);
+     }
+ 
      tservice =
  	rx_NewServiceHost(host, 0, RX_STATS_SERVICE_ID, "rpcstats", sc, 3,
  		      RXSTATS_ExecuteRequest);
Index: openafs/src/vol/Makefile.in
diff -c openafs/src/vol/Makefile.in:1.22.2.2 openafs/src/vol/Makefile.in:1.22.2.3
*** openafs/src/vol/Makefile.in:1.22.2.2	Mon Nov 12 13:28:37 2007
--- openafs/src/vol/Makefile.in	Mon Feb  4 13:51:39 2008
***************
*** 18,25 ****
  
  CFLAGS = ${COMMON_CFLAGS} -D${SYS_NAME} ${FSINCLUDES} ${XCFLAGS} ${ARCHFLAGS} -DFSSYNC_BUILD_SERVER -DFSSYNC_BUILD_CLIENT
  
! PUBLICHEADERS=nfs.h vnode.h viceinode.h volume.h voldefs.h partition.h \
! 	fssync.h ihandle.h namei_ops.h salvsync.h daemon_com.h
  
  VLIBOBJS=vnode.o volume.o vutil.o partition.o fssync-server.o fssync-client.o \
  	 clone.o nuke.o devname.o listinodes.o common.o ihandle.o purge.o \
--- 18,25 ----
  
  CFLAGS = ${COMMON_CFLAGS} -D${SYS_NAME} ${FSINCLUDES} ${XCFLAGS} ${ARCHFLAGS} -DFSSYNC_BUILD_SERVER -DFSSYNC_BUILD_CLIENT
  
! PUBLICHEADERS=nfs.h vnode.h viceinode.h volume.h volume_inline.h voldefs.h partition.h \
! 	fssync.h ihandle.h namei_ops.h salvsync.h daemon_com.h vnode_inline.h
  
  VLIBOBJS=vnode.o volume.o vutil.o partition.o fssync-server.o fssync-client.o \
  	 clone.o nuke.o devname.o listinodes.o common.o ihandle.o purge.o \
***************
*** 38,45 ****
--- 38,47 ----
  	$(FS_CONV_SOL26) \
  	${TOP_INCDIR}/afs/nfs.h \
  	${TOP_INCDIR}/afs/vnode.h \
+ 	${TOP_INCDIR}/afs/vnode_inline.h \
  	${TOP_INCDIR}/afs/viceinode.h \
  	${TOP_INCDIR}/afs/volume.h \
+ 	${TOP_INCDIR}/afs/volume_inline.h \
  	${TOP_INCDIR}/afs/voldefs.h \
  	${TOP_INCDIR}/afs/partition.h \
  	${TOP_INCDIR}/afs/fssync.h \
***************
*** 62,69 ****
--- 64,73 ----
  	$(install_FS_CONV_SOL26) \
  	${DESTDIR}${includedir}/afs/nfs.h \
  	${DESTDIR}${includedir}/afs/vnode.h \
+ 	${DESTDIR}${includedir}/afs/vnode_inline.h \
  	${DESTDIR}${includedir}/afs/viceinode.h \
  	${DESTDIR}${includedir}/afs/volume.h \
+ 	${DESTDIR}${includedir}/afs/volume_inline.h \
  	${DESTDIR}${includedir}/afs/voldefs.h \
  	${DESTDIR}${includedir}/afs/partition.h \
  	${DESTDIR}${includedir}/afs/fssync.h \
***************
*** 113,124 ****
--- 117,134 ----
  ${DEST}/include/afs/vnode.h: vnode.h
  	${INSTALL} $? $@
  
+ ${DEST}/include/afs/vnode_inline.h: vnode_inline.h
+ 	${INSTALL} $? $@
+ 
  ${DEST}/include/afs/viceinode.h: viceinode.h
  	${INSTALL} $? $@
  
  ${DEST}/include/afs/volume.h: volume.h
  	${INSTALL} $? $@
  
+ ${DEST}/include/afs/volume_inline.h: volume_inline.h
+ 	${INSTALL} $? $@
+ 
  ${DEST}/include/afs/voldefs.h: voldefs.h
  	${INSTALL} $? $@
  
***************
*** 253,258 ****
--- 263,274 ----
  ${TOP_INCDIR}/afs/vnode.h: vnode.h
  	${INSTALL} $? $@
  
+ ${DESTDIR}${includedir}/afs/vnode_inline.h: vnode_inline.h
+ 	${INSTALL} $? $@
+ 
+ ${TOP_INCDIR}/afs/vnode_inline.h: vnode_inline.h
+ 	${INSTALL} $? $@
+ 
  ${DESTDIR}${includedir}/afs/viceinode.h: viceinode.h
  	${INSTALL} $? $@
  
***************
*** 265,270 ****
--- 281,292 ----
  ${TOP_INCDIR}/afs/volume.h: volume.h
  	${INSTALL} $? $@
  
+ ${DESTDIR}${includedir}/afs/volume_inline.h: volume_inline.h
+ 	${INSTALL} $? $@
+ 
+ ${TOP_INCDIR}/afs/volume_inline.h: volume_inline.h
+ 	${INSTALL} $? $@
+ 
  ${DESTDIR}${includedir}/afs/voldefs.h: voldefs.h
  	${INSTALL} $? $@
  
***************
*** 330,337 ****
--- 352,361 ----
  	$(dest_FS_CONV_SOL26) \
  	${DEST}/include/afs/nfs.h \
  	${DEST}/include/afs/vnode.h \
+ 	${DEST}/include/afs/vnode_inline.h \
  	${DEST}/include/afs/viceinode.h \
  	${DEST}/include/afs/volume.h \
+ 	${DEST}/include/afs/volume_inline.h \
  	${DEST}/include/afs/voldefs.h \
  	${DEST}/include/afs/partition.h \
  	${DEST}/include/afs/fssync.h \
Index: openafs/src/vol/NTMakefile
diff -c openafs/src/vol/NTMakefile:1.9.2.1 openafs/src/vol/NTMakefile:1.9.2.3
*** openafs/src/vol/NTMakefile:1.9.2.1	Tue Jan 30 07:17:28 2007
--- openafs/src/vol/NTMakefile	Mon Feb  4 17:43:15 2008
***************
*** 24,30 ****
--- 24,32 ----
  	$(INCFILEDIR)\afs\partition.h \
  	$(INCFILEDIR)\afs\viceinode.h \
  	$(INCFILEDIR)\afs\vnode.h \
+         $(INCFILEDIR)\afs\vnode_inline.h \
  	$(INCFILEDIR)\afs\volume.h \
+         $(INCFILEDIR)\afs\volume_inline.h \
  	$(INCFILEDIR)\afs\voldefs.h \
  	$(INCFILEDIR)\afs\daemon_com.h
  
***************
*** 83,89 ****
  	$(OUT)\salvager.res
  
  $(SALVAGER): $(SALVAGER_EXEOBJS) $(EXEC_LIBS)
! 	$(EXECONLINK)
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
--- 85,91 ----
  	$(OUT)\salvager.res
  
  $(SALVAGER): $(SALVAGER_EXEOBJS) $(EXEC_LIBS)
! 	$(EXECONLINK) shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
***************
*** 98,104 ****
  	$(OUT)\fssync-debug.res
  
  $(FSSYNC_DEBUG): $(FSSYNC_DEBUG_EXEOBJS) $(EXEC_LIBS)
! 	$(EXECONLINK)
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
--- 100,106 ----
  	$(OUT)\fssync-debug.res
  
  $(FSSYNC_DEBUG): $(FSSYNC_DEBUG_EXEOBJS) $(EXEC_LIBS)
! 	$(EXECONLINK) shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
***************
*** 107,113 ****
  VOLINFO = $(DESTDIR)\root.server\usr\afs\bin\volinfo.exe
  
  $(VOLINFO): $(OUT)\vol-info.obj $(OUT)\physio.obj $(OUT)\volinfo.res $(EXEC_LIBS)
! 	$(EXECONLINK)
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
--- 109,115 ----
  VOLINFO = $(DESTDIR)\root.server\usr\afs\bin\volinfo.exe
  
  $(VOLINFO): $(OUT)\vol-info.obj $(OUT)\physio.obj $(OUT)\volinfo.res $(EXEC_LIBS)
! 	$(EXECONLINK) shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
***************
*** 116,122 ****
  VOLBLESS = $(DESTDIR)\root.server\usr\afs\bin\vol-bless.exe
  
  $(VOLBLESS): $(OUT)\vol-bless.obj $(OUT)\physio.obj $(OUT)\vol-bless.res $(EXEC_LIBS)
! 	$(EXECONLINK)
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
--- 118,124 ----
  VOLBLESS = $(DESTDIR)\root.server\usr\afs\bin\vol-bless.exe
  
  $(VOLBLESS): $(OUT)\vol-bless.obj $(OUT)\physio.obj $(OUT)\vol-bless.res $(EXEC_LIBS)
! 	$(EXECONLINK) shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP)
  
Index: openafs/src/vol/daemon_com.c
diff -c openafs/src/vol/daemon_com.c:1.3.4.4 openafs/src/vol/daemon_com.c:1.3.4.5
*** openafs/src/vol/daemon_com.c:1.3.4.4	Thu Nov  1 11:00:03 2007
--- openafs/src/vol/daemon_com.c	Mon Feb  4 13:51:39 2008
***************
*** 1,5 ****
  /*
!  * Copyright 2006-2007, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
--- 1,5 ----
  /*
!  * Copyright 2006-2008, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
***************
*** 22,28 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/daemon_com.c,v 1.3.4.4 2007/11/01 15:00:03 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
--- 22,28 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/daemon_com.c,v 1.3.4.5 2008/02/04 18:51:39 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
***************
*** 75,98 ****
  
  #define MAX_BIND_TRIES	5	/* Number of times to retry socket bind */
  
  #ifdef USE_UNIX_SOCKETS
! static getport(SYNC_client_state * state, struct sockaddr_un *addr);
! #else  /* USE_UNIX_SOCKETS */
! static getport(SYNC_client_state * state, struct sockaddr_in *addr);
  #endif /* USE_UNIX_SOCKETS */
  
! static int SYNC_ask_internal(SYNC_client_state * state, SYNC_command * com, SYNC_response * res);
  
  /* daemon com SYNC client interface */
  
  int
  SYNC_connect(SYNC_client_state * state)
  {
! #ifdef USE_UNIX_SOCKETS
!     struct sockaddr_un addr;
! #else /* USE_UNIX_SOCKETS */
!     struct sockaddr_in addr;
! #endif /* USE_UNIX_SOCKETS */
      /* I can't believe the following is needed for localhost connections!! */
      static time_t backoff[] =
  	{ 3, 3, 3, 5, 5, 5, 7, 15, 16, 24, 32, 40, 48, 0 };
--- 75,151 ----
  
  #define MAX_BIND_TRIES	5	/* Number of times to retry socket bind */
  
+ static int SYNC_ask_internal(SYNC_client_state * state, SYNC_command * com, SYNC_response * res);
+ 
+ /* daemon com SYNC general interfaces */
+ 
+ /**
+  * fill in sockaddr structure.
+  *
+  * @param[in]  endpoint pointer to sync endpoint object
+  * @param[out] addr     pointer to sockaddr structure
+  *
+  * @post sockaddr structure populated using information from
+  *       endpoint structure.
+  */
+ void
+ SYNC_getAddr(SYNC_endpoint_t * endpoint, SYNC_sockaddr_t * addr)
+ {
  #ifdef USE_UNIX_SOCKETS
!     char tbuffer[AFSDIR_PATH_MAX];
  #endif /* USE_UNIX_SOCKETS */
  
!     memset(addr, 0, sizeof(*addr));
! 
! #ifdef USE_UNIX_SOCKETS
!     strcompose(tbuffer, AFSDIR_PATH_MAX, AFSDIR_SERVER_LOCAL_DIRPATH, "/",
!                endpoint->un, NULL);
!     addr->sun_family = AF_UNIX;
!     strncpy(addr->sun_path, tbuffer, (sizeof(struct sockaddr_un) - sizeof(short)));
! #else  /* !USE_UNIX_SOCKETS */
! #ifdef STRUCT_SOCKADDR_HAS_SA_LEN
!     addr->sin_len = sizeof(struct sockaddr_in);
! #endif
!     addr->sin_addr.s_addr = htonl(0x7f000001);
!     addr->sin_family = AF_INET;	/* was localhost->h_addrtype */
!     addr->sin_port = htons(endpoint->in);	/* XXXX htons not _really_ neccessary */
! #endif /* !USE_UNIX_SOCKETS */
! }
! 
! /**
!  * get a socket descriptor of the appropriate domain.
!  *
!  * @param[in]  endpoint pointer to sync endpoint object
!  *
!  * @return socket descriptor
!  *
!  * @post socket of domain specified in endpoint structure is created and
!  *       returned to caller.
!  */
! int
! SYNC_getSock(SYNC_endpoint_t * endpoint)
! {
!     int sd;
!     assert((sd = socket(endpoint->domain, SOCK_STREAM, 0)) >= 0);
!     return sd;
! }
  
  /* daemon com SYNC client interface */
  
+ /**
+  * open a client connection to a sync server
+  *
+  * @param[in] state  pointer to sync client handle
+  *
+  * @return operation status
+  *    @retval 1 success
+  *
+  * @note at present, this routine aborts rather than returning an error code
+  */
  int
  SYNC_connect(SYNC_client_state * state)
  {
!     SYNC_sockaddr_t addr;
      /* I can't believe the following is needed for localhost connections!! */
      static time_t backoff[] =
  	{ 3, 3, 3, 5, 5, 5, 7, 15, 16, 24, 32, 40, 48, 0 };
***************
*** 102,109 ****
  	return 1;
      }
  
      for (;;) {
! 	state->fd = getport(state, &addr);
  	if (connect(state->fd, (struct sockaddr *)&addr, sizeof(addr)) >= 0)
  	    return 1;
  	if (!*timeout)
--- 155,164 ----
  	return 1;
      }
  
+     SYNC_getAddr(&state->endpoint, &addr);
+ 
      for (;;) {
! 	state->fd = SYNC_getSock(&state->endpoint);
  	if (connect(state->fd, (struct sockaddr *)&addr, sizeof(addr)) >= 0)
  	    return 1;
  	if (!*timeout)
***************
*** 118,123 ****
--- 173,186 ----
      return 0;
  }
  
+ /**
+  * forcibly disconnect a sync client handle.
+  *
+  * @param[in] state  pointer to sync client handle
+  *
+  * @retval operation status
+  *    @retval 0 success
+  */
  int
  SYNC_disconnect(SYNC_client_state * state)
  {
***************
*** 130,135 ****
--- 193,206 ----
      return 0;
  }
  
+ /**
+  * gracefully disconnect a sync client handle.
+  *
+  * @param[in] state  pointer to sync client handle
+  *
+  * @return operation status
+  *    @retval SYNC_OK success
+  */
  afs_int32
  SYNC_closeChannel(SYNC_client_state * state)
  {
***************
*** 161,166 ****
--- 232,246 ----
      return SYNC_OK;
  }
  
+ /**
+  * forcibly break a client connection, and then create a new connection.
+  *
+  * @param[in] state  pointer to sync client handle
+  *
+  * @post old connection dropped; new connection established
+  *
+  * @return @see SYNC_connect()
+  */
  int
  SYNC_reconnect(SYNC_client_state * state)
  {
***************
*** 168,206 ****
      return SYNC_connect(state);
  }
  
! /* private function to fill in the sockaddr struct for us */
! #ifdef USE_UNIX_SOCKETS
! static int
! getport(SYNC_client_state * state, struct sockaddr_un *addr)
! {
!     int sd;
!     char tbuffer[AFSDIR_PATH_MAX]; 
! 
!     strcompose(tbuffer, AFSDIR_PATH_MAX, AFSDIR_SERVER_LOCAL_DIRPATH, "/",
!                "fssync.sock", NULL);
!     memset(addr, 0, sizeof(*addr));
!     addr->sun_family = AF_UNIX;
!     strncpy(addr->sun_path, tbuffer, (sizeof(struct sockaddr_un) - sizeof(short)));
!     assert((sd = socket(AF_UNIX, SOCK_STREAM, 0)) >= 0);
!     return sd;
! }
! #else  /* USE_UNIX_SOCKETS */
! static int
! getport(SYNC_client_state * state, struct sockaddr_in *addr)
! {
!     int sd;
!     memset(addr, 0, sizeof(*addr));
!     assert((sd = socket(AF_INET, SOCK_STREAM, 0)) >= 0);
! #ifdef STRUCT_SOCKADDR_HAS_SA_LEN
!     addr->sin_len = sizeof(struct sockaddr_in);
! #endif
!     addr->sin_addr.s_addr = htonl(0x7f000001);
!     addr->sin_family = AF_INET;	/* was localhost->h_addrtype */
!     addr->sin_port = htons(state->port);	/* XXXX htons not _really_ neccessary */
!     return sd;
! }
! #endif /* USE_UNIX_SOCKETS */
! 
  afs_int32
  SYNC_ask(SYNC_client_state * state, SYNC_command * com, SYNC_response * res)
  {
--- 248,270 ----
      return SYNC_connect(state);
  }
  
! /**
!  * send a command to a sync server and wait for a response.
!  *
!  * @param[in]  state  pointer to sync client handle
!  * @param[in]  com    command object
!  * @param[out] res    response object
!  *
!  * @return operation status
!  *    @retval SYNC_OK success
!  *    @retval SYNC_COM_ERROR communications error
!  *    @retval SYNC_BAD_COMMAND server did not recognize command code
!  *
!  * @note this routine merely handles error processing; SYNC_ask_internal()
!  *       handles the low-level details of communicating with the SYNC server.
!  *
!  * @see SYNC_ask_internal
!  */
  afs_int32
  SYNC_ask(SYNC_client_state * state, SYNC_command * com, SYNC_response * res)
  {
***************
*** 253,266 ****
  
      if (code == SYNC_COM_ERROR) {
  	Log("SYNC_ask: fatal protocol error on circuit '%s'; disabling sync "
! 	    "protocol to server running on port %d until next server restart\n", 
! 	    state->proto_name, state->port);
  	state->fatal_error = 1;
      }
  
      return code;
  }
  
  static afs_int32
  SYNC_ask_internal(SYNC_client_state * state, SYNC_command * com, SYNC_response * res)
  {
--- 317,343 ----
  
      if (code == SYNC_COM_ERROR) {
  	Log("SYNC_ask: fatal protocol error on circuit '%s'; disabling sync "
! 	    "protocol until next server restart\n", 
! 	    state->proto_name);
  	state->fatal_error = 1;
      }
  
      return code;
  }
  
+ /**
+  * send a command to a sync server and wait for a response.
+  *
+  * @param[in]  state  pointer to sync client handle
+  * @param[in]  com    command object
+  * @param[out] res    response object
+  *
+  * @return operation status
+  *    @retval SYNC_OK success
+  *    @retval SYNC_COM_ERROR communications error
+  *
+  * @internal
+  */
  static afs_int32
  SYNC_ask_internal(SYNC_client_state * state, SYNC_command * com, SYNC_response * res)
  {
***************
*** 386,392 ****
   * daemon com SYNC server-side interfaces 
   */
  
! /* get a command */
  afs_int32
  SYNC_getCom(int fd, SYNC_command * com)
  {
--- 463,478 ----
   * daemon com SYNC server-side interfaces 
   */
  
! /**
!  * receive a command structure off a sync socket.
!  *
!  * @param[in] fd    socket descriptor
!  * @param[out] com  sync command object to be populated
!  *
!  * @return operation status
!  *    @retval SYNC_OK command received
!  *    @retval SYNC_COM_ERROR there was a socket communications error
!  */
  afs_int32
  SYNC_getCom(int fd, SYNC_command * com)
  {
***************
*** 450,456 ****
      return code;
  }
  
! /* put a response */
  afs_int32
  SYNC_putRes(int fd, SYNC_response * res)
  {
--- 536,551 ----
      return code;
  }
  
! /**
!  * write a response structure to a sync socket.
!  *
!  * @param[in] fd
!  * @param[in] res
!  *
!  * @return operation status
!  *    @retval SYNC_OK
!  *    @retval SYNC_COM_ERROR
!  */
  afs_int32
  SYNC_putRes(int fd, SYNC_response * res)
  {
***************
*** 508,510 ****
--- 603,660 ----
  
      return (s_len == len) ? 1 : 0;
  }
+ 
+ /**
+  * clean up old sockets.
+  *
+  * @param[in]  state  server state object
+  *
+  * @post unix domain sockets are cleaned up
+  */
+ void
+ SYNC_cleanupSock(SYNC_server_state_t * state)
+ {
+ #ifdef USE_UNIX_SOCKETS
+     remove(state->addr.sun_path);
+ #endif
+ }
+ 
+ /**
+  * bind socket and set it to listen state.
+  *
+  * @param[in] state  server state object
+  *
+  * @return operation status
+  *    @retval 0 success
+  *    @retval nonzero failure
+  *
+  * @post socket bound and set to listen state
+  */
+ int
+ SYNC_bindSock(SYNC_server_state_t * state)
+ {
+     int code;
+     int on = 1;
+     int numTries;
+ 
+     /* Reuseaddr needed because system inexplicably leaves crud lying around */
+     code =
+ 	setsockopt(state->fd, SOL_SOCKET, SO_REUSEADDR, (char *)&on,
+ 		   sizeof(on));
+     if (code)
+ 	Log("SYNC_bindSock: setsockopt failed with (%d)\n", errno);
+ 
+     for (numTries = 0; numTries < state->bind_retry_limit; numTries++) {
+ 	code = bind(state->fd, 
+ 		    (struct sockaddr *)&state->addr, 
+ 		    sizeof(state->addr));
+ 	if (code == 0)
+ 	    break;
+ 	Log("SYNC_bindSock: bind failed with (%d), will sleep and retry\n",
+ 	    errno);
+ 	sleep(5);
+     }
+     listen(state->fd, state->listen_depth);
+ 
+     return code;
+ }
Index: openafs/src/vol/daemon_com.h
diff -c openafs/src/vol/daemon_com.h:1.1.4.1 openafs/src/vol/daemon_com.h:1.1.4.2
*** openafs/src/vol/daemon_com.h:1.1.4.1	Thu Nov  1 11:00:03 2007
--- openafs/src/vol/daemon_com.h	Mon Feb  4 13:51:39 2008
***************
*** 1,5 ****
  /*
!  * Copyright 2006-2007, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
--- 1,5 ----
  /*
!  * Copyright 2006-2008, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
***************
*** 22,29 ****
  #define SYNC_COM_CODE_USER_BASE 65536
  #define SYNC_COM_CODE_DECL(code) (SYNC_COM_CODE_USER_BASE+(code))
  
! /* general command codes */
! #define SYNC_COM_CHANNEL_CLOSE 0
  
  
  /* SYNC protocol response codes
--- 22,33 ----
  #define SYNC_COM_CODE_USER_BASE 65536
  #define SYNC_COM_CODE_DECL(code) (SYNC_COM_CODE_USER_BASE+(code))
  
! /** 
!  * general command codes.
!  */
! enum SYNCOpCode {
!     SYNC_COM_CHANNEL_CLOSE    = 0,      /**< request sync channel shutdown */
! };
  
  
  /* SYNC protocol response codes
***************
*** 34,46 ****
  #define SYNC_RES_CODE_USER_BASE 65536
  #define SYNC_RES_CODE_DECL(code) (SYNC_RES_CODE_USER_BASE+(code))
  
! /* general response codes */
! #define SYNC_OK                0   /* sync call returned ok */
! #define SYNC_DENIED            1   /* sync request denied by server */
! #define SYNC_COM_ERROR         2   /* sync protocol communicaions error */
! #define SYNC_BAD_COMMAND       3   /* sync command code not implemented by server */
! #define SYNC_FAILED            4   /* sync server-side procedure failed */
! 
  
  /* SYNC protocol reason codes
   *
--- 38,53 ----
  #define SYNC_RES_CODE_USER_BASE 65536
  #define SYNC_RES_CODE_DECL(code) (SYNC_RES_CODE_USER_BASE+(code))
  
! /**
!  * general response codes.
!  */
! enum SYNCReasonCode {
!     SYNC_OK                   = 0,  /**< sync call returned ok */
!     SYNC_DENIED               = 1,  /**< sync request denied by server */
!     SYNC_COM_ERROR            = 2,  /**< sync protocol communicaions error */
!     SYNC_BAD_COMMAND          = 3,  /**< sync command code not implemented by server */
!     SYNC_FAILED               = 4,  /**< sync server-side procedure failed */
! };
  
  /* SYNC protocol reason codes
   *
***************
*** 54,59 ****
--- 61,67 ----
  #define SYNC_REASON_NONE                 0
  #define SYNC_REASON_MALFORMED_PACKET     1
  #define SYNC_REASON_NOMEM                2
+ #define SYNC_REASON_ENCODING_ERROR       3
  
  /* SYNC protocol flags
   *
***************
*** 76,91 ****
      afs_int64 _##buf##_l[SYNC_PROTO_MAX_LEN/sizeof(afs_int64)]; \
      char * buf = (char *)(_##buf##_l)
  
  
! /* client-side state object */
  typedef struct SYNC_client_state {
!     int fd;
!     afs_uint16 port;
!     afs_uint32 proto_version;
!     int retry_limit;            /* max number of times for SYNC_ask to retry */
!     afs_int32 hard_timeout;     /* upper limit on time to keep trying */
      char * proto_name;          /**< sync protocol associated with this conn */
!     byte fatal_error;           /* fatal error on this client conn */
  } SYNC_client_state;
  
  /* wire types */
--- 84,136 ----
      afs_int64 _##buf##_l[SYNC_PROTO_MAX_LEN/sizeof(afs_int64)]; \
      char * buf = (char *)(_##buf##_l)
  
+ #ifdef USE_UNIX_SOCKETS
+ #include <afs/afsutil.h>
+ #include <sys/un.h>
+ #define SYNC_SOCK_DOMAIN AF_UNIX
+ typedef struct sockaddr_un SYNC_sockaddr_t;
+ #else  /* USE_UNIX_SOCKETS */
+ #define SYNC_SOCK_DOMAIN AF_INET
+ typedef struct sockaddr_in SYNC_sockaddr_t;
+ #endif /* USE_UNIX_SOCKETS */
+ 
+ /**
+  * sync server endpoint address.
+  */
+ typedef struct SYNC_endpoint {
+     int domain;     /**< socket domain */
+     afs_uint16 in;  /**< localhost ipv4 tcp port number */
+     char * un;      /**< unix domain socket filename (not a full path) */
+ } SYNC_endpoint_t;
+ 
+ #define SYNC_ENDPOINT_DECL(in_port, un_path) \
+     { SYNC_SOCK_DOMAIN, in_port, un_path }
+ 
+ 
+ /**
+  * SYNC server state structure.
+  */
+ typedef struct SYNC_server_state {
+     int fd;                     /**< listening socket descriptor */
+     SYNC_endpoint_t endpoint;   /**< server endpoint address */
+     afs_uint32 proto_version;   /**< our protocol version */
+     int bind_retry_limit;       /**< upper limit on times to retry socket bind() */
+     int listen_depth;           /**< socket listen queue depth */
+     char * proto_name;          /**< sync protocol associated with this conn */
+     SYNC_sockaddr_t addr;       /**< server listen socket sockaddr */
+ } SYNC_server_state_t;
  
! /**
!  * SYNC client state structure.
!  */
  typedef struct SYNC_client_state {
!     int fd;                     /**< client socket descriptor */
!     SYNC_endpoint_t endpoint;   /**< address of sync server */
!     afs_uint32 proto_version;   /**< our protocol version */
!     int retry_limit;            /**< max number of times for SYNC_ask to retry */
!     afs_int32 hard_timeout;     /**< upper limit on time to keep trying */
      char * proto_name;          /**< sync protocol associated with this conn */
!     byte fatal_error;           /**< nonzer if fatal error on this client conn */
  } SYNC_client_state;
  
  /* wire types */
***************
*** 126,131 ****
--- 171,179 ----
      afs_int32 recv_len;
  } SYNC_response;
  
+ /* general prototypes */
+ extern int SYNC_getSock(SYNC_endpoint_t * endpoint);
+ extern void SYNC_getAddr(SYNC_endpoint_t * endpoint, SYNC_sockaddr_t * addr);
  
  /* client-side prototypes */
  extern afs_int32 SYNC_ask(SYNC_client_state *, SYNC_command * com, SYNC_response * res);
***************
*** 138,142 ****
--- 186,192 ----
  extern int SYNC_getCom(int fd, SYNC_command * com);
  extern int SYNC_putRes(int fd, SYNC_response * res);
  extern int SYNC_verifyProtocolString(char * buf, size_t len);
+ extern void SYNC_cleanupSock(SYNC_server_state_t * state);
+ extern int SYNC_bindSock(SYNC_server_state_t * state);
  
  #endif /* _AFS_VOL_DAEMON_COM_H */
Index: openafs/src/vol/fssync-client.c
diff -c openafs/src/vol/fssync-client.c:1.1.4.2 openafs/src/vol/fssync-client.c:1.1.4.3
*** openafs/src/vol/fssync-client.c:1.1.4.2	Thu Nov  1 11:00:03 2007
--- openafs/src/vol/fssync-client.c	Mon Feb  4 13:51:39 2008
***************
*** 6,12 ****
   * License.  For details, see the LICENSE file in the top-level source
   * directory or online at http://www.openafs.org/dl/license10.html
   *
!  * Portions Copyright (c) 2006 Sine Nomine Associates
   */
  
  /*
--- 6,12 ----
   * License.  For details, see the LICENSE file in the top-level source
   * directory or online at http://www.openafs.org/dl/license10.html
   *
!  * Portions Copyright (c) 2006,2008 Sine Nomine Associates
   */
  
  /*
***************
*** 44,50 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/fssync-client.c,v 1.1.4.2 2007/11/01 15:00:03 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
--- 44,50 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/fssync-client.c,v 1.1.4.3 2008/02/04 18:51:39 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
***************
*** 94,100 ****
  
  static SYNC_client_state fssync_state = 
      { -1,                    /* file descriptor */
!       2040,                  /* port number */
        FSYNC_PROTO_VERSION,   /* protocol version */
        5,                     /* connect retry limit */
        120,                   /* hard timeout */
--- 94,100 ----
  
  static SYNC_client_state fssync_state = 
      { -1,                    /* file descriptor */
!       FSSYNC_ENDPOINT_DECL,  /* server endpoint */
        FSYNC_PROTO_VERSION,   /* protocol version */
        5,                     /* connect retry limit */
        120,                   /* hard timeout */
Index: openafs/src/vol/fssync-debug.c
diff -c openafs/src/vol/fssync-debug.c:1.1.4.1 openafs/src/vol/fssync-debug.c:1.1.4.2
*** openafs/src/vol/fssync-debug.c:1.1.4.1	Wed Oct 31 00:09:45 2007
--- openafs/src/vol/fssync-debug.c	Mon Feb  4 13:51:39 2008
***************
*** 1,5 ****
  /*
!  * Copyright 2006, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
--- 1,5 ----
  /*
!  * Copyright 2006-2008, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/fssync-debug.c,v 1.1.4.1 2007/10/31 04:09:45 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/fssync-debug.c,v 1.1.4.2 2008/02/04 18:51:39 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
***************
*** 71,76 ****
--- 71,78 ----
  
  struct volop_state {
      afs_uint32 volume;
+     afs_uint32 vnode;
+     afs_uint32 unique;
      char partName[16];
  };
  
***************
*** 100,106 ****
  static int VolHdrQuery(struct cmd_syndesc * as, void * rock);
  static int VolOpQuery(struct cmd_syndesc * as, void * rock);
  static int StatsQuery(struct cmd_syndesc * as, void * rock);
! 
  
  static void print_vol_stats_general(VolPkgStats * stats);
  static void print_vol_stats_viceP(struct DiskPartitionStats * stats);
--- 102,108 ----
  static int VolHdrQuery(struct cmd_syndesc * as, void * rock);
  static int VolOpQuery(struct cmd_syndesc * as, void * rock);
  static int StatsQuery(struct cmd_syndesc * as, void * rock);
! static int VnQuery(struct cmd_syndesc * as, void * rock);
  
  static void print_vol_stats_general(VolPkgStats * stats);
  static void print_vol_stats_viceP(struct DiskPartitionStats * stats);
***************
*** 190,195 ****
--- 192,205 ----
      VOLOP_PARMS_DECL(ts);
      cmd_CreateAlias(ts, "vop");
  
+     ts = cmd_CreateSyntax("vnode", VnQuery, NULL, "get vnode structure (FSYNC_VOL_QUERY_VNODE opcode)");
+     cmd_Seek(ts, CUSTOM_PARMS_OFFSET);
+     cmd_AddParm(ts, "-volumeid", CMD_SINGLE, 0, "volume id");
+     cmd_AddParm(ts, "-vnodeid", CMD_SINGLE, 0, "vnode id");
+     cmd_AddParm(ts, "-unique", CMD_SINGLE, 0, "uniquifier");
+     cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "paritition name");
+     COMMON_PARMS_DECL(ts);
+ 
      ts = cmd_CreateSyntax("stats", StatsQuery, NULL, "see 'stats help' for more information");
      cmd_Seek(ts, CUSTOM_PARMS_OFFSET);
      cmd_AddParm(ts, "-cmd", CMD_SINGLE, 0, "subcommand");
***************
*** 301,320 ****
      VDisconnectFS();
  }
  
  static char *
  response_code_to_string(afs_int32 response)
  {
      switch (response) {
!     case SYNC_OK:
! 	return "SYNC_OK";
!     case SYNC_DENIED:
! 	return "SYNC_DENIED";
!     case SYNC_COM_ERROR:
! 	return "SYNC_COM_ERROR";
!     case SYNC_BAD_COMMAND:
! 	return "SYNC_BAD_COMMAND";
!     case SYNC_FAILED:
! 	return "SYNC_FAILED";
      default:
  	return "**UNKNOWN**";
      }
--- 311,343 ----
      VDisconnectFS();
  }
  
+ 
+ #define ENUMTOSTRING(en)  #en
+ #define ENUMCASE(en) \
+     case en: \
+         return ENUMTOSTRING(en); \
+         break
+ 
+ #define FLAGTOSTRING(fl)  #fl
+ #define FLAGCASE(bitstr, fl, str, count) \
+     do { \
+         if ((bitstr) & (fl)) { \
+             if (count) \
+                 strlcat((str), " | ", sizeof(str)); \
+             strlcat((str), FLAGTOSTRING(fl), sizeof(str)); \
+             (count)++; \
+         } \
+     } while (0)
+ 
  static char *
  response_code_to_string(afs_int32 response)
  {
      switch (response) {
! 	ENUMCASE(SYNC_OK);
! 	ENUMCASE(SYNC_DENIED);
! 	ENUMCASE(SYNC_COM_ERROR);
! 	ENUMCASE(SYNC_BAD_COMMAND);
! 	ENUMCASE(SYNC_FAILED);
      default:
  	return "**UNKNOWN**";
      }
***************
*** 324,361 ****
  command_code_to_string(afs_int32 command)
  {
      switch (command) {
!     case SYNC_COM_CHANNEL_CLOSE:
! 	return "SYNC_COM_CHANNEL_CLOSE";
!     case FSYNC_VOL_ON:
! 	return "FSYNC_VOL_ON";
!     case FSYNC_VOL_OFF:
! 	return "FSYNC_VOL_OFF";
!     case FSYNC_VOL_LISTVOLUMES:
! 	return "FSYNC_VOL_LISTVOLUMES";
!     case FSYNC_VOL_NEEDVOLUME:
! 	return "FSYNC_VOL_NEEDVOLUME";
!     case FSYNC_VOL_MOVE:
! 	return "FSYNC_VOL_MOVE";
!     case FSYNC_VOL_BREAKCBKS:
! 	return "FSYNC_VOL_BREAKCBKS";
!     case FSYNC_VOL_DONE:
! 	return "FSYNC_VOL_DONE";
!     case FSYNC_VOL_QUERY:
! 	return "FSYNC_VOL_QUERY";
!     case FSYNC_VOL_QUERY_HDR:
! 	return "FSYNC_VOL_QUERY_HDR";
!     case FSYNC_VOL_QUERY_VOP:
! 	return "FSYNC_VOL_QUERY_VOP";
!     case FSYNC_VOL_STATS_GENERAL:
! 	return "FSYNC_VOL_STATS_GENERAL";
!     case FSYNC_VOL_STATS_VICEP:
! 	return "FSYNC_VOL_STATS_VICEP";
!     case FSYNC_VOL_STATS_HASH:
! 	return "FSYNC_VOL_STATS_HASH";
!     case FSYNC_VOL_STATS_HDR:
! 	return "FSYNC_VOL_STATS_HDR";
!     case FSYNC_VOL_STATS_VLRU:
! 	return "FSYNC_VOL_STATS_VLRU";
      default:
  	return "**UNKNOWN**";
      }
--- 347,372 ----
  command_code_to_string(afs_int32 command)
  {
      switch (command) {
! 	ENUMCASE(SYNC_COM_CHANNEL_CLOSE);
! 	ENUMCASE(FSYNC_VOL_ON);
! 	ENUMCASE(FSYNC_VOL_OFF);
! 	ENUMCASE(FSYNC_VOL_LISTVOLUMES);
! 	ENUMCASE(FSYNC_VOL_NEEDVOLUME);
! 	ENUMCASE(FSYNC_VOL_MOVE);
! 	ENUMCASE(FSYNC_VOL_BREAKCBKS);
! 	ENUMCASE(FSYNC_VOL_DONE);
! 	ENUMCASE(FSYNC_VOL_QUERY);
! 	ENUMCASE(FSYNC_VOL_QUERY_HDR);
! 	ENUMCASE(FSYNC_VOL_QUERY_VOP);
! 	ENUMCASE(FSYNC_VOL_STATS_GENERAL);
! 	ENUMCASE(FSYNC_VOL_STATS_VICEP);
! 	ENUMCASE(FSYNC_VOL_STATS_HASH);
! 	ENUMCASE(FSYNC_VOL_STATS_HDR);
! 	ENUMCASE(FSYNC_VOL_STATS_VLRU);
! 	ENUMCASE(FSYNC_VOL_ATTACH);
! 	ENUMCASE(FSYNC_VOL_FORCE_ERROR);
! 	ENUMCASE(FSYNC_VOL_LEAVE_OFF);
! 	ENUMCASE(FSYNC_VOL_QUERY_VNODE);
      default:
  	return "**UNKNOWN**";
      }
***************
*** 365,392 ****
  reason_code_to_string(afs_int32 reason)
  {
      switch (reason) {
!     case SYNC_REASON_NONE:
! 	return "SYNC_REASON_NONE";
!     case SYNC_REASON_MALFORMED_PACKET:
! 	return "SYNC_REASON_MALFORMED_PACKET";
!     case FSYNC_WHATEVER:
! 	return "FSYNC_WHATEVER";
!     case FSYNC_SALVAGE:
! 	return "FSYNC_SALVAGE";
!     case FSYNC_MOVE:
! 	return "FSYNC_MOVE";
!     case FSYNC_OPERATOR:
! 	return "FSYNC_OPERATOR";
!     case FSYNC_EXCLUSIVE:
! 	return "FSYNC_EXCLUSIVE";
!     case FSYNC_UNKNOWN_VOLID:
! 	return "FSYNC_UNKNOWN_VOLID";
!     case FSYNC_HDR_NOT_ATTACHED:
! 	return "FSYNC_HDR_NOT_ATTACHED";
!     case FSYNC_NO_PENDING_VOL_OP:
! 	return "FSYNC_NO_PENDING_VOL_OP";
!     case FSYNC_VOL_PKG_ERROR:
! 	return "FSYNC_VOL_PKG_ERROR";
      default:
  	return "**UNKNOWN**";
      }
--- 376,395 ----
  reason_code_to_string(afs_int32 reason)
  {
      switch (reason) {
! 	ENUMCASE(SYNC_REASON_NONE);
! 	ENUMCASE(SYNC_REASON_MALFORMED_PACKET);
! 	ENUMCASE(SYNC_REASON_NOMEM);
! 	ENUMCASE(SYNC_REASON_ENCODING_ERROR);
! 	ENUMCASE(FSYNC_WHATEVER);
! 	ENUMCASE(FSYNC_SALVAGE);
! 	ENUMCASE(FSYNC_MOVE);
! 	ENUMCASE(FSYNC_OPERATOR);
! 	ENUMCASE(FSYNC_EXCLUSIVE);
! 	ENUMCASE(FSYNC_UNKNOWN_VOLID);
! 	ENUMCASE(FSYNC_HDR_NOT_ATTACHED);
! 	ENUMCASE(FSYNC_NO_PENDING_VOL_OP);
! 	ENUMCASE(FSYNC_VOL_PKG_ERROR);
! 	ENUMCASE(FSYNC_UNKNOWN_VNID);
      default:
  	return "**UNKNOWN**";
      }
***************
*** 396,411 ****
  program_type_to_string(afs_int32 type)
  {
      switch ((ProgramType)type) {
!     case fileServer:
! 	return "fileServer";
!     case volumeUtility:
! 	return "volumeUtility";
!     case salvager:
! 	return "salvager";
!     case salvageServer:
! 	return "salvageServer";
!     case debugUtility:
!       return "debugUtility";
      default:
  	return "**UNKNOWN**";
      }
--- 399,409 ----
  program_type_to_string(afs_int32 type)
  {
      switch ((ProgramType)type) {
! 	ENUMCASE(fileServer);
! 	ENUMCASE(volumeUtility);
! 	ENUMCASE(salvager);
! 	ENUMCASE(salvageServer);
! 	ENUMCASE(debugUtility);
      default:
  	return "**UNKNOWN**";
      }
***************
*** 507,544 ****
  vol_state_to_string(VolState state)
  {
      switch (state) {
!     case VOL_STATE_UNATTACHED:
! 	return "VOL_STATE_UNATTACHED";
!     case VOL_STATE_PREATTACHED:
! 	return "VOL_STATE_PREATTACHED";
!     case VOL_STATE_ATTACHING:
! 	return "VOL_STATE_ATTACHING";
!     case VOL_STATE_ATTACHED:
! 	return "VOL_STATE_ATTACHED";
!     case VOL_STATE_UPDATING:
! 	return "VOL_STATE_UPDATING";
!     case VOL_STATE_GET_BITMAP:
! 	return "VOL_STATE_GET_BITMAP";
!     case VOL_STATE_HDR_LOADING:
! 	return "VOL_STATE_HDR_LOADING";
!     case VOL_STATE_HDR_ATTACHING:
! 	return "VOL_STATE_HDR_ATTACHING";
!     case VOL_STATE_SHUTTING_DOWN:
! 	return "VOL_STATE_SHUTTING_DOWN";
!     case VOL_STATE_GOING_OFFLINE:
! 	return "VOL_STATE_GOING_OFFLINE";
!     case VOL_STATE_OFFLINING:
! 	return "VOL_STATE_OFFLINING";
!     case VOL_STATE_DETACHING:
! 	return "VOL_STATE_DETACHING";
!     case VOL_STATE_SALVSYNC_REQ:
!       return "VOL_STATE_SALVSYNC_REQ";
!     case VOL_STATE_SALVAGING:
! 	return "VOL_STATE_SALVAGING";
!     case VOL_STATE_ERROR:
! 	return "VOL_STATE_ERROR";
!     case VOL_STATE_FREED:
! 	return "VOL_STATE_FREED";
      default:
  	return "**UNKNOWN**";
      }
--- 505,531 ----
  vol_state_to_string(VolState state)
  {
      switch (state) {
! 	ENUMCASE(VOL_STATE_UNATTACHED);
! 	ENUMCASE(VOL_STATE_PREATTACHED);
! 	ENUMCASE(VOL_STATE_ATTACHING);
! 	ENUMCASE(VOL_STATE_ATTACHED);
! 	ENUMCASE(VOL_STATE_UPDATING);
! 	ENUMCASE(VOL_STATE_GET_BITMAP);
! 	ENUMCASE(VOL_STATE_HDR_LOADING);
! 	ENUMCASE(VOL_STATE_HDR_ATTACHING);
! 	ENUMCASE(VOL_STATE_SHUTTING_DOWN);
! 	ENUMCASE(VOL_STATE_GOING_OFFLINE);
! 	ENUMCASE(VOL_STATE_OFFLINING);
! 	ENUMCASE(VOL_STATE_DETACHING);
! 	ENUMCASE(VOL_STATE_SALVSYNC_REQ);
! 	ENUMCASE(VOL_STATE_SALVAGING);
! 	ENUMCASE(VOL_STATE_ERROR);
! 	ENUMCASE(VOL_STATE_VNODE_ALLOC);
! 	ENUMCASE(VOL_STATE_VNODE_GET);
! 	ENUMCASE(VOL_STATE_VNODE_CLOSE);
! 	ENUMCASE(VOL_STATE_VNODE_RELEASE);
! 	ENUMCASE(VOL_STATE_VLRU_ADD);
! 	ENUMCASE(VOL_STATE_FREED);
      default:
  	return "**UNKNOWN**";
      }
***************
*** 551,614 ****
      int count = 0;
      str[0]='\0';
  
!     if (flags & VOL_HDR_ATTACHED) {
! 	strlcat(str, "VOL_HDR_ATTACHED", sizeof(str));
! 	count++;
!     }
! 
!     if (flags & VOL_HDR_LOADED) {
! 	if (count) {
! 	    strlcat(str, " | ", sizeof(str));
! 	}
! 	strlcat(str, "VOL_HDR_LOADED", sizeof(str));
! 	count++;
!     }
! 
!     if (flags & VOL_HDR_IN_LRU) {
! 	if (count) {
! 	    strlcat(str, " | ", sizeof(str));
! 	}
! 	strlcat(str, "VOL_HDR_IN_LRU", sizeof(str));
! 	count++;
!     }
! 
!     if (flags & VOL_IN_HASH) {
! 	if (count) {
! 	    strlcat(str, " | ", sizeof(str));
! 	}
! 	strlcat(str, "VOL_IN_HASH", sizeof(str));
! 	count++;
!     }
! 
!     if (flags & VOL_ON_VBYP_LIST) {
! 	if (count) {
! 	    strlcat(str, " | ", sizeof(str));
! 	}
! 	strlcat(str, "VOL_ON_VBYP_LIST", sizeof(str));
! 	count++;
!     }
! 
!     if (flags & VOL_IS_BUSY) {
! 	if (count) {
! 	    strlcat(str, " | ", sizeof(str));
! 	}
! 	strlcat(str, "VOL_IS_BUSY", sizeof(str));
! 	count++;
!     }
! 
!     if (flags & VOL_ON_VLRU) {
! 	if (count) {
! 	    strlcat(str, " | ", sizeof(str));
! 	}
! 	strlcat(str, "VOL_ON_VLRU", sizeof(str));
!     }
! 
!     if (flags & VOL_HDR_DONTSALV) {
! 	if (count) {
! 	    strlcat(str, " | ", sizeof(str));
! 	}
! 	strlcat(str, "VOL_HDR_DONTSALV", sizeof(str));
!     }
  
      return str;
  }
--- 538,551 ----
      int count = 0;
      str[0]='\0';
  
!     FLAGCASE(flags, VOL_HDR_ATTACHED, str, count);
!     FLAGCASE(flags, VOL_HDR_LOADED, str, count);
!     FLAGCASE(flags, VOL_HDR_IN_LRU, str, count);
!     FLAGCASE(flags, VOL_IN_HASH, str, count);
!     FLAGCASE(flags, VOL_ON_VBYP_LIST, str, count);
!     FLAGCASE(flags, VOL_IS_BUSY, str, count);
!     FLAGCASE(flags, VOL_ON_VLRU, str, count);
!     FLAGCASE(flags, VOL_HDR_DONTSALV, str, count);
  
      return str;
  }
***************
*** 617,638 ****
  vlru_idx_to_string(int idx)
  {
      switch (idx) {
!     case VLRU_QUEUE_NEW:
! 	return "VLRU_QUEUE_NEW";
!     case VLRU_QUEUE_MID:
! 	return "VLRU_QUEUE_MID";
!     case VLRU_QUEUE_OLD:
! 	return "VLRU_QUEUE_OLD";
!     case VLRU_QUEUE_CANDIDATE:
! 	return "VLRU_QUEUE_CANDIDATE";
!     case VLRU_QUEUE_HELD:
! 	return "VLRU_QUEUE_HELD";
!     case VLRU_QUEUE_INVALID:
! 	return "VLRU_QUEUE_INVALID";
      default:
  	return "**UNKNOWN**";
      }
  }
  #endif
  
  static int
--- 554,603 ----
  vlru_idx_to_string(int idx)
  {
      switch (idx) {
! 	ENUMCASE(VLRU_QUEUE_NEW);
! 	ENUMCASE(VLRU_QUEUE_MID);
! 	ENUMCASE(VLRU_QUEUE_OLD);
! 	ENUMCASE(VLRU_QUEUE_CANDIDATE);
! 	ENUMCASE(VLRU_QUEUE_HELD);
! 	ENUMCASE(VLRU_QUEUE_INVALID);
!     default:
! 	return "**UNKNOWN**";
!     }
! }
! 
! 
! static char *
! vn_state_to_string(VnState state)
! {
!     switch (state) {
! 	ENUMCASE(VN_STATE_INVALID);
! 	ENUMCASE(VN_STATE_RELEASING);
! 	ENUMCASE(VN_STATE_CLOSING);
! 	ENUMCASE(VN_STATE_ALLOC);
! 	ENUMCASE(VN_STATE_ONLINE);
! 	ENUMCASE(VN_STATE_LOAD);
! 	ENUMCASE(VN_STATE_EXCLUSIVE);
! 	ENUMCASE(VN_STATE_STORE);
! 	ENUMCASE(VN_STATE_READ);
! 	ENUMCASE(VN_STATE_ERROR);
      default:
  	return "**UNKNOWN**";
      }
  }
+ 
+ static char *
+ vn_flags_to_string(afs_uint32 flags)
+ {
+     static char str[128];
+     int count = 0;
+     str[0]='\0';
+ 
+     FLAGCASE(flags, VN_ON_HASH, str, count);
+     FLAGCASE(flags, VN_ON_LRU, str, count);
+     FLAGCASE(flags, VN_ON_VVN, str, count);
+ 
+     return str;
+ }
  #endif
  
  static int
***************
*** 737,742 ****
--- 702,708 ----
  	    printf("\t\tlast_get         = %u\n", v.stats.last_get);
  	    printf("\t\tlast_promote     = %u\n", v.stats.last_promote);
  	    printf("\t\tlast_hdr_get     = %u\n", v.stats.last_hdr_get);
+ 	    printf("\t\tlast_hdr_load    = %u\n", v.stats.last_hdr_load);
  	    printf("\t\tlast_salvage     = %u\n", v.stats.last_salvage);
  	    printf("\t\tlast_salvage_req = %u\n", v.stats.last_salvage_req);
  	    printf("\t\tlast_vol_op      = %u\n", v.stats.last_vol_op);
***************
*** 892,897 ****
--- 858,1034 ----
  }
  
  static int
+ vn_prolog(struct cmd_syndesc * as, struct state * state)
+ {
+     register struct cmd_item *ti;
+     char pname[100], *temp;
+ 
+     state->vop = (struct volop_state *) calloc(1, sizeof(struct volop_state));
+     assert(state->vop != NULL);
+ 
+     if ((ti = as->parms[CUSTOM_PARMS_OFFSET].items)) {	/* -volumeid */
+ 	state->vop->volume = atoi(ti->data);
+     } else {
+ 	fprintf(stderr, "required argument -volumeid not given\n");
+     }
+ 
+     if ((ti = as->parms[CUSTOM_PARMS_OFFSET+1].items)) {	/* -vnodeid */
+ 	state->vop->vnode = atoi(ti->data);
+     } else {
+ 	fprintf(stderr, "required argument -vnodeid not given\n");
+     }
+ 
+     if ((ti = as->parms[CUSTOM_PARMS_OFFSET+2].items)) {	/* -unique */
+ 	state->vop->unique = atoi(ti->data);
+     } else {
+ 	state->vop->unique = 0;
+     }
+ 
+     if ((ti = as->parms[COMMON_VOLOP_PARMS_OFFSET+3].items)) {	/* -partition */
+ 	strlcpy(state->vop->partName, ti->data, sizeof(state->vop->partName));
+     } else {
+ 	memset(state->vop->partName, 0, sizeof(state->vop->partName));
+     }
+ 
+     return 0;
+ }
+ 
+ static int
+ do_vnqry(struct state * state, SYNC_response * res)
+ {
+     afs_int32 code;
+     int command = FSYNC_VOL_QUERY_VNODE;
+     FSSYNC_VnQry_hdr qry;
+ 
+     qry.volume = state->vop->volume;
+     qry.vnode = state->vop->vnode;
+     qry.unique = state->vop->unique;
+     qry.spare = 0;
+     strlcpy(qry.partName, state->vop->partName, sizeof(qry.partName));
+ 
+     fprintf(stderr, "calling FSYNC_GenericOp with command code %d (%s)\n", 
+ 	    command, command_code_to_string(command));
+ 
+     code = FSYNC_GenericOp(&qry, sizeof(qry), command, FSYNC_OPERATOR, res);
+ 
+     switch (code) {
+     case SYNC_OK:
+     case SYNC_DENIED:
+ 	break;
+     default:
+ 	fprintf(stderr, "possible sync protocol error. return code was %d\n", code);
+     }
+ 
+     fprintf(stderr, "FSYNC_GenericOp returned %d (%s)\n", code, response_code_to_string(code));
+     fprintf(stderr, "protocol response code was %d (%s)\n", 
+ 	    res->hdr.response, response_code_to_string(res->hdr.response));
+     fprintf(stderr, "protocol reason code was %d (%s)\n", 
+ 	    res->hdr.reason, reason_code_to_string(res->hdr.reason));
+ 
+     VDisconnectFS();
+ 
+     return 0;
+ }
+ 
+ static int
+ VnQuery(struct cmd_syndesc * as, void * rock)
+ {
+     struct state state;
+     SYNC_PROTO_BUF_DECL(res_buf);
+     SYNC_response res;
+     Vnode v;
+     int hi, lo;
+ 
+     res.hdr.response_len = sizeof(res.hdr);
+     res.payload.buf = res_buf;
+     res.payload.len = SYNC_PROTO_MAX_LEN;
+ 
+     common_prolog(as, &state);
+     vn_prolog(as, &state);
+ 
+     do_vnqry(&state, &res);
+ 
+     if (res.hdr.response == SYNC_OK) {
+ 	memcpy(&v, res.payload.buf, sizeof(Volume));
+ 
+ 	printf("vnode = {\n");
+ 
+ 	printf("\tvid_hash = {\n");
+ 	printf("\t\tnext = 0x%lx\n", v.vid_hash.next);
+ 	printf("\t\tprev = 0x%lx\n", v.vid_hash.prev);
+ 	printf("\t}\n");
+ 
+ 	printf("\thashNext        = 0x%lx\n", v.hashNext);
+ 	printf("\tlruNext         = 0x%lx\n", v.lruNext);
+ 	printf("\tlruPrev         = 0x%lx\n", v.lruPrev);
+ 	printf("\thashIndex       = %hu\n", v.hashIndex);
+ 	printf("\tchanged_newTime = %u\n", (unsigned int) v.changed_newTime);
+ 	printf("\tchanged_oldTime = %u\n", (unsigned int) v.changed_oldTime);
+ 	printf("\tdelete          = %u\n", (unsigned int) v.delete);
+ 	printf("\tvnodeNumber     = %u\n", v.vnodeNumber);
+ 	printf("\tvolumePtr       = 0x%lx\n", v.volumePtr);
+ 	printf("\tnUsers          = %u\n", v.nUsers);
+ 	printf("\tcacheCheck      = %u\n", v.cacheCheck);
+ 
+ #ifdef AFS_DEMAND_ATTACH_FS
+ 	if (!(res.hdr.flags & SYNC_FLAG_DAFS_EXTENSIONS)) {
+ 	    printf("*** fssync-debug built to expect demand attach extensions.  server asserted\n");
+ 	    printf("*** that it was not compiled with demand attach turned on.  please recompile\n");
+ 	    printf("*** fssync-debug to match your server\n");
+ 	    goto done;
+ 	}
+ 
+ 	printf("\tnReaders        = %u\n", v.nReaders);
+ 	printf("\tvn_state_flags  = %s\n", vn_flags_to_string(v.vn_state_flags));
+ 	printf("\tvn_state        = %s\n", vn_state_to_string(v.vn_state));
+ #else
+ 	if (res.hdr.flags & SYNC_FLAG_DAFS_EXTENSIONS) {
+ 	    printf("*** server asserted demand attach extensions. fssync-debug not built to\n");
+ 	    printf("*** recognize those extensions. please recompile fssync-debug if you need\n");
+ 	    printf("*** to dump dafs extended state\n");
+ 	    goto done;
+ 	}
+ #endif /* !AFS_DEMAND_ATTACH_FS */
+ 
+ 	printf("\twriter          = %u\n", v.writer);
+ 	printf("\tvcp             = 0x%lx\n", v.vcp);
+ 	printf("\thandle          = 0x%lx\n", v.handle);
+ 
+ 	printf("\tdisk = {\n");
+ 	printf("\t\ttype              = %u\n", v.disk.type);
+ 	printf("\t\tcloned            = %u\n", v.disk.cloned);
+ 	printf("\t\tmodeBits          = %u\n", v.disk.modeBits);
+ 	printf("\t\tlinkCount         = %d\n", v.disk.linkCount);
+ 	printf("\t\tlength            = %u\n", v.disk.length);
+ 	printf("\t\tuniquifier        = %u\n", v.disk.uniquifier);
+ 	printf("\t\tdataVersion       = %u\n", v.disk.dataVersion);
+ 	printf("\t\tvn_ino_lo         = %u\n", v.disk.vn_ino_lo);
+ 	printf("\t\tunixModifyTime    = %u\n", v.disk.unixModifyTime);
+ 	printf("\t\tauthor            = %u\n", v.disk.author);
+ 	printf("\t\towner             = %u\n", v.disk.owner);
+ 	printf("\t\tparent            = %u\n", v.disk.parent);
+ 	printf("\t\tvnodeMagic        = %u\n", v.disk.vnodeMagic);
+ 
+ 	printf("\t\tlock = {\n");
+ 	printf("\t\t\tlockCount   = %d\n", v.disk.lock.lockCount);
+ 	printf("\t\t\tlockTime    = %d\n", v.disk.lock.lockTime);
+ 	printf("\t\t}\n");
+ 
+ 	printf("\t\tserverModifyTime  = %u\n", v.disk.serverModifyTime);
+ 	printf("\t\tgroup             = %d\n", v.disk.group);
+ 	printf("\t\tvn_ino_hi         = %d\n", v.disk.vn_ino_hi);
+ 	printf("\t\treserved6         = %u\n", v.disk.reserved6);
+ 	printf("\t}\n");
+ 
+ 	printf("}\n");
+     }
+ 
+  done:
+     return 0;
+ }
+ 
+ 
+ static int
  StatsQuery(struct cmd_syndesc * as, void * rock)
  {
      afs_int32 code;
Index: openafs/src/vol/fssync-server.c
diff -c openafs/src/vol/fssync-server.c:1.1.4.5 openafs/src/vol/fssync-server.c:1.1.4.8
*** openafs/src/vol/fssync-server.c:1.1.4.5	Thu Nov  1 11:00:03 2007
--- openafs/src/vol/fssync-server.c	Sun Feb 10 22:37:22 2008
***************
*** 6,12 ****
   * License.  For details, see the LICENSE file in the top-level source
   * directory or online at http://www.openafs.org/dl/license10.html
   *
!  * Portions Copyright (c) 2006-2007 Sine Nomine Associates
   */
  
  /*
--- 6,12 ----
   * License.  For details, see the LICENSE file in the top-level source
   * directory or online at http://www.openafs.org/dl/license10.html
   *
!  * Portions Copyright (c) 2006-2008 Sine Nomine Associates
   */
  
  /*
***************
*** 53,59 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/fssync-server.c,v 1.1.4.5 2007/11/01 15:00:03 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
--- 53,59 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/fssync-server.c,v 1.1.4.8 2008/02/11 03:37:22 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
***************
*** 88,93 ****
--- 88,94 ----
  #include "ihandle.h"
  #include "vnode.h"
  #include "volume.h"
+ #include "volume_inline.h"
  #include "partition.h"
  
  #ifdef HAVE_POLL
***************
*** 118,135 ****
  				 * cloned read-only copies offline when salvaging
  				 * a single read-write volume */
  
- #define MAX_BIND_TRIES	5	/* Number of times to retry socket bind */
- 
  
  
  static struct offlineInfo OfflineVolumes[MAXHANDLERS][MAXOFFLINEVOLUMES];
  
! static int AcceptSd = -1;	/* Socket used by server for accepting connections */
  
- static int getport();
  
  /* Forward declarations */
! static void FSYNC_sync();
  static void FSYNC_newconnection();
  static void FSYNC_com();
  static void FSYNC_Drop();
--- 119,143 ----
  				 * cloned read-only copies offline when salvaging
  				 * a single read-write volume */
  
  
  
  static struct offlineInfo OfflineVolumes[MAXHANDLERS][MAXOFFLINEVOLUMES];
  
! /**
!  * fssync server socket handle.
!  */
! static SYNC_server_state_t fssync_server_state = 
!     { -1,                       /* file descriptor */
!       FSSYNC_ENDPOINT_DECL,     /* server endpoint */
!       FSYNC_PROTO_VERSION,      /* protocol version */
!       5,                        /* bind() retry limit */
!       100,                      /* listen() queue depth */
!       "FSSYNC",                 /* protocol name string */
!     };
  
  
  /* Forward declarations */
! static void * FSYNC_sync(void *);
  static void FSYNC_newconnection();
  static void FSYNC_com();
  static void FSYNC_Drop();
***************
*** 151,156 ****
--- 159,165 ----
  
  static afs_int32 FSYNC_com_VolOp(int fd, SYNC_command * com, SYNC_response * res);
  
+ static afs_int32 FSYNC_com_VolError(FSSYNC_VolOp_command * com, SYNC_response * res);
  static afs_int32 FSYNC_com_VolOn(FSSYNC_VolOp_command * com, SYNC_response * res);
  static afs_int32 FSYNC_com_VolOff(FSSYNC_VolOp_command * com, SYNC_response * res);
  static afs_int32 FSYNC_com_VolMove(FSSYNC_VolOp_command * com, SYNC_response * res);
***************
*** 162,167 ****
--- 171,178 ----
  static afs_int32 FSYNC_com_VolOpQuery(FSSYNC_VolOp_command * com, SYNC_response * res);
  #endif /* AFS_DEMAND_ATTACH_FS */
  
+ static afs_int32 FSYNC_com_VnQry(int fd, SYNC_command * com, SYNC_response * res);
+ 
  static afs_int32 FSYNC_com_StatsOp(int fd, SYNC_command * com, SYNC_response * res);
  
  static afs_int32 FSYNC_com_StatsOpGeneral(FSSYNC_StatsOp_command * scom, SYNC_response * res);
***************
*** 209,258 ****
  static fd_set FSYNC_readfds;
  #endif
  
- #ifdef USE_UNIX_SOCKETS
- static int
- getport(struct sockaddr_un *addr)
- {
-     int sd;
-     char tbuffer[AFSDIR_PATH_MAX]; 
-     
-     strcompose(tbuffer, AFSDIR_PATH_MAX, AFSDIR_SERVER_LOCAL_DIRPATH, "/",
-                "fssync.sock", NULL);
-     
-     memset(addr, 0, sizeof(*addr));
-     addr->sun_family = AF_UNIX;
-     strncpy(addr->sun_path, tbuffer, (sizeof(struct sockaddr_un) - sizeof(short)));
-     assert((sd = socket(AF_UNIX, SOCK_STREAM, 0)) >= 0);
-     return sd;
- }
- #else
- static int
- getport(struct sockaddr_in *addr)
- {
-     int sd;
- 
-     memset(addr, 0, sizeof(*addr));
-     assert((sd = socket(AF_INET, SOCK_STREAM, 0)) >= 0);
- #ifdef STRUCT_SOCKADDR_HAS_SA_LEN
-     addr->sin_len = sizeof(struct sockaddr_in);
- #endif
-     addr->sin_addr.s_addr = htonl(0x7f000001);
-     addr->sin_family = AF_INET;	/* was localhost->h_addrtype */
-     addr->sin_port = htons(2040);	/* XXXX htons not _really_ neccessary */
- 
-     return sd;
- }
- #endif
- 
  
! static void
! FSYNC_sync()
  {
  #ifdef USE_UNIX_SOCKETS
-     struct sockaddr_un addr;
      char tbuffer[AFSDIR_PATH_MAX];
- #else  /* USE_UNIX_SOCKETS */
-     struct sockaddr_in addr;
  #endif /* USE_UNIX_SOCKETS */
      int on = 1;
      extern int VInit;
--- 220,231 ----
  static fd_set FSYNC_readfds;
  #endif
  
  
! static void *
! FSYNC_sync(void * args)
  {
  #ifdef USE_UNIX_SOCKETS
      char tbuffer[AFSDIR_PATH_MAX];
  #endif /* USE_UNIX_SOCKETS */
      int on = 1;
      extern int VInit;
***************
*** 261,266 ****
--- 234,243 ----
  #ifdef AFS_PTHREAD_ENV
      int tid;
  #endif
+     SYNC_server_state_t * state = &fssync_server_state;
+ 
+     SYNC_getAddr(&state->endpoint, &state->addr);
+     SYNC_cleanupSock(state);
  
  #ifndef AFS_NT40_ENV
      (void)signal(SIGPIPE, SIG_IGN);
***************
*** 275,288 ****
      Log("Set thread id %d for FSYNC_sync\n", tid);
  #endif /* AFS_PTHREAD_ENV */
  
- #ifdef USE_UNIX_SOCKETS
-     /* ignore errors */
-     strcompose(tbuffer, AFSDIR_PATH_MAX, AFSDIR_SERVER_LOCAL_DIRPATH, "/",
- 	       "fssync.sock", NULL);
- 
-     remove(tbuffer);
- #endif /* USE_UNIX_SOCKETS */
- 
      while (!VInit) {
  	/* Let somebody else run until level > 0.  That doesn't mean that 
  	 * all volumes have been attached. */
--- 252,257 ----
***************
*** 292,317 ****
  	LWP_DispatchProcess();
  #endif /* AFS_PTHREAD_ENV */
      }
!     AcceptSd = getport(&addr);
!     /* Reuseaddr needed because system inexplicably leaves crud lying around */
!     code =
! 	setsockopt(AcceptSd, SOL_SOCKET, SO_REUSEADDR, (char *)&on,
! 		   sizeof(on));
!     if (code)
! 	Log("FSYNC_sync: setsockopt failed with (%d)\n", errno);
! 
!     for (numTries = 0; numTries < MAX_BIND_TRIES; numTries++) {
! 	if ((code =
! 	     bind(AcceptSd, (struct sockaddr *)&addr, sizeof(addr))) == 0)
! 	    break;
! 	Log("FSYNC_sync: bind failed with (%d), will sleep and retry\n",
! 	    errno);
! 	sleep(5);
!     }
      assert(!code);
!     listen(AcceptSd, 100);
      InitHandler();
      AcceptOn();
      for (;;) {
  #if defined(HAVE_POLL) && defined(AFS_PTHREAD_ENV)
          int nfds;
--- 261,274 ----
  	LWP_DispatchProcess();
  #endif /* AFS_PTHREAD_ENV */
      }
! 
!     state->fd = SYNC_getSock(&state->endpoint);
!     code = SYNC_bindSock(state);
      assert(!code);
! 
      InitHandler();
      AcceptOn();
+ 
      for (;;) {
  #if defined(HAVE_POLL) && defined(AFS_PTHREAD_ENV)
          int nfds;
***************
*** 405,411 ****
--- 362,371 ----
      VOL_LOCK;
      switch (com.hdr.command) {
      case FSYNC_VOL_ON:
+     case FSYNC_VOL_ATTACH:
+     case FSYNC_VOL_LEAVE_OFF:
      case FSYNC_VOL_OFF:
+     case FSYNC_VOL_FORCE_ERROR:
      case FSYNC_VOL_LISTVOLUMES:
      case FSYNC_VOL_NEEDVOLUME:
      case FSYNC_VOL_MOVE:
***************
*** 423,428 ****
--- 383,391 ----
      case FSYNC_VOL_STATS_VLRU:
  	res.hdr.response = FSYNC_com_StatsOp(fd, &com, &res);
  	break;
+     case FSYNC_VOL_QUERY_VNODE:
+ 	res.hdr.response = FSYNC_com_VnQry(fd, &com, &res);
+ 	break;
      default:
  	res.hdr.response = SYNC_BAD_COMMAND;
  	break;
***************
*** 465,470 ****
--- 428,435 ----
  
      switch (com->hdr.command) {
      case FSYNC_VOL_ON:
+     case FSYNC_VOL_ATTACH:
+     case FSYNC_VOL_LEAVE_OFF:
  	code = FSYNC_com_VolOn(&vcom, res);
  	break;
      case FSYNC_VOL_OFF:
***************
*** 490,495 ****
--- 455,463 ----
  	code = FSYNC_com_VolHdrQuery(&vcom, res);
  	break;
  #ifdef AFS_DEMAND_ATTACH_FS
+     case FSYNC_VOL_FORCE_ERROR:
+ 	code = FSYNC_com_VolError(&vcom, res);
+ 	break;
      case FSYNC_VOL_QUERY_VOP:
  	code = FSYNC_com_VolOpQuery(&vcom, res);
  	break;
***************
*** 554,582 ****
  
      /* so, we need to attach the volume */
  
      if (vcom->v)
  	vcom->v->volumeID = 0;
      tvolName[0] = '/';
      snprintf(&tvolName[1], sizeof(tvolName)-1, VFORMAT, vcom->vop->volume);
      tvolName[sizeof(tvolName)-1] = '\0';
  
- #ifdef AFS_DEMAND_ATTACH_FS
-     vp = VPreAttachVolumeByName_r(&error, vcom->vop->partName, tvolName,
- 				  V_VOLUPD);
-     if (vp && vp->pending_vol_op) {
- 	VDeregisterVolOp_r(vp, vp->pending_vol_op);
-     }
- #else /* AFS_DEMAND_ATTACH_FS */
      vp = VAttachVolumeByName_r(&error, vcom->vop->partName, tvolName,
  			       V_VOLUPD);
      if (vp)
  	VPutVolume_r(vp);
- #endif /* AFS_DEMAND_ATTACH_FS */
- 
      if (error) {
  	code = SYNC_DENIED;
  	res->hdr.reason = error;
      }
  
   done:
      return code;
--- 522,586 ----
  
      /* so, we need to attach the volume */
  
+ #ifdef AFS_DEMAND_ATTACH_FS
+     /* check DAFS permissions */
+     vp = VLookupVolume_r(&error, vcom->vop->volume, NULL);
+     if (vp && !strcmp(VPartitionPath(V_partition(vp)), vcom->vop->partName) &&
+ 	vp->pending_vol_op && 
+ 	(vcom->hdr->programType != vp->pending_vol_op->com.programType)) {
+ 	/* a different program has this volume checked out. deny. */
+ 	Log("FSYNC_VolOn: WARNING: program type %u has attempted to manipulate "
+ 	    "state for volume %u using command code %u while the volume is " 
+ 	    "checked out by program type %u for command code %u.\n",
+ 	    vcom->hdr->programType,
+ 	    vcom->vop->volume,
+ 	    vcom->hdr->command,
+ 	    vp->pending_vol_op->com.programType,
+ 	    vp->pending_vol_op->com.command);
+ 	code = SYNC_DENIED;
+ 	res->hdr.reason = FSYNC_EXCLUSIVE;
+ 	goto done;
+     }
+ #endif
+ 
      if (vcom->v)
  	vcom->v->volumeID = 0;
+ 
+ 
+     if (vcom->hdr->command == FSYNC_VOL_LEAVE_OFF) {
+ 	/* nothing much to do if we're leaving the volume offline */
+ #ifdef AFS_DEMAND_ATTACH_FS
+ 	if (vp &&
+ 	    !strcmp(VPartitionPath(V_partition(vp)), vcom->vop->partName)) {
+ 	    VDeregisterVolOp_r(vp);
+ 	    VChangeState_r(vp, VOL_STATE_UNATTACHED);
+ 	}
+ #endif
+ 	goto done;
+     }
+ 
+ #ifdef AFS_DEMAND_ATTACH_FS
+     /* first, check to see whether we have such a volume defined */
+     vp = VPreAttachVolumeById_r(&error,
+ 				vcom->vop->partName,
+ 				vcom->vop->volume);
+     if (vp) {
+ 	VDeregisterVolOp_r(vp);
+     }
+ #else /* !AFS_DEMAND_ATTACH_FS */
      tvolName[0] = '/';
      snprintf(&tvolName[1], sizeof(tvolName)-1, VFORMAT, vcom->vop->volume);
      tvolName[sizeof(tvolName)-1] = '\0';
  
      vp = VAttachVolumeByName_r(&error, vcom->vop->partName, tvolName,
  			       V_VOLUPD);
      if (vp)
  	VPutVolume_r(vp);
      if (error) {
  	code = SYNC_DENIED;
  	res->hdr.reason = error;
      }
+ #endif /* !AFS_DEMAND_ATTACH_FS */
  
   done:
      return code;
***************
*** 821,834 ****
  
  #ifdef AFS_DEMAND_ATTACH_FS
      vp = VLookupVolume_r(&error, vcom->vop->volume, NULL);
!     if (vp && vp->pending_vol_op) {
! 	VDeregisterVolOp_r(vp, vp->pending_vol_op);
      }
  #endif
  
      return SYNC_OK;
  }
  
  static afs_int32
  FSYNC_com_VolBreakCBKs(FSSYNC_VolOp_command * vcom, SYNC_response * res)
  {
--- 825,863 ----
  
  #ifdef AFS_DEMAND_ATTACH_FS
      vp = VLookupVolume_r(&error, vcom->vop->volume, NULL);
!     if (vp) {
! 	VChangeState_r(vp, VOL_STATE_UNATTACHED);
! 	VDeregisterVolOp_r(vp);
      }
  #endif
  
      return SYNC_OK;
  }
  
+ #ifdef AFS_DEMAND_ATTACH_FS
+ /**
+  * force a volume into the hard error state.
+  */
+ static afs_int32
+ FSYNC_com_VolError(FSSYNC_VolOp_command * vcom, SYNC_response * res)
+ {
+     Error error;
+     Volume * vp;
+     afs_int32 code = SYNC_DENIED;
+ 
+     vp = VLookupVolume_r(&error, vcom->vop->volume, NULL);
+     if (vp && !strcmp(VPartitionPath(V_partition(vp)), vcom->vop->partName)) {
+ 	memset(&vp->salvage, 0, sizeof(vp->salvage));
+ 	VChangeState_r(vp, VOL_STATE_ERROR);
+ 	code = SYNC_OK;
+     } else {
+ 	res->hdr.reason = FSYNC_UNKNOWN_VOLID;
+     }
+ 	
+     return code;
+ }
+ #endif
+ 
  static afs_int32
  FSYNC_com_VolBreakCBKs(FSSYNC_VolOp_command * vcom, SYNC_response * res)
  {
***************
*** 939,947 ****
  #endif /* AFS_DEMAND_ATTACH_FS */
  
  static afs_int32
  FSYNC_com_StatsOp(int fd, SYNC_command * com, SYNC_response * res)
  {
-     int i;
      afs_int32 code = SYNC_OK;
      FSSYNC_StatsOp_command scom;
  
--- 968,1027 ----
  #endif /* AFS_DEMAND_ATTACH_FS */
  
  static afs_int32
+ FSYNC_com_VnQry(int fd, SYNC_command * com, SYNC_response * res)
+ {
+     afs_int32 code = SYNC_OK;
+     FSSYNC_VnQry_hdr * qry = com->payload.buf;
+     Volume * vp;
+     Vnode * vnp;
+     Error error;
+ 
+     if (com->recv_len != (sizeof(com->hdr) + sizeof(FSSYNC_VnQry_hdr))) {
+ 	res->hdr.reason = SYNC_REASON_MALFORMED_PACKET;
+ 	res->hdr.flags |= SYNC_FLAG_CHANNEL_SHUTDOWN;
+ 	return SYNC_COM_ERROR;
+     }
+ 
+ #ifdef AFS_DEMAND_ATTACH_FS
+     vp = VLookupVolume_r(&error, qry->volume, NULL);
+ #else /* !AFS_DEMAND_ATTACH_FS */
+     vp = VGetVolume_r(&error, qry->volume);
+ #endif /* !AFS_DEMAND_ATTACH_FS */
+ 
+     if (!vp) {
+ 	res->hdr.reason = FSYNC_UNKNOWN_VOLID;
+ 	code = SYNC_FAILED;
+ 	goto done;
+     }
+ 
+     vnp = VLookupVnode(vp, qry->vnode);
+     if (!vnp) {
+ 	res->hdr.reason = FSYNC_UNKNOWN_VNID;
+ 	code = SYNC_FAILED;
+ 	goto cleanup;
+     }
+ 
+     if (Vn_class(vnp)->residentSize > res->payload.len) {
+ 	res->hdr.reason = SYNC_REASON_ENCODING_ERROR;
+ 	code = SYNC_FAILED;
+ 	goto cleanup;
+     }
+ 
+     memcpy(res->payload.buf, vnp, Vn_class(vnp)->residentSize);
+     res->hdr.response_len += Vn_class(vnp)->residentSize;
+ 
+  cleanup:
+ #ifndef AFS_DEMAND_ATTACH_FS
+     VPutVolume_r(vp);
+ #endif
+ 
+  done:
+     return code;
+ }
+ 
+ static afs_int32
  FSYNC_com_StatsOp(int fd, SYNC_command * com, SYNC_response * res)
  {
      afs_int32 code = SYNC_OK;
      FSSYNC_StatsOp_command scom;
  
***************
*** 1120,1127 ****
  AcceptOn()
  {
      if (AcceptHandler == -1) {
! 	assert(AddHandler(AcceptSd, FSYNC_newconnection));
! 	AcceptHandler = FindHandler(AcceptSd);
      }
  }
  
--- 1200,1207 ----
  AcceptOn()
  {
      if (AcceptHandler == -1) {
! 	assert(AddHandler(fssync_server_state.fd, FSYNC_newconnection));
! 	AcceptHandler = FindHandler(fssync_server_state.fd);
      }
  }
  
***************
*** 1129,1135 ****
  AcceptOff()
  {
      if (AcceptHandler != -1) {
! 	assert(RemoveHandler(AcceptSd));
  	AcceptHandler = -1;
      }
  }
--- 1209,1215 ----
  AcceptOff()
  {
      if (AcceptHandler != -1) {
! 	assert(RemoveHandler(fssync_server_state.fd));
  	AcceptHandler = -1;
      }
  }
***************
*** 1255,1260 ****
--- 1335,1341 ----
  	    fdi++;
  	}
      *nfds = fdi;
+     ReleaseReadLock(&FSYNC_handler_lock);
  }
  #else
  static void
Index: openafs/src/vol/fssync.h
diff -c openafs/src/vol/fssync.h:1.5.2.1 openafs/src/vol/fssync.h:1.5.2.2
*** openafs/src/vol/fssync.h:1.5.2.1	Thu Feb  8 18:16:49 2007
--- openafs/src/vol/fssync.h	Mon Feb  4 13:51:39 2008
***************
*** 6,12 ****
   * License.  For details, see the LICENSE file in the top-level source
   * directory or online at http://www.openafs.org/dl/license10.html
   *
!  * Portions Copyright (c) 2006 Sine Nomine Associates
   */
  
  /*
--- 6,12 ----
   * License.  For details, see the LICENSE file in the top-level source
   * directory or online at http://www.openafs.org/dl/license10.html
   *
!  * Portions Copyright (c) 2006-2008 Sine Nomine Associates
   */
  
  /*
***************
*** 23,59 ****
  #define FSYNC_PROTO_VERSION     2
  
  
! /* FSYNC command codes */
! #define FSYNC_VOL_ON		SYNC_COM_CODE_DECL(0)	/* Volume online */
! #define FSYNC_VOL_OFF		SYNC_COM_CODE_DECL(1)	/* Volume offline */
! #define FSYNC_VOL_LISTVOLUMES	SYNC_COM_CODE_DECL(2)	/* Update local volume list */
! #define FSYNC_VOL_NEEDVOLUME	SYNC_COM_CODE_DECL(3)	/* Put volume in whatever mode (offline, or whatever)
! 							 * best fits the attachment mode provided in reason */
! #define FSYNC_VOL_MOVE	        SYNC_COM_CODE_DECL(4)	/* Generate temporary relocation information
! 							 * for this volume to another site, to be used
! 							 * if this volume disappears */
! #define	FSYNC_VOL_BREAKCBKS	SYNC_COM_CODE_DECL(5)	/* Break all the callbacks on this volume */
! #define FSYNC_VOL_DONE		SYNC_COM_CODE_DECL(6)	/* Done with this volume (used after a delete).
! 							 * Don't put online, but remove from list */
! #define FSYNC_VOL_QUERY         SYNC_COM_CODE_DECL(7)   /* query the volume state */
! #define FSYNC_VOL_QUERY_HDR     SYNC_COM_CODE_DECL(8)   /* query the volume disk data structure */
! #define FSYNC_VOL_QUERY_VOP     SYNC_COM_CODE_DECL(9)   /* query the volume for pending vol op info */
! #define FSYNC_VOL_STATS_GENERAL SYNC_COM_CODE_DECL(10)  /* query the general volume package statistics */
! #define FSYNC_VOL_STATS_VICEP   SYNC_COM_CODE_DECL(11)  /* query the per-partition volume package stats */
! #define FSYNC_VOL_STATS_HASH    SYNC_COM_CODE_DECL(12)  /* query the per hash-chain volume package stats */
! #define FSYNC_VOL_STATS_HDR     SYNC_COM_CODE_DECL(13)  /* query the volume header cache statistics */
! #define FSYNC_VOL_STATS_VLRU    SYNC_COM_CODE_DECL(14)  /* query the VLRU statistics */
! 
! /* FSYNC reason codes */
! #define FSYNC_WHATEVER		SYNC_REASON_CODE_DECL(0)  /* XXXX */
! #define FSYNC_SALVAGE		SYNC_REASON_CODE_DECL(1)  /* volume is being salvaged */
! #define FSYNC_MOVE		SYNC_REASON_CODE_DECL(2)  /* volume is being moved */
! #define FSYNC_OPERATOR		SYNC_REASON_CODE_DECL(3)  /* operator forced volume offline */
! #define FSYNC_EXCLUSIVE         SYNC_REASON_CODE_DECL(4)  /* somebody else has the volume offline */
! #define FSYNC_UNKNOWN_VOLID     SYNC_REASON_CODE_DECL(5)  /* volume id not known by fileserver */
! #define FSYNC_HDR_NOT_ATTACHED  SYNC_REASON_CODE_DECL(6)  /* volume header not currently attached */
! #define FSYNC_NO_PENDING_VOL_OP SYNC_REASON_CODE_DECL(7)  /* no volume operation pending */
! #define FSYNC_VOL_PKG_ERROR     SYNC_REASON_CODE_DECL(8)  /* error in the volume package */
  
  /* FSYNC response codes */
  
--- 23,72 ----
  #define FSYNC_PROTO_VERSION     2
  
  
! /**
!  * FSYNC command codes.
!  */
! enum FSYNCOpCode {
!     FSYNC_VOL_ON              = SYNC_COM_CODE_DECL(0),	/**< bring Volume online */
!     FSYNC_VOL_OFF             = SYNC_COM_CODE_DECL(1),	/**< take Volume offline */
!     FSYNC_VOL_LISTVOLUMES     = SYNC_COM_CODE_DECL(2),	/**< Update local volume list */
!     FSYNC_VOL_NEEDVOLUME      = SYNC_COM_CODE_DECL(3),	/**< Put volume in whatever mode (offline, or whatever)
! 							 *   best fits the attachment mode provided in reason */
!     FSYNC_VOL_MOVE            = SYNC_COM_CODE_DECL(4),	/**< Generate temporary relocation information
! 							 *   for this volume to another site, to be used
! 							 *   if this volume disappears */
!     FSYNC_VOL_BREAKCBKS       = SYNC_COM_CODE_DECL(5),	/**< Break all the callbacks on this volume */
!     FSYNC_VOL_DONE            = SYNC_COM_CODE_DECL(6),	/**< Done with this volume (used after a delete).
! 							 *   Don't put online, but remove from list */
!     FSYNC_VOL_QUERY           = SYNC_COM_CODE_DECL(7),  /**< query the volume state */
!     FSYNC_VOL_QUERY_HDR       = SYNC_COM_CODE_DECL(8),  /**< query the volume disk data structure */
!     FSYNC_VOL_QUERY_VOP       = SYNC_COM_CODE_DECL(9),  /**< query the volume for pending vol op info */
!     FSYNC_VOL_STATS_GENERAL   = SYNC_COM_CODE_DECL(10), /**< query the general volume package statistics */
!     FSYNC_VOL_STATS_VICEP     = SYNC_COM_CODE_DECL(11), /**< query the per-partition volume package stats */
!     FSYNC_VOL_STATS_HASH      = SYNC_COM_CODE_DECL(12), /**< query the per hash-chain volume package stats */
!     FSYNC_VOL_STATS_HDR       = SYNC_COM_CODE_DECL(13), /**< query the volume header cache statistics */
!     FSYNC_VOL_STATS_VLRU      = SYNC_COM_CODE_DECL(14), /**< query the VLRU statistics */
!     FSYNC_VOL_ATTACH          = SYNC_COM_CODE_DECL(15),	/**< Force volume online */
!     FSYNC_VOL_FORCE_ERROR     = SYNC_COM_CODE_DECL(16), /**< force volume into error state */
!     FSYNC_VOL_LEAVE_OFF       = SYNC_COM_CODE_DECL(17), /**< end vol op, but leave volume offline */
!     FSYNC_VOL_QUERY_VNODE     = SYNC_COM_CODE_DECL(18), /**< query vnode state */
! };
! 
! /**
!  * FSYNC reason codes. 
!  */
! enum FSYNCReasonCode {
!     FSYNC_WHATEVER            = SYNC_REASON_CODE_DECL(0), /**< XXXX */
!     FSYNC_SALVAGE             = SYNC_REASON_CODE_DECL(1), /**< volume is being salvaged */
!     FSYNC_MOVE                = SYNC_REASON_CODE_DECL(2), /**< volume is being moved */
!     FSYNC_OPERATOR            = SYNC_REASON_CODE_DECL(3), /**< operator forced volume offline */
!     FSYNC_EXCLUSIVE           = SYNC_REASON_CODE_DECL(4), /**< somebody else has the volume offline */
!     FSYNC_UNKNOWN_VOLID       = SYNC_REASON_CODE_DECL(5), /**< volume id not known by fileserver */
!     FSYNC_HDR_NOT_ATTACHED    = SYNC_REASON_CODE_DECL(6), /**< volume header not currently attached */
!     FSYNC_NO_PENDING_VOL_OP   = SYNC_REASON_CODE_DECL(7), /**< no volume operation pending */
!     FSYNC_VOL_PKG_ERROR       = SYNC_REASON_CODE_DECL(8), /**< error in the volume package */
!     FSYNC_UNKNOWN_VNID        = SYNC_REASON_CODE_DECL(9), /**< vnode id not known by fileserver */
! };
  
  /* FSYNC response codes */
  
***************
*** 64,72 ****
      char partName[16];
  };
  
  typedef struct FSSYNC_VolOp_hdr {
!     afs_uint32 volume;          /* volume id associated with request */
!     char partName[16];		/* partition name, e.g. /vicepa */
  } FSSYNC_VolOp_hdr;
  
  typedef struct FSSYNC_VolOp_command {
--- 77,88 ----
      char partName[16];
  };
  
+ /**
+  * fssync protocol volume operation request message.
+  */
  typedef struct FSSYNC_VolOp_hdr {
!     afs_uint32 volume;          /**< volume id associated with request */
!     char partName[16];		/**< partition name, e.g. /vicepa */
  } FSSYNC_VolOp_hdr;
  
  typedef struct FSSYNC_VolOp_command {
***************
*** 77,93 ****
      struct offlineInfo * volumes;
  } FSSYNC_VolOp_command;
  
  typedef struct FSSYNC_VolOp_info {
      SYNC_command_hdr com;
      FSSYNC_VolOp_hdr vop;
  } FSSYNC_VolOp_info;
  
  
  typedef struct FSSYNC_StatsOp_hdr {
      union {
! 	afs_uint32 vlru_generation;
! 	afs_uint32 hash_bucket;
! 	char partName[16];
      } args;
  } FSSYNC_StatsOp_hdr;
  
--- 93,122 ----
      struct offlineInfo * volumes;
  } FSSYNC_VolOp_command;
  
+ /**
+  * volume operation information node.
+  *
+  * @note this structure is attached to a struct Volume to signify that
+  *       a volume operation is in-progress.
+  *
+  * @see Volume
+  * @see VRegisterVolOp_r
+  * @see VDeregisterVolOp_r
+  */
  typedef struct FSSYNC_VolOp_info {
      SYNC_command_hdr com;
      FSSYNC_VolOp_hdr vop;
  } FSSYNC_VolOp_info;
  
  
+ /**
+  * fssync protocol volume package statistics request node.
+  */
  typedef struct FSSYNC_StatsOp_hdr {
      union {
! 	afs_uint32 vlru_generation;     /**< vlru generation id */
! 	afs_uint32 hash_bucket;         /**< volume hash bucket */
! 	char partName[16];              /**< partition name */
      } args;
  } FSSYNC_StatsOp_hdr;
  
***************
*** 97,103 ****
--- 126,146 ----
      SYNC_command * com;
  } FSSYNC_StatsOp_command;
  
+ /**
+  * fssync protocol vnode query request message.
+  */
+ typedef struct FSSYNC_VnQry_hdr {
+     afs_uint32 volume;          /**< volume id */
+     afs_uint32 vnode;           /**< vnode id */
+     afs_uint32 unique;          /**< uniqifier */
+     afs_uint32 spare;           /**< reserved for future use */
+     char partName[16];          /**< partition name */
+ } FSSYNC_VnQry_hdr;
+ 
  
+ #define FSSYNC_IN_PORT 2040
+ #define FSSYNC_UN_PATH "fssync.sock"
+ #define FSSYNC_ENDPOINT_DECL    SYNC_ENDPOINT_DECL(FSSYNC_IN_PORT, FSSYNC_UN_PATH)
  
  /*
   * common interfaces
Index: openafs/src/vol/salvaged.c
diff -c openafs/src/vol/salvaged.c:1.1.4.3 openafs/src/vol/salvaged.c:1.1.4.4
*** openafs/src/vol/salvaged.c:1.1.4.3	Mon Nov 26 16:08:46 2007
--- openafs/src/vol/salvaged.c	Mon Feb  4 13:51:39 2008
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/salvaged.c,v 1.1.4.3 2007/11/26 21:08:46 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/salvaged.c,v 1.1.4.4 2008/02/04 18:51:39 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
***************
*** 160,165 ****
--- 160,167 ----
  static void SalvageServer(void);
  static void SalvageClient(VolumeId vid, char * pname);
  
+ static int ChildFailed(int status);
+ 
  static int Reap_Child(char * prog, int * pid, int * status);
  
  static void * SalvageLogCleanupThread(void *);
***************
*** 541,554 ****
  	}
  	assert (slot < Parallel);
  
  	pid = Fork();
  	if (pid == 0) {
  	    VOL_UNLOCK;
  	    ret = DoSalvageVolume(node, slot);
  	    Exit(ret);
  	} else if (pid < 0) {
! 	    VOL_UNLOCK;
! 	    SALVSYNC_doneWork(node, 1);
  	} else {
  	    child_slot[slot] = pid;
  	    node->pid = pid;
--- 543,558 ----
  	}
  	assert (slot < Parallel);
  
+     do_fork:
  	pid = Fork();
  	if (pid == 0) {
  	    VOL_UNLOCK;
  	    ret = DoSalvageVolume(node, slot);
  	    Exit(ret);
  	} else if (pid < 0) {
! 	    Log("failed to fork child worker process\n");
! 	    sleep(1);
! 	    goto do_fork;
  	} else {
  	    child_slot[slot] = pid;
  	    node->pid = pid;
***************
*** 618,623 ****
--- 622,628 ----
      int slot, pid, status, code, found;
      struct SalvageQueueNode *qp, *nqp;
      struct log_cleanup_node * cleanup;
+     SALVSYNC_command_info info;
  
      assert(pthread_mutex_lock(&worker_lock) == 0);
  
***************
*** 647,652 ****
--- 652,659 ----
  	child_slot[slot] = 0;
  	VOL_UNLOCK;
  
+ 	SALVSYNC_doneWorkByPid(pid, status);
+ 
  	assert(pthread_mutex_lock(&worker_lock) == 0);
  
  	if (cleanup) {
***************
*** 657,663 ****
  
  	/* ok, we've reaped a child */
  	current_workers--;
- 	SALVSYNC_doneWorkByPid(pid, WEXITSTATUS(status));
  	assert(pthread_cond_broadcast(&worker_cv) == 0);
      }
  
--- 664,669 ----
Index: openafs/src/vol/salvsync-client.c
diff -c openafs/src/vol/salvsync-client.c:1.1.4.2 openafs/src/vol/salvsync-client.c:1.1.4.3
*** openafs/src/vol/salvsync-client.c:1.1.4.2	Thu Nov  1 11:00:03 2007
--- openafs/src/vol/salvsync-client.c	Mon Feb  4 13:51:39 2008
***************
*** 1,5 ****
  /*
!  * Copyright 2006-2007, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
--- 1,5 ----
  /*
!  * Copyright 2006-2008, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
***************
*** 18,24 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/salvsync-client.c,v 1.1.4.2 2007/11/01 15:00:03 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
--- 18,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/salvsync-client.c,v 1.1.4.3 2008/02/04 18:51:39 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
***************
*** 70,76 ****
  
  static SYNC_client_state salvsync_client_state = 
      { -1,                     /* file descriptor */
!       2041,                   /* port */
        SALVSYNC_PROTO_VERSION, /* protocol version */
        5,                      /* connect retry limit */
        120,                    /* hard timeout */
--- 70,76 ----
  
  static SYNC_client_state salvsync_client_state = 
      { -1,                     /* file descriptor */
!       SALVSYNC_ENDPOINT_DECL, /* server endpoint */
        SALVSYNC_PROTO_VERSION, /* protocol version */
        5,                      /* connect retry limit */
        120,                    /* hard timeout */
Index: openafs/src/vol/salvsync-server.c
diff -c openafs/src/vol/salvsync-server.c:1.1.4.4 openafs/src/vol/salvsync-server.c:1.1.4.5
*** openafs/src/vol/salvsync-server.c:1.1.4.4	Thu Nov  1 11:00:03 2007
--- openafs/src/vol/salvsync-server.c	Mon Feb  4 13:51:39 2008
***************
*** 1,5 ****
  /*
!  * Copyright 2006-2007, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
--- 1,5 ----
  /*
!  * Copyright 2006-2008, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
***************
*** 27,33 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/salvsync-server.c,v 1.1.4.4 2007/11/01 15:00:03 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
--- 27,33 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/salvsync-server.c,v 1.1.4.5 2008/02/04 18:51:39 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
***************
*** 60,65 ****
--- 60,66 ----
  #include "volume.h"
  #include "partition.h"
  #include <rx/rx_queue.h>
+ #include <afs/procmgmt.h>
  
  #if !defined(offsetof)
  #include <stddef.h>
***************
*** 81,90 ****
  #define MAXHANDLERS	4	/* Up to 4 clients; must be at least 2, so that
  				 * move = dump+restore can run on single server */
  
- #define MAX_BIND_TRIES	5	/* Number of times to retry socket bind */
- 
- 
- 
  /* Forward declarations */
  static void * SALVSYNC_syncThread(void *);
  static void SALVSYNC_newconnection(int fd);
--- 82,87 ----
***************
*** 146,152 ****
  extern int VInit;
  extern pthread_mutex_t vol_salvsync_mutex;
  
! static int AcceptSd = -1;		/* Socket used by server for accepting connections */
  
  
  /**
--- 143,159 ----
  extern int VInit;
  extern pthread_mutex_t vol_salvsync_mutex;
  
! /**
!  * salvsync server socket handle.
!  */
! static SYNC_server_state_t salvsync_server_state = 
!     { -1,                       /* file descriptor */
!       SALVSYNC_ENDPOINT_DECL,   /* server endpoint */
!       SALVSYNC_PROTO_VERSION,   /* protocol version */
!       5,                        /* bind() retry limit */
!       100,                      /* listen() queue depth */
!       "SALVSYNC",               /* protocol name string */
!     };
  
  
  /**
***************
*** 291,344 ****
      assert(pthread_create(&tid, &tattr, SALVSYNC_syncThread, NULL) == 0);
  }
  
- #ifdef USE_UNIX_SOCKETS
- static int
- getport(struct sockaddr_un *addr)
- {
-     int sd;
-     char tbuffer[AFSDIR_PATH_MAX]; 
-     
-     strcompose(tbuffer, AFSDIR_PATH_MAX, AFSDIR_SERVER_LOCAL_DIRPATH, "/",
-                "fssync.sock", NULL);
-     
-     memset(addr, 0, sizeof(*addr));
-     addr->sun_family = AF_UNIX;
-     strncpy(addr->sun_path, tbuffer, (sizeof(struct sockaddr_un) - sizeof(short)));
-     assert((sd = socket(AF_UNIX, SOCK_STREAM, 0)) >= 0);
-     return sd;
- }
- #else
- static int
- getport(struct sockaddr_in *addr)
- {
-     int sd;
- 
-     memset(addr, 0, sizeof(*addr));
-     assert((sd = socket(AF_INET, SOCK_STREAM, 0)) >= 0);
- #ifdef STRUCT_SOCKADDR_HAS_SA_LEN
-     addr->sin_len = sizeof(struct sockaddr_in);
- #endif
-     addr->sin_addr.s_addr = htonl(0x7f000001);
-     addr->sin_family = AF_INET;	/* was localhost->h_addrtype */
-     addr->sin_port = htons(2041);	/* XXXX htons not _really_ neccessary */
- 
-     return sd;
- }
- #endif
  
  static fd_set SALVSYNC_readfds;
  
  static void *
  SALVSYNC_syncThread(void * args)
  {
-     struct sockaddr_in addr;
      int on = 1;
      int code;
      int numTries;
      int tid;
! #ifdef USE_UNIX_SOCKETS
!     char tbuffer[AFSDIR_PATH_MAX]; 
! #endif
  
  #ifndef AFS_NT40_ENV
      (void)signal(SIGPIPE, SIG_IGN);
--- 298,317 ----
      assert(pthread_create(&tid, &tattr, SALVSYNC_syncThread, NULL) == 0);
  }
  
  
  static fd_set SALVSYNC_readfds;
  
  static void *
  SALVSYNC_syncThread(void * args)
  {
      int on = 1;
      int code;
      int numTries;
      int tid;
!     SYNC_server_state_t * state = &salvsync_server_state;
! 
!     SYNC_getAddr(&state->endpoint, &state->addr);
!     SYNC_cleanupSock(state);
  
  #ifndef AFS_NT40_ENV
      (void)signal(SIGPIPE, SIG_IGN);
***************
*** 351,381 ****
      pthread_setspecific(rx_thread_id_key, (void *)tid);
      Log("Set thread id %d for SALVSYNC_syncThread\n", tid);
  
! #ifdef USE_UNIX_SOCKETS
!     strcompose(tbuffer, AFSDIR_PATH_MAX, AFSDIR_SERVER_LOCAL_DIRPATH, "/",
!                "fssync.sock", NULL);
!     /* ignore errors */
!     remove(tbuffer);
! #endif /* USE_UNIX_SOCKETS */
! 
!     AcceptSd = getport(&addr);
!     /* Reuseaddr needed because system inexplicably leaves crud lying around */
!     code =
! 	setsockopt(AcceptSd, SOL_SOCKET, SO_REUSEADDR, (char *)&on,
! 		   sizeof(on));
!     if (code)
! 	Log("SALVSYNC_sync: setsockopt failed with (%d)\n", errno);
! 
!     for (numTries = 0; numTries < MAX_BIND_TRIES; numTries++) {
! 	if ((code =
! 	     bind(AcceptSd, (struct sockaddr *)&addr, sizeof(addr))) == 0)
! 	    break;
! 	Log("SALVSYNC_sync: bind failed with (%d), will sleep and retry\n",
! 	    errno);
! 	sleep(5);
!     }
      assert(!code);
!     listen(AcceptSd, 100);
      InitHandler();
      AcceptOn();
  
--- 324,333 ----
      pthread_setspecific(rx_thread_id_key, (void *)tid);
      Log("Set thread id %d for SALVSYNC_syncThread\n", tid);
  
!     state->fd = SYNC_getSock(&state->endpoint);
!     code = SYNC_bindSock(state);
      assert(!code);
! 
      InitHandler();
      AcceptOn();
  
***************
*** 514,519 ****
--- 466,491 ----
      }
  }
  
+ /**
+  * request that a volume be salvaged.
+  *
+  * @param[in]  com  inbound command object
+  * @param[out] res  outbound response object
+  *
+  * @return operation status
+  *    @retval SYNC_OK success
+  *    @retval SYNC_DENIED failed to enqueue request
+  *    @retval SYNC_FAILED malformed command packet
+  *
+  * @note this is a SALVSYNC protocol rpc handler
+  *
+  * @internal
+  *
+  * @post the volume is enqueued in the to-be-salvaged queue.  
+  *       if the volume was already in the salvage queue, its 
+  *       priority (and thus its location in the queue) are 
+  *       updated.
+  */
  static afs_int32
  SALVSYNC_com_Salvage(SALVSYNC_command * com, SALVSYNC_response * res)
  {
***************
*** 551,556 ****
--- 523,541 ----
      case SALVSYNC_STATE_UNKNOWN:
  	memcpy(&clone->command.com, com->hdr, sizeof(SYNC_command_hdr));
  	memcpy(&clone->command.sop, com->sop, sizeof(SALVSYNC_command_hdr));
+ 
+ 	/* 
+ 	 * make sure volgroup parent partition path is kept coherent
+ 	 *
+ 	 * If we ever want to support non-COW clones on a machine holding
+ 	 * the RW site, please note that this code does not work under the
+ 	 * conditions where someone zaps a COW clone on partition X, and
+ 	 * subsequently creates a full clone on partition Y -- we'd need
+ 	 * an inverse to SALVSYNC_com_Link.
+ 	 *  -- tkeiser 11/28/2007
+ 	 */
+ 	strcpy(node->command.sop.partName, com->sop->partName);
+ 
  	if (AddToSalvageQueue(node)) {
  	    code = SYNC_DENIED;
  	}
***************
*** 572,577 ****
--- 557,576 ----
      return code;
  }
  
+ /**
+  * cancel a pending salvage request.
+  *
+  * @param[in]  com  inbound command object
+  * @param[out] res  outbound response object
+  *
+  * @return operation status
+  *    @retval SYNC_OK success
+  *    @retval SYNC_FAILED malformed command packet
+  *
+  * @note this is a SALVSYNC protocol rpc handler
+  *
+  * @internal
+  */
  static afs_int32
  SALVSYNC_com_Cancel(SALVSYNC_command * com, SALVSYNC_response * res)
  {
***************
*** 603,608 ****
--- 602,620 ----
      return code;
  }
  
+ /**
+  * cancel all pending salvage requests.
+  *
+  * @param[in]  com  incoming command object
+  * @param[out] res  outbound response object
+  *
+  * @return operation status
+  *    @retval SYNC_OK success
+  *
+  * @note this is a SALVSYNC protocol rpc handler
+  *
+  * @internal
+  */
  static afs_int32
  SALVSYNC_com_CancelAll(SALVSYNC_command * com, SALVSYNC_response * res)
  {
***************
*** 620,625 ****
--- 632,654 ----
  
  /**
   * link a queue node for a clone to its parent volume.
+  *
+  * @param[in]  com   inbound command object
+  * @param[out] res   outbound response object
+  *
+  * @return operation status
+  *    @retval SYNC_OK success
+  *    @retval SYNC_FAILED malformed command packet
+  *    @retval SYNC_DENIED the request could not be completed
+  *
+  * @note this is a SALVSYNC protocol rpc handler
+  *
+  * @post the requested volume is marked as a child of another volume.
+  *       thus, future salvage requests for this volume will result in the
+  *       parent of the volume group being scheduled for salvage instead
+  *       of this clone.
+  *
+  * @internal
   */
  static afs_int32
  SALVSYNC_com_Link(SALVSYNC_command * com, SALVSYNC_response * res)
***************
*** 664,669 ****
--- 693,712 ----
      return code;
  }
  
+ /**
+  * query the status of a volume salvage request.
+  *
+  * @param[in]  com   inbound command object
+  * @param[out] res   outbound response object
+  *
+  * @return operation status
+  *    @retval SYNC_OK success
+  *    @retval SYNC_FAILED malformed command packet
+  *
+  * @note this is a SALVSYNC protocol rpc handler
+  *
+  * @internal
+  */
  static afs_int32
  SALVSYNC_com_Query(SALVSYNC_command * com, SALVSYNC_response * res)
  {
***************
*** 710,717 ****
  AcceptOn(void)
  {
      if (AcceptHandler == -1) {
! 	assert(AddHandler(AcceptSd, SALVSYNC_newconnection));
! 	AcceptHandler = FindHandler(AcceptSd);
      }
  }
  
--- 753,760 ----
  AcceptOn(void)
  {
      if (AcceptHandler == -1) {
! 	assert(AddHandler(salvsync_server_state.fd, SALVSYNC_newconnection));
! 	AcceptHandler = FindHandler(salvsync_server_state.fd);
      }
  }
  
***************
*** 719,725 ****
  AcceptOff(void)
  {
      if (AcceptHandler != -1) {
! 	assert(RemoveHandler(AcceptSd));
  	AcceptHandler = -1;
      }
  }
--- 762,768 ----
  AcceptOff(void)
  {
      if (AcceptHandler != -1) {
! 	assert(RemoveHandler(salvsync_server_state.fd));
  	AcceptHandler = -1;
      }
  }
***************
*** 827,832 ****
--- 870,886 ----
      ReleaseReadLock(&SALVSYNC_handler_lock);	/* just in case */
  }
  
+ /**
+  * allocate a salvage queue node.
+  *
+  * @param[out] node_out  address in which to store new node pointer
+  *
+  * @return operation status
+  *    @retval 0 success
+  *    @retval 1 failed to allocate node
+  *
+  * @internal
+  */
  static int
  AllocNode(struct SalvageQueueNode ** node_out)
  {
***************
*** 848,853 ****
--- 902,919 ----
      return code;
  }
  
+ /**
+  * link a salvage queue node to its parent.
+  *
+  * @param[in] parent  pointer to queue node for parent of volume group
+  * @param[in] clone   pointer to queue node for a clone
+  *
+  * @return operation status
+  *    @retval 0 success
+  *    @retval 1 failure
+  *
+  * @internal
+  */
  static int
  LinkNode(struct SalvageQueueNode * parent,
  	 struct SalvageQueueNode * clone)
***************
*** 1093,1099 ****
       * if there are no disk partitions, just sit in this wait loop forever
       */
      while (!salvageQueue.total_len || !DiskPartitionList) {
!       assert(pthread_cond_wait(&salvageQueue.cv, &vol_glock_mutex) == 0);
      }
  
      /* 
--- 1159,1165 ----
       * if there are no disk partitions, just sit in this wait loop forever
       */
      while (!salvageQueue.total_len || !DiskPartitionList) {
! 	VOL_CV_WAIT(&salvageQueue.cv);
      }
  
      /* 
***************
*** 1168,1173 ****
--- 1234,1249 ----
      return node;
  }
  
+ /**
+  * update internal scheduler state to reflect completion of a work unit.
+  *
+  * @param[in]  node    salvage queue node object pointer
+  * @param[in]  result  worker process result code
+  *
+  * @post scheduler state is updated.
+  *
+  * @internal
+  */
  static void
  SALVSYNC_doneWork_r(struct SalvageQueueNode * node, int result)
  {
***************
*** 1194,1218 ****
      }
  }
  
! void 
! SALVSYNC_doneWork(struct SalvageQueueNode * node, int result)
  {
!     VOL_LOCK;
!     SALVSYNC_doneWork_r(node, result);
!     VOL_UNLOCK;
  }
  
  void
! SALVSYNC_doneWorkByPid(int pid, int result)
  {
      struct SalvageQueueNode * node;
  
      VOL_LOCK;
      node = LookupPendingCommandByPid(pid);
      if (node != NULL) {
! 	SALVSYNC_doneWork_r(node, result);
      }
      VOL_UNLOCK;
  }
  
  #endif /* AFS_DEMAND_ATTACH_FS */
--- 1270,1355 ----
      }
  }
  
! /**
!  * check whether worker child failed.
!  *
!  * @param[in] status  status bitfield return by wait()
!  *
!  * @return boolean failure code
!  *    @retval 0 child succeeded
!  *    @retval 1 child failed
!  *
!  * @internal
!  */
! static int
! ChildFailed(int status)
  {
!     return (WCOREDUMP(status) || 
! 	    WIFSIGNALED(status) || 
! 	    ((WEXITSTATUS(status) != 0) && 
! 	     (WEXITSTATUS(status) != SALSRV_EXIT_VOLGROUP_LINK)));
  }
  
+ 
+ /**
+  * notify salvsync scheduler of node completion, by child pid.
+  *
+  * @param[in]  pid     pid of worker child
+  * @param[in]  status  worker status bitfield from wait()
+  *
+  * @post scheduler state is updated.
+  *       if status code is a failure, fileserver notification was attempted
+  *
+  * @see SALVSYNC_doneWork_r
+  */
  void
! SALVSYNC_doneWorkByPid(int pid, int status)
  {
      struct SalvageQueueNode * node;
+     char partName[16];
+     afs_uint32 volids[VOLMAXTYPES+1];
+     unsigned int idx;
+ 
+     memset(volids, 0, sizeof(volids));
  
      VOL_LOCK;
      node = LookupPendingCommandByPid(pid);
      if (node != NULL) {
! 	SALVSYNC_doneWork_r(node, status);
! 
! 	if (ChildFailed(status)) {
! 	    /* populate volume id list for later processing outside the glock */
! 	    volids[0] = node->command.sop.volume;
! 	    strcpy(partName, node->command.sop.partName);
! 	    if (node->type == SALVSYNC_VOLGROUP_PARENT) {
! 		for (idx = 0; idx < VOLMAXTYPES; idx++) {
! 		    if (node->volgroup.children[idx]) {
! 			volids[idx+1] = node->volgroup.children[idx]->command.sop.volume;
! 		    }
! 		}
! 	    }
! 	}
      }
      VOL_UNLOCK;
+ 
+     /*
+      * if necessary, notify fileserver of
+      * failure to salvage volume group
+      * [we cannot guarantee that the child made the
+      *  appropriate notifications (e.g. SIGSEGV)]
+      *  -- tkeiser 11/28/2007
+      */
+     if (ChildFailed(status)) {
+ 	for (idx = 0; idx <= VOLMAXTYPES; idx++) {
+ 	    if (volids[idx]) {
+ 		FSYNC_VolOp(volids[idx],
+ 			    partName,
+ 			    FSYNC_VOL_FORCE_ERROR,
+ 			    FSYNC_WHATEVER,
+ 			    NULL);
+ 	    }
+ 	}
+     }
  }
  
  #endif /* AFS_DEMAND_ATTACH_FS */
Index: openafs/src/vol/salvsync.h
diff -c openafs/src/vol/salvsync.h:1.1.4.1 openafs/src/vol/salvsync.h:1.1.4.2
*** openafs/src/vol/salvsync.h:1.1.4.1	Thu Nov  1 11:00:03 2007
--- openafs/src/vol/salvsync.h	Mon Feb  4 13:51:39 2008
***************
*** 1,5 ****
  /*
!  * Copyright 2006-2007, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
--- 1,5 ----
  /*
!  * Copyright 2006-2008, Sine Nomine Associates and others.
   * All Rights Reserved.
   * 
   * This software has been released under the terms of the IBM Public
***************
*** 140,145 ****
--- 140,148 ----
      int pid;
  };
  
+ #define SALVSYNC_IN_PORT 2041
+ #define SALVSYNC_UN_PATH "salvsync.sock"
+ #define SALVSYNC_ENDPOINT_DECL    SYNC_ENDPOINT_DECL(SALVSYNC_IN_PORT, SALVSYNC_UN_PATH)
  
  /* Prototypes from salvsync.c */
  
***************
*** 156,162 ****
  /* salvage server interfaces */
  extern void SALVSYNC_salvInit(void);
  extern struct SalvageQueueNode * SALVSYNC_getWork(void);
- extern void SALVSYNC_doneWork(struct SalvageQueueNode *, int result);
  extern void SALVSYNC_doneWorkByPid(int pid, int result);
  
  #endif /* AFS_DEMAND_ATTACH_FS */
--- 159,164 ----
Index: openafs/src/vol/vnode.c
diff -c openafs/src/vol/vnode.c:1.27.2.3 openafs/src/vol/vnode.c:1.27.2.4
*** openafs/src/vol/vnode.c:1.27.2.3	Fri Dec 28 17:15:02 2007
--- openafs/src/vol/vnode.c	Mon Feb  4 13:51:39 2008
***************
*** 6,12 ****
   * License.  For details, see the LICENSE file in the top-level source
   * directory or online at http://www.openafs.org/dl/license10.html
   *
!  * Portions Copyright (c) 2006 Sine Nomine Associates
   */
  
  /*
--- 6,12 ----
   * License.  For details, see the LICENSE file in the top-level source
   * directory or online at http://www.openafs.org/dl/license10.html
   *
!  * Portions Copyright (c) 2005-2008 Sine Nomine Associates
   */
  
  /*
***************
*** 20,26 ****
  #define MAXINT     (~(1<<((sizeof(int)*8)-1)))
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/vnode.c,v 1.27.2.3 2007/12/28 22:15:02 shadow Exp $");
  
  #include <errno.h>
  #include <stdio.h>
--- 20,26 ----
  #define MAXINT     (~(1<<((sizeof(int)*8)-1)))
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/vnode.c,v 1.27.2.4 2008/02/04 18:51:39 shadow Exp $");
  
  #include <errno.h>
  #include <stdio.h>
***************
*** 32,37 ****
--- 32,38 ----
  #endif /* AFS_PTHREAD_ENV */
  
  #include <rx/xdr.h>
+ #include "rx/rx_queue.h"
  #include <afs/afsint.h>
  #include "nfs.h"
  #include <afs/errors.h>
***************
*** 41,46 ****
--- 42,49 ----
  #include "ihandle.h"
  #include "vnode.h"
  #include "volume.h"
+ #include "volume_inline.h"
+ #include "vnode_inline.h"
  #include "partition.h"
  #include "salvsync.h"
  #if defined(AFS_SGI_ENV)
***************
*** 69,80 ****
  
  struct VnodeClassInfo VnodeClassInfo[nVNODECLASSES];
  
- private int moveHash(register Vnode * vnp, bit32 newHash);
  private void StickOnLruChain_r(register Vnode * vnp,
  			       register struct VnodeClassInfo *vcp);
  
  extern int LogLevel;
  
  #define BAD_IGET	-1000
  
  /* There are two separate vnode queue types defined here:
--- 72,85 ----
  
  struct VnodeClassInfo VnodeClassInfo[nVNODECLASSES];
  
  private void StickOnLruChain_r(register Vnode * vnp,
  			       register struct VnodeClassInfo *vcp);
  
  extern int LogLevel;
  
+ 
+ 
+ 
  #define BAD_IGET	-1000
  
  /* There are two separate vnode queue types defined here:
***************
*** 161,256 ****
  #define VNODE_HASH(volumeptr,vnodenumber)\
      ((volumeptr->vnodeHashOffset + vnodenumber)&(VNODE_HASH_TABLE_SIZE-1))
  
- /*
-  * new support to secondarily hash vnodes by volume id
-  */
- #define VNVOLUME_HASH(volumeId) (volumeId&(VolumeHashTable.Mask))
- 
- #include "rx/rx_queue.h"
- typedef struct VnodeHashByVolumeChainHead {
-     struct rx_queue queue;
-     int len;
-     /* someday we could put a per-chain lock here... */
- #ifdef AFS_DEMAND_ATTACH_FS
-     int busy;
-     pthread_cond_t chain_busy_cv;
- #endif /* AFS_DEMAND_ATTACH_FS */
- } VnodeHashByVolumeChainHead;
- private VnodeHashByVolumeChainHead *VnodeHashByVolumeTable = NULL;
  
  void
! VInitVnHashByVolume(void)
  {
!     register int i;
  
!     VnodeHashByVolumeTable = (VnodeHashByVolumeChainHead *) calloc(VolumeHashTable.Size, 
! 								   sizeof(VnodeHashByVolumeChainHead));
!     assert(VnodeHashByVolumeTable != NULL);
!     
!     for (i=0; i < VolumeHashTable.Size; i++) {
! 	queue_Init(&VnodeHashByVolumeTable[i]);
! #ifdef AFS_DEMAND_ATTACH_FS
! 	assert(pthread_cond_init(&VnodeHashByVolumeTable[i].chain_busy_cv, NULL) == 0);
! #endif /* AFS_DEMAND_ATTACH_FS */
!     }
  }
  
! static void
! AddToVnHashByVolumeTable(register Vnode * vnp)
  {
!     VnodeHashByVolumeChainHead * head;
  
!     if (queue_IsOnQueue(vnp))
  	return;
  
!     head = &VnodeHashByVolumeTable[VNVOLUME_HASH(vnp->volumePtr->hashid)];
  
! #ifdef AFS_DEMAND_ATTACH_FS
!     while (head->busy) {
! 	/* if the hash table is busy, wait */
! 	assert(pthread_cond_wait(&head->chain_busy_cv, &vol_glock_mutex) == 0);
      }
- #endif /* AFS_DEMAND_ATTACH_FS */
  
!     head->len++;
!     queue_Append(head, vnp);
  }
  
! /* for demand-attach, caller MUST hold a ref count on vp */
! static void
! DeleteFromVnHashByVolumeTable(register Vnode * vnp)
  {
!     VnodeHashByVolumeChainHead * head;
! 
!     if (!queue_IsOnQueue(vnp))
  	return;
  
!     head = &VnodeHashByVolumeTable[VNVOLUME_HASH(vnp->volumePtr->hashid)];
  
! #ifdef AFS_DEMAND_ATTACH_FS
!     while (head->busy) {
! 	/* if the hash table is busy, wait */
! 	assert(pthread_cond_wait(&head->chain_busy_cv, &vol_glock_mutex) == 0);
      }
! #endif /* AFS_DEMAND_ATTACH_FS */
  
!     head->len--;
!     queue_Remove(vnp);
  }
  
! /* Code to invalidate a vnode entry.  Called when we've damaged a vnode, and want
!     to prevent future VGetVnode's from applying to it.  Leaves it in the same hash bucket
!     but that shouldn't be important.  */
  void
  VInvalidateVnode_r(register struct Vnode *avnode)
  {
      avnode->changed_newTime = 0;	/* don't let it get flushed out again */
      avnode->changed_oldTime = 0;
!     avnode->delete = 0;		/* it isn't deleted, erally */
      avnode->cacheCheck = 0;	/* invalid: prevents future vnode searches from working */
  }
  
! /* Not normally called by general client; called by volume.c */
  int
  VInitVnodes(VnodeClass class, int nVnodes)
  {
--- 166,382 ----
  #define VNODE_HASH(volumeptr,vnodenumber)\
      ((volumeptr->vnodeHashOffset + vnodenumber)&(VNODE_HASH_TABLE_SIZE-1))
  
  
+ /**
+  * add a vnode to the volume's vnode list.
+  *
+  * @param[in] vp   volume object pointer
+  * @param[in] vnp  vnode object pointer
+  *
+  * @note for DAFS, it may seem like we should be acquiring a lightweight ref
+  *       on vp, but this would actually break things.  Right now, this is ok
+  *       because we destroy all vnode cache contents during during volume
+  *       detach.
+  *
+  * @pre VOL_LOCK held
+  *
+  * @internal volume package internal use only
+  */
  void
! AddToVVnList(Volume * vp, Vnode * vnp)
  {
!     if (queue_IsOnQueue(vnp))
! 	return;
  
!     Vn_volume(vnp) = vp;
!     Vn_cacheCheck(vnp) = vp->cacheCheck;
!     queue_Append(&vp->vnode_list, vnp);
!     Vn_stateFlags(vnp) |= VN_ON_VVN;
  }
  
! /**
!  * delete a vnode from the volume's vnode list.
!  *
!  * @pre VOL_LOCK held
!  *
!  * @internal volume package internal use only
!  */
! void
! DeleteFromVVnList(register Vnode * vnp)
  {
!     Vn_volume(vnp) = NULL;
  
!     if (!queue_IsOnQueue(vnp))
  	return;
  
!     queue_Remove(vnp);
!     Vn_stateFlags(vnp) &= ~(VN_ON_VVN);
! }
  
! /**
!  * add a vnode to the end of the lru.
!  *
!  * @param[in] vcp  vnode class info object pointer
!  * @param[in] vnp  vnode object pointer
!  *
!  * @internal vnode package internal use only
!  */
! void
! AddToVnLRU(struct VnodeClassInfo * vcp, Vnode * vnp)
! {
!     if (Vn_stateFlags(vnp) & VN_ON_LRU) {
! 	return;
!     }
! 
!     /* Add it to the circular LRU list */
!     if (vcp->lruHead == NULL)
! 	Abort("VPutVnode: vcp->lruHead==NULL");
!     else {
! 	vnp->lruNext = vcp->lruHead;
! 	vnp->lruPrev = vcp->lruHead->lruPrev;
! 	vcp->lruHead->lruPrev = vnp;
! 	vnp->lruPrev->lruNext = vnp;
! 	vcp->lruHead = vnp;
      }
  
!     /* If the vnode was just deleted, put it at the end of the chain so it
!      * will be reused immediately */
!     if (vnp->delete)
! 	vcp->lruHead = vnp->lruNext;
! 
!     Vn_stateFlags(vnp) |= VN_ON_LRU;
  }
  
! /**
!  * delete a vnode from the lru.
!  *
!  * @param[in] vcp  vnode class info object pointer
!  * @param[in] vnp  vnode object pointer
!  *
!  * @internal vnode package internal use only
!  */
! void
! DeleteFromVnLRU(struct VnodeClassInfo * vcp, Vnode * vnp)
  {
!     if (!(Vn_stateFlags(vnp) & VN_ON_LRU)) {
  	return;
+     }
  
!     if (vnp == vcp->lruHead)
! 	vcp->lruHead = vcp->lruHead->lruNext;
  
!     if ((vnp == vcp->lruHead) || 
! 	(vcp->lruHead == NULL))
! 	Abort("DeleteFromVnLRU: lru chain addled!\n");
! 
!     vnp->lruPrev->lruNext = vnp->lruNext;
!     vnp->lruNext->lruPrev = vnp->lruPrev;
! 
!     Vn_stateFlags(vnp) &= ~(VN_ON_LRU);
! }
! 
! /**
!  * add a vnode to the vnode hash table.
!  *
!  * @param[in] vnp  vnode object pointer
!  *
!  * @pre VOL_LOCK held
!  *
!  * @post vnode on hash
!  *
!  * @internal vnode package internal use only
!  */
! void
! AddToVnHash(Vnode * vnp)
! {
!     unsigned int newHash;
! 
!     if (!(Vn_stateFlags(vnp) & VN_ON_HASH)) {
! 	newHash = VNODE_HASH(Vn_volume(vnp), Vn_id(vnp));
! 	vnp->hashNext = VnodeHashTable[newHash];
! 	VnodeHashTable[newHash] = vnp;
! 	vnp->hashIndex = newHash;
! 
! 	Vn_stateFlags(vnp) |= VN_ON_HASH;
      }
! }
  
! /**
!  * delete a vnode from the vnode hash table.
!  *
!  * @param[in] vnp
!  * @param[in] hash
!  *
!  * @pre VOL_LOCK held
!  *
!  * @post vnode removed from hash
!  *
!  * @internal vnode package internal use only
!  */
! void
! DeleteFromVnHash(Vnode * vnp)
! {
!     Vnode * tvnp;
! 
!     if (Vn_stateFlags(vnp) & VN_ON_HASH) {
! 	tvnp = VnodeHashTable[vnp->hashIndex];
! 	if (tvnp == vnp)
! 	    VnodeHashTable[vnp->hashIndex] = vnp->hashNext;
! 	else {
! 	    while (tvnp && tvnp->hashNext != vnp)
! 		tvnp = tvnp->hashNext;
! 	    if (tvnp)
! 		tvnp->hashNext = vnp->hashNext;
! 	}
! 
! 	vnp->hashNext = NULL;
! 	vnp->hashIndex = 0;
! 	Vn_stateFlags(vnp) &= ~(VN_ON_HASH);
!     }
  }
  
! 
! /**
!  * invalidate a vnode cache entry.
!  *
!  * @param[in] avnode   vnode object pointer
!  *
!  * @pre VOL_LOCK held
!  *
!  * @post vnode metadata invalidated.
!  *       vnode removed from hash table.
!  *       DAFS: vnode state set to VN_STATE_INVALID.
!  *
!  * @internal vnode package internal use only
!  */
  void
  VInvalidateVnode_r(register struct Vnode *avnode)
  {
      avnode->changed_newTime = 0;	/* don't let it get flushed out again */
      avnode->changed_oldTime = 0;
!     avnode->delete = 0;		/* it isn't deleted, really */
      avnode->cacheCheck = 0;	/* invalid: prevents future vnode searches from working */
+     DeleteFromVnHash(avnode);
+ #ifdef AFS_DEMAND_ATTACH_FS
+     VnChangeState_r(avnode, VN_STATE_INVALID);
+ #endif
  }
  
! 
! /**
!  * initialize vnode cache for a given vnode class.
!  *
!  * @param[in] class    vnode class
!  * @param[in] nVnodes  size of cache
!  *
!  * @post vnode cache allocated and initialized
!  *
!  * @internal volume package internal use only
!  *
!  * @note generally called by VInitVolumePackage_r
!  *
!  * @see VInitVolumePackage_r
!  */
  int
  VInitVnodes(VnodeClass class, int nVnodes)
  {
***************
*** 289,301 ****
      assert(va != NULL);
      while (nVnodes--) {
  	Vnode *vnp = (Vnode *) va;
! 	vnp->nUsers = 0;	/* no context switches */
  	Lock_Init(&vnp->lock);
  	vnp->changed_oldTime = 0;
  	vnp->changed_newTime = 0;
! 	vnp->volumePtr = NULL;
! 	vnp->cacheCheck = 0;
! 	vnp->delete = vnp->vnodeNumber = 0;
  #ifdef AFS_PTHREAD_ENV
  	vnp->writer = (pthread_t) 0;
  #else /* AFS_PTHREAD_ENV */
--- 415,434 ----
      assert(va != NULL);
      while (nVnodes--) {
  	Vnode *vnp = (Vnode *) va;
! 	Vn_refcount(vnp) = 0;	/* no context switches */
! 	Vn_stateFlags(vnp) |= VN_ON_LRU;
! #ifdef AFS_DEMAND_ATTACH_FS
! 	assert(pthread_cond_init(&Vn_stateCV(vnp), NULL) == 0);
! 	Vn_state(vnp) = VN_STATE_INVALID;
! 	Vn_readers(vnp) = 0;
! #else /* !AFS_DEMAND_ATTACH_FS */
  	Lock_Init(&vnp->lock);
+ #endif /* !AFS_DEMAND_ATTACH_FS */
  	vnp->changed_oldTime = 0;
  	vnp->changed_newTime = 0;
! 	Vn_volume(vnp) = NULL;
! 	Vn_cacheCheck(vnp) = 0;
! 	vnp->delete = Vn_id(vnp) = 0;
  #ifdef AFS_PTHREAD_ENV
  	vnp->writer = (pthread_t) 0;
  #else /* AFS_PTHREAD_ENV */
***************
*** 303,308 ****
--- 436,442 ----
  #endif /* AFS_PTHREAD_ENV */
  	vnp->hashIndex = 0;
  	vnp->handle = NULL;
+ 	Vn_class(vnp) = vcp;
  	if (vcp->lruHead == NULL)
  	    vcp->lruHead = vnp->lruNext = vnp->lruPrev = vnp;
  	else {
***************
*** 318,343 ****
  }
  
  
! /* allocate an *unused* vnode from the LRU chain, going backwards of course.  It shouldn't
!     be necessary to specify that nUsers == 0 since if it is in the list, nUsers
!     should be 0.  Things shouldn't be in lruq unless no one is using them.  */
  Vnode *
  VGetFreeVnode_r(struct VnodeClassInfo * vcp)
  {
      register Vnode *vnp;
  
      vnp = vcp->lruHead->lruPrev;
!     if (vnp->nUsers != 0 || CheckLock(&vnp->lock))
! 	Abort("locked vnode in lruq");
!     VNLog(1, 2, vnp->vnodeNumber, (afs_int32) vnp);
!     IH_RELEASE(vnp->handle);
      return vnp;
  }
  
- static mlkReason = 0;
- static mlkLastAlloc = 0;
- static mlkLastOver = 0;
- static mlkLastDelete = 0;
  
  Vnode *
  VAllocVnode(Error * ec, Volume * vp, VnodeType type)
--- 452,560 ----
  }
  
  
! /**
!  * allocate an unused vnode from the lru chain.
!  *
!  * @param[in] vcp  vnode class info object pointer
!  *
!  * @pre VOL_LOCK is held
!  *
!  * @post vnode object is removed from lru, and vnode hash table.
!  *       vnode is disassociated from volume object.
!  *       state is set to VN_STATE_INVALID.
!  *       inode handle is released.
!  *
!  * @note we traverse backwards along the lru circlist.  It shouldn't 
!  *       be necessary to specify that nUsers == 0 since if it is in the list, 
!  *       nUsers should be 0.  Things shouldn't be in lruq unless no one is 
!  *       using them.
!  *
!  * @warning DAFS: VOL_LOCK is dropped while doing inode handle release
!  *
!  * @return vnode object pointer
!  */
  Vnode *
  VGetFreeVnode_r(struct VnodeClassInfo * vcp)
  {
      register Vnode *vnp;
  
      vnp = vcp->lruHead->lruPrev;
! #ifdef AFS_DEMAND_ATTACH_FS
!     if (Vn_refcount(vnp) != 0 || VnIsExclusiveState(Vn_state(vnp)) ||
! 	Vn_readers(vnp) != 0)
! 	Abort("VGetFreeVnode_r: in-use vnode in lruq");
! #else
!     if (Vn_refcount(vnp) != 0 || CheckLock(&vnp->lock))
! 	Abort("VGetFreeVnode_r: locked vnode in lruq");
! #endif
!     VNLog(1, 2, Vn_id(vnp), (afs_int32) vnp);
! 
!     /* 
!      * it's going to be overwritten soon enough.
!      * remove from LRU, delete hash entry, and 
!      * disassociate from old parent volume before
!      * we have a chance to drop the vol glock
!      */
!     DeleteFromVnLRU(vcp, vnp);
!     DeleteFromVnHash(vnp);
!     if (Vn_volume(vnp)) {
! 	DeleteFromVVnList(vnp);
!     }
! 
!     /* drop the file descriptor */
!     if (vnp->handle) {
! #ifdef AFS_DEMAND_ATTACH_FS
! 	VnChangeState_r(vnp, VN_STATE_RELEASING);
! 	VOL_UNLOCK;
! #endif
! 	IH_RELEASE(vnp->handle);
! #ifdef AFS_DEMAND_ATTACH_FS
! 	VOL_LOCK;
! #endif
!     }
! 
! #ifdef AFS_DEMAND_ATTACH_FS
!     VnChangeState_r(vnp, VN_STATE_INVALID);
! #endif
! 
!     return vnp;
! }
! 
! 
! /**
!  * lookup a vnode in the vnode cache hash table.
!  *
!  * @param[in] vp       pointer to volume object
!  * @param[in] vnodeId  vnode id
!  *
!  * @pre VOL_LOCK held
!  *
!  * @post matching vnode object or NULL is returned
!  *
!  * @return vnode object pointer
!  *   @retval NULL   no matching vnode object was found in the cache
!  *
!  * @internal vnode package internal use only
!  *
!  * @note this symbol is exported strictly for fssync debug protocol use
!  */
! Vnode *
! VLookupVnode(Volume * vp, VnodeId vnodeId)
! {
!     Vnode * vnp;
!     unsigned int newHash;
! 
!     newHash = VNODE_HASH(vp, vnodeId);
!     for (vnp = VnodeHashTable[newHash];
! 	 (vnp && 
! 	  ((Vn_id(vnp) != vnodeId) || 
! 	   (Vn_volume(vnp) != vp) ||
! 	   (vp->cacheCheck != Vn_cacheCheck(vnp))));
! 	 vnp = vnp->hashNext);
! 
      return vnp;
  }
  
  
  Vnode *
  VAllocVnode(Error * ec, Volume * vp, VnodeType type)
***************
*** 349,365 ****
      return retVal;
  }
  
  Vnode *
  VAllocVnode_r(Error * ec, Volume * vp, VnodeType type)
  {
      register Vnode *vnp;
      VnodeId vnodeNumber;
!     int newHash, bitNumber;
      register struct VnodeClassInfo *vcp;
      VnodeClass class;
      Unique unique;
  
      *ec = 0;
      if (programType == fileServer && !V_inUse(vp)) {
  	if (vp->specialStatus) {
  	    *ec = vp->specialStatus;
--- 566,614 ----
      return retVal;
  }
  
+ /**
+  * allocate a new vnode.
+  *
+  * @param[out] ec    error code return
+  * @param[in]  vp    volume object pointer
+  * @param[in]  type  desired vnode type
+  *
+  * @return vnode object pointer
+  *
+  * @pre VOL_LOCK held;
+  *      heavyweight ref held on vp
+  *
+  * @post vnode allocated and returned
+  */
  Vnode *
  VAllocVnode_r(Error * ec, Volume * vp, VnodeType type)
  {
      register Vnode *vnp;
      VnodeId vnodeNumber;
!     int bitNumber, code;
      register struct VnodeClassInfo *vcp;
      VnodeClass class;
      Unique unique;
+ #ifdef AFS_DEMAND_ATTACH_FS
+     VolState vol_state_save;
+ #endif
  
      *ec = 0;
+ 
+ #ifdef AFS_DEMAND_ATTACH_FS
+     /*
+      * once a volume has entered an error state, don't permit
+      * further operations to proceed
+      *  -- tkeiser 11/21/2007
+      */
+     VWaitExclusiveState_r(vp);
+     if (VIsErrorState(V_attachState(vp))) {
+ 	/* XXX is VSALVAGING acceptable here? */
+ 	*ec = DAFS_VSALVAGE;
+ 	return NULL;
+     }
+ #endif
+ 
      if (programType == fileServer && !V_inUse(vp)) {
  	if (vp->specialStatus) {
  	    *ec = vp->specialStatus;
***************
*** 381,387 ****
  	unique = vp->nextVnodeUnique++;
  
      if (vp->nextVnodeUnique > V_uniquifier(vp)) {
! 	VUpdateVolume_r(ec, vp, VOL_UPDATE_WAIT);
  	if (*ec)
  	    return NULL;
      }
--- 630,636 ----
  	unique = vp->nextVnodeUnique++;
  
      if (vp->nextVnodeUnique > V_uniquifier(vp)) {
! 	VUpdateVolume_r(ec, vp, 0);
  	if (*ec)
  	    return NULL;
      }
***************
*** 399,465 ****
  	return NULL;
      vnodeNumber = bitNumberToVnodeNumber(bitNumber, class);
  
   vnrehash:
      VNLog(2, 1, vnodeNumber);
      /* Prepare to move it to the new hash chain */
!     newHash = VNODE_HASH(vp, vnodeNumber);
!     for (vnp = VnodeHashTable[newHash];
! 	 vnp && (vnp->vnodeNumber != vnodeNumber || vnp->volumePtr != vp
! 		 || vnp->volumePtr->cacheCheck != vnp->cacheCheck);
! 	 vnp = vnp->hashNext);
      if (vnp) {
  	/* slot already exists.  May even not be in lruq (consider store file locking a file being deleted)
  	 * so we may have to wait for it below */
  	VNLog(3, 2, vnodeNumber, (afs_int32) vnp);
  
! 	/* If first user, remove it from the LRU chain.  We can assume that
! 	 * there is at least one item in the queue */
! 	if (++vnp->nUsers == 1) {
! 	    if (vnp == vcp->lruHead)
! 		vcp->lruHead = vcp->lruHead->lruNext;
! 	    vnp->lruPrev->lruNext = vnp->lruNext;
! 	    vnp->lruNext->lruPrev = vnp->lruPrev;
! 	    if (vnp == vcp->lruHead || vcp->lruHead == NULL)
! 		Abort("VGetVnode: lru chain addled!\n");
  	    /* This won't block */
! 	    ObtainWriteLock(&vnp->lock);
  	} else {
! 	    /* follow locking hierarchy */
! 	    VOL_UNLOCK;
! 	    ObtainWriteLock(&vnp->lock);
! 	    VOL_LOCK;
! 	    if (vnp->volumePtr->cacheCheck != vnp->cacheCheck) {
! 		ReleaseWriteLock(&vnp->lock);
  		goto vnrehash;
  	    }
  	}
! #ifdef AFS_PTHREAD_ENV
! 	vnp->writer = pthread_self();
! #else /* AFS_PTHREAD_ENV */
! 	LWP_CurrentProcess(&vnp->writer);
! #endif /* AFS_PTHREAD_ENV */
      } else {
  	vnp = VGetFreeVnode_r(vcp);
! 	/* Remove vnode from LRU chain and grab a write lock */
! 	if (vnp == vcp->lruHead)
! 	    vcp->lruHead = vcp->lruHead->lruNext;
! 	vnp->lruPrev->lruNext = vnp->lruNext;
! 	vnp->lruNext->lruPrev = vnp->lruPrev;
! 	if (vnp == vcp->lruHead || vcp->lruHead == NULL)
! 	    Abort("VGetVnode: lru chain addled!\n");
  	/* Initialize the header fields so noone allocates another
  	 * vnode with the same number */
! 	vnp->vnodeNumber = vnodeNumber;
! 	vnp->volumePtr = vp;
! 	vnp->cacheCheck = vp->cacheCheck;
! 	vnp->nUsers = 1;
! 	/* This will never block */
! 	ObtainWriteLock(&vnp->lock);
! #ifdef AFS_PTHREAD_ENV
! 	vnp->writer = pthread_self();
! #else /* AFS_PTHREAD_ENV */
! 	LWP_CurrentProcess(&vnp->writer);
! #endif /* AFS_PTHREAD_ENV */
  	/* Sanity check:  is this vnode really not in use? */
  	{
  	    int size;
--- 648,728 ----
  	return NULL;
      vnodeNumber = bitNumberToVnodeNumber(bitNumber, class);
  
+     /*
+      * DAFS:
+      * at this point we should be assured that V_attachState(vp) is non-exclusive
+      */
+ 
   vnrehash:
      VNLog(2, 1, vnodeNumber);
      /* Prepare to move it to the new hash chain */
!     vnp = VLookupVnode(vp, vnodeNumber);
      if (vnp) {
  	/* slot already exists.  May even not be in lruq (consider store file locking a file being deleted)
  	 * so we may have to wait for it below */
  	VNLog(3, 2, vnodeNumber, (afs_int32) vnp);
  
! 	VnCreateReservation_r(vnp);
! 	if (Vn_refcount(vnp) == 1) {
! 	    /* we're the only user */
  	    /* This won't block */
! 	    VnLock(vnp, WRITE_LOCK, VOL_LOCK_HELD, WILL_NOT_DEADLOCK);
  	} else {
! 	    /* other users present; follow locking hierarchy */
! 	    VnLock(vnp, WRITE_LOCK, VOL_LOCK_HELD, MIGHT_DEADLOCK);
! 
! #ifdef AFS_DEMAND_ATTACH_FS
! 	    /*
! 	     * DAFS:
! 	     * vnode was cached, wait for any existing exclusive ops to finish.
! 	     * once we have reacquired the lock, re-verify volume state.
! 	     *
! 	     * note: any vnode error state is related to the old vnode; disregard.
! 	     */
! 	    VnWaitQuiescent_r(vnp);
! 	    if (VIsErrorState(V_attachState(vp))) {
! 		VnUnlock(vnp, WRITE_LOCK);
! 		VnCancelReservation_r(vnp);
! 		*ec = DAFS_VSALVAGE;
! 		return NULL;
! 	    }
! #endif
! 
! 	    /*
! 	     * verify state of the world hasn't changed
! 	     *
! 	     * (technically, this should never happen because cachecheck
! 	     *  is only updated during a volume attach, which should not
! 	     *  happen when refs are held)
! 	     */
! 	    if (Vn_volume(vnp)->cacheCheck != Vn_cacheCheck(vnp)) {
! 		VnUnlock(vnp, WRITE_LOCK);
! 		VnCancelReservation_r(vnp);
  		goto vnrehash;
  	    }
  	}
! 
      } else {
+ 	/* no such vnode in the cache */
+ 
  	vnp = VGetFreeVnode_r(vcp);
! 
  	/* Initialize the header fields so noone allocates another
  	 * vnode with the same number */
! 	Vn_id(vnp) = vnodeNumber;
! 	VnCreateReservation_r(vnp);
! 	AddToVVnList(vp, vnp);
! #ifdef AFS_DEMAND_ATTACH_FS
! 	AddToVnHash(vnp);
! #endif
! 
! 	/* This will never block (guaranteed by check in VGetFreeVnode_r() */
! 	VnLock(vnp, WRITE_LOCK, VOL_LOCK_HELD, WILL_NOT_DEADLOCK);
! 
! #ifdef AFS_DEMAND_ATTACH_FS
! 	VnChangeState_r(vnp, VN_STATE_ALLOC);
! #endif
! 
  	/* Sanity check:  is this vnode really not in use? */
  	{
  	    int size;
***************
*** 470,476 ****
  	    /* XXX we have a potential race here if two threads
  	     * allocate new vnodes at the same time, and they
  	     * both decide it's time to extend the index
! 	     * file size... */
  
  	    VOL_UNLOCK;
  	    fdP = IH_OPEN(ihP);
--- 733,753 ----
  	    /* XXX we have a potential race here if two threads
  	     * allocate new vnodes at the same time, and they
  	     * both decide it's time to extend the index
! 	     * file size...
! 	     */
! #ifdef AFS_DEMAND_ATTACH_FS
! 	    /*
! 	     * this race has been eliminated for the DAFS case
! 	     * using exclusive state VOL_STATE_VNODE_ALLOC
! 	     *
! 	     * if this becomes a bottleneck, there are ways to
! 	     * improve parallelism for this code path
! 	     *   -- tkeiser 11/28/2007 
! 	     */
! 	    VCreateReservation_r(vp);
! 	    VWaitExclusiveState_r(vp);
! 	    vol_state_save = VChangeState_r(vp, VOL_STATE_VNODE_ALLOC);
! #endif
  
  	    VOL_UNLOCK;
  	    fdP = IH_OPEN(ihP);
***************
*** 505,522 ****
  		free(buf);
  	    }
  	    FDH_CLOSE(fdP);
- 	    fdP = NULL;
  	    VOL_LOCK;
  	    goto sane;
  
  	error_encountered:
  #ifdef AFS_DEMAND_ATTACH_FS
! 	    VOL_LOCK;
! 	    VRequestSalvage_r(vp, SALVSYNC_ERROR, 0);
  	    if (fdP)
  		FDH_CLOSE(fdP);
  	    VInvalidateVnode_r(vnp);
! 	    StickOnLruChain_r(vnp, vcp);
  	    return NULL;
  #else
  	    assert(1 == 2);
--- 782,815 ----
  		free(buf);
  	    }
  	    FDH_CLOSE(fdP);
  	    VOL_LOCK;
+ 
+ #ifdef AFS_DEMAND_ATTACH_FS
+ 	    VChangeState_r(vp, vol_state_save);
+ 	    VCancelReservation_r(vp);
+ #endif
  	    goto sane;
  
+ 
  	error_encountered:
  #ifdef AFS_DEMAND_ATTACH_FS
! 	    /* 
! 	     * close the file handle
! 	     * acquire VOL_LOCK
! 	     * invalidate the vnode
! 	     * free up the bitmap entry (although salvager should take care of it)
! 	     * salvage the volume
! 	     * drop vnode lock and refs
! 	     */
  	    if (fdP)
  		FDH_CLOSE(fdP);
+ 	    VOL_LOCK;
+ 	    VFreeBitMapEntry_r(ec, &vp->vnodeIndex[class], bitNumber);
  	    VInvalidateVnode_r(vnp);
! 	    VnUnlock(vnp, WRITE_LOCK);
! 	    VnCancelReservation_r(vnp);
! 	    VRequestSalvage_r(ec, vp, SALVSYNC_ERROR, 0);
! 	    VCancelReservation_r(vp);
  	    return NULL;
  #else
  	    assert(1 == 2);
***************
*** 525,540 ****
  	}
      sane:
  	VNLog(4, 2, vnodeNumber, (afs_int32) vnp);
! 	AddToVnHashByVolumeTable(vnp);
! 	moveHash(vnp, newHash);
      }
  
      VNLog(5, 1, (afs_int32) vnp);
- #ifdef AFS_PTHREAD_ENV
-     vnp->writer = pthread_self();
- #else /* AFS_PTHREAD_ENV */
-     LWP_CurrentProcess(&vnp->writer);
- #endif /* AFS_PTHREAD_ENV */
      memset(&vnp->disk, 0, sizeof(vnp->disk));
      vnp->changed_newTime = 0;	/* set this bit when vnode is updated */
      vnp->changed_oldTime = 0;	/* set this on CopyOnWrite. */
--- 818,829 ----
  	}
      sane:
  	VNLog(4, 2, vnodeNumber, (afs_int32) vnp);
! #ifndef AFS_DEMAND_ATTACH_FS
! 	AddToVnHash(vnp);
! #endif
      }
  
      VNLog(5, 1, (afs_int32) vnp);
      memset(&vnp->disk, 0, sizeof(vnp->disk));
      vnp->changed_newTime = 0;	/* set this bit when vnode is updated */
      vnp->changed_oldTime = 0;	/* set this on CopyOnWrite. */
***************
*** 545,553 ****
--- 834,1083 ----
      vnp->handle = NULL;
      vcp->allocs++;
      vp->header->diskstuff.filecount++;
+ #ifdef AFS_DEMAND_ATTACH_FS
+     VnChangeState_r(vnp, VN_STATE_EXCLUSIVE);
+ #endif
      return vnp;
  }
  
+ /**
+  * load a vnode from disk.
+  *
+  * @param[out] ec     client error code return
+  * @param[in]  vp     volume object pointer
+  * @param[in]  vnp    vnode object pointer
+  * @param[in]  vcp    vnode class info object pointer
+  * @param[in]  class  vnode class enumeration
+  *
+  * @pre vnode is registered in appropriate data structures;
+  *      caller holds a ref on vnode; VOL_LOCK is held
+  *
+  * @post vnode data is loaded from disk.
+  *       vnode state is set to VN_STATE_ONLINE.
+  *       on failure, vnode is invalidated.
+  *
+  * @internal vnode package internal use only
+  */
+ static void
+ VnLoad(Error * ec, Volume * vp, Vnode * vnp, 
+        struct VnodeClassInfo * vcp, VnodeClass class)
+ {
+     /* vnode not cached */
+     Error error;
+     int n, dosalv = 1;
+     IHandle_t *ihP = vp->vnodeIndex[class].handle;
+     FdHandle_t *fdP;
+ 
+     *ec = 0;
+     vcp->reads++;
+ 
+ #ifdef AFS_DEMAND_ATTACH_FS
+     VnChangeState_r(vnp, VN_STATE_LOAD);
+ #endif
+ 
+     /* This will never block */
+     VnLock(vnp, WRITE_LOCK, VOL_LOCK_HELD, WILL_NOT_DEADLOCK);
+ 
+     VOL_UNLOCK;
+     fdP = IH_OPEN(ihP);
+     if (fdP == NULL) {
+ 	Log("VnLoad: can't open index dev=%u, i=%s\n", vp->device,
+ 	    PrintInode(NULL, vp->vnodeIndex[class].handle->ih_ino));
+ 	*ec = VIO;
+ 	goto error_encountered_nolock;
+     } else if (FDH_SEEK(fdP, vnodeIndexOffset(vcp, Vn_id(vnp)), SEEK_SET)
+ 	       < 0) {
+ 	Log("VnLoad: can't seek on index file vn=%u\n", Vn_id(vnp));
+ 	*ec = VIO;
+ 	goto error_encountered_nolock;
+     } else if ((n = FDH_READ(fdP, (char *)&vnp->disk, vcp->diskSize))
+ 	       != vcp->diskSize) {
+ 	/* Don't take volume off line if the inumber is out of range
+ 	 * or the inode table is full. */
+ 	if (n == BAD_IGET) {
+ 	    Log("VnLoad: bad inumber %s\n",
+ 		PrintInode(NULL, vp->vnodeIndex[class].handle->ih_ino));
+ 	    *ec = VIO;
+ 	    dosalv = 0;
+ 	} else if (n == -1 && errno == EIO) {
+ 	    /* disk error; salvage */
+ 	    Log("VnLoad: Couldn't read vnode %u, volume %u (%s); volume needs salvage\n", Vn_id(vnp), V_id(vp), V_name(vp));
+ 	} else {
+ 	    /* vnode is not allocated */
+ 	    if (LogLevel >= 5) 
+ 		Log("VnLoad: Couldn't read vnode %u, volume %u (%s); read %d bytes, errno %d\n", 
+ 		    Vn_id(vnp), V_id(vp), V_name(vp), n, errno);
+ 	    *ec = VIO;
+ 	    dosalv = 0;
+ 	}
+ 	goto error_encountered_nolock;
+     }
+     FDH_CLOSE(fdP);
+     VOL_LOCK;
+ 
+     /* Quick check to see that the data is reasonable */
+     if (vnp->disk.vnodeMagic != vcp->magic || vnp->disk.type == vNull) {
+ 	if (vnp->disk.type == vNull) {
+ 	    *ec = VNOVNODE;
+ 	    dosalv = 0;
+ 	} else {
+ 	    struct vnodeIndex *index = &vp->vnodeIndex[class];
+ 	    unsigned int bitNumber = vnodeIdToBitNumber(Vn_id(vnp));
+ 	    unsigned int offset = bitNumber >> 3;
+ 
+ 	    /* Test to see if vnode number is valid. */
+ 	    if ((offset >= index->bitmapSize)
+ 		|| ((*(index->bitmap + offset) & (1 << (bitNumber & 0x7)))
+ 		    == 0)) {
+ 		Log("VnLoad: Request for unallocated vnode %u, volume %u (%s) denied.\n", Vn_id(vnp), V_id(vp), V_name(vp));
+ 		*ec = VNOVNODE;
+ 		dosalv = 0;
+ 	    } else {
+ 		Log("VnLoad: Bad magic number, vnode %u, volume %u (%s); volume needs salvage\n", Vn_id(vnp), V_id(vp), V_name(vp));
+ 	    }
+ 	}
+ 	goto error_encountered;
+     }
+ 
+     IH_INIT(vnp->handle, V_device(vp), V_parentId(vp), VN_GET_INO(vnp));
+     VnUnlock(vnp, WRITE_LOCK);
+ #ifdef AFS_DEMAND_ATTACH_FS
+     VnChangeState_r(vnp, VN_STATE_ONLINE);
+ #endif
+     return;
+ 
+ 
+  error_encountered_nolock:
+     if (fdP) {
+ 	FDH_REALLYCLOSE(fdP);
+     }
+     VOL_LOCK;
+ 
+  error_encountered:
+     if (dosalv) {
+ #ifdef AFS_DEMAND_ATTACH_FS
+ 	VRequestSalvage_r(&error, vp, SALVSYNC_ERROR, 0);
+ #else
+ 	VForceOffline_r(vp, 0);
+ 	error = VSALVAGE;
+ #endif
+ 	if (!*ec)
+ 	    *ec = error;
+     }
+ 
+     VInvalidateVnode_r(vnp);
+     VnUnlock(vnp, WRITE_LOCK);
+ }
+ 
+ /**
+  * store a vnode to disk.
+  *
+  * @param[out] ec     error code output
+  * @param[in]  vp     volume object pointer
+  * @param[in]  vnp    vnode object pointer
+  * @param[in]  vcp    vnode class info object pointer
+  * @param[in]  class  vnode class enumeration
+  *
+  * @pre VOL_LOCK held.
+  *      caller holds refs to volume and vnode.
+  *      DAFS: caller is responsible for performing state sanity checks.
+  *
+  * @post vnode state is stored to disk.
+  *
+  * @internal vnode package internal use only
+  */
+ static void
+ VnStore(Error * ec, Volume * vp, Vnode * vnp, 
+ 	struct VnodeClassInfo * vcp, VnodeClass class)
+ {
+     int offset, code;
+     IHandle_t *ihP = vp->vnodeIndex[class].handle;
+     FdHandle_t *fdP;
+ #ifdef AFS_DEMAND_ATTACH_FS
+     VnState vn_state_save;
+ #endif
+ 
+     *ec = 0;
+ 
+ #ifdef AFS_DEMAND_ATTACH_FS
+     vn_state_save = VnChangeState_r(vnp, VN_STATE_STORE);
+ #endif
+ 
+     offset = vnodeIndexOffset(vcp, Vn_id(vnp));
+     VOL_UNLOCK;
+     fdP = IH_OPEN(ihP);
+     if (fdP == NULL) {
+ 	Log("VnStore: can't open index file!\n");
+ 	goto error_encountered;
+     }
+     if (FDH_SEEK(fdP, offset, SEEK_SET) < 0) {
+ 	Log("VnStore: can't seek on index file! fdp=0x%x offset=%d, errno=%d\n",
+ 	    fdP, offset, errno);
+ 	goto error_encountered;
+     }
+ 
+     code = FDH_WRITE(fdP, &vnp->disk, vcp->diskSize);
+     if (code != vcp->diskSize) {
+ 	/* Don't force volume offline if the inumber is out of
+ 	 * range or the inode table is full.
+ 	 */
+ 	FDH_REALLYCLOSE(fdP);
+ 	if (code == BAD_IGET) {
+ 	    Log("VnStore: bad inumber %s\n",
+ 		PrintInode(NULL,
+ 			   vp->vnodeIndex[class].handle->ih_ino));
+ 	    *ec = VIO;
+ 	    VOL_LOCK;
+ #ifdef AFS_DEMAND_ATTACH_FS
+ 	    VnChangeState_r(vnp, VN_STATE_ERROR);
+ #endif
+ 	} else {
+ 	    Log("VnStore: Couldn't write vnode %u, volume %u (%s) (error %d)\n", Vn_id(vnp), V_id(Vn_volume(vnp)), V_name(Vn_volume(vnp)), code);
+ #ifdef AFS_DEMAND_ATTACH_FS
+ 	    goto error_encountered;
+ #else
+ 	    VOL_LOCK;
+ 	    VForceOffline_r(vp, 0);
+ 	    *ec = VSALVAGE;
+ #endif
+ 	}
+ 	return;
+     } else {
+ 	FDH_CLOSE(fdP);
+     }
+ 
+     VOL_LOCK;
+ #ifdef AFS_DEMAND_ATTACH_FS
+     VnChangeState_r(vnp, vn_state_save);
+ #endif
+     return;
+     
+  error_encountered:
+ #ifdef AFS_DEMAND_ATTACH_FS
+     /* XXX instead of dumping core, let's try to request a salvage
+      * and just fail the putvnode */
+     if (fdP)
+ 	FDH_CLOSE(fdP);
+     VOL_LOCK;
+     VnChangeState_r(vnp, VN_STATE_ERROR);
+     VRequestSalvage_r(ec, vp, SALVSYNC_ERROR, 0);
+ #else
+     assert(1 == 2);
+ #endif
+ }
+ 
+ /**
+  * get a handle to a vnode object.
+  *
+  * @param[out] ec           error code
+  * @param[in]  vp           volume object
+  * @param[in]  vnodeNumber  vnode id
+  * @param[in]  locktype     type of lock to acquire
+  *
+  * @return vnode object pointer
+  *
+  * @see VGetVnode_r
+  */
  Vnode *
  VGetVnode(Error * ec, Volume * vp, VnodeId vnodeNumber, int locktype)
  {				/* READ_LOCK or WRITE_LOCK, as defined in lock.h */
***************
*** 558,581 ****
      return retVal;
  }
  
  Vnode *
  VGetVnode_r(Error * ec, Volume * vp, VnodeId vnodeNumber, int locktype)
  {				/* READ_LOCK or WRITE_LOCK, as defined in lock.h */
      register Vnode *vnp;
!     int newHash;
      VnodeClass class;
      struct VnodeClassInfo *vcp;
  
      *ec = 0;
-     mlkReason = 0;		/* last call didn't fail */
  
      if (vnodeNumber == 0) {
  	*ec = VNOVNODE;
- 	mlkReason = 1;
  	return NULL;
      }
  
      VNLog(100, 1, vnodeNumber);
      if (programType == fileServer && !V_inUse(vp)) {
  	*ec = (vp->specialStatus ? vp->specialStatus : VOFFLINE);
  
--- 1088,1140 ----
      return retVal;
  }
  
+ /**
+  * get a handle to a vnode object.
+  *
+  * @param[out] ec           error code
+  * @param[in]  vp           volume object
+  * @param[in]  vnodeNumber  vnode id
+  * @param[in]  locktype     type of lock to acquire
+  *
+  * @return vnode object pointer
+  *
+  * @internal vnode package internal use only
+  *
+  * @pre VOL_LOCK held.
+  *      heavyweight ref held on volume object.
+  */
  Vnode *
  VGetVnode_r(Error * ec, Volume * vp, VnodeId vnodeNumber, int locktype)
  {				/* READ_LOCK or WRITE_LOCK, as defined in lock.h */
      register Vnode *vnp;
!     int code;
      VnodeClass class;
      struct VnodeClassInfo *vcp;
+     Volume * oldvp = NULL;
  
      *ec = 0;
  
      if (vnodeNumber == 0) {
  	*ec = VNOVNODE;
  	return NULL;
      }
  
      VNLog(100, 1, vnodeNumber);
+ 
+ #ifdef AFS_DEMAND_ATTACH_FS
+     /*
+      * once a volume has entered an error state, don't permit
+      * further operations to proceed
+      *  -- tkeiser 11/21/2007
+      */
+     VWaitExclusiveState_r(vp);
+     if (VIsErrorState(V_attachState(vp))) {
+ 	/* XXX is VSALVAGING acceptable here? */
+ 	*ec = VSALVAGING;
+ 	return NULL;
+     }
+ #endif
+ 
      if (programType == fileServer && !V_inUse(vp)) {
  	*ec = (vp->specialStatus ? vp->specialStatus : VOFFLINE);
  
***************
*** 583,589 ****
  	 * a READ operation, then don't fail.
  	 */
  	if ((*ec != VBUSY) || (locktype != READ_LOCK)) {
- 	    mlkReason = 2;
  	    return NULL;
  	}
  	*ec = 0;
--- 1142,1147 ----
***************
*** 592,810 ****
      vcp = &VnodeClassInfo[class];
      if (locktype == WRITE_LOCK && !VolumeWriteable(vp)) {
  	*ec = (bit32) VREADONLY;
- 	mlkReason = 3;
  	return NULL;
      }
  
      if (locktype == WRITE_LOCK && programType == fileServer) {
  	VAddToVolumeUpdateList_r(ec, vp);
  	if (*ec) {
- 	    mlkReason = 1000 + *ec;
  	    return NULL;
  	}
      }
  
-     /* See whether the vnode is in the cache. */
-     newHash = VNODE_HASH(vp, vnodeNumber);
-     for (vnp = VnodeHashTable[newHash];
- 	 vnp && (vnp->vnodeNumber != vnodeNumber || vnp->volumePtr != vp
- 		 || vnp->volumePtr->cacheCheck != vnp->cacheCheck);
- 	 vnp = vnp->hashNext);
      vcp->gets++;
!     if (vnp == NULL) {
! 	int n;
! 	IHandle_t *ihP = vp->vnodeIndex[class].handle;
! 	FdHandle_t *fdP;
  	/* Not in cache; tentatively grab most distantly used one from the LRU
  	 * chain */
  	vcp->reads++;
  	vnp = VGetFreeVnode_r(vcp);
! 	/* Remove it from the old hash chain */
! 	if (vnp->volumePtr)
! 	    DeleteFromVnHashByVolumeTable(vnp);
! 	moveHash(vnp, newHash);
! 	/* Remove it from the LRU chain */
! 	if (vnp == vcp->lruHead)
! 	    vcp->lruHead = vcp->lruHead->lruNext;
! 	if (vnp == vcp->lruHead || vcp->lruHead == NULL)
! 	    Abort("VGetVnode: lru chain addled!\n");
! 	vnp->lruPrev->lruNext = vnp->lruNext;
! 	vnp->lruNext->lruPrev = vnp->lruPrev;
  	/* Initialize */
  	vnp->changed_newTime = vnp->changed_oldTime = 0;
  	vnp->delete = 0;
! 	vnp->vnodeNumber = vnodeNumber;
! 	vnp->volumePtr = vp;
! 	vnp->cacheCheck = vp->cacheCheck;
! 	vnp->nUsers = 1;
! 	AddToVnHashByVolumeTable(vnp);
! 
! 	/* This will never block */
! 	ObtainWriteLock(&vnp->lock);
! #ifdef AFS_PTHREAD_ENV
! 	vnp->writer = pthread_self();
! #else /* AFS_PTHREAD_ENV */
! 	LWP_CurrentProcess(&vnp->writer);
! #endif /* AFS_PTHREAD_ENV */
! 
! 	/* Read vnode from volume index */
! 	VOL_UNLOCK;
! 	fdP = IH_OPEN(ihP);
! 	if (fdP == NULL) {
! 	    Log("VGetVnode: can't open index dev=%u, i=%s\n", vp->device,
! 		PrintInode(NULL, vp->vnodeIndex[class].handle->ih_ino));
  #ifdef AFS_DEMAND_ATTACH_FS
! 	    VOL_LOCK;
! 	    VRequestSalvage_r(vp, SALVSYNC_ERROR, 0);
! 	    VOL_UNLOCK;
  #endif
! 	    *ec = VIO;
! 	    mlkReason = 9;
! 	} else if (FDH_SEEK(fdP, vnodeIndexOffset(vcp, vnodeNumber), SEEK_SET)
! 		   < 0) {
! 	    Log("VGetVnode: can't seek on index file vn=%u\n", vnodeNumber);
! #ifdef AFS_DEMAND_ATTACH_FS
! 	    VOL_LOCK;
! 	    VRequestSalvage_r(vp, SALVSYNC_ERROR, 0);
! 	    VOL_UNLOCK;
! #endif
! 	    *ec = VIO;
! 	    mlkReason = 10;
! 	    FDH_REALLYCLOSE(fdP);
! 	} else if ((n = FDH_READ(fdP, (char *)&vnp->disk, vcp->diskSize))
! 		   != vcp->diskSize) {
! 	    /* Don't take volume off line if the inumber is out of range
! 	     * or the inode table is full. */
! 	    FDH_REALLYCLOSE(fdP);
! 	    VOL_LOCK;
! 	    if (n == BAD_IGET) {
! 		Log("VGetVnode: bad inumber %s\n",
! 		    PrintInode(NULL, vp->vnodeIndex[class].handle->ih_ino));
! 		*ec = VIO;
! 		mlkReason = 4;
! 	    }
! 	    /* Check for disk errors.  Anything else just means that the vnode
! 	     * is not allocated */
! 	    if (n == -1 && errno == EIO) {
! 		Log("VGetVnode: Couldn't read vnode %u, volume %u (%s); volume needs salvage\n", vnodeNumber, V_id(vp), V_name(vp));
! #ifdef AFS_DEMAND_ATTACH_FS
! 		if (programType == fileServer) {
! 		    VRequestSalvage_r(vp, SALVSYNC_ERROR, 0);
! 		    *ec = VSALVAGING;
! 		} else {
! 		    VForceOffline_r(vp, 0);
! 		    *ec = VSALVAGE;
! 		}
! #else
! 		VForceOffline_r(vp, 0);
! 		*ec = VSALVAGE;
! #endif
! 		mlkReason = 4;
! 	    } else {
! 		/* Probably legit; Don't knock the volume offline */
! 		if (LogLevel >= 5) 
! 		    Log("VGetVnode: Couldn't read vnode %u, volume %u (%s); errno %d\n", vnodeNumber, V_id(vp), V_name(vp), errno);
! 		mlkReason = 5;
! 		*ec = VIO;
! 	    }
! 	    VInvalidateVnode_r(vnp);
! 	    if (vnp->nUsers-- == 1)
! 		StickOnLruChain_r(vnp, vcp);
! 	    ReleaseWriteLock(&vnp->lock);
  	    return NULL;
  	}
! 	FDH_CLOSE(fdP);
! 	VOL_LOCK;
! 	/* Quick check to see that the data is reasonable */
! 	if (vnp->disk.vnodeMagic != vcp->magic || vnp->disk.type == vNull) {
! 	    if (vnp->disk.type == vNull) {
! 		*ec = VNOVNODE;
! 		mlkReason = 6;
! 		VInvalidateVnode_r(vnp);
! 		if (vnp->nUsers-- == 1)
! 		    StickOnLruChain_r(vnp, vcp);
! 		ReleaseWriteLock(&vnp->lock);
! 		return NULL;	/* The vnode is not allocated */
! 	    } else {
! 		struct vnodeIndex *index = &vp->vnodeIndex[class];
! 		unsigned int bitNumber = vnodeIdToBitNumber(vnodeNumber);
! 		unsigned int offset = bitNumber >> 3;
! 
! 		/* Test to see if vnode number is valid. */
! 		if ((offset >= index->bitmapSize)
! 		    || ((*(index->bitmap + offset) & (1 << (bitNumber & 0x7)))
! 			== 0)) {
! 		    Log("VGetVnode: Request for unallocated vnode %u, volume %u (%s) denied.\n", vnodeNumber, V_id(vp), V_name(vp));
! 		    mlkReason = 11;
! 		    *ec = VNOVNODE;
! 		} else {
! 		    Log("VGetVnode: Bad magic number, vnode %u, volume %u (%s); volume needs salvage\n", vnodeNumber, V_id(vp), V_name(vp));
! #ifdef AFS_DEMAND_ATTACH_FS
! 		    if (programType == fileServer) {
! 			VRequestSalvage_r(vp, SALVSYNC_ERROR, 0);
! 			*ec = VSALVAGING;
! 		    } else {
! 			vp->goingOffline = 1;
! 			*ec = VSALVAGE;
! 		    }
! #else
! 		    vp->goingOffline = 1;	/* used to call VOffline, but that would mess
! 						 * up the volume ref count if called here */
! 		    *ec = VSALVAGE;
  #endif
! 		    mlkReason = 7;
! 		}
! 		VInvalidateVnode_r(vnp);
! 		if (vnp->nUsers-- == 1)
! 		    StickOnLruChain_r(vnp, vcp);
! 		ReleaseWriteLock(&vnp->lock);
! 		return NULL;
! 	    }
! 	}
! 	IH_INIT(vnp->handle, V_device(vp), V_parentId(vp), VN_GET_INO(vnp));
! 	ReleaseWriteLock(&vnp->lock);
!     } else {
! 	VNLog(101, 2, vnodeNumber, (afs_int32) vnp);
! 	if (++vnp->nUsers == 1) {
! 	    /* First user.  Remove it from the LRU chain.  We can assume that
! 	     * there is at least one item in the queue */
! 	    if (vnp == vcp->lruHead)
! 		vcp->lruHead = vcp->lruHead->lruNext;
! 	    if (vnp == vcp->lruHead || vcp->lruHead == NULL)
! 		Abort("VGetVnode: lru chain addled!\n");
! 	    vnp->lruPrev->lruNext = vnp->lruNext;
! 	    vnp->lruNext->lruPrev = vnp->lruPrev;
! 	}
!     }
!     VOL_UNLOCK;
!     if (locktype == READ_LOCK)
! 	ObtainReadLock(&vnp->lock);
!     else {
! 	ObtainWriteLock(&vnp->lock);
! #ifdef AFS_PTHREAD_ENV
! 	vnp->writer = pthread_self();
! #else /* AFS_PTHREAD_ENV */
! 	LWP_CurrentProcess(&vnp->writer);
! #endif /* AFS_PTHREAD_ENV */
      }
!     VOL_LOCK;
      /* Check that the vnode hasn't been removed while we were obtaining
       * the lock */
      VNLog(102, 2, vnodeNumber, (afs_int32) vnp);
!     if ((vnp->disk.type == vNull) || (vnp->cacheCheck == 0)) {
! 	if (vnp->nUsers-- == 1)
! 	    StickOnLruChain_r(vnp, vcp);
! 	if (locktype == READ_LOCK)
! 	    ReleaseReadLock(&vnp->lock);
! 	else
! 	    ReleaseWriteLock(&vnp->lock);
  	*ec = VNOVNODE;
- 	mlkReason = 8;
  	/* vnode is labelled correctly by now, so we don't have to invalidate it */
  	return NULL;
      }
      if (programType == fileServer)
! 	VBumpVolumeUsage_r(vnp->volumePtr);	/* Hack; don't know where it should be
  						 * called from.  Maybe VGetVolume */
      return vnp;
  }
--- 1150,1278 ----
      vcp = &VnodeClassInfo[class];
      if (locktype == WRITE_LOCK && !VolumeWriteable(vp)) {
  	*ec = (bit32) VREADONLY;
  	return NULL;
      }
  
      if (locktype == WRITE_LOCK && programType == fileServer) {
  	VAddToVolumeUpdateList_r(ec, vp);
  	if (*ec) {
  	    return NULL;
  	}
      }
  
      vcp->gets++;
! 
!     /* See whether the vnode is in the cache. */
!     vnp = VLookupVnode(vp, vnodeNumber);
!     if (vnp) {
! 	/* vnode is in cache */
! 
! 	VNLog(101, 2, vnodeNumber, (afs_int32) vnp);
! 	VnCreateReservation_r(vnp);
! 
! #ifdef AFS_DEMAND_ATTACH_FS
! 	/*
! 	 * this is the one DAFS case where we may run into contention.
! 	 * here's the basic control flow:
! 	 *
! 	 * if locktype is READ_LOCK:
! 	 *   wait until vnode is not exclusive
! 	 *   set to VN_STATE_READ
! 	 *   increment read count
! 	 *   done
! 	 * else
! 	 *   wait until vnode is quiescent
! 	 *   set to VN_STATE_EXCLUSIVE
! 	 *   done
! 	 */
! 	if (locktype == READ_LOCK) {
! 	    VnWaitExclusiveState_r(vnp);
! 	} else {
! 	    VnWaitQuiescent_r(vnp);
! 	}
! 
! 	if (VnIsErrorState(Vn_state(vnp))) {
! 	    VnCancelReservation_r(vnp);
! 	    *ec = VSALVAGE;
! 	    return NULL;
! 	}
! #endif /* AFS_DEMAND_ATTACH_FS */
!     } else {
! 	/* vnode not cached */
! 
  	/* Not in cache; tentatively grab most distantly used one from the LRU
  	 * chain */
  	vcp->reads++;
  	vnp = VGetFreeVnode_r(vcp);
! 
  	/* Initialize */
  	vnp->changed_newTime = vnp->changed_oldTime = 0;
  	vnp->delete = 0;
! 	Vn_id(vnp) = vnodeNumber;
! 	VnCreateReservation_r(vnp);
! 	AddToVVnList(vp, vnp);
  #ifdef AFS_DEMAND_ATTACH_FS
! 	AddToVnHash(vnp);
  #endif
! 
! 	/*
! 	 * XXX for non-DAFS, there is a serious
! 	 * race condition here:
! 	 *
! 	 * two threads can race to load a vnode.  the net
! 	 * result is two struct Vnodes can be allocated
! 	 * and hashed, which point to the same underlying
! 	 * disk data store.  conflicting vnode locks can
! 	 * thus be held concurrently.
! 	 *
! 	 * for non-DAFS to be safe, VOL_LOCK really shouldn't
! 	 * be dropped in VnLoad.  Of course, this would likely
! 	 * lead to an unacceptable slow-down.
! 	 */
! 
! 	VnLoad(ec, vp, vnp, vcp, class);
! 	if (*ec) {
! 	    VnCancelReservation_r(vnp);
  	    return NULL;
  	}
! #ifndef AFS_DEMAND_ATTACH_FS
! 	AddToVnHash(vnp);
  #endif
! 	/*
! 	 * DAFS:
! 	 * there is no possibility for contention. we "own" this vnode.
! 	 */
      }
! 
!     /*
!      * DAFS:
!      * it is imperative that nothing drop vol lock between here
!      * and the VnBeginRead/VnChangeState stanza below
!      */
! 
!     VnLock(vnp, locktype, VOL_LOCK_HELD, MIGHT_DEADLOCK);
! 
      /* Check that the vnode hasn't been removed while we were obtaining
       * the lock */
      VNLog(102, 2, vnodeNumber, (afs_int32) vnp);
!     if ((vnp->disk.type == vNull) || (Vn_cacheCheck(vnp) == 0)) {
! 	VnUnlock(vnp, locktype);
! 	VnCancelReservation_r(vnp);
  	*ec = VNOVNODE;
  	/* vnode is labelled correctly by now, so we don't have to invalidate it */
  	return NULL;
      }
+ 
+ #ifdef AFS_DEMAND_ATTACH_FS
+     if (locktype == READ_LOCK) {
+ 	VnBeginRead_r(vnp);
+     } else {
+ 	VnChangeState_r(vnp, VN_STATE_EXCLUSIVE);
+     }
+ #endif
+ 
      if (programType == fileServer)
! 	VBumpVolumeUsage_r(Vn_volume(vnp));	/* Hack; don't know where it should be
  						 * called from.  Maybe VGetVolume */
      return vnp;
  }
***************
*** 821,843 ****
      VOL_UNLOCK;
  }
  
  void
  VPutVnode_r(Error * ec, register Vnode * vnp)
  {
!     int writeLocked, offset;
      VnodeClass class;
      struct VnodeClassInfo *vcp;
      int code;
  
      *ec = 0;
!     assert(vnp->nUsers != 0);
!     class = vnodeIdToClass(vnp->vnodeNumber);
      vcp = &VnodeClassInfo[class];
      assert(vnp->disk.vnodeMagic == vcp->magic);
!     VNLog(200, 2, vnp->vnodeNumber, (afs_int32) vnp);
  
      writeLocked = WriteLocked(&vnp->lock);
      if (writeLocked) {
  #ifdef AFS_PTHREAD_ENV
  	pthread_t thisProcess = pthread_self();
  #else /* AFS_PTHREAD_ENV */
--- 1289,1332 ----
      VOL_UNLOCK;
  }
  
+ /**
+  * put back a handle to a vnode object.
+  *
+  * @param[out] ec   client error code
+  * @param[in]  vnp  vnode object pointer
+  *
+  * @pre VOL_LOCK held.
+  *      ref held on vnode.
+  *
+  * @post ref dropped on vnode.
+  *       if vnode was modified or deleted, it is written out to disk
+  *       (assuming a write lock was held).
+  *
+  * @internal volume package internal use only
+  */
  void
  VPutVnode_r(Error * ec, register Vnode * vnp)
  {
!     int writeLocked;
      VnodeClass class;
      struct VnodeClassInfo *vcp;
      int code;
  
      *ec = 0;
!     assert(Vn_refcount(vnp) != 0);
!     class = vnodeIdToClass(Vn_id(vnp));
      vcp = &VnodeClassInfo[class];
      assert(vnp->disk.vnodeMagic == vcp->magic);
!     VNLog(200, 2, Vn_id(vnp), (afs_int32) vnp);
  
+ #ifdef AFS_DEMAND_ATTACH_FS
+     writeLocked = (Vn_state(vnp) == VN_STATE_EXCLUSIVE);
+ #else
      writeLocked = WriteLocked(&vnp->lock);
+ #endif
+ 
      if (writeLocked) {
+ 	/* sanity checks */
  #ifdef AFS_PTHREAD_ENV
  	pthread_t thisProcess = pthread_self();
  #else /* AFS_PTHREAD_ENV */
***************
*** 851,867 ****
  	if (thisProcess != vnp->writer)
  	    Abort("VPutVnode: Vnode at 0x%x locked by another process!\n",
  		  vnp);
  	if (vnp->changed_oldTime || vnp->changed_newTime || vnp->delete) {
! 	    Volume *vp = vnp->volumePtr;
  	    afs_uint32 now = FT_ApproxTime();
! 	    assert(vnp->cacheCheck == vp->cacheCheck);
  
  	    if (vnp->delete) {
  		/* No longer any directory entries for this vnode. Free the Vnode */
  		memset(&vnp->disk, 0, sizeof(vnp->disk));
- 		mlkLastDelete = vnp->vnodeNumber;
  		/* delete flag turned off further down */
! 		VNLog(202, 2, vnp->vnodeNumber, (afs_int32) vnp);
  	    } else if (vnp->changed_newTime) {
  		vnp->disk.serverModifyTime = now;
  	    }
--- 1340,1357 ----
  	if (thisProcess != vnp->writer)
  	    Abort("VPutVnode: Vnode at 0x%x locked by another process!\n",
  		  vnp);
+ 
+ 
  	if (vnp->changed_oldTime || vnp->changed_newTime || vnp->delete) {
! 	    Volume *vp = Vn_volume(vnp);
  	    afs_uint32 now = FT_ApproxTime();
! 	    assert(Vn_cacheCheck(vnp) == vp->cacheCheck);
  
  	    if (vnp->delete) {
  		/* No longer any directory entries for this vnode. Free the Vnode */
  		memset(&vnp->disk, 0, sizeof(vnp->disk));
  		/* delete flag turned off further down */
! 		VNLog(202, 2, Vn_id(vnp), (afs_int32) vnp);
  	    } else if (vnp->changed_newTime) {
  		vnp->disk.serverModifyTime = now;
  	    }
***************
*** 875,978 ****
  	    /* The vnode has been changed. Write it out to disk */
  	    if (!V_inUse(vp)) {
  #ifdef AFS_DEMAND_ATTACH_FS
! 		VRequestSalvage_r(vp, SALVSYNC_ERROR, 0);
! 		*ec = VSALVAGING;
  #else
  		assert(V_needsSalvaged(vp));
  		*ec = VSALVAGE;
  #endif
  	    } else {
! 		IHandle_t *ihP = vp->vnodeIndex[class].handle;
! 		FdHandle_t *fdP;
! 		VOL_UNLOCK;
! 		fdP = IH_OPEN(ihP);
! 		if (fdP == NULL) {
! 		    Log("VPutVnode: can't open index file!\n");
! 		    goto error_encountered;
! 		}
! 		offset = vnodeIndexOffset(vcp, vnp->vnodeNumber);
! 		if (FDH_SEEK(fdP, offset, SEEK_SET) < 0) {
! 		    Log("VPutVnode: can't seek on index file! fdp=0x%x offset=%d, errno=%d\n",
! 			fdP, offset, errno);
! 		    goto error_encountered;
! 		}
! 		code = FDH_WRITE(fdP, &vnp->disk, vcp->diskSize);
! 		if (code != vcp->diskSize) {
! 		    /* Don't force volume offline if the inumber is out of
! 		     * range or the inode table is full.
! 		     */
! 		    VOL_LOCK;
! 		    if (code == BAD_IGET) {
! 			Log("VPutVnode: bad inumber %s\n",
! 			    PrintInode(NULL,
! 				       vp->vnodeIndex[class].handle->ih_ino));
! 			*ec = VIO;
! 		    } else {
! 			Log("VPutVnode: Couldn't write vnode %u, volume %u (%s) (error %d)\n", vnp->vnodeNumber, V_id(vnp->volumePtr), V_name(vnp->volumePtr), code);
! #ifdef AFS_DEMAND_ATTACH_FS
! 			VRequestSalvage_r(vp, SALVSYNC_ERROR, 0);
! 			*ec = VSALVAGING;
! #else
! 			VForceOffline_r(vp, 0);
! 			*ec = VSALVAGE;
! #endif
! 		    }
! 		    VOL_UNLOCK;
! 		    FDH_REALLYCLOSE(fdP);
! 		} else {
! 		    FDH_CLOSE(fdP);
! 		}
! 		VOL_LOCK;
! 		goto sane;
  
- 	    error_encountered:
- #ifdef AFS_DEMAND_ATTACH_FS
- 		/* XXX instead of dumping core, let's try to request a salvage
- 		 * and just fail the putvnode */
- 		if (fdP)
- 		    FDH_CLOSE(fdP);
- 		VOL_LOCK;
- 		VRequestSalvage_r(vp, SALVSYNC_ERROR, 0);
- 		*ec = VSALVAGING;
- 		goto done;
- #else
- 		assert(1 == 2);
- #endif
- 
- 	    sane:
  		/* If the vnode is to be deleted, and we wrote the vnode out,
  		 * free its bitmap entry. Do after the vnode is written so we
  		 * don't allocate from bitmap before the vnode is written
  		 * (doing so could cause a "addled bitmap" message).
  		 */
  		if (vnp->delete && !*ec) {
! 		    if (vnp->volumePtr->header->diskstuff.filecount-- < 1)
! 			vnp->volumePtr->header->diskstuff.filecount = 0;
  		    VFreeBitMapEntry_r(ec, &vp->vnodeIndex[class],
! 				       vnodeIdToBitNumber(vnp->vnodeNumber));
  		}
  	    }
  	    vcp->writes++;
  	    vnp->changed_newTime = vnp->changed_oldTime = 0;
  	}
      } else {			/* Not write locked */
  	if (vnp->changed_newTime || vnp->changed_oldTime || vnp->delete)
  	    Abort
  		("VPutVnode: Change or delete flag for vnode 0x%x is set but vnode is not write locked!\n",
  		 vnp);
      }
  
-  done:
      /* Do not look at disk portion of vnode after this point; it may
       * have been deleted above */
-     if (vnp->nUsers-- == 1)
- 	StickOnLruChain_r(vnp, vcp);
      vnp->delete = 0;
! 
!     if (writeLocked)
! 	ReleaseWriteLock(&vnp->lock);
!     else
! 	ReleaseReadLock(&vnp->lock);
  }
  
  /*
--- 1365,1411 ----
  	    /* The vnode has been changed. Write it out to disk */
  	    if (!V_inUse(vp)) {
  #ifdef AFS_DEMAND_ATTACH_FS
! 		VRequestSalvage_r(ec, vp, SALVSYNC_ERROR, 0);
  #else
  		assert(V_needsSalvaged(vp));
  		*ec = VSALVAGE;
  #endif
  	    } else {
! 		VnStore(ec, vp, vnp, vcp, class);
  
  		/* If the vnode is to be deleted, and we wrote the vnode out,
  		 * free its bitmap entry. Do after the vnode is written so we
  		 * don't allocate from bitmap before the vnode is written
  		 * (doing so could cause a "addled bitmap" message).
  		 */
  		if (vnp->delete && !*ec) {
! 		    if (Vn_volume(vnp)->header->diskstuff.filecount-- < 1)
! 			Vn_volume(vnp)->header->diskstuff.filecount = 0;
  		    VFreeBitMapEntry_r(ec, &vp->vnodeIndex[class],
! 				       vnodeIdToBitNumber(Vn_id(vnp)));
  		}
  	    }
  	    vcp->writes++;
  	    vnp->changed_newTime = vnp->changed_oldTime = 0;
  	}
+ #ifdef AFS_DEMAND_ATTACH_FS
+ 	VnChangeState_r(vnp, VN_STATE_ONLINE);
+ #endif
      } else {			/* Not write locked */
  	if (vnp->changed_newTime || vnp->changed_oldTime || vnp->delete)
  	    Abort
  		("VPutVnode: Change or delete flag for vnode 0x%x is set but vnode is not write locked!\n",
  		 vnp);
+ #ifdef AFS_DEMAND_ATTACH_FS
+ 	VnEndRead_r(vnp);
+ #endif
      }
  
      /* Do not look at disk portion of vnode after this point; it may
       * have been deleted above */
      vnp->delete = 0;
!     VnUnlock(vnp, ((writeLocked) ? WRITE_LOCK : READ_LOCK));
!     VnCancelReservation_r(vnp);
  }
  
  /*
***************
*** 990,995 ****
--- 1423,1445 ----
      return retVal;
  }
  
+ /**
+  * convert vnode handle from mutually exclusive to shared access.
+  *
+  * @param[out] ec   client error code
+  * @param[in]  vnp  vnode object pointer
+  *
+  * @return unspecified use (see out argument 'ec' for error code return)
+  *
+  * @pre VOL_LOCK held.
+  *      ref held on vnode.
+  *      write lock held on vnode.
+  *
+  * @post read lock held on vnode.
+  *       if vnode was modified, it has been written to disk.
+  *
+  * @internal volume package internal use only
+  */
  int
  VVnodeWriteToRead_r(Error * ec, register Vnode * vnp)
  {
***************
*** 1004,1039 ****
  #endif /* AFS_PTHREAD_ENV */
  
      *ec = 0;
!     assert(vnp->nUsers != 0);
!     class = vnodeIdToClass(vnp->vnodeNumber);
      vcp = &VnodeClassInfo[class];
      assert(vnp->disk.vnodeMagic == vcp->magic);
!     writeLocked = WriteLocked(&vnp->lock);
!     VNLog(300, 2, vnp->vnodeNumber, (afs_int32) vnp);
  
      if (!writeLocked) {
  	return 0;
      }
! #ifdef AFS_PTHREAD_ENV
!     thisProcess = pthread_self();
! #else /* AFS_PTHREAD_ENV */
!     LWP_CurrentProcess(&thisProcess);
! #endif /* AFS_PTHREAD_ENV */
  
      VNLog(301, 2, (afs_int32) vnp,
  	  ((vnp->changed_newTime) << 1) | ((vnp->
  					    changed_oldTime) << 1) | vnp->
  	  delete);
      if (thisProcess != vnp->writer)
  	Abort("VPutVnode: Vnode at 0x%x locked by another process!\n",
  	      (int)vnp);
      if (vnp->delete) {
  	return 0;
      }
      if (vnp->changed_oldTime || vnp->changed_newTime) {
! 	Volume *vp = vnp->volumePtr;
  	afs_uint32 now = FT_ApproxTime();
! 	assert(vnp->cacheCheck == vp->cacheCheck);
  	if (vnp->changed_newTime)
  	    vnp->disk.serverModifyTime = now;
  	if (vnp->changed_newTime)
--- 1454,1497 ----
  #endif /* AFS_PTHREAD_ENV */
  
      *ec = 0;
!     assert(Vn_refcount(vnp) != 0);
!     class = vnodeIdToClass(Vn_id(vnp));
      vcp = &VnodeClassInfo[class];
      assert(vnp->disk.vnodeMagic == vcp->magic);
!     VNLog(300, 2, Vn_id(vnp), (afs_int32) vnp);
  
+ #ifdef AFS_DEMAND_ATTACH_FS
+     writeLocked = (Vn_state(vnp) == VN_STATE_EXCLUSIVE);
+ #else
+     writeLocked = WriteLocked(&vnp->lock);
+ #endif
      if (!writeLocked) {
  	return 0;
      }
! 
  
      VNLog(301, 2, (afs_int32) vnp,
  	  ((vnp->changed_newTime) << 1) | ((vnp->
  					    changed_oldTime) << 1) | vnp->
  	  delete);
+ 
+     /* sanity checks */
+ #ifdef AFS_PTHREAD_ENV
+     thisProcess = pthread_self();
+ #else /* AFS_PTHREAD_ENV */
+     LWP_CurrentProcess(&thisProcess);
+ #endif /* AFS_PTHREAD_ENV */
      if (thisProcess != vnp->writer)
  	Abort("VPutVnode: Vnode at 0x%x locked by another process!\n",
  	      (int)vnp);
+ 
      if (vnp->delete) {
  	return 0;
      }
      if (vnp->changed_oldTime || vnp->changed_newTime) {
! 	Volume *vp = Vn_volume(vnp);
  	afs_uint32 now = FT_ApproxTime();
! 	assert(Vn_cacheCheck(vnp) == vp->cacheCheck);
  	if (vnp->changed_newTime)
  	    vnp->disk.serverModifyTime = now;
  	if (vnp->changed_newTime)
***************
*** 1042,1165 ****
  	/* The inode has been changed.  Write it out to disk */
  	if (!V_inUse(vp)) {
  #ifdef AFS_DEMAND_ATTACH_FS
! 	    VRequestSalvage_r(vp, SALVSYNC_ERROR, 0);
! 	    *ec = VSALVAGING;
  #else
  	    assert(V_needsSalvaged(vp));
  	    *ec = VSALVAGE;
  #endif
  	} else {
! 	    IHandle_t *ihP = vp->vnodeIndex[class].handle;
! 	    FdHandle_t *fdP;
! 	    off_t off = vnodeIndexOffset(vcp, vnp->vnodeNumber);
! 	    VOL_UNLOCK;
! 	    fdP = IH_OPEN(ihP);
! 	    if (fdP == NULL) {
! 		Log("VPutVnode: can't open index file!\n");
! 		goto error_encountered;
! 	    }
! 	    code = FDH_SEEK(fdP, off, SEEK_SET);
! 	    if (code < 0) {
! 		Log("VPutVnode: can't seek on index file!\n");
! 		goto error_encountered;
! 	    }
! 	    code = FDH_WRITE(fdP, &vnp->disk, vcp->diskSize);
! 	    if (code != vcp->diskSize) {
! 		/*
! 		 * Don't force volume offline if the inumber is out of
! 		 * range or the inode table is full.
! 		 */
! 		VOL_LOCK;
! 		if (code == BAD_IGET) {
! 		    Log("VPutVnode: bad inumber %s\n",
! 			PrintInode(NULL,
! 				   vp->vnodeIndex[class].handle->ih_ino));
! 		    *ec = VIO;
! 		} else {
! 		    Log("VPutVnode: Couldn't write vnode %u, volume %u (%s)\n", vnp->vnodeNumber, V_id(vnp->volumePtr), V_name(vnp->volumePtr));
! #ifdef AFS_DEMAND_ATTACH_FS
! 		    VRequestSalvage_r(vp, SALVSYNC_ERROR, 0);
! 		    *ec = VSALVAGING;
! #else
! 		    VForceOffline_r(vp, 0);
! 		    *ec = VSALVAGE;
! #endif
! 		}
! 		VOL_UNLOCK;
! 	    }
! 	    FDH_CLOSE(fdP);
! 	    VOL_LOCK;
! 	    goto sane;
! 
! 	error_encountered:
! #ifdef AFS_DEMAND_ATTACH_FS
! 	    if (fdP)
! 		FDH_CLOSE(fdP);
! 	    VOL_LOCK;
! 	    VRequestSalvage_r(vp, SALVSYNC_ERROR, 0);
! 	    *ec = VSALVAGING;
! #else
! 	    assert(1 == 2);
! #endif
! 
  	}
      sane:
  	vcp->writes++;
  	vnp->changed_newTime = vnp->changed_oldTime = 0;
      }
  
      ConvertWriteToReadLock(&vnp->lock);
      return 0;
  }
  
- /* Move the vnode, vnp, to the new hash table given by the
-    hash table index, newHash */
- static int
- moveHash(register Vnode * vnp, bit32 newHash)
- {
-     Vnode *tvnp;
-     /* Remove it from the old hash chain */
-     tvnp = VnodeHashTable[vnp->hashIndex];
-     if (tvnp == vnp)
- 	VnodeHashTable[vnp->hashIndex] = vnp->hashNext;
-     else {
- 	while (tvnp && tvnp->hashNext != vnp)
- 	    tvnp = tvnp->hashNext;
- 	if (tvnp)
- 	    tvnp->hashNext = vnp->hashNext;
-     }
-     /* Add it to the new hash chain */
-     vnp->hashNext = VnodeHashTable[newHash];
-     VnodeHashTable[newHash] = vnp;
-     vnp->hashIndex = newHash;
-     return 0;
- }
- 
- private void
- StickOnLruChain_r(register Vnode * vnp, register struct VnodeClassInfo *vcp)
- {
-     /* Add it to the circular LRU list */
-     if (vcp->lruHead == NULL)
- 	Abort("VPutVnode: vcp->lruHead==NULL");
-     else {
- 	vnp->lruNext = vcp->lruHead;
- 	vnp->lruPrev = vcp->lruHead->lruPrev;
- 	vcp->lruHead->lruPrev = vnp;
- 	vnp->lruPrev->lruNext = vnp;
- 	vcp->lruHead = vnp;
-     }
-     /* If the vnode was just deleted, put it at the end of the chain so it
-      * will be reused immediately */
-     if (vnp->delete)
- 	vcp->lruHead = vnp->lruNext;
-     /* If caching is turned off, set volumeptr to NULL to invalidate the
-      * entry */
-     if (!TrustVnodeCacheEntry) {
- 	DeleteFromVnHashByVolumeTable(vnp);
- 	vnp->volumePtr = NULL;
-     }
- }
- 
  /* VCloseVnodeFiles - called when a volume is going off line. All open
   * files for vnodes in that volume are closed. This might be excessive,
   * since we may only be taking one volume of a volume group offline.
--- 1500,1528 ----
  	/* The inode has been changed.  Write it out to disk */
  	if (!V_inUse(vp)) {
  #ifdef AFS_DEMAND_ATTACH_FS
! 	    VRequestSalvage_r(ec, vp, SALVSYNC_ERROR, 0);
  #else
  	    assert(V_needsSalvaged(vp));
  	    *ec = VSALVAGE;
  #endif
  	} else {
! 	    VnStore(ec, vp, vnp, vcp, class);
  	}
      sane:
  	vcp->writes++;
  	vnp->changed_newTime = vnp->changed_oldTime = 0;
      }
  
+     vnp->writer = 0;
+ #ifdef AFS_DEMAND_ATTACH_FS
+     VnChangeState_r(vnp, VN_STATE_ONLINE);
+     VnBeginRead_r(vnp);
+ #else
      ConvertWriteToReadLock(&vnp->lock);
+ #endif
      return 0;
  }
  
  /* VCloseVnodeFiles - called when a volume is going off line. All open
   * files for vnodes in that volume are closed. This might be excessive,
   * since we may only be taking one volume of a volume group offline.
***************
*** 1169,1230 ****
  {
      int i;
      Vnode *vnp, *nvnp;
-     VnodeHashByVolumeChainHead * head;
- 
-     head = &VnodeHashByVolumeTable[VNVOLUME_HASH(vp->hashid)];
  #ifdef AFS_DEMAND_ATTACH_FS
!     while (head->busy) {
! 	assert(pthread_cond_wait(&head->chain_busy_cv, &vol_glock_mutex) == 0);
!     }
  
!     head->busy = 1;
      VOL_UNLOCK;
  #endif /* AFS_DEMAND_ATTACH_FS */
  
!     for (queue_Scan(head, vnp, nvnp, Vnode)) {
! 	if (vnp->volumePtr == vp) {
! 	    IH_REALLYCLOSE(vnp->handle);
! 	}
      }
  
  #ifdef AFS_DEMAND_ATTACH_FS
      VOL_LOCK;
!     head->busy = 0;
!     assert(pthread_cond_broadcast(&head->chain_busy_cv) == 0);
  #endif /* AFS_DEMAND_ATTACH_FS */
  }
  
! /* VReleaseVnodeFiles - called when a volume is going detached. All open
!  * files for vnodes in that volume are closed and all inode handles
!  * for vnodes in that volume are released.
   */
  void
  VReleaseVnodeFiles_r(Volume * vp)
  {
      int i;
      Vnode *vnp, *nvnp;
-     VnodeHashByVolumeChainHead * head;
- 
-     head = &VnodeHashByVolumeTable[VNVOLUME_HASH(vp->hashid)];
- 
  #ifdef AFS_DEMAND_ATTACH_FS
!     while (head->busy) {
! 	assert(pthread_cond_wait(&head->chain_busy_cv, &vol_glock_mutex) == 0);
!     }
  
!     head->busy = 1;
      VOL_UNLOCK;
  #endif /* AFS_DEMAND_ATTACH_FS */
  
!     for (queue_Scan(head, vnp, nvnp, Vnode)) {
! 	if (vnp->volumePtr == vp) {
! 	    IH_RELEASE(vnp->handle);
! 	}
      }
  
  #ifdef AFS_DEMAND_ATTACH_FS
      VOL_LOCK;
!     head->busy = 0;
!     assert(pthread_cond_broadcast(&head->chain_busy_cv) == 0);
  #endif /* AFS_DEMAND_ATTACH_FS */
  }
--- 1532,1593 ----
  {
      int i;
      Vnode *vnp, *nvnp;
  #ifdef AFS_DEMAND_ATTACH_FS
!     VolState vol_state_save;
  
!     vol_state_save = VChangeState_r(vp, VOL_STATE_VNODE_CLOSE);
      VOL_UNLOCK;
  #endif /* AFS_DEMAND_ATTACH_FS */
  
!     for (queue_Scan(&vp->vnode_list, vnp, nvnp, Vnode)) {
! 	IH_REALLYCLOSE(vnp->handle);
! 	DeleteFromVVnList(vnp);
      }
  
  #ifdef AFS_DEMAND_ATTACH_FS
      VOL_LOCK;
!     VChangeState_r(vp, vol_state_save);
  #endif /* AFS_DEMAND_ATTACH_FS */
  }
  
! /**
!  * shut down all vnode cache state for a given volume.
!  *
!  * @param[in] vp  volume object pointer
!  *
!  * @pre VOL_LOCK is held
!  *
!  * @post all file descriptors closed.
!  *       all inode handles released.
!  *       all vnode cache objects disassociated from volume.
!  *
!  * @note for DAFS, these operations are performed outside the vol glock under
!  *       volume exclusive state VOL_STATE_VNODE_RELEASE.  Please further note
!  *       that it would be a bug to acquire and release a volume reservation
!  *       during this exclusive operation.  This is due to the fact that we are
!  *       generally called during the refcount 1->0 transition.
!  *
!  * @internal this routine is internal to the volume package
   */
  void
  VReleaseVnodeFiles_r(Volume * vp)
  {
      int i;
      Vnode *vnp, *nvnp;
  #ifdef AFS_DEMAND_ATTACH_FS
!     VolState vol_state_save;
  
!     vol_state_save = VChangeState_r(vp, VOL_STATE_VNODE_RELEASE);
      VOL_UNLOCK;
  #endif /* AFS_DEMAND_ATTACH_FS */
  
!     for (queue_Scan(&vp->vnode_list, vnp, nvnp, Vnode)) {
! 	IH_RELEASE(vnp->handle);
! 	DeleteFromVVnList(vnp);
      }
  
  #ifdef AFS_DEMAND_ATTACH_FS
      VOL_LOCK;
!     VChangeState_r(vp, vol_state_save);
  #endif /* AFS_DEMAND_ATTACH_FS */
  }
Index: openafs/src/vol/vnode.h
diff -c openafs/src/vol/vnode.h:1.15 openafs/src/vol/vnode.h:1.15.2.1
*** openafs/src/vol/vnode.h:1.15	Fri Mar 17 14:54:51 2006
--- openafs/src/vol/vnode.h	Mon Feb  4 13:51:39 2008
***************
*** 5,10 ****
--- 5,12 ----
   * 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
+  *
+  * Portions Copyright (c) 2007-2008 Sine Nomine Associates
   */
  
  /*
***************
*** 14,19 ****
--- 16,24 ----
  
   */
  
+ #ifndef _AFS_VOL_VNODE_H
+ #define _AFS_VOL_VNODE_H 1
+ 
  #define Date afs_uint32
  
  struct Volume;			/* Potentially forward definition. */
***************
*** 117,122 ****
--- 122,163 ----
  	(sizeof(VnodeDiskObject) == SIZEOF_SMALLDISKVNODE)
  #define SIZEOF_LARGEDISKVNODE	256
  
+ 
+ 
+ #ifdef AFS_DEMAND_ATTACH_FS
+ /**
+  * demand attach vnode state enumeration.
+  *
+  * @note values must be contiguous for VnIsValidState() to work
+  */
+ typedef enum {
+     VN_STATE_INVALID            = 0,    /**< vnode does not contain valid cache data */
+     VN_STATE_RELEASING          = 1,    /**< vnode is busy releasing its ihandle ref */
+     VN_STATE_CLOSING            = 2,    /**< vnode is busy closing its ihandle ref */
+     VN_STATE_ALLOC              = 3,    /**< vnode is busy allocating disk entry */
+     VN_STATE_ONLINE             = 4,    /**< vnode is ready for use */
+     VN_STATE_LOAD               = 5,    /**< vnode is busy being loaded from disk */
+     VN_STATE_EXCLUSIVE          = 6,    /**< something external to the vnode package
+ 					 *   is operating exclusively on this vnode */
+     VN_STATE_STORE              = 7,    /**< vnode is busy being stored to disk */
+     VN_STATE_READ               = 8,    /**< a non-zero number of threads are executing
+ 					 *   code external to the vnode package which
+ 					 *   requires shared access */
+     VN_STATE_ERROR              = 10,   /**< vnode hard error state */
+     VN_STATE_COUNT
+ } VnState;
+ #endif /* AFS_DEMAND_ATTACH_FS */
+ 
+ /**
+  * DAFS vnode state flags.
+  */
+ enum VnFlags {
+     VN_ON_HASH            = 0x1,        /**< vnode is on hash table */
+     VN_ON_LRU             = 0x2,        /**< vnode is on lru list */
+     VN_ON_VVN             = 0x4,        /**< vnode is on volume vnode list */
+ };
+ 
+ 
  typedef struct Vnode {
      struct rx_queue vid_hash;   /* for vnode by volume id hash */
      struct Vnode *hashNext;	/* Next vnode on hash conflict chain */
***************
*** 142,153 ****
--- 183,202 ----
      bit32 nUsers;		/* Number of lwp's who have done a VGetVnode */
      bit32 cacheCheck;		/* Must equal the value in the volume Header
  				 * for the cache entry to be valid */
+     bit32 vn_state_flags;       /**< vnode state flags */
+ #ifdef AFS_DEMAND_ATTACH_FS
+     bit32 nReaders;             /**< number of read locks held */
+     VnState vn_state;           /**< vnode state */
+     pthread_cond_t vn_state_cv; /**< state change notification cv */
+ #else /* !AFS_DEMAND_ATTACH_FS */
      struct Lock lock;		/* Internal lock */
+ #endif /* !AFS_DEMAND_ATTACH_FS */
  #ifdef AFS_PTHREAD_ENV
      pthread_t writer;		/* thread holding write lock */
  #else				/* AFS_PTHREAD_ENV */
      PROCESS writer;		/* Process id having write lock */
  #endif				/* AFS_PTHREAD_ENV */
+     struct VnodeClassInfo * vcp; /**< our vnode class */
      IHandle_t *handle;
      VnodeDiskObject disk;	/* The actual disk data for the vnode */
  } Vnode;
***************
*** 156,161 ****
--- 205,225 ----
  	(sizeof(struct Vnode) - sizeof(VnodeDiskObject) + SIZEOF_LARGEDISKVNODE)
  #define SIZEOF_SMALLVNODE	(sizeof (struct Vnode))
  
+ 
+ /*
+  * struct Vnode accessor abstraction
+  */
+ #define Vn_refcount(vnp)      ((vnp)->nUsers)
+ #define Vn_state(vnp)         ((vnp)->vn_state)
+ #define Vn_stateFlags(vnp)    ((vnp)->vn_state_flags)
+ #define Vn_stateCV(vnp)       ((vnp)->vn_state_cv)
+ #define Vn_volume(vnp)        ((vnp)->volumePtr)
+ #define Vn_cacheCheck(vnp)    ((vnp)->cacheCheck)
+ #define Vn_class(vnp)         ((vnp)->vcp)
+ #define Vn_readers(vnp)       ((vnp)->nReaders)
+ #define Vn_id(vnp)            ((vnp)->vnodeNumber)
+ 
+ 
  #ifdef AFS_LARGEFILE_ENV
  #define VN_GET_LEN(N, V) FillInt64(N, (V)->disk.reserved6, (V)->disk.length)
  #define VNDISK_GET_LEN(N, V) FillInt64(N, (V)->reserved6, (V)->length)
***************
*** 217,220 ****
  extern Vnode *VAllocVnode_r(Error * ec, struct Volume *vp, VnodeType type);
  /*extern VFreeVnode();*/
  extern Vnode *VGetFreeVnode_r(struct VnodeClassInfo *vcp);
! extern void VInitVnHashByVolume(void);
--- 281,293 ----
  extern Vnode *VAllocVnode_r(Error * ec, struct Volume *vp, VnodeType type);
  /*extern VFreeVnode();*/
  extern Vnode *VGetFreeVnode_r(struct VnodeClassInfo *vcp);
! extern Vnode *VLookupVnode(struct Volume * vp, VnodeId vnodeId);
! 
! extern void AddToVVnList(struct Volume * vp, Vnode * vnp);
! extern void DeleteFromVVnList(register Vnode * vnp);
! extern void AddToVnLRU(struct VnodeClassInfo * vcp, Vnode * vnp);
! extern void DeleteFromVnLRU(struct VnodeClassInfo * vcp, Vnode * vnp);
! extern void AddToVnHash(Vnode * vnp);
! extern void DeleteFromVnHash(Vnode * vnp);
! 
! #endif /* _AFS_VOL_VNODE_H */
Index: openafs/src/vol/vnode_inline.h
diff -c /dev/null openafs/src/vol/vnode_inline.h:1.1.2.3
*** /dev/null	Mon Feb 11 10:58:28 2008
--- openafs/src/vol/vnode_inline.h	Wed Feb  6 07:21:48 2008
***************
*** 0 ****
--- 1,375 ----
+ /*
+  * Copyright 2007-2008, Sine Nomine Associates and others.
+  * All Rights Reserved.
+  * 
+  * This software has been released under the terms of the IBM Public
+  * License.  For details, see the LICENSE file in the top-level source
+  * directory or online at http://www.openafs.org/dl/license10.html
+  */
+ 
+ #ifndef _AFS_VOL_VNODE_INLINE_H
+ #define _AFS_VOL_VNODE_INLINE_H 1
+ 
+ #include "vnode.h"
+ 
+ #ifdef AFS_HPUX_ENV
+ #define static_inline static __inline
+ #elif defined(AFS_AIX_ENV)
+ #define static_inline inline
+ #else
+ #define static_inline static inline
+ #endif
+ 
+ /***************************************************/
+ /* demand attach vnode state machine routines      */
+ /***************************************************/
+ 
+ /**
+  * get a reference to a vnode object.
+  *
+  * @param[in] vnp  vnode object pointer
+  *
+  * @internal vnode package internal use only
+  *
+  * @pre VOL_LOCK must be held
+  *
+  * @post vnode refcount incremented
+  *
+  * @see VnCancelReservation_r
+  */
+ static_inline void
+ VnCreateReservation_r(Vnode * vnp)
+ {
+     Vn_refcount(vnp)++;
+     if (Vn_refcount(vnp) == 1) {
+ 	DeleteFromVnLRU(Vn_class(vnp), vnp);
+     }
+ }
+ 
+ extern int TrustVnodeCacheEntry;
+ 
+ /**
+  * release a reference to a vnode object.
+  *
+  * @param[in] vnp  vnode object pointer
+  *
+  * @pre VOL_LOCK held
+  *
+  * @post refcount decremented; possibly re-added to vn lru
+  *
+  * @internal vnode package internal use only
+  *
+  * @see VnCreateReservation_r
+  */
+ static_inline void
+ VnCancelReservation_r(Vnode * vnp)
+ {
+     if (--Vn_refcount(vnp) == 0) {
+ 	AddToVnLRU(Vn_class(vnp), vnp);
+ 
+ 	/* If caching is turned off, 
+ 	 * disassociate vnode cache entry from volume object */
+ 	if (!TrustVnodeCacheEntry) {
+ 	    DeleteFromVVnList(vnp);
+ 	}
+     }
+ }
+ 
+ #ifdef AFS_PTHREAD_ENV
+ #define VN_SET_WRITER_THREAD_ID(v)  (((v)->writer) = pthread_self())
+ #else
+ #define VN_SET_WRITER_THREAD_ID(v)  (LWP_CurrentProcess(&((v)->writer)))
+ #endif
+ 
+ #define VOL_LOCK_NOT_HELD 0
+ #define VOL_LOCK_HELD 1
+ #define MIGHT_DEADLOCK 0
+ #define WILL_NOT_DEADLOCK 1
+ 
+ /**
+  * acquire a lock on a vnode object.
+  *
+  * @param[in] vnp   vnode object pointer
+  * @param[in] type  lock type
+  * @param[in] held  whether or not vol glock is held
+  * @param[in] safe  whether it it is safe to acquire without dropping vol glock
+  *
+  * @note caller must guarantee deadlock will not occur
+  *
+  * @post lock acquired.
+  *       for write case, thread owner field set.
+  *
+  * @note for DAFS, this is a no-op
+  *
+  * @internal vnode package internal use only
+  */
+ static_inline void
+ VnLock(Vnode * vnp, int type, int held, int safe)
+ {
+ #ifdef AFS_DEMAND_ATTACH_FS
+     if (type == WRITE_LOCK) {
+ 	VN_SET_WRITER_THREAD_ID(vnp);
+     }
+ #else /* !AFS_DEMAND_ATTACH_FS */
+     if (held && !safe) {
+ 	VOL_UNLOCK;
+     }
+     if (type == READ_LOCK) {
+ 	ObtainReadLock(&vnp->lock);
+     } else {
+ 	ObtainWriteLock(&vnp->lock);
+ 	VN_SET_WRITER_THREAD_ID(vnp);
+     }
+     if (held && !safe) {
+ 	VOL_LOCK;
+     }
+ #endif /* !AFS_DEMAND_ATTACH_FS */
+ }
+ 
+ /**
+  * release a lock on a vnode object.
+  *
+  * @param[in] vnp   vnode object pointer
+  * @param[in] type  lock type
+  *
+  * @note for DAFS, this is a no-op
+  *
+  * @internal vnode package internal use only
+  */
+ static_inline void
+ VnUnlock(Vnode * vnp, int type)
+ {
+     if (type == READ_LOCK) {
+ #ifndef AFS_DEMAND_ATTACH_FS
+ 	ReleaseReadLock(&vnp->lock);
+ #endif
+     } else {
+ 	vnp->writer = 0;
+ #ifndef AFS_DEMAND_ATTACH_FS
+ 	ReleaseWriteLock(&vnp->lock);
+ #endif
+     }
+ }
+ 
+ 
+ #ifdef AFS_DEMAND_ATTACH_FS
+ /**
+  * change state, and notify other threads,
+  * return previous state to caller.
+  *
+  * @param[in] vnp        pointer to vnode object
+  * @param[in] new_state  new vnode state value
+  *
+  * @pre VOL_LOCK held
+  *
+  * @post vnode state changed
+  *
+  * @return previous vnode state
+  *
+  * @note DEMAND_ATTACH_FS only
+  *
+  * @internal vnode package internal use only
+  */
+ static_inline VnState
+ VnChangeState_r(Vnode * vnp, VnState new_state)
+ {
+     VnState old_state = Vn_state(vnp);
+ 
+     Vn_state(vnp) = new_state;
+     assert(pthread_cond_broadcast(&Vn_stateCV(vnp)) == 0);
+     return old_state;
+ }
+ 
+ /**
+  * tells caller whether or not the current state requires
+  * exclusive access without holding glock.
+  *
+  * @param[in] state  vnode state enumeration
+  *
+  * @return whether vnode state is a mutually exclusive state
+  *   @retval 0  no, state is re-entrant
+  *   @retval 1  yes, state is mutually exclusive
+  *
+  * @note DEMAND_ATTACH_FS only
+  */
+ static_inline int
+ VnIsExclusiveState(VnState state)
+ {
+     switch (state) {
+     case VN_STATE_RELEASING:
+     case VN_STATE_CLOSING:
+     case VN_STATE_ALLOC:
+     case VN_STATE_LOAD:
+     case VN_STATE_EXCLUSIVE:
+     case VN_STATE_STORE:
+ 	return 1;
+     }
+     return 0;
+ }
+ 
+ /**
+  * tell caller whether vnode state is an error condition.
+  *
+  * @param[in] state  vnode state enumeration
+  *
+  * @return whether vnode state is in error state
+  *   @retval 0  state is not an error state
+  *   @retval 1  state is an error state
+  *
+  * @note DEMAND_ATTACH_FS only
+  */
+ static_inline int
+ VnIsErrorState(VnState state)
+ {
+     switch (state) {
+     case VN_STATE_ERROR:
+ 	return 1;
+     }
+     return 0;
+ }
+ 
+ /**
+  * tell caller whether vnode state is valid.
+  *
+  * @param[in] state  vnode state enumeration
+  *
+  * @return whether vnode state is a mutually exclusive state
+  *   @retval 0  no, state is not valid
+  *   @retval 1  yes, state is a valid enumeration member
+  *
+  * @note DEMAND_ATTACH_FS only
+  */
+ static_inline int
+ VnIsValidState(VnState state)
+ {
+     if ((state >= 0) && 
+ 	(state < VN_STATE_COUNT)) {
+ 	return 1;
+     }
+     return 0;
+ }
+ 
+ /**
+  * wait for the vnode to change states.
+  *
+  * @param[in] vnp  vnode object pointer
+  *
+  * @pre VOL_LOCK held; ref held on vnode
+  *
+  * @post VOL_LOCK held; vnode state has changed from previous value
+  *
+  * @note DEMAND_ATTACH_FS only
+  */
+ static_inline void
+ VnWaitStateChange_r(Vnode * vnp)
+ {
+     VnState state_save = Vn_state(vnp);
+ 
+     assert(Vn_refcount(vnp));
+     do {
+ 	VOL_CV_WAIT(&Vn_stateCV(vnp));
+     } while (Vn_state(vnp) == state_save);
+     assert(!(Vn_stateFlags(vnp) & VN_ON_LRU));
+ }
+ 
+ /**
+  * wait for blocking ops to end.
+  *
+  * @pre VOL_LOCK held; ref held on vnode
+  *
+  * @post VOL_LOCK held; vnode not in exclusive state
+  *
+  * @param[in] vnp  vnode object pointer
+  *
+  * @note DEMAND_ATTACH_FS only
+  */
+ static_inline void
+ VnWaitExclusiveState_r(Vnode * vnp)
+ {
+     assert(Vn_refcount(vnp));
+     while (VnIsExclusiveState(Vn_state(vnp))) {
+ 	VOL_CV_WAIT(&Vn_stateCV(vnp));
+     }
+     assert(!(Vn_stateFlags(vnp) & VN_ON_LRU));
+ }
+ 
+ /**
+  * wait until vnode is in non-exclusive state, and there are no active readers.
+  *
+  * @param[in] vnp  vnode object pointer
+  *
+  * @pre VOL_LOCK held; ref held on vnode
+  *
+  * @post VOL_LOCK held; vnode is in non-exclusive state and has no active readers
+  *
+  * @note DEMAND_ATTACH_FS only
+  */
+ static_inline void
+ VnWaitQuiescent_r(Vnode * vnp)
+ {
+     assert(Vn_refcount(vnp));
+     while (VnIsExclusiveState(Vn_state(vnp)) ||
+ 	   Vn_readers(vnp)) {
+ 	VOL_CV_WAIT(&Vn_stateCV(vnp));
+     }
+     assert(!(Vn_stateFlags(vnp) & VN_ON_LRU));
+ }
+ 
+ /**
+  * register a new reader on a vnode.
+  *
+  * @param[in] vnp  vnode object pointer
+  *
+  * @pre VOL_LOCK held.
+  *      ref held on vnode.
+  *      vnode in VN_STATE_READ or VN_STATE_ONLINE
+  *
+  * @post refcount incremented.
+  *       state set to VN_STATE_READ.
+  *
+  * @note DEMAND_ATTACH_FS only
+  *
+  * @internal vnode package internal use only
+  */
+ static_inline void
+ VnBeginRead_r(Vnode * vnp)
+ {
+     if (!Vn_readers(vnp)) {
+ 	assert(Vn_state(vnp) == VN_STATE_ONLINE);
+ 	VnChangeState_r(vnp, VN_STATE_READ);
+     }
+     Vn_readers(vnp)++;
+     assert(Vn_state(vnp) == VN_STATE_READ);
+ }
+ 
+ /**
+  * deregister a reader on a vnode.
+  *
+  * @param[in] vnp  vnode object pointer
+  *
+  * @pre VOL_LOCK held.
+  *      ref held on vnode.
+  *      read ref held on vnode.
+  *      vnode in VN_STATE_READ.
+  *
+  * @post refcount decremented.
+  *       when count reaches zero, state set to VN_STATE_ONLINE.
+  *
+  * @note DEMAND_ATTACH_FS only
+  *
+  * @internal vnode package internal use only
+  */
+ static_inline void
+ VnEndRead_r(Vnode * vnp)
+ {
+     assert(Vn_readers(vnp) > 0);
+     Vn_readers(vnp)--;
+     if (!Vn_readers(vnp)) {
+ 	assert(pthread_cond_broadcast(&Vn_stateCV(vnp)) == 0);
+ 	VnChangeState_r(vnp, VN_STATE_ONLINE);
+     }
+ }
+ 
+ #endif /* AFS_DEMAND_ATTACH_FS */
+ 
+ #endif /* _AFS_VOL_VNODE_INLINE_H */
Index: openafs/src/vol/volume.c
diff -c openafs/src/vol/volume.c:1.43.2.11 openafs/src/vol/volume.c:1.43.2.13
*** openafs/src/vol/volume.c:1.43.2.11	Thu Nov  1 11:00:03 2007
--- openafs/src/vol/volume.c	Sun Feb 10 22:37:22 2008
***************
*** 6,12 ****
   * License.  For details, see the LICENSE file in the top-level source
   * directory or online at http://www.openafs.org/dl/license10.html
   *
!  * Portions Copyright (c) 2006 Sine Nomine Associates
   */
  
  /* 1/1/89: NB:  this stuff is all going to be replaced.  Don't take it too seriously */
--- 6,12 ----
   * License.  For details, see the LICENSE file in the top-level source
   * directory or online at http://www.openafs.org/dl/license10.html
   *
!  * Portions Copyright (c) 2005-2008 Sine Nomine Associates
   */
  
  /* 1/1/89: NB:  this stuff is all going to be replaced.  Don't take it too seriously */
***************
*** 22,28 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/volume.c,v 1.43.2.11 2007/11/01 15:00:03 shadow Exp $");
  
  #include <rx/xdr.h>
  #include <afs/afsint.h>
--- 22,28 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/volume.c,v 1.43.2.13 2008/02/11 03:37:22 shadow Exp $");
  
  #include <rx/xdr.h>
  #include <afs/afsint.h>
***************
*** 129,134 ****
--- 129,135 ----
  #include "vnode.h"
  #include "volume.h"
  #include "partition.h"
+ #include "volume_inline.h"
  #ifdef AFS_PTHREAD_ENV
  #include <assert.h>
  #else /* AFS_PTHREAD_ENV */
***************
*** 210,215 ****
--- 211,220 ----
  /* extended volume package statistics */
  VolPkgStats VStats;
  
+ #ifdef VOL_LOCK_DEBUG
+ pthread_t vol_glock_holder = 0;
+ #endif
+ 
  
  #define VOLUME_BITMAP_GROWSIZE	16	/* bytes, => 128vnodes */
  					/* Must be a multiple of 4 (1 word) !! */
***************
*** 362,376 ****
  static void VHashEndExclusive_r(VolumeHashChainHead * head);
  static void VHashWait_r(VolumeHashChainHead * head);
  
- /* Volume state machine */
- static void VCreateReservation_r(Volume * vp);
- static void VCancelReservation_r(Volume * vp);
- static void VWaitStateChange_r(Volume * vp);
- static void VWaitExclusiveState_r(Volume * vp);
- static int IsExclusiveState(VolState state);
- static int IsErrorState(VolState state);
- static int IsValidState(VolState state);
- 
  /* shutdown */
  static int ShutdownVByPForPass_r(struct DiskPartition * dp, int pass);
  static int ShutdownVolumeWalk_r(struct DiskPartition * dp, int pass,
--- 367,372 ----
***************
*** 440,453 ****
  
      programType = pt;
  
- #ifdef AFS_DEMAND_ATTACH_FS
      memset(&VStats, 0, sizeof(VStats));
      VStats.hdr_cache_size = 200;
- #endif
  
      VInitPartitionPackage();
      VInitVolumeHash();
-     VInitVnHashByVolume();
  #ifdef AFS_DEMAND_ATTACH_FS
      if (programType == fileServer) {
  	VInitVLRU();
--- 436,446 ----
***************
*** 554,560 ****
  	    }
  
  	    while(params.n_threads_complete < threads) {
! 		pthread_cond_wait(&params.thread_done_cv,&vol_glock_mutex);
  	    }
  	    VOL_UNLOCK;
  
--- 547,553 ----
  	    }
  
  	    while(params.n_threads_complete < threads) {
! 		VOL_CV_WAIT(&params.thread_done_cv);
  	    }
  	    VOL_UNLOCK;
  
***************
*** 669,676 ****
        Error error;
        Volume *vp;
  #ifdef AFS_DEMAND_ATTACH_FS
!       vp = VPreAttachVolumeByName(&error, diskP->name, dp->d_name,
!                                   V_VOLUPD);
  #else /* AFS_DEMAND_ATTACH_FS */
        vp = VAttachVolumeByName(&error, diskP->name, dp->d_name,
  			       V_VOLUPD);
--- 662,668 ----
        Error error;
        Volume *vp;
  #ifdef AFS_DEMAND_ATTACH_FS
!       vp = VPreAttachVolumeByName(&error, diskP->name, dp->d_name);
  #else /* AFS_DEMAND_ATTACH_FS */
        vp = VAttachVolumeByName(&error, diskP->name, dp->d_name,
  			       V_VOLUPD);
***************
*** 844,850 ****
  	
  	/* wait for all the workers to finish pass 3 and terminate */
  	while (params.pass < 4) {
! 	    assert(pthread_cond_wait(&params.cv, &vol_glock_mutex) == 0);
  	}
  	
  	assert(pthread_attr_destroy(&attrs) == 0);
--- 836,842 ----
  	
  	/* wait for all the workers to finish pass 3 and terminate */
  	while (params.pass < 4) {
! 	    VOL_CV_WAIT(&params.cv);
  	}
  	
  	assert(pthread_attr_destroy(&attrs) == 0);
***************
*** 1206,1212 ****
  			pass, params->n_threads, params->n_parts);
  		    VOL_LOCK;
  		} else {
! 		    assert(pthread_cond_wait(&params->cv, &vol_glock_mutex) == 0);
  		}
  	    }
  	    pass = params->pass;
--- 1198,1204 ----
  			pass, params->n_threads, params->n_parts);
  		    VOL_LOCK;
  		} else {
! 		    VOL_CV_WAIT(&params->cv);
  		}
  	    }
  	    pass = params->pass;
***************
*** 1318,1324 ****
  		break;
  	    }
  	case 2:
! 	    if (IsExclusiveState(V_attachState(vp))) {
  		break;
  	    }
  	case 3:
--- 1310,1316 ----
  		break;
  	    }
  	case 2:
! 	    if (VIsExclusiveState(V_attachState(vp))) {
  		break;
  	    }
  	case 3:
***************
*** 1352,1358 ****
      /* wait for other blocking ops to finish */
      VWaitExclusiveState_r(vp);
  
!     assert(IsValidState(V_attachState(vp)));
      
      switch(V_attachState(vp)) {
      case VOL_STATE_SALVAGING:
--- 1344,1350 ----
      /* wait for other blocking ops to finish */
      VWaitExclusiveState_r(vp);
  
!     assert(VIsValidState(V_attachState(vp)));
      
      switch(V_attachState(vp)) {
      case VOL_STATE_SALVAGING:
***************
*** 1537,1598 ****
  /***************************************************/
  
  #ifdef AFS_DEMAND_ATTACH_FS
! /* pre-attach a volume given its path 
   *
!  * a pre-attached volume will only have its partition
!  * and hashid fields initialized
   *
-  * at first call to VGetVolume, the volume will be
-  * fully attached
   */
  Volume *
! VPreAttachVolumeByName(Error * ec, char *partition, char *name, int mode)
  {
      Volume * vp;
      VOL_LOCK;
!     vp = VPreAttachVolumeByName_r(ec, partition, name, mode);
      VOL_UNLOCK;
      return vp;
  }
  
  Volume *
! VPreAttachVolumeByName_r(Error * ec, char *partition, char *name, int mode)
  {
!     register Volume *vp = NULL;
!     int fd, n;
!     struct afs_stat status;
      struct DiskPartition *partp;
!     char path[64];
!     int isbusy = 0;
!     VolId volumeId;
      *ec = 0;
  
      assert(programType == fileServer);
  
      if (!(partp = VGetPartition_r(partition, 0))) {
  	*ec = VNOVOL;
! 	Log("VPreAttachVolume:  Error getting partition (%s)\n", partition);
  	return NULL;
      }
  
-     volumeId = VolumeNumber(name);
- 
      vp = VLookupVolume_r(ec, volumeId, NULL);
      if (*ec) {
  	return NULL;
      }
  
!     return VPreAttachVolumeById_r(ec, partp, vp, volumeId);
  }
  
! /* pre-attach a volume given its partition and volume id
   *
!  * if vp == NULL, then a new vp is created
!  * if vp != NULL, then we assumed it is already on the hash chain
   */
  Volume * 
! VPreAttachVolumeById_r(Error * ec, struct DiskPartition * partp, 
! 		       Volume * vp, int vid)
  {
      Volume *nvp = NULL;
  
--- 1529,1649 ----
  /***************************************************/
  
  #ifdef AFS_DEMAND_ATTACH_FS
! /**
!  * pre-attach a volume given its path.
!  *
!  * @param[out] ec         outbound error code
!  * @param[in]  partition  partition path string
!  * @param[in]  name       volume id string
   *
!  * @return volume object pointer
!  *
!  * @note A pre-attached volume will only have its partition
!  *       and hashid fields initialized.  At first call to 
!  *       VGetVolume, the volume will be fully attached.
   *
   */
  Volume *
! VPreAttachVolumeByName(Error * ec, char *partition, char *name)
  {
      Volume * vp;
      VOL_LOCK;
!     vp = VPreAttachVolumeByName_r(ec, partition, name);
      VOL_UNLOCK;
      return vp;
  }
  
+ /**
+  * pre-attach a volume given its path.
+  *
+  * @param[out] ec         outbound error code
+  * @param[in]  partition  path to vice partition
+  * @param[in]  name       volume id string
+  *
+  * @return volume object pointer
+  *
+  * @pre VOL_LOCK held
+  *
+  * @internal volume package internal use only.
+  */
  Volume *
! VPreAttachVolumeByName_r(Error * ec, char *partition, char *name)
  {
!     return VPreAttachVolumeById_r(ec, 
! 				  partition,
! 				  VolumeNumber(name));
! }
! 
! /**
!  * pre-attach a volume given its path and numeric volume id.
!  *
!  * @param[out] ec          error code return
!  * @param[in]  partition   path to vice partition
!  * @param[in]  volumeId    numeric volume id
!  *
!  * @return volume object pointer
!  *
!  * @pre VOL_LOCK held
!  *
!  * @internal volume package internal use only.
!  */
! Volume *
! VPreAttachVolumeById_r(Error * ec, 
! 		       char * partition,
! 		       VolId volumeId)
! {
!     Volume *vp;
      struct DiskPartition *partp;
! 
      *ec = 0;
  
      assert(programType == fileServer);
  
      if (!(partp = VGetPartition_r(partition, 0))) {
  	*ec = VNOVOL;
! 	Log("VPreAttachVolumeById_r:  Error getting partition (%s)\n", partition);
  	return NULL;
      }
  
      vp = VLookupVolume_r(ec, volumeId, NULL);
      if (*ec) {
  	return NULL;
      }
  
!     return VPreAttachVolumeByVp_r(ec, partp, vp, volumeId);
  }
  
! /**
!  * preattach a volume.
!  *
!  * @param[out] ec     outbound error code
!  * @param[in]  partp  pointer to partition object
!  * @param[in]  vp     pointer to volume object
!  * @param[in]  vid    volume id
!  *
!  * @return volume object pointer
!  *
!  * @pre VOL_LOCK is held.
   *
!  * @warning Returned volume object pointer does not have to
!  *          equal the pointer passed in as argument vp.  There
!  *          are potential race conditions which can result in
!  *          the pointers having different values.  It is up to
!  *          the caller to make sure that references are handled
!  *          properly in this case.
!  *
!  * @note If there is already a volume object registered with
!  *       the same volume id, its pointer MUST be passed as 
!  *       argument vp.  Failure to do so will result in a silent
!  *       failure to preattach.
!  *
!  * @internal volume package internal use only.
   */
  Volume * 
! VPreAttachVolumeByVp_r(Error * ec, 
! 		       struct DiskPartition * partp, 
! 		       Volume * vp,
! 		       VolId vid)
  {
      Volume *nvp = NULL;
  
***************
*** 1601,1611 ****
      /* check to see if pre-attach already happened */
      if (vp && 
  	(V_attachState(vp) != VOL_STATE_UNATTACHED) && 
! 	!IsErrorState(V_attachState(vp))) {
  	goto done;
      } else if (vp) {
  	/* we're re-attaching a volume; clear out some old state */
  	memset(&vp->salvage, 0, sizeof(struct VolumeOnlineSalvage));
      } else {
  	/* if we need to allocate a new Volume struct,
  	 * go ahead and drop the vol glock, otherwise
--- 1652,1676 ----
      /* check to see if pre-attach already happened */
      if (vp && 
  	(V_attachState(vp) != VOL_STATE_UNATTACHED) && 
! 	(V_attachState(vp) != VOL_STATE_PREATTACHED) &&
! 	!VIsErrorState(V_attachState(vp))) {
! 	/*
! 	 * pre-attach is a no-op in all but the following cases:
! 	 *
! 	 *   - volume is unattached
! 	 *   - volume is in an error state
! 	 *   - volume is pre-attached
! 	 */
! 	Log("VPreattachVolumeByVp_r: volume %u not in quiescent state\n", vid);
  	goto done;
      } else if (vp) {
  	/* we're re-attaching a volume; clear out some old state */
  	memset(&vp->salvage, 0, sizeof(struct VolumeOnlineSalvage));
+ 
+ 	if (V_partition(vp) != partp) {
+ 	    /* XXX potential race */
+ 	    DeleteVolumeFromVByPList_r(vp);
+ 	}
      } else {
  	/* if we need to allocate a new Volume struct,
  	 * go ahead and drop the vol glock, otherwise
***************
*** 1617,1622 ****
--- 1682,1688 ----
  	vp = nvp = (Volume *) malloc(sizeof(Volume));
  	assert(vp != NULL);
  	memset(vp, 0, sizeof(Volume));
+ 	queue_Init(&vp->vnode_list);
  	assert(pthread_cond_init(&V_attachCV(vp), NULL) == 0);
      }
  
***************
*** 1654,1660 ****
      VChangeState_r(vp, VOL_STATE_PREATTACHED);
  
      if (LogLevel >= 5)
! 	Log("VPreAttachVolumeById_r:  volume %u pre-attached\n", vp->hashid);
  
    done:
      if (*ec)
--- 1720,1726 ----
      VChangeState_r(vp, VOL_STATE_PREATTACHED);
  
      if (LogLevel >= 5)
! 	Log("VPreAttachVolumeByVp_r:  volume %u pre-attached\n", vp->hashid);
  
    done:
      if (*ec)
***************
*** 1772,1778 ****
  	    (V_attachState(vp) == VOL_STATE_UNATTACHED) ||
  	    (V_attachState(vp) == VOL_STATE_ERROR)) {
  	    svp = vp;
! 	    vp = VPreAttachVolumeById_r(ec, partp, vp, volumeId);
  	    if (*ec) {
  		return NULL;
  	    }
--- 1838,1844 ----
  	    (V_attachState(vp) == VOL_STATE_UNATTACHED) ||
  	    (V_attachState(vp) == VOL_STATE_ERROR)) {
  	    svp = vp;
! 	    vp = VPreAttachVolumeByVp_r(ec, partp, vp, volumeId);
  	    if (*ec) {
  		return NULL;
  	    }
***************
*** 1879,1884 ****
--- 1945,1951 ----
        assert(vp != NULL);
        vp->device = partp->device;
        vp->partition = partp;
+       queue_Init(&vp->vnode_list);
  #ifdef AFS_DEMAND_ATTACH_FS
        assert(pthread_cond_init(&V_attachCV(vp), NULL) == 0);
  #endif /* AFS_DEMAND_ATTACH_FS */
***************
*** 1927,1932 ****
--- 1994,2009 ----
      } else 
  #endif
      if (programType == fileServer && vp) {
+ #ifdef AFS_DEMAND_ATTACH_FS
+ 	/* 
+ 	 * we can get here in cases where we don't "own"
+ 	 * the volume (e.g. volume owned by a utility).
+ 	 * short circuit around potential disk header races.
+ 	 */
+ 	if (V_attachState(vp) != VOL_STATE_ATTACHED) {
+ 	    goto done;
+ 	}
+ #endif
  	V_needsCallback(vp) = 0;
  #ifdef	notdef
  	if (VInit >= 2 && V_BreakVolumeCallbacks) {
***************
*** 1965,1979 ****
  	    Log("VOnline:  volume %u (%s) attached and online\n", V_id(vp),
  		V_name(vp));
      }
    done:
      if (programType == volumeUtility) {
  	VUnlockPartition_r(partition);
      }
      if (*ec) {
  #ifdef AFS_DEMAND_ATTACH_FS
! 	if (vp) {
! 	    V_attachState(vp) = VOL_STATE_ERROR;
! 	    assert(pthread_cond_broadcast(&V_attachCV(vp)) == 0);
  	}
  #endif /* AFS_DEMAND_ATTACH_FS */
  	return NULL;
--- 2042,2057 ----
  	    Log("VOnline:  volume %u (%s) attached and online\n", V_id(vp),
  		V_name(vp));
      }
+ 
    done:
      if (programType == volumeUtility) {
  	VUnlockPartition_r(partition);
      }
      if (*ec) {
  #ifdef AFS_DEMAND_ATTACH_FS
! 	/* attach failed; make sure we're in error state */
! 	if (vp && !VIsErrorState(V_attachState(vp))) {
! 	    VChangeState_r(vp, VOL_STATE_ERROR);
  	}
  #endif /* AFS_DEMAND_ATTACH_FS */
  	return NULL;
***************
*** 2038,2044 ****
      if (!vp || 
  	(V_attachState(vp) == VOL_STATE_UNATTACHED) ||
  	(V_attachState(vp) == VOL_STATE_ERROR)) {
! 	nvp = VPreAttachVolumeById_r(ec, partp, vp, volumeId);
  	if (*ec) {
  	    return NULL;
  	}
--- 2116,2122 ----
      if (!vp || 
  	(V_attachState(vp) == VOL_STATE_UNATTACHED) ||
  	(V_attachState(vp) == VOL_STATE_ERROR)) {
! 	nvp = VPreAttachVolumeByVp_r(ec, partp, vp, volumeId);
  	if (*ec) {
  	    return NULL;
  	}
***************
*** 2100,2106 ****
       * with vol_glock_mutex held */
      vp = attach2(ec, volumeId, path, &iheader, partp, vp, isbusy, mode);
  
!     if (*ec || vp == NULL) {
  	goto done;
      }
  
--- 2178,2192 ----
       * with vol_glock_mutex held */
      vp = attach2(ec, volumeId, path, &iheader, partp, vp, isbusy, mode);
  
!     /*
!      * the event that an error was encountered, or
!      * the volume was not brought to an attached state
!      * for any reason, skip to the end.  We cannot
!      * safely call VUpdateVolume unless we "own" it.
!      */
!     if (*ec || 
! 	(vp == NULL) ||
! 	(V_attachState(vp) != VOL_STATE_ATTACHED)) {
  	goto done;
      }
  
***************
*** 2140,2146 ****
  	reserve = 0;
      }
      if (*ec && (*ec != VOFFLINE) && (*ec != VSALVAGE)) {
! 	if (vp && !IsErrorState(V_attachState(vp))) {
  	    VChangeState_r(vp, VOL_STATE_ERROR);
  	}
  	return NULL;
--- 2226,2232 ----
  	reserve = 0;
      }
      if (*ec && (*ec != VOFFLINE) && (*ec != VSALVAGE)) {
! 	if (vp && !VIsErrorState(V_attachState(vp))) {
  	    VChangeState_r(vp, VOL_STATE_ERROR);
  	}
  	return NULL;
***************
*** 2175,2183 ****
  #endif
  
      VOL_LOCK;
- #ifdef AFS_DEMAND_ATTACH_FS
      IncUInt64(&VStats.attaches);
- #endif
      vp->cacheCheck = ++VolumeCacheCheck;
      /* just in case this ever rolls over */
      if (!vp->cacheCheck)
--- 2261,2267 ----
***************
*** 2250,2255 ****
--- 2334,2340 ----
  	}
  
  	V_attachFlags(vp) |= VOL_HDR_LOADED;
+ 	vp->stats.last_hdr_load = vp->stats.last_attach;
      }
  #endif /* AFS_DEMAND_ATTACH_FS */
  
***************
*** 2306,2314 ****
      if (*ec && ((*ec != VOFFLINE) || (V_attachState(vp) != VOL_STATE_UNATTACHED))) {
          VOL_LOCK;
  	if (programType == fileServer) {
! 	    VRequestSalvage_r(vp, SALVSYNC_ERROR, VOL_SALVAGE_INVALIDATE_HEADER);
  	    vp->nUsers = 0;
- 	    *ec = VSALVAGING;
  	} else {
  	    Log("VAttachVolume: Error attaching volume %s; volume needs salvage; error=%u\n", path, *ec);
  	    FreeVolume(vp);
--- 2391,2398 ----
      if (*ec && ((*ec != VOFFLINE) || (V_attachState(vp) != VOL_STATE_UNATTACHED))) {
          VOL_LOCK;
  	if (programType == fileServer) {
! 	    VRequestSalvage_r(ec, vp, SALVSYNC_ERROR, VOL_SALVAGE_INVALIDATE_HEADER);
  	    vp->nUsers = 0;
  	} else {
  	    Log("VAttachVolume: Error attaching volume %s; volume needs salvage; error=%u\n", path, *ec);
  	    FreeVolume(vp);
***************
*** 2335,2343 ****
          VOL_LOCK;
  #if defined(AFS_DEMAND_ATTACH_FS)
  	if (programType == fileServer) {
! 	    VRequestSalvage_r(vp, SALVSYNC_NEEDED, VOL_SALVAGE_INVALIDATE_HEADER);
  	    vp->nUsers = 0;
- 	    *ec = VSALVAGING;
  	} else {
  	    Log("VAttachVolume: volume salvage flag is ON for %s; volume needs salvage\n", path);
  	    FreeVolume(vp);
--- 2419,2426 ----
          VOL_LOCK;
  #if defined(AFS_DEMAND_ATTACH_FS)
  	if (programType == fileServer) {
! 	    VRequestSalvage_r(ec, vp, SALVSYNC_NEEDED, VOL_SALVAGE_INVALIDATE_HEADER);
  	    vp->nUsers = 0;
  	} else {
  	    Log("VAttachVolume: volume salvage flag is ON for %s; volume needs salvage\n", path);
  	    FreeVolume(vp);
***************
*** 2359,2367 ****
  		VUpdateVolume_r(ec, vp, 0);
  	    }
  #if defined(AFS_DEMAND_ATTACH_FS)
! 	    VRequestSalvage_r(vp, SALVSYNC_NEEDED, VOL_SALVAGE_INVALIDATE_HEADER);
  	    vp->nUsers = 0;
- 	    *ec = VSALVAGING;
  #else /* AFS_DEMAND_ATTACH_FS */
  	    Log("VAttachVolume: volume %s needs to be salvaged; not attached.\n", path);
  	    FreeVolume(vp);
--- 2442,2449 ----
  		VUpdateVolume_r(ec, vp, 0);
  	    }
  #if defined(AFS_DEMAND_ATTACH_FS)
! 	    VRequestSalvage_r(ec, vp, SALVSYNC_NEEDED, VOL_SALVAGE_INVALIDATE_HEADER);
  	    vp->nUsers = 0;
  #else /* AFS_DEMAND_ATTACH_FS */
  	    Log("VAttachVolume: volume %s needs to be salvaged; not attached.\n", path);
  	    FreeVolume(vp);
***************
*** 2374,2380 ****
  	if (V_destroyMe(vp) == DESTROY_ME) {
  #if defined(AFS_DEMAND_ATTACH_FS)
  	    /* schedule a salvage so the volume goes away on disk */
! 	    VRequestSalvage_r(vp, SALVSYNC_ERROR, VOL_SALVAGE_INVALIDATE_HEADER);
  	    VChangeState_r(vp, VOL_STATE_ERROR);
  	    vp->nUsers = 0;
  #endif /* AFS_DEMAND_ATTACH_FS */
--- 2456,2462 ----
  	if (V_destroyMe(vp) == DESTROY_ME) {
  #if defined(AFS_DEMAND_ATTACH_FS)
  	    /* schedule a salvage so the volume goes away on disk */
! 	    VRequestSalvage_r(ec, vp, SALVSYNC_ERROR, VOL_SALVAGE_INVALIDATE_HEADER);
  	    VChangeState_r(vp, VOL_STATE_ERROR);
  	    vp->nUsers = 0;
  #endif /* AFS_DEMAND_ATTACH_FS */
***************
*** 2394,2402 ****
  	    VGetBitmap_r(ec, vp, i);
  	    if (*ec) {
  #ifdef AFS_DEMAND_ATTACH_FS
! 		VRequestSalvage_r(vp, SALVSYNC_ERROR, VOL_SALVAGE_INVALIDATE_HEADER);
  		vp->nUsers = 0;
- 		*ec = VSALVAGING;
  #else /* AFS_DEMAND_ATTACH_FS */
  		FreeVolume(vp);
  #endif /* AFS_DEMAND_ATTACH_FS */
--- 2476,2483 ----
  	    VGetBitmap_r(ec, vp, i);
  	    if (*ec) {
  #ifdef AFS_DEMAND_ATTACH_FS
! 		VRequestSalvage_r(ec, vp, SALVSYNC_ERROR, VOL_SALVAGE_INVALIDATE_HEADER);
  		vp->nUsers = 0;
  #else /* AFS_DEMAND_ATTACH_FS */
  		FreeVolume(vp);
  #endif /* AFS_DEMAND_ATTACH_FS */
***************
*** 2421,2427 ****
  #ifdef AFS_DEMAND_ATTACH_FS
      AddVolumeToVByPList_r(vp);
      VLRU_Add_r(vp);
!     VChangeState_r(vp, VOL_STATE_ATTACHED);
  #endif
      return vp;
  }
--- 2502,2513 ----
  #ifdef AFS_DEMAND_ATTACH_FS
      AddVolumeToVByPList_r(vp);
      VLRU_Add_r(vp);
!     if ((programType != fileServer) ||
! 	V_inUse(vp)) {
! 	VChangeState_r(vp, VOL_STATE_ATTACHED);
!     } else {
! 	VChangeState_r(vp, VOL_STATE_UNATTACHED);
!     }
  #endif
      return vp;
  }
***************
*** 2516,2521 ****
--- 2602,2620 ----
  /* get and put volume routines                     */
  /***************************************************/
  
+ /**
+  * put back a heavyweight reference to a volume object.
+  *
+  * @param[in] vp  volume object pointer
+  *
+  * @pre VOL_LOCK held
+  *
+  * @post heavyweight volume reference put back.
+  *       depending on state, volume may have been taken offline,
+  *       detached, salvaged, freed, etc.
+  *
+  * @internal volume package internal use only
+  */
  void
  VPutVolume_r(register Volume * vp)
  {
***************
*** 2589,2598 ****
  #else
  #define VGET_CTR_INC(x)
  #endif
- 
  #ifdef AFS_DEMAND_ATTACH_FS
      Volume *avp, * rvp = hint;
  
      if (rvp) {
  	VCreateReservation_r(rvp);
      }
--- 2688,2698 ----
  #else
  #define VGET_CTR_INC(x)
  #endif
  #ifdef AFS_DEMAND_ATTACH_FS
      Volume *avp, * rvp = hint;
+ #endif
  
+ #ifdef AFS_DEMAND_ATTACH_FS
      if (rvp) {
  	VCreateReservation_r(rvp);
      }
***************
*** 2659,2664 ****
--- 2759,2775 ----
  	    break;
  	}
  
+ 	/*
+ 	 * short circuit with VOFFLINE in the following circumstances:
+ 	 *
+ 	 *   VOL_STATE_UNATTACHED
+ 	 */
+        if (V_attachState(vp) == VOL_STATE_UNATTACHED) {
+            *ec = VOFFLINE;
+            vp = NULL;
+            break;
+        }
+ 
  	/* allowable states:
  	 *   UNATTACHED
  	 *   PREATTACHED
***************
*** 2735,2742 ****
  		    vp->hashid);
  #ifdef AFS_DEMAND_ATTACH_FS
  	    if (programType == fileServer) {
! 		VRequestSalvage_r(vp, SALVSYNC_ERROR, VOL_SALVAGE_INVALIDATE_HEADER);
! 		*ec = VSALVAGING;
  	    } else {
  		FreeVolume(vp);
  		vp = NULL;
--- 2846,2852 ----
  		    vp->hashid);
  #ifdef AFS_DEMAND_ATTACH_FS
  	    if (programType == fileServer) {
! 		VRequestSalvage_r(ec, vp, SALVSYNC_ERROR, VOL_SALVAGE_INVALIDATE_HEADER);
  	    } else {
  		FreeVolume(vp);
  		vp = NULL;
***************
*** 2749,2754 ****
--- 2859,2867 ----
  	}
  
  #ifdef AFS_DEMAND_ATTACH_FS
+ 	/*
+ 	 * this test MUST happen after the volume header is loaded
+ 	 */
  	if (vp->pending_vol_op && !VVolOpLeaveOnline_r(vp, vp->pending_vol_op)) {
  	    if (client_ec) {
  		/* see CheckVnode() in afsfileprocs.c for an explanation
***************
*** 2765,2777 ****
  	    vp = NULL;
  	    break;
  	}
- 
- 	if (V_attachState(vp) == VOL_STATE_UNATTACHED) {
- 	    *ec = VOFFLINE;
- 	    ReleaseVolumeHeader(vp->header);
- 	    vp = NULL;
- 	    break;
- 	}
  #endif /* AFS_DEMAND_ATTACH_FS */
  	
  	VGET_CTR_INC(V7);
--- 2878,2883 ----
***************
*** 2792,2798 ****
  		    VWaitStateChange_r(vp);
  		}
  #elif defined(AFS_PTHREAD_ENV)
! 		assert(pthread_cond_wait(&vol_put_volume_cond, &vol_glock_mutex) == 0);
  #else /* AFS_PTHREAD_ENV */
  		LWP_WaitProcess(VPutVolume);
  #endif /* AFS_PTHREAD_ENV */
--- 2898,2904 ----
  		    VWaitStateChange_r(vp);
  		}
  #elif defined(AFS_PTHREAD_ENV)
! 		VOL_CV_WAIT(&vol_put_volume_cond);
  #else /* AFS_PTHREAD_ENV */
  		LWP_WaitProcess(VPutVolume);
  #endif /* AFS_PTHREAD_ENV */
***************
*** 2852,2857 ****
--- 2958,2965 ----
  void
  VTakeOffline_r(register Volume * vp)
  {
+     Error error;
+ 
      assert(vp->nUsers > 0);
      assert(programType == fileServer);
  
***************
*** 2861,2867 ****
      vp->goingOffline = 1;
      V_needsSalvaged(vp) = 1;
  
!     VRequestSalvage_r(vp, SALVSYNC_ERROR, 0);
      VCancelReservation_r(vp);
  }
  #else /* AFS_DEMAND_ATTACH_FS */
--- 2969,2975 ----
      vp->goingOffline = 1;
      V_needsSalvaged(vp) = 1;
  
!     VRequestSalvage_r(&error, vp, SALVSYNC_ERROR, 0);
      VCancelReservation_r(vp);
  }
  #else /* AFS_DEMAND_ATTACH_FS */
***************
*** 2884,2915 ****
      VOL_UNLOCK;
  }
  
! /* Force the volume offline, set the salvage flag.  No further references to
!  * the volume through the volume package will be honored. */
! /* for demand attach, caller MUST hold ref count on vp */
  void
  VForceOffline_r(Volume * vp, int flags)
  {
      Error error;
!     if (!V_inUse(vp))
  	return;
      strcpy(V_offlineMessage(vp),
  	   "Forced offline due to internal error: volume needs to be salvaged");
      Log("Volume %u forced offline:  it needs salvaging!\n", V_id(vp));
      V_inUse(vp) = 0;
      vp->goingOffline = 0;
      V_needsSalvaged(vp) = 1;
      if (!(flags & VOL_FORCEOFF_NOUPDATE)) {
! 	VUpdateVolume_r(&error, vp, VOL_UPDATE_WAIT | VOL_UPDATE_NOFORCEOFF);
      }
  #ifdef AFS_DEMAND_ATTACH_FS
! #ifdef SALVSYNC_BUILD_CLIENT
!     if (programType == fileServer) {
! 	VRequestSalvage_r(vp, SALVSYNC_ERROR, VOL_SALVAGE_INVALIDATE_HEADER);
!     }
! #endif
!     VChangeState_r(vp, VOL_STATE_ERROR);
  #endif /* AFS_DEMAND_ATTACH_FS */
  #ifdef AFS_PTHREAD_ENV
      assert(pthread_cond_broadcast(&vol_put_volume_cond) == 0);
  #else /* AFS_PTHREAD_ENV */
--- 2992,3053 ----
      VOL_UNLOCK;
  }
  
! /**
!  * force a volume offline.
!  *
!  * @param[in] vp     volume object pointer
!  * @param[in] flags  flags (see note below)
!  *
!  * @note the flag VOL_FORCEOFF_NOUPDATE is a recursion control flag
!  *       used when VUpdateVolume_r needs to call VForceOffline_r
!  *       (which in turn would normally call VUpdateVolume_r)
!  *
!  * @see VUpdateVolume_r
!  *
!  * @pre VOL_LOCK must be held.
!  *      for DAFS, caller must hold ref.
!  *
!  * @note for DAFS, it _is safe_ to call this function from an
!  *       exclusive state
!  *
!  * @post needsSalvaged flag is set.
!  *       for DAFS, salvage is requested.
!  *       no further references to the volume through the volume 
!  *       package will be honored.
!  *       all file descriptor and vnode caches are invalidated.
!  *
!  * @warning this is a heavy-handed interface.  it results in
!  *          a volume going offline regardless of the current 
!  *          reference count state.
!  *
!  * @internal  volume package internal use only
!  */
  void
  VForceOffline_r(Volume * vp, int flags)
  {
      Error error;
!     if (!V_inUse(vp)) {
! #ifdef AFS_DEMAND_ATTACH_FS
! 	VChangeState_r(vp, VOL_STATE_ERROR);
! #endif
  	return;
+     }
+ 
      strcpy(V_offlineMessage(vp),
  	   "Forced offline due to internal error: volume needs to be salvaged");
      Log("Volume %u forced offline:  it needs salvaging!\n", V_id(vp));
+ 
      V_inUse(vp) = 0;
      vp->goingOffline = 0;
      V_needsSalvaged(vp) = 1;
      if (!(flags & VOL_FORCEOFF_NOUPDATE)) {
! 	VUpdateVolume_r(&error, vp, VOL_UPDATE_NOFORCEOFF);
      }
+ 
  #ifdef AFS_DEMAND_ATTACH_FS
!     VRequestSalvage_r(&error, vp, SALVSYNC_ERROR, VOL_SALVAGE_INVALIDATE_HEADER);
  #endif /* AFS_DEMAND_ATTACH_FS */
+ 
  #ifdef AFS_PTHREAD_ENV
      assert(pthread_cond_broadcast(&vol_put_volume_cond) == 0);
  #else /* AFS_PTHREAD_ENV */
***************
*** 2919,2924 ****
--- 3057,3069 ----
      VReleaseVolumeHandles_r(vp);
  }
  
+ /**
+  * force a volume offline.
+  *
+  * @param[in] vp  volume object pointer
+  *
+  * @see VForceOffline_r
+  */
  void
  VForceOffline(Volume * vp)
  {
***************
*** 2985,2996 ****
  {
      VolumeId volume;
      struct DiskPartition *tpartp;
!     int notifyServer, useDone;
  
      *ec = 0;			/* always "succeeds" */
      if (programType == volumeUtility) {
  	notifyServer = vp->needsPutBack;
! 	useDone = (V_destroyMe(vp) == DESTROY_ME);
      }
      tpartp = vp->partition;
      volume = V_id(vp);
--- 3130,3146 ----
  {
      VolumeId volume;
      struct DiskPartition *tpartp;
!     int notifyServer, useDone = FSYNC_VOL_ON;
  
      *ec = 0;			/* always "succeeds" */
      if (programType == volumeUtility) {
  	notifyServer = vp->needsPutBack;
! 	if (V_destroyMe(vp) == DESTROY_ME)
! 	    useDone = FSYNC_VOL_DONE;
! #ifdef AFS_DEMAND_ATTACH_FS
! 	else if (!V_blessed(vp) || !V_inService(vp))
! 	    useDone = FSYNC_VOL_LEAVE_OFF;
! #endif
      }
      tpartp = vp->partition;
      volume = V_id(vp);
***************
*** 3018,3041 ****
  	 * would be two instances of the same volume, one of them bogus, 
  	 * which the file server would attempt to put on line 
  	 */
! 	if (useDone) {
! 	    /* don't put online */
! 	    FSYNC_VolOp(volume, tpartp->name, FSYNC_VOL_DONE, 0, NULL);
! 	} else {
! 	    /* fs can use it again */
! 	    FSYNC_VolOp(volume, tpartp->name, FSYNC_VOL_ON, 0, NULL);
! 
! 	    /* XXX this code path is only hit by volume utilities, thus
! 	     * V_BreakVolumeCallbacks will always be NULL.  if we really
! 	     * want to break callbacks in this path we need to use FSYNC_VolOp() */
  #ifdef notdef
! 	    /* Dettaching it so break all callbacks on it */
! 	    if (V_BreakVolumeCallbacks) {
! 		Log("volume %u detached; breaking all call backs\n", volume);
! 		(*V_BreakVolumeCallbacks) (volume);
! 	    }
! #endif
  	}
      }
  #endif /* FSSYNC_BUILD_CLIENT */
  }
--- 3168,3184 ----
  	 * would be two instances of the same volume, one of them bogus, 
  	 * which the file server would attempt to put on line 
  	 */
! 	FSYNC_VolOp(volume, tpartp->name, useDone, 0, NULL);
! 	/* XXX this code path is only hit by volume utilities, thus
! 	 * V_BreakVolumeCallbacks will always be NULL.  if we really
! 	 * want to break callbacks in this path we need to use FSYNC_VolOp() */
  #ifdef notdef
! 	/* Dettaching it so break all callbacks on it */
! 	if (V_BreakVolumeCallbacks) {
! 	    Log("volume %u detached; breaking all call backs\n", volume);
! 	    (*V_BreakVolumeCallbacks) (volume);
  	}
+ #endif
      }
  #endif /* FSSYNC_BUILD_CLIENT */
  }
***************
*** 3353,3360 ****
  	 *
  	 * VOL_STATE_GOING_OFFLINE
  	 * VOL_STATE_SHUTTING_DOWN
! 	 * IsErrorState(V_attachState(vp))
! 	 * IsExclusiveState(V_attachState(vp))
  	 */
  
  	VCreateReservation_r(vp);
--- 3496,3503 ----
  	 *
  	 * VOL_STATE_GOING_OFFLINE
  	 * VOL_STATE_SHUTTING_DOWN
! 	 * VIsErrorState(V_attachState(vp))
! 	 * VIsExclusiveState(V_attachState(vp))
  	 */
  
  	VCreateReservation_r(vp);
***************
*** 3384,3390 ****
  
  	/* if nothing changed state to error or salvaging,
  	 * drop state to unattached */
! 	if (!IsErrorState(V_attachState(vp))) {
  	    VChangeState_r(vp, VOL_STATE_UNATTACHED);
  	}
  	VCancelReservation_r(vp);
--- 3527,3533 ----
  
  	/* if nothing changed state to error or salvaging,
  	 * drop state to unattached */
! 	if (!VIsErrorState(V_attachState(vp))) {
  	    VChangeState_r(vp, VOL_STATE_UNATTACHED);
  	}
  	VCancelReservation_r(vp);
***************
*** 3438,3451 ****
   * from free()ing the Volume struct during an async i/o op */
  
  /* register with the async volume op ref counter */
! static void
! VCreateReservation_r(Volume * vp)
! {
!     vp->nWaiters++;
! }
  
! /* unregister with the async volume op ref counter */
! static void
  VCancelReservation_r(Volume * vp)
  {
      assert(--vp->nWaiters >= 0);
--- 3581,3614 ----
   * from free()ing the Volume struct during an async i/o op */
  
  /* register with the async volume op ref counter */
! /* VCreateReservation_r moved into inline code header because it 
!  * is now needed in vnode.c -- tkeiser 11/20/2007 
!  */
  
! /**
!  * decrement volume-package internal refcount.
!  *
!  * @param vp  volume object pointer
!  *
!  * @internal volume package internal use only
!  *
!  * @pre 
!  *    @arg VOL_LOCK is held
!  *    @arg lightweight refcount held
!  *
!  * @post volume waiters refcount is decremented; volume may
!  *       have been deallocated/shutdown/offlined/salvaged/
!  *       whatever during the process
!  *
!  * @warning once you have tossed your last reference (you can acquire
!  *          lightweight refs recursively) it is NOT SAFE to reference
!  *          a volume object pointer ever again
!  *
!  * @see VCreateReservation_r
!  *
!  * @note DEMAND_ATTACH_FS only
!  */
! void
  VCancelReservation_r(Volume * vp)
  {
      assert(--vp->nWaiters >= 0);
***************
*** 3483,3488 ****
--- 3646,3666 ----
  /***************************************************/
  
  #ifdef AFS_DEMAND_ATTACH_FS
+ /**
+  * register a volume operation on a given volume.
+  *
+  * @param[in] vp       volume object
+  * @param[in] vopinfo  volume operation info object
+  *
+  * @pre VOL_LOCK is held
+  *
+  * @post volume operation info object attached to volume object.
+  *       volume operation statistics updated.
+  *
+  * @note by "attached" we mean a copy of the passed in object is made
+  *
+  * @internal volume package internal use only
+  */
  int
  VRegisterVolOp_r(Volume * vp, FSSYNC_VolOp_info * vopinfo)
  {
***************
*** 3502,3509 ****
      return 0;
  }
  
  int
! VDeregisterVolOp_r(Volume * vp, FSSYNC_VolOp_info * vopinfo)
  {
      if (vp->pending_vol_op) {
  	free(vp->pending_vol_op);
--- 3680,3698 ----
      return 0;
  }
  
+ /**
+  * deregister the volume operation attached to this volume.
+  *
+  * @param[in] vp  volume object pointer
+  *
+  * @pre VOL_LOCK is held
+  *
+  * @post the volume operation info object is detached from the volume object
+  *
+  * @internal volume package internal use only
+  */
  int
! VDeregisterVolOp_r(Volume * vp)
  {
      if (vp->pending_vol_op) {
  	free(vp->pending_vol_op);
***************
*** 3513,3518 ****
--- 3702,3725 ----
  }
  #endif /* AFS_DEMAND_ATTACH_FS */
  
+ /**
+  * determine whether it is safe to leave a volume online during
+  * the volume operation described by the vopinfo object.
+  *
+  * @param[in] vp        volume object
+  * @param[in] vopinfo   volume operation info object
+  *
+  * @return whether it is safe to leave volume online
+  *    @retval 0  it is NOT SAFE to leave the volume online
+  *    @retval 1  it is safe to leave the volume online during the operation
+  *
+  * @pre
+  *    @arg VOL_LOCK is held
+  *    @arg disk header attached to vp (heavyweight ref on vp will guarantee
+  *         this condition is met)
+  *
+  * @internal volume package internal use only
+  */
  int
  VVolOpLeaveOnline_r(Volume * vp, FSSYNC_VolOp_info * vopinfo)
  {
***************
*** 3523,3528 ****
--- 3730,3749 ----
  	       vopinfo->com.reason == V_DUMP))));
  }
  
+ /**
+  * determine whether VBUSY should be set during this volume operation.
+  *
+  * @param[in] vp        volume object
+  * @param[in] vopinfo   volume operation info object
+  *
+  * @return whether VBUSY should be set
+  *   @retval 0  VBUSY does NOT need to be set
+  *   @retval 1  VBUSY SHOULD be set
+  *
+  * @pre VOL_LOCK is held
+  *
+  * @internal volume package internal use only
+  */
  int
  VVolOpSetVBusy_r(Volume * vp, FSSYNC_VolOp_info * vopinfo)
  {
***************
*** 3536,3554 ****
  /* online salvager routines                        */
  /***************************************************/
  #if defined(AFS_DEMAND_ATTACH_FS)
! #define SALVAGE_PRIO_UPDATE_INTERVAL 3      /* number of seconds between prio updates */
! #define SALVAGE_COUNT_MAX 16                /* number of online salvages we
! 					     * allow before moving the volume
! 					     * into a permanent error state
  					     *
! 					     * once this threshold is reached,
! 					     * the operator will have to manually
! 					     * issue a 'bos salvage' to bring
! 					     * the volume back online
  					     */
  
! /* check to see if we should salvage this volume
!  * returns 1 if salvage scheduled, 0 otherwise */
  static int
  VCheckSalvage(register Volume * vp)
  {
--- 3757,3793 ----
  /* online salvager routines                        */
  /***************************************************/
  #if defined(AFS_DEMAND_ATTACH_FS)
! #define SALVAGE_PRIO_UPDATE_INTERVAL 3      /**< number of seconds between prio updates */
! #define SALVAGE_COUNT_MAX 16                /**< number of online salvages we
! 					     *   allow before moving the volume
! 					     *   into a permanent error state
  					     *
! 					     *   once this threshold is reached,
! 					     *   the operator will have to manually
! 					     *   issue a 'bos salvage' to bring
! 					     *   the volume back online
  					     */
  
! /**
!  * check whether a salvage needs to be performed on this volume.
!  *
!  * @param[in] vp   pointer to volume object
!  *
!  * @return status code
!  *    @retval 0 no salvage scheduled
!  *    @retval 1 a salvage has been scheduled with the salvageserver
!  *
!  * @pre VOL_LOCK is held
!  *
!  * @post if salvage request flag is set and nUsers and nWaiters are zero,
!  *       then a salvage will be requested
!  *
!  * @note this is one of the event handlers called by VCancelReservation_r
!  *
!  * @see VCancelReservation_r
!  *
!  * @internal volume package internal use only.
!  */
  static int
  VCheckSalvage(register Volume * vp)
  {
***************
*** 3564,3600 ****
      return ret;
  }
  
! /*
!  * request that a salvage be performed once
!  * ref counts reach zero
   */
  int
! VRequestSalvage_r(Volume * vp, int reason, int flags)
  {
! #ifdef SALVSYNC_BUILD_CLIENT
!     if (programType != fileServer)
  	return 1;
  
      if (!vp->salvage.requested) {
  	vp->salvage.requested = 1;
  	vp->salvage.reason = reason;
  	vp->stats.last_salvage = FT_ApproxTime();
  	if (flags & VOL_SALVAGE_INVALIDATE_HEADER) {
  	    ReleaseVolumeHeader(vp->header);
  	}
  	if (vp->stats.salvages < SALVAGE_COUNT_MAX) {
  	    VChangeState_r(vp, VOL_STATE_SALVAGING);
  	} else {
  	    Log("VRequestSalvage: volume %u online salvaged too many times; forced offline.\n", vp->hashid);
  	    VChangeState_r(vp, VOL_STATE_ERROR);
  	}
      }
! #endif /* SALVSYNC_BUILD_CLIENT */
!     return 0;
  }
  
! /*
!  * update salvage priority
   */
  static int
  VUpdateSalvagePriority_r(Volume * vp)
--- 3803,3899 ----
      return ret;
  }
  
! /**
!  * request volume salvage.
!  *
!  * @param[out] ec      computed client error code
!  * @param[in]  vp      volume object pointer
!  * @param[in]  reason  reason code (passed to salvageserver via SALVSYNC)
!  * @param[in]  flags   see flags note below
!  *
!  * @note flags:
!  *       VOL_SALVAGE_INVALIDATE_HEADER causes volume header cache entry 
!  *                                     to be invalidated.
!  *
!  * @pre VOL_LOCK is held.
!  *
!  * @post volume state is changed.
!  *       for fileserver, salvage will be requested once refcount reaches zero.
!  *
!  * @return operation status code
!  *   @retval 0  volume salvage will occur
!  *   @retval 1  volume salvage could not be scheduled
!  *
!  * @note DAFS fileserver only
!  *
!  * @note this call does not synchronously schedule a volume salvage.  rather,
!  *       it sets volume state so that when volume refcounts reach zero, a
!  *       volume salvage will occur.  by "refcounts", we mean both nUsers and 
!  *       nWaiters must be zero.
!  *
!  * @internal volume package internal use only.
   */
  int
! VRequestSalvage_r(Error * ec, Volume * vp, int reason, int flags)
  {
!     int code = 0;
!     /*
!      * for DAFS volume utilities, transition to error state
!      * (at some point in the future, we should consider
!      *  making volser talk to salsrv)
!      */
!     if (programType != fileServer) {
! 	VChangeState_r(vp, VOL_STATE_ERROR);
! 	*ec = VSALVAGE;
  	return 1;
+     }
  
      if (!vp->salvage.requested) {
  	vp->salvage.requested = 1;
  	vp->salvage.reason = reason;
  	vp->stats.last_salvage = FT_ApproxTime();
  	if (flags & VOL_SALVAGE_INVALIDATE_HEADER) {
+ 	    /* XXX this should likely be changed to FreeVolumeHeader() */
  	    ReleaseVolumeHeader(vp->header);
  	}
  	if (vp->stats.salvages < SALVAGE_COUNT_MAX) {
  	    VChangeState_r(vp, VOL_STATE_SALVAGING);
+ 	    *ec = VSALVAGING;
  	} else {
  	    Log("VRequestSalvage: volume %u online salvaged too many times; forced offline.\n", vp->hashid);
  	    VChangeState_r(vp, VOL_STATE_ERROR);
+ 	    *ec = VSALVAGE;
+ 	    code = 1;
  	}
      }
!     return code;
  }
  
! /**
!  * update salvageserver scheduling priority for a volume.
!  *
!  * @param[in] vp  pointer to volume object
!  *
!  * @return operation status
!  *   @retval 0  success
!  *   @retval 1  request denied, or SALVSYNC communications failure
!  *
!  * @pre VOL_LOCK is held.
!  *
!  * @post in-core salvage priority counter is incremented.  if at least
!  *       SALVAGE_PRIO_UPDATE_INTERVAL seconds have elapsed since the
!  *       last SALVSYNC_RAISEPRIO request, we contact the salvageserver
!  *       to update its priority queue.  if no salvage is scheduled,
!  *       this function is a no-op.
!  *
!  * @note DAFS fileserver only
!  *
!  * @note this should be called whenever a VGetVolume fails due to a 
!  *       pending salvage request
!  *
!  * @todo should set exclusive state and drop glock around salvsync call
!  *
!  * @internal volume package internal use only.
   */
  static int
  VUpdateSalvagePriority_r(Volume * vp)
***************
*** 3627,3634 ****
  }
  
  
! /*
!  * schedule a salvage with the salvage server
   */
  static int
  VScheduleSalvage_r(Volume * vp)
--- 3926,3949 ----
  }
  
  
! /**
!  * schedule a salvage with the salvage server.
!  *
!  * @param[in] vp  pointer to volume object
!  *
!  * @return operation status
!  *    @retval 0 salvage scheduled successfully
!  *    @retval 1 salvage not scheduled, or SALVSYNC com error
!  *
!  * @pre 
!  *    @arg VOL_LOCK is held.
!  *    @arg nUsers and nWaiters should be zero.
!  *
!  * @post salvageserver is sent a salvage request
!  *
!  * @note DAFS fileserver only
!  *
!  * @internal volume package internal use only.
   */
  static int
  VScheduleSalvage_r(Volume * vp)
***************
*** 3651,3656 ****
--- 3966,3974 ----
  	 *
  	 * set the volume to an exclusive state and drop the lock
  	 * around the SALVSYNC call
+ 	 *
+ 	 * note that we do NOT acquire a reservation here -- doing so
+ 	 * could result in unbounded recursion
  	 */
  	strlcpy(partName, VPartitionPath(vp->partition), sizeof(partName));
  	state_save = VChangeState_r(vp, VOL_STATE_SALVSYNC_REQ);
***************
*** 3693,3700 ****
      return ret;
  }
  
! /*
!  * cancel a scheduled salvage operation
   */
  static int
  VCancelSalvage_r(Volume * vp, int reason)
--- 4011,4033 ----
      return ret;
  }
  
! /**
!  * ask salvageserver to cancel a scheduled salvage operation.
!  *
!  * @param[in] vp      pointer to volume object
!  * @param[in] reason  SALVSYNC protocol reason code
!  *
!  * @return operation status
!  *    @retval 0 success
!  *    @retval 1 request failed
!  *
!  * @pre VOL_LOCK is held.
!  *
!  * @post salvageserver is sent a request to cancel the volume salvage
!  *
!  * @todo should set exclusive state and drop glock around salvsync call
!  *
!  * @internal volume package internal use only.
   */
  static int
  VCancelSalvage_r(Volume * vp, int reason)
***************
*** 3719,3729 ****
      return ret;
  }
  
! /* This must be called by any volume utility which needs to run while the
!    file server is also running.  This is separated from VInitVolumePackage so
!    that a utility can fork--and each of the children can independently
!    initialize communication with the file server */
  #ifdef SALVSYNC_BUILD_CLIENT
  int
  VConnectSALV(void)
  {
--- 4052,4072 ----
      return ret;
  }
  
! 
  #ifdef SALVSYNC_BUILD_CLIENT
+ /**
+  * connect to the salvageserver SYNC service.
+  *
+  * @return operation status
+  *    @retval 0 failure
+  *    @retval 1 success
+  *
+  * @post connection to salvageserver SYNC service established
+  *
+  * @see VConnectSALV_r
+  * @see VDisconnectSALV
+  * @see VReconnectSALV
+  */
  int
  VConnectSALV(void)
  {
***************
*** 3734,3745 ****
--- 4077,4120 ----
      return retVal;
  }
  
+ /**
+  * connect to the salvageserver SYNC service.
+  *
+  * @return operation status
+  *    @retval 0 failure
+  *    @retval 1 success
+  *
+  * @pre VOL_LOCK is held.
+  *
+  * @post connection to salvageserver SYNC service established
+  *
+  * @see VConnectSALV
+  * @see VDisconnectSALV_r
+  * @see VReconnectSALV_r
+  * @see SALVSYNC_clientInit
+  *
+  * @internal volume package internal use only.
+  */
  int
  VConnectSALV_r(void)
  {
      return SALVSYNC_clientInit();
  }
  
+ /**
+  * disconnect from the salvageserver SYNC service.
+  *
+  * @return operation status
+  *    @retval 0 success
+  *
+  * @pre client should have a live connection to the salvageserver
+  *
+  * @post connection to salvageserver SYNC service destroyed
+  *
+  * @see VDisconnectSALV_r
+  * @see VConnectSALV
+  * @see VReconnectSALV
+  */
  int
  VDisconnectSALV(void)
  {
***************
*** 3750,3761 ****
--- 4125,4170 ----
      return retVal;
  }
  
+ /**
+  * disconnect from the salvageserver SYNC service.
+  *
+  * @return operation status
+  *    @retval 0 success
+  *
+  * @pre 
+  *    @arg VOL_LOCK is held.
+  *    @arg client should have a live connection to the salvageserver.
+  *
+  * @post connection to salvageserver SYNC service destroyed
+  *
+  * @see VDisconnectSALV
+  * @see VConnectSALV_r
+  * @see VReconnectSALV_r
+  * @see SALVSYNC_clientFinis
+  *
+  * @internal volume package internal use only.
+  */
  int
  VDisconnectSALV_r(void)
  { 
      return SALVSYNC_clientFinis();
  }
  
+ /**
+  * disconnect and then re-connect to the salvageserver SYNC service.
+  *
+  * @return operation status
+  *    @retval 0 failure
+  *    @retval 1 success
+  *
+  * @pre client should have a live connection to the salvageserver
+  *
+  * @post old connection is dropped, and a new one is established
+  *
+  * @see VConnectSALV
+  * @see VDisconnectSALV
+  * @see VReconnectSALV_r
+  */
  int
  VReconnectSALV(void)
  {
***************
*** 3766,3771 ****
--- 4175,4200 ----
      return retVal;
  }
  
+ /**
+  * disconnect and then re-connect to the salvageserver SYNC service.
+  *
+  * @return operation status
+  *    @retval 0 failure
+  *    @retval 1 success
+  *
+  * @pre 
+  *    @arg VOL_LOCK is held.
+  *    @arg client should have a live connection to the salvageserver.
+  *
+  * @post old connection is dropped, and a new one is established
+  *
+  * @see VConnectSALV_r
+  * @see VDisconnectSALV
+  * @see VReconnectSALV
+  * @see SALVSYNC_clientReconnect
+  *
+  * @internal volume package internal use only.
+  */
  int
  VReconnectSALV_r(void)
  {
***************
*** 3784,3789 ****
--- 4213,4235 ----
     that a utility can fork--and each of the children can independently
     initialize communication with the file server */
  #ifdef FSSYNC_BUILD_CLIENT
+ /**
+  * connect to the fileserver SYNC service.
+  *
+  * @return operation status
+  *    @retval 0 failure
+  *    @retval 1 success
+  *
+  * @pre 
+  *    @arg VInit must equal 2.
+  *    @arg Program Type must not be fileserver or salvager.
+  *
+  * @post connection to fileserver SYNC service established
+  *
+  * @see VConnectFS_r
+  * @see VDisconnectFS
+  * @see VChildProcReconnectFS
+  */
  int
  VConnectFS(void)
  {
***************
*** 3794,3799 ****
--- 4240,4265 ----
      return retVal;
  }
  
+ /**
+  * connect to the fileserver SYNC service.
+  *
+  * @return operation status
+  *    @retval 0 failure
+  *    @retval 1 success
+  *
+  * @pre 
+  *    @arg VInit must equal 2.
+  *    @arg Program Type must not be fileserver or salvager.
+  *    @arg VOL_LOCK is held.
+  *
+  * @post connection to fileserver SYNC service established
+  *
+  * @see VConnectFS
+  * @see VDisconnectFS_r
+  * @see VChildProcReconnectFS_r
+  *
+  * @internal volume package internal use only.
+  */
  int
  VConnectFS_r(void)
  {
***************
*** 3807,3812 ****
--- 4273,4294 ----
      return rc;
  }
  
+ /**
+  * disconnect from the fileserver SYNC service.
+  *
+  * @pre 
+  *    @arg client should have a live connection to the fileserver.
+  *    @arg VOL_LOCK is held.
+  *    @arg Program Type must not be fileserver or salvager.
+  *
+  * @post connection to fileserver SYNC service destroyed
+  *
+  * @see VDisconnectFS
+  * @see VConnectFS_r
+  * @see VChildProcReconnectFS_r
+  *
+  * @internal volume package internal use only.
+  */
  void
  VDisconnectFS_r(void)
  {
***************
*** 3816,3835 ****
      VInit = 2;
  }
  
! void
! VDisconnectFS(void)
! {
      VOL_LOCK;
      VDisconnectFS_r();
      VOL_UNLOCK;
  }
  
  int
  VChildProcReconnectFS_r(void)
  {
      return FSYNC_clientChildProcReconnect();
  }
  
  int
  VChildProcReconnectFS(void)
  {
--- 4298,4366 ----
      VInit = 2;
  }
  
! /**
!  * disconnect from the fileserver SYNC service.
!  *
!  * @pre
!  *    @arg client should have a live connection to the fileserver.
!  *    @arg Program Type must not be fileserver or salvager.
!  *
!  * @post connection to fileserver SYNC service destroyed
!  *
!  * @see VDisconnectFS_r
!  * @see VConnectFS
!  * @see VChildProcReconnectFS
!  */
! void
! VDisconnectFS(void)
! {
      VOL_LOCK;
      VDisconnectFS_r();
      VOL_UNLOCK;
  }
  
+ /**
+  * connect to the fileserver SYNC service from a child process following a fork.
+  *
+  * @return operation status
+  *    @retval 0 failure
+  *    @retval 1 success
+  *
+  * @pre
+  *    @arg VOL_LOCK is held.
+  *    @arg current FSYNC handle is shared with a parent process
+  *
+  * @post current FSYNC handle is discarded and a new connection to the
+  *       fileserver SYNC service is established
+  *
+  * @see VChildProcReconnectFS
+  * @see VConnectFS_r
+  * @see VDisconnectFS_r
+  *
+  * @internal volume package internal use only.
+  */
  int
  VChildProcReconnectFS_r(void)
  {
      return FSYNC_clientChildProcReconnect();
  }
  
+ /**
+  * connect to the fileserver SYNC service from a child process following a fork.
+  *
+  * @return operation status
+  *    @retval 0 failure
+  *    @retval 1 success
+  *
+  * @pre current FSYNC handle is shared with a parent process
+  *
+  * @post current FSYNC handle is discarded and a new connection to the
+  *       fileserver SYNC service is established
+  *
+  * @see VChildProcReconnectFS_r
+  * @see VConnectFS
+  * @see VDisconnectFS
+  */
  int
  VChildProcReconnectFS(void)
  {
***************
*** 3898,3906 ****
  		    VOL_UNLOCK;
  		    sleep(2);
  		    VOL_LOCK;
! #else /* AFS_PTHREAD_ENV */
  		    IOMGR_Sleep(2);
! #endif /* AFS_DEMAND_ATTACH_FS */
  		}
  	    }
  	}
--- 4429,4437 ----
  		    VOL_UNLOCK;
  		    sleep(2);
  		    VOL_LOCK;
! #else /* !AFS_PTHREAD_ENV */
  		    IOMGR_Sleep(2);
! #endif /* !AFS_PTHREAD_ENV */
  		}
  	    }
  	}
***************
*** 3914,3921 ****
  		VGetBitmap_r(ec, vp, i);
  		if (*ec) {
  #ifdef AFS_DEMAND_ATTACH_FS
! 		    VRequestSalvage_r(vp, SALVSYNC_ERROR, VOL_SALVAGE_INVALIDATE_HEADER);
! 		    *ec = VSALVAGING;
  #else /* AFS_DEMAND_ATTACH_FS */
  		    DeleteVolumeFromHashTable(vp);
  		    vp->shuttingDown = 1;	/* Let who has it free it. */
--- 4445,4451 ----
  		VGetBitmap_r(ec, vp, i);
  		if (*ec) {
  #ifdef AFS_DEMAND_ATTACH_FS
! 		    VRequestSalvage_r(ec, vp, SALVSYNC_ERROR, VOL_SALVAGE_INVALIDATE_HEADER);
  #else /* AFS_DEMAND_ATTACH_FS */
  		    DeleteVolumeFromHashTable(vp);
  		    vp->shuttingDown = 1;	/* Let who has it free it. */
***************
*** 4129,4227 ****
  
  
  /***************************************************/
- /* demand attach fs state machine routines         */
- /***************************************************/
- 
- #ifdef AFS_DEMAND_ATTACH_FS
- /* wait for the volume to change states */
- static void
- VWaitStateChange_r(Volume * vp)
- {
-     VolState state_save = V_attachState(vp);
- 
-     assert(vp->nWaiters || vp->nUsers);
-     do {
- 	assert(pthread_cond_wait(&V_attachCV(vp), &vol_glock_mutex) == 0);
-     } while (V_attachState(vp) == state_save);
-     assert(V_attachState(vp) != VOL_STATE_FREED);
- }
- 
- /* wait for blocking ops to end */
- static void
- VWaitExclusiveState_r(Volume * vp)
- {
-     assert(vp->nWaiters || vp->nUsers);
-     while (IsExclusiveState(V_attachState(vp))) {
- 	assert(pthread_cond_wait(&V_attachCV(vp), &vol_glock_mutex) == 0);
-     }
-     assert(V_attachState(vp) != VOL_STATE_FREED);
- }
- 
- /* change state, and notify other threads,
-  * return previous state to caller */
- VolState
- VChangeState_r(Volume * vp, VolState new_state)
- {
-     VolState old_state = V_attachState(vp);
- 
-     /* XXX profiling need to make sure these counters
-      * don't kill performance... */
-     VStats.state_levels[old_state]--;
-     VStats.state_levels[new_state]++;
- 
-     V_attachState(vp) = new_state;
-     assert(pthread_cond_broadcast(&V_attachCV(vp)) == 0);
-     return old_state;
- }
- 
- /* tells caller whether or not the current state requires
-  * exclusive access without holding glock */
- static int
- IsExclusiveState(VolState state)
- {
-     switch (state) {
-     case VOL_STATE_UPDATING:
-     case VOL_STATE_ATTACHING:
-     case VOL_STATE_GET_BITMAP:
-     case VOL_STATE_HDR_LOADING:
-     case VOL_STATE_HDR_ATTACHING:
-     case VOL_STATE_OFFLINING:
-     case VOL_STATE_DETACHING:
- 	return 1;
-     }
-     return 0;
- }
- 
- /* tell caller whether V_attachState is an error condition */
- static int
- IsErrorState(VolState state)
- {
-     switch (state) {
-     case VOL_STATE_ERROR:
-     case VOL_STATE_SALVAGING:
- 	return 1;
-     }
-     return 0;
- }
- 
- /* tell caller whether V_attachState is valid */
- static int
- IsValidState(VolState state)
- {
-     if ((state >= 0) && 
- 	(state < VOL_STATE_COUNT) &&
- 	(state != VOL_STATE_FREED)) {
- 	return 1;
-     }
-     return 0;
- }
- #endif /* AFS_DEMAND_ATTACH_FS */
- 
- 
- /***************************************************/
  /* Volume Path and Volume Number utility routines  */
  /***************************************************/
  
  static void
  GetVolumePath(Error * ec, VolId volumeId, char **partitionp, char **namep)
  {
--- 4659,4687 ----
  
  
  /***************************************************/
  /* Volume Path and Volume Number utility routines  */
  /***************************************************/
  
+ /**
+  * find the first occurrence of a volume header file and return the path.
+  *
+  * @param[out] ec          outbound error code
+  * @param[in]  volumeId    volume id to find
+  * @param[out] partitionp  pointer to disk partition path string
+  * @param[out] namep       pointer to volume header file name string
+  *
+  * @post path to first occurrence of volume header is returned in partitionp
+  *       and namep, or ec is set accordingly.
+  *
+  * @warning this function is NOT re-entrant -- partitionp and namep point to
+  *          static data segments
+  *
+  * @note if a volume utility inadvertently leaves behind a stale volume header
+  *       on a vice partition, it is possible for callers to get the wrong one,
+  *       depending on the order of the disk partition linked list.
+  *
+  * @internal volume package internal use only.
+  */
  static void
  GetVolumePath(Error * ec, VolId volumeId, char **partitionp, char **namep)
  {
***************
*** 4252,4257 ****
--- 4712,4729 ----
      }
  }
  
+ /**
+  * extract a volume number from a volume header filename string.
+  *
+  * @param[in] name  volume header filename string
+  *
+  * @return volume number
+  *
+  * @note the string must be of the form VFORMAT.  the only permissible
+  *       deviation is a leading '/' character.
+  *
+  * @see VFORMAT
+  */
  int
  VolumeNumber(char *name)
  {
***************
*** 4260,4265 ****
--- 4732,4756 ----
      return atoi(name + 1);
  }
  
+ /**
+  * compute the volume header filename.
+  *
+  * @param[in] volumeId
+  *
+  * @return volume header filename
+  *
+  * @post volume header filename string is constructed
+  *
+  * @warning this function is NOT re-entrant -- the returned string is
+  *          stored in a static char array.  see VolumeExternalName_r
+  *          for a re-entrant equivalent.
+  *
+  * @see VolumeExternalName_r
+  *
+  * @deprecated due to the above re-entrancy warning, this interface should
+  *             be considered deprecated.  Please use VolumeExternalName_r
+  *             in its stead.
+  */
  char *
  VolumeExternalName(VolumeId volumeId)
  {
***************
*** 4268,4273 ****
--- 4759,4780 ----
      return name;
  }
  
+ /**
+  * compute the volume header filename.
+  *
+  * @param[in]     volumeId
+  * @param[inout]  name       array in which to store filename
+  * @param[in]     len        length of name array
+  *
+  * @return result code from afs_snprintf
+  *
+  * @see VolumeExternalName
+  * @see afs_snprintf
+  *
+  * @note re-entrant equivalent of VolumeExternalName
+  *
+  * @internal volume package internal use only.
+  */
  static int
  VolumeExternalName_r(VolumeId volumeId, char * name, size_t len)
  {
***************
*** 4541,4590 ****
   * candidates for soft detachment. this queue is
   * unsorted
   */
! #define VLRU_GENERATIONS  3   /* number of generations in VLRU */
! #define VLRU_QUEUES       5   /* total number of VLRU queues */
  struct VLRU_q {
      volatile struct rx_queue q;
      volatile int len;
      volatile int busy;
      pthread_cond_t cv;
  };
  struct VLRU {
!     struct VLRU_q q[VLRU_QUEUES];
  
      /* VLRU config */
!     afs_uint32 promotion_interval[VLRU_GENERATIONS-1];  /* interval between promotions */
!     afs_uint32 scan_interval[VLRU_GENERATIONS+1];       /* interval between scans for candidates */
  
!     /* state */
!     int next_idx;
!     afs_uint32 last_promotion[VLRU_GENERATIONS-1];      /* timestamp of last promotion scan */
!     afs_uint32 last_scan[VLRU_GENERATIONS+1];           /* timestamp of last detach scan */
  
!     int scanner_state;                                  /* state of scanner thread */
!     pthread_cond_t cv;                                  /* state transition CV */
  };
  
  static struct VLRU volume_LRU;
  
! /* valid scanner states */
! #define VLRU_SCANNER_STATE_OFFLINE        0
! #define VLRU_SCANNER_STATE_ONLINE         1
! #define VLRU_SCANNER_STATE_SHUTTING_DOWN  2
! #define VLRU_SCANNER_STATE_PAUSING        3
! #define VLRU_SCANNER_STATE_PAUSED         4
  
  /* vlru disk data header stuff */
! #define VLRU_DISK_MAGIC      0x7a8b9cad
! #define VLRU_DISK_VERSION    1
  
! /* vlru default expiration time (for eventual fs state serialization of vlru data) */
  #define VLRU_DUMP_EXPIRATION_TIME   (60*60*24*7)  /* expire vlru data after 1 week */
  
  
  static afs_uint32 VLRU_offline_thresh = VLRU_DEFAULT_OFFLINE_THRESH;
  static afs_uint32 VLRU_offline_interval = VLRU_DEFAULT_OFFLINE_INTERVAL;
  static afs_uint32 VLRU_offline_max = VLRU_DEFAULT_OFFLINE_MAX;
  static afs_uint32 VLRU_enabled = 1;
  
  /* queue synchronization routines */
--- 5048,5126 ----
   * candidates for soft detachment. this queue is
   * unsorted
   */
! #define VLRU_GENERATIONS  3   /**< number of generations in VLRU */
! #define VLRU_QUEUES       5   /**< total number of VLRU queues */
! 
! /**
!  * definition of a VLRU queue.
!  */
  struct VLRU_q {
      volatile struct rx_queue q;
      volatile int len;
      volatile int busy;
      pthread_cond_t cv;
  };
+ 
+ /**
+  * main VLRU data structure.
+  */
  struct VLRU {
!     struct VLRU_q q[VLRU_QUEUES];   /**< VLRU queues */
  
      /* VLRU config */
!     /** time interval (in seconds) between promotion passes for
!      *  each young generation queue. */
!     afs_uint32 promotion_interval[VLRU_GENERATIONS-1];
  
!     /** time interval (in seconds) between soft detach candidate
!      *  scans for each generation queue.
!      *
!      *  scan_interval[VLRU_QUEUE_CANDIDATE] defines how frequently
!      *  we perform a soft detach pass. */
!     afs_uint32 scan_interval[VLRU_GENERATIONS+1];
! 
!     /* scheduler state */
!     int next_idx;                                       /**< next queue to receive attention */
!     afs_uint32 last_promotion[VLRU_GENERATIONS-1];      /**< timestamp of last promotion scan */
!     afs_uint32 last_scan[VLRU_GENERATIONS+1];           /**< timestamp of last detach scan */
  
!     int scanner_state;                                  /**< state of scanner thread */
!     pthread_cond_t cv;                                  /**< state transition CV */
  };
  
+ /** global VLRU state */
  static struct VLRU volume_LRU;
  
! /**
!  * defined states for VLRU scanner thread.
!  */
! typedef enum {
!     VLRU_SCANNER_STATE_OFFLINE        = 0,    /**< vlru scanner thread is offline */
!     VLRU_SCANNER_STATE_ONLINE         = 1,    /**< vlru scanner thread is online */
!     VLRU_SCANNER_STATE_SHUTTING_DOWN  = 2,    /**< vlru scanner thread is shutting down */
!     VLRU_SCANNER_STATE_PAUSING        = 3,    /**< vlru scanner thread is getting ready to pause */
!     VLRU_SCANNER_STATE_PAUSED         = 4     /**< vlru scanner thread is paused */
! } vlru_thread_state_t;
  
  /* vlru disk data header stuff */
! #define VLRU_DISK_MAGIC      0x7a8b9cad        /**< vlru disk entry magic number */
! #define VLRU_DISK_VERSION    1                 /**< vlru disk entry version number */
  
! /** vlru default expiration time (for eventual fs state serialization of vlru data) */
  #define VLRU_DUMP_EXPIRATION_TIME   (60*60*24*7)  /* expire vlru data after 1 week */
  
  
+ /** minimum volume inactivity (in seconds) before a volume becomes eligible for
+  *  soft detachment. */
  static afs_uint32 VLRU_offline_thresh = VLRU_DEFAULT_OFFLINE_THRESH;
+ 
+ /** time interval (in seconds) between VLRU scanner thread soft detach passes. */
  static afs_uint32 VLRU_offline_interval = VLRU_DEFAULT_OFFLINE_INTERVAL;
+ 
+ /** maximum number of volumes to soft detach in a VLRU soft detach pass. */
  static afs_uint32 VLRU_offline_max = VLRU_DEFAULT_OFFLINE_MAX;
+ 
+ /** VLRU control flag.  non-zero value implies VLRU subsystem is activated. */
  static afs_uint32 VLRU_enabled = 1;
  
  /* queue synchronization routines */
***************
*** 4592,4606 ****
  static void VLRU_EndExclusive_r(struct VLRU_q * q);
  static void VLRU_Wait_r(struct VLRU_q * q);
  
! /* set the VLRU parameters 
   *
!  * valid options are:
!  *  VLRU_SET_THRESH -- set the period of inactivity after
!  *    which volumes are eligible for being detached
!  *  VLRU_SET_INTERVAL -- the time interval between calls
!  *    to the volume LRU "garbage collector"
!  *  VLRU_SET_MAX -- the max number of volumes to deallocate
!  *    in one GC pass
   */
  void
  VLRU_SetOptions(int option, afs_uint32 val)
--- 5128,5155 ----
  static void VLRU_EndExclusive_r(struct VLRU_q * q);
  static void VLRU_Wait_r(struct VLRU_q * q);
  
! /**
!  * set VLRU subsystem tunable parameters.
!  *
!  * @param[in] option  tunable option to modify
!  * @param[in] val     new value for tunable parameter
   *
!  * @pre @c VInitVolumePackage has not yet been called.
!  *
!  * @post tunable parameter is modified
!  *
!  * @note DAFS only
!  *
!  * @note valid option parameters are:
!  *    @arg @c VLRU_SET_THRESH 
!  *         set the period of inactivity after which
!  *         volumes are eligible for soft detachment
!  *    @arg @c VLRU_SET_INTERVAL 
!  *         set the time interval between calls
!  *         to the volume LRU "garbage collector"
!  *    @arg @c VLRU_SET_MAX 
!  *         set the max number of volumes to deallocate
!  *         in one GC pass
   */
  void
  VLRU_SetOptions(int option, afs_uint32 val)
***************
*** 4617,4623 ****
      VLRU_ComputeConstants();
  }
  
! /* compute the VLRU internal timing parameters based upon the user's inputs */
  static void
  VLRU_ComputeConstants(void)
  {
--- 5166,5183 ----
      VLRU_ComputeConstants();
  }
  
! /**
!  * compute VLRU internal timing parameters.
!  *
!  * @post VLRU scanner thread internal timing parameters are computed
!  *
!  * @note computes internal timing parameters based upon user-modifiable 
!  *       tunable parameters.
!  *
!  * @note DAFS only
!  *
!  * @internal volume package internal use only.
!  */
  static void
  VLRU_ComputeConstants(void)
  {
***************
*** 4639,4645 ****
      }
  }
  
! /* initialize VLRU */
  static void
  VInitVLRU(void)
  {
--- 5199,5215 ----
      }
  }
  
! /**
!  * initialize VLRU subsystem.
!  *
!  * @pre this function has not yet been called
!  *
!  * @post VLRU subsystem is initialized and VLRU scanner thread is starting
!  *
!  * @note DAFS only
!  *
!  * @internal volume package internal use only.
!  */
  static void
  VInitVLRU(void)
  {
***************
*** 4682,4688 ****
      }
  }
  
! /* initialize LRU support for a volume */
  static void
  VLRU_Init_Node_r(volatile Volume * vp)
  {
--- 5252,5273 ----
      }
  }
  
! /**
!  * initialize the VLRU-related fields of a newly allocated volume object.
!  *
!  * @param[in] vp  pointer to volume object
!  *
!  * @pre
!  *    @arg @c VOL_LOCK is held.
!  *    @arg volume object is not on a VLRU queue.
!  *
!  * @post VLRU fields are initialized to indicate that volume object is not
!  *       currently registered with the VLRU subsystem
!  *
!  * @note DAFS only
!  *
!  * @internal volume package interal use only.
!  */
  static void
  VLRU_Init_Node_r(volatile Volume * vp)
  {
***************
*** 4693,4706 ****
      vp->vlru.idx = VLRU_QUEUE_INVALID;
  }
  
! /* add volume to VLRU 
!  * now supports adding to queues other
!  * than new for vlru state restore
!  * caller MUST hold a ref count on vp */
  static void
  VLRU_Add_r(volatile Volume * vp)
  {
      int idx;
  
      if (!VLRU_enabled)
  	return;
--- 5278,5315 ----
      vp->vlru.idx = VLRU_QUEUE_INVALID;
  }
  
! /**
!  * add a volume object to a VLRU queue.
!  *
!  * @param[in] vp  pointer to volume object
!  *
!  * @pre
!  *    @arg @c VOL_LOCK is held.
!  *    @arg caller MUST hold a lightweight ref on @p vp.
!  *    @arg caller MUST NOT hold exclusive ownership of the VLRU queue.
!  *
!  * @post the volume object is added to the appropriate VLRU queue
!  *
!  * @note if @c vp->vlru.idx contains the index of a valid VLRU queue,
!  *       then the volume is added to that queue.  Otherwise, the value
!  *       @c VLRU_QUEUE_NEW is stored into @c vp->vlru.idx and the
!  *       volume is added to the NEW generation queue.
!  *
!  * @note @c VOL_LOCK may be dropped internally
!  *
!  * @note Volume state is temporarily set to @c VOL_STATE_VLRU_ADD
!  *       during the add operation, and is restored to the previous
!  *       state prior to return.
!  *
!  * @note DAFS only
!  *
!  * @internal volume package internal use only.
!  */
  static void
  VLRU_Add_r(volatile Volume * vp)
  {
      int idx;
+     VolState state_save;
  
      if (!VLRU_enabled)
  	return;
***************
*** 4708,4731 ****
      if (queue_IsOnQueue(&vp->vlru))
  	return;
  
!     VLRU_Wait_r(&volume_LRU.q[VLRU_QUEUE_NEW]);
  
      /* repeat check since VLRU_Wait_r may have dropped
       * the glock */
      if (queue_IsNotOnQueue(&vp->vlru)) {
! 	idx = vp->vlru.idx;
! 	if ((idx < 0) || (idx >= VLRU_QUEUE_INVALID)) {
! 	    idx = vp->vlru.idx = VLRU_QUEUE_NEW;
! 	}
  	queue_Prepend(&volume_LRU.q[idx], &vp->vlru);
  	volume_LRU.q[idx].len++;
  	V_attachFlags(vp) |= VOL_ON_VLRU;
  	vp->stats.last_promote = FT_ApproxTime();
      }
  }
  
! /* delete volume from VLRU 
!  * caller MUST hold a ref count on vp */
  static void
  VLRU_Delete_r(volatile Volume * vp)
  {
--- 5317,5365 ----
      if (queue_IsOnQueue(&vp->vlru))
  	return;
  
!     state_save = VChangeState_r(vp, VOL_STATE_VLRU_ADD);
! 
!     idx = vp->vlru.idx;
!     if ((idx < 0) || (idx >= VLRU_QUEUE_INVALID)) {
! 	idx = VLRU_QUEUE_NEW;
!     }
! 
!     VLRU_Wait_r(&volume_LRU.q[idx]);
  
      /* repeat check since VLRU_Wait_r may have dropped
       * the glock */
      if (queue_IsNotOnQueue(&vp->vlru)) {
! 	vp->vlru.idx = idx;
  	queue_Prepend(&volume_LRU.q[idx], &vp->vlru);
  	volume_LRU.q[idx].len++;
  	V_attachFlags(vp) |= VOL_ON_VLRU;
  	vp->stats.last_promote = FT_ApproxTime();
      }
+ 
+     VChangeState_r(vp, state_save);
  }
  
! /**
!  * delete a volume object from a VLRU queue.
!  *
!  * @param[in] vp  pointer to volume object
!  *
!  * @pre
!  *    @arg @c VOL_LOCK is held.
!  *    @arg caller MUST hold a lightweight ref on @p vp.
!  *    @arg caller MUST NOT hold exclusive ownership of the VLRU queue.
!  *
!  * @post volume object is removed from the VLRU queue
!  *
!  * @note @c VOL_LOCK may be dropped internally
!  *
!  * @note DAFS only
!  *
!  * @todo We should probably set volume state to something exlcusive 
!  *       (as @c VLRU_Add_r does) prior to dropping @c VOL_LOCK.
!  *
!  * @internal volume package internal use only.
!  */
  static void
  VLRU_Delete_r(volatile Volume * vp)
  {
***************
*** 4753,4760 ****
      V_attachFlags(vp) &= ~(VOL_ON_VLRU);
  }
  
! /* signal that volume was just accessed.
!  * caller MUST hold a ref count on vp */
  static void
  VLRU_UpdateAccess_r(volatile Volume * vp)
  {
--- 5387,5412 ----
      V_attachFlags(vp) &= ~(VOL_ON_VLRU);
  }
  
! /**
!  * tell the VLRU subsystem that a volume was just accessed.
!  *
!  * @param[in] vp  pointer to volume object
!  *
!  * @pre
!  *    @arg @c VOL_LOCK is held
!  *    @arg caller MUST hold a lightweight ref on @p vp
!  *    @arg caller MUST NOT hold exclusive ownership of any VLRU queue
!  *
!  * @post volume VLRU access statistics are updated.  If the volume was on
!  *       the VLRU soft detach candidate queue, it is moved to the NEW
!  *       generation queue.
!  *
!  * @note @c VOL_LOCK may be dropped internally
!  *
!  * @note DAFS only
!  *
!  * @internal volume package internal use only.
!  */
  static void
  VLRU_UpdateAccess_r(volatile Volume * vp)
  {
***************
*** 4804,4810 ****
      }
  }
  
! /* switch a volume between two VLRU queues */
  static void
  VLRU_SwitchQueues(volatile Volume * vp, int new_idx, int append)
  {
--- 5456,5489 ----
      }
  }
  
! /**
!  * switch a volume between two VLRU queues.
!  *
!  * @param[in] vp       pointer to volume object
!  * @param[in] new_idx  index of VLRU queue onto which the volume will be moved
!  * @param[in] append   controls whether the volume will be appended or 
!  *                     prepended to the queue.  A nonzero value means it will
!  *                     be appended; zero means it will be prepended.
!  *
!  * @pre The new (and old, if applicable) queue(s) must either be owned 
!  *      exclusively by the calling thread for asynchronous manipulation,
!  *      or the queue(s) must be quiescent and VOL_LOCK must be held.
!  *      Please see VLRU_BeginExclusive_r, VLRU_EndExclusive_r and VLRU_Wait_r
!  *      for further details of the queue asynchronous processing mechanism.
!  *
!  * @post If the volume object was already on a VLRU queue, it is
!  *       removed from the queue.  Depending on the value of the append
!  *       parameter, the volume object is either appended or prepended
!  *       to the VLRU queue referenced by the new_idx parameter.
!  *
!  * @note DAFS only
!  *
!  * @see VLRU_BeginExclusive_r
!  * @see VLRU_EndExclusive_r
!  * @see VLRU_Wait_r
!  *
!  * @internal volume package internal use only.
!  */
  static void
  VLRU_SwitchQueues(volatile Volume * vp, int new_idx, int append)
  {
***************
*** 4825,4831 ****
      vp->vlru.idx = new_idx;
  }
  
! /* VLRU GC thread */
  static void *
  VLRU_ScannerThread(void * args)
  {
--- 5504,5523 ----
      vp->vlru.idx = new_idx;
  }
  
! /**
!  * VLRU background thread.
!  *
!  * The VLRU Scanner Thread is responsible for periodically scanning through
!  * each VLRU queue looking for volumes which should be moved to another
!  * queue, or soft detached.
!  *
!  * @param[in] args  unused thread arguments parameter
!  *
!  * @return unused thread return value
!  *    @retval NULL always
!  *
!  * @internal volume package internal use only.
!  */
  static void *
  VLRU_ScannerThread(void * args)
  {
***************
*** 4864,4870 ****
  	    volume_LRU.scanner_state = VLRU_SCANNER_STATE_PAUSED;
  	    assert(pthread_cond_broadcast(&volume_LRU.cv) == 0);
  	    do {
! 		assert(pthread_cond_wait(&volume_LRU.cv, &vol_glock_mutex) == 0);
  	    } while (volume_LRU.scanner_state == VLRU_SCANNER_STATE_PAUSED);
  	}
  
--- 5556,5562 ----
  	    volume_LRU.scanner_state = VLRU_SCANNER_STATE_PAUSED;
  	    assert(pthread_cond_broadcast(&volume_LRU.cv) == 0);
  	    do {
! 		VOL_CV_WAIT(&volume_LRU.cv);
  	    } while (volume_LRU.scanner_state == VLRU_SCANNER_STATE_PAUSED);
  	}
  
***************
*** 4944,4950 ****
      return NULL;
  }
  
! /* run the promotions */
  static void
  VLRU_Promote_r(int idx)
  {
--- 5636,5666 ----
      return NULL;
  }
  
! /**
!  * promote volumes from one VLRU generation to the next.
!  *
!  * This routine scans a VLRU generation looking for volumes which are
!  * eligible to be promoted to the next generation.  All volumes which
!  * meet the eligibility requirement are promoted.
!  *
!  * Promotion eligibility is based upon meeting both of the following
!  * requirements:
!  *
!  *    @arg The volume has been accessed since the last promotion:
!  *         @c (vp->stats.last_get >= vp->stats.last_promote)
!  *    @arg The last promotion occurred at least 
!  *         @c volume_LRU.promotion_interval[idx] seconds ago
!  *
!  * As a performance optimization, promotions are "globbed".  In other
!  * words, we promote arbitrarily large contiguous sublists of elements
!  * as one operation.  
!  *
!  * @param[in] idx  VLRU queue index to scan
!  *
!  * @note DAFS only
!  *
!  * @internal VLRU internal use only.
!  */
  static void
  VLRU_Promote_r(int idx)
  {
***************
*** 5246,5252 ****
  VLRU_Wait_r(struct VLRU_q * q)
  {
      while(q->busy) {
! 	assert(pthread_cond_wait(&q->cv, &vol_glock_mutex) == 0);
      }
  }
  
--- 5962,5968 ----
  VLRU_Wait_r(struct VLRU_q * q)
  {
      while(q->busy) {
! 	VOL_CV_WAIT(&q->cv);
      }
  }
  
***************
*** 5269,5275 ****
      if (vp->nUsers || vp->nWaiters)
  	return 0;
  
!     if (IsExclusiveState(V_attachState(vp))) {
  	return 0;
      }
  
--- 5985,5991 ----
      if (vp->nUsers || vp->nWaiters)
  	return 0;
  
!     if (VIsExclusiveState(V_attachState(vp))) {
  	return 0;
      }
  
***************
*** 5343,5351 ****
  /* Volume Header Cache routines                    */
  /***************************************************/
  
  struct volume_hdr_LRU_t volume_hdr_LRU;
  
! /* Allocate a bunch of headers; string them together */
  static void
  VInitVolumeHeaderCache(afs_uint32 howMany)
  {
--- 6059,6084 ----
  /* Volume Header Cache routines                    */
  /***************************************************/
  
+ /** 
+  * volume header cache.
+  */
  struct volume_hdr_LRU_t volume_hdr_LRU;
  
! /**
!  * initialize the volume header cache.
!  *
!  * @param[in] howMany  number of header cache entries to preallocate
!  *
!  * @pre VOL_LOCK held.  Function has never been called before.
!  *
!  * @post howMany cache entries are allocated, initialized, and added 
!  *       to the LRU list.  Header cache statistics are initialized.
!  *
!  * @note only applicable to fileServer program type.  Should only be
!  *       called once during volume package initialization.
!  *
!  * @internal volume package internal use only.
!  */
  static void
  VInitVolumeHeaderCache(afs_uint32 howMany)
  {
***************
*** 5353,5372 ****
      if (programType != fileServer)
  	return;
      queue_Init(&volume_hdr_LRU);
- #ifdef AFS_DEMAND_ATTACH_FS
      volume_hdr_LRU.stats.free = 0;
      volume_hdr_LRU.stats.used = howMany;
      volume_hdr_LRU.stats.attached = 0;
- #endif
      hp = (struct volHeader *)(calloc(howMany, sizeof(struct volHeader)));
      while (howMany--)
  	ReleaseVolumeHeader(hp++);
  }
  
! #ifdef AFS_DEMAND_ATTACH_FS
! /* Get a volume header from the LRU list; update the old one if necessary */
! /* Returns 1 if there was already a header, which is removed from the LRU list */
! /* caller MUST has a ref count on vp */
  static int
  GetVolumeHeader(register Volume * vp)
  {
--- 6086,6121 ----
      if (programType != fileServer)
  	return;
      queue_Init(&volume_hdr_LRU);
      volume_hdr_LRU.stats.free = 0;
      volume_hdr_LRU.stats.used = howMany;
      volume_hdr_LRU.stats.attached = 0;
      hp = (struct volHeader *)(calloc(howMany, sizeof(struct volHeader)));
      while (howMany--)
  	ReleaseVolumeHeader(hp++);
  }
  
! /**
!  * get a volume header and attach it to the volume object.
!  *
!  * @param[in] vp  pointer to volume object
!  *
!  * @return cache entry status
!  *    @retval 0  volume header was newly attached; cache data is invalid
!  *    @retval 1  volume header was previously attached; cache data is valid
!  *
!  * @pre VOL_LOCK held.  For DAFS, lightweight ref must be held on volume object.
!  *
!  * @post volume header attached to volume object.  if necessary, header cache 
!  *       entry on LRU is synchronized to disk.  Header is removed from LRU list.
!  *
!  * @note VOL_LOCK may be dropped
!  *
!  * @warning this interface does not load header data from disk.  it merely
!  *          attaches a header object to the volume object, and may sync the old
!  *          header cache data out to disk in the process.
!  *
!  * @internal volume package internal use only.
!  */
  static int
  GetVolumeHeader(register Volume * vp)
  {
***************
*** 5375,5380 ****
--- 6124,6132 ----
      int old;
      static int everLogged = 0;
  
+ #ifdef AFS_DEMAND_ATTACH_FS
+     VolState vp_save, back_save;
+ 
      /* XXX debug 9/19/05 we've apparently got
       * a ref counting bug somewhere that's
       * breaking the nUsers == 0 => header on LRU
***************
*** 5383,5388 ****
--- 6135,6141 ----
  	Log("nUsers == 0, but header not on LRU\n");
  	return 1;
      }
+ #endif
  
      old = (vp->header != NULL);	/* old == volume already has a header */
  
***************
*** 5393,5401 ****
--- 6146,6157 ----
  	    assert(hd != NULL);
  	    vp->header = hd;
  	    hd->back = vp;
+ #ifdef AFS_DEMAND_ATTACH_FS
  	    V_attachFlags(vp) |= VOL_HDR_ATTACHED;
+ #endif
  	}
      } else {
+ 	/* for the fileserver, we keep a volume header cache */
  	if (old) {
  	    /* the header we previously dropped in the lru is
  	     * still available. pull it off the lru and return */
***************
*** 5420,5545 ****
  		volume_hdr_LRU.stats.free++;
  	    }
  	    if (hd->back) {
- 		VolState vp_save, back_save;
  		/* this header used to belong to someone else. 
  		 * we'll need to check if the header needs to
  		 * be sync'd out to disk */
  
  		/* if hd->back were in an exclusive state, then
  		 * its volHeader would not be on the LRU... */
! 		assert(!IsExclusiveState(V_attachState(hd->back)));
  
  		if (hd->diskstuff.inUse) {
  		    /* volume was in use, so we'll need to sync
  		     * its header to disk */
  		    back_save = VChangeState_r(hd->back, VOL_STATE_UPDATING);
  		    vp_save = VChangeState_r(vp, VOL_STATE_HDR_ATTACHING);
  		    VCreateReservation_r(hd->back);
  		    VOL_UNLOCK;
  
  		    WriteVolumeHeader_r(&error, hd->back);
  		    /* Ignore errors; catch them later */
  
  		    VOL_LOCK;
  		}
  
- 		V_attachFlags(hd->back) &= ~(VOL_HDR_ATTACHED | VOL_HDR_LOADED | VOL_HDR_IN_LRU);
  		hd->back->header = NULL;
  
  		if (hd->diskstuff.inUse) {
  		    VChangeState_r(hd->back, back_save);
  		    VCancelReservation_r(hd->back);
  		    VChangeState_r(vp, vp_save);
  		}
  	    } else {
  		volume_hdr_LRU.stats.attached++;
  	    }
  	    hd->back = vp;
  	    vp->header = hd;
  	    V_attachFlags(vp) |= VOL_HDR_ATTACHED;
  	}
  	volume_hdr_LRU.stats.free--;
  	volume_hdr_LRU.stats.used++;
      }
      IncUInt64(&VStats.hdr_gets);
      IncUInt64(&vp->stats.hdr_gets);
      vp->stats.last_hdr_get = FT_ApproxTime();
      return old;
  }
- #else /* AFS_DEMAND_ATTACH_FS */
- /* Get a volume header from the LRU list; update the old one if necessary */
- /* Returns 1 if there was already a header, which is removed from the LRU list */
- static int
- GetVolumeHeader(register Volume * vp)
- {
-     Error error;
-     register struct volHeader *hd;
-     int old;
-     static int everLogged = 0;
- 
-     old = (vp->header != NULL);	/* old == volume already has a header */
- 
-     if (programType != fileServer) {
- 	/* for volume utilities, we allocate volHeaders as needed */
- 	if (!vp->header) {
- 	    hd = (struct volHeader *)calloc(1, sizeof(*vp->header));
- 	    assert(hd != NULL);
- 	    vp->header = hd;
- 	    hd->back = vp;
- 	}
-     } else {
- 	/* for the fileserver, we keep a volume header cache */
- 	if (old) {
- 	    /* the header we previously dropped in the lru is
- 	     * still available. pull it off the lru and return */
- 	    hd = vp->header;
- 	    queue_Remove(hd);
- 	    assert(hd->back == vp);
- 	} else {
- 	    /* we need to grab a new element off the LRU */
- 	    if (queue_IsNotEmpty(&volume_hdr_LRU)) {
- 		/* grab an element */
- 		hd = queue_First(&volume_hdr_LRU, volHeader);
- 		queue_Remove(hd);
- 	    } else {
- 		/* LRU is empty, so allocate a new volHeader 
- 		 * this is probably indicative of a leak, so let the user know */
- 		hd = (struct volHeader *)calloc(1, sizeof(struct volHeader));
- 		assert(hd != NULL);
- 		if (!everLogged) {
- 		    Log("****Allocated more volume headers, probably leak****\n");
- 		    everLogged = 1;
- 		}
- 	    }
- 	    if (hd->back) {
- 		/* this header used to belong to someone else. 
- 		 * we'll need to check if the header needs to
- 		 * be sync'd out to disk */
- 
- 		if (hd->diskstuff.inUse) {
- 		    WriteVolumeHeader_r(&error, hd->back);
- 		    /* Ignore errors; catch them later */
- 		}
- 		hd->back->header = NULL;
- 	    }
- 	    hd->back = vp;
- 	    vp->header = hd;
- 	}
-     }
-     return old;
- }
- #endif /* AFS_DEMAND_ATTACH_FS */
  
  
! /* make sure a volume header is attached to
!  * vp, and has the correct data loaded from
!  * disk. */
! #ifdef AFS_DEMAND_ATTACH_FS
! /* caller MUST hold a ref count on vp */
  static void
  LoadVolumeHeader(Error * ec, Volume * vp)
  {
      VolState state_save;
      *ec = 0;
  
      if (vp->nUsers == 0 && !GetVolumeHeader(vp)) {
--- 6176,6260 ----
  		volume_hdr_LRU.stats.free++;
  	    }
  	    if (hd->back) {
  		/* this header used to belong to someone else. 
  		 * we'll need to check if the header needs to
  		 * be sync'd out to disk */
  
+ #ifdef AFS_DEMAND_ATTACH_FS
  		/* if hd->back were in an exclusive state, then
  		 * its volHeader would not be on the LRU... */
! 		assert(!VIsExclusiveState(V_attachState(hd->back)));
! #endif
  
  		if (hd->diskstuff.inUse) {
  		    /* volume was in use, so we'll need to sync
  		     * its header to disk */
+ 
+ #ifdef AFS_DEMAND_ATTACH_FS
  		    back_save = VChangeState_r(hd->back, VOL_STATE_UPDATING);
  		    vp_save = VChangeState_r(vp, VOL_STATE_HDR_ATTACHING);
  		    VCreateReservation_r(hd->back);
  		    VOL_UNLOCK;
+ #endif
  
  		    WriteVolumeHeader_r(&error, hd->back);
  		    /* Ignore errors; catch them later */
  
+ #ifdef AFS_DEMAND_ATTACH_FS
  		    VOL_LOCK;
+ #endif
  		}
  
  		hd->back->header = NULL;
+ #ifdef AFS_DEMAND_ATTACH_FS
+ 		V_attachFlags(hd->back) &= ~(VOL_HDR_ATTACHED | VOL_HDR_LOADED | VOL_HDR_IN_LRU);
  
  		if (hd->diskstuff.inUse) {
  		    VChangeState_r(hd->back, back_save);
  		    VCancelReservation_r(hd->back);
  		    VChangeState_r(vp, vp_save);
  		}
+ #endif
  	    } else {
  		volume_hdr_LRU.stats.attached++;
  	    }
  	    hd->back = vp;
  	    vp->header = hd;
+ #ifdef AFS_DEMAND_ATTACH_FS
  	    V_attachFlags(vp) |= VOL_HDR_ATTACHED;
+ #endif
  	}
  	volume_hdr_LRU.stats.free--;
  	volume_hdr_LRU.stats.used++;
      }
      IncUInt64(&VStats.hdr_gets);
+ #ifdef AFS_DEMAND_ATTACH_FS
      IncUInt64(&vp->stats.hdr_gets);
      vp->stats.last_hdr_get = FT_ApproxTime();
+ #endif
      return old;
  }
  
  
! /**
!  * make sure volume header is attached and contains valid cache data.
!  *
!  * @param[out] ec  outbound error code
!  * @param[in]  vp  pointer to volume object
!  *
!  * @pre VOL_LOCK held.  For DAFS, lightweight ref held on vp.
!  *
!  * @post header cache entry attached, and loaded with valid data, or
!  *       *ec is nonzero, and the header is released back into the LRU.
!  *
!  * @internal volume package internal use only.
!  */
  static void
  LoadVolumeHeader(Error * ec, Volume * vp)
  {
+ #ifdef AFS_DEMAND_ATTACH_FS
      VolState state_save;
+     afs_uint32 now;
      *ec = 0;
  
      if (vp->nUsers == 0 && !GetVolumeHeader(vp)) {
***************
*** 5551,5571 ****
  		   sizeof(V_disk(vp)), VOLUMEINFOMAGIC,
  		   VOLUMEINFOVERSION);
  	IncUInt64(&vp->stats.hdr_loads);
  
  	VOL_LOCK;
! 	if (!*ec)
  	    V_attachFlags(vp) |= VOL_HDR_LOADED;
  	VChangeState_r(vp, state_save);
      }
-     if (*ec) {
- 	/* maintain (nUsers==0) => header in LRU invariant */
- 	ReleaseVolumeHeader(vp->header);
-     }
- }
  #else /* AFS_DEMAND_ATTACH_FS */
- static void
- LoadVolumeHeader(Error * ec, Volume * vp)
- {
      *ec = 0;
      if (vp->nUsers == 0 && !GetVolumeHeader(vp)) {
  	IncUInt64(&VStats.hdr_loads);
--- 6266,6281 ----
  		   sizeof(V_disk(vp)), VOLUMEINFOMAGIC,
  		   VOLUMEINFOVERSION);
  	IncUInt64(&vp->stats.hdr_loads);
+ 	now = FT_ApproxTime();
  
  	VOL_LOCK;
! 	if (!*ec) {
  	    V_attachFlags(vp) |= VOL_HDR_LOADED;
+ 	    vp->stats.last_hdr_load = now;
+ 	}
  	VChangeState_r(vp, state_save);
      }
  #else /* AFS_DEMAND_ATTACH_FS */
      *ec = 0;
      if (vp->nUsers == 0 && !GetVolumeHeader(vp)) {
  	IncUInt64(&VStats.hdr_loads);
***************
*** 5574,5587 ****
  		   sizeof(V_disk(vp)), VOLUMEINFOMAGIC,
  		   VOLUMEINFOVERSION);
      }
      if (*ec) {
  	/* maintain (nUsers==0) => header in LRU invariant */
  	ReleaseVolumeHeader(vp->header);
      }
  }
- #endif /* AFS_DEMAND_ATTACH_FS */
  
! /* Put it at the top of the LRU chain */
  static void
  ReleaseVolumeHeader(register struct volHeader *hd)
  {
--- 6284,6312 ----
  		   sizeof(V_disk(vp)), VOLUMEINFOMAGIC,
  		   VOLUMEINFOVERSION);
      }
+ #endif /* AFS_DEMAND_ATTACH_FS */
      if (*ec) {
  	/* maintain (nUsers==0) => header in LRU invariant */
  	ReleaseVolumeHeader(vp->header);
      }
  }
  
! /**
!  * release a header cache entry back into the LRU list.
!  *
!  * @param[in] hd  pointer to volume header cache object
!  *
!  * @pre VOL_LOCK held.
!  *
!  * @post header cache object appended onto end of LRU list.
!  *
!  * @note only applicable to fileServer program type.
!  *
!  * @note used to place a header cache entry back into the
!  *       LRU pool without invalidating it as a cache entry.
!  *
!  * @internal volume package internal use only.
!  */
  static void
  ReleaseVolumeHeader(register struct volHeader *hd)
  {
***************
*** 5594,5608 ****
      if (hd->back) {
  	V_attachFlags(hd->back) |= VOL_HDR_IN_LRU;
      }
      volume_hdr_LRU.stats.free++;
      volume_hdr_LRU.stats.used--;
- #endif
  }
  
! /* for fileserver, return header to LRU, and
!  * invalidate it as a cache entry.
   *
!  * for volume utilities, free the heap space */
  static void
  FreeVolumeHeader(register Volume * vp)
  {
--- 6319,6347 ----
      if (hd->back) {
  	V_attachFlags(hd->back) |= VOL_HDR_IN_LRU;
      }
+ #endif
      volume_hdr_LRU.stats.free++;
      volume_hdr_LRU.stats.used--;
  }
  
! /**
!  * free/invalidate a volume header cache entry.
   *
!  * @param[in] vp  pointer to volume object
!  *
!  * @pre VOL_LOCK is held.
!  *
!  * @post For fileserver, header cache entry is returned to LRU, and it is
!  *       invalidated as a cache entry.  For volume utilities, the header
!  *       cache entry is freed.
!  *
!  * @note For fileserver, this should be utilized instead of ReleaseVolumeHeader
!  *       whenever it is necessary to invalidate the header cache entry.
!  *
!  * @see ReleaseVolumeHeader
!  *
!  * @internal volume package internal use only.
!  */
  static void
  FreeVolumeHeader(register Volume * vp)
  {
***************
*** 5617,5624 ****
      }
  #ifdef AFS_DEMAND_ATTACH_FS
      V_attachFlags(vp) &= ~(VOL_HDR_ATTACHED | VOL_HDR_IN_LRU | VOL_HDR_LOADED);
-     volume_hdr_LRU.stats.attached--;
  #endif
      vp->header = NULL;
  }
  
--- 6356,6363 ----
      }
  #ifdef AFS_DEMAND_ATTACH_FS
      V_attachFlags(vp) &= ~(VOL_HDR_ATTACHED | VOL_HDR_IN_LRU | VOL_HDR_LOADED);
  #endif
+     volume_hdr_LRU.stats.attached--;
      vp->header = NULL;
  }
  
***************
*** 5627,5632 ****
--- 6366,6384 ----
  /* Volume Hash Table routines                      */
  /***************************************************/
  
+ /**
+  * set size of volume object hash table.
+  *
+  * @param[in] logsize   log(2) of desired hash table size
+  *
+  * @return operation status
+  *    @retval 0 success
+  *    @retval -1 failure
+  *
+  * @pre MUST be called prior to VInitVolumePackage
+  *
+  * @post Volume Hash Table will have 2^logsize buckets
+  */
  int 
  VSetVolHashSize(int logsize)
  {
***************
*** 5647,5652 ****
--- 6399,6411 ----
      return 0;
  }
  
+ /**
+  * initialize dynamic data structures for volume hash table.
+  *
+  * @post hash table is allocated, and fields are initialized.
+  *
+  * @internal volume package internal use only.
+  */
  static void
  VInitVolumeHash(void)
  {
***************
*** 5664,5670 ****
      }
  }
  
! /* for demand-attach, caller MUST hold a ref count on vp */
  static void
  AddVolumeToHashTable(register Volume * vp, int hashid)
  {
--- 6423,6444 ----
      }
  }
  
! /**
!  * add a volume object to the hash table.
!  *
!  * @param[in] vp      pointer to volume object
!  * @param[in] hashid  hash of volume id
!  *
!  * @pre VOL_LOCK is held.  For DAFS, caller must hold a lightweight
!  *      reference on vp.
!  *
!  * @post volume is added to hash chain.
!  *
!  * @internal volume package internal use only.
!  *
!  * @note For DAFS, VOL_LOCK may be dropped in order to wait for an
!  *       asynchronous hash chain reordering to finish.
!  */
  static void
  AddVolumeToHashTable(register Volume * vp, int hashid)
  {
***************
*** 5689,5695 ****
      vp->vnodeHashOffset = VolumeHashOffset_r();
  }
  
! /* for demand-attach, caller MUST hold a ref count on vp */
  static void
  DeleteVolumeFromHashTable(register Volume * vp)
  {
--- 6463,6483 ----
      vp->vnodeHashOffset = VolumeHashOffset_r();
  }
  
! /**
!  * delete a volume object from the hash table.
!  *
!  * @param[in] vp  pointer to volume object
!  *
!  * @pre VOL_LOCK is held.  For DAFS, caller must hold a lightweight
!  *      reference on vp.
!  *
!  * @post volume is removed from hash chain.
!  *
!  * @internal volume package internal use only.
!  *
!  * @note For DAFS, VOL_LOCK may be dropped in order to wait for an
!  *       asynchronous hash chain reordering to finish.
!  */
  static void
  DeleteVolumeFromHashTable(register Volume * vp)
  {
***************
*** 5715,5728 ****
       * after the volume is removed from the hash */
  }
  
! /* - look up a volume id in the hash table
!  * - occasionally rebalance hash chains
!  * - update lookup statistics accordingly
!  */
! /* the hint parameter allows us to short-circuit on
!  * DEMAND_ATTACH_FS if the cacheChecks match between
!  * the hash chain head and hint
!  * caller MUST hold a refcount on hint */
  Volume *
  VLookupVolume_r(Error * ec, VolId volumeId, Volume * hint)
  {
--- 6503,6539 ----
       * after the volume is removed from the hash */
  }
  
! /**
!  * lookup a volume object in the hash table given a volume id.
!  *
!  * @param[out] ec        error code return
!  * @param[in]  volumeId  volume id
!  * @param[in]  hint      volume object which we believe could be the correct 
!                          mapping
!  *
!  * @return volume object pointer
!  *    @retval NULL  no such volume id is registered with the hash table.
!  *
!  * @pre VOL_LOCK is held.  For DAFS, caller must hold a lightweight 
!         ref on hint.
!  *
!  * @post volume object with the given id is returned.  volume object and 
!  *       hash chain access statistics are updated.  hash chain may have 
!  *       been reordered.
!  *
!  * @note For DAFS, VOL_LOCK may be dropped in order to wait for an 
!  *       asynchronous hash chain reordering operation to finish, or 
!  *       in order for us to perform an asynchronous chain reordering.
!  *
!  * @note Hash chain reorderings occur when the access count for the 
!  *       volume object being looked up exceeds the sum of the previous 
!  *       node's (the node ahead of it in the hash chain linked list) 
!  *       access count plus the constant VOLUME_HASH_REORDER_THRESHOLD.
!  *
!  * @note For DAFS, the hint parameter allows us to short-circuit if the 
!  *       cacheCheck fields match between the hash chain head and the 
!  *       hint volume object.
!  */
  Volume *
  VLookupVolume_r(Error * ec, VolId volumeId, Volume * hint)
  {
***************
*** 5849,5855 ****
  /* demand-attach fs volume hash
   * asynchronous exclusive operations */
  
! /* take exclusive control over the hash chain */
  static void
  VHashBeginExclusive_r(VolumeHashChainHead * head)
  {
--- 6660,6686 ----
  /* demand-attach fs volume hash
   * asynchronous exclusive operations */
  
! /**
!  * begin an asynchronous exclusive operation on a volume hash chain.
!  *
!  * @param[in] head   pointer to volume hash chain head object
!  *
!  * @pre VOL_LOCK held.  hash chain is quiescent.
!  *
!  * @post hash chain marked busy.
!  *
!  * @note this interface is used in conjunction with VHashEndExclusive_r and
!  *       VHashWait_r to perform asynchronous (wrt VOL_LOCK) operations on a
!  *       volume hash chain.  Its main use case is hash chain reordering, which
!  *       has the potential to be a highly latent operation.
!  *
!  * @see VHashEndExclusive_r
!  * @see VHashWait_r
!  *
!  * @note DAFS only
!  *
!  * @internal volume package internal use only.
!  */
  static void
  VHashBeginExclusive_r(VolumeHashChainHead * head)
  {
***************
*** 5857,5863 ****
      head->busy = 1;
  }
  
! /* relinquish exclusive control over the hash chain */
  static void
  VHashEndExclusive_r(VolumeHashChainHead * head)
  {
--- 6688,6710 ----
      head->busy = 1;
  }
  
! /**
!  * relinquish exclusive ownership of a volume hash chain.
!  *
!  * @param[in] head   pointer to volume hash chain head object
!  *
!  * @pre VOL_LOCK held.  thread owns the hash chain exclusively.
!  *
!  * @post hash chain is marked quiescent.  threads awaiting use of
!  *       chain are awakened.
!  *
!  * @see VHashBeginExclusive_r
!  * @see VHashWait_r
!  *
!  * @note DAFS only
!  *
!  * @internal volume package internal use only.
!  */
  static void
  VHashEndExclusive_r(VolumeHashChainHead * head)
  {
***************
*** 5866,5877 ****
      assert(pthread_cond_broadcast(&head->chain_busy_cv) == 0);
  }
  
! /* wait for another thread to finish its exclusive ops */
  static void
  VHashWait_r(VolumeHashChainHead * head)
  {
      while (head->busy) {
! 	assert(pthread_cond_wait(&head->chain_busy_cv, &vol_glock_mutex) == 0);
      }
  }
  #endif /* AFS_DEMAND_ATTACH_FS */
--- 6713,6747 ----
      assert(pthread_cond_broadcast(&head->chain_busy_cv) == 0);
  }
  
! /**
!  * wait for all asynchronous operations on a hash chain to complete.
!  *
!  * @param[in] head   pointer to volume hash chain head object
!  *
!  * @pre VOL_LOCK held.
!  *
!  * @post hash chain object is quiescent.
!  *
!  * @see VHashBeginExclusive_r
!  * @see VHashEndExclusive_r
!  *
!  * @note DAFS only
!  *
!  * @note This interface should be called before any attempt to
!  *       traverse the hash chain.  It is permissible for a thread
!  *       to gain exclusive access to the chain, and then perform
!  *       latent operations on the chain asynchronously wrt the 
!  *       VOL_LOCK.
!  *
!  * @warning if waiting is necessary, VOL_LOCK is dropped
!  *
!  * @internal volume package internal use only.
!  */
  static void
  VHashWait_r(VolumeHashChainHead * head)
  {
      while (head->busy) {
! 	VOL_CV_WAIT(&head->chain_busy_cv);
      }
  }
  #endif /* AFS_DEMAND_ATTACH_FS */
***************
*** 5890,5895 ****
--- 6760,6787 ----
   */
  
  #ifdef AFS_DEMAND_ATTACH_FS
+ /**
+  * add a volume to its disk partition VByPList.
+  *
+  * @param[in] vp  pointer to volume object
+  *
+  * @pre either the disk partition VByPList is owned exclusively
+  *      by the calling thread, or the list is quiescent and
+  *      VOL_LOCK is held.
+  *
+  * @post volume is added to disk partition VByPList
+  *
+  * @note DAFS only
+  *
+  * @warning it is the caller's responsibility to ensure list
+  *          quiescence.
+  *
+  * @see VVByPListWait_r
+  * @see VVByPListBeginExclusive_r
+  * @see VVByPListEndExclusive_r
+  *
+  * @internal volume package internal use only.
+  */
  static void
  AddVolumeToVByPList_r(Volume * vp)
  {
***************
*** 5900,5905 ****
--- 6792,6819 ----
      }
  }
  
+ /**
+  * delete a volume from its disk partition VByPList.
+  *
+  * @param[in] vp  pointer to volume object
+  *
+  * @pre either the disk partition VByPList is owned exclusively
+  *      by the calling thread, or the list is quiescent and
+  *      VOL_LOCK is held.
+  *
+  * @post volume is removed from the disk partition VByPList
+  *
+  * @note DAFS only
+  *
+  * @warning it is the caller's responsibility to ensure list
+  *          quiescence.
+  *
+  * @see VVByPListWait_r
+  * @see VVByPListBeginExclusive_r
+  * @see VVByPListEndExclusive_r
+  *
+  * @internal volume package internal use only.
+  */
  static void
  DeleteVolumeFromVByPList_r(Volume * vp)
  {
***************
*** 5910,5915 ****
--- 6824,6849 ----
      }
  }
  
+ /**
+  * begin an asynchronous exclusive operation on a VByPList.
+  *
+  * @param[in] dp   pointer to disk partition object
+  *
+  * @pre VOL_LOCK held.  VByPList is quiescent.
+  *
+  * @post VByPList marked busy.
+  *
+  * @note this interface is used in conjunction with VVByPListEndExclusive_r and
+  *       VVByPListWait_r to perform asynchronous (wrt VOL_LOCK) operations on a
+  *       VByPList.
+  *
+  * @see VVByPListEndExclusive_r
+  * @see VVByPListWait_r
+  *
+  * @note DAFS only
+  *
+  * @internal volume package internal use only.
+  */
  /* take exclusive control over the list */
  static void
  VVByPListBeginExclusive_r(struct DiskPartition * dp)
***************
*** 5918,5924 ****
      dp->vol_list.busy = 1;
  }
  
! /* relinquish exclusive control over the list */
  static void
  VVByPListEndExclusive_r(struct DiskPartition * dp)
  {
--- 6852,6874 ----
      dp->vol_list.busy = 1;
  }
  
! /**
!  * relinquish exclusive ownership of a VByPList.
!  *
!  * @param[in] dp   pointer to disk partition object
!  *
!  * @pre VOL_LOCK held.  thread owns the VByPList exclusively.
!  *
!  * @post VByPList is marked quiescent.  threads awaiting use of
!  *       the list are awakened.
!  *
!  * @see VVByPListBeginExclusive_r
!  * @see VVByPListWait_r
!  *
!  * @note DAFS only
!  *
!  * @internal volume package internal use only.
!  */
  static void
  VVByPListEndExclusive_r(struct DiskPartition * dp)
  {
***************
*** 5927,5938 ****
      assert(pthread_cond_broadcast(&dp->vol_list.cv) == 0);
  }
  
! /* wait for another thread to finish its exclusive ops */
  static void
  VVByPListWait_r(struct DiskPartition * dp)
  {
      while (dp->vol_list.busy) {
! 	assert(pthread_cond_wait(&dp->vol_list.cv, &vol_glock_mutex) == 0);
      }
  }
  #endif /* AFS_DEMAND_ATTACH_FS */
--- 6877,6911 ----
      assert(pthread_cond_broadcast(&dp->vol_list.cv) == 0);
  }
  
! /**
!  * wait for all asynchronous operations on a VByPList to complete.
!  *
!  * @param[in] dp  pointer to disk partition object
!  *
!  * @pre VOL_LOCK is held.
!  *
!  * @post disk partition's VByP list is quiescent
!  *
!  * @note DAFS only
!  *
!  * @note This interface should be called before any attempt to
!  *       traverse the VByPList.  It is permissible for a thread
!  *       to gain exclusive access to the list, and then perform
!  *       latent operations on the list asynchronously wrt the 
!  *       VOL_LOCK.
!  *
!  * @warning if waiting is necessary, VOL_LOCK is dropped
!  *
!  * @see VVByPListEndExclusive_r
!  * @see VVByPListBeginExclusive_r
!  *
!  * @internal volume package internal use only.
!  */
  static void
  VVByPListWait_r(struct DiskPartition * dp)
  {
      while (dp->vol_list.busy) {
! 	VOL_CV_WAIT(&dp->vol_list.cv);
      }
  }
  #endif /* AFS_DEMAND_ATTACH_FS */
Index: openafs/src/vol/volume.h
diff -c openafs/src/vol/volume.h:1.19 openafs/src/vol/volume.h:1.19.2.1
*** openafs/src/vol/volume.h:1.19	Fri Mar 17 14:54:52 2006
--- openafs/src/vol/volume.h	Mon Feb  4 13:51:39 2008
***************
*** 6,12 ****
   * License.  For details, see the LICENSE file in the top-level source
   * directory or online at http://www.openafs.org/dl/license10.html
   *
!  * Portions Copyright (c) 2006 Sine Nomine Associates
   */
  
  /*
--- 6,12 ----
   * License.  For details, see the LICENSE file in the top-level source
   * directory or online at http://www.openafs.org/dl/license10.html
   *
!  * Portions Copyright (c) 2006-2008 Sine Nomine Associates
   */
  
  /*
***************
*** 29,34 ****
--- 29,66 ----
  #include "daemon_com.h"
  #include "fssync.h"
  
+ #if 0
+ /** turn this on if you suspect a volume package locking bug */
+ #define VOL_LOCK_DEBUG 1
+ #endif
+ 
+ #ifdef VOL_LOCK_DEBUG
+ #define VOL_LOCK_ASSERT_HELD \
+     assert(vol_glock_holder == pthread_self())
+ #define VOL_LOCK_ASSERT_UNHELD \
+     assert(vol_glock_holder == 0)
+ #define _VOL_LOCK_SET_HELD \
+     vol_glock_holder = pthread_self()
+ #define _VOL_LOCK_SET_UNHELD \
+     vol_glock_holder = 0
+ #define VOL_LOCK_DBG_CV_WAIT_END \
+     do { \
+         VOL_LOCK_ASSERT_UNHELD; \
+         _VOL_LOCK_SET_HELD; \
+     } while(0)
+ #define VOL_LOCK_DBG_CV_WAIT_BEGIN \
+     do { \
+          VOL_LOCK_ASSERT_HELD; \
+          _VOL_LOCK_SET_UNHELD; \
+     } while(0)
+ #else
+ #define VOL_LOCK_ASSERT_HELD
+ #define VOL_LOCK_ASSERT_UNHELD
+ #define VOL_LOCK_DBG_CV_WAIT_BEGIN
+ #define VOL_LOCK_DBG_CV_WAIT_END
+ #endif
+ 
+ 
  #ifdef AFS_PTHREAD_ENV
  #include <assert.h>
  #include <pthread.h>
***************
*** 37,46 ****
--- 69,101 ----
  extern pthread_cond_t vol_put_volume_cond;
  extern pthread_cond_t vol_sleep_cond;
  extern int vol_attach_threads;
+ #ifdef VOL_LOCK_DEBUG
+ extern pthread_t vol_glock_holder;
+ #define VOL_LOCK \
+     do { \
+         assert(pthread_mutex_lock(&vol_glock_mutex) == 0); \
+         assert(vol_glock_holder == 0); \
+         vol_glock_holder = pthread_self(); \
+     } while (0)
+ #define VOL_UNLOCK \
+     do { \
+         VOL_LOCK_ASSERT_HELD; \
+         vol_glock_holder = 0; \
+         assert(pthread_mutex_unlock(&vol_glock_mutex) == 0); \
+     } while (0)
+ #define VOL_CV_WAIT(cv) \
+     do { \
+         VOL_LOCK_DBG_CV_WAIT_BEGIN; \
+         assert(pthread_cond_wait((cv), &vol_glock_mutex) == 0); \
+         VOL_LOCK_DBG_CV_WAIT_END; \
+     } while (0)
+ #else /* !VOL_LOCK_DEBUG */
  #define VOL_LOCK \
      assert(pthread_mutex_lock(&vol_glock_mutex) == 0)
  #define VOL_UNLOCK \
      assert(pthread_mutex_unlock(&vol_glock_mutex) == 0)
+ #define VOL_CV_WAIT(cv) assert(pthread_cond_wait((cv), &vol_glock_mutex) == 0)
+ #endif /* !VOL_LOCK_DEBUG */
  #define VSALVSYNC_LOCK \
      assert(pthread_mutex_lock(&vol_salvsync_mutex) == 0)
  #define VSALVSYNC_UNLOCK \
***************
*** 72,77 ****
--- 127,141 ----
  extern int (*vol_PollProc) ();
  #define	DOPOLL	((vol_PollProc)? (*vol_PollProc)() : 0)
  
+ #ifdef AFS_DEMAND_ATTACH_FS
+ /**
+  * variable error return code based upon programType and DAFS presence
+  */
+ #define DAFS_VSALVAGE   ((programType == fileServer) ? VSALVAGING : VSALVAGE)
+ #else
+ #define DAFS_VSALVAGE   (VSALVAGE)
+ #endif
+ 
  struct versionStamp {		/* Version stamp for critical volume files */
      bit32 magic;		/* Magic number */
      bit32 version;		/* Version number of this file, or software
***************
*** 79,123 ****
  };
  
  #ifdef AFS_DEMAND_ATTACH_FS
! /*
!  * demand attach fs
!  * volume state machine
   *
!  * these must be contiguous in order for IsValidState() to work correctly 
   */
! #define VOL_STATE_UNATTACHED     0       /* volume is unattached */
! #define VOL_STATE_PREATTACHED    1       /* volume has been pre-attached */
! #define VOL_STATE_ATTACHING      2       /* volume is transitioning to fully attached */
! #define VOL_STATE_ATTACHED       3       /* volume has been fully attached */
! #define VOL_STATE_UPDATING       4       /* volume is updating on-disk structures */
! #define VOL_STATE_GET_BITMAP     5       /* volume is getting bitmap entries */
! #define VOL_STATE_HDR_LOADING    6       /* volume is loading disk header */
! #define VOL_STATE_HDR_ATTACHING  7       /* volume is getting a header from the LRU */
! #define VOL_STATE_SHUTTING_DOWN  8       /* volume is shutting down */
! #define VOL_STATE_GOING_OFFLINE  9       /* volume is going offline */
! #define VOL_STATE_OFFLINING      10      /* volume is transitioning to offline */
! #define VOL_STATE_DETACHING      11      /* volume is transitioning to detached */
! #define VOL_STATE_SALVSYNC_REQ   12      /* volume is blocked on a salvsync request */
! #define VOL_STATE_SALVAGING      13      /* volume is being salvaged */
! #define VOL_STATE_ERROR          14      /* volume is in an error state */
! #define VOL_STATE_FREED          15      /* debugging aid */
! 
! #define VOL_STATE_COUNT          16      /* total number of valid states */
! 
! /* V_attachFlags bits */
! #define VOL_HDR_ATTACHED   0x1     /* volume header is attached to Volume struct */
! #define VOL_HDR_LOADED     0x2     /* volume header contents are valid */
! #define VOL_HDR_IN_LRU     0x4     /* volume header is in LRU */
! #define VOL_IN_HASH        0x8     /* volume is in hash table */
! #define VOL_ON_VBYP_LIST   0x10    /* volume is on VByP list */
! #define VOL_IS_BUSY        0x20    /* volume is not to be free()d */
! #define VOL_ON_VLRU        0x40    /* volume is on the VLRU */
! #define VOL_HDR_DONTSALV   0x80    /* volume header DONTSALVAGE flag is set */
  
  /* VPrintExtendedCacheStats flags */
! #define VOL_STATS_PER_CHAIN   0x1  /* compute simple per-chain stats */
! #define VOL_STATS_PER_CHAIN2  0x2  /* compute per-chain stats that require scanning
! 				    * every element of the chain */
  
  /* VLRU_SetOptions options */
  #define VLRU_SET_THRESH       1
--- 143,197 ----
  };
  
  #ifdef AFS_DEMAND_ATTACH_FS
! /**
!  * demand attach volume state enumeration.
   *
!  * @note values must be contiguous in order for VIsValidState() to work correctly
   */
! typedef enum {
!     VOL_STATE_UNATTACHED        = 0,    /**< volume is unattached */
!     VOL_STATE_PREATTACHED       = 1,    /**< volume has been pre-attached */
!     VOL_STATE_ATTACHING         = 2,    /**< volume is transitioning to fully attached */
!     VOL_STATE_ATTACHED          = 3,    /**< volume has been fully attached */
!     VOL_STATE_UPDATING          = 4,    /**< volume is updating on-disk structures */
!     VOL_STATE_GET_BITMAP        = 5,    /**< volume is getting bitmap entries */
!     VOL_STATE_HDR_LOADING       = 6,    /**< volume is loading disk header */
!     VOL_STATE_HDR_ATTACHING     = 7,    /**< volume is getting a header from the LRU */
!     VOL_STATE_SHUTTING_DOWN     = 8,    /**< volume is shutting down */
!     VOL_STATE_GOING_OFFLINE     = 9,    /**< volume is going offline */
!     VOL_STATE_OFFLINING         = 10,   /**< volume is transitioning to offline */
!     VOL_STATE_DETACHING         = 11,   /**< volume is transitioning to detached */
!     VOL_STATE_SALVSYNC_REQ      = 12,   /**< volume is blocked on a salvsync request */
!     VOL_STATE_SALVAGING         = 13,   /**< volume is being salvaged */
!     VOL_STATE_ERROR             = 14,   /**< volume is in an error state */
!     VOL_STATE_VNODE_ALLOC       = 15,   /**< volume is busy allocating a new vnode */
!     VOL_STATE_VNODE_GET         = 16,   /**< volume is busy getting vnode disk data */
!     VOL_STATE_VNODE_CLOSE       = 17,   /**< volume is busy closing vnodes */
!     VOL_STATE_VNODE_RELEASE     = 18,   /**< volume is busy releasing vnodes */
!     VOL_STATE_VLRU_ADD          = 19,   /**< volume is busy being added to a VLRU queue */
!     /* please add new states directly above this line */
!     VOL_STATE_FREED             = 20,   /**< debugging aid */
!     VOL_STATE_COUNT             = 21,   /**< total number of valid states */
! } VolState;
! 
! /**
!  * V_attachFlags bits.
!  */
! enum VolFlags {
!     VOL_HDR_ATTACHED      = 0x1,     /**< volume header is attached to Volume struct */
!     VOL_HDR_LOADED        = 0x2,     /**< volume header contents are valid */
!     VOL_HDR_IN_LRU        = 0x4,     /**< volume header is in LRU */
!     VOL_IN_HASH           = 0x8,     /**< volume is in hash table */
!     VOL_ON_VBYP_LIST      = 0x10,    /**< volume is on VByP list */
!     VOL_IS_BUSY           = 0x20,    /**< volume is not to be free()d */
!     VOL_ON_VLRU           = 0x40,    /**< volume is on the VLRU */
!     VOL_HDR_DONTSALV      = 0x80,    /**< volume header DONTSALVAGE flag is set */
! };
  
  /* VPrintExtendedCacheStats flags */
! #define VOL_STATS_PER_CHAIN   0x1  /**< compute simple per-chain stats */
! #define VOL_STATS_PER_CHAIN2  0x2  /**< compute per-chain stats that require scanning
! 				    *   every element of the chain */
  
  /* VLRU_SetOptions options */
  #define VLRU_SET_THRESH       1
***************
*** 125,138 ****
  #define VLRU_SET_MAX          3
  #define VLRU_SET_ENABLED      4
  
! /* valid VLRU queue names */
! #define VLRU_QUEUE_NEW 0            /* LRU queue for new volumes */
! #define VLRU_QUEUE_MID 1            /* survivor generation */
! #define VLRU_QUEUE_OLD 2            /* old generation */
! #define VLRU_QUEUE_CANDIDATE 3      /* soft detach candidate pool */
! #define VLRU_QUEUE_HELD 4           /* volumes which are not allowed
! 				     * to be soft detached */
! #define VLRU_QUEUE_INVALID 5        /* invalid queue id */
  
  /* default scanner timing parameters */
  #define VLRU_DEFAULT_OFFLINE_THRESH (60*60*2) /* 2 hours */
--- 199,216 ----
  #define VLRU_SET_MAX          3
  #define VLRU_SET_ENABLED      4
  
! /**
!  * VLRU queue names.
!  */
! typedef enum {
!     VLRU_QUEUE_NEW        = 0,  /**< LRU queue for new volumes */
!     VLRU_QUEUE_MID        = 1,  /**< survivor generation */
!     VLRU_QUEUE_OLD        = 2,  /**< old generation */
!     VLRU_QUEUE_CANDIDATE  = 3,  /**< soft detach candidate pool */
!     VLRU_QUEUE_HELD       = 4,  /*   volumes which are not allowed
! 				 *   to be soft detached */
!     VLRU_QUEUE_INVALID    = 5,  /**< invalid queue id */
! } VLRUQueueName;
  
  /* default scanner timing parameters */
  #define VLRU_DEFAULT_OFFLINE_THRESH (60*60*2) /* 2 hours */
***************
*** 364,370 ****
  /* Memory resident volume information */
  /**************************************/
  
! /* global volume package stats */
  typedef struct VolPkgStats {
  #ifdef AFS_DEMAND_ATTACH_FS
      /*
--- 442,450 ----
  /* Memory resident volume information */
  /**************************************/
  
! /** 
!  * global volume package stats.
!  */
  typedef struct VolPkgStats {
  #ifdef AFS_DEMAND_ATTACH_FS
      /*
***************
*** 373,413 ****
       */
  
      /* levels */
!     afs_uint32 state_levels[VOL_STATE_COUNT];
  
      /* counters */
!     afs_uint64 hash_looks;           /* number of hash chain element traversals */
!     afs_uint64 hash_reorders;        /* number of hash chain reorders */
!     afs_uint64 salvages;             /* online salvages since fileserver start */
!     afs_uint64 vol_ops;              /* volume operations since fileserver start */
  #endif /* AFS_DEMAND_ATTACH_FS */
  
!     afs_uint64 hdr_loads;            /* header loads from disk */
!     afs_uint64 hdr_gets;             /* header pulls out of LRU */
!     afs_uint64 attaches;             /* volume attaches since fileserver start */
!     afs_uint64 soft_detaches;        /* soft detach ops since fileserver start */
  
      /* configuration parameters */
!     afs_uint32 hdr_cache_size;       /* size of volume header cache */
  } VolPkgStats;
  extern VolPkgStats VStats;
  
  /*
   * volume header cache supporting structures
   */
- #ifdef AFS_DEMAND_ATTACH_FS
  struct volume_hdr_LRU_stats {
      afs_uint32 free;
      afs_uint32 used;
      afs_uint32 attached;
  };
- #endif
  
  struct volume_hdr_LRU_t {
      struct rx_queue lru;
- #ifdef AFS_DEMAND_ATTACH_FS
      struct volume_hdr_LRU_stats stats;
- #endif
  };
  extern struct volume_hdr_LRU_t volume_hdr_LRU;
  
--- 453,489 ----
       */
  
      /* levels */
!     afs_uint32 state_levels[VOL_STATE_COUNT]; /**< volume state transition counters */
  
      /* counters */
!     afs_uint64 hash_looks;           /**< number of hash chain element traversals */
!     afs_uint64 hash_reorders;        /**< number of hash chain reorders */
!     afs_uint64 salvages;             /**< online salvages since fileserver start */
!     afs_uint64 vol_ops;              /**< volume operations since fileserver start */
  #endif /* AFS_DEMAND_ATTACH_FS */
  
!     afs_uint64 hdr_loads;            /**< header loads from disk */
!     afs_uint64 hdr_gets;             /**< header pulls out of LRU */
!     afs_uint64 attaches;             /**< volume attaches since fileserver start */
!     afs_uint64 soft_detaches;        /**< soft detach ops since fileserver start */
  
      /* configuration parameters */
!     afs_uint32 hdr_cache_size;       /**< size of volume header cache */
  } VolPkgStats;
  extern VolPkgStats VStats;
  
  /*
   * volume header cache supporting structures
   */
  struct volume_hdr_LRU_stats {
      afs_uint32 free;
      afs_uint32 used;
      afs_uint32 attached;
  };
  
  struct volume_hdr_LRU_t {
      struct rx_queue lru;
      struct volume_hdr_LRU_stats stats;
  };
  extern struct volume_hdr_LRU_t volume_hdr_LRU;
  
***************
*** 452,502 ****
  
  
  #ifdef AFS_DEMAND_ATTACH_FS
! /* demand attach fs
!  * extended per-volume statistics 
   *
!  * please note that this structure lives across the entire
!  * lifetime of the fileserver process
   */
  typedef struct VolumeStats {
      /* counters */
!     afs_uint64 hash_lookups;         /* hash table lookups */
!     afs_uint64 hash_short_circuits;  /* short circuited hash lookups (due to cacheCheck) */
!     afs_uint64 hdr_loads;            /* header loads from disk */
!     afs_uint64 hdr_gets;             /* header pulls out of LRU */
!     afs_uint16 attaches;             /* attaches of this volume since fileserver start */
!     afs_uint16 soft_detaches;        /* soft detaches of this volume */
!     afs_uint16 salvages;             /* online salvages since fileserver start */
!     afs_uint16 vol_ops;              /* volume operations since fileserver start */
  
      /* timestamps */
!     afs_uint32 last_attach;      /* unix timestamp of last VAttach */
!     afs_uint32 last_get;         /* unix timestamp of last VGet/VHold */
!     afs_uint32 last_promote;     /* unix timestamp of last VLRU promote/demote */
!     afs_uint32 last_hdr_get;     /* unix timestamp of last GetVolumeHeader() */
!     afs_uint32 last_salvage;     /* unix timestamp of last initiation of an online salvage */
!     afs_uint32 last_salvage_req; /* unix timestamp of last SALVSYNC request */
!     afs_uint32 last_vol_op;      /* unix timestamp of last volume operation */
  } VolumeStats;
  
! /* demand attach fs
!  * online salvager state */
  typedef struct VolumeOnlineSalvage {
!     afs_uint32 prio;            /* number of VGetVolume's since salvage requested */
!     int reason;                 /* reason for requesting online salvage */
!     byte requested;             /* flag specifying that salvage should be scheduled */
!     byte scheduled;             /* flag specifying whether online salvage scheduled */
!     byte reserved[2];           /* padding */
  } VolumeOnlineSalvage;
  
! /* demand attach fs
!  * volume LRU state */
  typedef struct VolumeVLRUState {
!     struct rx_queue lru;        /* VLRU queue pointers */
!     int idx;                    /* VLRU generation index */
  } VolumeVLRUState;
- 
- typedef afs_uint16 VolState;    /* attachment state type */
  #endif /* AFS_DEMAND_ATTACH_FS */
  
  typedef struct Volume {
--- 528,579 ----
  
  
  #ifdef AFS_DEMAND_ATTACH_FS
! /**
!  * DAFS extended per-volume statistics.
   *
!  * @note this data lives across the entire
!  *       lifetime of the fileserver process
   */
  typedef struct VolumeStats {
      /* counters */
!     afs_uint64 hash_lookups;         /**< hash table lookups */
!     afs_uint64 hash_short_circuits;  /**< short circuited hash lookups (due to cacheCheck) */
!     afs_uint64 hdr_loads;            /**< header loads from disk */
!     afs_uint64 hdr_gets;             /**< header pulls out of LRU */
!     afs_uint16 attaches;             /**< attaches of this volume since fileserver start */
!     afs_uint16 soft_detaches;        /**< soft detaches of this volume */
!     afs_uint16 salvages;             /**< online salvages since fileserver start */
!     afs_uint16 vol_ops;              /**< volume operations since fileserver start */
  
      /* timestamps */
!     afs_uint32 last_attach;      /**< unix timestamp of last VAttach */
!     afs_uint32 last_get;         /**< unix timestamp of last VGet/VHold */
!     afs_uint32 last_promote;     /**< unix timestamp of last VLRU promote/demote */
!     afs_uint32 last_hdr_get;     /**< unix timestamp of last GetVolumeHeader() */
!     afs_uint32 last_hdr_load;    /**< unix timestamp of last LoadVolumeHeader() */
!     afs_uint32 last_salvage;     /**< unix timestamp of last initiation of an online salvage */
!     afs_uint32 last_salvage_req; /**< unix timestamp of last SALVSYNC request */
!     afs_uint32 last_vol_op;      /**< unix timestamp of last volume operation */
  } VolumeStats;
  
! /**
!  * DAFS online salvager state.
!  */
  typedef struct VolumeOnlineSalvage {
!     afs_uint32 prio;            /**< number of VGetVolume's since salvage requested */
!     int reason;                 /**< reason for requesting online salvage */
!     byte requested;             /**< flag specifying that salvage should be scheduled */
!     byte scheduled;             /**< flag specifying whether online salvage scheduled */
!     byte reserved[2];           /**< padding */
  } VolumeOnlineSalvage;
  
! /**
!  * DAFS Volume LRU state.
!  */
  typedef struct VolumeVLRUState {
!     struct rx_queue lru;        /**< VLRU queue for this generation */
!     VLRUQueueName idx;          /**< VLRU generation index */
  } VolumeVLRUState;
  #endif /* AFS_DEMAND_ATTACH_FS */
  
  typedef struct Volume {
***************
*** 541,549 ****
      afs_uint32 updateTime;	/* Time that this volume was put on the updated
  				 * volume list--the list of volumes that will be
  				 * salvaged should the file server crash */
  #ifdef AFS_DEMAND_ATTACH_FS
      VolState attach_state;      /* what stage of attachment has been completed */
!     afs_uint16 attach_flags;    /* flags related to attachment state */
      pthread_cond_t attach_cv;   /* state change condition variable */
      short nWaiters;             /* volume package internal ref count */
      int chainCacheCheck;        /* Volume hash chain cache check */
--- 618,627 ----
      afs_uint32 updateTime;	/* Time that this volume was put on the updated
  				 * volume list--the list of volumes that will be
  				 * salvaged should the file server crash */
+     struct rx_queue vnode_list; /**< linked list of cached vnodes for this volume */
  #ifdef AFS_DEMAND_ATTACH_FS
      VolState attach_state;      /* what stage of attachment has been completed */
!     afs_uint32 attach_flags;    /* flags related to attachment state */
      pthread_cond_t attach_cv;   /* state change condition variable */
      short nWaiters;             /* volume package internal ref count */
      int chainCacheCheck;        /* Volume hash chain cache check */
***************
*** 691,702 ****
  extern Volume * VLookupVolume_r(Error * ec, VolId volumeId, Volume * hint);
  
  #ifdef AFS_DEMAND_ATTACH_FS
! extern Volume *VPreAttachVolumeByName(Error * ec, char *partition, char *name, 
! 				       int mode);
! extern Volume *VPreAttachVolumeByName_r(Error * ec, char *partition, char *name,
! 				     int mode);
! extern Volume *VPreAttachVolumeById_r(Error * ec, struct DiskPartition * partp, 
! 				      Volume * vp, int volume_id);
  extern Volume *VGetVolumeByVp_r(Error * ec, Volume * vp);
  extern int VShutdownByPartition_r(struct DiskPartition * dp);
  extern int VShutdownVolume_r(Volume * vp);
--- 769,780 ----
  extern Volume * VLookupVolume_r(Error * ec, VolId volumeId, Volume * hint);
  
  #ifdef AFS_DEMAND_ATTACH_FS
! extern Volume *VPreAttachVolumeByName(Error * ec, char *partition, char *name);
! extern Volume *VPreAttachVolumeByName_r(Error * ec, char *partition, char *name);
! extern Volume *VPreAttachVolumeById_r(Error * ec, char * partition, 
! 				      VolId volumeId);
! extern Volume *VPreAttachVolumeByVp_r(Error * ec, struct DiskPartition * partp, 
! 				      Volume * vp, VolId volume_id);
  extern Volume *VGetVolumeByVp_r(Error * ec, Volume * vp);
  extern int VShutdownByPartition_r(struct DiskPartition * dp);
  extern int VShutdownVolume_r(Volume * vp);
***************
*** 708,719 ****
  extern int VDisconnectSALV_r(void);
  extern void VPrintExtendedCacheStats(int flags);
  extern void VPrintExtendedCacheStats_r(int flags);
- extern VolState VChangeState_r(Volume * vp, VolState new_state);
  extern void VLRU_SetOptions(int option, afs_uint32 val);
  extern int VSetVolHashSize(int logsize);
! extern int VRequestSalvage_r(Volume * vp, int reason, int flags);
  extern int VRegisterVolOp_r(Volume * vp, FSSYNC_VolOp_info * vopinfo);
! extern int VDeregisterVolOp_r(Volume * vp, FSSYNC_VolOp_info * vopinfo);
  #endif /* AFS_DEMAND_ATTACH_FS */
  extern int VVolOpLeaveOnline_r(Volume * vp, FSSYNC_VolOp_info * vopinfo);
  extern int VVolOpSetVBusy_r(Volume * vp, FSSYNC_VolOp_info * vopinfo);
--- 786,797 ----
  extern int VDisconnectSALV_r(void);
  extern void VPrintExtendedCacheStats(int flags);
  extern void VPrintExtendedCacheStats_r(int flags);
  extern void VLRU_SetOptions(int option, afs_uint32 val);
  extern int VSetVolHashSize(int logsize);
! extern int VRequestSalvage_r(Error * ec, Volume * vp, int reason, int flags);
  extern int VRegisterVolOp_r(Volume * vp, FSSYNC_VolOp_info * vopinfo);
! extern int VDeregisterVolOp_r(Volume * vp);
! extern void VCancelReservation_r(Volume * vp);
  #endif /* AFS_DEMAND_ATTACH_FS */
  extern int VVolOpLeaveOnline_r(Volume * vp, FSSYNC_VolOp_info * vopinfo);
  extern int VVolOpSetVBusy_r(Volume * vp, FSSYNC_VolOp_info * vopinfo);
Index: openafs/src/vol/volume_inline.h
diff -c /dev/null openafs/src/vol/volume_inline.h:1.1.2.3
*** /dev/null	Mon Feb 11 10:58:28 2008
--- openafs/src/vol/volume_inline.h	Wed Feb  6 07:21:48 2008
***************
*** 0 ****
--- 1,204 ----
+ /*
+  * Copyright 2005-2008, Sine Nomine Associates and others.
+  * All Rights Reserved.
+  * 
+  * This software has been released under the terms of the IBM Public
+  * License.  For details, see the LICENSE file in the top-level source
+  * directory or online at http://www.openafs.org/dl/license10.html
+  */
+ 
+ #ifndef _AFS_VOL_VOLUME_INLINE_H
+ #define _AFS_VOL_VOLUME_INLINE_H 1
+ 
+ #include "volume.h"
+ 
+ #ifdef AFS_HPUX_ENV
+ #define static_inline static __inline
+ #elif defined(AFS_AIX_ENV)
+ #define static_inline inline
+ #else
+ #define static_inline static inline
+ #endif
+ 
+ 
+ /***************************************************/
+ /* demand attach fs state machine routines         */
+ /***************************************************/
+ 
+ #ifdef AFS_DEMAND_ATTACH_FS
+ /**
+  * tells caller whether or not the current state requires
+  * exclusive access without holding glock.
+  *
+  * @param state  volume state enumeration
+  *
+  * @return whether volume state is a mutually exclusive state
+  *   @retval 0  no, state is re-entrant
+  *   @retval 1  yes, state is mutually exclusive
+  *
+  * @note DEMAND_ATTACH_FS only
+  *
+  * @note should VOL_STATE_SALVSYNC_REQ be treated as exclusive?
+  */
+ static_inline int
+ VIsExclusiveState(VolState state)
+ {
+     switch (state) {
+     case VOL_STATE_UPDATING:
+     case VOL_STATE_ATTACHING:
+     case VOL_STATE_GET_BITMAP:
+     case VOL_STATE_HDR_LOADING:
+     case VOL_STATE_HDR_ATTACHING:
+     case VOL_STATE_OFFLINING:
+     case VOL_STATE_DETACHING:
+     case VOL_STATE_VNODE_ALLOC:
+     case VOL_STATE_VNODE_GET:
+     case VOL_STATE_VNODE_CLOSE:
+     case VOL_STATE_VNODE_RELEASE:
+ 	return 1;
+     }
+     return 0;
+ }
+ 
+ /**
+  * tell caller whether V_attachState is an error condition.
+  *
+  * @param state  volume state enumeration
+  *
+  * @return whether volume state is in error state
+  *   @retval 0  state is not an error state
+  *   @retval 1  state is an error state
+  *
+  * @note DEMAND_ATTACH_FS only
+  */
+ static_inline int
+ VIsErrorState(VolState state)
+ {
+     switch (state) {
+     case VOL_STATE_ERROR:
+     case VOL_STATE_SALVAGING:
+ 	return 1;
+     }
+     return 0;
+ }
+ 
+ /**
+  * tell caller whether V_attachState is valid.
+  *
+  * @param state  volume state enumeration
+  *
+  * @return whether volume state is a mutually exclusive state
+  *   @retval 0  no, state is not valid
+  *   @retval 1  yes, state is a valid enumeration member
+  *
+  * @note DEMAND_ATTACH_FS only
+  *
+  * @note do we really want to treat VOL_STATE_FREED as valid?
+  */
+ static_inline int
+ VIsValidState(VolState state)
+ {
+     if ((state >= 0) && 
+ 	(state < VOL_STATE_COUNT)) {
+ 	return 1;
+     }
+     return 0;
+ }
+ 
+ /**
+  * increment volume-package internal refcount.
+  *
+  * @param vp  volume object pointer
+  *
+  * @internal volume package internal use only
+  *
+  * @pre VOL_LOCK must be held
+  *
+  * @post volume waiters refcount is incremented
+  *
+  * @see VCancelReservation_r
+  *
+  * @note DEMAND_ATTACH_FS only
+  */
+ static_inline void
+ VCreateReservation_r(Volume * vp)
+ {
+     vp->nWaiters++;
+ }
+ 
+ /**
+  * wait for the volume to change states.
+  *
+  * @param vp  volume object pointer
+  *
+  * @pre VOL_LOCK held; ref held on volume
+  *
+  * @post VOL_LOCK held; volume state has changed from previous value
+  *
+  * @note DEMAND_ATTACH_FS only
+  */
+ static_inline void
+ VWaitStateChange_r(Volume * vp)
+ {
+     VolState state_save = V_attachState(vp);
+ 
+     assert(vp->nWaiters || vp->nUsers);
+     do {
+ 	VOL_CV_WAIT(&V_attachCV(vp));
+     } while (V_attachState(vp) == state_save);
+     assert(V_attachState(vp) != VOL_STATE_FREED);
+ }
+ 
+ /**
+  * wait for blocking ops to end.
+  *
+  * @pre VOL_LOCK held; ref held on volume
+  *
+  * @post VOL_LOCK held; volume not in exclusive state
+  *
+  * @param vp  volume object pointer
+  *
+  * @note DEMAND_ATTACH_FS only
+  */
+ static_inline void
+ VWaitExclusiveState_r(Volume * vp)
+ {
+     assert(vp->nWaiters || vp->nUsers);
+     while (VIsExclusiveState(V_attachState(vp))) {
+ 	VOL_CV_WAIT(&V_attachCV(vp));
+     }
+     assert(V_attachState(vp) != VOL_STATE_FREED);
+ }
+ 
+ /**
+  * change state, and notify other threads,
+  * return previous state to caller.
+  *
+  * @param vp         pointer to volume object
+  * @param new_state  new volume state value
+  * @pre VOL_LOCK held
+  *
+  * @post volume state changed; stats updated
+  *
+  * @return previous volume state
+  *
+  * @note DEMAND_ATTACH_FS only
+  */
+ static_inline VolState
+ VChangeState_r(Volume * vp, VolState new_state)
+ {
+     VolState old_state = V_attachState(vp);
+ 
+     /* XXX profiling need to make sure these counters
+      * don't kill performance... */
+     VStats.state_levels[old_state]--;
+     VStats.state_levels[new_state]++;
+ 
+     V_attachState(vp) = new_state;
+     assert(pthread_cond_broadcast(&V_attachCV(vp)) == 0);
+     return old_state;
+ }
+ 
+ #endif /* AFS_DEMAND_ATTACH_FS */
+ 
+ #endif /* _AFS_VOL_VOLUME_INLINE_H */
Index: openafs/src/volser/NTMakefile
diff -c openafs/src/volser/NTMakefile:1.11.2.1 openafs/src/volser/NTMakefile:1.11.2.2
*** openafs/src/volser/NTMakefile:1.11.2.1	Tue Jul  4 02:28:28 2006
--- openafs/src/volser/NTMakefile	Sat Feb  2 08:43:29 2008
***************
*** 95,101 ****
  	$(DESTDIR)\lib\afs\afsprocmgmt.lib
  
  $(VOLSERVER_EXEFILE): $(VOLSERVER_EXEOBJS) $(VOLSERVER_EXELIBS) $(EXEC_LIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
--- 95,101 ----
  	$(DESTDIR)\lib\afs\afsprocmgmt.lib
  
  $(VOLSERVER_EXEFILE): $(VOLSERVER_EXEOBJS) $(VOLSERVER_EXELIBS) $(EXEC_LIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
***************
*** 121,127 ****
  	$(DESTDIR)\lib\afs\afspioctl.lib
  
  $(RS_VOS_EXEFILE): $(VOS_EXEOBJS) $(VOS_EXELIBS) $(EXEC_LIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
--- 121,127 ----
  	$(DESTDIR)\lib\afs\afspioctl.lib
  
  $(RS_VOS_EXEFILE): $(VOS_EXEOBJS) $(VOS_EXELIBS) $(EXEC_LIBS)
! 	$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
          $(_VC_MANIFEST_EMBED_EXE)
  	$(EXEPREP) 
  
Index: openafs/src/volser/dumpstuff.c
diff -c openafs/src/volser/dumpstuff.c:1.29.2.8 openafs/src/volser/dumpstuff.c:1.29.2.9
*** openafs/src/volser/dumpstuff.c:1.29.2.8	Tue Oct 30 11:16:59 2007
--- openafs/src/volser/dumpstuff.c	Mon Jan 21 09:06:11 2008
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/dumpstuff.c,v 1.29.2.8 2007/10/30 15:16:59 shadow Exp $");
  
  #include <sys/types.h>
  #include <ctype.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/dumpstuff.c,v 1.29.2.9 2008/01/21 14:06:11 shadow Exp $");
  
  #include <sys/types.h>
  #include <ctype.h>
***************
*** 1035,1042 ****
      iod_Init(iodp, call);
  
      vp = avp;
-     if (V_parentId(vp) == V_id(vp))
-       delo = incremental;
  
      if (!ReadDumpHeader(iodp, &header)) {
  	Log("1 Volser: RestoreVolume: Error reading header file for dump; aborted\n");
--- 1035,1040 ----
Index: openafs/src/volser/volmain.c
diff -c openafs/src/volser/volmain.c:1.22.2.8 openafs/src/volser/volmain.c:1.22.2.9
*** openafs/src/volser/volmain.c:1.22.2.8	Mon Nov 26 16:08:46 2007
--- openafs/src/volser/volmain.c	Tue Jan 22 23:18:17 2008
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/volmain.c,v 1.22.2.8 2007/11/26 21:08:46 shadow Exp $");
  
  #include <sys/types.h>
  #include <string.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/volmain.c,v 1.22.2.9 2008/01/23 04:18:17 shadow Exp $");
  
  #include <sys/types.h>
  #include <string.h>
***************
*** 89,94 ****
--- 89,95 ----
  int udpBufSize = 0;		/* UDP buffer size for receive */
  
  int rxBind = 0;
+ int rxkadDisableDotCheck = 0;
  
  #define ADDRSPERSITE 16         /* Same global is in rx/rx_user.c */
  afs_uint32 SHostAddrs[ADDRSPERSITE];
***************
*** 288,293 ****
--- 289,296 ----
  	    goto usage;
  	} else if (strcmp(argv[code], "-rxbind") == 0) {
  	    rxBind = 1;
+ 	} else if (strcmp(argv[code], "-allow-dotted-principals") == 0) {
+ 	    rxkadDisableDotCheck = 1;
  	} else if (strcmp(argv[code], "-p") == 0) {
  	    lwps = atoi(argv[++code]);
  	    if (lwps > MAXLWP) {
***************
*** 379,385 ****
  #ifndef AFS_NT40_ENV
  	    printf("Usage: volserver [-log] [-p <number of processes>] "
  		   "[-auditlog <log path>] "
! 		   "[-nojumbo] [-rxmaxmtu <bytes>] [-rxbind] "
  		   "[-udpsize <size of socket buffer in bytes>] "
  		   "[-syslog[=FACILITY]] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
--- 382,388 ----
  #ifndef AFS_NT40_ENV
  	    printf("Usage: volserver [-log] [-p <number of processes>] "
  		   "[-auditlog <log path>] "
! 		   "[-nojumbo] [-rxmaxmtu <bytes>] [-rxbind] [-allow-dotted-principals] "
  		   "[-udpsize <size of socket buffer in bytes>] "
  		   "[-syslog[=FACILITY]] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
***************
*** 387,393 ****
  #else
  	    printf("Usage: volserver [-log] [-p <number of processes>] "
  		   "[-auditlog <log path>] "
! 		   "[-nojumbo] [-rxmaxmtu <bytes>] [-rxbind] "
  		   "[-udpsize <size of socket buffer in bytes>] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-help]\n");
--- 390,396 ----
  #else
  	    printf("Usage: volserver [-log] [-p <number of processes>] "
  		   "[-auditlog <log path>] "
! 		   "[-nojumbo] [-rxmaxmtu <bytes>] [-rxbind] [-allow-dotted-principals] "
  		   "[-udpsize <size of socket buffer in bytes>] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-help]\n");
***************
*** 517,522 ****
--- 520,531 ----
      rx_SetStackSize(service, 32768);
  #endif
  
+     if (rxkadDisableDotCheck) {
+         rx_SetSecurityConfiguration(service, RXS_CONFIG_FLAGS,
+                                     (void *)RXS_CONFIG_FLAGS_DISABLE_DOTCHECK,
+                                     NULL);
+     }
+ 
      service =
  	rx_NewService(0, RX_STATS_SERVICE_ID, "rpcstats", securityObjects, 3,
  		      RXSTATS_ExecuteRequest);
Index: openafs/src/volser/volprocs.c
diff -c openafs/src/volser/volprocs.c:1.42.2.9 openafs/src/volser/volprocs.c:1.42.2.11
*** openafs/src/volser/volprocs.c:1.42.2.9	Mon Nov 26 17:12:04 2007
--- openafs/src/volser/volprocs.c	Sun Feb 10 22:37:23 2008
***************
*** 5,17 ****
   * This software has been released under the terms of the IBM Public
   * License.  For details, see the LICENSE file in the top-level source
   * directory or online at http://www.openafs.org/dl/license10.html
   */
  
  #include <afsconfig.h>
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/volprocs.c,v 1.42.2.9 2007/11/26 22:12:04 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
--- 5,19 ----
   * 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
+  *
+  * Portions Copyright (c) 2007-2008 Sine Nomine Associates
   */
  
  #include <afsconfig.h>
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/volprocs.c,v 1.42.2.11 2008/02/11 03:37:23 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
***************
*** 51,56 ****
--- 53,59 ----
  #endif
  #include <afs/vnode.h>
  #include <afs/volume.h>
+ #include <afs/volume_inline.h>
  #include <afs/partition.h>
  #include "vol.h"
  #include <afs/daemon_com.h>
***************
*** 484,489 ****
--- 487,493 ----
      strcpy(tt->lastProcName, "DeleteVolume");
      tt->rxCallPtr = acid;
      VPurgeVolume(&error, tt->volume);	/* don't check error code, it is not set! */
+     V_destroyMe(tt->volume) = DESTROY_ME; /* so endtrans does the right fssync opcode */
      tt->vflags |= VTDeleted;	/* so we know not to do anything else to it */
      tt->rxCallPtr = (struct rx_call *)0;
      if (TRELE(tt))
***************
*** 1039,1045 ****
      }
      VUpdateVolume(&error, vp);
      tt->vflags = aflags;
-     tt->rxCallPtr = (struct rx_call *)0;
      if (TRELE(tt) && !error)
  	return VOLSERTRELE_ERROR;
  
--- 1043,1048 ----
***************
*** 1740,1745 ****
--- 1743,2046 ----
  
  }
  
+ /**
+  * volint vol info structure type.
+  */
+ typedef enum {
+     VOLINT_INFO_TYPE_BASE,  /**< volintInfo type */
+     VOLINT_INFO_TYPE_EXT    /**< volintXInfo type */
+ } volint_info_type_t;
+ 
+ /**
+  * handle to various on-wire vol info types.
+  */
+ typedef struct {
+     volint_info_type_t volinfo_type;
+     union {
+ 	void * opaque;
+ 	volintInfo * base;
+ 	volintXInfo * ext;
+     } volinfo_ptr;
+ } volint_info_handle_t;
+ 
+ /**
+  * store value to a field at the appropriate location in on-wire structure.
+  */
+ #define VOLINT_INFO_STORE(handle, name, val) \
+     do { \
+         if ((handle)->volinfo_type == VOLINT_INFO_TYPE_BASE) { \
+             (handle)->volinfo_ptr.base->name = (val); \
+         } else { \
+             (handle)->volinfo_ptr.ext->name = (val); \
+         } \
+     } while(0)
+ 
+ /**
+  * get pointer to appropriate offset of field in on-wire structure.
+  */
+ #define VOLINT_INFO_PTR(handle, name) \
+     (((handle)->volinfo_type == VOLINT_INFO_TYPE_BASE) ? \
+      &((handle)->volinfo_ptr.base->name) : \
+      &((handle)->volinfo_ptr.ext->name))
+ 
+ /**
+  * fill in appropriate type of on-wire volume metadata structure.
+  *
+  * @param vp      pointer to volume object
+  * @param hdr     pointer to volume disk data object
+  * @param handle  pointer to wire format handle object
+  *
+  * @pre handle object must have a valid pointer and enumeration value
+  *
+  * @return operation status
+  *   @retval 0 success
+  *   @retval 1 failure
+  */
+ static int
+ FillVolInfo(Volume * vp, VolumeDiskData * hdr, volint_info_handle_t * handle)
+ {
+     unsigned int numStatBytes, now;
+ 
+     /*read in the relevant info */
+     strcpy(VOLINT_INFO_PTR(handle, name), hdr->name);
+     VOLINT_INFO_STORE(handle, status, VOK);	/*its ok */
+     VOLINT_INFO_STORE(handle, volid, hdr->id);
+     VOLINT_INFO_STORE(handle, type, hdr->type);	/*if ro volume */
+     VOLINT_INFO_STORE(handle, cloneID, hdr->cloneId);	/*if rw volume */
+     VOLINT_INFO_STORE(handle, backupID, hdr->backupId);
+     VOLINT_INFO_STORE(handle, parentID, hdr->parentId);
+     VOLINT_INFO_STORE(handle, copyDate, hdr->copyDate);
+     VOLINT_INFO_STORE(handle, size, hdr->diskused);
+     VOLINT_INFO_STORE(handle, maxquota, hdr->maxquota);
+     VOLINT_INFO_STORE(handle, filecount, hdr->filecount);
+     now = FT_ApproxTime();
+     if ((now - hdr->dayUseDate) > OneDay) {
+ 	VOLINT_INFO_STORE(handle, dayUse, 0);
+     } else {
+ 	VOLINT_INFO_STORE(handle, dayUse, hdr->dayUse);
+     }
+     VOLINT_INFO_STORE(handle, creationDate, hdr->creationDate);
+     VOLINT_INFO_STORE(handle, accessDate, hdr->accessDate);
+     VOLINT_INFO_STORE(handle, updateDate, hdr->updateDate);
+     VOLINT_INFO_STORE(handle, backupDate, hdr->backupDate);
+ 
+ #ifdef AFS_DEMAND_ATTACH_FS
+     /*
+      * for DAFS, we "lie" about volume state --
+      * instead of returning the raw state from the disk header,
+      * we compute state based upon the fileserver's internal
+      * in-core state enumeration value reported to us via fssync,
+      * along with the blessed and inService flags from the header.
+      *   -- tkeiser 11/27/2007
+      */
+     if ((V_attachState(vp) == VOL_STATE_UNATTACHED) ||
+ 	VIsErrorState(V_attachState(vp)) ||
+ 	!hdr->inService ||
+ 	!hdr->blessed) {
+ 	VOLINT_INFO_STORE(handle, inUse, 0);
+     } else {
+ 	VOLINT_INFO_STORE(handle, inUse, 1);
+     }
+ #else
+     VOLINT_INFO_STORE(handle, inUse, hdr->inUse);
+ #endif
+ 
+ 
+     switch(handle->volinfo_type) {
+     case VOLINT_INFO_TYPE_BASE:
+ 
+ #ifdef AFS_DEMAND_ATTACH_FS
+ 	/* see comment above where we set inUse bit */
+ 	if (hdr->needsSalvaged || VIsErrorState(V_attachState(vp))) {
+ 	    handle->volinfo_ptr.base->needsSalvaged = 1;
+ 	} else {
+ 	    handle->volinfo_ptr.base->needsSalvaged = 0;
+ 	}
+ #else
+ 	handle->volinfo_ptr.base->needsSalvaged = hdr->needsSalvaged;
+ #endif
+ 	handle->volinfo_ptr.base->destroyMe = hdr->destroyMe;
+ 	handle->volinfo_ptr.base->spare0 = hdr->minquota;
+ 	handle->volinfo_ptr.base->spare1 = 
+ 	    (long)hdr->weekUse[0] +
+ 	    (long)hdr->weekUse[1] +
+ 	    (long)hdr->weekUse[2] +
+ 	    (long)hdr->weekUse[3] +
+ 	    (long)hdr->weekUse[4] +
+ 	    (long)hdr->weekUse[5] +
+ 	    (long)hdr->weekUse[6];
+ 	handle->volinfo_ptr.base->flags = 0;
+ 	handle->volinfo_ptr.base->spare2 = hdr->volUpdateCounter;
+ 	handle->volinfo_ptr.base->spare3 = 0;
+ 	break;
+ 
+ 
+     case VOLINT_INFO_TYPE_EXT:
+ 	numStatBytes =
+ 	    4 * ((2 * VOLINT_STATS_NUM_RWINFO_FIELDS) +
+ 		 (4 * VOLINT_STATS_NUM_TIME_FIELDS));
+ 
+ 	/*
+ 	 * Copy out the stat fields in a single operation.
+ 	 */
+ 	if ((now - hdr->dayUseDate) > OneDay) {
+ 	    memset((char *)&(handle->volinfo_ptr.ext->stat_reads[0]),
+ 		   0, numStatBytes);
+ 	} else {
+ 	    memcpy((char *)&(handle->volinfo_ptr.ext->stat_reads[0]),
+ 		   (char *)&(hdr->stat_reads[0]), 
+ 		   numStatBytes);
+ 	}
+ 	break;
+     }
+ 
+     return 0;
+ }
+ 
+ /**
+  * get struct Volume out of the fileserver.
+  *
+  * @param[in] volumeId  volumeId for which we want state information
+  * @param[out] vp       pointer to Volume object
+  *
+  * @return operation status
+  *   @retval 0 success
+  *   @retval nonzero failure
+  */
+ static int
+ GetVolObject(afs_uint32 volumeId, Volume * vp)
+ {
+     int code;
+     SYNC_response res;
+ 
+     res.hdr.response_len = sizeof(res.hdr);
+     res.payload.buf = vp;
+     res.payload.len = sizeof(*vp);
+ 
+     code = FSYNC_VolOp(volumeId,
+ 		       "",
+ 		       FSYNC_VOL_QUERY,
+ 		       0,
+ 		       &res);
+ 
+     return code;
+ }
+ 
+ /**
+  * mode of volume list operation.
+  */
+ typedef enum {
+     VOL_INFO_LIST_SINGLE,   /**< performing a single volume list op */
+     VOL_INFO_LIST_MULTIPLE  /**< performing a multi-volume list op */
+ } vol_info_list_mode_t;
+ 
+ /**
+  * abstract interface to populate wire-format volume metadata structures.
+  *
+  * @param[in]  partId    partition id
+  * @param[in]  volumeId  volume id
+  * @param[in]  pname     partition name
+  * @param[in]  volname   volume file name
+  * @param[in]  handle    handle to on-wire volume metadata object
+  * @param[in]  mode      listing mode
+  *
+  * @return operation status
+  *   @retval 0      success
+  *   @retval -2     DESTROY_ME flag is set
+  *   @retval -1     general failure; some data filled in
+  *   @retval -3     couldn't create vtrans; some data filled in
+  */
+ static int
+ GetVolInfo(afs_uint32 partId,
+ 	   afs_uint32 volumeId,
+ 	   char * pname, 
+ 	   char * volname, 
+ 	   volint_info_handle_t * handle,
+ 	   vol_info_list_mode_t mode)
+ {
+     int code = -1;
+     afs_int32 error;
+     struct volser_trans *ttc = NULL;
+     struct Volume fs_tv, *tv = NULL;
+ 
+     ttc = NewTrans(volumeId, partId);
+     if (!ttc) {
+ 	code = -3;
+ 	VOLINT_INFO_STORE(handle, status, VBUSY);
+ 	VOLINT_INFO_STORE(handle, volid, volumeId);
+ 	goto drop;
+     }
+ 
+     tv = VAttachVolumeByName(&error, pname, volname, V_PEEK);
+     if (error) {
+ 	Log("1 Volser: GetVolInfo: Could not attach volume %u (%s:%s) error=%d\n", 
+ 	    volumeId, pname, volname, error);
+ 	goto drop;
+     }
+ 
+     /*
+      * please note that destroyMe and needsSalvaged checks used to be ordered
+      * in the opposite manner for ListVolumes and XListVolumes.  I think it's
+      * more correct to check destroyMe before needsSalvaged.
+      *   -- tkeiser 11/28/2007
+      */
+ 
+     if (tv->header->diskstuff.destroyMe == DESTROY_ME) {
+ 	switch (mode) {
+ 	case VOL_INFO_LIST_MULTIPLE:
+ 	    code = -2;
+ 	    goto drop;
+ 
+ 	case VOL_INFO_LIST_SINGLE:
+ 	    Log("1 Volser: GetVolInfo: Volume %u (%s:%s) will be destroyed on next salvage\n", 
+ 		volumeId, pname, volname);
+ 
+ 	default:
+ 	    goto drop;
+ 	}
+     }
+ 
+     if (tv->header->diskstuff.needsSalvaged) {
+ 	/*this volume will be salvaged */
+ 	Log("1 Volser: GetVolInfo: Volume %u (%s:%s) needs to be salvaged\n", 
+ 	    volumeId, pname, volname);
+ 	goto drop;
+     }
+ 
+ #ifdef AFS_DEMAND_ATTACH_FS
+     if (GetVolObject(volumeId, &fs_tv)) {
+ 	goto drop;
+     }
+ #endif
+ 
+     /* ok, we have all the data we need; fill in the on-wire struct */
+     code = FillVolInfo(&fs_tv, &tv->header->diskstuff, handle);
+ 
+ 
+  drop:
+     if (code == -1) {
+ 	VOLINT_INFO_STORE(handle, status, 0);
+ 	strcpy(VOLINT_INFO_PTR(handle, name), volname);
+ 	VOLINT_INFO_STORE(handle, volid, volumeId);
+     }
+     if (tv) {
+ 	VDetachVolume(&error, tv);
+ 	tv = NULL;
+ 	if (error) {
+ 	    VOLINT_INFO_STORE(handle, status, 0);
+ 	    strcpy(VOLINT_INFO_PTR(handle, name), volname);
+ 	    Log("1 Volser: GetVolInfo: Could not detach volume %u (%s:%s)\n",
+ 		volumeId, pname, volname);
+ 	}
+     }
+     if (ttc) {
+ 	DeleteTrans(ttc, 1);
+ 	ttc = NULL;
+     }
+     return code;
+ }
+ 
+ 
  /*return the header information about the <volid> */
  afs_int32
  SAFSVolListOneVolume(struct rx_call *acid, afs_int32 partid, afs_int32 
***************
*** 1757,1771 ****
  		     volumeId, volEntries *volumeInfo)
  {
      volintInfo *pntr;
-     register struct Volume *tv;
      struct DiskPartition *partP;
-     struct volser_trans *ttc;
      char pname[9], volname[20];
      afs_int32 error = 0;
      DIR *dirp;
      afs_int32 volid;
      int found = 0;
      unsigned int now;
  
      volumeInfo->volEntries_val = (volintInfo *) malloc(sizeof(volintInfo));
      pntr = volumeInfo->volEntries_val;
--- 2058,2072 ----
  		     volumeId, volEntries *volumeInfo)
  {
      volintInfo *pntr;
      struct DiskPartition *partP;
      char pname[9], volname[20];
      afs_int32 error = 0;
      DIR *dirp;
      afs_int32 volid;
      int found = 0;
      unsigned int now;
+     int code;
+     volint_info_handle_t handle;
  
      volumeInfo->volEntries_val = (volintInfo *) malloc(sizeof(volintInfo));
      pntr = volumeInfo->volEntries_val;
***************
*** 1777,1785 ****
      dirp = opendir(VPartitionPath(partP));
      if (dirp == NULL)
  	return VOLSERILLEGAL_PARTITION;
      strcpy(volname, "");
-     ttc = (struct volser_trans *)0;
-     tv = (Volume *) 0;		/* volume not attached */
  
      while (strcmp(volname, "EOD") && !found) {	/*while there are more volumes in the partition */
  
--- 2078,2085 ----
      dirp = opendir(VPartitionPath(partP));
      if (dirp == NULL)
  	return VOLSERILLEGAL_PARTITION;
+ 
      strcpy(volname, "");
  
      while (strcmp(volname, "EOD") && !found) {	/*while there are more volumes in the partition */
  
***************
*** 1790,1892 ****
  
  	if (volid == volumeId) {	/*copy other things too */
  	    found = 1;
! #ifndef AFS_PTHREAD_ENV
! 	    IOMGR_Poll();	/*make sure that the client doesnot time out */
! #endif
! 	    ttc = NewTrans(volid, partid);
! 	    if (!ttc) {
! 		pntr->status = VBUSY;
! 		pntr->volid = volid;
! 		goto drop;
! 	    }
! 	    tv = VAttachVolumeByName(&error, pname, volname, V_PEEK);
! 	    if (error) {
! 		pntr->status = 0;	/*things are messed up */
! 		strcpy(pntr->name, volname);
! 		pntr->volid = volid;
! 		Log("1 Volser: ListVolumes: Could not attach volume %u (%s:%s), error=%d\n", volid, pname, volname, error);
! 		goto drop;
! 	    }
! 	    if (tv->header->diskstuff.destroyMe == DESTROY_ME) {
! 		/*this volume will be salvaged */
! 		pntr->status = 0;
! 		strcpy(pntr->name, volname);
! 		pntr->volid = volid;
! 		Log("1 Volser: ListVolumes: Volume %u (%s) will be destroyed on next salvage\n", volid, volname);
! 		goto drop;
! 	    }
! 
! 	    if (tv->header->diskstuff.needsSalvaged) {
! 		/*this volume will be salvaged */
! 		pntr->status = 0;
! 		strcpy(pntr->name, volname);
! 		pntr->volid = volid;
! 		Log("1 Volser: ListVolumes: Volume %u (%s) needs to be salvaged\n", volid, volname);
! 		goto drop;
! 	    }
! 
! 	    /*read in the relevant info */
! 	    pntr->status = VOK;	/*its ok */
! 	    pntr->volid = tv->header->diskstuff.id;
! 	    strcpy(pntr->name, tv->header->diskstuff.name);
! 	    pntr->type = tv->header->diskstuff.type;	/*if ro volume */
! 	    pntr->cloneID = tv->header->diskstuff.cloneId;	/*if rw volume */
! 	    pntr->backupID = tv->header->diskstuff.backupId;
! 	    pntr->parentID = tv->header->diskstuff.parentId;
! 	    pntr->copyDate = tv->header->diskstuff.copyDate;
! 	    pntr->inUse = tv->header->diskstuff.inUse;
! 	    pntr->size = tv->header->diskstuff.diskused;
! 	    pntr->needsSalvaged = tv->header->diskstuff.needsSalvaged;
! 	    pntr->destroyMe = tv->header->diskstuff.destroyMe;
! 	    pntr->maxquota = tv->header->diskstuff.maxquota;
! 	    pntr->filecount = tv->header->diskstuff.filecount;
! 	    now = FT_ApproxTime();
! 	    if (now - tv->header->diskstuff.dayUseDate > OneDay)
! 		pntr->dayUse = 0;
! 	    else
! 		pntr->dayUse = tv->header->diskstuff.dayUse;
! 	    pntr->creationDate = tv->header->diskstuff.creationDate;
! 	    pntr->accessDate = tv->header->diskstuff.accessDate;
! 	    pntr->updateDate = tv->header->diskstuff.updateDate;
! 	    pntr->backupDate = tv->header->diskstuff.backupDate;
! 	    pntr->spare0 = tv->header->diskstuff.minquota;
! 	    pntr->spare1 =
! 		(long)tv->header->diskstuff.weekUse[0] +
! 		(long)tv->header->diskstuff.weekUse[1] +
! 		(long)tv->header->diskstuff.weekUse[2] +
! 		(long)tv->header->diskstuff.weekUse[3] +
! 		(long)tv->header->diskstuff.weekUse[4] +
! 		(long)tv->header->diskstuff.weekUse[5] +
! 		(long)tv->header->diskstuff.weekUse[6];
! 	    pntr->spare2 = V_volUpCounter(tv);
! 	    pntr->flags = pntr->spare3 = (long)0;
! 	    VDetachVolume(&error, tv);	/*free the volume */
! 	    tv = (Volume *) 0;
! 	    if (error) {
! 		pntr->status = 0;	/*things are messed up */
! 		strcpy(pntr->name, volname);
! 		Log("1 Volser: ListVolumes: Could not detach volume %s\n",
! 		    volname);
! 		goto drop;
! 	    }
  	}
  	GetNextVol(dirp, volname, &volid);
      }
!   drop:
!     if (tv) {
! 	VDetachVolume(&error, tv);
! 	tv = (Volume *) 0;
!     }
!     if (ttc) {
! 	DeleteTrans(ttc, 1);
! 	ttc = (struct volser_trans *)0;
      }
  
      closedir(dirp);
!     if (found)
! 	return 0;
!     else
! 	return ENODEV;
  }
  
  /*------------------------------------------------------------------------
--- 2090,2119 ----
  
  	if (volid == volumeId) {	/*copy other things too */
  	    found = 1;
! 	    break;
  	}
+ 
  	GetNextVol(dirp, volname, &volid);
      }
! 
!     if (found) {
! #ifndef AFS_PTHREAD_ENV
! 	IOMGR_Poll();	/*make sure that the client does not time out */
! #endif
! 
! 	handle.volinfo_type = VOLINT_INFO_TYPE_BASE;
! 	handle.volinfo_ptr.base = volumeInfo->volEntries_val;
! 	
! 	code = GetVolInfo(partid, 
! 			  volid, 
! 			  pname, 
! 			  volname,
! 			  &handle,
! 			  VOL_INFO_LIST_SINGLE);
      }
  
      closedir(dirp);
!     return (found) ? 0 : ENODEV;
  }
  
  /*------------------------------------------------------------------------
***************
*** 1929,1946 ****
  {				/*SAFSVolXListOneVolume */
  
      volintXInfo *xInfoP;	/*Ptr to the extended vol info */
-     register struct Volume *tv;	/*Volume ptr */
-     struct volser_trans *ttc;	/*Volume transaction ptr */
      struct DiskPartition *partP;	/*Ptr to partition */
      char pname[9], volname[20];	/*Partition, volume names */
      afs_int32 error;		/*Error code */
-     afs_int32 code;		/*Return code */
      DIR *dirp;			/*Partition directory ptr */
      afs_int32 currVolID;	/*Current volume ID */
      int found = 0;		/*Did we find the volume we need? */
-     struct VolumeDiskData *volDiskDataP;	/*Ptr to on-disk volume data */
-     int numStatBytes;		/*Num stat bytes to copy per volume */
      unsigned int now;
  
      /*
       * Set up our pointers for action, marking our structure to hold exactly
--- 2156,2170 ----
  {				/*SAFSVolXListOneVolume */
  
      volintXInfo *xInfoP;	/*Ptr to the extended vol info */
      struct DiskPartition *partP;	/*Ptr to partition */
      char pname[9], volname[20];	/*Partition, volume names */
      afs_int32 error;		/*Error code */
      DIR *dirp;			/*Partition directory ptr */
      afs_int32 currVolID;	/*Current volume ID */
      int found = 0;		/*Did we find the volume we need? */
      unsigned int now;
+     int code;
+     volint_info_handle_t handle;
  
      /*
       * Set up our pointers for action, marking our structure to hold exactly
***************
*** 1968,1985 ****
      if (dirp == NULL)
  	return (VOLSERILLEGAL_PARTITION);
  
      /*
       * Sweep through the partition directory, looking for the desired entry.
       * First, of course, figure out how many stat bytes to copy out of each
       * volume.
       */
-     numStatBytes =
- 	4 * ((2 * VOLINT_STATS_NUM_RWINFO_FIELDS) +
- 	     (4 * VOLINT_STATS_NUM_TIME_FIELDS));
-     strcpy(volname, "");
-     ttc = (struct volser_trans *)0;	/*No transaction yet */
-     tv = (Volume *) 0;		/*Volume not yet attached */
- 
      while (strcmp(volname, "EOD") && !found) {
  	/*
  	 * If this is not a volume, move on to the next entry in the
--- 2192,2204 ----
      if (dirp == NULL)
  	return (VOLSERILLEGAL_PARTITION);
  
+     strcpy(volname, "");
+ 
      /*
       * Sweep through the partition directory, looking for the desired entry.
       * First, of course, figure out how many stat bytes to copy out of each
       * volume.
       */
      while (strcmp(volname, "EOD") && !found) {
  	/*
  	 * If this is not a volume, move on to the next entry in the
***************
*** 1997,2118 ****
  	     * doesn't time out) and to set up a transaction on the volume.
  	     */
  	    found = 1;
! #ifndef AFS_PTHREAD_ENV
! 	    IOMGR_Poll();
! #endif
! 	    ttc = NewTrans(currVolID, a_partID);
! 	    if (!ttc) {
! 		/*
! 		 * Couldn't get a transaction on this volume; let our caller
! 		 * know it's busy.
! 		 */
! 		xInfoP->status = VBUSY;
! 		xInfoP->volid = currVolID;
! 		goto drop;
! 	    }
! 
! 	    /*
! 	     * Attach the volume, give up on the volume if we can't.
! 	     */
! 	    tv = VAttachVolumeByName(&error, pname, volname, V_PEEK);
! 	    if (error) {
! 		xInfoP->status = 0;	/*things are messed up */
! 		strcpy(xInfoP->name, volname);
! 		xInfoP->volid = currVolID;
! 		Log("1 Volser: XListOneVolume: Could not attach volume %u\n",
! 		    currVolID);
! 		goto drop;
! 	    }
! 
! 	    /*
! 	     * Also bag out on this volume if it's been marked as needing a
! 	     * salvage or to-be-destroyed.
! 	     */
! 	    volDiskDataP = &(tv->header->diskstuff);
! 	    if (volDiskDataP->destroyMe == DESTROY_ME) {
! 		xInfoP->status = 0;
! 		strcpy(xInfoP->name, volname);
! 		xInfoP->volid = currVolID;
! 		Log("1 Volser: XListOneVolume: Volume %u will be destroyed on next salvage\n", currVolID);
! 		goto drop;
! 	    }
  
! 	    if (volDiskDataP->needsSalvaged) {
! 		xInfoP->status = 0;
! 		strcpy(xInfoP->name, volname);
! 		xInfoP->volid = currVolID;
! 		Log("1 Volser: XListOneVolume: Volume %u needs to be salvaged\n", currVolID);
! 		goto drop;
! 	    }
  
! 	    /*
! 	     * Pull out the desired info and stuff it into the area we'll be
! 	     * returning to our caller.
! 	     */
! 	    strcpy(xInfoP->name, volDiskDataP->name);
! 	    xInfoP->volid = volDiskDataP->id;
! 	    xInfoP->type = volDiskDataP->type;
! 	    xInfoP->backupID = volDiskDataP->backupId;
! 	    xInfoP->parentID = volDiskDataP->parentId;
! 	    xInfoP->cloneID = volDiskDataP->cloneId;
! 	    xInfoP->status = VOK;
! 	    xInfoP->copyDate = volDiskDataP->copyDate;
! 	    xInfoP->inUse = volDiskDataP->inUse;
! 	    xInfoP->creationDate = volDiskDataP->creationDate;
! 	    xInfoP->accessDate = volDiskDataP->accessDate;
! 	    xInfoP->updateDate = volDiskDataP->updateDate;
! 	    xInfoP->backupDate = volDiskDataP->backupDate;
! 	    xInfoP->filecount = volDiskDataP->filecount;
! 	    xInfoP->maxquota = volDiskDataP->maxquota;
! 	    xInfoP->size = volDiskDataP->diskused;
  
! 	    /*
! 	     * Copy out the stat fields in a single operation.
! 	     */
! 	    now = FT_ApproxTime();
! 	    if (now - volDiskDataP->dayUseDate > OneDay) {
! 		xInfoP->dayUse = 0;
! 		memset((char *)&(xInfoP->stat_reads[0]), 0, numStatBytes);
! 	    } else {
! 		xInfoP->dayUse = volDiskDataP->dayUse;
! 		memcpy((char *)&(xInfoP->stat_reads[0]),
! 		   (char *)&(volDiskDataP->stat_reads[0]), numStatBytes);
! 	    }
  
! 	    /*
! 	     * We're done copying.  Detach the volume and iterate (at this
! 	     * point, since we found our volume, we'll then drop out of the
! 	     * loop).
! 	     */
! 	    VDetachVolume(&error, tv);
! 	    tv = (Volume *) 0;
! 	    if (error) {
! 		xInfoP->status = 0;
! 		strcpy(xInfoP->name, volname);
! 		Log("1 Volser: XListOneVolumes Couldn't detach volume %s\n",
! 		    volname);
! 		goto drop;
! 	    }
  
- 	    /*
- 	     * At this point, we're golden.
- 	     */
- 	    code = 0;
- 	}			/*Found desired volume */
- 	GetNextVol(dirp, volname, &currVolID);
-     }
- 
-     /*
-      * Drop the transaction we have for this volume.
-      */
-   drop:
-     if (tv) {
- 	VDetachVolume(&error, tv);
- 	tv = (Volume *) 0;
-     }
-     if (ttc) {
- 	DeleteTrans(ttc, 1);
- 	ttc = (struct volser_trans *)0;
      }
  
      /*
--- 2216,2242 ----
  	     * doesn't time out) and to set up a transaction on the volume.
  	     */
  	    found = 1;
! 	    break;
! 	}			/*Found desired volume */
  
! 	GetNextVol(dirp, volname, &currVolID);
!     }
  
!     if (found) {
! #ifndef AFS_PTHREAD_ENV
! 	IOMGR_Poll();
! #endif
  
! 	handle.volinfo_type = VOLINT_INFO_TYPE_EXT;
! 	handle.volinfo_ptr.ext = a_volumeXInfoP->volXEntries_val;
  
! 	code = GetVolInfo(a_partID,
! 			  a_volID,
! 			  pname,
! 			  volname,
! 			  &handle,
! 			  VOL_INFO_LIST_SINGLE);
  
      }
  
      /*
***************
*** 2120,2127 ****
       * return the proper value.
       */
      closedir(dirp);
!     return (code);
! 
  }				/*SAFSVolXListOneVolume */
  
  /*returns all the volumes on partition partid. If flags = 1 then all the 
--- 2244,2250 ----
       * return the proper value.
       */
      closedir(dirp);
!     return (found) ? 0 : ENODEV;
  }				/*SAFSVolXListOneVolume */
  
  /*returns all the volumes on partition partid. If flags = 1 then all the 
***************
*** 2142,2156 ****
  		   volEntries *volumeInfo)
  {
      volintInfo *pntr;
-     register struct Volume *tv;
      struct DiskPartition *partP;
-     struct volser_trans *ttc;
      afs_int32 allocSize = 1000;	/*to be changed to a larger figure */
      char pname[9], volname[20];
      afs_int32 error = 0;
      DIR *dirp;
      afs_int32 volid;
      unsigned int now;
  
      volumeInfo->volEntries_val =
  	(volintInfo *) malloc(allocSize * sizeof(volintInfo));
--- 2265,2279 ----
  		   volEntries *volumeInfo)
  {
      volintInfo *pntr;
      struct DiskPartition *partP;
      afs_int32 allocSize = 1000;	/*to be changed to a larger figure */
      char pname[9], volname[20];
      afs_int32 error = 0;
      DIR *dirp;
      afs_int32 volid;
      unsigned int now;
+     int code;
+     volint_info_handle_t handle;
  
      volumeInfo->volEntries_val =
  	(volintInfo *) malloc(allocSize * sizeof(volintInfo));
***************
*** 2164,2172 ****
      if (dirp == NULL)
  	return VOLSERILLEGAL_PARTITION;
      strcpy(volname, "");
      while (strcmp(volname, "EOD")) {	/*while there are more partitions in the partition */
- 	ttc = (struct volser_trans *)0;	/* new one for each pass */
- 	tv = (Volume *) 0;	/* volume not attached */
  
  	if (!strcmp(volname, "")) {	/* its not a volume, fetch next file */
  	    GetNextVol(dirp, volname, &volid);
--- 2287,2294 ----
      if (dirp == NULL)
  	return VOLSERILLEGAL_PARTITION;
      strcpy(volname, "");
+ 
      while (strcmp(volname, "EOD")) {	/*while there are more partitions in the partition */
  
  	if (!strcmp(volname, "")) {	/* its not a volume, fetch next file */
  	    GetNextVol(dirp, volname, &volid);
***************
*** 2175,2262 ****
  
  	if (flags) {		/*copy other things too */
  #ifndef AFS_PTHREAD_ENV
! 	    IOMGR_Poll();	/*make sure that the client doesnot time out */
  #endif
- 	    ttc = NewTrans(volid, partid);
- 	    if (!ttc) {
- 		pntr->status = VBUSY;
- 		pntr->volid = volid;
- 		goto drop;
- 	    }
- 	    tv = VAttachVolumeByName(&error, pname, volname, V_PEEK);
- 	    if (error) {
- 		pntr->status = 0;	/*things are messed up */
- 		strcpy(pntr->name, volname);
- 		pntr->volid = volid;
- 		Log("1 Volser: ListVolumes: Could not attach volume %u (%s) error=%d\n", volid, volname, error);
- 		goto drop;
- 	    }
- 	    if (tv->header->diskstuff.needsSalvaged) {
- 		/*this volume will be salvaged */
- 		pntr->status = 0;
- 		strcpy(pntr->name, volname);
- 		pntr->volid = volid;
- 		Log("1 Volser: ListVolumes: Volume %u (%s) needs to be salvaged\n", volid, volname);
- 		goto drop;
- 	    }
  
! 	    if (tv->header->diskstuff.destroyMe == DESTROY_ME) {
! 		/*this volume will be salvaged */
  		goto drop2;
  	    }
- 	    /*read in the relevant info */
- 	    pntr->status = VOK;	/*its ok */
- 	    pntr->volid = tv->header->diskstuff.id;
- 	    strcpy(pntr->name, tv->header->diskstuff.name);
- 	    pntr->type = tv->header->diskstuff.type;	/*if ro volume */
- 	    pntr->cloneID = tv->header->diskstuff.cloneId;	/*if rw volume */
- 	    pntr->backupID = tv->header->diskstuff.backupId;
- 	    pntr->parentID = tv->header->diskstuff.parentId;
- 	    pntr->copyDate = tv->header->diskstuff.copyDate;
- 	    pntr->inUse = tv->header->diskstuff.inUse;
- 	    pntr->size = tv->header->diskstuff.diskused;
- 	    pntr->needsSalvaged = tv->header->diskstuff.needsSalvaged;
- 	    pntr->maxquota = tv->header->diskstuff.maxquota;
- 	    pntr->filecount = tv->header->diskstuff.filecount;
- 	    now = FT_ApproxTime();
- 	    if (now - tv->header->diskstuff.dayUseDate > OneDay)
- 		pntr->dayUse = 0;
- 	    else
- 		pntr->dayUse = tv->header->diskstuff.dayUse;
- 	    pntr->creationDate = tv->header->diskstuff.creationDate;
- 	    pntr->accessDate = tv->header->diskstuff.accessDate;
- 	    pntr->updateDate = tv->header->diskstuff.updateDate;
- 	    pntr->backupDate = tv->header->diskstuff.backupDate;
- 	    pntr->spare0 = tv->header->diskstuff.minquota;
- 	    pntr->spare1 =
- 		(long)tv->header->diskstuff.weekUse[0] +
- 		(long)tv->header->diskstuff.weekUse[1] +
- 		(long)tv->header->diskstuff.weekUse[2] +
- 		(long)tv->header->diskstuff.weekUse[3] +
- 		(long)tv->header->diskstuff.weekUse[4] +
- 		(long)tv->header->diskstuff.weekUse[5] +
- 		(long)tv->header->diskstuff.weekUse[6];
- 	    pntr->spare2 = V_volUpCounter(tv);
- 	    pntr->flags = pntr->spare3 = (long)0;
- 	    VDetachVolume(&error, tv);	/*free the volume */
- 	    tv = (Volume *) 0;
- 	    if (error) {
- 		pntr->status = 0;	/*things are messed up */
- 		strcpy(pntr->name, volname);
- 		Log("1 Volser: ListVolumes: Could not detach volume %s\n",
- 		    volname);
- 		goto drop;
- 	    }
  	} else {
  	    pntr->volid = volid;
  	    /*just volids are needed */
  	}
  
        drop:
- 	if (ttc) {
- 	    DeleteTrans(ttc, 1);
- 	    ttc = (struct volser_trans *)0;
- 	}
  	pntr++;
  	volumeInfo->volEntries_len += 1;
  	if ((allocSize - volumeInfo->volEntries_len) < 5) {
--- 2297,2324 ----
  
  	if (flags) {		/*copy other things too */
  #ifndef AFS_PTHREAD_ENV
! 	    IOMGR_Poll();	/*make sure that the client does not time out */
  #endif
  
! 	    handle.volinfo_type = VOLINT_INFO_TYPE_BASE;
! 	    handle.volinfo_ptr.base = pntr;
! 
! 
! 	    code = GetVolInfo(partid,
! 			      volid,
! 			      pname,
! 			      volname,
! 			      &handle,
! 			      VOL_INFO_LIST_MULTIPLE);
! 	    if (code == -2) { /* DESTROY_ME flag set */
  		goto drop2;
  	    }
  	} else {
  	    pntr->volid = volid;
  	    /*just volids are needed */
  	}
  
        drop:
  	pntr++;
  	volumeInfo->volEntries_len += 1;
  	if ((allocSize - volumeInfo->volEntries_len) < 5) {
***************
*** 2266,2280 ****
  		(volintInfo *) realloc((char *)volumeInfo->volEntries_val,
  				       allocSize * sizeof(volintInfo));
  	    if (pntr == NULL) {
! 		if (tv) {
! 		    VDetachVolume(&error, tv);
! 		    tv = (Volume *) 0;
! 		}
! 		if (ttc) {
! 		    DeleteTrans(ttc, 1);
! 		    ttc = (struct volser_trans *)0;
! 		}
! 		closedir(dirp);
  		return VOLSERNO_MEMORY;
  	    }
  	    volumeInfo->volEntries_val = pntr;	/* point to new block */
--- 2328,2334 ----
  		(volintInfo *) realloc((char *)volumeInfo->volEntries_val,
  				       allocSize * sizeof(volintInfo));
  	    if (pntr == NULL) {
! 		closedir(dirp);	
  		return VOLSERNO_MEMORY;
  	    }
  	    volumeInfo->volEntries_val = pntr;	/* point to new block */
***************
*** 2284,2304 ****
  	}
  
        drop2:
- 	if (tv) {
- 	    VDetachVolume(&error, tv);
- 	    tv = (Volume *) 0;
- 	}
- 	if (ttc) {
- 	    DeleteTrans(ttc, 1);
- 	    ttc = (struct volser_trans *)0;
- 	}
  	GetNextVol(dirp, volname, &volid);
  
      }
-     closedir(dirp);
-     if (ttc)
- 	DeleteTrans(ttc, 1);
  
      return 0;
  }
  
--- 2338,2348 ----
  	}
  
        drop2:
  	GetNextVol(dirp, volname, &volid);
  
      }
  
+     closedir(dirp);
      return 0;
  }
  
***************
*** 2346,2362 ****
  {				/*SAFSVolXListVolumes */
  
      volintXInfo *xInfoP;	/*Ptr to the extended vol info */
-     register struct Volume *tv;	/*Volume ptr */
      struct DiskPartition *partP;	/*Ptr to partition */
-     struct volser_trans *ttc;	/*Volume transaction ptr */
      afs_int32 allocSize = 1000;	/*To be changed to a larger figure */
      char pname[9], volname[20];	/*Partition, volume names */
      afs_int32 error = 0;	/*Return code */
      DIR *dirp;			/*Partition directory ptr */
      afs_int32 volid;		/*Current volume ID */
-     struct VolumeDiskData *volDiskDataP;	/*Ptr to on-disk volume data */
-     int numStatBytes;		/*Num stat bytes to copy per volume */
      unsigned int now;
  
      /*
       * Allocate a large array of extended volume info structures, then
--- 2390,2404 ----
  {				/*SAFSVolXListVolumes */
  
      volintXInfo *xInfoP;	/*Ptr to the extended vol info */
      struct DiskPartition *partP;	/*Ptr to partition */
      afs_int32 allocSize = 1000;	/*To be changed to a larger figure */
      char pname[9], volname[20];	/*Partition, volume names */
      afs_int32 error = 0;	/*Return code */
      DIR *dirp;			/*Partition directory ptr */
      afs_int32 volid;		/*Current volume ID */
      unsigned int now;
+     int code;
+     volint_info_handle_t handle;
  
      /*
       * Allocate a large array of extended volume info structures, then
***************
*** 2382,2399 ****
      dirp = opendir(VPartitionPath(partP));
      if (dirp == NULL)
  	return (VOLSERILLEGAL_PARTITION);
  
      /*
       * Sweep through the partition directory, acting on each entry.  First,
       * of course, figure out how many stat bytes to copy out of each volume.
       */
-     numStatBytes =
- 	4 * ((2 * VOLINT_STATS_NUM_RWINFO_FIELDS) +
- 	     (4 * VOLINT_STATS_NUM_TIME_FIELDS));
-     strcpy(volname, "");
      while (strcmp(volname, "EOD")) {
- 	ttc = (struct volser_trans *)0;	/*New one for each pass */
- 	tv = (Volume *) 0;	/*Volume not yet attached */
  
  	/*
  	 * If this is not a volume, move on to the next entry in the
--- 2424,2436 ----
      dirp = opendir(VPartitionPath(partP));
      if (dirp == NULL)
  	return (VOLSERILLEGAL_PARTITION);
+     strcpy(volname, "");
  
      /*
       * Sweep through the partition directory, acting on each entry.  First,
       * of course, figure out how many stat bytes to copy out of each volume.
       */
      while (strcmp(volname, "EOD")) {
  
  	/*
  	 * If this is not a volume, move on to the next entry in the
***************
*** 2412,2517 ****
  #ifndef AFS_PTHREAD_ENV
  	    IOMGR_Poll();
  #endif
- 	    ttc = NewTrans(volid, a_partID);
- 	    if (!ttc) {
- 		/*
- 		 * Couldn't get a transaction on this volume; let our caller
- 		 * know it's busy.
- 		 */
- 		xInfoP->status = VBUSY;
- 		xInfoP->volid = volid;
- 		goto drop;
- 	    }
- 
- 	    /*
- 	     * Attach the volume, give up on this volume if we can't.
- 	     */
- 	    tv = VAttachVolumeByName(&error, pname, volname, V_PEEK);
- 	    if (error) {
- 		xInfoP->status = 0;	/*things are messed up */
- 		strcpy(xInfoP->name, volname);
- 		xInfoP->volid = volid;
- 		Log("1 Volser: XListVolumes: Could not attach volume %u\n",
- 		    volid);
- 		goto drop;
- 	    }
  
! 	    /*
! 	     * Also bag out on this volume if it's been marked as needing a
! 	     * salvage or to-be-destroyed.
! 	     */
! 	    volDiskDataP = &(tv->header->diskstuff);
! 	    if (volDiskDataP->needsSalvaged) {
! 		xInfoP->status = 0;
! 		strcpy(xInfoP->name, volname);
! 		xInfoP->volid = volid;
! 		Log("1 Volser: XListVolumes: Volume %u needs to be salvaged\n", volid);
! 		goto drop;
! 	    }
  
! 	    if (volDiskDataP->destroyMe == DESTROY_ME)
  		goto drop2;
- 
- 	    /*
- 	     * Pull out the desired info and stuff it into the area we'll be
- 	     * returning to our caller.
- 	     */
- 	    strcpy(xInfoP->name, volDiskDataP->name);
- 	    xInfoP->volid = volDiskDataP->id;
- 	    xInfoP->type = volDiskDataP->type;
- 	    xInfoP->backupID = volDiskDataP->backupId;
- 	    xInfoP->parentID = volDiskDataP->parentId;
- 	    xInfoP->cloneID = volDiskDataP->cloneId;
- 	    xInfoP->status = VOK;
- 	    xInfoP->copyDate = volDiskDataP->copyDate;
- 	    xInfoP->inUse = volDiskDataP->inUse;
- 	    xInfoP->creationDate = volDiskDataP->creationDate;
- 	    xInfoP->accessDate = volDiskDataP->accessDate;
- 	    xInfoP->updateDate = volDiskDataP->updateDate;
- 	    xInfoP->backupDate = volDiskDataP->backupDate;
- 	    now = FT_ApproxTime();
- 	    if (now - volDiskDataP->dayUseDate > OneDay)
- 		xInfoP->dayUse = 0;
- 	    else
- 		xInfoP->dayUse = volDiskDataP->dayUse;
- 	    xInfoP->filecount = volDiskDataP->filecount;
- 	    xInfoP->maxquota = volDiskDataP->maxquota;
- 	    xInfoP->size = volDiskDataP->diskused;
- 
- 	    /*
- 	     * Copy out the stat fields in a single operation.
- 	     */
- 	    memcpy((char *)&(xInfoP->stat_reads[0]),
- 		   (char *)&(volDiskDataP->stat_reads[0]), numStatBytes);
- 
- 	    /*
- 	     * We're done copying.  Detach the volume and iterate.
- 	     */
- 	    VDetachVolume(&error, tv);
- 	    tv = (Volume *) 0;
- 	    if (error) {
- 		xInfoP->status = 0;
- 		strcpy(xInfoP->name, volname);
- 		Log("1 Volser: XListVolumes: Could not detach volume %s\n",
- 		    volname);
- 		goto drop;
  	    }
! 	} /*Full contents desired */
! 	else
  	    /*
  	     * Just volume IDs are needed.
  	     */
  	    xInfoP->volid = volid;
- 
-       drop:
- 	/*
- 	 * Drop the transaction we have for this volume.
- 	 */
- 	if (ttc) {
- 	    DeleteTrans(ttc, 1);
- 	    ttc = (struct volser_trans *)0;
  	}
  
  	/*
  	 * Bump the pointer in the data area we're building, along with
  	 * the count of the number of entries it contains.
--- 2449,2475 ----
  #ifndef AFS_PTHREAD_ENV
  	    IOMGR_Poll();
  #endif
  
! 	    handle.volinfo_type = VOLINT_INFO_TYPE_EXT;
! 	    handle.volinfo_ptr.ext = xInfoP;
  
! 	    code = GetVolInfo(a_partID,
! 			      volid,
! 			      pname,
! 			      volname,
! 			      &handle,
! 			      VOL_INFO_LIST_MULTIPLE);
! 	    if (code == -2) { /* DESTROY_ME flag set */
  		goto drop2;
  	    }
! 	} else {
  	    /*
  	     * Just volume IDs are needed.
  	     */
  	    xInfoP->volid = volid;
  	}
  
+       drop:
  	/*
  	 * Bump the pointer in the data area we're building, along with
  	 * the count of the number of entries it contains.
***************
*** 2530,2543 ****
  		/*
  		 * Bummer, no memory. Bag it, tell our caller what went wrong.
  		 */
- 		if (tv) {
- 		    VDetachVolume(&error, tv);
- 		    tv = (Volume *) 0;
- 		}
- 		if (ttc) {
- 		    DeleteTrans(ttc, 1);
- 		    ttc = (struct volser_trans *)0;
- 		}
  		closedir(dirp);
  		return (VOLSERNO_MEMORY);
  	    }
--- 2488,2493 ----
***************
*** 2552,2571 ****
  		a_volumeXInfoP->volXEntries_val +
  		a_volumeXInfoP->volXEntries_len;
  	}
! 	/*Need more space */
        drop2:
- 	/*
- 	 * Detach our current volume and the transaction on it, then move on
- 	 * to the next volume in the partition directory.
- 	 */
- 	if (tv) {
- 	    VDetachVolume(&error, tv);
- 	    tv = (Volume *) 0;
- 	}
- 	if (ttc) {
- 	    DeleteTrans(ttc, 1);
- 	    ttc = (struct volser_trans *)0;
- 	}
  	GetNextVol(dirp, volname, &volid);
      }				/*Sweep through the partition directory */
  
--- 2502,2509 ----
  		a_volumeXInfoP->volXEntries_val +
  		a_volumeXInfoP->volXEntries_len;
  	}
! 
        drop2:
  	GetNextVol(dirp, volname, &volid);
      }				/*Sweep through the partition directory */
  
***************
*** 2574,2581 ****
       * delete our transaction (if any), and go home happy.
       */
      closedir(dirp);
-     if (ttc)
- 	DeleteTrans(ttc, 1);
      return (0);
  
  }				/*SAFSVolXListVolumes */
--- 2512,2517 ----
Index: openafs/src/volser/volser.p.h
diff -c openafs/src/volser/volser.p.h:1.10 openafs/src/volser/volser.p.h:1.10.2.1
*** openafs/src/volser/volser.p.h:1.10	Fri Mar 17 14:54:56 2006
--- openafs/src/volser/volser.p.h	Mon Jan 21 09:33:29 2008
***************
*** 158,175 ****
  
  /* Values for the UV_RestoreVolume flags parameter */
  /* Also used for UV_CopyVolume and UV_CloneVolume */
! #define RV_FULLRST	0x00001
! #define RV_OFFLINE	0x00002
! #define RV_CRDUMP	0x00010
! #define RV_CRKEEP	0x00020
! #define RV_CRNEW	0x00040
! #define RV_LUDUMP	0x00100
! #define RV_LUKEEP	0x00200
! #define RV_LUNEW	0x00400
! #define RV_RDONLY	0x10000
! #define RV_CPINCR	0x20000
! #define RV_NOVLDB	0x40000
! #define RV_NOCLONE	0x80000
  
  struct ubik_client;
  extern afs_uint32 vsu_GetVolumeID(char *astring, struct ubik_client *acstruct, afs_int32 *errp);
--- 158,176 ----
  
  /* Values for the UV_RestoreVolume flags parameter */
  /* Also used for UV_CopyVolume and UV_CloneVolume */
! #define RV_FULLRST	0x000001
! #define RV_OFFLINE	0x000002
! #define RV_CRDUMP	0x000010
! #define RV_CRKEEP	0x000020
! #define RV_CRNEW	0x000040
! #define RV_LUDUMP	0x000100
! #define RV_LUKEEP	0x000200
! #define RV_LUNEW	0x000400
! #define RV_RDONLY	0x010000
! #define RV_CPINCR	0x020000
! #define RV_NOVLDB	0x040000
! #define RV_NOCLONE	0x080000
! #define RV_NODEL        0x100000
  
  struct ubik_client;
  extern afs_uint32 vsu_GetVolumeID(char *astring, struct ubik_client *acstruct, afs_int32 *errp);
Index: openafs/src/volser/volser_prototypes.h
diff -c openafs/src/volser/volser_prototypes.h:1.5.8.1 openafs/src/volser/volser_prototypes.h:1.5.8.2
*** openafs/src/volser/volser_prototypes.h:1.5.8.1	Thu Jul 19 14:52:14 2007
--- openafs/src/volser/volser_prototypes.h	Mon Jan 21 09:33:29 2008
***************
*** 52,58 ****
  			    afs_int32 tovolid, char tovolname[], int flags,
  			    afs_int32(*WriteData) (), char *rock);
  extern int UV_LockRelease(afs_int32 volid);
! extern int UV_AddSite(afs_int32 server, afs_int32 part, afs_int32 volid);
  extern int UV_RemoveSite(afs_int32 server, afs_int32 part, afs_int32 volid);
  extern int UV_ChangeLocation(afs_int32 server, afs_int32 part,
  			     afs_int32 volid);
--- 52,58 ----
  			    afs_int32 tovolid, char tovolname[], int flags,
  			    afs_int32(*WriteData) (), char *rock);
  extern int UV_LockRelease(afs_int32 volid);
! extern int UV_AddSite(afs_int32 server, afs_int32 part, afs_int32 volid, afs_int32 valid);
  extern int UV_RemoveSite(afs_int32 server, afs_int32 part, afs_int32 volid);
  extern int UV_ChangeLocation(afs_int32 server, afs_int32 part,
  			     afs_int32 volid);
Index: openafs/src/volser/vos.c
diff -c openafs/src/volser/vos.c:1.55.2.9 openafs/src/volser/vos.c:1.55.2.12
*** openafs/src/volser/vos.c:1.55.2.9	Wed Oct 31 00:09:46 2007
--- openafs/src/volser/vos.c	Sun Feb 10 22:44:23 2008
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/vos.c,v 1.55.2.9 2007/10/31 04:09:46 shadow Exp $");
  
  #include <sys/types.h>
  #include <string.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/vos.c,v 1.55.2.12 2008/02/11 03:44:23 shadow Exp $");
  
  #include <sys/types.h>
  #include <string.h>
***************
*** 2623,2634 ****
--- 2623,2640 ----
  		volname, VOLSER_OLDMAXVOLNAME - 1);
  	    return E2BIG;
  	}
+ #if 0
+ 	/* 
+ 	 * In order that you be able to make clones of RO or BK, this
+ 	 * check must be omitted.
+ 	 */
  	if (!VolNameOK(volname)) {
  	    fprintf(STDERR,
  		"Illegal volume name %s, should not end in .readonly or .backup\n",
  		volname);
  	    return EINVAL;
  	}
+ #endif
  	if (IsNumeric(volname)) {
  	    fprintf(STDERR,
  		"Illegal volume name %s, should not be a number\n",
***************
*** 2663,2669 ****
  	return code;
      }
      MapPartIdIntoName(part, partName);
!     fprintf(STDOUT, "Created clone for volume %lu\n",
  	    as->parms[0].items->data);
  
      return 0;
--- 2669,2675 ----
  	return code;
      }
      MapPartIdIntoName(part, partName);
!     fprintf(STDOUT, "Created clone for volume %s\n",
  	    as->parms[0].items->data);
  
      return 0;
***************
*** 3154,3159 ****
--- 3160,3169 ----
  	default:
  	    restoreflags |= RV_LUDUMP;
      }
+     if (as->parms[10].items) {
+ 	restoreflags |= RV_NODEL;
+     }
+     
  
      code =
  	UV_RestoreVolume2(aserver, apart, avolid, aparentid,
***************
*** 3201,3207 ****
  static int
  AddSite(register struct cmd_syndesc *as, void *arock)
  {
!     afs_int32 avolid, aserver, apart, code, err;
      char apartName[10], avolname[VOLSER_MAXVOLNAME + 1];
  
      vsu_ExtractName(avolname, as->parms[2].items->data);;
--- 3211,3217 ----
  static int
  AddSite(register struct cmd_syndesc *as, void *arock)
  {
!     afs_int32 avolid, aserver, apart, code, err, valid = 0;
      char apartName[10], avolname[VOLSER_MAXVOLNAME + 1];
  
      vsu_ExtractName(avolname, as->parms[2].items->data);;
***************
*** 3235,3241 ****
  		    as->parms[1].items->data);
  	exit(1);
      }
!     code = UV_AddSite(aserver, apart, avolid);
      if (code) {
  	PrintDiagnostics("addsite", code);
  	exit(1);
--- 3245,3254 ----
  		    as->parms[1].items->data);
  	exit(1);
      }
!     if (as->parms[3].items) {
! 	valid = 1;
!     }
!     code = UV_AddSite(aserver, apart, avolid, valid);
      if (code) {
  	PrintDiagnostics("addsite", code);
  	exit(1);
***************
*** 3707,3712 ****
--- 3720,3729 ----
  	}
      }
  
+     if (as->parms[3].items) {
+ 	flags |= 2; /* don't update */
+     }
+ 
      if (as->parms[2].items) {
  	/* Synchronize an individual volume */
  	volname = as->parms[2].items->data;
***************
*** 3733,3739 ****
      if (tserver) {
  	fprintf(STDOUT, " with state of server %s", as->parms[0].items->data);
      }
!     if (flags) {
  	MapPartIdIntoName(pnum, part);
  	fprintf(STDOUT, " partition %s\n", part);
      }
--- 3750,3756 ----
      if (tserver) {
  	fprintf(STDOUT, " with state of server %s", as->parms[0].items->data);
      }
!     if (flags & 1) {
  	MapPartIdIntoName(pnum, part);
  	fprintf(STDOUT, " partition %s\n", part);
      }
***************
*** 3777,3788 ****
          pnum = -1;
      }
  
      code = UV_SyncServer(tserver, pnum, flags, 0 /*unused */ );
      if (code) {
  	PrintDiagnostics("syncserv", code);
  	exit(1);
      }
!     if (flags) {
  	MapPartIdIntoName(pnum, part);
  	fprintf(STDOUT, "Server %s partition %s synchronized with VLDB\n",
  		as->parms[0].items->data, part);
--- 3794,3808 ----
          pnum = -1;
      }
  
+     if (as->parms[2].items) {
+ 	flags |= 2; /* don't update */
+     }
      code = UV_SyncServer(tserver, pnum, flags, 0 /*unused */ );
      if (code) {
  	PrintDiagnostics("syncserv", code);
  	exit(1);
      }
!     if (flags & 1) {
  	MapPartIdIntoName(pnum, part);
  	fprintf(STDOUT, "Server %s partition %s synchronized with VLDB\n",
  		as->parms[0].items->data, part);
***************
*** 5795,5800 ****
--- 5815,5822 ----
  		"dump | keep | new");
      cmd_AddParm(ts, "-lastupdate", CMD_SINGLE, CMD_OPTIONAL,
  		"dump | keep | new");
+     cmd_AddParm(ts, "-nodelete", CMD_FLAG, CMD_OPTIONAL,
+ 		"do not delete old site when restoring to a new site");
      COMMONPARMS;
  
      ts = cmd_CreateSyntax("unlock", LockReleaseCmd, NULL,
***************
*** 5816,5821 ****
--- 5838,5844 ----
      cmd_AddParm(ts, "-partition", CMD_SINGLE, 0,
  		"partition name for new site");
      cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
+     cmd_AddParm(ts, "-valid", CMD_FLAG, CMD_OPTIONAL | CMD_HIDE, "publish as an up-to-date site in VLDB");
      COMMONPARMS;
  
      ts = cmd_CreateSyntax("remsite", RemoveSite, NULL,
***************
*** 5851,5862 ****
--- 5874,5887 ----
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
      cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_OPTIONAL, "volume name or ID");
+     cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL, "report without updating");
      COMMONPARMS;
  
      ts = cmd_CreateSyntax("syncserv", SyncServer, NULL,
  			  "synchronize server with VLDB");
      cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
+     cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL, "report without updating");
      COMMONPARMS;
  
      ts = cmd_CreateSyntax("examine", ExamineVolume, NULL,
Index: openafs/src/volser/vsprocs.c
diff -c openafs/src/volser/vsprocs.c:1.38.2.10 openafs/src/volser/vsprocs.c:1.38.2.13
*** openafs/src/volser/vsprocs.c:1.38.2.10	Tue Dec 18 10:16:31 2007
--- openafs/src/volser/vsprocs.c	Sun Feb 10 22:44:24 2008
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/vsprocs.c,v 1.38.2.10 2007/12/18 15:16:31 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/vsprocs.c,v 1.38.2.13 2008/02/11 03:44:24 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
***************
*** 4079,4084 ****
--- 4079,4085 ----
      struct volser_status tstatus;
      struct volintInfo vinfo;
      char partName[10];
+     char tovolreal[VOLSER_OLDMAXVOLNAME];
      afs_int32 pvolid, pparentid;
      afs_int32 temptid;
      int success;
***************
*** 4150,4167 ****
      }
      if (!pparentid) pparentid = pvolid;
      /* at this point we have a volume id to use/reuse for the volume to be restored */
      if (strlen(tovolname) > (VOLSER_OLDMAXVOLNAME - 1)) {
  	EGOTO1(refail, VOLSERBADOP,
  	       "The volume name %s exceeds the maximum limit of (VOLSER_OLDMAXVOLNAME -1 ) bytes\n",
  	       tovolname);
      }
      MapPartIdIntoName(topart, partName);
      fprintf(STDOUT, "Restoring volume %s Id %lu on server %s partition %s ..",
! 	    tovolname, (unsigned long)pvolid,
  	    hostutil_GetNameByINet(toserver), partName);
      fflush(STDOUT);
      code =
! 	AFSVolCreateVolume(toconn, topart, tovolname, volsertype, pparentid, &pvolid,
  			   &totid);
      if (code) {
  	if (flags & RV_FULLRST) {	/* full restore: delete then create anew */
--- 4151,4178 ----
      }
      if (!pparentid) pparentid = pvolid;
      /* at this point we have a volume id to use/reuse for the volume to be restored */
+     strncpy(tovolreal, tovolname, VOLSER_OLDMAXVOLNAME);
+ 	    
      if (strlen(tovolname) > (VOLSER_OLDMAXVOLNAME - 1)) {
  	EGOTO1(refail, VOLSERBADOP,
  	       "The volume name %s exceeds the maximum limit of (VOLSER_OLDMAXVOLNAME -1 ) bytes\n",
  	       tovolname);
+     } else {
+ 	if ((pparentid != pvolid) && (flags & RV_RDONLY)) {
+ 	    if (strlen(tovolname) > (VOLSER_OLDMAXVOLNAME - 10)) {
+ 		EGOTO1(refail, VOLSERBADOP,
+ 		       "The volume name %s exceeds the maximum limit of (VOLSER_OLDMAXVOLNAME -1 ) bytes\n", tovolname);
+ 	    }
+ 	    snprintf(tovolreal, VOLSER_OLDMAXVOLNAME, "%s.readonly", tovolname);
+ 	}
      }
      MapPartIdIntoName(topart, partName);
      fprintf(STDOUT, "Restoring volume %s Id %lu on server %s partition %s ..",
! 	    tovolreal, (unsigned long)pvolid,
  	    hostutil_GetNameByINet(toserver), partName);
      fflush(STDOUT);
      code =
! 	AFSVolCreateVolume(toconn, topart, tovolreal, volsertype, pparentid, &pvolid,
  			   &totid);
      if (code) {
  	if (flags & RV_FULLRST) {	/* full restore: delete then create anew */
***************
*** 4197,4203 ****
  	    VDONE;
  
  	    code =
! 		AFSVolCreateVolume(toconn, topart, tovolname, volsertype, pparentid,
  				   &pvolid, &totid);
  	    EGOTO1(refail, code, "Could not create new volume %u\n", pvolid);
  	} else {
--- 4208,4214 ----
  	    VDONE;
  
  	    code =
! 		AFSVolCreateVolume(toconn, topart, tovolreal, volsertype, pparentid,
  				   &pvolid, &totid);
  	    EGOTO1(refail, code, "Could not create new volume %u\n", pvolid);
  	} else {
***************
*** 4221,4227 ****
      cookie.parent = pparentid;
      cookie.type = voltype;
      cookie.clone = 0;
!     strncpy(cookie.name, tovolname, VOLSER_OLDMAXVOLNAME);
  
      tocall = rx_NewCall(toconn);
      terror = StartAFSVolRestore(tocall, totid, 1, &cookie);
--- 4232,4238 ----
      cookie.parent = pparentid;
      cookie.type = voltype;
      cookie.clone = 0;
!     strncpy(cookie.name, tovolreal, VOLSER_OLDMAXVOLNAME);
  
      tocall = rx_NewCall(toconn);
      terror = StartAFSVolRestore(tocall, totid, 1, &cookie);
***************
*** 4251,4257 ****
  	error = code;
  	goto refail;
      }
!     code = AFSVolSetIdsTypes(toconn, totid, tovolname, voltype, pparentid, 0, 0);
      if (code) {
  	fprintf(STDERR, "Could not set the right type and ID on %lu\n",
  		(unsigned long)pvolid);
--- 4262,4268 ----
  	error = code;
  	goto refail;
      }
!     code = AFSVolSetIdsTypes(toconn, totid, tovolreal, voltype, pparentid, 0, 0);
      if (code) {
  	fprintf(STDERR, "Could not set the right type and ID on %lu\n",
  		(unsigned long)pvolid);
***************
*** 4405,4459 ****
  			    toserver, errcode);
  		if ((!errcode && !same)
  		    || (entry.serverPartition[index] != topart)) {
! 		    tempconn =
! 			UV_Bind(entry.serverNumber[index],
! 				AFSCONF_VOLUMEPORT);
! 
! 		    MapPartIdIntoName(entry.serverPartition[index],
! 				      apartName);
! 		    VPRINT3
! 			("Deleting the previous volume %u on server %s, partition %s ...",
! 			 pvolid,
! 			 hostutil_GetNameByINet(entry.serverNumber[index]),
! 			 apartName);
! 		    code =
! 			AFSVolTransCreate(tempconn, pvolid,
! 					  entry.serverPartition[index],
! 					  ITOffline, &temptid);
! 		    if (!code) {
  			code =
! 			    AFSVolSetFlags(tempconn, temptid,
! 					   VTDeleteOnSalvage |
! 					   VTOutOfService);
! 			if (code) {
! 			    fprintf(STDERR,
! 				    "Could not set flags on volume %lu on the older site\n",
! 				    (unsigned long)pvolid);
! 			    error = code;
! 			    goto refail;
! 			}
! 			code = AFSVolDeleteVolume(tempconn, temptid);
! 			if (code) {
! 			    fprintf(STDERR,
! 				    "Could not delete volume %lu on the older site\n",
! 				    (unsigned long)pvolid);
! 			    error = code;
! 			    goto refail;
! 			}
! 			code = AFSVolEndTrans(tempconn, temptid, &rcode);
! 			temptid = 0;
! 			if (!code)
! 			    code = rcode;
! 			if (code) {
! 			    fprintf(STDERR,
! 				    "Could not end transaction on volume %lu on the older site\n",
! 				    (unsigned long)pvolid);
! 			    error = code;
! 			    goto refail;
  			}
- 			VDONE;
- 			MapPartIdIntoName(entry.serverPartition[index],
- 					  partName);
  		    }
  		}
  		entry.serverNumber[index] = toserver;
--- 4416,4477 ----
  			    toserver, errcode);
  		if ((!errcode && !same)
  		    || (entry.serverPartition[index] != topart)) {
! 		    if (flags & RV_NODEL) {
! 			VPRINT2
! 			    ("Not deleting the previous volume %u on server %s, ...",
! 			     pvolid,
! 			     hostutil_GetNameByINet(entry.serverNumber[index]));
! 		    } else {
! 			tempconn =
! 			    UV_Bind(entry.serverNumber[index],
! 				    AFSCONF_VOLUMEPORT);
! 			
! 			MapPartIdIntoName(entry.serverPartition[index],
! 					  apartName);
! 			VPRINT3
! 			    ("Deleting the previous volume %u on server %s, partition %s ...",
! 			     pvolid,
! 			     hostutil_GetNameByINet(entry.serverNumber[index]),
! 			     apartName);
  			code =
! 			    AFSVolTransCreate(tempconn, pvolid,
! 					      entry.serverPartition[index],
! 					      ITOffline, &temptid);
! 			if (!code) {
! 			    code =
! 				AFSVolSetFlags(tempconn, temptid,
! 					       VTDeleteOnSalvage |
! 					       VTOutOfService);
! 			    if (code) {
! 				fprintf(STDERR,
! 					"Could not set flags on volume %lu on the older site\n",
! 					(unsigned long)pvolid);
! 				error = code;
! 				goto refail;
! 			    }
! 			    code = AFSVolDeleteVolume(tempconn, temptid);
! 			    if (code) {
! 				fprintf(STDERR,
! 					"Could not delete volume %lu on the older site\n",
! 					(unsigned long)pvolid);
! 				error = code;
! 				goto refail;
! 			    }
! 			    code = AFSVolEndTrans(tempconn, temptid, &rcode);
! 			    temptid = 0;
! 			    if (!code)
! 				code = rcode;
! 			    if (code) {
! 				fprintf(STDERR,
! 					"Could not end transaction on volume %lu on the older site\n",
! 					(unsigned long)pvolid);
! 				error = code;
! 				goto refail;
! 			    }
! 			    VDONE;
! 			    MapPartIdIntoName(entry.serverPartition[index],
! 					      partName);
  			}
  		    }
  		}
  		entry.serverNumber[index] = toserver;
***************
*** 4565,4571 ****
  /*adds <server> and <part> as a readonly replication site for <volid>
  *in vldb */
  int
! UV_AddSite(afs_int32 server, afs_int32 part, afs_int32 volid)
  {
      int j, nro = 0, islocked = 0;
      struct nvldbentry entry, storeEntry;
--- 4583,4589 ----
  /*adds <server> and <part> as a readonly replication site for <volid>
  *in vldb */
  int
! UV_AddSite(afs_int32 server, afs_int32 part, afs_int32 volid, afs_int32 valid)
  {
      int j, nro = 0, islocked = 0;
      struct nvldbentry entry, storeEntry;
***************
*** 4638,4644 ****
      VPRINT("Adding a new site ...");
      entry.serverNumber[entry.nServers] = server;
      entry.serverPartition[entry.nServers] = part;
!     entry.serverFlags[entry.nServers] = (ITSROVOL | RO_DONTUSE);
      entry.nServers++;
  
      MapNetworkToHost(&entry, &storeEntry);
--- 4656,4666 ----
      VPRINT("Adding a new site ...");
      entry.serverNumber[entry.nServers] = server;
      entry.serverPartition[entry.nServers] = part;
!     if (!valid) {
! 	entry.serverFlags[entry.nServers] = (ITSROVOL | RO_DONTUSE);
!     } else {
! 	entry.serverFlags[entry.nServers] = (ITSROVOL);
!     }
      entry.nServers++;
  
      MapNetworkToHost(&entry, &storeEntry);
***************
*** 5250,5260 ****
      afs_int32 code, error = 0;
      struct nvldbentry entry, storeEntry;
      char pname[10];
!     int pass = 0, islocked = 0, createentry, addvolume, modified, mod;
      afs_int32 rwvolid;
  
!     if (modentry)
  	*modentry = 0;
      rwvolid =
  	((volumeinfo->type ==
  	  RWVOL) ? volumeinfo->volid : volumeinfo->parentID);
--- 5272,5285 ----
      afs_int32 code, error = 0;
      struct nvldbentry entry, storeEntry;
      char pname[10];
!     int pass = 0, islocked = 0, createentry, addvolume, modified, mod, doit = 1;
      afs_int32 rwvolid;
  
!     if (modentry) {
! 	if (*modentry == 1)
! 	    doit = 0;
  	*modentry = 0;
+     }
      rwvolid =
  	((volumeinfo->type ==
  	  RWVOL) ? volumeinfo->volid : volumeinfo->parentID);
***************
*** 5550,5556 ****
  				    (unsigned long)volumeinfo->volid);
  			}
  
! 			Lp_SetRWValue(entry, entry.serverNumber[idx],
  				      entry.serverPartition[idx], 0L, 0L);
  			entry.nServers--;
  			modified++;
--- 5575,5581 ----
  				    (unsigned long)volumeinfo->volid);
  			}
  
! 			Lp_SetRWValue(&entry, entry.serverNumber[idx],
  				      entry.serverPartition[idx], 0L, 0L);
  			entry.nServers--;
  			modified++;
***************
*** 5610,5616 ****
      if (entry.volumeId[RWVOL] > *maxvolid)
  	*maxvolid = entry.volumeId[RWVOL];
  
!     if (modified) {
  	MapNetworkToHost(&entry, &storeEntry);
  
  	if (createentry) {
--- 5635,5641 ----
      if (entry.volumeId[RWVOL] > *maxvolid)
  	*maxvolid = entry.volumeId[RWVOL];
  
!     if (modified && doit) {
  	MapNetworkToHost(&entry, &storeEntry);
  
  	if (createentry) {
***************
*** 5645,5651 ****
  	}
      }
  
!     if (verbose) {
  	fprintf(STDOUT, "-- status after --\n");
  	if (modified)
  	    EnumerateEntry(&entry);
--- 5670,5676 ----
  	}
      }
  
!     if (verbose && doit) {
  	fprintf(STDOUT, "-- status after --\n");
  	if (modified)
  	    EnumerateEntry(&entry);
***************
*** 5712,5724 ****
      volumeInfo.volEntries_val = (volintInfo *) 0;
      volumeInfo.volEntries_len = 0;
  
!     if (!aserver && flags) {
  	/* fprintf(STDERR,"Partition option requires a server option\n"); */
  	ERROR_EXIT(EINVAL);
      }
  
      /* Turn verbose logging off and do our own verbose logging */
      tverbose = verbose;
      verbose = 0;
  
      /* Read the VLDB entry */
--- 5737,5751 ----
      volumeInfo.volEntries_val = (volintInfo *) 0;
      volumeInfo.volEntries_len = 0;
  
!     if (!aserver && (flags & 1)) {
  	/* fprintf(STDERR,"Partition option requires a server option\n"); */
  	ERROR_EXIT(EINVAL);
      }
  
      /* Turn verbose logging off and do our own verbose logging */
      tverbose = verbose;
+     if (flags & 2) 
+ 	tverbose = 1;
      verbose = 0;
  
      /* Read the VLDB entry */
***************
*** 5750,5755 ****
--- 5777,5787 ----
       * Equivalent to a syncserv.
       */
      if (!vcode) {
+ 	/* Tell CheckVldb not to update if appropriate */
+ 	if (flags & 2)
+ 	    mod = 1;
+ 	else
+ 	    mod = 0;
  	code = CheckVldb(&vldbentry, &mod);
  	if (code) {
  	    fprintf(STDERR, "Could not process VLDB entry for volume %s\n",
***************
*** 5763,5769 ****
      /* If aserver is given, we will search for the desired volume on it */
      if (aserver) {
  	/* Generate array of partitions on the server that we will check */
! 	if (!flags) {
  	    code = UV_ListPartitions(aserver, &PartList, &pcnt);
  	    if (code) {
  		fprintf(STDERR,
--- 5795,5801 ----
      /* If aserver is given, we will search for the desired volume on it */
      if (aserver) {
  	/* Generate array of partitions on the server that we will check */
! 	if (!(flags & 1)) {
  	    code = UV_ListPartitions(aserver, &PartList, &pcnt);
  	    if (code) {
  		fprintf(STDERR,
***************
*** 5789,5794 ****
--- 5821,5830 ----
  			ERROR_EXIT(code);
  		    }
  		} else {
+ 		    if (flags & 2)
+ 			mod = 1;
+ 		    else
+ 			mod = 0;
  		    /* Found one, sync it with VLDB entry */
  		    code =
  			CheckVolume(volumeInfo.volEntries_val, aserver,
***************
*** 5839,5844 ****
--- 5875,5884 ----
  			ERROR_EXIT(code);
  		    }
  		} else {
+ 		    if (flags & 2)
+ 			mod = 1;
+ 		    else
+ 			mod = 0;
  		    /* Found one, sync it with VLDB entry */
  		    code =
  			CheckVolume(volumeInfo.volEntries_val, aserver,
***************
*** 5859,5865 ****
  
      /* if (aserver) */
      /* If verbose output, print a summary of what changed */
!     if (tverbose) {
  	fprintf(STDOUT, "-- status after --\n");
  	code = VLDB_GetEntryByName(avolname, &vldbentry);
  	if (code && (code != VL_NOENT)) {
--- 5899,5905 ----
  
      /* if (aserver) */
      /* If verbose output, print a summary of what changed */
!     if (tverbose && !(flags & 2)) {
  	fprintf(STDOUT, "-- status after --\n");
  	code = VLDB_GetEntryByName(avolname, &vldbentry);
  	if (code && (code != VL_NOENT)) {
***************
*** 5941,5947 ****
      aconn = UV_Bind(aserver, AFSCONF_VOLUMEPORT);
  
      /* Generate array of partitions to check */
!     if (!flags) {
  	code = UV_ListPartitions(aserver, &PartList, &pcnt);
  	if (code) {
  	    fprintf(STDERR,
--- 5981,5987 ----
      aconn = UV_Bind(aserver, AFSCONF_VOLUMEPORT);
  
      /* Generate array of partitions to check */
!     if (!(flags & 1)) {
  	code = UV_ListPartitions(aserver, &PartList, &pcnt);
  	if (code) {
  	    fprintf(STDERR,
***************
*** 5989,5994 ****
--- 6029,6038 ----
  		fflush(STDOUT);
  	    }
  
+ 	    if (flags & 2)
+ 		modified = 1;
+ 	    else
+ 		modified = 0;
  	    code = CheckVolume(vi, aserver, apart, &modified, &maxvolid);
  	    if (code) {
  		PrintError("", code);
***************
*** 6019,6026 ****
  
      }				/* thru all partitions */
  
!     VPRINT3("Total entries: %u, Failed to process %d, Changed %d\n", tentries,
! 	    failures, modifications);
  
    error_exit:
      /* Now check if the maxvolid is larger than that stored in the VLDB */
--- 6063,6075 ----
  
      }				/* thru all partitions */
  
!     if (flags & 2) {
! 	VPRINT3("Total entries: %u, Failed to process %d, Would change %d\n", 
! 		tentries, failures, modifications);
!     } else {
! 	VPRINT3("Total entries: %u, Failed to process %d, Changed %d\n", 
! 		tentries, failures, modifications);
!     }
  
    error_exit:
      /* Now check if the maxvolid is larger than that stored in the VLDB */
***************
*** 6253,6262 ****
      afs_int32 code, error = 0;
      struct nvldbentry storeEntry;
      int islocked = 0, mod, modentry, delentry = 0;
!     int pass = 0;
  
!     if (modified)
  	*modified = 0;
      if (verbose) {
  	fprintf(STDOUT, "_______________________________\n");
  	fprintf(STDOUT, "\n-- status before -- \n");
--- 6302,6314 ----
      afs_int32 code, error = 0;
      struct nvldbentry storeEntry;
      int islocked = 0, mod, modentry, delentry = 0;
!     int pass = 0, doit=1;
  
!     if (modified) {
! 	if (*modified == 1) 
! 	    doit = 0;
  	*modified = 0;
+     }
      if (verbose) {
  	fprintf(STDOUT, "_______________________________\n");
  	fprintf(STDOUT, "\n-- status before -- \n");
***************
*** 6303,6309 ****
      code = CheckVldbRWBK(entry, &mod);
      if (code)
  	ERROR_EXIT(code);
!     if (mod && (pass == 1))
  	goto retry;
      if (mod)
  	modentry++;
--- 6355,6361 ----
      code = CheckVldbRWBK(entry, &mod);
      if (code)
  	ERROR_EXIT(code);
!     if (mod && (pass == 1) && doit)
  	goto retry;
      if (mod)
  	modentry++;
***************
*** 6312,6318 ****
      code = CheckVldbRO(entry, &mod);
      if (code)
  	ERROR_EXIT(code);
!     if (mod && (pass == 1))
  	goto retry;
      if (mod)
  	modentry++;
--- 6364,6370 ----
      code = CheckVldbRO(entry, &mod);
      if (code)
  	ERROR_EXIT(code);
!     if (mod && (pass == 1) && doit)
  	goto retry;
      if (mod)
  	modentry++;
***************
*** 6320,6331 ****
      /* The VLDB entry has been updated. If it as been modified, then 
       * write the entry back out the the VLDB.
       */
!     if (modentry) {
  	if (pass == 1)
  	    goto retry;
  
  	if (!(entry->flags & RW_EXISTS) && !(entry->flags & BACK_EXISTS)
! 	    && !(entry->flags & RO_EXISTS)) {
  	    /* The RW, BK, nor RO volumes do not exist. Delete the VLDB entry */
  	    code =
  		ubik_VL_DeleteEntry(cstruct, 0, entry->volumeId[RWVOL],
--- 6372,6383 ----
      /* The VLDB entry has been updated. If it as been modified, then 
       * write the entry back out the the VLDB.
       */
!     if (modentry && doit) {
  	if (pass == 1)
  	    goto retry;
  
  	if (!(entry->flags & RW_EXISTS) && !(entry->flags & BACK_EXISTS)
! 	    && !(entry->flags & RO_EXISTS) && doit) {
  	    /* The RW, BK, nor RO volumes do not exist. Delete the VLDB entry */
  	    code =
  		ubik_VL_DeleteEntry(cstruct, 0, entry->volumeId[RWVOL],
***************
*** 6355,6361 ****
  	islocked = 0;
      }
  
!     if (verbose) {
  	fprintf(STDOUT, "-- status after --\n");
  	if (delentry)
  	    fprintf(STDOUT, "\n**entry deleted**\n");
--- 6407,6413 ----
  	islocked = 0;
      }
  
!     if (verbose && doit) {
  	fprintf(STDOUT, "-- status after --\n");
  	if (delentry)
  	    fprintf(STDOUT, "\n**entry deleted**\n");
***************
*** 6399,6410 ****
      struct nvldbentry *vlentry;
      afs_int32 si, nsi, j;
  
      aconn = UV_Bind(aserver, AFSCONF_VOLUMEPORT);
  
      /* Set up attributes to search VLDB  */
      attributes.server = ntohl(aserver);
      attributes.Mask = VLLIST_SERVER;
!     if (flags) {
  	attributes.partition = apart;
  	attributes.Mask |= VLLIST_PARTITION;
      }
--- 6451,6465 ----
      struct nvldbentry *vlentry;
      afs_int32 si, nsi, j;
  
+     if (flags & 2) 
+ 	verbose = 1;
+ 
      aconn = UV_Bind(aserver, AFSCONF_VOLUMEPORT);
  
      /* Set up attributes to search VLDB  */
      attributes.server = ntohl(aserver);
      attributes.Mask = VLLIST_SERVER;
!     if ((flags & 1)) {
  	attributes.partition = apart;
  	attributes.Mask |= VLLIST_PARTITION;
      }
***************
*** 6435,6440 ****
--- 6490,6500 ----
  
  	    VPRINT1("Processing VLDB entry %d ...\n", j + 1);
  
+ 	    /* Tell CheckVldb not to update if appropriate */
+ 	    if (flags & 2)
+ 		modified = 1;
+ 	    else
+ 		modified = 0;
  	    code = CheckVldb(vlentry, &modified);
  	    if (code) {
  		PrintError("", code);
***************
*** 6461,6468 ****
  	}
      }
  
!     VPRINT3("Total entries: %u, Failed to process %d, Changed %d\n", tentries,
! 	    failures, modifications);
  
    error_exit:
      if (aconn)
--- 6521,6533 ----
  	}
      }
  
!     if (flags & 2) {
! 	VPRINT3("Total entries: %u, Failed to process %d, Would change %d\n",
! 		tentries, failures, modifications);
!     } else {
! 	VPRINT3("Total entries: %u, Failed to process %d, Changed %d\n", 
! 		tentries, failures, modifications);
!     }
  
    error_exit:
      if (aconn)
