Index: openafs/src/WINNT/afsd/afsd_init.c
diff -c openafs/src/WINNT/afsd/afsd_init.c:1.40.2.30 openafs/src/WINNT/afsd/afsd_init.c:1.40.2.31
*** openafs/src/WINNT/afsd/afsd_init.c:1.40.2.30	Sun Apr  2 19:56:06 2006
--- openafs/src/WINNT/afsd/afsd_init.c	Thu Jun 22 17:50:13 2006
***************
*** 1194,1204 ****
      /* this should really be in an init daemon from here on down */
  
      if (!cm_freelanceEnabled) {
          osi_Log0(afsd_logp, "Loading Root Volume from cell");
!         code = cm_GetVolumeByName(cm_data.rootCellp, cm_rootVolumeName, cm_rootUserp,
!                                   &req, CM_FLAG_CREATE, &cm_data.rootVolumep);
!         afsi_log("cm_GetVolumeByName code %x root vol %x", code,
!                  (code ? (cm_volume_t *)-1 : cm_data.rootVolumep));
          if (code != 0) {
              *reasonP = "can't find root volume in root cell";
              return -1;
--- 1194,1208 ----
      /* this should really be in an init daemon from here on down */
  
      if (!cm_freelanceEnabled) {
+ 	int attempts = 10;
+ 
          osi_Log0(afsd_logp, "Loading Root Volume from cell");
! 	do {
! 	    code = cm_GetVolumeByName(cm_data.rootCellp, cm_rootVolumeName, cm_rootUserp,
! 				       &req, CM_FLAG_CREATE, &cm_data.rootVolumep);
! 	    afsi_log("cm_GetVolumeByName code %x root vol %x", code,
! 		      (code ? (cm_volume_t *)-1 : cm_data.rootVolumep));
! 	} while (code && --attempts);
          if (code != 0) {
              *reasonP = "can't find root volume in root cell";
              return -1;
Index: openafs/src/WINNT/afsd/afskfw.c
diff -c openafs/src/WINNT/afsd/afskfw.c:1.8.2.17 openafs/src/WINNT/afsd/afskfw.c:1.8.2.18
*** openafs/src/WINNT/afsd/afskfw.c:1.8.2.17	Wed Nov 30 01:40:53 2005
--- openafs/src/WINNT/afsd/afskfw.c	Sun Jul  2 21:20:45 2006
***************
*** 1,4 ****
--- 1,5 ----
  /*
+  * Copyright (c) 2004, 2005 Secure Endpoints Inc.
   * Copyright (c) 2003 SkyRope, LLC
   * All rights reserved.
   * 
***************
*** 61,69 ****
  #include "afskfw.h"
  
  #include <osilog.h>
- #include <rxkad_prototypes.h>   /* for life_to_time */
  #include <afs/ptserver.h>
  #include <afs/ptuser.h>
  
  #include <WINNT\afsreg.h>
  
--- 62,70 ----
  #include "afskfw.h"
  
  #include <osilog.h>
  #include <afs/ptserver.h>
  #include <afs/ptuser.h>
+ #include <rx/rxkad.h>
  
  #include <WINNT\afsreg.h>
  
***************
*** 2548,2553 ****
--- 2549,2555 ----
          strncpy(sname, username, PR_MAXNAMELEN);
          sname[PR_MAXNAMELEN-1] = '\0';    
          status = pr_SNameToId (sname, &viceId);
+ 	pr_End();
      }
  
      /*
***************
*** 2587,2594 ****
                  return status;
              if (status = pr_Initialize(1L, confname, aserver->cell))
                  return status;
!             if (status = pr_CreateUser(username, &id))
!                 return status;
  #ifdef AFS_ID_TO_NAME
              strncpy(username_copy, username, BUFSIZ);
              snprintf (username, BUFSIZ, "%s (AFS ID %d)", username_copy, (int) viceId);
--- 2589,2598 ----
                  return status;
              if (status = pr_Initialize(1L, confname, aserver->cell))
                  return status;
!             status = pr_CreateUser(username, &id);
! 	    pr_End();
! 	    if (status)
! 		return status;
  #ifdef AFS_ID_TO_NAME
              strncpy(username_copy, username, BUFSIZ);
              snprintf (username, BUFSIZ, "%s (AFS ID %d)", username_copy, (int) viceId);
***************
*** 2961,2968 ****
              p[len] = '\0';
          }
  
!         ViceIDToUsername(aclient.name, realm_of_user, realm_of_cell, CellName, 
!                          &aclient, &aserver, &atoken);
  
          if ( smbname ) {
              strncpy(aclient.smbname, smbname, sizeof(aclient.smbname));
--- 2965,2974 ----
              p[len] = '\0';
          }
  
! 	GetEnvironmentVariable(DO_NOT_REGISTER_VARNAME, NULL, 0);
! 	if (GetLastError() == ERROR_ENVVAR_NOT_FOUND)
! 	    ViceIDToUsername(aclient.name, realm_of_user, realm_of_cell, CellName, 
! 			     &aclient, &aserver, &atoken);
  
          if ( smbname ) {
              strncpy(aclient.smbname, smbname, sizeof(aclient.smbname));
***************
*** 3079,3086 ****
  
      strcpy(aclient.cell, CellName);
  
!     ViceIDToUsername(aclient.name, realm_of_user, realm_of_cell, CellName, 
!                       &aclient, &aserver, &atoken);
  
      if ( smbname ) {
          strncpy(aclient.smbname, smbname, sizeof(aclient.smbname));
--- 3085,3094 ----
  
      strcpy(aclient.cell, CellName);
  
!     GetEnvironmentVariable(DO_NOT_REGISTER_VARNAME, NULL, 0);
!     if (GetLastError() == ERROR_ENVVAR_NOT_FOUND)
! 	ViceIDToUsername(aclient.name, realm_of_user, realm_of_cell, CellName, 
! 			 &aclient, &aserver, &atoken);
  
      if ( smbname ) {
          strncpy(aclient.smbname, smbname, sizeof(aclient.smbname));
***************
*** 3609,3611 ****
--- 3617,3770 ----
  
      return 0;
  }
+ 
+ /* We are including this 
+ 
+ /* Ticket lifetime.  This defines the table used to lookup lifetime for the
+    fixed part of rande of the one byte lifetime field.  Values less than 0x80
+    are intrpreted as the number of 5 minute intervals.  Values from 0x80 to
+    0xBF should be looked up in this table.  The value of 0x80 is the same using
+    both methods: 10 and two-thirds hours .  The lifetime of 0xBF is 30 days.
+    The intervening values of have a fixed ratio of roughly 1.06914.  The value
+    oxFF is defined to mean a ticket has no expiration time.  This should be
+    used advisedly since individual servers may impose defacto upperbounds on
+    ticket lifetimes. */
+ 
+ #define TKTLIFENUMFIXED 64
+ #define TKTLIFEMINFIXED 0x80
+ #define TKTLIFEMAXFIXED 0xBF
+ #define TKTLIFENOEXPIRE 0xFF
+ #define MAXTKTLIFETIME	(30*24*3600)	/* 30 days */
+ 
+ static const int tkt_lifetimes[TKTLIFENUMFIXED] = {
+     38400,			/* 10.67 hours, 0.44 days */
+     41055,			/* 11.40 hours, 0.48 days */
+     43894,			/* 12.19 hours, 0.51 days */
+     46929,			/* 13.04 hours, 0.54 days */
+     50174,			/* 13.94 hours, 0.58 days */
+     53643,			/* 14.90 hours, 0.62 days */
+     57352,			/* 15.93 hours, 0.66 days */
+     61318,			/* 17.03 hours, 0.71 days */
+     65558,			/* 18.21 hours, 0.76 days */
+     70091,			/* 19.47 hours, 0.81 days */
+     74937,			/* 20.82 hours, 0.87 days */
+     80119,			/* 22.26 hours, 0.93 days */
+     85658,			/* 23.79 hours, 0.99 days */
+     91581,			/* 25.44 hours, 1.06 days */
+     97914,			/* 27.20 hours, 1.13 days */
+     104684,			/* 29.08 hours, 1.21 days */
+     111922,			/* 31.09 hours, 1.30 days */
+     119661,			/* 33.24 hours, 1.38 days */
+     127935,			/* 35.54 hours, 1.48 days */
+     136781,			/* 37.99 hours, 1.58 days */
+     146239,			/* 40.62 hours, 1.69 days */
+     156350,			/* 43.43 hours, 1.81 days */
+     167161,			/* 46.43 hours, 1.93 days */
+     178720,			/* 49.64 hours, 2.07 days */
+     191077,			/* 53.08 hours, 2.21 days */
+     204289,			/* 56.75 hours, 2.36 days */
+     218415,			/* 60.67 hours, 2.53 days */
+     233517,			/* 64.87 hours, 2.70 days */
+     249664,			/* 69.35 hours, 2.89 days */
+     266926,			/* 74.15 hours, 3.09 days */
+     285383,			/* 79.27 hours, 3.30 days */
+     305116,			/* 84.75 hours, 3.53 days */
+     326213,			/* 90.61 hours, 3.78 days */
+     348769,			/* 96.88 hours, 4.04 days */
+     372885,			/* 103.58 hours, 4.32 days */
+     398668,			/* 110.74 hours, 4.61 days */
+     426234,			/* 118.40 hours, 4.93 days */
+     455705,			/* 126.58 hours, 5.27 days */
+     487215,			/* 135.34 hours, 5.64 days */
+     520904,			/* 144.70 hours, 6.03 days */
+     556921,			/* 154.70 hours, 6.45 days */
+     595430,			/* 165.40 hours, 6.89 days */
+     636601,			/* 176.83 hours, 7.37 days */
+     680618,			/* 189.06 hours, 7.88 days */
+     727680,			/* 202.13 hours, 8.42 days */
+     777995,			/* 216.11 hours, 9.00 days */
+     831789,			/* 231.05 hours, 9.63 days */
+     889303,			/* 247.03 hours, 10.29 days */
+     950794,			/* 264.11 hours, 11.00 days */
+     1016537,			/* 282.37 hours, 11.77 days */
+     1086825,			/* 301.90 hours, 12.58 days */
+     1161973,			/* 322.77 hours, 13.45 days */
+     1242318,			/* 345.09 hours, 14.38 days */
+     1328218,			/* 368.95 hours, 15.37 days */
+     1420057,			/* 394.46 hours, 16.44 days */
+     1518247,			/* 421.74 hours, 17.57 days */
+     1623226,			/* 450.90 hours, 18.79 days */
+     1735464,			/* 482.07 hours, 20.09 days */
+     1855462,			/* 515.41 hours, 21.48 days */
+     1983758,			/* 551.04 hours, 22.96 days */
+     2120925,			/* 589.15 hours, 24.55 days */
+     2267576,			/* 629.88 hours, 26.25 days */
+     2424367,			/* 673.44 hours, 28.06 days */
+     2592000
+ };				/* 720.00 hours, 30.00 days */
+ 
+ /* life_to_time - takes a start time and a Kerberos standard lifetime char and
+  * returns the corresponding end time.  There are four simple cases to be
+  * handled.  The first is a life of 0xff, meaning no expiration, and results in
+  * an end time of 0xffffffff.  The second is when life is less than the values
+  * covered by the table.  In this case, the end time is the start time plus the
+  * number of 5 minute intervals specified by life.  The third case returns
+  * start plus the MAXTKTLIFETIME if life is greater than TKTLIFEMAXFIXED.  The
+  * last case, uses the life value (minus TKTLIFEMINFIXED) as an index into the
+  * table to extract the lifetime in seconds, which is added to start to produce
+  * the end time. */
+ 
+ afs_uint32
+ life_to_time(afs_uint32 start, unsigned char life)
+ {
+     int realLife;
+ 
+     if (life == TKTLIFENOEXPIRE)
+ 	return NEVERDATE;
+     if (life < TKTLIFEMINFIXED)
+ 	return start + life * 5 * 60;
+     if (life > TKTLIFEMAXFIXED)
+ 	return start + MAXTKTLIFETIME;
+     realLife = tkt_lifetimes[life - TKTLIFEMINFIXED];
+     return start + realLife;
+ }
+ 
+ /* time_to_life - takes start and end times for the ticket and returns a
+  * Kerberos standard lifetime char possibily using the tkt_lifetimes table for
+  * lifetimes above 127*5minutes.  First, the special case of (end ==
+  * 0xffffffff) is handled to mean no expiration.  Then negative lifetimes and
+  * those greater than the maximum ticket lifetime are rejected.  Then lifetimes
+  * less than the first table entry are handled by rounding the requested
+  * lifetime *up* to the next 5 minute interval.  The final step is to search
+  * the table for the smallest entry *greater than or equal* to the requested
+  * entry.  The actual code is prepared to handle the case where the table is
+  * unordered but that it an unnecessary frill. */
+ 
+ static unsigned char
+ time_to_life(afs_uint32 start, afs_uint32 end)
+ {
+     int lifetime = end - start;
+     int best, best_i;
+     int i;
+ 
+     if (end == NEVERDATE)
+ 	return TKTLIFENOEXPIRE;
+     if ((lifetime > MAXKTCTICKETLIFETIME) || (lifetime <= 0))
+ 	return 0;
+     if (lifetime < tkt_lifetimes[0])
+ 	return (lifetime + 5 * 60 - 1) / (5 * 60);
+     best_i = -1;
+     best = MAXKTCTICKETLIFETIME;
+     for (i = 0; i < TKTLIFENUMFIXED; i++)
+ 	if (tkt_lifetimes[i] >= lifetime) {
+ 	    int diff = tkt_lifetimes[i] - lifetime;
+ 	    if (diff < best) {
+ 		best = diff;
+ 		best_i = i;
+ 	    }
+ 	}
+     if (best_i < 0)
+ 	return 0;
+     return best_i + TKTLIFEMINFIXED;
+ }
+ 
Index: openafs/src/WINNT/afsd/afskfw.h
diff -c openafs/src/WINNT/afsd/afskfw.h:1.2.2.2 openafs/src/WINNT/afsd/afskfw.h:1.2.2.3
*** openafs/src/WINNT/afsd/afskfw.h:1.2.2.2	Sun May 29 23:52:52 2005
--- openafs/src/WINNT/afsd/afskfw.h	Sun Jul  2 21:20:45 2006
***************
*** 88,93 ****
--- 88,94 ----
  #define PROBE_USERNAME               "OPENAFS-KDC-PROBE"
  #define PROBE_PASSWORD_LEN           16
  
+ #define DO_NOT_REGISTER_VARNAME  "OPENAFS_DO_NOT_REGISTER_AFS_ID"
  #ifdef  __cplusplus
  }
  #endif
Index: openafs/src/WINNT/afsd/afslogon.c
diff -c openafs/src/WINNT/afsd/afslogon.c:1.24.2.20 openafs/src/WINNT/afsd/afslogon.c:1.24.2.21
*** openafs/src/WINNT/afsd/afslogon.c:1.24.2.20	Thu Feb  9 10:29:41 2006
--- openafs/src/WINNT/afsd/afslogon.c	Sun Jul  2 21:20:45 2006
***************
*** 35,41 ****
  
  HANDLE hDLL;
  
- WSADATA WSAjunk;
  #define AFS_LOGON_EVENT_NAME TEXT("AFS Logon")
  
  void DebugEvent0(char *a) 
--- 35,40 ----
***************
*** 79,89 ****
      switch (reason) {
      case DLL_PROCESS_ATTACH:
          /* Initialization Mutex */
!         hInitMutex = CreateMutex(NULL, FALSE, NULL);
          break;
  
      case DLL_PROCESS_DETACH:
!         CloseHandle(hInitMutex);
          break;
  
      case DLL_THREAD_ATTACH:
--- 78,96 ----
      switch (reason) {
      case DLL_PROCESS_ATTACH:
          /* Initialization Mutex */
! 	if (!bInit) {
! 	    hInitMutex = CreateMutex(NULL, FALSE, NULL);
! 	    SetEnvironmentVariable(DO_NOT_REGISTER_VARNAME, "");
! 	}
          break;
  
      case DLL_PROCESS_DETACH:
! 	/* do nothing on unload because we might 
! 	 * be reloaded.
! 	 */
! 	CloseHandle(hInitMutex);
! 	hInitMutex = NULL;
! 	bInit = FALSE;
          break;
  
      case DLL_THREAD_ATTACH:
***************
*** 100,113 ****
  {
      if ( bInit == FALSE ) {
          if ( WaitForSingleObject( hInitMutex, INFINITE ) == WAIT_OBJECT_0 ) {
!             if ( bInit == FALSE ) {
!                 rx_Init(0);
!                 initAFSDirPath();
!                 ka_Init(0);
!                 bInit = TRUE;
!             }
!             ReleaseMutex(hInitMutex);
!         }
      }
  }
  
--- 107,134 ----
  {
      if ( bInit == FALSE ) {
          if ( WaitForSingleObject( hInitMutex, INFINITE ) == WAIT_OBJECT_0 ) {
! 	    /* initAFSDirPath() initializes an array and sets a 
! 	     * flag so that the initialization can only occur
! 	     * once.  No cleanup will be done when the DLL is 
! 	     * unloaded so the initialization will not be 
! 	     * performed again on a subsequent reload
! 	     */
! 	    initAFSDirPath();
! 
! 	    /* ka_Init initializes a number of error tables.
! 	     * and then calls ka_CellConfig() which grabs 
! 	     * an afsconf_dir structure via afsconf_Open().
! 	     * Upon a second attempt to call ka_CellConfig()
! 	     * the structure will be released with afsconf_Close()
! 	     * and then re-opened.  Could this corrupt memory?
! 	     * 
! 	     * We only need this if we are not using KFW.
! 	     */
! 	    if (!KFW_is_available())
! 		ka_Init(0);
! 	    bInit = TRUE;
! 	}
! 	ReleaseMutex(hInitMutex);
      }
  }
  
***************
*** 915,921 ****
      /* remove any kerberos 5 tickets currently held by the SYSTEM account
       * for this user 
       */
!     if ( KFW_is_available() ) {
          sprintf(szLogonId,"%d.%d",lpLogonId->HighPart, lpLogonId->LowPart);
          KFW_AFS_copy_cache_to_system_file(uname, szLogonId);
  
--- 936,942 ----
      /* remove any kerberos 5 tickets currently held by the SYSTEM account
       * for this user 
       */
!     if (ISLOGONINTEGRATED(opt.LogonOption) && KFW_is_available()) {
          sprintf(szLogonId,"%d.%d",lpLogonId->HighPart, lpLogonId->LowPart);
          KFW_AFS_copy_cache_to_system_file(uname, szLogonId);
  
Index: openafs/src/WINNT/afsd/cm_callback.c
diff -c openafs/src/WINNT/afsd/cm_callback.c:1.20.2.14 openafs/src/WINNT/afsd/cm_callback.c:1.20.2.15
*** openafs/src/WINNT/afsd/cm_callback.c:1.20.2.14	Sun May 28 19:09:52 2006
--- openafs/src/WINNT/afsd/cm_callback.c	Tue Jun 27 17:56:12 2006
***************
*** 1595,1601 ****
                      struct cm_req *reqp, long flags)
  {
      long code;
!     cm_conn_t *connp;
      AFSFetchStatus afsStatus;
      AFSVolSync volSync;
      AFSCallBack callback;
--- 1595,1601 ----
                      struct cm_req *reqp, long flags)
  {
      long code;
!     cm_conn_t *connp = NULL;
      AFSFetchStatus afsStatus;
      AFSVolSync volSync;
      AFSCallBack callback;
***************
*** 1604,1610 ****
      int mustCall;
      long sflags;
      cm_fid_t sfid;
!     struct rx_connection * callp;
  
      osi_Log4(afsd_logp, "GetCallback scp 0x%x cell %d vol %d flags %lX", 
               scp, scp->fid.cell, scp->fid.volume, flags);
--- 1604,1610 ----
      int mustCall;
      long sflags;
      cm_fid_t sfid;
!     struct rx_connection * callp = NULL;
  
      osi_Log4(afsd_logp, "GetCallback scp 0x%x cell %d vol %d flags %lX", 
               scp, scp->fid.cell, scp->fid.volume, flags);
Index: openafs/src/WINNT/afsd/cm_scache.c
diff -c openafs/src/WINNT/afsd/cm_scache.c:1.14.2.19 openafs/src/WINNT/afsd/cm_scache.c:1.14.2.21
*** openafs/src/WINNT/afsd/cm_scache.c:1.14.2.19	Sat Jun  3 13:57:12 2006
--- openafs/src/WINNT/afsd/cm_scache.c	Thu Jun 22 23:37:57 2006
***************
*** 59,73 ****
      cm_scache_t *tscp;
      int i;
  
- #ifdef AFS_FREELANCE_CLIENT
-     /* Do not recycle Freelance cache entries */
-     if ( cm_freelanceEnabled && 
-          scp->fid.cell==AFS_FAKE_ROOT_CELL_ID &&
-          scp->fid.volume==AFS_FAKE_ROOT_VOL_ID )
- 	return -1;
- #endif /* AFS_FREELANCE_CLIENT */
- 
- 
      if (scp->flags & CM_SCACHEFLAG_INHASH) {
  	/* hash it out first */
  	i = CM_SCACHE_HASH(&scp->fid);
--- 59,64 ----
***************
*** 949,961 ****
                  /* we don't know the required access rights */
                  if (bufLocked) lock_ReleaseMutex(&bufp->mx);
                  code = cm_GetAccessRights(scp, up, reqp);
-                 if (code) 
-                     return code;
                  if (bufLocked) {
                      lock_ReleaseMutex(&scp->mx);
                      lock_ObtainMutex(&bufp->mx);
                      lock_ObtainMutex(&scp->mx);
                  }
                  continue;
              }
          }
--- 940,952 ----
                  /* we don't know the required access rights */
                  if (bufLocked) lock_ReleaseMutex(&bufp->mx);
                  code = cm_GetAccessRights(scp, up, reqp);
                  if (bufLocked) {
                      lock_ReleaseMutex(&scp->mx);
                      lock_ObtainMutex(&bufp->mx);
                      lock_ObtainMutex(&scp->mx);
                  }
+                 if (code) 
+                     return code;
                  continue;
              }
          }
Index: openafs/src/WINNT/afsd/cm_vnodeops.c
diff -c openafs/src/WINNT/afsd/cm_vnodeops.c:1.19.2.39 openafs/src/WINNT/afsd/cm_vnodeops.c:1.19.2.40
*** openafs/src/WINNT/afsd/cm_vnodeops.c:1.19.2.39	Sat Jun  3 13:57:12 2006
--- openafs/src/WINNT/afsd/cm_vnodeops.c	Sat Jun 24 21:49:59 2006
***************
*** 2303,2314 ****
      lock_ReleaseWrite(&scp->bufCreateLock);
      if (code == 0) {
          lock_ObtainMutex(&scp->mx);
!         scp->flags &= ~(CM_SCACHEFLAG_OVERQUOTA
!                          | CM_SCACHEFLAG_OUTOFSPACE);
          if (scp->mask & (CM_SCACHEMASK_TRUNCPOS
                            | CM_SCACHEMASK_CLIENTMODTIME
                            | CM_SCACHEMASK_LENGTH))
              code = cm_StoreMini(scp, userp, reqp);
          lock_ReleaseMutex(&scp->mx);
      }
      return code;
--- 2303,2319 ----
      lock_ReleaseWrite(&scp->bufCreateLock);
      if (code == 0) {
          lock_ObtainMutex(&scp->mx);
! 
          if (scp->mask & (CM_SCACHEMASK_TRUNCPOS
                            | CM_SCACHEMASK_CLIENTMODTIME
                            | CM_SCACHEMASK_LENGTH))
              code = cm_StoreMini(scp, userp, reqp);
+ 
+         if (scp->flags & (CM_SCACHEFLAG_OVERQUOTA | CM_SCACHEFLAG_OUTOFSPACE)) {
+ 	    code = (scp->flags & CM_SCACHEFLAG_OVERQUOTA) ? CM_ERROR_QUOTA : CM_ERROR_SPACE;
+ 	    scp->flags &= ~(CM_SCACHEFLAG_OVERQUOTA | CM_SCACHEFLAG_OUTOFSPACE);
+ 	}
+ 
          lock_ReleaseMutex(&scp->mx);
      }
      return code;
Index: openafs/src/WINNT/client_exp/lang/NTMakefile
diff -c openafs/src/WINNT/client_exp/lang/NTMakefile:1.5 openafs/src/WINNT/client_exp/lang/NTMakefile:1.5.2.1
*** openafs/src/WINNT/client_exp/lang/NTMakefile:1.5	Fri Nov 21 02:59:59 2003
--- openafs/src/WINNT/client_exp/lang/NTMakefile	Sun Jun 25 12:56:30 2006
***************
*** 48,54 ****
  install : $(DLLFILE)
  
  clean ::
! 	$(DEL) $(OUT)\*.res RC* RD* $(DLLFILE)
  
  ############################################################################
  #
--- 48,54 ----
  install : $(DLLFILE)
  
  clean ::
! 	$(DEL) $(OUT)\*.res RC* RD* $(DLLFILE) AFS_component_version_number.h
  
  ############################################################################
  #
Index: openafs/src/WINNT/install/NSIS/OpenAFS.nsi
diff -c openafs/src/WINNT/install/NSIS/OpenAFS.nsi:1.69.2.16 openafs/src/WINNT/install/NSIS/OpenAFS.nsi:1.69.2.18
*** openafs/src/WINNT/install/NSIS/OpenAFS.nsi:1.69.2.16	Tue Sep 27 00:38:38 2005
--- openafs/src/WINNT/install/NSIS/OpenAFS.nsi	Sun Jul  2 21:16:57 2006
***************
*** 1035,1048 ****
  
  Section /o "Software Development Kit (SDK)" secSDK
  
!     SetOutPath "$INSTDIR\Client\Program\lib"
!     File /r "${AFS_CLIENT_LIBDIR}\*.*"
  
!     SetOutPath "$INSTDIR\Client\Program\Include"
!     File /r "${AFS_BUILD_INCDIR}\*.*"    
  
     ; Client Sample
!    SetOutPath "$INSTDIR\Client\Program\Sample"
     File "..\..\afsd\sample\token.c"
  
     ;Store install folder
--- 1035,1048 ----
  
  Section /o "Software Development Kit (SDK)" secSDK
  
!    SetOutPath "$INSTDIR\SDK\lib"
!    File /r "${AFS_CLIENT_LIBDIR}\*.*"
  
!    SetOutPath "$INSTDIR\SDK\Include"
!    File /r "${AFS_BUILD_INCDIR}\*.*"    
  
     ; Client Sample
!    SetOutPath "$INSTDIR\SDK\Sample"
     File "..\..\afsd\sample\token.c"
  
     ;Store install folder
***************
*** 1412,1418 ****
  ; the SDK is installed.  If not, we don't need to push it on the user.
  ; If they are there, we want to make sure they match the installed version.
  CheckSDK:
!    IfFileExists "$INSTDIR\Client\Program\Include\main.h" +1 NoSDK
     SectionGetFlags ${secSDK} $0
     IntOp $0 $0 | ${SF_SELECTED}
     SectionSetFlags ${secSDK} $0
--- 1412,1418 ----
  ; the SDK is installed.  If not, we don't need to push it on the user.
  ; If they are there, we want to make sure they match the installed version.
  CheckSDK:
!    IfFileExists "$INSTDIR\SDK\Include\main.h" +1 NoSDK
     SectionGetFlags ${secSDK} $0
     IntOp $0 $0 | ${SF_SELECTED}
     SectionSetFlags ${secSDK} $0
***************
*** 1802,1816 ****
  
    Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.pdb"
  
    Delete /REBOOTOK "$INSTDIR\Client\Program\*"
!   Delete /REBOOTOK "$INSTDIR\Client\Program\Include\*"
!   Delete /REBOOTOK "$INSTDIR\Client\Program\Include\afs\*"
!   Delete /REBOOTOK "$INSTDIR\Client\Program\Include\rx\*"
!   Delete /REBOOTOK "$INSTDIR\Client\Program\Sample\*"
!   RMDir  "$INSTDIR\Client\Program\Sample"
!   RMDir  "$INSTDIR\Client\Program\Include\afs"
!   RMDir  "$INSTDIR\Client\Program\Include\rx"
!   RMDir  "$INSTDIR\Client\Program\Include"
    RMDir  "$INSTDIR\Client\Program"
    RMDir  "$INSTDIR\Client"
  
--- 1802,1822 ----
  
    Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.pdb"
  
+   Delete /REBOOTOK "$INSTDIR\SDK\Include\*"
+   Delete /REBOOTOK "$INSTDIR\SDK\Include\afs\*"
+   Delete /REBOOTOK "$INSTDIR\SDK\Include\rx\*"
+   Delete /REBOOTOK "$INSTDIR\SDK\Sample\*"
+   Delete /REBOOTOK "$INSTDIR\SDK\*"
+ 
+   RMDir  "$INSTDIR\SDK\Sample"
+   RMDir  "$INSTDIR\SDK\Include\afs"
+   RMDir  "$INSTDIR\SDK\Include\rx"
+   RMDir  "$INSTDIR\SDK\Include"
+   RMDir  "$INSTDIR\SDK"
+ 
    Delete /REBOOTOK "$INSTDIR\Client\Program\*"
!   Delete /REBOOTOK "$INSTDIR\Client\*"
! 
    RMDir  "$INSTDIR\Client\Program"
    RMDir  "$INSTDIR\Client"
  
***************
*** 2813,2818 ****
--- 2819,2829 ----
     ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1033.pdb"
  !endif
  
+    File "..\..\doc\help\en_US\afs-light.CNT"
+    File "..\..\doc\help\en_US\afs-light.hlp"
+    File "..\..\doc\help\en_US\afs-nt.CNT"
+    File "..\..\doc\help\en_US\afs-nt.HLP"
+ 
     SetOutPath "$INSTDIR\Common"
     !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1033.dll"           "$INSTDIR\Common\afs_config_1033.dll" "$INSTDIR"
     !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.dll"              "$INSTDIR\Common\afs_cpa_1033.dll" "$INSTDIR"
***************
*** 2825,2834 ****
     !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1033.dll"   "$INSTDIR\Common\TaAfsServerManager_1033.dll" "$INSTDIR"
     File "..\..\doc\help\en_US\afs-cc.CNT"
     File "..\..\doc\help\en_US\afs-cc.hlp"
-    File "..\..\doc\help\en_US\afs-light.CNT"
-    File "..\..\doc\help\en_US\afs-light.hlp"
-    File "..\..\doc\help\en_US\afs-nt.CNT"
-    File "..\..\doc\help\en_US\afs-nt.HLP"
     File "..\..\doc\help\en_US\taafscfg.CNT"
     File "..\..\doc\help\en_US\taafscfg.hlp"
     File "..\..\doc\help\en_US\taafssvrmgr.CNT"
--- 2836,2841 ----
***************
*** 2871,2876 ****
--- 2878,2888 ----
     ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1032.pdb"
  !endif
  
+    File "..\..\doc\help\de_DE\afs-light.CNT"
+    File "..\..\doc\help\de_DE\afs-light.hlp"
+    File "..\..\doc\help\de_DE\afs-nt.CNT"
+    File "..\..\doc\help\de_DE\afs-nt.HLP"
+ 
     SetOutPath "$INSTDIR\Common"
     !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1032.dll"           "$INSTDIR\Common\afs_config_1032.dll" "$INSTDIR"
     !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1032.dll"              "$INSTDIR\Common\afs_cpa_1032.dll" "$INSTDIR" 
***************
*** 2883,2892 ****
     !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1032.dll"   "$INSTDIR\Common\TaAfsServerManager_1032.dll" "$INSTDIR" 
     File "..\..\doc\help\de_DE\afs-cc.CNT"
     File "..\..\doc\help\de_DE\afs-cc.hlp"
-    File "..\..\doc\help\de_DE\afs-light.CNT"
-    File "..\..\doc\help\de_DE\afs-light.hlp"
-    File "..\..\doc\help\de_DE\afs-nt.CNT"
-    File "..\..\doc\help\de_DE\afs-nt.HLP"
     File "..\..\doc\help\de_DE\taafscfg.CNT"
     File "..\..\doc\help\de_DE\taafscfg.hlp"
     File "..\..\doc\help\de_DE\taafssvrmgr.CNT"
--- 2895,2900 ----
***************
*** 2929,2934 ****
--- 2937,2947 ----
     ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1034.pdb"
  !endif
  
+    File "..\..\doc\help\es_ES\afs-light.CNT"
+    File "..\..\doc\help\es_ES\afs-light.hlp"
+    File "..\..\doc\help\es_ES\afs-nt.CNT"
+    File "..\..\doc\help\es_ES\afs-nt.HLP"
+ 
     SetOutPath "$INSTDIR\Common"
     !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1034.dll"          "$INSTDIR\Common\afs_config_1034.dll" "$INSTDIR"  
     !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1034.dll"             "$INSTDIR\Common\afs_cpa_1034.dll" "$INSTDIR"  
***************
*** 2941,2950 ****
     !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1034.dll"  "$INSTDIR\Common\TaAfsServerManager_1034.dll" "$INSTDIR"  
     File "..\..\doc\help\es_ES\afs-cc.CNT"
     File "..\..\doc\help\es_ES\afs-cc.hlp"
-    File "..\..\doc\help\es_ES\afs-light.CNT"
-    File "..\..\doc\help\es_ES\afs-light.hlp"
-    File "..\..\doc\help\es_ES\afs-nt.CNT"
-    File "..\..\doc\help\es_ES\afs-nt.HLP"
     File "..\..\doc\help\es_ES\taafscfg.CNT"
     File "..\..\doc\help\es_ES\taafscfg.hlp"
     File "..\..\doc\help\es_ES\taafssvrmgr.CNT"
--- 2954,2959 ----
***************
*** 2987,2992 ****
--- 2996,3006 ----
     ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1041.pdb"
  !endif
  
+    File "..\..\doc\help\ja_JP\afs-light.CNT"
+    File "..\..\doc\help\ja_JP\afs-light.hlp"
+    File "..\..\doc\help\ja_JP\afs-nt.CNT"
+    File "..\..\doc\help\ja_JP\afs-nt.HLP"
+ 
     SetOutPath "$INSTDIR\Common"
     !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1041.dll"           "$INSTDIR\Common\afs_config_1041.dll" "$INSTDIR"   
     !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1041.dll"              "$INSTDIR\Common\afs_cpa_1041.dll" "$INSTDIR"   
***************
*** 2999,3008 ****
     !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1041.dll"   "$INSTDIR\Common\TaAfsServerManager_1041.dll" "$INSTDIR"   
     File "..\..\doc\help\ja_JP\afs-cc.CNT"
     File "..\..\doc\help\ja_JP\afs-cc.hlp"
-    File "..\..\doc\help\ja_JP\afs-light.CNT"
-    File "..\..\doc\help\ja_JP\afs-light.hlp"
-    File "..\..\doc\help\ja_JP\afs-nt.CNT"
-    File "..\..\doc\help\ja_JP\afs-nt.HLP"
     File "..\..\doc\help\ja_JP\taafscfg.CNT"
     File "..\..\doc\help\ja_JP\taafscfg.hlp"
     File "..\..\doc\help\ja_JP\taafssvrmgr.CNT"
--- 3013,3018 ----
***************
*** 3045,3050 ****
--- 3055,3065 ----
     ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1042.pdb"
  !endif
  
+    File "..\..\doc\help\ko_KR\afs-light.CNT"
+    File "..\..\doc\help\ko_KR\afs-light.hlp"
+    File "..\..\doc\help\ko_KR\afs-nt.CNT"
+    File "..\..\doc\help\ko_KR\afs-nt.HLP"
+ 
     SetOutPath "$INSTDIR\Common"
     !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1042.dll"           "$INSTDIR\Common\afs_config_1042.dll" "$INSTDIR"    
     !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1042.dll"              "$INSTDIR\Common\afs_cpa_1042.dll" "$INSTDIR"    
***************
*** 3057,3066 ****
     !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1042.dll"   "$INSTDIR\Common\TaAfsServerManager_1042.dll" "$INSTDIR"    
     File "..\..\doc\help\ko_KR\afs-cc.CNT"
     File "..\..\doc\help\ko_KR\afs-cc.hlp"
-    File "..\..\doc\help\ko_KR\afs-light.CNT"
-    File "..\..\doc\help\ko_KR\afs-light.hlp"
-    File "..\..\doc\help\ko_KR\afs-nt.CNT"
-    File "..\..\doc\help\ko_KR\afs-nt.HLP"
     File "..\..\doc\help\ko_KR\taafscfg.CNT"
     File "..\..\doc\help\ko_KR\taafscfg.hlp"
     File "..\..\doc\help\ko_KR\taafssvrmgr.CNT"
--- 3072,3077 ----
***************
*** 3104,3109 ****
--- 3115,3125 ----
     ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1046.pdb"
  !endif
  
+    File "..\..\doc\help\pt_BR\afs-light.CNT"
+    File "..\..\doc\help\pt_BR\afs-light.hlp"
+    File "..\..\doc\help\pt_BR\afs-nt.CNT"
+    File "..\..\doc\help\pt_BR\afs-nt.HLP"
+ 
     SetOutPath "$INSTDIR\Common"
     !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1046.dll"           "$INSTDIR\Common\afs_config_1046.dll" "$INSTDIR"     
     !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1046.dll"              "$INSTDIR\Common\afs_cpa_1046.dll" "$INSTDIR"     
***************
*** 3116,3125 ****
     !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1046.dll"   "$INSTDIR\Common\TaAfsServerManager_1046.dll" "$INSTDIR"     
     File "..\..\doc\help\pt_BR\afs-cc.CNT"
     File "..\..\doc\help\pt_BR\afs-cc.hlp"
-    File "..\..\doc\help\pt_BR\afs-light.CNT"
-    File "..\..\doc\help\pt_BR\afs-light.hlp"
-    File "..\..\doc\help\pt_BR\afs-nt.CNT"
-    File "..\..\doc\help\pt_BR\afs-nt.HLP"
     File "..\..\doc\help\pt_BR\taafscfg.CNT"
     File "..\..\doc\help\pt_BR\taafscfg.hlp"
     File "..\..\doc\help\pt_BR\taafssvrmgr.CNT"
--- 3132,3137 ----
***************
*** 3162,3167 ****
--- 3174,3184 ----
     ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_2052.pdb"
  !endif
  
+    File "..\..\doc\help\zh_CN\afs-light.CNT"
+    File "..\..\doc\help\zh_CN\afs-light.hlp"
+    File "..\..\doc\help\zh_CN\afs-nt.CNT"
+    File "..\..\doc\help\zh_CN\afs-nt.HLP"
+ 
     SetOutPath "$INSTDIR\Common"
     !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_2052.dll"           "$INSTDIR\Common\afs_config_2052.dll" "$INSTDIR"      
     !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_2052.dll"              "$INSTDIR\Common\afs_cpa_2052.dll" "$INSTDIR"      
***************
*** 3174,3183 ****
     !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_2052.dll"   "$INSTDIR\Common\TaAfsServerManager_2052.dll" "$INSTDIR"      
     File "..\..\doc\help\zh_CN\afs-cc.CNT"
     File "..\..\doc\help\zh_CN\afs-cc.hlp"
-    File "..\..\doc\help\zh_CN\afs-light.CNT"
-    File "..\..\doc\help\zh_CN\afs-light.hlp"
-    File "..\..\doc\help\zh_CN\afs-nt.CNT"
-    File "..\..\doc\help\zh_CN\afs-nt.HLP"
     File "..\..\doc\help\zh_CN\taafscfg.CNT"
     File "..\..\doc\help\zh_CN\taafscfg.hlp"
     File "..\..\doc\help\zh_CN\taafssvrmgr.CNT"
--- 3191,3196 ----
***************
*** 3220,3225 ****
--- 3233,3243 ----
     ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1028.pdb"
  !endif
  
+    File "..\..\doc\help\zh_TW\afs-light.CNT"
+    File "..\..\doc\help\zh_TW\afs-light.hlp"
+    File "..\..\doc\help\zh_TW\afs-nt.CNT"
+    File "..\..\doc\help\zh_TW\afs-nt.HLP"
+ 
     SetOutPath "$INSTDIR\Common"
     !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1028.dll"           "$INSTDIR\Common\afs_config_1028.dll" "$INSTDIR"       
     !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1028.dll"              "$INSTDIR\Common\afs_cpa_1028.dll" "$INSTDIR"       
***************
*** 3232,3241 ****
     !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1028.dll"   "$INSTDIR\Common\TaAfsServerManager_1028.dll" "$INSTDIR"       
     File "..\..\doc\help\zh_TW\afs-cc.CNT"
     File "..\..\doc\help\zh_TW\afs-cc.hlp"
-    File "..\..\doc\help\zh_TW\afs-light.CNT"
-    File "..\..\doc\help\zh_TW\afs-light.hlp"
-    File "..\..\doc\help\zh_TW\afs-nt.CNT"
-    File "..\..\doc\help\zh_TW\afs-nt.HLP"
     File "..\..\doc\help\zh_TW\taafscfg.CNT"
     File "..\..\doc\help\zh_TW\taafscfg.hlp"
     File "..\..\doc\help\zh_TW\taafssvrmgr.CNT"
--- 3250,3255 ----
Index: openafs/src/WINNT/install/wix/files.wxi
diff -c openafs/src/WINNT/install/wix/files.wxi:1.9.2.9 openafs/src/WINNT/install/wix/files.wxi:1.9.2.10
*** openafs/src/WINNT/install/wix/files.wxi:1.9.2.9	Mon Sep 26 22:42:26 2005
--- openafs/src/WINNT/install/wix/files.wxi	Fri Jun 23 23:05:44 2006
***************
*** 138,149 ****
                  </Component>
  
                  <Directory Id="dirCommon_en_US" Name="en_US" src="$(var.SrcDir)\WINNT\doc\help\en_US\">
-                     <Component Id="cmf_afs_nt_HLP_en_US" Guid="A59FF1E3-984F-47E0-8A65-590A01B6E1C4">
-                         <File Id="fileafs_nt_HLP_en_US" Name="afs-nt.hlp" LongName="afs-nt.hlp" KeyPath="yes" DiskId="1">
- 							<Shortcut Id="scClientHelp_en_US" Directory="dirShortCut" Name="CliHelp.lnk" LongName="Client Help.lnk" Description="$(loc.StrHlpFileDesc)" Icon="ico_Help" IconIndex="0" Show="normal" WorkingDirectory="dirCommon" />
-                         </File>
-                         <File Id="fileafs_nt2_CNT_en_US" Name="afs-nt.cnt" LongName="afs-nt.cnt" DiskId="1"  />
-                     </Component>
  
                      <Component Id="cmp_Lang_en_US" Guid="9B6B5AB2-8BD1-402D-BFC0-63255740A653">
                          <File Id="filetaafssvrmgr_CNT_en_US" Name="taafs.cnt" LongName="taafssvrmgr.cnt" DiskId="1" />
--- 138,143 ----
***************
*** 806,811 ****
--- 800,813 ----
                      <Component Id="cmf_afsdacl_EXE" Guid="215DBC86-A5E8-4622-8A95-0E5830B04D0B">
                          <File Id="fileafsdacl_EXE" Name="afsdacl.exe" KeyPath="yes" DiskId="1" />
                      </Component>
+ 
+                     <Component Id="cmf_afs_nt_HLP_en_US" Guid="E9CAF872-E71B-466E-9560-9E6F542128E4">
+                         <File Id="fileafs_nt_HLP_en_US" Name="afs-nt.hlp" LongName="afs-nt.hlp" KeyPath="yes" DiskId="1" src="$(var.SrcDir)WINNT\doc\help\en_US\afs-nt.hlp">
+ 							<Shortcut Id="scClientHelp_en_US" Directory="dirShortCut" Name="CliHelp.lnk" LongName="Client Help.lnk" Description="$(loc.StrHlpFileDesc)" Icon="ico_Help" IconIndex="0" Show="normal" WorkingDirectory="dirCommon" />
+                         </File>
+                         <File Id="fileafs_nt2_CNT_en_US" Name="afs-nt.cnt" LongName="afs-nt.cnt" DiskId="1" src="$(var.SrcDir)WINNT\doc\help\en_US\afs-nt.cnt" />
+                     </Component>
+ 
                      <Component Id="cmf_afscreds_EXE" Guid="A17567CF-866E-49AF-A717-0B4F17CA88D4">
                          <File Id="fileafscreds_EXE" Name="afscreds.exe" LongName="afscreds.exe" KeyPath="yes" DiskId="1">
  							<Shortcut Id="scAfsCreds" Directory="dirShortCut" Name="Auth.lnk" LongName="Authentication.lnk" Description="$(loc.StrAfsCredsDesc)" Arguments="[CREDSAUTOINIT] [CREDSRENEWDRMAP] [CREDSIPCHDET] [CREDSQUIET] [CREDSSHOW]" Icon="ico_afscreds" IconIndex="0" Show="normal" WorkingDirectory="dirCommon" />
Index: openafs/src/afs/OBSD/osi_file.c
diff -c openafs/src/afs/OBSD/osi_file.c:1.10 openafs/src/afs/OBSD/osi_file.c:1.10.2.1
*** openafs/src/afs/OBSD/osi_file.c:1.10	Wed Mar 10 18:01:52 2004
--- openafs/src/afs/OBSD/osi_file.c	Fri Jun 23 10:21:12 2006
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/OBSD/osi_file.c,v 1.10 2004/03/10 23:01:52 rees Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afs/afsincludes.h"	/* Afs-based standard headers */
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/OBSD/osi_file.c,v 1.10.2.1 2006/06/23 14:21:12 rees Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afs/afsincludes.h"	/* Afs-based standard headers */
***************
*** 48,54 ****
--- 48,58 ----
      }
      VOP_UNLOCK(vp, 0, curproc);
      afile->vnode = vp;
+ #ifdef AFS_OBSD39_ENV
+     afile->size = VTOI(vp)->i_ffs1_size;
+ #else
      afile->size = VTOI(vp)->i_ffs_size;
+ #endif
      afile->offset = 0;
      afile->proc = NULL;
      afile->inum = ainode;	/* for hint validity checking */
Index: openafs/src/afs/OBSD/osi_groups.c
diff -c openafs/src/afs/OBSD/osi_groups.c:1.5 openafs/src/afs/OBSD/osi_groups.c:1.5.2.1
*** openafs/src/afs/OBSD/osi_groups.c:1.5	Tue Jul 15 19:14:25 2003
--- openafs/src/afs/OBSD/osi_groups.c	Fri Jun 23 10:21:12 2006
***************
*** 19,25 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/OBSD/osi_groups.c,v 1.5 2003/07/15 23:14:25 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afs/afsincludes.h"
--- 19,25 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/OBSD/osi_groups.c,v 1.5.2.1 2006/06/23 14:21:12 rees Exp $");
  
  #include "afs/sysincludes.h"
  #include "afs/afsincludes.h"
***************
*** 47,56 ****
      struct vrequest treq;
  
      AFS_STATCNT(afs_xsetgroups);
!     AFS_GLOCK();
  
      code = afs_InitReq(&treq, p->p_rcred);
!     AFS_GUNLOCK();
      if (code)
  	return code;
  
--- 47,56 ----
      struct vrequest treq;
  
      AFS_STATCNT(afs_xsetgroups);
!     AFS_GLOCKP(p);
  
      code = afs_InitReq(&treq, p->p_rcred);
!     AFS_GUNLOCKP(p);
      if (code)
  	return code;
  
***************
*** 61,70 ****
       */
      if (PagInCred(p->p_rcred) == NOPAG) {
  	if (((treq.uid >> 24) & 0xff) == 'A') {
! 	    AFS_GLOCK();
  	    /* we've already done a setpag, so now we redo it */
  	    AddPag(p, treq.uid, &p->p_rcred);
! 	    AFS_GUNLOCK();
  	}
      }
      return code;
--- 61,70 ----
       */
      if (PagInCred(p->p_rcred) == NOPAG) {
  	if (((treq.uid >> 24) & 0xff) == 'A') {
! 	    AFS_GLOCKP(p);
  	    /* we've already done a setpag, so now we redo it */
  	    AddPag(p, treq.uid, &p->p_rcred);
! 	    AFS_GUNLOCKP(p);
  	}
      }
      return code;
Index: openafs/src/afs/OBSD/osi_machdep.h
diff -c openafs/src/afs/OBSD/osi_machdep.h:1.16.2.6 openafs/src/afs/OBSD/osi_machdep.h:1.16.2.7
*** openafs/src/afs/OBSD/osi_machdep.h:1.16.2.6	Mon May 22 15:08:47 2006
--- openafs/src/afs/OBSD/osi_machdep.h	Fri Jun 23 10:21:12 2006
***************
*** 16,22 ****
   * afs_osi.h.
   */
  
! /* $Id: osi_machdep.h,v 1.16.2.6 2006/05/22 19:08:47 shadow Exp $ */
  
  #ifndef _OSI_MACHDEP_H_
  #define _OSI_MACHDEP_H_
--- 16,22 ----
   * afs_osi.h.
   */
  
! /* $Id: osi_machdep.h,v 1.16.2.7 2006/06/23 14:21:12 rees Exp $ */
  
  #ifndef _OSI_MACHDEP_H_
  #define _OSI_MACHDEP_H_
***************
*** 104,133 ****
  #define	gop_lookupname(fnamep, segflg, followlink, compvpp) \
  	afs_nbsd_lookupname((fnamep), (segflg), (followlink), (compvpp))
  
  #ifdef KERNEL
  
  #ifdef AFS_GLOBAL_SUNLOCK
  extern struct proc *afs_global_owner;
  extern struct lock afs_global_lock;
! #define AFS_GLOCK() \
      do { \
!         osi_Assert(curproc); \
!  	lockmgr(&afs_global_lock, LK_EXCLUSIVE, 0, curproc); \
          osi_Assert(afs_global_owner == NULL); \
!    	afs_global_owner = curproc; \
      } while (0)
! #define AFS_GUNLOCK() \
      do { \
!         osi_Assert(curproc); \
!  	osi_Assert(afs_global_owner == curproc); \
          afs_global_owner = NULL; \
!         lockmgr(&afs_global_lock, LK_RELEASE, 0, curproc); \
      } while(0)
  #define ISAFS_GLOCK() (afs_global_owner == curproc && curproc)
  #else
! extern struct simplelock afs_global_lock;
! #define AFS_GLOCK()
! #define AFS_GUNLOCK()
  #define AFS_ASSERT_GLOCK()
  #define ISAFS_GLOCK() 1
  #endif
--- 104,141 ----
  #define	gop_lookupname(fnamep, segflg, followlink, compvpp) \
  	afs_nbsd_lookupname((fnamep), (segflg), (followlink), (compvpp))
  
+ #ifdef AFS_OBSD39_ENV
+ #define afs_osi_lockmgr(l, f, i, p) lockmgr((l), (f), (i))
+ #else
+ #define afs_osi_lockmgr(l, f, i, p) lockmgr((l), (f), (i), (p))
+ #endif
+ 
  #ifdef KERNEL
  
+ #define AFS_GLOCK() AFS_GLOCKP(curproc)
+ #define AFS_GUNLOCK() AFS_GUNLOCKP(curproc)
  #ifdef AFS_GLOBAL_SUNLOCK
  extern struct proc *afs_global_owner;
  extern struct lock afs_global_lock;
! #define AFS_GLOCKP(p) \
      do { \
!         osi_Assert(p); \
!  	afs_osi_lockmgr(&afs_global_lock, LK_EXCLUSIVE, 0, (p)); \
          osi_Assert(afs_global_owner == NULL); \
!    	afs_global_owner = (p); \
      } while (0)
! #define AFS_GUNLOCKP(p) \
      do { \
!         osi_Assert(p); \
!  	osi_Assert(afs_global_owner == (p)); \
          afs_global_owner = NULL; \
!         afs_osi_lockmgr(&afs_global_lock, LK_RELEASE, 0, (p)); \
      } while(0)
  #define ISAFS_GLOCK() (afs_global_owner == curproc && curproc)
  #else
! extern struct lock afs_global_lock;
! #define AFS_GLOCKP(p)
! #define AFS_GUNLOCKP(p)
  #define AFS_ASSERT_GLOCK()
  #define ISAFS_GLOCK() 1
  #endif
Index: openafs/src/afs/OBSD/osi_vnodeops.c
diff -c openafs/src/afs/OBSD/osi_vnodeops.c:1.18.2.1 openafs/src/afs/OBSD/osi_vnodeops.c:1.18.2.2
*** openafs/src/afs/OBSD/osi_vnodeops.c:1.18.2.1	Sun Jan 30 23:18:25 2005
--- openafs/src/afs/OBSD/osi_vnodeops.c	Fri Jun 23 10:21:12 2006
***************
*** 3,9 ****
   * Original NetBSD version for Transarc afs by John Kohl <jtk@MIT.EDU>
   * OpenBSD version by Jim Rees <rees@umich.edu>
   *
!  * $Id: osi_vnodeops.c,v 1.18.2.1 2005/01/31 04:18:25 shadow Exp $
   */
  
  /*
--- 3,9 ----
   * Original NetBSD version for Transarc afs by John Kohl <jtk@MIT.EDU>
   * OpenBSD version by Jim Rees <rees@umich.edu>
   *
!  * $Id: osi_vnodeops.c,v 1.18.2.2 2006/06/23 14:21:12 rees Exp $
   */
  
  /*
***************
*** 99,105 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/OBSD/osi_vnodeops.c,v 1.18.2.1 2005/01/31 04:18:25 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afs/afsincludes.h"	/* Afs-based standard headers */
--- 99,105 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/OBSD/osi_vnodeops.c,v 1.18.2.2 2006/06/23 14:21:12 rees Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afs/afsincludes.h"	/* Afs-based standard headers */
***************
*** 933,939 ****
  
      if (!vc)
  	panic("afs_nbsd_lock: null vcache");
!     return lockmgr(&vc->rwlock, ap->a_flags | LK_CANRECURSE, &vp->v_interlock,
  		   ap->a_p);
  }
  
--- 933,939 ----
  
      if (!vc)
  	panic("afs_nbsd_lock: null vcache");
!     return afs_osi_lockmgr(&vc->rwlock, ap->a_flags | LK_CANRECURSE, &vp->v_interlock,
  		   ap->a_p);
  }
  
***************
*** 950,956 ****
  
      if (!vc)
  	panic("afs_nbsd_unlock: null vcache");
!     return lockmgr(&vc->rwlock, ap->a_flags | LK_RELEASE, &vp->v_interlock,
  		   ap->a_p);
  }
  
--- 950,956 ----
  
      if (!vc)
  	panic("afs_nbsd_unlock: null vcache");
!     return afs_osi_lockmgr(&vc->rwlock, ap->a_flags | LK_RELEASE, &vp->v_interlock,
  		   ap->a_p);
  }
  
Index: openafs/src/afs/SOLARIS/osi_vfsops.c
diff -c openafs/src/afs/SOLARIS/osi_vfsops.c:1.18 openafs/src/afs/SOLARIS/osi_vfsops.c:1.18.2.1
*** openafs/src/afs/SOLARIS/osi_vfsops.c:1.18	Thu Jun 24 13:38:24 2004
--- openafs/src/afs/SOLARIS/osi_vfsops.c	Fri Jun 30 10:06:11 2006
***************
*** 14,20 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/SOLARIS/osi_vfsops.c,v 1.18 2004/06/24 17:38:24 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.2.1 2006/06/30 14:06:11 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 277,283 ****
  int (*afs_orig_ioctl) (), (*afs_orig_ioctl32) ();
  int (*afs_orig_setgroups) (), (*afs_orig_setgroups32) ();
  
- struct streamtab *udp_infop = 0;
  #ifndef AFS_SUN510_ENV
  struct ill_s *ill_g_headp = 0;
  #endif
--- 277,282 ----
***************
*** 297,302 ****
--- 296,315 ----
  
  extern Afs_syscall();
  
+ static void *
+ do_mod_lookup(const char * mod, const char * sym)
+ {
+     void * ptr;
+ 
+     ptr = modlookup(mod, sym);
+     if (ptr == NULL) {
+         afs_warn("modlookup failed for symbol '%s' in module '%s'\n",
+ 		 sym, mod);
+     }
+ 
+     return ptr;
+ }
+ 
  #ifdef AFS_SUN510_ENV
  afsinit(int fstype, char *dummy)
  #else
***************
*** 318,381 ****
      afs_orig_ioctl32 = sysent32[SYS_ioctl].sy_call;
      sysent32[SYS_setgroups].sy_callc = afs_xsetgroups;
      sysent32[SYS_ioctl].sy_call = afs_xioctl;
! #endif
  
  #ifdef AFS_SUN510_ENV
      vfs_setfsops(fstype, afs_vfsops_template, &afs_vfsopsp);
      afsfstype = fstype;
      vn_make_ops("afs", afs_vnodeops_template, &afs_ops);
! #else
      vfsswp->vsw_vfsops = &Afs_vfsops;
      afsfstype = fstype;
! #endif
  
  
! #if	!defined(AFS_NONFSTRANS)
!     nfs_rfsdisptab_v2 = (int (*)())modlookup("nfssrv", "rfsdisptab_v2");
!     if (!nfs_rfsdisptab_v2) {
! 	afs_warn("warning : rfsdisptab_v2 NOT FOUND\n");
!     }
!     if (nfs_rfsdisptab_v2) {
! 	nfs_acldisptab_v2 = (int (*)())modlookup("nfssrv", "acldisptab_v2");
! 	if (!nfs_acldisptab_v2) {
! 	    afs_warn("warning : acldisptab_v2 NOT FOUND\n");
! 	} else {
  	    afs_xlatorinit_v2(nfs_rfsdisptab_v2, nfs_acldisptab_v2);
  	}
      }
!     nfs_rfsdisptab_v3 = (int (*)())modlookup("nfssrv", "rfsdisptab_v3");
!     if (!nfs_rfsdisptab_v3) {
! 	afs_warn("warning : rfsdisptab_v3 NOT FOUND\n");
!     }
!     if (nfs_rfsdisptab_v3) {
! 	nfs_acldisptab_v3 = (int (*)())modlookup("nfssrv", "acldisptab_v3");
! 	if (!nfs_acldisptab_v3) {
! 	    afs_warn("warning : acldisptab_v3 NOT FOUND\n");
! 	} else {
  	    afs_xlatorinit_v3(nfs_rfsdisptab_v3, nfs_acldisptab_v3);
  	}
      }
  
!     nfs_checkauth = (int (*)())modlookup("nfssrv", "checkauth");
!     if (!nfs_checkauth)
! 	afs_warn("nfs_checkauth not initialised");
! #endif
!     ufs_iallocp = (int (*)())modlookup("ufs", "ufs_ialloc");
!     ufs_iupdatp = (void (*)())modlookup("ufs", "ufs_iupdat");
!     ufs_igetp = (int (*)())modlookup("ufs", "ufs_iget");
!     ufs_itimes_nolockp = (void (*)())modlookup("ufs", "ufs_itimes_nolock");
!     udp_infop = (struct streamtab *)modlookup("udp", "udpinfo");
! #ifdef AFS_SUN510_ENV
!     if (!ufs_iallocp || !ufs_iupdatp || !ufs_itimes_nolockp || !ufs_igetp
! 	|| !udp_infop)
! 	afs_warn("AFS to UFS mapping cannot be fully initialised\n");
! #else
!     ill_g_headp = (struct ill_s *)modlookup("ip", "ill_g_head");
  
!     if (!ufs_iallocp || !ufs_iupdatp || !ufs_itimes_nolockp || !ufs_igetp
! 	|| !udp_infop || !ill_g_headp)
  	afs_warn("AFS to UFS mapping cannot be fully initialised\n");
! #endif
  
      afs_sinited = 1;
      return 0;
--- 331,379 ----
      afs_orig_ioctl32 = sysent32[SYS_ioctl].sy_call;
      sysent32[SYS_setgroups].sy_callc = afs_xsetgroups;
      sysent32[SYS_ioctl].sy_call = afs_xioctl;
! #endif /* AFS_SUN57_64BIT_ENV */
  
  #ifdef AFS_SUN510_ENV
      vfs_setfsops(fstype, afs_vfsops_template, &afs_vfsopsp);
      afsfstype = fstype;
      vn_make_ops("afs", afs_vnodeops_template, &afs_ops);
! #else /* !AFS_SUN510_ENV */
      vfsswp->vsw_vfsops = &Afs_vfsops;
      afsfstype = fstype;
! #endif /* !AFS_SUN510_ENV */
  
  
! #if !defined(AFS_NONFSTRANS)
!     nfs_rfsdisptab_v2 = (int (*)()) do_mod_lookup("nfssrv", "rfsdisptab_v2");
!     if (nfs_rfsdisptab_v2 != NULL) {
! 	nfs_acldisptab_v2 = (int (*)()) do_mod_lookup("nfssrv", "acldisptab_v2");
! 	if (nfs_acldisptab_v2 != NULL) {
  	    afs_xlatorinit_v2(nfs_rfsdisptab_v2, nfs_acldisptab_v2);
  	}
      }
!     nfs_rfsdisptab_v3 = (int (*)()) do_mod_lookup("nfssrv", "rfsdisptab_v3");
!     if (nfs_rfsdisptab_v3 != NULL) {
! 	nfs_acldisptab_v3 = (int (*)()) do_mod_lookup("nfssrv", "acldisptab_v3");
! 	if (nfs_acldisptab_v3 != NULL) {
  	    afs_xlatorinit_v3(nfs_rfsdisptab_v3, nfs_acldisptab_v3);
  	}
      }
  
!     nfs_checkauth = (int (*)()) do_mod_lookup("nfssrv", "checkauth");
! #endif /* !AFS_NONFSTRANS */
  
!     ufs_iallocp = (int (*)()) do_mod_lookup("ufs", "ufs_ialloc");
!     ufs_iupdatp = (void (*)()) do_mod_lookup("ufs", "ufs_iupdat");
!     ufs_igetp = (int (*)()) do_mod_lookup("ufs", "ufs_iget");
!     ufs_itimes_nolockp = (void (*)()) do_mod_lookup("ufs", "ufs_itimes_nolock");
! 
!     if (!ufs_iallocp || !ufs_iupdatp || !ufs_itimes_nolockp || !ufs_igetp) {
  	afs_warn("AFS to UFS mapping cannot be fully initialised\n");
!     }
! 
! #if !defined(AFS_SUN510_ENV)
!     ill_g_headp = (struct ill_s *) do_mod_lookup("ip", "ill_g_head");
! #endif /* !AFS_SUN510_ENV */
  
      afs_sinited = 1;
      return 0;
Index: openafs/src/afs/SOLARIS/osi_vnodeops.c
diff -c openafs/src/afs/SOLARIS/osi_vnodeops.c:1.20.2.8 openafs/src/afs/SOLARIS/osi_vnodeops.c:1.20.2.9
*** openafs/src/afs/SOLARIS/osi_vnodeops.c:1.20.2.8	Mon Feb 13 13:39:11 2006
--- openafs/src/afs/SOLARIS/osi_vnodeops.c	Mon Jul  3 14:43:39 2006
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/SOLARIS/osi_vnodeops.c,v 1.20.2.8 2006/02/13 18:39:11 shadow Exp $");
  
  /*
   * SOLARIS/osi_vnodeops.c
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/SOLARIS/osi_vnodeops.c,v 1.20.2.9 2006/07/03 18:43:39 jaltman Exp $");
  
  /*
   * SOLARIS/osi_vnodeops.c
***************
*** 1698,1708 ****
  	    struct vnode *vp = AFSTOV(avcp), *pvp = AFSTOV(andp);
  	    
  	    mutex_enter(&vp->v_lock);
! 	    kmem_free(vp->v_path, strlen(vp->v_path) + 1);
! 	    vp->v_path = NULL;
  	    mutex_exit(&vp->v_lock);
! 	    VN_SETPATH(afs_globalVp, pvp, vp, aname2, strlen(aname2));
! 	    
  	    AFS_RELE(avcp);
  	}
      }
--- 1698,1710 ----
  	    struct vnode *vp = AFSTOV(avcp), *pvp = AFSTOV(andp);
  	    
  	    mutex_enter(&vp->v_lock);
! 	    if (vp->v_path != NULL) {
! 		kmem_free(vp->v_path, strlen(vp->v_path) + 1);
! 		vp->v_path = NULL;
! 	    }
  	    mutex_exit(&vp->v_lock);
! 	    vn_setpath(afs_globalVp, pvp, vp, aname2, strlen(aname2));
! 
  	    AFS_RELE(avcp);
  	}
      }
Index: openafs/src/auth/NTMakefile
diff -c openafs/src/auth/NTMakefile:1.9 openafs/src/auth/NTMakefile:1.9.2.1
*** openafs/src/auth/NTMakefile:1.9	Sat Jun 19 00:21:14 2004
--- openafs/src/auth/NTMakefile	Sun Jul  2 21:12:01 2006
***************
*** 110,116 ****
  
  install_headers: $(INCFILES)
  
! install: $(AFSAUTH_LIBFILE) $(OUT)\setkey.exe # $(COPYAUTH_EXEFILE) $(AFSAUTH_KRB_LIBFILE)
  
  install9x: install
  
--- 110,116 ----
  
  install_headers: $(INCFILES)
  
! install: $(AFSAUTH_LIBFILE) $(AFSAUTH_KRB_LIBFILE) $(OUT)\setkey.exe # $(COPYAUTH_EXEFILE)
  
  install9x: install
  
Index: openafs/src/bozo/bnode.c
diff -c openafs/src/bozo/bnode.c:1.17.2.1 openafs/src/bozo/bnode.c:1.17.2.2
*** openafs/src/bozo/bnode.c:1.17.2.1	Mon Jul 11 15:29:32 2005
--- openafs/src/bozo/bnode.c	Tue Jun 20 17:40:46 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bnode.c,v 1.17.2.1 2005/07/11 19:29:32 shadow Exp $");
  
  #include <stddef.h>
  #include <stdlib.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bnode.c,v 1.17.2.2 2006/06/20 21:40:46 shadow Exp $");
  
  #include <stddef.h>
  #include <stdlib.h>
***************
*** 738,750 ****
  
  #if defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI51_ENV)
  	ec = setsid();
! #else
! #ifdef AFS_LINUX20_ENV
  	ec = setpgrp();
  #else
  	ec = setpgrp(0, 0);
  #endif
- #endif
  	fout = popen(tb->notifier, "w");
  	if (fout == NULL) {
  	    bozo_Log("BNODE: Failed to find notifier '%s'; ignored\n",
--- 738,748 ----
  
  #if defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_SGI51_ENV)
  	ec = setsid();
! #elif defined(AFS_LINUX20_ENV) || defined(AFS_AIX_ENV)
  	ec = setpgrp();
  #else
  	ec = setpgrp(0, 0);
  #endif
  	fout = popen(tb->notifier, "w");
  	if (fout == NULL) {
  	    bozo_Log("BNODE: Failed to find notifier '%s'; ignored\n",
Index: openafs/src/bozo/bosserver.c
diff -c openafs/src/bozo/bosserver.c:1.23.2.7 openafs/src/bozo/bosserver.c:1.23.2.9
*** openafs/src/bozo/bosserver.c:1.23.2.7	Tue Feb 21 23:09:29 2006
--- openafs/src/bozo/bosserver.c	Tue Jun 20 16:34:59 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bosserver.c,v 1.23.2.7 2006/02/22 04:09:29 jaltman 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.23.2.9 2006/06/20 20:34:59 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 71,76 ****
--- 71,81 ----
  
  struct ktime bozo_nextRestartKT, bozo_nextDayKT;
  int bozo_newKTs;
+ int rxBind = 0;
+ 
+ #define ADDRSPERSITE 16         /* Same global is in rx/rx_user.c */
+ afs_uint32 SHostAddrs[ADDRSPERSITE];
+ 
  #ifdef BOS_RESTRICTED_MODE
  int bozo_isrestricted = 0;
  int bozo_restdisable = 0;
***************
*** 719,724 ****
--- 724,730 ----
      int i;
      char namebuf[AFSDIR_PATH_MAX];
      int rxMaxMTU = -1;
+     afs_uint32 host = htonl(INADDR_ANY);
  #ifndef AFS_NT40_ENV
      int nofork = 0;
      struct stat sb;
***************
*** 813,818 ****
--- 819,827 ----
  	    bozo_isrestricted = 1;
  	}
  #endif
+ 	else if (strcmp(argv[code], "-rxbind") == 0) {
+ 	    rxBind = 1;
+ 	}
  	else if (!strcmp(argv[i], "-rxmaxmtu")) {
  	    if ((i + 1) >= argc) {
  		fprintf(stderr, "missing argument for -rxmaxmtu\n"); 
***************
*** 864,877 ****
  #ifndef AFS_NT40_ENV
  	    printf("Usage: bosserver [-noauth] [-log] "
  		   "[-auditlog <log path>] "
! 		   "[-rxmaxmtu <bytes>] "
  		   "[-syslog[=FACILITY]] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-nofork] " "[-help]\n");
  #else
  	    printf("Usage: bosserver [-noauth] [-log] "
  		   "[-auditlog <log path>] "
! 		   "[-rxmaxmtu <bytes>] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-help]\n");
  #endif
--- 873,886 ----
  #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
***************
*** 1027,1033 ****
  	rx_SetMaxMTU(rxMaxMTU);
      }
  
!     tservice = rx_NewService( /* port */ 0, /* service id */ 1,
  			     /*service name */ "bozo",
  			     /* security classes */
  			     bozo_rxsc,
--- 1036,1061 ----
  	rx_SetMaxMTU(rxMaxMTU);
      }
  
!     if (rxBind) {
! 	afs_int32 ccode;
! #ifndef AFS_NT40_ENV
!         if (AFSDIR_SERVER_NETRESTRICT_FILEPATH || 
!             AFSDIR_SERVER_NETINFO_FILEPATH) {
!             char reason[1024];
!             ccode = parseNetFiles(SHostAddrs, NULL, NULL,
!                                            ADDRSPERSITE, reason,
!                                            AFSDIR_SERVER_NETINFO_FILEPATH,
!                                            AFSDIR_SERVER_NETRESTRICT_FILEPATH);
!         } else 
! #endif	
! 	{
!             ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
!         }
!         if (ccode == 1) 
!             host = SHostAddrs[0];
!     }
! 
!     tservice = rx_NewServiceHost(host,  /* port */ 0, /* service id */ 1,
  			     /*service name */ "bozo",
  			     /* security classes */
  			     bozo_rxsc,
***************
*** 1037,1044 ****
      rx_SetStackSize(tservice, BOZO_LWP_STACKSIZE);	/* so gethostbyname works (in cell stuff) */
  
      tservice =
! 	rx_NewService(0, RX_STATS_SERVICE_ID, "rpcstats", bozo_rxsc, 3,
! 		      RXSTATS_ExecuteRequest);
      rx_SetMinProcs(tservice, 2);
      rx_SetMaxProcs(tservice, 4);
      rx_StartServer(1);		/* donate this process */
--- 1065,1072 ----
      rx_SetStackSize(tservice, BOZO_LWP_STACKSIZE);	/* so gethostbyname works (in cell stuff) */
  
      tservice =
! 	rx_NewServiceHost(host, 0, RX_STATS_SERVICE_ID, "rpcstats", bozo_rxsc,
! 			  3, RXSTATS_ExecuteRequest);
      rx_SetMinProcs(tservice, 2);
      rx_SetMaxProcs(tservice, 4);
      rx_StartServer(1);		/* donate this process */
Index: openafs/src/bucoord/commands.c
diff -c openafs/src/bucoord/commands.c:1.14.2.4 openafs/src/bucoord/commands.c:1.14.2.5
*** openafs/src/bucoord/commands.c:1.14.2.4	Tue Apr 11 15:28:20 2006
--- openafs/src/bucoord/commands.c	Sat Jul  1 11:24:35 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/commands.c,v 1.14.2.4 2006/04/11 19:28:20 shadow Exp $");
  
  #include <afs/stds.h>
  #if defined(AFS_LINUX24_ENV)
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/commands.c,v 1.14.2.5 2006/07/01 15:24:35 shadow Exp $");
  
  #include <afs/stds.h>
  #if defined(AFS_LINUX24_ENV)
***************
*** 1243,1249 ****
  		       &destServ, destPartition, fromDate, newExt, oldFlag,
  		       /*parentDump */ 0, /*dumpLevel */ 0,
  		       bc_Restorer, ports, portCount,
! 		       /*dumpSched */ 0, /*append */ 0, dontExecute);
      if (code)
  	com_err(whoami, code, "; Failed to queue restore");
  
--- 1243,1249 ----
  		       &destServ, destPartition, fromDate, newExt, oldFlag,
  		       /*parentDump */ 0, /*dumpLevel */ 0,
  		       bc_Restorer, ports, portCount,
! 		       /*dumpSched */ NULL, /*append */ 0, dontExecute);
      if (code)
  	com_err(whoami, code, "; Failed to queue restore");
  
***************
*** 1406,1412 ****
  		       &destServ, destPartition, fromDate, newExt, oldFlag,
  		       /*parentDump */ 0, /*dumpLevel */ 0,
  		       bc_Restorer, ports, portCount,
! 		       /*dumpSched */ 0, /*append */ 0, dontExecute);
      if (code)
  	com_err(whoami, code, "; Failed to queue restore");
  
--- 1406,1412 ----
  		       &destServ, destPartition, fromDate, newExt, oldFlag,
  		       /*parentDump */ 0, /*dumpLevel */ 0,
  		       bc_Restorer, ports, portCount,
! 		       /*dumpSched */ NULL, /*append */ 0, dontExecute);
      if (code)
  	com_err(whoami, code, "; Failed to queue restore");
  
***************
*** 1568,1574 ****
  			  newExt, oldFlag,
  			  /*parentDump */ 0, /*dumpLevel */ 0,
  			  bc_Restorer, ports, portCount,
! 			  /*dumpSched */ 0, /*append */ 0, dontExecute);
      if (code)
  	com_err(whoami, code, "; Failed to queue restore");
  
--- 1568,1574 ----
  			  newExt, oldFlag,
  			  /*parentDump */ 0, /*dumpLevel */ 0,
  			  bc_Restorer, ports, portCount,
! 			  /*dumpSched */ NULL, /*append */ 0, dontExecute);
      if (code)
  	com_err(whoami, code, "; Failed to queue restore");
  
***************
*** 1962,1968 ****
  	return (0);
  
      code = bc_StartDmpRst(bc_globalConfig, dumpPath, vsName, volsToDump,
! 			  /*destServer */ 0, /*destPartition */ 0,
  			  /*fromDate */ 0,
  			  /*newExt */ NULL, /*oldFlag */ 0,
  			  parent, level, bc_Dumper, portp, /*portCount */ 1,
--- 1962,1968 ----
  	return (0);
  
      code = bc_StartDmpRst(bc_globalConfig, dumpPath, vsName, volsToDump,
! 			  /*destServer */ NULL, /*destPartition */ 0,
  			  /*fromDate */ 0,
  			  /*newExt */ NULL, /*oldFlag */ 0,
  			  parent, level, bc_Dumper, portp, /*portCount */ 1,
Index: openafs/src/budb/server.c
diff -c openafs/src/budb/server.c:1.14.2.2 openafs/src/budb/server.c:1.14.2.4
*** openafs/src/budb/server.c:1.14.2.2	Mon Feb 13 12:57:27 2006
--- openafs/src/budb/server.c	Tue Jun 20 16:35:00 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/server.c,v 1.14.2.2 2006/02/13 17:57:27 jaltman Exp $");
  
  #include <fcntl.h>
  #include <sys/stat.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/server.c,v 1.14.2.4 2006/06/20 20:35:00 jaltman Exp $");
  
  #include <fcntl.h>
  #include <sys/stat.h>
***************
*** 76,81 ****
--- 76,86 ----
  /* debugging control */
  int debugging = 0;
  
+ int rxBind = 0;
+ 
+ #define ADDRSPERSITE 16         /* Same global is in rx/rx_user.c */
+ afs_uint32 SHostAddrs[ADDRSPERSITE];
+ 
  #if defined(AFS_PTHREAD_ENV)
  char *
  threadNum(void)
***************
*** 357,367 ****
      struct afsconf_cell cellinfo;
      time_t currentTime;
      afs_int32 code = 0;
  
      char  clones[MAXHOSTSPERCELL];
  
- 	
- 	
      struct rx_service *tservice;
      struct rx_securityClass *sca[3];
  
--- 362,371 ----
      struct afsconf_cell cellinfo;
      time_t currentTime;
      afs_int32 code = 0;
+     afs_uint32 host = ntohl(INADDR_ANY);
  
      char  clones[MAXHOSTSPERCELL];
  
      struct rx_service *tservice;
      struct rx_securityClass *sca[3];
  
***************
*** 517,522 ****
--- 521,547 ----
  
      rx_SetRxDeadTime(60);	/* 60 seconds inactive before timeout */
  
+     if (rxBind) {
+ 	afs_int32 ccode;
+ #ifndef AFS_NT40_ENV
+         if (AFSDIR_SERVER_NETRESTRICT_FILEPATH || 
+             AFSDIR_SERVER_NETINFO_FILEPATH) {
+             char reason[1024];
+             ccode = parseNetFiles(SHostAddrs, NULL, NULL,
+                                            ADDRSPERSITE, reason,
+                                            AFSDIR_SERVER_NETINFO_FILEPATH,
+                                            AFSDIR_SERVER_NETRESTRICT_FILEPATH);
+         } else 
+ #endif	
+ 	{
+             ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
+         }
+         if (ccode == 1) {
+             host = SHostAddrs[0];
+ 	    rx_InitHost(host, htons(AFSCONF_BUDBPORT));
+ 	}
+     }
+ 
      code = ubik_ServerInitByInfo (globalConfPtr->myHost,
  				  htons(AFSCONF_BUDBPORT), 
  				  &cellinfo,
***************
*** 540,546 ****
      rx_SetNoJumbo();
  
      tservice =
! 	rx_NewService(0, BUDB_SERVICE, "BackupDatabase", sca, 3,
  		      BUDB_ExecuteRequest);
      if (tservice == (struct rx_service *)0) {
  	LogError(0, "Could not create backup database rx service\n");
--- 565,571 ----
      rx_SetNoJumbo();
  
      tservice =
! 	rx_NewServiceHost(host, 0, BUDB_SERVICE, "BackupDatabase", sca, 3,
  		      BUDB_ExecuteRequest);
      if (tservice == (struct rx_service *)0) {
  	LogError(0, "Could not create backup database rx service\n");
Index: openafs/src/butc/dbentries.c
diff -c openafs/src/butc/dbentries.c:1.8 openafs/src/butc/dbentries.c:1.8.2.1
*** openafs/src/butc/dbentries.c:1.8	Sun Dec  7 17:49:23 2003
--- openafs/src/butc/dbentries.c	Sat Jul  1 01:04:12 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/dbentries.c,v 1.8 2003/12/07 22:49:23 jaltman Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/dbentries.c,v 1.8.2.1 2006/07/01 05:04:12 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 46,54 ****
  int dbWatcherinprogress;
  
  afs_int32
! threadEntryDir(anEntry, size, type)
!      char *anEntry;
!      afs_int32 size, type;
  {
      dlqlinkP entryPtr;
      char *entry = NULL;
--- 46,52 ----
  int dbWatcherinprogress;
  
  afs_int32
! threadEntryDir(char *anEntry, afs_int32 size, afs_int32 type)
  {
      dlqlinkP entryPtr;
      char *entry = NULL;
***************
*** 91,99 ****
   */
  
  afs_int32
! threadEntry(anEntry, size, type)
!      char *anEntry;
!      afs_int32 size, type;
  {
      dlqlinkP entryPtr;
      char *entry = NULL;
--- 89,95 ----
   */
  
  afs_int32
! threadEntry(char *anEntry, afs_int32 size, afs_int32 type)
  {
      dlqlinkP entryPtr;
      char *entry = NULL;
***************
*** 132,139 ****
  /* ------------------------------------------------------------------ */
  
  afs_int32
! useDump(dumpEntryPtr)
!      struct budb_dumpEntry *dumpEntryPtr;
  {
      afs_int32 code = 0;
  
--- 128,134 ----
  /* ------------------------------------------------------------------ */
  
  afs_int32
! useDump(struct budb_dumpEntry *dumpEntryPtr)
  {
      afs_int32 code = 0;
  
***************
*** 147,154 ****
   *     Creates a dump entry (finished) and puts it onto the savedEntries list.
   */
  afs_int32
! finishDump(aDumpEntryPtr)
!      struct budb_dumpEntry *aDumpEntryPtr;
  {
      afs_int32 code = 0;
  
--- 142,148 ----
   *     Creates a dump entry (finished) and puts it onto the savedEntries list.
   */
  afs_int32
! finishDump(struct budb_dumpEntry *aDumpEntryPtr)
  {
      afs_int32 code = 0;
  
***************
*** 163,178 ****
   *     Creates a tape entry and puts it onto the savedEntries list.
   */
  afs_int32
! useTape(aTapeEntryPtr, dumpID, tapename, tapeSeq, useCount, written,
! 	expiration, tapepos)
!      struct budb_tapeEntry *aTapeEntryPtr;
!      afs_int32 dumpID;
!      char *tapename;
!      afs_int32 tapeSeq;
!      afs_int32 useCount;
!      Date written;
!      Date expiration;
!      afs_int32 tapepos;
  {
      afs_int32 code = 0;
  
--- 157,163 ----
   *     Creates a tape entry and puts it onto the savedEntries list.
   */
  afs_int32
! useTape(struct budb_tapeEntry *aTapeEntryPtr, afs_int32 dumpID, char *tapename, afs_int32 tapeSeq, afs_int32 useCount, Date written, Date expiration, afs_int32 tapepos)
  {
      afs_int32 code = 0;
  
***************
*** 197,205 ****
   *     Creates a tape entry (finished) and puts it onto the savedEntries list.
   */
  afs_int32
! finishTape(aTapeEntryPtr, useKBytes)
!      struct budb_tapeEntry *aTapeEntryPtr;
!      afs_int32 useKBytes;
  {
      afs_int32 code = 0;
  
--- 182,188 ----
   *     Creates a tape entry (finished) and puts it onto the savedEntries list.
   */
  afs_int32
! finishTape(struct budb_tapeEntry *aTapeEntryPtr, afs_int32 useKBytes)
  {
      afs_int32 code = 0;
  
***************
*** 217,234 ****
   *     Creates a volume entry and puts it onto the savedEntries list.
   */
  afs_int32
! addVolume(aVolEntryPtr, dumpID, tapename, volname, volid, cloneDate, startPos,
! 	  volBytes, fragment, flags)
!      struct budb_volumeEntry *aVolEntryPtr;
!      afs_int32 dumpID;
!      char *tapename;
!      char *volname;
!      afs_int32 volid;
!      Date cloneDate;
!      afs_int32 startPos;
!      afs_int32 volBytes;
!      int fragment;
!      afs_int32 flags;
  {
      afs_int32 code = 0;
      int allo = 0;
--- 200,206 ----
   *     Creates a volume entry and puts it onto the savedEntries list.
   */
  afs_int32
! addVolume(struct budb_volumeEntry *aVolEntryPtr, afs_int32 dumpID, char *tapename, char *volname, afs_int32 volid, Date cloneDate, afs_int32 startPos, afs_int32 volBytes, int fragment, afs_int32 flags)
  {
      afs_int32 code = 0;
      int allo = 0;
***************
*** 270,277 ****
   *     and tapes and volumes should not be added to the DB.
   */
  afs_int32
! flushSavedEntries(status)
!      afs_int32 status;
  {
      dlqlinkP entryPtr;
      struct budb_tapeEntry *tapePtr;
--- 242,248 ----
   *     and tapes and volumes should not be added to the DB.
   */
  afs_int32
! flushSavedEntries(afs_int32 status)
  {
      dlqlinkP entryPtr;
      struct budb_tapeEntry *tapePtr;
***************
*** 318,323 ****
--- 289,295 ----
      return (code);
  }
  
+ void
  waitDbWatcher()
  {
      int message = 0;
***************
*** 342,347 ****
--- 314,320 ----
  #define MAXVOLUMESTOADD 100
  int addvolumes = 1;
  
+ void
  dbWatcher()
  {
      dlqlinkP entryPtr;
Index: openafs/src/butc/list.c
diff -c openafs/src/butc/list.c:1.8 openafs/src/butc/list.c:1.8.2.1
*** openafs/src/butc/list.c:1.8	Sun Dec  7 17:49:23 2003
--- openafs/src/butc/list.c	Sat Jul  1 01:04:12 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/list.c,v 1.8 2003/12/07 22:49:23 jaltman Exp $");
  
  #ifndef AFS_NT40_ENV
  #include <sys/time.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/list.c,v 1.8.2.1 2006/07/01 05:04:12 shadow Exp $");
  
  #ifndef AFS_NT40_ENV
  #include <sys/time.h>
***************
*** 40,60 ****
  }
  
  
- #ifdef notdef
- void static
- DisplayNode(nodePtr)
-      struct dumpNode *nodePtr;
- {
-     TapeLog(99, nodePtr->dumpId, "Created dumpNode");
-     return;
- 
- }
- #endif
- 
  /* initialize the node list used to keep track of the active dumps */
  void
! InitNodeList(portOffset)
!      afs_int32 portOffset;
  {
      maxTaskID = (portOffset * 1000) + 1;	/* this is the first task id alotted */
      headNode.taskID = -1;
--- 40,48 ----
  }
  
  
  /* initialize the node list used to keep track of the active dumps */
  void
! InitNodeList(afs_int32 portOffset)
  {
      maxTaskID = (portOffset * 1000) + 1;	/* this is the first task id alotted */
      headNode.taskID = -1;
***************
*** 74,81 ****
   */
  
  void
! CreateNode(newNode)
!      struct dumpNode **newNode;
  {
      /* get space */
      *newNode = (struct dumpNode *)(malloc(sizeof(struct dumpNode)));
--- 62,68 ----
   */
  
  void
! CreateNode(struct dumpNode **newNode)
  {
      /* get space */
      *newNode = (struct dumpNode *)(malloc(sizeof(struct dumpNode)));
***************
*** 91,98 ****
  
  /* free the space allotted to the node with <taskID> */
  void
! FreeNode(taskID)
!      afs_int32 taskID;
  {
      struct dumpNode *oldPtr, *newPtr, *curPtr;
      int done;
--- 78,84 ----
  
  /* free the space allotted to the node with <taskID> */
  void
! FreeNode(afs_int32 taskID)
  {
      struct dumpNode *oldPtr, *newPtr, *curPtr;
      int done;
***************
*** 132,140 ****
  }
  
  afs_int32
! GetNthNode(aindex, aresult)
!      afs_int32 aindex;
!      afs_int32 *aresult;
  {
      register struct dumpNode *tn;
      register int i;
--- 118,124 ----
  }
  
  afs_int32
! GetNthNode(afs_int32 aindex, afs_int32 *aresult)
  {
      register struct dumpNode *tn;
      register int i;
***************
*** 155,163 ****
  
  /* return the node with <taskID> into <resultNode> */
  afs_int32
! GetNode(taskID, resultNode)
!      afs_int32 taskID;
!      struct dumpNode **resultNode;
  {
      struct dumpNode *tmpPtr;
      int done;
--- 139,145 ----
  
  /* return the node with <taskID> into <resultNode> */
  afs_int32
! GetNode(afs_int32 taskID, struct dumpNode **resultNode)
  {
      struct dumpNode *tmpPtr;
      int done;
Index: openafs/src/butc/recoverDb.c
diff -c openafs/src/butc/recoverDb.c:1.10.2.3 openafs/src/butc/recoverDb.c:1.10.2.4
*** openafs/src/butc/recoverDb.c:1.10.2.3	Mon Jul 11 15:29:36 2005
--- openafs/src/butc/recoverDb.c	Sat Jul  1 01:04:12 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/recoverDb.c,v 1.10.2.3 2005/07/11 19:29:36 shadow Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/recoverDb.c,v 1.10.2.4 2006/07/01 05:04:12 shadow Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
***************
*** 54,62 ****
  /* PrintDumpLabel
   *	print out the tape (dump) label.
   */
! 
! PrintDumpLabel(labelptr)
!      struct butm_tapeLabel *labelptr;
  {
      char tapeName[BU_MAXTAPELEN + 32];
      time_t t;
--- 54,61 ----
  /* PrintDumpLabel
   *	print out the tape (dump) label.
   */
! void
! PrintDumpLabel(struct butm_tapeLabel *labelptr)
  {
      char tapeName[BU_MAXTAPELEN + 32];
      time_t t;
***************
*** 87,95 ****
  /* PrintVolumeHeader
   *	print the contents of a volume header. 
   */
! static
! PrintVolumeHeader(volHeader)
!      struct volumeHeader *volHeader;
  {
      time_t t;
  
--- 86,93 ----
  /* PrintVolumeHeader
   *	print the contents of a volume header. 
   */
! static void
! PrintVolumeHeader(struct volumeHeader *volHeader)
  {
      time_t t;
  
***************
*** 115,122 ****
   */
  
  afs_int32
! Ask(st)
!      char *st;
  {
      int response;
  
--- 113,119 ----
   */
  
  afs_int32
! Ask(char *st)
  {
      int response;
  
***************
*** 152,165 ****
   */
  #define BIGCHUNK 102400
  
! static
! scanVolData(taskId, curTapePtr, tapeVersion, volumeHeader, volumeTrailer,
! 	    bytesRead)
!      afs_int32 taskId;
!      struct butm_tapeInfo *curTapePtr;
!      afs_int32 tapeVersion;
!      struct volumeHeader *volumeHeader, *volumeTrailer;
!      afs_uint32 *bytesRead;
  {
      afs_int32 headBytes, tailBytes;
      char *block = NULL;
--- 149,156 ----
   */
  #define BIGCHUNK 102400
  
! static int
! scanVolData(afs_int32 taskId, struct butm_tapeInfo *curTapePtr, afs_int32 tapeVersion, struct volumeHeader *volumeHeader, struct volumeHeader *volumeTrailer, afs_uint32 *bytesRead)
  {
      afs_int32 headBytes, tailBytes;
      char *block = NULL;
***************
*** 290,297 ****
   */
  
  char *
! nextTapeLabel(prevTapeName)
!      char *prevTapeName;
  {
      char *prevdot;
      char *retval;
--- 281,287 ----
   */
  
  char *
! nextTapeLabel(char *prevTapeName)
  {
      char *prevdot;
      char *retval;
***************
*** 331,341 ****
  
  afs_int32 RcreateDump();
  
! static
! readDump(taskId, tapeInfoPtr, scanInfoPtr)
!      afs_uint32 taskId;
!      struct butm_tapeInfo *tapeInfoPtr;
!      struct tapeScanInfo *scanInfoPtr;
  {
      int moreTapes = 1;
      afs_int32 nbytes, flags, seq;
--- 321,328 ----
  
  afs_int32 RcreateDump();
  
! static int
! readDump(afs_uint32 taskId, struct butm_tapeInfo *tapeInfoPtr, struct tapeScanInfo *scanInfoPtr)
  {
      int moreTapes = 1;
      afs_int32 nbytes, flags, seq;
***************
*** 577,586 ****
   * try to read that dump too.
   * The first tape label is the first dumpLabel.
   */
! readDumps(taskId, tapeInfoPtr, scanInfoPtr)
!      afs_uint32 taskId;
!      struct butm_tapeInfo *tapeInfoPtr;
!      struct tapeScanInfo *scanInfoPtr;
  {
      afs_int32 code, c;
  
--- 564,571 ----
   * try to read that dump too.
   * The first tape label is the first dumpLabel.
   */
! int
! readDumps(afs_uint32 taskId, struct butm_tapeInfo *tapeInfoPtr, struct tapeScanInfo *scanInfoPtr)
  {
      afs_int32 code, c;
  
***************
*** 611,623 ****
  }
  
  afs_int32
! getScanTape(taskId, tapeInfoPtr, tname, tapeId, prompt, tapeLabelPtr)
!      afs_int32 taskId;
!      struct butm_tapeInfo *tapeInfoPtr;
!      char *tname;
!      afs_int32 tapeId;
!      int prompt;
!      struct butm_tapeLabel *tapeLabelPtr;
  {
      afs_int32 code = 0;
      int tapecount = 1;
--- 596,602 ----
  }
  
  afs_int32
! getScanTape(afs_int32 taskId, struct butm_tapeInfo *tapeInfoPtr, char *tname, afs_int32 tapeId, int prompt, struct butm_tapeLabel *tapeLabelPtr)
  {
      afs_int32 code = 0;
      int tapecount = 1;
***************
*** 710,717 ****
   *	
   */
  
! ScanDumps(ptr)
!      struct scanTapeIf *ptr;
  {
      struct butm_tapeInfo curTapeInfo;
      struct tapeScanInfo tapeScanInfo;
--- 689,696 ----
   *	
   */
  
! int
! ScanDumps(struct scanTapeIf *ptr)
  {
      struct butm_tapeInfo curTapeInfo;
      struct tapeScanInfo tapeScanInfo;
***************
*** 778,786 ****
   *	0 - not ok
   *	1 - ok
   */
! validatePath(labelptr, pathptr)
!      struct butm_tapeLabel *labelptr;
!      char *pathptr;
  {
      char *up, *tp;
      char tapeName[BU_MAXTAPELEN];
--- 757,764 ----
   *	0 - not ok
   *	1 - ok
   */
! int
! validatePath(struct butm_tapeLabel *labelptr, char *pathptr)
  {
      char *up, *tp;
      char tapeName[BU_MAXTAPELEN];
***************
*** 828,835 ****
   */
  
  char *
! volumesetNamePtr(ptr)
!      char *ptr;
  {
      static char vsname[BU_MAXUNAMELEN];
      char *dotPtr;
--- 806,812 ----
   */
  
  char *
! volumesetNamePtr(char *ptr)
  {
      static char vsname[BU_MAXUNAMELEN];
      char *dotPtr;
***************
*** 850,857 ****
  }
  
  char *
! extractDumpName(ptr)
!      char *ptr;
  {
      static char dname[BU_MAXTAPELEN];
      char *dotPtr;
--- 827,833 ----
  }
  
  char *
! extractDumpName(char *ptr)
  {
      static char dname[BU_MAXTAPELEN];
      char *dotPtr;
***************
*** 882,889 ****
   *	-1 - error, couldn't extract sequence number
   */
  
! extractTapeSeq(tapename)
!      char *tapename;
  {
      char *sptr;
  
--- 858,865 ----
   *	-1 - error, couldn't extract sequence number
   */
  
! int
! extractTapeSeq(char *tapename)
  {
      char *sptr;
  
***************
*** 899,906 ****
   *   a database tape or not.
   */
  int
! databaseTape(tapeName)
!      char *tapeName;
  {
      char *sptr;
      int c;
--- 875,881 ----
   *   a database tape or not.
   */
  int
! databaseTape(char *tapeName)
  {
      char *sptr;
      int c;
***************
*** 917,925 ****
  }
  
  afs_int32
! RcreateDump(tapeScanInfoPtr, volHeaderPtr)
!      struct tapeScanInfo *tapeScanInfoPtr;
!      struct volumeHeader *volHeaderPtr;
  {
      afs_int32 code;
      struct butm_tapeLabel *dumpLabelPtr = &tapeScanInfoPtr->dumpLabel;
--- 892,898 ----
  }
  
  afs_int32
! RcreateDump(struct tapeScanInfo *tapeScanInfoPtr, struct volumeHeader *volHeaderPtr)
  {
      afs_int32 code;
      struct butm_tapeLabel *dumpLabelPtr = &tapeScanInfoPtr->dumpLabel;
Index: openafs/src/butc/tcmain.c
diff -c openafs/src/butc/tcmain.c:1.14.2.2 openafs/src/butc/tcmain.c:1.14.2.6
*** openafs/src/butc/tcmain.c:1.14.2.2	Mon Oct 18 13:43:54 2004
--- openafs/src/butc/tcmain.c	Sat Jul  1 01:04:12 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/tcmain.c,v 1.14.2.2 2004/10/18 17:43:54 shadow Exp $");
  
  #include <sys/types.h>
  #include <sys/stat.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/tcmain.c,v 1.14.2.6 2006/07/01 05:04:12 shadow Exp $");
  
  #include <sys/types.h>
  #include <sys/stat.h>
***************
*** 106,111 ****
--- 106,115 ----
  afs_int32 BufferSize;		/* Size in B stored for data */
  char *centralLogFile;
  afs_int32 lastLog;		/* Log last pass info */
+ int rxBind = 0;
+ 
+ #define ADDRSPERSITE 16         /* Same global is in rx/rx_user.c */
+ afs_uint32 SHostAddrs[ADDRSPERSITE];
  
  /* dummy routine for the audit work.  It should do nothing since audits */
  /* occur at the server level and bos is not a server. */
***************
*** 115,122 ****
  }
  
  static afs_int32
! SafeATOL(anum)
!      register char *anum;
  {
      register afs_int32 total;
      register int tc;
--- 119,125 ----
  }
  
  static afs_int32
! SafeATOL(register char *anum)
  {
      register afs_int32 total;
      register int tc;
***************
*** 151,160 ****
   *	should deal with signed numbers. Should signal error if no digits
   *	seen.
   */
! atocl(numstring, crunit, number)
!      char *numstring;
!      char crunit;		/* Units to report number in */
!      afs_int32 *number;
  {
      float total;
      afs_int32 runits;
--- 154,161 ----
   *	should deal with signed numbers. Should signal error if no digits
   *	seen.
   */
! int
! atocl(char *numstring, char crunit, afs_int32 *number)
  {
      float total;
      afs_int32 runits;
***************
*** 251,258 ****
  
  /* replace last two ocurrences of / by _ */
  static
! stringReplace(name)
!      char *name;
  {
      char *pos;
      char buffer[256];
--- 252,258 ----
  
  /* replace last two ocurrences of / by _ */
  static
! stringReplace(char *name)
  {
      char *pos;
      char buffer[256];
***************
*** 267,275 ****
  }
  
  static
! stringNowReplace(logFile, deviceName)
!      char *logFile, *deviceName;
! 
  {
      char *pos = 0;
      char storeDevice[256];
--- 267,273 ----
  }
  
  static
! stringNowReplace(char *logFile, char *deviceName)
  {
      char *pos = 0;
      char storeDevice[256];
***************
*** 319,328 ****
  
  #define	LINESIZE	256
  static afs_int32
! GetDeviceConfig(filename, config, portOffset)
!      char *filename;
!      struct tapeConfig *config;
!      afs_int32 portOffset;
  {
      FILE *devFile = 0;
      char line[LINESIZE];
--- 317,323 ----
  
  #define	LINESIZE	256
  static afs_int32
! GetDeviceConfig(char *filename, struct tapeConfig *config, afs_int32 portOffset)
  {
      FILE *devFile = 0;
      char line[LINESIZE];
***************
*** 411,419 ****
  /* GetConfigParams
   */
  static afs_int32
! GetConfigParams(filename, port)
!      char *filename;
!      afs_int32 port;
  {
      char paramFile[256];
      FILE *devFile = 0;
--- 406,412 ----
  /* GetConfigParams
   */
  static afs_int32
! GetConfigParams(char *filename, afs_int32 port)
  {
      char paramFile[256];
      FILE *devFile = 0;
***************
*** 836,845 ****
      return (code);
  }
  
! static
! WorkerBee(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      register afs_int32 code;
      struct rx_securityClass *(securityObjects[3]);
--- 829,836 ----
      return (code);
  }
  
! static int
! WorkerBee(struct cmd_syndesc *as, char *arock)
  {
      register afs_int32 code;
      struct rx_securityClass *(securityObjects[3]);
***************
*** 857,862 ****
--- 848,854 ----
      PROCESS dbWatcherPid;
  #endif
      time_t t;
+     afs_uint32 host = htonl(INADDR_ANY);
  
      debugLevel = 0;
  
***************
*** 1039,1046 ****
  	autoQuery = 0;
  
      localauth = (as->parms[5].items ? 1 : 0);
  
!     code = rx_Init(htons(BC_TAPEPORT + portOffset));
      if (code) {
  	TapeLog(0, 0, code, 0, "rx init failed on port %u\n",
  		BC_TAPEPORT + portOffset);
--- 1031,1058 ----
  	autoQuery = 0;
  
      localauth = (as->parms[5].items ? 1 : 0);
+     rxBind = (as->parms[8].items ? 1 : 0);
+ 
+     if (rxBind) {
+         afs_int32 ccode;
+ #ifndef AFS_NT40_ENV
+         if (AFSDIR_SERVER_NETRESTRICT_FILEPATH || 
+             AFSDIR_SERVER_NETINFO_FILEPATH) {
+             char reason[1024];
+             ccode = parseNetFiles(SHostAddrs, NULL, NULL,
+                                            ADDRSPERSITE, reason,
+                                            AFSDIR_SERVER_NETINFO_FILEPATH,
+                                            AFSDIR_SERVER_NETRESTRICT_FILEPATH);
+         } else 
+ #endif	
+ 	{
+             ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
+         }
+         if (ccode == 1) 
+             host = SHostAddrs[0];
+     }
  
!     code = rx_InitHost(host, htons(BC_TAPEPORT + portOffset));
      if (code) {
  	TapeLog(0, 0, code, 0, "rx init failed on port %u\n",
  		BC_TAPEPORT + portOffset);
***************
*** 1080,1086 ****
      }
  
      service =
! 	rx_NewService(0, 1, "BUTC", securityObjects, 3, TC_ExecuteRequest);
      if (!service) {
  	TLog(0, "rx_NewService");
  	exit(1);
--- 1092,1098 ----
      }
  
      service =
! 	rx_NewServiceHost(host, 0, 1, "BUTC", securityObjects, 3, TC_ExecuteRequest);
      if (!service) {
  	TLog(0, "rx_NewService");
  	exit(1);
***************
*** 1144,1152 ****
  #include "AFS_component_version_number.c"
  #endif
  
! main(argc, argv)
!      int argc;
!      char **argv;
  {
      register struct cmd_syndesc *ts;
      register struct cmd_item *ti;
--- 1156,1163 ----
  #include "AFS_component_version_number.c"
  #endif
  
! int
! main(int argc, char **argv)
  {
      register struct cmd_syndesc *ts;
      register struct cmd_item *ti;
***************
*** 1183,1188 ****
--- 1194,1201 ----
  		"file to restore to");
      cmd_AddParm(ts, "-xbsaforcemultiple", CMD_FLAG, (CMD_OPTIONAL | CMD_HIDE),
  		"Force multiple XBSA server support");
+     cmd_AddParm(ts, "-rxbind", CMD_FLAG, CMD_OPTIONAL,
+ 		"bind Rx socket");
  
      /* Initialize dirpaths */
      if (!(initAFSDirPath() & AFSDIR_SERVER_PATHS_OK)) {
Index: openafs/src/butc/tcprocs.c
diff -c openafs/src/butc/tcprocs.c:1.12.2.2 openafs/src/butc/tcprocs.c:1.12.2.3
*** openafs/src/butc/tcprocs.c:1.12.2.2	Sun Apr  3 14:48:29 2005
--- openafs/src/butc/tcprocs.c	Sat Jul  1 01:04:12 2006
***************
*** 13,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/tcprocs.c,v 1.12.2.2 2005/04/03 18:48:29 shadow Exp $");
  
  #include <sys/types.h>
  #include <errno.h>
--- 13,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/tcprocs.c,v 1.12.2.3 2006/07/01 05:04:12 shadow Exp $");
  
  #include <sys/types.h>
  #include <errno.h>
***************
*** 42,49 ****
  #include "error_macros.h"
  #include "butc_xbsa.h"
  
! callPermitted(call)
!      struct rx_call *call;
  {
      /* before this code can be used, the rx connection, on the bucoord side, must */
      /* be changed so that it will set up for token passing instead of using  a    */
--- 42,49 ----
  #include "error_macros.h"
  #include "butc_xbsa.h"
  
! int
! callPermitted(struct rx_call *call)
  {
      /* before this code can be used, the rx connection, on the bucoord side, must */
      /* be changed so that it will set up for token passing instead of using  a    */
***************
*** 57,65 ****
   */
  
  static int
! CopyDumpDesc(toDump, fromDump)
!      struct tc_dumpDesc *toDump;
!      tc_dumpArray *fromDump;
  {
      struct tc_dumpDesc *toPtr, *fromPtr;
      int i;
--- 57,63 ----
   */
  
  static int
! CopyDumpDesc(struct tc_dumpDesc *toDump, tc_dumpArray *fromDump)
  {
      struct tc_dumpDesc *toPtr, *fromPtr;
      int i;
***************
*** 82,90 ****
  
  
  static int
! CopyRestoreDesc(toRestore, fromRestore)
!      struct tc_restoreDesc *toRestore;
!      tc_restoreArray *fromRestore;
  {
      struct tc_restoreDesc *toPtr, *fromPtr;
      int i;
--- 80,86 ----
  
  
  static int
! CopyRestoreDesc(struct tc_restoreDesc *toRestore, tc_restoreArray *fromRestore)
  {
      struct tc_restoreDesc *toPtr, *fromPtr;
      int i;
***************
*** 112,119 ****
  }
  
  static int
! CopyTapeSetDesc(toPtr, fromPtr)
!      struct tc_tapeSet *toPtr, *fromPtr;
  {
  
      toPtr->id = fromPtr->id;
--- 108,114 ----
  }
  
  static int
! CopyTapeSetDesc(struct tc_tapeSet *toPtr, struct tc_tapeSet *fromPtr)
  {
  
      toPtr->id = fromPtr->id;
***************
*** 134,143 ****
   */
  
  afs_int32
! STC_LabelTape(acid, label, taskId)
!      struct rx_call *acid;
!      struct tc_tapeLabel *label;
!      afs_uint32 *taskId;
  {
  #ifdef AFS_PTHREAD_ENV
      pthread_t pid;
--- 129,135 ----
   */
  
  afs_int32
! STC_LabelTape(struct rx_call *acid, struct tc_tapeLabel *label, afs_uint32 *taskId)
  {
  #ifdef AFS_PTHREAD_ENV
      pthread_t pid;
***************
*** 217,227 ****
   */
  
  afs_int32
! STC_PerformDump(rxCallId, tcdiPtr, tc_dumpArrayPtr, taskId)
!      struct rx_call *rxCallId;
!      struct tc_dumpInterface *tcdiPtr;
!      tc_dumpArray *tc_dumpArrayPtr;
!      afs_int32 *taskId;
  {
      struct dumpNode *newNode = 0;
      statusP statusPtr = 0;
--- 209,215 ----
   */
  
  afs_int32
! STC_PerformDump(struct rx_call *rxCallId, struct tc_dumpInterface *tcdiPtr, tc_dumpArray *tc_dumpArrayPtr, afs_int32 *taskId)
  {
      struct dumpNode *newNode = 0;
      statusP statusPtr = 0;
***************
*** 320,330 ****
  }
  
  afs_int32
! STC_PerformRestore(acid, dumpSetName, arestores, taskID)
!      struct rx_call *acid;
!      char *dumpSetName;		/* not used */
!      tc_restoreArray *arestores;
!      afs_int32 *taskID;
  {
      struct dumpNode *newNode;
      statusP statusPtr;
--- 308,314 ----
  }
  
  afs_int32
! STC_PerformRestore(struct rx_call *acid, char *dumpSetName, tc_restoreArray *arestores, afs_int32 *taskID)
  {
      struct dumpNode *newNode;
      statusP statusPtr;
***************
*** 401,410 ****
  }
  
  afs_int32
! STC_ReadLabel(acid, label, taskId)
!      struct rx_call *acid;
!      struct tc_tapeLabel *label;
!      afs_uint32 *taskId;
  {
      afs_int32 code;
  
--- 385,391 ----
  }
  
  afs_int32
! STC_ReadLabel(struct rx_call *acid, struct tc_tapeLabel *label, afs_uint32 *taskId)
  {
      afs_int32 code;
  
***************
*** 427,435 ****
   */
  
  afs_int32
! STC_RestoreDb(rxCall, taskId)
!      struct rx_call *rxCall;
!      afs_uint32 *taskId;
  {
  #ifdef AFS_PTHREAD_ENV
      pthread_t pid;
--- 408,414 ----
   */
  
  afs_int32
! STC_RestoreDb(struct rx_call *rxCall, afs_uint32 *taskId)
  {
  #ifdef AFS_PTHREAD_ENV
      pthread_t pid;
***************
*** 499,508 ****
   */
  
  afs_int32
! STC_SaveDb(rxCall, archiveTime, taskId)
!      struct rx_call *rxCall;
!      Date archiveTime;
!      afs_uint32 *taskId;
  {
  #ifdef AFS_PTHREAD_ENV
      pthread_t pid;
--- 478,484 ----
   */
  
  afs_int32
! STC_SaveDb(struct rx_call *rxCall, Date archiveTime, afs_uint32 *taskId)
  {
  #ifdef AFS_PTHREAD_ENV
      pthread_t pid;
***************
*** 585,594 ****
   */
  
  afs_int32
! STC_ScanDumps(acid, addDbFlag, taskId)
!      struct rx_call *acid;
!      afs_int32 addDbFlag;
!      afs_uint32 *taskId;
  {
  #ifdef AFS_PTHREAD_ENV
      pthread_t pid;
--- 561,567 ----
   */
  
  afs_int32
! STC_ScanDumps(struct rx_call *acid, afs_int32 addDbFlag, afs_uint32 *taskId)
  {
  #ifdef AFS_PTHREAD_ENV
      pthread_t pid;
***************
*** 667,675 ****
   */
  
  afs_int32
! STC_TCInfo(acid, tciptr)
!      struct rx_call *acid;
!      struct tc_tcInfo *tciptr;
  {
      if (callPermitted(acid) == 0)
  	return (TC_NOTPERMITTED);
--- 640,646 ----
   */
  
  afs_int32
! STC_TCInfo(struct rx_call *acid, struct tc_tcInfo *tciptr)
  {
      if (callPermitted(acid) == 0)
  	return (TC_NOTPERMITTED);
***************
*** 681,690 ****
  /* STC_DeleteDump
   */
  afs_int32
! STC_DeleteDump(acid, dumpID, taskId)
!      struct rx_call *acid;
!      afs_uint32 dumpID;
!      afs_uint32 *taskId;
  {
      struct deleteDumpIf *ptr = 0;
      statusP statusPtr = 0;
--- 652,658 ----
  /* STC_DeleteDump
   */
  afs_int32
! STC_DeleteDump(struct rx_call *acid, afs_uint32 dumpID, afs_uint32 *taskId)
  {
      struct deleteDumpIf *ptr = 0;
      statusP statusPtr = 0;
Index: openafs/src/cf/kerberos.m4
diff -c openafs/src/cf/kerberos.m4:1.1.2.8 openafs/src/cf/kerberos.m4:1.1.2.9
*** openafs/src/cf/kerberos.m4:1.1.2.8	Mon Apr  3 15:45:27 2006
--- openafs/src/cf/kerberos.m4	Sat Jun 24 12:22:13 2006
***************
*** 1,5 ****
  dnl
! dnl $Id: kerberos.m4,v 1.1.2.8 2006/04/03 19:45:27 shadow Exp $
  dnl
  dnl Kerberos autoconf glue
  dnl
--- 1,5 ----
  dnl
! dnl $Id: kerberos.m4,v 1.1.2.9 2006/06/24 16:22:13 rra Exp $
  dnl
  dnl Kerberos autoconf glue
  dnl
***************
*** 58,64 ****
  	CPPFLAGS="$CPPFLAGS $KRB5CFLAGS"
  	save_LIBS="$LIBS"
  	LIBS="$LIBS $KRB5LIBS"
! 	AC_CHECK_FUNCS([add_to_error_table add_error_table krb5_princ_size krb5_principal_get_comp_string krb5_524_convert_creds krb524_convert_creds_kdc])
  	AC_CHECK_HEADERS([kerberosIV/krb.h])
  	AC_CHECK_HEADERS([kerberosV/heim_err.h])
  
--- 58,71 ----
  	CPPFLAGS="$CPPFLAGS $KRB5CFLAGS"
  	save_LIBS="$LIBS"
  	LIBS="$LIBS $KRB5LIBS"
! 	AC_CHECK_FUNCS([add_to_error_table add_error_table krb5_princ_size krb5_principal_get_comp_string])
! 	AC_CHECK_FUNCS([krb5_524_convert_creds], ,
! 	    [AC_CHECK_FUNCS([krb524_convert_creds_kdc], ,
! 		[AC_CHECK_LIB([krb524], [krb524_convert_creds_kdc],
! 		    [LIBS="-lkrb524 $LIBS"
! 		     KRB5LIBS="-lkrb524 $LIBS"
! 		     AC_DEFINE([HAVE_KRB524_CONVERT_CREDS_KDC], 1,
! 			 [Define to 1 if you have the `krb524_convert_creds_kdc' function.])])])])
  	AC_CHECK_HEADERS([kerberosIV/krb.h])
  	AC_CHECK_HEADERS([kerberosV/heim_err.h])
  
Index: openafs/src/cf/osconf.m4
diff -c openafs/src/cf/osconf.m4:1.51.2.25 openafs/src/cf/osconf.m4:1.51.2.26
*** openafs/src/cf/osconf.m4:1.51.2.25	Thu Mar  9 01:41:38 2006
--- openafs/src/cf/osconf.m4	Tue Jun 20 17:40:43 2006
***************
*** 502,508 ****
  		MT_LIBS="-lpthreads"
  		SHLIB_SUFFIX="o"
  		TXLIBS="-lcurses"
! 		XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void"
  		XLIBS="${LIB_AFSDB} -ldl"
  		SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
  		AIX64="#"
--- 502,508 ----
  		MT_LIBS="-lpthreads"
  		SHLIB_SUFFIX="o"
  		TXLIBS="-lcurses"
! 		XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
  		XLIBS="${LIB_AFSDB} -ldl"
  		SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
  		AIX64="#"
***************
*** 518,524 ****
  		MT_LIBS="-lpthreads"
  		SHLIB_SUFFIX="o"
  		TXLIBS="-lcurses"
! 		XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void"
  		XLIBS="${LIB_AFSDB} -ldl"
  		SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
  		AIX64=""
--- 518,524 ----
  		MT_LIBS="-lpthreads"
  		SHLIB_SUFFIX="o"
  		TXLIBS="-lcurses"
! 		XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
  		XLIBS="${LIB_AFSDB} -ldl"
  		SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
  		AIX64=""
***************
*** 533,539 ****
  		MT_LIBS="-lpthreads"
  		SHLIB_SUFFIX="o"
  		TXLIBS="-lcurses"
! 		XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void"
  		XLIBS="${LIB_AFSDB} -ldl"
  		SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
  		AIX64=""
--- 533,539 ----
  		MT_LIBS="-lpthreads"
  		SHLIB_SUFFIX="o"
  		TXLIBS="-lcurses"
! 		XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
  		XLIBS="${LIB_AFSDB} -ldl"
  		SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
  		AIX64=""
***************
*** 548,554 ****
  		MT_LIBS="-lpthreads"
  		SHLIB_SUFFIX="o"
  		TXLIBS="-lcurses"
! 		XCFLAGS="-K -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void"
  		XLIBS="${LIB_AFSDB} -ldl"
  		SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
  		AIX64=""
--- 548,554 ----
  		MT_LIBS="-lpthreads"
  		SHLIB_SUFFIX="o"
  		TXLIBS="-lcurses"
! 		XCFLAGS="-K -D_NONSTD_TYPES -D_MBI=void"
  		XLIBS="${LIB_AFSDB} -ldl"
  		SHLIB_LINKER="${MT_CC} -bM:SRE -berok"
  		AIX64=""
Index: openafs/src/cmd/cmd.c
diff -c openafs/src/cmd/cmd.c:1.11 openafs/src/cmd/cmd.c:1.11.2.1
*** openafs/src/cmd/cmd.c:1.11	Sat Nov 29 17:08:09 2003
--- openafs/src/cmd/cmd.c	Fri Jun 30 15:45:48 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/cmd/cmd.c,v 1.11 2003/11/29 22:08:09 jaltman Exp $");
  
  #include <sys/types.h>
  #include <ctype.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/cmd/cmd.c,v 1.11.2.1 2006/06/30 19:45:48 shadow Exp $");
  
  #include <sys/types.h>
  #include <ctype.h>
***************
*** 165,170 ****
--- 165,179 ----
  	printf(" <arg>+");
  }
  
+ extern char *AFSVersion;
+ 
+ static int
+ VersionProc(register struct cmd_syndesc *as, char *arock)
+ {
+     printf("%s\n", AFSVersion);
+     return 0;
+ }
+ 
  void
  PrintSyntax(register struct cmd_syndesc *as)
  {
***************
*** 658,663 ****
--- 667,682 ----
  				  "search by help text");
  	    cmd_AddParm(ts, "-topic", CMD_SINGLE, CMD_REQUIRED,
  			"help string");
+ 	    ts = cmd_CreateSyntax("version", VersionProc, (char *)0,
+ 				  (char *)CMD_HIDDEN);
+ 	    ts = cmd_CreateSyntax("-version", VersionProc, (char *)0,
+ 				  (char *)CMD_HIDDEN);
+ 	    ts = cmd_CreateSyntax("-help", HelpProc, (char *)0,
+ 				  (char *)CMD_HIDDEN);
+ 	    ts = cmd_CreateSyntax("--version", VersionProc, (char *)0,
+ 				  (char *)CMD_HIDDEN);
+ 	    ts = cmd_CreateSyntax("--help", HelpProc, (char *)0,
+ 				  (char *)CMD_HIDDEN);
  	}
      }
  
Index: openafs/src/config/NTMakefile.amd64_w2k
diff -c openafs/src/config/NTMakefile.amd64_w2k:1.1.2.36 openafs/src/config/NTMakefile.amd64_w2k:1.1.2.37
*** openafs/src/config/NTMakefile.amd64_w2k:1.1.2.36	Sun Jun  4 23:30:02 2006
--- openafs/src/config/NTMakefile.amd64_w2k	Wed Jul  5 13:11:16 2006
***************
*** 80,86 ****
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=4
! AFSPRODUCT_VER_PATCH=0151
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
--- 80,86 ----
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=4
! AFSPRODUCT_VER_PATCH=0152
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
Index: openafs/src/config/NTMakefile.i386_nt40
diff -c openafs/src/config/NTMakefile.i386_nt40:1.46.2.51 openafs/src/config/NTMakefile.i386_nt40:1.46.2.52
*** openafs/src/config/NTMakefile.i386_nt40:1.46.2.51	Sun Jun  4 23:30:02 2006
--- openafs/src/config/NTMakefile.i386_nt40	Wed Jul  5 13:11:16 2006
***************
*** 80,86 ****
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=4
! AFSPRODUCT_VER_PATCH=0151
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
--- 80,86 ----
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=4
! AFSPRODUCT_VER_PATCH=0152
  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.1.2.38 openafs/src/config/NTMakefile.i386_w2k:1.1.2.39
*** openafs/src/config/NTMakefile.i386_w2k:1.1.2.38	Sun Jun  4 23:30:02 2006
--- openafs/src/config/NTMakefile.i386_w2k	Wed Jul  5 13:11:16 2006
***************
*** 80,86 ****
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=4
! AFSPRODUCT_VER_PATCH=0151
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
--- 80,86 ----
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=4
! AFSPRODUCT_VER_PATCH=0152
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
Index: openafs/src/config/afs_sysnames.h
diff -c openafs/src/config/afs_sysnames.h:1.50.2.23 openafs/src/config/afs_sysnames.h:1.50.2.24
*** openafs/src/config/afs_sysnames.h:1.50.2.23	Wed Mar 15 11:16:36 2006
--- openafs/src/config/afs_sysnames.h	Fri Jun 23 10:21:12 2006
***************
*** 181,186 ****
--- 181,187 ----
  #define SYS_NAME_ID_i386_fbsd_52        2107
  #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_ia64_linux2		2200
  #define SYS_NAME_ID_ia64_linux22	2201
***************
*** 221,226 ****
--- 222,228 ----
  #define SYS_NAME_ID_i386_obsd36		2605
  #define SYS_NAME_ID_i386_obsd37		2606
  #define SYS_NAME_ID_i386_obsd38		2607
+ #define SYS_NAME_ID_i386_obsd39		2608
  
  #define SYS_NAME_ID_amd64_linux2        2700
  #define SYS_NAME_ID_amd64_linux22       2701
Index: openafs/src/config/param.alpha_linux_24.h
diff -c openafs/src/config/param.alpha_linux_24.h:1.5.2.2 openafs/src/config/param.alpha_linux_24.h:1.5.2.3
*** openafs/src/config/param.alpha_linux_24.h:1.5.2.2	Sun Apr 24 20:02:18 2005
--- openafs/src/config/param.alpha_linux_24.h	Mon Jun 12 12:20:53 2006
***************
*** 56,62 ****
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
  
  /* Machine / Operating system information */
  #define SYS_NAME       "alpha_linux_24"
--- 56,62 ----
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       1
  
  /* Machine / Operating system information */
  #define SYS_NAME       "alpha_linux_24"
Index: openafs/src/config/param.alpha_linux_26.h
diff -c openafs/src/config/param.alpha_linux_26.h:1.1.2.3 openafs/src/config/param.alpha_linux_26.h:1.1.2.4
*** openafs/src/config/param.alpha_linux_26.h:1.1.2.3	Sun Apr 24 20:02:18 2005
--- openafs/src/config/param.alpha_linux_26.h	Mon Jun 12 12:20:53 2006
***************
*** 61,67 ****
  #include <afs/afs_sysnames.h>
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
  
  #define AFSLITTLE_ENDIAN    1
  #define AFS_HAVE_FFS        1	/* Use system's ffs. */
--- 61,67 ----
  #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. */
Index: openafs/src/config/param.amd64_linux24.h
diff -c openafs/src/config/param.amd64_linux24.h:1.3.2.2 openafs/src/config/param.amd64_linux24.h:1.3.2.3
*** openafs/src/config/param.amd64_linux24.h:1.3.2.2	Sun Apr 24 20:02:18 2005
--- openafs/src/config/param.amd64_linux24.h	Mon Jun 12 12:20:53 2006
***************
*** 69,75 ****
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
  
  /* Machine / Operating system information */
  #define SYS_NAME	"amd64_linux24"
--- 69,75 ----
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       1
  
  /* Machine / Operating system information */
  #define SYS_NAME	"amd64_linux24"
Index: openafs/src/config/param.amd64_linux26.h
diff -c openafs/src/config/param.amd64_linux26.h:1.1.2.4 openafs/src/config/param.amd64_linux26.h:1.1.2.5
*** openafs/src/config/param.amd64_linux26.h:1.1.2.4	Sun Apr 24 20:02:18 2005
--- openafs/src/config/param.amd64_linux26.h	Mon Jun 12 12:20:53 2006
***************
*** 57,63 ****
  #include <afs/afs_sysnames.h>
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
  
  #define AFSLITTLE_ENDIAN    1
  #define AFS_HAVE_FFS        1	/* Use system's ffs. */
--- 57,63 ----
  #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. */
Index: openafs/src/config/param.i386_linux24.h
diff -c openafs/src/config/param.i386_linux24.h:1.19.2.2 openafs/src/config/param.i386_linux24.h:1.19.2.3
*** openafs/src/config/param.i386_linux24.h:1.19.2.2	Sun Apr 24 20:02:18 2005
--- openafs/src/config/param.i386_linux24.h	Mon Jun 12 12:20:53 2006
***************
*** 57,63 ****
  #include <afs/afs_sysnames.h>
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
  
  #define AFSLITTLE_ENDIAN    1
  #define AFS_HAVE_FFS        1	/* Use system's ffs. */
--- 57,63 ----
  #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. */
Index: openafs/src/config/param.i386_linux26.h
diff -c openafs/src/config/param.i386_linux26.h:1.3.2.3 openafs/src/config/param.i386_linux26.h:1.3.2.4
*** openafs/src/config/param.i386_linux26.h:1.3.2.3	Fri Mar 31 00:53:00 2006
--- openafs/src/config/param.i386_linux26.h	Mon Jun 12 12:20:53 2006
***************
*** 58,64 ****
  #include <afs/afs_sysnames.h>
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
  
  #define AFSLITTLE_ENDIAN    1
  #define AFS_HAVE_FFS        1	/* Use system's ffs. */
--- 58,64 ----
  #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. */
Index: openafs/src/config/param.i386_umlinux24.h
diff -c openafs/src/config/param.i386_umlinux24.h:1.2.2.2 openafs/src/config/param.i386_umlinux24.h:1.2.2.3
*** openafs/src/config/param.i386_umlinux24.h:1.2.2.2	Sun Apr 24 20:02:18 2005
--- openafs/src/config/param.i386_umlinux24.h	Mon Jun 12 12:20:54 2006
***************
*** 65,71 ****
  #include <afs/afs_sysnames.h>
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
  
  #define AFSLITTLE_ENDIAN    1
  #define AFS_HAVE_FFS        1	/* Use system's ffs. */
--- 65,71 ----
  #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. */
Index: openafs/src/config/param.i386_umlinux26.h
diff -c openafs/src/config/param.i386_umlinux26.h:1.1.2.3 openafs/src/config/param.i386_umlinux26.h:1.1.2.4
*** openafs/src/config/param.i386_umlinux26.h:1.1.2.3	Sun Apr 24 20:02:18 2005
--- openafs/src/config/param.i386_umlinux26.h	Mon Jun 12 12:20:54 2006
***************
*** 58,64 ****
  #include <afs/afs_sysnames.h>
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
  
  #define AFSLITTLE_ENDIAN    1
  #define AFS_HAVE_FFS        1	/* Use system's ffs. */
--- 58,64 ----
  #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. */
Index: openafs/src/config/param.ia64_linux24.h
diff -c openafs/src/config/param.ia64_linux24.h:1.9.2.2 openafs/src/config/param.ia64_linux24.h:1.9.2.3
*** openafs/src/config/param.ia64_linux24.h:1.9.2.2	Sun Apr 24 20:02:18 2005
--- openafs/src/config/param.ia64_linux24.h	Mon Jun 12 12:20:54 2006
***************
*** 69,75 ****
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
  
  /* Machine / Operating system information */
  #define SYS_NAME	"ia64_linux24"
--- 69,75 ----
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       1
  
  /* Machine / Operating system information */
  #define SYS_NAME	"ia64_linux24"
Index: openafs/src/config/param.ia64_linux26.h
diff -c openafs/src/config/param.ia64_linux26.h:1.1.2.4 openafs/src/config/param.ia64_linux26.h:1.1.2.5
*** openafs/src/config/param.ia64_linux26.h:1.1.2.4	Sun Apr 24 20:02:18 2005
--- openafs/src/config/param.ia64_linux26.h	Mon Jun 12 12:20:54 2006
***************
*** 78,84 ****
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
  
  /* Machine / Operating system information */
  #define SYS_NAME	"ia64_linux26"
--- 78,84 ----
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       1
  
  /* Machine / Operating system information */
  #define SYS_NAME	"ia64_linux26"
Index: openafs/src/config/param.parisc_linux24.h
diff -c openafs/src/config/param.parisc_linux24.h:1.7.2.2 openafs/src/config/param.parisc_linux24.h:1.7.2.3
*** openafs/src/config/param.parisc_linux24.h:1.7.2.2	Sun Apr 24 20:02:18 2005
--- openafs/src/config/param.parisc_linux24.h	Mon Jun 12 12:20:54 2006
***************
*** 52,58 ****
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
  
  /* Machine / Operating system information */
  #define SYS_NAME       "parisc_linux24"
--- 52,58 ----
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       1
  
  /* Machine / Operating system information */
  #define SYS_NAME       "parisc_linux24"
Index: openafs/src/config/param.ppc64_linux24.h
diff -c openafs/src/config/param.ppc64_linux24.h:1.2.2.2 openafs/src/config/param.ppc64_linux24.h:1.2.2.3
*** openafs/src/config/param.ppc64_linux24.h:1.2.2.2	Sun Apr 24 20:02:18 2005
--- openafs/src/config/param.ppc64_linux24.h	Mon Jun 12 12:20:54 2006
***************
*** 57,63 ****
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2 /* Set to Userdisabled, allow sysctl to override */
  
  /* Machine / Operating system information */
  #define SYS_NAME       "ppc64_linux24"
--- 57,63 ----
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       1
  
  /* Machine / Operating system information */
  #define SYS_NAME       "ppc64_linux24"
Index: openafs/src/config/param.ppc64_linux26.h
diff -c openafs/src/config/param.ppc64_linux26.h:1.1.2.3 openafs/src/config/param.ppc64_linux26.h:1.1.2.4
*** openafs/src/config/param.ppc64_linux26.h:1.1.2.3	Sun Apr 24 20:02:18 2005
--- openafs/src/config/param.ppc64_linux26.h	Mon Jun 12 12:20:54 2006
***************
*** 58,64 ****
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2 /* Set to Userdisabled, allow sysctl to override */
  
  /* Machine / Operating system information */
  #define SYS_NAME       "ppc64_linux26"
--- 58,64 ----
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       1
  
  /* Machine / Operating system information */
  #define SYS_NAME       "ppc64_linux26"
Index: openafs/src/config/param.ppc_linux24.h
diff -c openafs/src/config/param.ppc_linux24.h:1.10.2.2 openafs/src/config/param.ppc_linux24.h:1.10.2.3
*** openafs/src/config/param.ppc_linux24.h:1.10.2.2	Sun Apr 24 20:02:18 2005
--- openafs/src/config/param.ppc_linux24.h	Mon Jun 12 12:20:54 2006
***************
*** 54,60 ****
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
  
  /* Machine / Operating system information */
  #define SYS_NAME       "ppc_linux24"
--- 54,60 ----
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       1
  
  /* Machine / Operating system information */
  #define SYS_NAME       "ppc_linux24"
Index: openafs/src/config/param.ppc_linux26.h
diff -c openafs/src/config/param.ppc_linux26.h:1.1.2.3 openafs/src/config/param.ppc_linux26.h:1.1.2.4
*** openafs/src/config/param.ppc_linux26.h:1.1.2.3	Sun Apr 24 20:02:18 2005
--- openafs/src/config/param.ppc_linux26.h	Mon Jun 12 12:20:54 2006
***************
*** 56,62 ****
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
  
  /* Machine / Operating system information */
  #define SYS_NAME       "ppc_linux26"
--- 56,62 ----
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       1
  
  /* Machine / Operating system information */
  #define SYS_NAME       "ppc_linux26"
Index: openafs/src/config/param.rs_aix51.h
diff -c openafs/src/config/param.rs_aix51.h:1.6 openafs/src/config/param.rs_aix51.h:1.6.2.1
*** openafs/src/config/param.rs_aix51.h:1.6	Fri Aug  8 17:54:39 2003
--- openafs/src/config/param.rs_aix51.h	Tue Jun 20 17:31:04 2006
***************
*** 25,32 ****
  #ifdef AFS_NAMEI_ENV
  #define AFS_64BIT_IOPS_ENV	1
  #endif
- #define BITMAP_LATER		1
- #define FAST_RESTART		1
  
  #define AFS_HAVE_FLOCK_SYSID    1
  
--- 25,30 ----
Index: openafs/src/config/param.rs_aix52.h
diff -c openafs/src/config/param.rs_aix52.h:1.1 openafs/src/config/param.rs_aix52.h:1.1.2.1
*** openafs/src/config/param.rs_aix52.h:1.1	Wed Mar 24 03:38:15 2004
--- openafs/src/config/param.rs_aix52.h	Tue Jun 20 17:31:04 2006
***************
*** 26,33 ****
  #ifdef AFS_NAMEI_ENV
  #define AFS_64BIT_IOPS_ENV	1
  #endif
- #define BITMAP_LATER		1
- #define FAST_RESTART		1
  
  #define AFS_HAVE_FLOCK_SYSID    1
  
--- 26,31 ----
Index: openafs/src/config/param.rs_aix53.h
diff -c openafs/src/config/param.rs_aix53.h:1.1.2.2 openafs/src/config/param.rs_aix53.h:1.1.2.3
*** openafs/src/config/param.rs_aix53.h:1.1.2.2	Sun Apr 24 10:28:43 2005
--- openafs/src/config/param.rs_aix53.h	Tue Jun 20 17:31:04 2006
***************
*** 27,34 ****
  #ifdef AFS_NAMEI_ENV
  #define AFS_64BIT_IOPS_ENV	1
  #endif
- #define BITMAP_LATER		1
- #define FAST_RESTART		1
  
  #define AFS_HAVE_FLOCK_SYSID    1
  
--- 27,32 ----
Index: openafs/src/config/param.s390_linux24.h
diff -c openafs/src/config/param.s390_linux24.h:1.12.2.2 openafs/src/config/param.s390_linux24.h:1.12.2.3
*** openafs/src/config/param.s390_linux24.h:1.12.2.2	Sun Apr 24 20:02:18 2005
--- openafs/src/config/param.s390_linux24.h	Mon Jun 12 12:20:54 2006
***************
*** 66,72 ****
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
  
  /* Machine / Operating system information */
  #define SYS_NAME	"s390_linux24"
--- 66,72 ----
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       1
  
  /* Machine / Operating system information */
  #define SYS_NAME	"s390_linux24"
Index: openafs/src/config/param.s390_linux26.h
diff -c openafs/src/config/param.s390_linux26.h:1.1.2.2 openafs/src/config/param.s390_linux26.h:1.1.2.3
*** openafs/src/config/param.s390_linux26.h:1.1.2.2	Wed Mar 15 11:16:36 2006
--- openafs/src/config/param.s390_linux26.h	Mon Jun 12 12:20:54 2006
***************
*** 68,74 ****
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
  
  /* Machine / Operating system information */
  #define SYS_NAME	"s390_linux26"
--- 68,74 ----
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       1
  
  /* Machine / Operating system information */
  #define SYS_NAME	"s390_linux26"
Index: openafs/src/config/param.s390x_linux24.h
diff -c openafs/src/config/param.s390x_linux24.h:1.1.2.3 openafs/src/config/param.s390x_linux24.h:1.1.2.4
*** openafs/src/config/param.s390x_linux24.h:1.1.2.3	Sun Apr 24 20:02:18 2005
--- openafs/src/config/param.s390x_linux24.h	Mon Jun 12 12:20:54 2006
***************
*** 71,77 ****
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
  
  /* Machine / Operating system information */
  #define SYS_NAME	"s390x_linux24"
--- 71,77 ----
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       1
  
  /* Machine / Operating system information */
  #define SYS_NAME	"s390x_linux24"
Index: openafs/src/config/param.s390x_linux26.h
diff -c openafs/src/config/param.s390x_linux26.h:1.1.2.4 openafs/src/config/param.s390x_linux26.h:1.1.2.5
*** openafs/src/config/param.s390x_linux26.h:1.1.2.4	Mon May 30 00:23:39 2005
--- openafs/src/config/param.s390x_linux26.h	Mon Jun 12 12:20:54 2006
***************
*** 71,77 ****
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
  
  /* Machine / Operating system information */
  #define SYS_NAME	"s390x_linux26"
--- 71,77 ----
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       1
  
  /* Machine / Operating system information */
  #define SYS_NAME	"s390x_linux26"
Index: openafs/src/config/param.sparc64_linux24.h
diff -c openafs/src/config/param.sparc64_linux24.h:1.7.2.2 openafs/src/config/param.sparc64_linux24.h:1.7.2.3
*** openafs/src/config/param.sparc64_linux24.h:1.7.2.2	Sun Apr 24 20:02:18 2005
--- openafs/src/config/param.sparc64_linux24.h	Mon Jun 12 12:20:54 2006
***************
*** 65,71 ****
  
  #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	"sparc64_linux24"
--- 65,71 ----
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS	1
  
  /* Machine / Operating system information */
  #define SYS_NAME	"sparc64_linux24"
Index: openafs/src/config/param.sparc64_linux26.h
diff -c openafs/src/config/param.sparc64_linux26.h:1.1.4.3 openafs/src/config/param.sparc64_linux26.h:1.1.4.4
*** openafs/src/config/param.sparc64_linux26.h:1.1.4.3	Mon Jan 30 13:19:39 2006
--- openafs/src/config/param.sparc64_linux26.h	Mon Jun 12 12:20:54 2006
***************
*** 67,73 ****
  
  #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	"sparc64_linux26"
--- 67,73 ----
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS	1
  
  /* Machine / Operating system information */
  #define SYS_NAME	"sparc64_linux26"
Index: openafs/src/config/param.sparc_linux24.h
diff -c openafs/src/config/param.sparc_linux24.h:1.8.2.2 openafs/src/config/param.sparc_linux24.h:1.8.2.3
*** openafs/src/config/param.sparc_linux24.h:1.8.2.2	Sun Apr 24 20:02:18 2005
--- openafs/src/config/param.sparc_linux24.h	Mon Jun 12 12:20:54 2006
***************
*** 63,69 ****
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
  
  /* Machine / Operating system information */
  #define SYS_NAME	"sparc_linux24"
--- 63,69 ----
  
  #define AFS_USERSPACE_IP_ADDR 1
  #define RXK_LISTENER_ENV 1
! #define AFS_GCPAGS       1
  
  /* Machine / Operating system information */
  #define SYS_NAME	"sparc_linux24"
Index: openafs/src/export/Makefile.in
diff -c openafs/src/export/Makefile.in:1.15.2.5 openafs/src/export/Makefile.in:1.15.2.6
*** openafs/src/export/Makefile.in:1.15.2.5	Thu Apr 27 13:35:19 2006
--- openafs/src/export/Makefile.in	Tue Jun 20 17:40:46 2006
***************
*** 113,119 ****
  	${CC} -q64 ${CFLAGS} -c ${srcdir}/cfgafs.c -o cfgafs64.o
  
  clean:
! 	$(RM) -f *.o *.Zlst *.map *.out cfgexport cfgafs *.ext AFS_component_version_number.c export.exp export64.exp
  
  ${DEST}/root.client/usr/vice/etc/dkload/export.ext: export.ext
  	${INSTALL} $? $@
--- 113,123 ----
  	${CC} -q64 ${CFLAGS} -c ${srcdir}/cfgafs.c -o cfgafs64.o
  
  clean:
! 	$(RM) -f *.o *.Zlst *.map *.out AFS_component_version_number.c
! 	$(RM) -f export.exp export64.exp
! 	$(RM) -f cfgexport cfgexport64
! 	$(RM) -f cfgafs cfgafs64
! 	$(RM) -f *.ext *.ext.nonfs
  
  ${DEST}/root.client/usr/vice/etc/dkload/export.ext: export.ext
  	${INSTALL} $? $@
Index: openafs/src/kauth/kaserver.c
diff -c openafs/src/kauth/kaserver.c:1.17.2.2 openafs/src/kauth/kaserver.c:1.17.2.4
*** openafs/src/kauth/kaserver.c:1.17.2.2	Mon Feb 13 12:57:28 2006
--- openafs/src/kauth/kaserver.c	Tue Jun 20 16:35:01 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kaserver.c,v 1.17.2.2 2006/02/13 17:57:28 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kaserver.c,v 1.17.2.4 2006/06/20 20:35:01 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 59,64 ****
--- 59,68 ----
  afs_int32 myHost = 0;
  afs_int32 verbose_track = 1;
  afs_int32 krb4_cross = 0;
+ afs_int32 rxBind = 0;
+ 
+ #define ADDRSPERSITE 16         /* Same global is in rx/rx_user.c */
+ afs_uint32 SHostAddrs[ADDRSPERSITE];
  
  struct afsconf_dir *KA_conf;	/* for getting cell info */
  
***************
*** 168,173 ****
--- 172,178 ----
      int level;			/* security level for Ubik */
      afs_int32 i;
      char clones[MAXHOSTSPERCELL];
+     afs_uint32 host = ntohl(INADDR_ANY);
  
      struct rx_service *tservice;
      struct rx_securityClass *sca[1];
***************
*** 203,209 ****
      if (argc == 0) {
        usage:
  	printf("Usage: kaserver [-noAuth] [-fastKeys] [-database <dbpath>] "
! 	       "[-auditlog <log path>] "
  	       "[-localfiles <lclpath>] [-minhours <n>] [-servers <serverlist>] "
  	       "[-crossrealm]"
  	       /*" [-enable_peer_stats] [-enable_process_stats] " */
--- 208,214 ----
      if (argc == 0) {
        usage:
  	printf("Usage: kaserver [-noAuth] [-fastKeys] [-database <dbpath>] "
! 	       "[-auditlog <log path>] [-rxbind] "
  	       "[-localfiles <lclpath>] [-minhours <n>] [-servers <serverlist>] "
  	       "[-crossrealm]"
  	       /*" [-enable_peer_stats] [-enable_process_stats] " */
***************
*** 305,310 ****
--- 310,317 ----
  	    verbose_track = 0;
  	else if (IsArg("-crossrealm"))
  	    krb4_cross = 1;
+ 	else if (IsArg("-rxbind"))
+ 	    rxBind = 1;
  	else if (IsArg("-minhours")) {
  	    MinHours = atoi(argv[++a]);
  	} else if (IsArg("-enable_peer_stats")) {
***************
*** 377,382 ****
--- 384,411 ----
      ubik_CheckRXSecurityRock = (char *)KA_conf;
  
      ubik_nBuffers = 80;
+ 
+     if (rxBind) {
+ 	afs_int32 ccode;
+ #ifndef AFS_NT40_ENV
+         if (AFSDIR_SERVER_NETRESTRICT_FILEPATH || 
+             AFSDIR_SERVER_NETINFO_FILEPATH) {
+             char reason[1024];
+             ccode = parseNetFiles(SHostAddrs, NULL, NULL,
+                                            ADDRSPERSITE, reason,
+                                            AFSDIR_SERVER_NETINFO_FILEPATH,
+                                            AFSDIR_SERVER_NETRESTRICT_FILEPATH);
+         } else 
+ #endif	
+ 	{
+             ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
+         }
+         if (ccode == 1) {
+             host = SHostAddrs[0];
+ 	    rx_InitHost(host, htons(AFSCONF_KAUTHPORT));
+ 	}
+     }
+ 
      if (servers)
  	code =
  	    ubik_ServerInit(myHost, htons(AFSCONF_KAUTHPORT), serverList,
***************
*** 397,404 ****
      rx_SetNoJumbo();
  
      tservice =
! 	rx_NewService(0, KA_AUTHENTICATION_SERVICE, "AuthenticationService",
! 		      sca, 1, KAA_ExecuteRequest);
      if (tservice == (struct rx_service *)0) {
  	ViceLog(0, ("Could not create Authentication rx service\n"));
  	exit(3);
--- 426,433 ----
      rx_SetNoJumbo();
  
      tservice =
! 	rx_NewServiceHost(host, 0, KA_AUTHENTICATION_SERVICE, 
! 			  "AuthenticationService", sca, 1, KAA_ExecuteRequest);
      if (tservice == (struct rx_service *)0) {
  	ViceLog(0, ("Could not create Authentication rx service\n"));
  	exit(3);
***************
*** 406,413 ****
      rx_SetMinProcs(tservice, 1);
      rx_SetMaxProcs(tservice, 1);
  
      tservice =
! 	rx_NewService(0, KA_TICKET_GRANTING_SERVICE, "TicketGrantingService",
  		      sca, 1, KAT_ExecuteRequest);
      if (tservice == (struct rx_service *)0) {
  	ViceLog(0, ("Could not create Ticket Granting rx service\n"));
--- 435,443 ----
      rx_SetMinProcs(tservice, 1);
      rx_SetMaxProcs(tservice, 1);
  
+     
      tservice =
! 	rx_NewServiceHost(host, 0, KA_TICKET_GRANTING_SERVICE, "TicketGrantingService",
  		      sca, 1, KAT_ExecuteRequest);
      if (tservice == (struct rx_service *)0) {
  	ViceLog(0, ("Could not create Ticket Granting rx service\n"));
***************
*** 421,427 ****
      scm[RX_SCINDEX_KAD] =
  	rxkad_NewServerSecurityObject(rxkad_crypt, 0, kvno_admin_key, 0);
      tservice =
! 	rx_NewService(0, KA_MAINTENANCE_SERVICE, "Maintenance", scm, 3,
  		      KAM_ExecuteRequest);
      if (tservice == (struct rx_service *)0) {
  	ViceLog(0, ("Could not create Maintenance rx service\n"));
--- 451,457 ----
      scm[RX_SCINDEX_KAD] =
  	rxkad_NewServerSecurityObject(rxkad_crypt, 0, kvno_admin_key, 0);
      tservice =
! 	rx_NewServiceHost(host, 0, KA_MAINTENANCE_SERVICE, "Maintenance", scm, 3,
  		      KAM_ExecuteRequest);
      if (tservice == (struct rx_service *)0) {
  	ViceLog(0, ("Could not create Maintenance rx service\n"));
***************
*** 432,438 ****
      rx_SetStackSize(tservice, 10000);
  
      tservice =
! 	rx_NewService(0, RX_STATS_SERVICE_ID, "rpcstats", scm, 3,
  		      RXSTATS_ExecuteRequest);
      if (tservice == (struct rx_service *)0) {
  	ViceLog(0, ("Could not create rpc stats rx service\n"));
--- 462,468 ----
      rx_SetStackSize(tservice, 10000);
  
      tservice =
! 	rx_NewServiceHost(host, 0, RX_STATS_SERVICE_ID, "rpcstats", scm, 3,
  		      RXSTATS_ExecuteRequest);
      if (tservice == (struct rx_service *)0) {
  	ViceLog(0, ("Could not create rpc stats rx service\n"));
Index: openafs/src/libafs/Makefile.common.in
diff -c openafs/src/libafs/Makefile.common.in:1.21.2.3 openafs/src/libafs/Makefile.common.in:1.21.2.4
*** openafs/src/libafs/Makefile.common.in:1.21.2.3	Thu Mar  9 01:41:47 2006
--- openafs/src/libafs/Makefile.common.in	Tue Jun 20 17:40:46 2006
***************
*** 410,416 ****
  
  
  clean:
! 	-$(RM) -rf STATIC* MODLOAD*
  	-$(RM) -rf  h net netinet rpc ufs machine inet nfs sys afs afsint asm asm-generic config rx linux
  
  include ${TOP_OBJDIR}/src/config/Makefile.version
--- 410,416 ----
  
  
  clean:
! 	-$(RM) -rf STATIC* MODLOAD* $(AFS_OS_CLEAN)
  	-$(RM) -rf  h net netinet rpc ufs machine inet nfs sys afs afsint asm asm-generic config rx linux
  
  include ${TOP_OBJDIR}/src/config/Makefile.version
Index: openafs/src/libafs/MakefileProto.AIX.in
diff -c openafs/src/libafs/MakefileProto.AIX.in:1.23.2.2 openafs/src/libafs/MakefileProto.AIX.in:1.23.2.3
*** openafs/src/libafs/MakefileProto.AIX.in:1.23.2.2	Thu Apr 27 13:35:20 2006
--- openafs/src/libafs/MakefileProto.AIX.in	Tue Jun 20 17:40:46 2006
***************
*** 35,40 ****
--- 35,44 ----
  	osi_vfsops_iauth.o \
  	osi_vnodeops_iauth.o
  
+ AFS_OS_CLEAN = \
+ 	*.exp \
+ 	export.h
+ 
  # System specific build commands
  STRIP = /bin/strip
  DBUG  = -g
Index: openafs/src/libafs/MakefileProto.SOLARIS.in
diff -c openafs/src/libafs/MakefileProto.SOLARIS.in:1.24.2.1 openafs/src/libafs/MakefileProto.SOLARIS.in:1.24.2.2
*** openafs/src/libafs/MakefileProto.SOLARIS.in:1.24.2.1	Sun Feb 20 20:15:11 2005
--- openafs/src/libafs/MakefileProto.SOLARIS.in	Mon Jul  3 14:43:39 2006
***************
*** 44,57 ****
  CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
  
  # Name of directory to hold object files and libraries.
! <all -sun4x_57 -sun4x_58 -sun4x_59 -sunx86_57 -sunx86_58 -sunx86_59>
  KOBJ = MODLOAD
! <sun4x_57 sun4x_58 sun4x_59 sun4x_510 sunx86_57 sunx86_58 sunx86_59 sunx86_510>
  KOBJ = MODLOAD32 MODLOAD64
! 
  
  # This tells Makefile.common to use it's single directory build target.
! <all -sun4x_57 -sun4x_58 -sun4x_59 -sunx86_57 -sunx86_58 -sunx86_59>
  COMPDIRS = single_compdir
  INSTDIRS = single_instdir
  DESTDIRS = single_destdir
--- 44,58 ----
  CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG}
  
  # Name of directory to hold object files and libraries.
! <all -sun4x_57 -sun4x_58 -sun4x_59 -sun4x_510 -sunx86_57 -sunx86_58 -sunx86_59 -sunx86_510>
  KOBJ = MODLOAD
! <sun4x_57 sun4x_58 sun4x_59 sunx86_57 sunx86_58 sunx86_59 sunx86_510>
  KOBJ = MODLOAD32 MODLOAD64
! <sun4x_510>
! KOBJ = MODLOAD64
  
  # This tells Makefile.common to use it's single directory build target.
! <all -sun4x_57 -sun4x_58 -sun4x_59 -sun4x_510 -sunx86_57 -sunx86_58 -sunx86_59 -sunx86_510>
  COMPDIRS = single_compdir
  INSTDIRS = single_instdir
  DESTDIRS = single_destdir
Index: openafs/src/libafs/afs.ppc_darwin_70.plist.in
diff -c openafs/src/libafs/afs.ppc_darwin_70.plist.in:1.2.2.9 openafs/src/libafs/afs.ppc_darwin_70.plist.in:1.2.2.10
*** openafs/src/libafs/afs.ppc_darwin_70.plist.in:1.2.2.9	Mon Apr 10 16:29:39 2006
--- openafs/src/libafs/afs.ppc_darwin_70.plist.in	Wed Jul  5 16:42:39 2006
***************
*** 15,25 ****
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.1</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>1.4.1</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kernel.bsd</key>
--- 15,25 ----
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.2b2</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>1.4.2b2</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kernel.bsd</key>
Index: openafs/src/libafs/afs.ppc_darwin_80.plist.in
diff -c openafs/src/libafs/afs.ppc_darwin_80.plist.in:1.1.2.4 openafs/src/libafs/afs.ppc_darwin_80.plist.in:1.1.2.5
*** openafs/src/libafs/afs.ppc_darwin_80.plist.in:1.1.2.4	Mon Apr 10 16:29:39 2006
--- openafs/src/libafs/afs.ppc_darwin_80.plist.in	Wed Jul  5 16:42:39 2006
***************
*** 15,25 ****
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.1</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>1.4.1</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kpi.bsd</key>
--- 15,25 ----
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.2b2</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>1.4.2b2</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kpi.bsd</key>
Index: openafs/src/libafs/afs.ppc_darwin_90.plist.in
diff -c openafs/src/libafs/afs.ppc_darwin_90.plist.in:1.1.2.3 openafs/src/libafs/afs.ppc_darwin_90.plist.in:1.1.2.4
*** openafs/src/libafs/afs.ppc_darwin_90.plist.in:1.1.2.3	Mon Apr 10 16:29:39 2006
--- openafs/src/libafs/afs.ppc_darwin_90.plist.in	Wed Jul  5 16:42:39 2006
***************
*** 15,25 ****
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.1</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>1.4.1</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kpi.bsd</key>
--- 15,25 ----
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.2b2</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>1.4.2b2</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kpi.bsd</key>
Index: openafs/src/libafs/afs.x86_darwin_80.plist.in
diff -c openafs/src/libafs/afs.x86_darwin_80.plist.in:1.1.2.3 openafs/src/libafs/afs.x86_darwin_80.plist.in:1.1.2.4
*** openafs/src/libafs/afs.x86_darwin_80.plist.in:1.1.2.3	Mon Apr 10 16:29:39 2006
--- openafs/src/libafs/afs.x86_darwin_80.plist.in	Wed Jul  5 16:42:39 2006
***************
*** 15,25 ****
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.1</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>1.4.1</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kpi.bsd</key>
--- 15,25 ----
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.2b2</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>1.4.2b2</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kpi.bsd</key>
Index: openafs/src/libafs/afs.x86_darwin_90.plist.in
diff -c openafs/src/libafs/afs.x86_darwin_90.plist.in:1.1.2.3 openafs/src/libafs/afs.x86_darwin_90.plist.in:1.1.2.4
*** openafs/src/libafs/afs.x86_darwin_90.plist.in:1.1.2.3	Mon Apr 10 16:29:39 2006
--- openafs/src/libafs/afs.x86_darwin_90.plist.in	Wed Jul  5 16:42:39 2006
***************
*** 15,25 ****
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.1</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>1.4.1</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kpi.bsd</key>
--- 15,25 ----
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.2b2</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>1.4.2b2</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kpi.bsd</key>
Index: openafs/src/libafsauthent/afsauthent.def
diff -c openafs/src/libafsauthent/afsauthent.def:1.3 openafs/src/libafsauthent/afsauthent.def:1.3.2.1
*** openafs/src/libafsauthent/afsauthent.def:1.3	Tue Aug  3 13:27:59 2004
--- openafs/src/libafsauthent/afsauthent.def	Sun Jul  2 21:16:35 2006
***************
*** 84,86 ****
--- 84,88 ----
  
  	DISK_function_names				@83 DATA
  	VOTE_function_names				@84 DATA
+ 	rx_Finalize					@85
+ 	pr_End						@86
Index: openafs/src/libafsrpc/afsrpc.def
diff -c openafs/src/libafsrpc/afsrpc.def:1.3.2.7 openafs/src/libafsrpc/afsrpc.def:1.3.2.8
*** openafs/src/libafsrpc/afsrpc.def:1.3.2.7	Tue Oct  4 13:45:53 2005
--- openafs/src/libafsrpc/afsrpc.def	Tue Jun 20 17:00:18 2006
***************
*** 215,219 ****
--- 215,221 ----
          rx_StartClientThread                    @220
  	rxkad_global_stats_lock			@221 DATA
  	rxkad_stats_key				@222 DATA
+ 	rx_InitHost				@224
+ 	rx_NewServiceHost			@225
          
  
Index: openafs/src/libuafs/Makefile.common.in
diff -c openafs/src/libuafs/Makefile.common.in:1.12.2.3 openafs/src/libuafs/Makefile.common.in:1.12.2.4
*** openafs/src/libuafs/Makefile.common.in:1.12.2.3	Tue Jun 21 16:19:59 2005
--- openafs/src/libuafs/Makefile.common.in	Tue Jun 20 17:40:46 2006
***************
*** 1314,1320 ****
  
  clean:
  	-$(RM) -rf UAFS* JUAFS* AFSWEB* nsapi des afs afsint config rx
! 	-$(RM) -f  h net netinet rpc ufs machine inet nfs sys des linktest
  
  
  ${TOP_LIBDIR}/$(LIBAFSWEB): AFSWEB/$(LIBAFSWEB)
--- 1314,1320 ----
  
  clean:
  	-$(RM) -rf UAFS* JUAFS* AFSWEB* nsapi des afs afsint config rx
! 	-$(RM) -f  h net netinet rpc ufs machine inet nfs sys des linktest $(AFS_OS_CLEAN)
  
  
  ${TOP_LIBDIR}/$(LIBAFSWEB): AFSWEB/$(LIBAFSWEB)
Index: openafs/src/libuafs/MakefileProto.AIX.in
diff -c openafs/src/libuafs/MakefileProto.AIX.in:1.8.2.1 openafs/src/libuafs/MakefileProto.AIX.in:1.8.2.2
*** openafs/src/libuafs/MakefileProto.AIX.in:1.8.2.1	Tue Dec  7 11:48:42 2004
--- openafs/src/libuafs/MakefileProto.AIX.in	Tue Jun 20 17:40:46 2006
***************
*** 30,35 ****
--- 30,40 ----
  LIBAFSWEB = nsafs.a
  LIBAFSWEBKRB = nsafs.krb.a
  
+ 
+ AFS_OS_CLEAN = \
+ 	*.exp \
+ 	export.h
+ 
  # To get __file__ (afs_osi_pag.c) you need to specify language level 
  # C99 to xlc_r like this:
  OPTF=-O -qlanglvl=stdc99
Index: openafs/src/packaging/MacOS/OpenAFS.Info.plist
diff -c openafs/src/packaging/MacOS/OpenAFS.Info.plist:1.2.2.18 openafs/src/packaging/MacOS/OpenAFS.Info.plist:1.2.2.19
*** openafs/src/packaging/MacOS/OpenAFS.Info.plist:1.2.2.18	Wed Jun  7 01:05:54 2006
--- openafs/src/packaging/MacOS/OpenAFS.Info.plist	Wed Jul  5 16:42:40 2006
***************
*** 3,15 ****
  <plist version="1.0">
  <dict>
  	<key>CFBundleGetInfoString</key>
! 	<string>OpenAFS 1.4.2-beta1</string>
  	<key>CFBundleIdentifier</key>
  	<string>org.openafs.OpenAFS.pkg</string>
  	<key>CFBundleName</key>
  	<string>OpenAFS</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.2-beta1</string>
  	<key>IFMajorVersion</key>
  	<integer>1</integer>
  	<key>IFMinorVersion</key>
--- 3,15 ----
  <plist version="1.0">
  <dict>
  	<key>CFBundleGetInfoString</key>
! 	<string>OpenAFS 1.4.2b2</string>
  	<key>CFBundleIdentifier</key>
  	<string>org.openafs.OpenAFS.pkg</string>
  	<key>CFBundleName</key>
  	<string>OpenAFS</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.2b2</string>
  	<key>IFMajorVersion</key>
  	<integer>1</integer>
  	<key>IFMinorVersion</key>
Index: openafs/src/packaging/MacOS/OpenAFS.info
diff -c openafs/src/packaging/MacOS/OpenAFS.info:1.1.4.32 openafs/src/packaging/MacOS/OpenAFS.info:1.1.4.33
*** openafs/src/packaging/MacOS/OpenAFS.info:1.1.4.32	Wed Jun  7 01:05:54 2006
--- openafs/src/packaging/MacOS/OpenAFS.info	Wed Jul  5 16:42:40 2006
***************
*** 1,5 ****
  Title OpenAFS
! Version 1.4.2-beta1
  Description The OpenAFS distributed filesystem. This package installs an almost-ready-to-run client for OpenAFS. see http://www.openafs.org for more information.
  DefaultLocation /
  Diskname (null)
--- 1,5 ----
  Title OpenAFS
! Version 1.4.2b2
  Description The OpenAFS distributed filesystem. This package installs an almost-ready-to-run client for OpenAFS. see http://www.openafs.org for more information.
  DefaultLocation /
  Diskname (null)
Index: openafs/src/packaging/OpenBSD/buildpkg.sh
diff -c openafs/src/packaging/OpenBSD/buildpkg.sh:1.3 openafs/src/packaging/OpenBSD/buildpkg.sh:1.3.2.1
*** openafs/src/packaging/OpenBSD/buildpkg.sh:1.3	Mon Jul  7 18:30:46 2003
--- openafs/src/packaging/OpenBSD/buildpkg.sh	Fri Jun 23 10:21:12 2006
***************
*** 1,4 ****
! # $Id: buildpkg.sh,v 1.3 2003/07/07 22:30:46 rees Exp $
  
  SRC=../../../../..
  umask 022
--- 1,6 ----
! # $Id: buildpkg.sh,v 1.3.2.1 2006/06/23 14:21:12 rees Exp $
! 
! # This doesn't actually build a package any more
  
  SRC=../../../../..
  umask 022
***************
*** 30,33 ****
  
  echo '/afs:/usr/vice/cache:96000' >usr/vice/etc/cacheinfo
  
! pkg_create -v -h -f packinglist -c -OpenAFS -d desc -p / -s $PWD openafs-client
--- 32,37 ----
  
  echo '/afs:/usr/vice/cache:96000' >usr/vice/etc/cacheinfo
  
! tar chfvz openafs-client.tgz usr/vice
! 
! #pkg_create -v -h -f packinglist -c -OpenAFS -d desc -p / -s $PWD openafs-client
Index: openafs/src/packaging/OpenBSD/postinstall
diff -c openafs/src/packaging/OpenBSD/postinstall:1.3 openafs/src/packaging/OpenBSD/postinstall:1.3.2.1
*** openafs/src/packaging/OpenBSD/postinstall:1.3	Wed Mar 24 17:53:19 2004
--- openafs/src/packaging/OpenBSD/postinstall	Fri Jun 23 10:21:12 2006
***************
*** 1,10 ****
! # $Id: postinstall,v 1.3 2004/03/24 22:53:19 rees Exp $
  
  umask 022
  if [ ! -d /afs ]; then
    mkdir /afs
  fi
  
  strip -x /usr/vice/bin/*
  
  echo "Fetching CellServDB..."
--- 1,18 ----
! # $Id: postinstall,v 1.3.2.1 2006/06/23 14:21:12 rees Exp $
! 
! if [ `id -u` != "0" ]; then
!   echo "Must be root; current id="`id -u`
!   exit 1
! fi
  
  umask 022
  if [ ! -d /afs ]; then
    mkdir /afs
  fi
  
+ chown root.bin /usr/vice /usr/vice/cache
+ chown -R root.bin /usr/vice/bin /usr/vice/etc
+ 
  strip -x /usr/vice/bin/*
  
  echo "Fetching CellServDB..."
Index: openafs/src/ptserver/ptserver.c
diff -c openafs/src/ptserver/ptserver.c:1.21.2.4 openafs/src/ptserver/ptserver.c:1.21.2.7
*** openafs/src/ptserver/ptserver.c:1.21.2.4	Tue Feb 21 23:09:30 2006
--- openafs/src/ptserver/ptserver.c	Tue Jun 20 16:35:01 2006
***************
*** 1,3 ****
--- 1,4 ----
+ 
  /*
   * Copyright 2000, International Business Machines Corporation and others.
   * All Rights Reserved.
***************
*** 112,118 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptserver.c,v 1.21.2.4 2006/02/22 04:09:30 jaltman Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
--- 113,119 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptserver.c,v 1.21.2.7 2006/06/20 20:35:01 jaltman Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
***************
*** 167,172 ****
--- 168,177 ----
  
  int restricted = 0;
  int rxMaxMTU = -1;
+ int rxBind = 0;
+ 
+ #define ADDRSPERSITE 16         /* Same global is in rx/rx_user.c */
+ afs_uint32 SHostAddrs[ADDRSPERSITE];
  
  static struct afsconf_cell info;
  
***************
*** 222,227 ****
--- 227,233 ----
      int kerberosKeys;		/* set if found some keys */
      int lwps = 3;
      char clones[MAXHOSTSPERCELL];
+     afs_uint32 host = htonl(INADDR_ANY);
  
      const char *pr_dbaseName;
      char *whoami = "ptserver";
***************
*** 305,310 ****
--- 311,319 ----
  	else if (strncmp(arg, "-restricted", alen) == 0) {
  	    restricted = 1;
  	}
+ 	else if (strncmp(arg, "-rxbind", alen) == 0) {
+ 	    rxBind = 1;
+ 	}
  	else if (strncmp(arg, "-enable_peer_stats", alen) == 0) {
  	    rx_enablePeerRPCStats();
  	} else if (strncmp(arg, "-enable_process_stats", alen) == 0) {
***************
*** 374,389 ****
  		   "[-syslog[=FACILITY]] "
  		   "[-p <number of processes>] [-rebuild] "
  		   "[-groupdepth <depth>] "
! 		   "[-restricted] [-rxmaxmtu <bytes>]"
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-default_access default_user_access default_group_access] "
  		   "[-help]\n");
  #else /* AFS_NT40_ENV */
  	    printf("Usage: ptserver [-database <db path>] "
  		   "[-auditlog <log path>] "
! 		   "[-p <number of processes>] [-rebuild] "
  		   "[-default_access default_user_access default_group_access] "
! 		   "[-restricted] [-rxmaxmtu <bytes>]"
  		   "[-groupdepth <depth>] " "[-help]\n");
  #endif
  #else
--- 383,398 ----
  		   "[-syslog[=FACILITY]] "
  		   "[-p <number of processes>] [-rebuild] "
  		   "[-groupdepth <depth>] "
! 		   "[-restricted] [-rxmaxmtu <bytes>] [-rxbind] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-default_access default_user_access default_group_access] "
  		   "[-help]\n");
  #else /* AFS_NT40_ENV */
  	    printf("Usage: ptserver [-database <db path>] "
  		   "[-auditlog <log path>] "
! 		   "[-p <number of processes>] [-rebuild] [-rxbind] "
  		   "[-default_access default_user_access default_group_access] "
! 		   "[-restricted] [-rxmaxmtu <bytes>] [-rxbind] "
  		   "[-groupdepth <depth>] " "[-help]\n");
  #endif
  #else
***************
*** 394,406 ****
  		   "[-p <number of processes>] [-rebuild] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-default_access default_user_access default_group_access] "
! 		   "[-restricted] [-rxmaxmtu <bytes>]"
  		   "[-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>]"
  		   "[-p <number of processes>] [-rebuild] " "[-help]\n");
  #endif
  #endif
--- 403,415 ----
  		   "[-p <number of processes>] [-rebuild] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-default_access default_user_access default_group_access] "
! 		   "[-restricted] [-rxmaxmtu <bytes>] [-rxbind] "
  		   "[-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] "
  		   "[-p <number of processes>] [-rebuild] " "[-help]\n");
  #endif
  #endif
***************
*** 493,498 ****
--- 502,529 ----
       * and the header are in separate Ubik buffers then 120 buffers may be
       * required. */
      ubik_nBuffers = 120 + /*fudge */ 40;
+ 
+     if (rxBind) {
+ 	afs_int32 ccode;
+ #ifndef AFS_NT40_ENV
+ 	if (AFSDIR_SERVER_NETRESTRICT_FILEPATH || 
+ 	    AFSDIR_SERVER_NETINFO_FILEPATH) {
+ 	    char reason[1024];
+ 	    ccode = parseNetFiles(SHostAddrs, NULL, NULL,
+ 					   ADDRSPERSITE, reason,
+ 					   AFSDIR_SERVER_NETINFO_FILEPATH,
+ 					   AFSDIR_SERVER_NETRESTRICT_FILEPATH);
+ 	} else 
+ #endif
+ 	{
+ 	    ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
+ 	}
+ 	if (ccode == 1) {
+ 	    host = SHostAddrs[0];
+ 	    rx_InitHost(host, htons(AFSCONF_PROTPORT));
+ 	}
+     }
+ 
      code =
  	ubik_ServerInitByInfo(myHost, htons(AFSCONF_PROTPORT), &info, &clones,
  			      pr_dbaseName, &dbase);
***************
*** 519,525 ****
      }
  
      tservice =
! 	rx_NewService(0, PRSRV, "Protection Server", sc, 3,
  		      PR_ExecuteRequest);
      if (tservice == (struct rx_service *)0) {
  	fprintf(stderr, "ptserver: Could not create new rx service.\n");
--- 550,556 ----
      }
  
      tservice =
! 	rx_NewServiceHost(host, 0, PRSRV, "Protection Server", sc, 3,
  		      PR_ExecuteRequest);
      if (tservice == (struct rx_service *)0) {
  	fprintf(stderr, "ptserver: Could not create new rx service.\n");
***************
*** 529,535 ****
      rx_SetMaxProcs(tservice, lwps);
  
      tservice =
! 	rx_NewService(0, RX_STATS_SERVICE_ID, "rpcstats", sc, 3,
  		      RXSTATS_ExecuteRequest);
      if (tservice == (struct rx_service *)0) {
  	fprintf(stderr, "ptserver: Could not create new rx service.\n");
--- 560,566 ----
      rx_SetMaxProcs(tservice, lwps);
  
      tservice =
! 	rx_NewServiceHost(host, 0, RX_STATS_SERVICE_ID, "rpcstats", sc, 3,
  		      RXSTATS_ExecuteRequest);
      if (tservice == (struct rx_service *)0) {
  	fprintf(stderr, "ptserver: Could not create new rx service.\n");
Index: openafs/src/rx/rx.c
diff -c openafs/src/rx/rx.c:1.58.2.31 openafs/src/rx/rx.c:1.58.2.34
*** openafs/src/rx/rx.c:1.58.2.31	Mon May 22 15:08:48 2006
--- openafs/src/rx/rx.c	Sun Jul  2 21:16:36 2006
***************
*** 17,23 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx.c,v 1.58.2.31 2006/05/22 19:08:48 shadow Exp $");
  
  #ifdef KERNEL
  #include "afs/sysincludes.h"
--- 17,23 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx.c,v 1.58.2.34 2006/07/03 01:16:36 jaltman Exp $");
  
  #ifdef KERNEL
  #include "afs/sysincludes.h"
***************
*** 1255,1263 ****
                           service name might be used for probing for
                           statistics) */
  struct rx_service *
! rx_NewService(u_short port, u_short serviceId, char *serviceName,
! 	      struct rx_securityClass **securityObjects, int nSecurityObjects,
! 	      afs_int32(*serviceProc) (struct rx_call * acall))
  {
      osi_socket socket = OSI_NULLSOCKET;
      register struct rx_service *tservice;
--- 1255,1264 ----
                           service name might be used for probing for
                           statistics) */
  struct rx_service *
! rx_NewServiceHost(afs_uint32 host, u_short port, u_short serviceId, 
! 		  char *serviceName, struct rx_securityClass **securityObjects,
! 		  int nSecurityObjects, 
! 		  afs_int32(*serviceProc) (struct rx_call * acall))
  {
      osi_socket socket = OSI_NULLSOCKET;
      register struct rx_service *tservice;
***************
*** 1288,1294 ****
      for (i = 0; i < RX_MAX_SERVICES; i++) {
  	register struct rx_service *service = rx_services[i];
  	if (service) {
! 	    if (port == service->servicePort) {
  		if (service->serviceId == serviceId) {
  		    /* The identical service has already been
  		     * installed; if the caller was intending to
--- 1289,1295 ----
      for (i = 0; i < RX_MAX_SERVICES; i++) {
  	register struct rx_service *service = rx_services[i];
  	if (service) {
! 	    if (port == service->servicePort && host == service->serviceHost) {
  		if (service->serviceId == serviceId) {
  		    /* The identical service has already been
  		     * installed; if the caller was intending to
***************
*** 1309,1315 ****
  	    if (socket == OSI_NULLSOCKET) {
  		/* If we don't already have a socket (from another
  		 * service on same port) get a new one */
! 		socket = rxi_GetHostUDPSocket(htonl(INADDR_ANY), port);
  		if (socket == OSI_NULLSOCKET) {
  		    USERPRI;
  		    rxi_FreeService(tservice);
--- 1310,1316 ----
  	    if (socket == OSI_NULLSOCKET) {
  		/* If we don't already have a socket (from another
  		 * service on same port) get a new one */
! 		socket = rxi_GetHostUDPSocket(host, port);
  		if (socket == OSI_NULLSOCKET) {
  		    USERPRI;
  		    rxi_FreeService(tservice);
***************
*** 1318,1323 ****
--- 1319,1325 ----
  	    }
  	    service = tservice;
  	    service->socket = socket;
+ 	    service->serviceHost = host;
  	    service->servicePort = port;
  	    service->serviceId = serviceId;
  	    service->serviceName = serviceName;
***************
*** 1341,1346 ****
--- 1343,1356 ----
      return 0;
  }
  
+ struct rx_service *
+ rx_NewService(u_short port, u_short serviceId, char *serviceName,
+ 	      struct rx_securityClass **securityObjects, int nSecurityObjects,
+ 	      afs_int32(*serviceProc) (struct rx_call * acall))
+ {
+     return rx_NewServiceHost(htonl(INADDR_ANY), port, serviceId, serviceName, securityObjects, nSecurityObjects, serviceProc);
+ }
+ 
  /* Generic request processing loop. This routine should be called
   * by the implementation dependent rx_ServerProc. If socketp is
   * non-null, it will be set to the file descriptor that this thread
***************
*** 2011,2016 ****
--- 2021,2030 ----
      }
      rxi_flushtrace();
  
+ #ifdef AFS_NT40_ENV
+     afs_winsockCleanup();
+ #endif
+ 
      rxinit_status = 1;
      UNLOCK_RX_INIT;
  }
***************
*** 3550,3555 ****
--- 3564,3572 ----
  	if (serial
  	    && (tp->header.serial == serial || tp->firstSerial == serial))
  	    rxi_ComputePeerNetStats(call, tp, ap, np);
+ 	if (!(tp->flags & RX_PKTFLAG_ACKED)) {
+ 	    newAckCount++;
+ 	}
  #ifdef	AFS_GLOBAL_RXLOCK_KERNEL
  	/* XXX Hack. Because we have to release the global rx lock when sending
  	 * packets (osi_NetSend) we drop all acks while we're traversing the tq
***************
*** 3560,3568 ****
  	 * set the ack bits in the packets and have rxi_Start remove the packets
  	 * when it's done transmitting.
  	 */
- 	if (!(tp->flags & RX_PKTFLAG_ACKED)) {
- 	    newAckCount++;
- 	}
  	if (call->flags & RX_CALL_TQ_BUSY) {
  #ifdef RX_ENABLE_LOCKS
  	    tp->flags |= RX_PKTFLAG_ACKED;
--- 3577,3582 ----
Index: openafs/src/rx/rx.h
diff -c openafs/src/rx/rx.h:1.22.2.4 openafs/src/rx/rx.h:1.22.2.5
*** openafs/src/rx/rx.h:1.22.2.4	Wed Sep 14 01:12:45 2005
--- openafs/src/rx/rx.h	Mon Jun 12 17:53:43 2006
***************
*** 295,300 ****
--- 295,301 ----
  
  struct rx_service {
      u_short serviceId;		/* Service number */
+     afs_uint32 serviceHost;	/* IP address for this service */
      u_short servicePort;	/* UDP port for this service */
      char *serviceName;		/* Name of the service */
      osi_socket socket;		/* socket structure or file descriptor */
Index: openafs/src/rx/rx_getaddr.c
diff -c openafs/src/rx/rx_getaddr.c:1.15.2.11 openafs/src/rx/rx_getaddr.c:1.15.2.12
*** openafs/src/rx/rx_getaddr.c:1.15.2.11	Mon Jun 12 23:54:18 2006
--- openafs/src/rx/rx_getaddr.c	Thu Jun 15 11:13:33 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_getaddr.c,v 1.15.2.11 2006/06/13 03:54:18 shadow Exp $");
  
  #ifndef AFS_DJGPP_ENV
  #ifndef KERNEL
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_getaddr.c,v 1.15.2.12 2006/06/15 15:13:33 shadow Exp $");
  
  #ifndef AFS_DJGPP_ENV
  #ifndef KERNEL
***************
*** 204,214 ****
  	    if (count >= maxSize)	/* no more space */
  		dpf(("Too many interfaces..ignoring 0x%x\n",
  		       a->sin_addr.s_addr));
! 	    else if (!loopbacks && a->sin_addr.s_addr == htonl(0x7f000001)) 
  		continue;	/* skip loopback address as well. */
! 	    else if (loopbacks && ifm->ifm_flags & IFF_LOOPBACK) 
  		continue;	/* skip aliased loopbacks as well. */
! 	    else
  		buffer[count++] = a->sin_addr.s_addr;
  	    addrcount--;
  	    ifam = (struct ifa_msghdr *)((char *)ifam + ifam->ifam_msglen);
--- 204,216 ----
  	    if (count >= maxSize)	/* no more space */
  		dpf(("Too many interfaces..ignoring 0x%x\n",
  		       a->sin_addr.s_addr));
! 	    else if (!loopbacks && a->sin_addr.s_addr == htonl(0x7f000001)) {
! 		addrcount--;
  		continue;	/* skip loopback address as well. */
! 	    } else if (loopbacks && ifm->ifm_flags & IFF_LOOPBACK) {
! 		addrcount--;
  		continue;	/* skip aliased loopbacks as well. */
! 	    } else
  		buffer[count++] = a->sin_addr.s_addr;
  	    addrcount--;
  	    ifam = (struct ifa_msghdr *)((char *)ifam + ifam->ifam_msglen);
Index: openafs/src/rx/rx_prototypes.h
diff -c openafs/src/rx/rx_prototypes.h:1.14.2.14 openafs/src/rx/rx_prototypes.h:1.14.2.15
*** openafs/src/rx/rx_prototypes.h:1.14.2.14	Thu Jan 26 16:03:11 2006
--- openafs/src/rx/rx_prototypes.h	Mon Jun 12 17:53:43 2006
***************
*** 43,48 ****
--- 43,57 ----
  					afs_int32(*serviceProc) (struct
  								 rx_call *
  								 acall));
+ extern struct rx_service *rx_NewServiceHost(afs_uint32 host, u_short port, 
+ 					    u_short serviceId,
+ 					    char *serviceName,
+ 					    struct rx_securityClass
+ 					    **securityObjects,
+ 					    int nSecurityObjects,
+ 					    afs_int32(*serviceProc) (struct
+ 								     rx_call *
+ 								     acall));
  extern void rxi_ServerProc(int threadID, struct rx_call *newcall,
  			   osi_socket * socketp);
  extern void rx_WakeupServerProcs(void);
Index: openafs/src/rx/rx_pthread.c
diff -c openafs/src/rx/rx_pthread.c:1.17.2.6 openafs/src/rx/rx_pthread.c:1.17.2.7
*** openafs/src/rx/rx_pthread.c:1.17.2.6	Thu Sep 15 22:28:50 2005
--- openafs/src/rx/rx_pthread.c	Sun Jul  2 21:16:36 2006
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_pthread.c,v 1.17.2.6 2005/09/16 02:28:50 jaltman Exp $");
  
  #include <sys/types.h>
  #include <errno.h>
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_pthread.c,v 1.17.2.7 2006/07/03 01:16:36 jaltman Exp $");
  
  #include <sys/types.h>
  #include <errno.h>
***************
*** 87,93 ****
  void
  rxi_InitializeThreadSupport(void)
  {
!     listeners_started = 0;
      clock_GetTime(&rxi_clockNow);
  }
  
--- 87,95 ----
  void
  rxi_InitializeThreadSupport(void)
  {
! 	/* listeners_started must only be reset if
! 	 * the listener thread terminates */
! 	/* listeners_started = 0; */
      clock_GetTime(&rxi_clockNow);
  }
  
***************
*** 322,327 ****
--- 324,332 ----
      pthread_attr_t tattr;
      AFS_SIGSET_DECL;
  
+ 	if (listeners_started)
+ 		return;
+ 
      if (pthread_attr_init(&tattr) != 0) {
  	dpf
  	    (("Unable to create Rx event handling thread (pthread_attr_init)\n"));
Index: openafs/src/rxkad/ticket5.c
diff -c openafs/src/rxkad/ticket5.c:1.8.2.2 openafs/src/rxkad/ticket5.c:1.8.2.3
*** openafs/src/rxkad/ticket5.c:1.8.2.2	Wed Feb 22 00:08:58 2006
--- openafs/src/rxkad/ticket5.c	Thu Jun 29 19:25:49 2006
***************
*** 62,68 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/ticket5.c,v 1.8.2.2 2006/02/22 05:08:58 jaltman Exp $");
  
  #if defined(UKERNEL)
  #include "../afs/sysincludes.h"
--- 62,68 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/ticket5.c,v 1.8.2.3 2006/06/29 23:25:49 jaltman Exp $");
  
  #if defined(UKERNEL)
  #include "../afs/sysincludes.h"
***************
*** 284,290 ****
  	v5_comp1 = decr_part.cname.name_string.val[1];
  	p = sconv_list;
  	while (p->v4_str) {
! 	    if (strncmp(p->v5_str, v5_comp0, p->len) == 0) {
  		/*
  		 * It is, so set the new name now, and chop off
  		 * instance's domain name if requested.
--- 284,290 ----
  	v5_comp1 = decr_part.cname.name_string.val[1];
  	p = sconv_list;
  	while (p->v4_str) {
! 	    if (strcmp(p->v5_str, v5_comp0) == 0) {
  		/*
  		 * It is, so set the new name now, and chop off
  		 * instance's domain name if requested.
Index: openafs/src/shlibafsauthent/afsauthent.def
diff -c openafs/src/shlibafsauthent/afsauthent.def:1.1 openafs/src/shlibafsauthent/afsauthent.def:1.1.4.1
*** openafs/src/shlibafsauthent/afsauthent.def:1.1	Wed Aug 28 02:05:49 2002
--- openafs/src/shlibafsauthent/afsauthent.def	Sun Jul  2 21:16:36 2006
***************
*** 84,86 ****
--- 84,88 ----
  
  	DISK_function_names				@83 DATA
  	VOTE_function_names				@84 DATA
+ 	rx_Finalize					@85
+ 	pr_End						@86
Index: openafs/src/shlibafsrpc/Makefile.in
diff -c openafs/src/shlibafsrpc/Makefile.in:1.15.2.8 openafs/src/shlibafsrpc/Makefile.in:1.15.2.9
*** openafs/src/shlibafsrpc/Makefile.in:1.15.2.8	Wed Jun  7 00:22:27 2006
--- openafs/src/shlibafsrpc/Makefile.in	Wed Jul  5 14:34:41 2006
***************
*** 1,7 ****
  # API version. When something changes, increment as appropriate. 
  # Ignore at your own risk.
  LIBAFSRPCMAJOR=1
! LIBAFSRPCMINOR=0
  
  # Copyright 2000, International Business Machines Corporation and others.
  # All Rights Reserved.
--- 1,7 ----
  # API version. When something changes, increment as appropriate. 
  # Ignore at your own risk.
  LIBAFSRPCMAJOR=1
! LIBAFSRPCMINOR=1
  
  # Copyright 2000, International Business Machines Corporation and others.
  # All Rights Reserved.
***************
*** 282,288 ****
  #
  #   $ what /opt/langtools/bin/pxdb32
  #   /opt/langtools/bin/pxdb32:
! #           HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.15.2.8 $
  #
  # The problem occurs when -g and -O are both used when compiling des.c.
  # The simplest way to work around the problem is to leave out either -g or -O.
--- 282,288 ----
  #
  #   $ what /opt/langtools/bin/pxdb32
  #   /opt/langtools/bin/pxdb32:
! #           HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.15.2.9 $
  #
  # The problem occurs when -g and -O are both used when compiling des.c.
  # The simplest way to work around the problem is to leave out either -g or -O.
Index: openafs/src/shlibafsrpc/mapfile
diff -c openafs/src/shlibafsrpc/mapfile:1.3.2.2 openafs/src/shlibafsrpc/mapfile:1.3.2.3
*** openafs/src/shlibafsrpc/mapfile:1.3.2.2	Mon Aug  8 11:39:24 2005
--- openafs/src/shlibafsrpc/mapfile	Wed Jul  5 14:34:41 2006
***************
*** 81,86 ****
--- 81,90 ----
  	multi_Finalize_Ignore;
  	add_to_error_table;
  	xdr_afsUUID;
+ 	xdr_afs_int32;
+ 	xdr_afs_uint32;
+ 	xdr_afs_int64;
+ 	xdr_afs_uint64;
  	rx_IncrementTimeAndCount;
  	rx_enable_stats;
  	rx_GetServerDebug;
Index: openafs/src/ubik/ubik.c
diff -c openafs/src/ubik/ubik.c:1.15 openafs/src/ubik/ubik.c:1.15.2.1
*** openafs/src/ubik/ubik.c:1.15	Sun Aug  8 19:57:23 2004
--- openafs/src/ubik/ubik.c	Mon Jun 12 17:53:44 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/ubik.c,v 1.15 2004/08/08 23:57:23 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/ubik.c,v 1.15.2.1 2006/06/12 21:53:44 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 240,245 ****
--- 240,247 ----
  	    ubik_sc[secIndex] = secClass;
  	}
      }
+     /* for backwards compat this should keep working as it does now 
+        and not host bind */
      code = rx_Init(myPort);
      if (code < 0)
  	return code;
Index: openafs/src/update/server.c
diff -c openafs/src/update/server.c:1.13 openafs/src/update/server.c:1.13.2.2
*** openafs/src/update/server.c:1.13	Wed Jun 23 10:27:46 2004
--- openafs/src/update/server.c	Tue Jun 20 16:35:01 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/update/server.c,v 1.13 2004/06/23 14:27:46 shadow Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/update/server.c,v 1.13.2.2 2006/06/20 20:35:01 jaltman Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
***************
*** 69,74 ****
--- 69,79 ----
  
  static int Quit();
  
+ int rxBind = 0;
+ 
+ #define ADDRSPERSITE 16         /* Same global is in rx/rx_user.c */
+ afs_uint32 SHostAddrs[ADDRSPERSITE];
+ 
  /* check whether caller is authorized to manage RX statistics */
  int
  update_rxstat_userok(struct rx_call *call)
***************
*** 183,188 ****
--- 188,194 ----
  {
      struct rx_securityClass *securityObjects[3];
      struct rx_service *service;
+     afs_uint32 host = htonl(INADDR_ANY);
  
      int a = 0;
      rxkad_level level;
***************
*** 234,248 ****
  
      for (a = 1; a < argc; a++) {
  	if (argv[a][0] == '-') {	/* parse options */
! 	    char arg[256];
! 	    lcstring(arg, argv[a], sizeof(arg));
! 	    newLevel = rxkad_StringToLevel(&argv[a][1]);
! 	    if (newLevel != -1) {
! 		level = newLevel;	/* set new level */
  		continue;
  	    }
  	  usage:
! 	    Quit("Usage: upserver [<directory>+] [-crypt <directory>+] [-clear <directory>+] [-auth <directory>+] [-help]\n");
  	} else {
  	    int dirlen;
  	    if (nDirs >= sizeof(dirName) / sizeof(dirName[0]))
--- 240,259 ----
  
      for (a = 1; a < argc; a++) {
  	if (argv[a][0] == '-') {	/* parse options */
! 	    if (strcmp(argv[a], "-rxbind") == 0) {
! 		rxBind = 1;
  		continue;
+ 	    } else {
+ 		char arg[256];
+ 		lcstring(arg, argv[a], sizeof(arg));
+ 		newLevel = rxkad_StringToLevel(&argv[a][1]);
+ 		if (newLevel != -1) {
+ 		    level = newLevel;	/* set new level */
+ 		    continue;
+ 		}
  	    }
  	  usage:
! 	    Quit("Usage: upserver [<directory>+] [-crypt <directory>+] [-clear <directory>+] [-auth <directory>+] [-rxbind] [-help]\n");
  	} else {
  	    int dirlen;
  	    if (nDirs >= sizeof(dirName) / sizeof(dirName[0]))
***************
*** 270,278 ****
  	exit(1);
      }
  
      /* Initialize Rx, telling it port number this server will use for its
       * single service */
!     if (rx_Init(htons(AFSCONF_UPDATEPORT)) < 0)
  	Quit("rx_init");
  
      /* Create a single security object, in this case the null security object,
--- 281,308 ----
  	exit(1);
      }
  
+     if (rxBind) {
+ 	afs_int32 ccode;
+ #ifndef AFS_NT40_ENV
+         if (AFSDIR_SERVER_NETRESTRICT_FILEPATH || 
+             AFSDIR_SERVER_NETINFO_FILEPATH) {
+             char reason[1024];
+             ccode = parseNetFiles(SHostAddrs, NULL, NULL,
+                                            ADDRSPERSITE, reason,
+                                            AFSDIR_SERVER_NETINFO_FILEPATH,
+                                            AFSDIR_SERVER_NETRESTRICT_FILEPATH);
+         } else 
+ #endif	
+ 	{
+             ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
+         }
+         if (ccode == 1) 
+             host = SHostAddrs[0];
+     }
+ 
      /* Initialize Rx, telling it port number this server will use for its
       * single service */
!     if (rx_InitHost(host, htons(AFSCONF_UPDATEPORT)) < 0)
  	Quit("rx_init");
  
      /* Create a single security object, in this case the null security object,
***************
*** 296,303 ****
       * which is called to decode requests is passed in here
       * (UPDATE_ExecuteRequest). */
      service =
! 	rx_NewService(0, UPDATE_SERVICEID, "UPDATE", securityObjects, 3,
! 		      UPDATE_ExecuteRequest);
      if (service == (struct rx_service *)0)
  	Quit("rx_NewService");
      rx_SetMaxProcs(service, 2);
--- 326,333 ----
       * which is called to decode requests is passed in here
       * (UPDATE_ExecuteRequest). */
      service =
! 	rx_NewServiceHost(host, 0, UPDATE_SERVICEID, "UPDATE", securityObjects,
! 			  3, UPDATE_ExecuteRequest);
      if (service == (struct rx_service *)0)
  	Quit("rx_NewService");
      rx_SetMaxProcs(service, 2);
Index: openafs/src/util/afsutil.h
diff -c openafs/src/util/afsutil.h:1.17.2.3 openafs/src/util/afsutil.h:1.17.2.4
*** openafs/src/util/afsutil.h:1.17.2.3	Wed Mar 15 13:35:56 2006
--- openafs/src/util/afsutil.h	Sun Jul  2 21:16:37 2006
***************
*** 90,95 ****
--- 90,96 ----
  
  /* Initialize the windows sockets before calling networking routines. */
       extern int afs_winsockInit(void);
+      extern void afs_winsockCleanup(void);
  
       struct timezone {
  	 int tz_minuteswest;	/* of Greenwich */
Index: openafs/src/util/winsock_nt.c
diff -c openafs/src/util/winsock_nt.c:1.5 openafs/src/util/winsock_nt.c:1.5.2.1
*** openafs/src/util/winsock_nt.c:1.5	Tue Jul 15 19:17:17 2003
--- openafs/src/util/winsock_nt.c	Sun Jul  2 21:16:37 2006
***************
*** 13,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/winsock_nt.c,v 1.5 2003/07/15 23:17:17 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
--- 13,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/winsock_nt.c,v 1.5.2.1 2006/07/03 01:16:37 jaltman Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
***************
*** 25,35 ****
   * 
   * Returns 0 on success, -1 on error.
   */
  int
  afs_winsockInit(void)
  {
-     static int once = 1;
- 
      if (once) {
  	int code;
  	WSADATA data;
--- 25,35 ----
   * 
   * Returns 0 on success, -1 on error.
   */
+ static int once = 1;
+ 
  int
  afs_winsockInit(void)
  {
      if (once) {
  	int code;
  	WSADATA data;
***************
*** 48,53 ****
--- 48,60 ----
      return 0;
  }
  
+ void
+ afs_winsockCleanup(void)
+ {
+     WSACleanup();
+     once = 0;
+ }
+ 
  int
  afs_gettimeofday(struct timeval *tv, struct timezone *tz)
  {
Index: openafs/src/venus/cmdebug.c
diff -c openafs/src/venus/cmdebug.c:1.15.2.4 openafs/src/venus/cmdebug.c:1.15.2.5
*** openafs/src/venus/cmdebug.c:1.15.2.4	Thu Mar 23 11:45:53 2006
--- openafs/src/venus/cmdebug.c	Mon Jun 26 12:19:06 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/cmdebug.c,v 1.15.2.4 2006/03/23 16:45:53 shadow Exp $");
  
  
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/cmdebug.c,v 1.15.2.5 2006/06/26 16:19:06 rra Exp $");
  
  
  #include <sys/types.h>
***************
*** 41,46 ****
--- 41,47 ----
  #include <rx/rx.h>
  #include <lock.h>
  #include <afs/afs_args.h>
+ #include <afs/afsutil.h>
  
  extern struct hostent *hostutil_GetHostByName();
  
Index: openafs/src/viced/afsfileprocs.c
diff -c openafs/src/viced/afsfileprocs.c:1.81.2.28 openafs/src/viced/afsfileprocs.c:1.81.2.29
*** openafs/src/viced/afsfileprocs.c:1.81.2.28	Wed May 10 01:01:08 2006
--- openafs/src/viced/afsfileprocs.c	Tue Jul  4 02:16:42 2006
***************
*** 29,35 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/afsfileprocs.c,v 1.81.2.28 2006/05/10 05:01:08 shadow Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
--- 29,35 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/afsfileprocs.c,v 1.81.2.29 2006/07/04 06:16:42 jaltman Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
***************
*** 5638,5644 ****
  {				/*SRXAFS_XStatsVersion */
  
      struct client *t_client = NULL;	/* tmp ptr to client data */
!     struct rx_connection *tcon;
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
      struct timeval opStartTime, opStopTime;	/* Start/stop times for RPC op */
--- 5638,5644 ----
  {				/*SRXAFS_XStatsVersion */
  
      struct client *t_client = NULL;	/* tmp ptr to client data */
!     struct rx_connection *tcon = rx_ConnectionOf(a_call);
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
      struct timeval opStartTime, opStopTime;	/* Start/stop times for RPC op */
Index: openafs/src/viced/host.c
diff -c openafs/src/viced/host.c:1.57.2.36 openafs/src/viced/host.c:1.57.2.38
*** openafs/src/viced/host.c:1.57.2.36	Wed Jun  7 00:55:25 2006
--- openafs/src/viced/host.c	Tue Jun 20 16:01:42 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/host.c,v 1.57.2.36 2006/06/07 04:55:25 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/host.c,v 1.57.2.38 2006/06/20 20:01:42 jaltman Exp $");
  
  #include <stdio.h>
  #include <errno.h>
***************
*** 1609,1614 ****
--- 1609,1616 ----
  	H_UNLOCK;
  	ObtainWriteLock(&client->lock);	/* released at end */
  	H_LOCK;
+     } else {
+ 	client = NULL;
      }
  
      authClass = rx_SecurityClassOf((struct rx_connection *)tcon);
***************
*** 1759,1765 ****
       * the RPC from the other client structure's rock.
       */
      oldClient = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     if (oldClient && oldClient->sid == rxr_CidOf(tcon)
  	&& oldClient->VenusEpoch == rxr_GetEpoch(tcon)) {
  	char hoststr[16];
  	if (!oldClient->deleted) {
--- 1761,1767 ----
       * the RPC from the other client structure's rock.
       */
      oldClient = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     if (oldClient && oldClient != client && oldClient->sid == rxr_CidOf(tcon)
  	&& oldClient->VenusEpoch == rxr_GetEpoch(tcon)) {
  	char hoststr[16];
  	if (!oldClient->deleted) {
***************
*** 1782,1789 ****
  		FreeCE(client);
  		created = 0;
  	    } 
- 	    ObtainWriteLock(&oldClient->lock);
  	    oldClient->refCount++;
  	    client = oldClient;
  	} else {
  	    ViceLog(0, ("FindClient: deleted client %x(%x) already had conn %x (host %s:%d), stolen by client %x(%x)\n", 
--- 1784,1793 ----
  		FreeCE(client);
  		created = 0;
  	    } 
  	    oldClient->refCount++;
+ 	    H_UNLOCK;
+ 	    ObtainWriteLock(&oldClient->lock);
+ 	    H_LOCK;
  	    client = oldClient;
  	} else {
  	    ViceLog(0, ("FindClient: deleted client %x(%x) already had conn %x (host %s:%d), stolen by client %x(%x)\n", 
Index: openafs/src/viced/viced.c
diff -c openafs/src/viced/viced.c:1.58.2.12 openafs/src/viced/viced.c:1.58.2.13
*** openafs/src/viced/viced.c:1.58.2.12	Wed Jun  7 00:41:20 2006
--- openafs/src/viced/viced.c	Mon Jun 12 17:53:44 2006
***************
*** 20,26 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/viced.c,v 1.58.2.12 2006/06/07 04:41:20 shadow Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
--- 20,26 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/viced.c,v 1.58.2.13 2006/06/12 21:53:44 shadow Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
***************
*** 167,172 ****
--- 167,173 ----
  int debuglevel = 0;
  int printBanner = 0;
  int rxJumbograms = 1;		/* default is to send and receive jumbograms. */
+ int rxBind = 0;		/* don't bind */
  int rxMaxMTU = -1;
  afs_int32 implicitAdminRights = PRSFS_LOOKUP;	/* The ADMINISTER right is 
  						 * already implied */
***************
*** 738,743 ****
--- 739,745 ----
      strcat(buffer, "[-rxdbg (enable rx debugging)] ");
      strcat(buffer, "[-rxdbge (enable rxevent debugging)] ");
      strcat(buffer, "[-rxmaxmtu <bytes>] ");
+     strcat(buffer, "[-rxbind (bind the Rx socket to one address)] ");
  #if AFS_PTHREAD_ENV
      strcat(buffer, "[-vattachpar <number of volume attach threads>] ");
  #endif
***************
*** 1054,1059 ****
--- 1056,1063 ----
  #endif
  	else if (!strcmp(argv[i], "-nojumbo")) {
  	    rxJumbograms = 0;
+ 	} else if (!strcmp(argv[i], "-rxbind")) {
+ 	    rxBind = 1;
  	} else if (!strcmp(argv[i], "-rxmaxmtu")) {
  	    if ((i + 1) >= argc) {
  		fprintf(stderr, "missing argument for -rxmaxmtu\n"); 
***************
*** 1555,1560 ****
--- 1559,1601 ----
  }
  
  afs_int32
+ SetupVL()
+ {
+     afs_int32 code;
+     extern int rxi_numNetAddrs;
+     extern afs_uint32 rxi_NetAddrs[];
+ 
+ #ifndef AFS_NT40_ENV
+     if (AFSDIR_SERVER_NETRESTRICT_FILEPATH || AFSDIR_SERVER_NETINFO_FILEPATH) {
+ 	/*
+ 	 * Find addresses we are supposed to register as per the netrestrict 
+ 	 * and netinfo files (/usr/afs/local/NetInfo and 
+ 	 * /usr/afs/local/NetRestict)
+ 	 */
+ 	char reason[1024];
+ 	afs_int32 code = parseNetFiles(FS_HostAddrs, NULL, NULL,
+ 				       ADDRSPERSITE, reason,
+ 				       AFSDIR_SERVER_NETINFO_FILEPATH,
+ 				       AFSDIR_SERVER_NETRESTRICT_FILEPATH);
+ 	if (code < 0) {
+ 	    ViceLog(0, ("Can't register any valid addresses: %s\n", reason));
+ 	    exit(1);
+ 	}
+ 	FS_HostAddr_cnt = (afs_uint32) code;
+     } else
+ #endif
+     {
+ 	FS_HostAddr_cnt = rx_getAllAddr(FS_HostAddrs, ADDRSPERSITE);
+     }
+ 
+     if (FS_HostAddr_cnt == 1 && rxBind == 1)
+ 	code = FS_HostAddrs[0];
+     else 
+ 	code = htonl(INADDR_ANY);
+     return code;
+ }
+ 
+ afs_int32
  InitVL()
  {
      afs_int32 code;
***************
*** 1587,1616 ****
      /* A good sysid file exists; inform the vlserver. If any conflicts,
       * we always use the latest interface available as the real truth.
       */
- #ifndef AFS_NT40_ENV
-     if (AFSDIR_SERVER_NETRESTRICT_FILEPATH || AFSDIR_SERVER_NETINFO_FILEPATH) {
- 	/*
- 	 * Find addresses we are supposed to register as per the netrestrict 
- 	 * and netinfo files (/usr/afs/local/NetInfo and 
- 	 * /usr/afs/local/NetRestict)
- 	 */
- 	char reason[1024];
- 	afs_int32 code = parseNetFiles(FS_HostAddrs, NULL, NULL,
- 				       ADDRSPERSITE, reason,
- 				       AFSDIR_SERVER_NETINFO_FILEPATH,
- 				       AFSDIR_SERVER_NETRESTRICT_FILEPATH);
- 	if (code < 0) {
- 	    ViceLog(0, ("Can't register any valid addresses: %s\n", reason));
- 	    exit(1);
- 	}
- 	FS_HostAddr_cnt = (afs_uint32) code;
-     } else
- #endif
-     {
- 	FS_HostAddr_cnt = rx_getAllAddr(FS_HostAddrs, ADDRSPERSITE);
-     }
  
-     FS_registered = 1;
      code = Do_VLRegisterRPC();
      return code;
  }
--- 1628,1634 ----
***************
*** 1635,1640 ****
--- 1653,1659 ----
  #endif
      int curLimit;
      time_t t;
+     afs_uint32 rx_bindhost;
  
  #ifdef	AFS_AIX32_ENV
      struct sigaction nsa;
***************
*** 1800,1806 ****
  #endif
      if (udpBufSize)
  	rx_SetUdpBufSize(udpBufSize);	/* set the UDP buffer size for receive */
!     if (rx_Init((int)htons(7000)) < 0) {
  	ViceLog(0, ("Cannot initialize RX\n"));
  	exit(1);
      }
--- 1819,1827 ----
  #endif
      if (udpBufSize)
  	rx_SetUdpBufSize(udpBufSize);	/* set the UDP buffer size for receive */
!     rx_bindhost = SetupVL();
! 
!     if (rx_InitHost(rx_bindhost, (int)htons(7000)) < 0) {
  	ViceLog(0, ("Cannot initialize RX\n"));
  	exit(1);
      }
***************
*** 1817,1827 ****
      sc[1] = 0;			/* rxvab_NewServerSecurityObject(key1, 0) */
      sc[2] = rxkad_NewServerSecurityObject(rxkad_clear, NULL, get_key, NULL);
      sc[3] = rxkad_NewServerSecurityObject(rxkad_crypt, NULL, get_key, NULL);
!     tservice = rx_NewService( /* port */ 0, /* service id */ 1,	/*service name */
! 			     "AFS",
! 							/* security classes */ sc,
! 							/* numb sec classes */
! 			     4, RXAFS_ExecuteRequest);
      if (!tservice) {
  	ViceLog(0,
  		("Failed to initialize RX, probably two servers running.\n"));
--- 1838,1849 ----
      sc[1] = 0;			/* rxvab_NewServerSecurityObject(key1, 0) */
      sc[2] = rxkad_NewServerSecurityObject(rxkad_clear, NULL, get_key, NULL);
      sc[3] = rxkad_NewServerSecurityObject(rxkad_crypt, NULL, get_key, NULL);
!     tservice = rx_NewServiceHost(rx_bindhost,  /* port */ 0, /* service id */ 
! 				 1,	/*service name */
! 				 "AFS",
! 				 /* security classes */ sc,
! 				 /* numb sec classes */
! 				 4, RXAFS_ExecuteRequest);
      if (!tservice) {
  	ViceLog(0,
  		("Failed to initialize RX, probably two servers running.\n"));
Index: openafs/src/vlserver/NTMakefile
diff -c openafs/src/vlserver/NTMakefile:1.8.2.1 openafs/src/vlserver/NTMakefile:1.8.2.2
*** openafs/src/vlserver/NTMakefile:1.8.2.1	Fri Mar 11 02:03:49 2005
--- openafs/src/vlserver/NTMakefile	Wed Jul  5 15:19:44 2006
***************
*** 154,160 ****
  # clean up
  
  clean::
! 	$(DEL) vldbint.cs.c vldbint.ss.c vldbint.xdr.c vldbint.h$$ 
  	$(DEL) vlserver.h vl_errors.c $(INCFILES)
  
  mkdir:
--- 154,160 ----
  # clean up
  
  clean::
! 	$(DEL) vldbint.cs.c vldbint.ss.c vldbint.xdr.c vldbint.h
  	$(DEL) vlserver.h vl_errors.c $(INCFILES)
  
  mkdir:
Index: openafs/src/vlserver/vlserver.c
diff -c openafs/src/vlserver/vlserver.c:1.18.2.4 openafs/src/vlserver/vlserver.c:1.18.2.6
*** openafs/src/vlserver/vlserver.c:1.18.2.4	Wed Apr 26 11:24:14 2006
--- openafs/src/vlserver/vlserver.c	Tue Jun 20 16:35:01 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vlserver/vlserver.c,v 1.18.2.4 2006/04/26 15:24:14 jaltman 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.18.2.6 2006/06/20 20:35:01 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 72,77 ****
--- 72,81 ----
  int smallMem = 0;
  int rxJumbograms = 1;		/* default is to send and receive jumbo grams */
  int rxMaxMTU = -1;
+ afs_int32 rxBind = 0;
+ 
+ #define ADDRSPERSITE 16         /* Same global is in rx/rx_user.c */
+ afs_uint32 SHostAddrs[ADDRSPERSITE];
  
  static void
  CheckSignal_Signal()
***************
*** 144,149 ****
--- 148,154 ----
      extern int rx_extraPackets;
      char commandLine[150];
      char clones[MAXHOSTSPERCELL];
+     afs_uint32 host = ntohl(INADDR_ANY);
  
  #ifdef	AFS_AIX32_ENV
      /*
***************
*** 179,184 ****
--- 184,192 ----
  	} else if (strcmp(argv[index], "-nojumbo") == 0) {
  	    rxJumbograms = 0;
  
+ 	} 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"); 
***************
*** 245,258 ****
  	    /* support help flag */
  #ifndef AFS_NT40_ENV
  	    printf("Usage: vlserver [-p <number of processes>] [-nojumbo] "
! 		   "[-rxmaxmtu <bytes>] "
  		   "[-auditlog <log path>] "
  		   "[-syslog[=FACILITY]] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-help]\n");
  #else
  	    printf("Usage: vlserver [-p <number of processes>] [-nojumbo] "
! 		   "[-rxmaxmtu <bytes>] "
  		   "[-auditlog <log path>] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-help]\n");
--- 253,266 ----
  	    /* 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");
***************
*** 323,328 ****
--- 331,357 ----
      if (noAuth)
  	afsconf_SetNoAuthFlag(tdir, 1);
  
+     if (rxBind) {
+ 	afs_int32 ccode;
+ #ifndef AFS_NT40_ENV
+         if (AFSDIR_SERVER_NETRESTRICT_FILEPATH || 
+             AFSDIR_SERVER_NETINFO_FILEPATH) {
+             char reason[1024];
+             ccode = parseNetFiles(SHostAddrs, NULL, NULL,
+ 				  ADDRSPERSITE, reason,
+ 				  AFSDIR_SERVER_NETINFO_FILEPATH,
+ 				  AFSDIR_SERVER_NETRESTRICT_FILEPATH);
+         } else 
+ #endif	
+ 	{
+             ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
+         }
+         if (ccode == 1) {
+             host = SHostAddrs[0];
+ 	    rx_InitHost(host, htons(AFSCONF_VLDBPORT));
+ 	}
+     }
+ 
      ubik_nBuffers = 512;
      ubik_CRXSecurityProc = afsconf_ClientAuth;
      ubik_CRXSecurityRock = (char *)tdir;
***************
*** 351,358 ****
      sc[0] = rxnull_NewServerSecurityObject();
      sc[1] = (struct rx_securityClass *)0;
      sc[2] = rxkad_NewServerSecurityObject(0, tdir, afsconf_GetKey, NULL);
      tservice =
! 	rx_NewService(0, USER_SERVICE_ID, "Vldb server", sc, 3,
  		      VL_ExecuteRequest);
      if (tservice == (struct rx_service *)0) {
  	printf("vlserver: Could not create VLDB_SERVICE rx service\n");
--- 380,388 ----
      sc[0] = rxnull_NewServerSecurityObject();
      sc[1] = (struct rx_securityClass *)0;
      sc[2] = rxkad_NewServerSecurityObject(0, tdir, afsconf_GetKey, NULL);
+ 
      tservice =
! 	rx_NewServiceHost(host, 0, USER_SERVICE_ID, "Vldb server", sc, 3,
  		      VL_ExecuteRequest);
      if (tservice == (struct rx_service *)0) {
  	printf("vlserver: Could not create VLDB_SERVICE rx service\n");
***************
*** 364,370 ****
      rx_SetMaxProcs(tservice, lwps);
  
      tservice =
! 	rx_NewService(0, RX_STATS_SERVICE_ID, "rpcstats", sc, 3,
  		      RXSTATS_ExecuteRequest);
      if (tservice == (struct rx_service *)0) {
  	printf("vlserver: Could not create rpc stats rx service\n");
--- 394,400 ----
      rx_SetMaxProcs(tservice, lwps);
  
      tservice =
! 	rx_NewServiceHost(host, 0, RX_STATS_SERVICE_ID, "rpcstats", sc, 3,
  		      RXSTATS_ExecuteRequest);
      if (tservice == (struct rx_service *)0) {
  	printf("vlserver: Could not create rpc stats rx service\n");
Index: openafs/src/vol/vol-salvage.c
diff -c openafs/src/vol/vol-salvage.c:1.41.2.5 openafs/src/vol/vol-salvage.c:1.41.2.8
*** openafs/src/vol/vol-salvage.c:1.41.2.5	Sat Mar 19 15:54:55 2005
--- openafs/src/vol/vol-salvage.c	Fri Jun 30 09:59:10 2006
***************
*** 92,98 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/vol-salvage.c,v 1.41.2.5 2005/03/19 20:54:55 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
--- 92,98 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/vol-salvage.c,v 1.41.2.8 2006/06/30 13:59:10 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
***************
*** 2744,2750 ****
      struct VnodeDiskObject vnode;
      struct VnodeClassInfo *vcp = &VnodeClassInfo[vLarge];
      Inode oldinode, newinode;
!     int code;
  
      if (dir->copied || Testing)
  	return;
--- 2744,2750 ----
      struct VnodeDiskObject vnode;
      struct VnodeClassInfo *vcp = &VnodeClassInfo[vLarge];
      Inode oldinode, newinode;
!     afs_sfsize_t code;
  
      if (dir->copied || Testing)
  	return;
***************
*** 2795,2812 ****
      struct VnodeClassInfo *vcp = &VnodeClassInfo[vLarge];
      Inode oldinode, newinode;
      DirHandle newdir;
!     register afs_int32 code;
      afs_int32 parentUnique = 1;
      struct VnodeEssence *vnodeEssence;
  
      if (Testing)
  	return;
      Log("Salvaging directory %u...\n", dir->vnodeNumber);
!     code =
  	IH_IREAD(vnodeInfo[vLarge].handle,
  		 vnodeIndexOffset(vcp, dir->vnodeNumber), (char *)&vnode,
  		 sizeof(vnode));
!     assert(code == sizeof(vnode));
      oldinode = VNDISK_GET_INO(&vnode);
      /* Increment the version number by a whole lot to avoid problems with
       * clients that were promised new version numbers--but the file server
--- 2795,2813 ----
      struct VnodeClassInfo *vcp = &VnodeClassInfo[vLarge];
      Inode oldinode, newinode;
      DirHandle newdir;
!     afs_int32 code;
!     afs_sfsize_t lcode;
      afs_int32 parentUnique = 1;
      struct VnodeEssence *vnodeEssence;
  
      if (Testing)
  	return;
      Log("Salvaging directory %u...\n", dir->vnodeNumber);
!     lcode =
  	IH_IREAD(vnodeInfo[vLarge].handle,
  		 vnodeIndexOffset(vcp, dir->vnodeNumber), (char *)&vnode,
  		 sizeof(vnode));
!     assert(lcode == sizeof(vnode));
      oldinode = VNDISK_GET_INO(&vnode);
      /* Increment the version number by a whole lot to avoid problems with
       * clients that were promised new version numbers--but the file server
***************
*** 2837,2844 ****
      if (code) {
  	/* didn't really build the new directory properly, let's just give up. */
  	code = IH_DEC(dir->ds_linkH, newinode, dir->rwVid);
- 	assert(code == 0);
  	Log("Directory salvage returned code %d, continuing.\n", code);
  	assert(1 == 2);
      }
      Log("Checking the results of the directory salvage...\n");
--- 2838,2847 ----
      if (code) {
  	/* didn't really build the new directory properly, let's just give up. */
  	code = IH_DEC(dir->ds_linkH, newinode, dir->rwVid);
  	Log("Directory salvage returned code %d, continuing.\n", code);
+ 	if (code) {
+ 	    Log("also failed to decrement link count on new inode");
+ 	}
  	assert(1 == 2);
      }
      Log("Checking the results of the directory salvage...\n");
***************
*** 2851,2861 ****
      vnode.cloned = 0;
      VNDISK_SET_INO(&vnode, newinode);
      VNDISK_SET_LEN(&vnode, Length(&newdir));
!     code =
  	IH_IWRITE(vnodeInfo[vLarge].handle,
  		  vnodeIndexOffset(vcp, dir->vnodeNumber), (char *)&vnode,
  		  sizeof(vnode));
!     assert(code == sizeof(vnode));
  #ifdef AFS_NT40_ENV
      nt_sync(fileSysDevice);
  #else
--- 2854,2864 ----
      vnode.cloned = 0;
      VNDISK_SET_INO(&vnode, newinode);
      VNDISK_SET_LEN(&vnode, Length(&newdir));
!     lcode =
  	IH_IWRITE(vnodeInfo[vLarge].handle,
  		  vnodeIndexOffset(vcp, dir->vnodeNumber), (char *)&vnode,
  		  sizeof(vnode));
!     assert(lcode == sizeof(vnode));
  #ifdef AFS_NT40_ENV
      nt_sync(fileSysDevice);
  #else
***************
*** 3095,3101 ****
      struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
      char buf[SIZEOF_LARGEDISKVNODE];
      struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
!     int size;
      StreamHandle_t *file;
      int vnodeIndex;
      int nVnodes;
--- 3098,3104 ----
      struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
      char buf[SIZEOF_LARGEDISKVNODE];
      struct VnodeDiskObject *vnode = (struct VnodeDiskObject *)buf;
!     afs_sfsize_t size;
      StreamHandle_t *file;
      int vnodeIndex;
      int nVnodes;
***************
*** 3302,3308 ****
      struct VnodeEssence *vep;
      afs_int32 v, pv;
      IHandle_t *h;
!     int nBytes;
      ViceFid pa;
      VnodeId LFVnode, ThisVnode;
      Unique LFUnique, ThisUnique;
--- 3305,3311 ----
      struct VnodeEssence *vep;
      afs_int32 v, pv;
      IHandle_t *h;
!     afs_sfsize_t nBytes;
      ViceFid pa;
      VnodeId LFVnode, ThisVnode;
      Unique LFUnique, ThisUnique;
***************
*** 3575,3581 ****
  ClearROInUseBit(struct VolumeSummary *summary)
  {
      IHandle_t *h = summary->volumeInfoHandle;
!     int nBytes;
  
      VolumeDiskData volHeader;
  
--- 3578,3584 ----
  ClearROInUseBit(struct VolumeSummary *summary)
  {
      IHandle_t *h = summary->volumeInfoHandle;
!     afs_sfsize_t nBytes;
  
      VolumeDiskData volHeader;
  
***************
*** 3587,3593 ****
      volHeader.inService = 1;
      volHeader.dontSalvage = DONT_SALVAGE;
      if (!Testing) {
! 	nBytes = IH_IREAD(h, 0, (char *)&volHeader, sizeof(volHeader));
  	assert(nBytes == sizeof(volHeader));
      }
  }
--- 3590,3596 ----
      volHeader.inService = 1;
      volHeader.dontSalvage = DONT_SALVAGE;
      if (!Testing) {
! 	nBytes = IH_IWRITE(h, 0, (char *)&volHeader, sizeof(volHeader));
  	assert(nBytes == sizeof(volHeader));
      }
  }
Index: openafs/src/volser/dumpstuff.c
diff -c openafs/src/volser/dumpstuff.c:1.25.2.1 openafs/src/volser/dumpstuff.c:1.25.2.3
*** openafs/src/volser/dumpstuff.c:1.25.2.1	Mon Apr 17 11:22:26 2006
--- openafs/src/volser/dumpstuff.c	Wed Jun 21 13:59:07 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/dumpstuff.c,v 1.25.2.1 2006/04/17 15:22:26 jaltman Exp $");
  
  #include <sys/types.h>
  #include <ctype.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/dumpstuff.c,v 1.25.2.3 2006/06/21 17:59:07 shadow Exp $");
  
  #include <sys/types.h>
  #include <ctype.h>
***************
*** 519,527 ****
  static int
  DumpFile(struct iod *iodp, int vnode, FdHandle_t * handleP)
  {
!     int code = 0, lcode = 0, error = 0;
      afs_int32 pad = 0, offset;
      afs_sfsize_t n, nbytes, howMany, howBig;
      byte *p;
  #ifndef AFS_NT40_ENV
      struct afs_stat status;
--- 519,528 ----
  static int
  DumpFile(struct iod *iodp, int vnode, FdHandle_t * handleP)
  {
!     int code = 0, error = 0;
      afs_int32 pad = 0, offset;
      afs_sfsize_t n, nbytes, howMany, howBig;
+     afs_foff_t lcode = 0;
      byte *p;
  #ifndef AFS_NT40_ENV
      struct afs_stat status;
***************
*** 529,535 ****
--- 530,541 ----
      afs_sfsize_t size;
  #ifdef	AFS_AIX_ENV
  #include <sys/statfs.h>
+ #ifdef AFS_LARGEFILE_ENV
+     struct statfs64 tstatfs;
+ #else /* !AFS_LARGEFILE_ENV */
      struct statfs tstatfs;
+ #endif /* !AFS_LARGEFILE_ENV */
+     int statfs_code;
  #endif
  
  #ifdef AFS_NT40_ENV
***************
*** 544,550 ****
      /* Unfortunately in AIX valuable fields such as st_blksize are 
       * gone from the stat structure.
       */
!     fstatfs(handleP->fd_fd, &tstatfs);
      howMany = tstatfs.f_bsize;
  #else
      howMany = status.st_blksize;
--- 550,564 ----
      /* Unfortunately in AIX valuable fields such as st_blksize are 
       * gone from the stat structure.
       */
! #ifdef AFS_LARGEFILE_ENV
!     statfs_code = fstatfs64(handleP->fd_fd, &tstatfs);
! #else /* !AFS_LARGEFILE_ENV */
!     statfs_code = fstatfs(handleP->fd_fd, &tstatfs);
! #endif /* !AFS_LARGEFILE_ENV */
!     if (statfs_code != 0) {
!         Log("DumpFile: fstatfs returned error code %d on descriptor %d\n", errno, handleP->fd_fd);
! 	return VOLSERDUMPERROR;
!     }
      howMany = tstatfs.f_bsize;
  #else
      howMany = status.st_blksize;
***************
*** 570,578 ****
  	return VOLSERDUMPERROR;
      }
  
!     p = (unsigned char *)malloc(howMany);
      if (!p) {
! 	Log("1 Volser: DumpFile: no memory");
  	return VOLSERDUMPERROR;
      }
  
--- 584,592 ----
  	return VOLSERDUMPERROR;
      }
  
!     p = (unsigned char *)malloc((size_t)howMany);
      if (!p) {
! 	Log("1 Volser: DumpFile: not enough memory to allocate %u bytes\n", howMany);
  	return VOLSERDUMPERROR;
      }
  
***************
*** 581,587 ****
  	    howMany = nbytes;
  
  	/* Read the data - unless we know we can't */
! 	n = (lcode ? 0 : FDH_READ(handleP, p, howMany));
  
  	/* If read any good data and we null padded previously, log the
  	 * amount that we had null padded.
--- 595,601 ----
  	    howMany = nbytes;
  
  	/* Read the data - unless we know we can't */
! 	n = (lcode ? 0 : FDH_READ(handleP, p, (size_t)howMany));
  
  	/* If read any good data and we null padded previously, log the
  	 * amount that we had null padded.
***************
*** 615,621 ****
  	    /* Now seek over the data we could not get. An error here means we
  	     * can't do the next read.
  	     */
! 	    lcode = FDH_SEEK(handleP, ((size - nbytes) + howMany), SEEK_SET);
  	    if (lcode != ((size - nbytes) + howMany)) {
  		if (lcode < 0) {
  		    Log("1 Volser: DumpFile: Error %d seeking in inode %s for vnode %d\n", errno, PrintInode(NULL, handleP->fd_ih->ih_ino), vnode);
--- 629,635 ----
  	    /* Now seek over the data we could not get. An error here means we
  	     * can't do the next read.
  	     */
! 	    lcode = FDH_SEEK(handleP, (size_t)((size - nbytes) + howMany), SEEK_SET);
  	    if (lcode != ((size - nbytes) + howMany)) {
  		if (lcode < 0) {
  		    Log("1 Volser: DumpFile: Error %d seeking in inode %s for vnode %d\n", errno, PrintInode(NULL, handleP->fd_ih->ih_ino), vnode);
***************
*** 629,635 ****
  	}
  
  	/* Now write the data out */
! 	if (iod_Write(iodp, (char *)p, howMany) != howMany)
  	    error = VOLSERDUMPERROR;
  #ifndef AFS_PTHREAD_ENV
  	IOMGR_Poll();
--- 643,649 ----
  	}
  
  	/* Now write the data out */
! 	if (iod_Write(iodp, (char *)p, (size_t)howMany) != howMany)
  	    error = VOLSERDUMPERROR;
  #ifndef AFS_PTHREAD_ENV
  	IOMGR_Poll();
Index: openafs/src/volser/volmain.c
diff -c openafs/src/volser/volmain.c:1.18.2.4 openafs/src/volser/volmain.c:1.18.2.6
*** openafs/src/volser/volmain.c:1.18.2.4	Tue Feb 21 23:09:32 2006
--- openafs/src/volser/volmain.c	Tue Jun 20 16:35:01 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/volmain.c,v 1.18.2.4 2006/02/22 04:09:32 jaltman Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/volmain.c,v 1.18.2.6 2006/06/20 20:35:01 jaltman Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 95,100 ****
--- 95,104 ----
  int udpBufSize = 0;		/* UDP buffer size for receive */
  
  int Testing = 0;		/* for ListViceInodes */
+ int rxBind = 0;
+ 
+ #define ADDRSPERSITE 16         /* Same global is in rx/rx_user.c */
+ afs_uint32 SHostAddrs[ADDRSPERSITE];
  
  #define VS_EXIT(code)  {                                          \
                            osi_audit(VS_ExitEvent, code, AUD_END); \
***************
*** 244,249 ****
--- 248,254 ----
      int rxJumbograms = 1;	/* default is to send and receive jumbograms. */
      int rxMaxMTU = -1;
      int bufSize = 0;		/* temp variable to read in udp socket buf size */
+     afs_uint32 host = ntohl(INADDR_ANY);
  
  #ifdef	AFS_AIX32_ENV
      /*
***************
*** 288,293 ****
--- 293,300 ----
  	    DoLogging = 1;
  	} else if (strcmp(argv[code], "-help") == 0) {
  	    goto usage;
+ 	} else if (strcmp(argv[code], "-rxbind") == 0) {
+ 	    rxBind = 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>] "
  		   "[-udpsize <size of socket buffer in bytes>] "
  		   "[-syslog[=FACILITY]] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
--- 386,392 ----
  #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] "
***************
*** 387,393 ****
  #else
  	    printf("Usage: volserver [-log] [-p <number of processes>] "
  		   "[-auditlog <log path>] "
! 		   "[-nojumbo] [-rxmaxmtu <bytes>] "
  		   "[-udpsize <size of socket buffer in bytes>] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-help]\n");
--- 394,400 ----
  #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");
***************
*** 426,432 ****
      rx_nPackets = rxpackets;	/* set the max number of packets */
      if (udpBufSize)
  	rx_SetUdpBufSize(udpBufSize);	/* set the UDP buffer size for receive */
!     code = rx_Init((int)htons(AFSCONF_VOLUMEPORT));
      if (code) {
  	fprintf(stderr, "rx init failed on socket AFSCONF_VOLUMEPORT %u\n",
  		AFSCONF_VOLUMEPORT);
--- 433,458 ----
      rx_nPackets = rxpackets;	/* set the max number of packets */
      if (udpBufSize)
  	rx_SetUdpBufSize(udpBufSize);	/* set the UDP buffer size for receive */
!     if (rxBind) {
! 	afs_int32 ccode;
! #ifndef AFS_NT40_ENV
!         if (AFSDIR_SERVER_NETRESTRICT_FILEPATH || 
!             AFSDIR_SERVER_NETINFO_FILEPATH) {
!             char reason[1024];
!             ccode = parseNetFiles(SHostAddrs, NULL, NULL,
!                                            ADDRSPERSITE, reason,
!                                            AFSDIR_SERVER_NETINFO_FILEPATH,
!                                            AFSDIR_SERVER_NETRESTRICT_FILEPATH);
!         } else 
! #endif	
! 	{
!             ccode = rx_getAllAddr(SHostAddrs, ADDRSPERSITE);
!         }
!         if (ccode == 1) 
!             host = SHostAddrs[0];
!     }
! 
!     code = rx_InitHost(host, (int)htons(AFSCONF_VOLUMEPORT));
      if (code) {
  	fprintf(stderr, "rx init failed on socket AFSCONF_VOLUMEPORT %u\n",
  		AFSCONF_VOLUMEPORT);
***************
*** 478,484 ****
      if (securityObjects[0] == (struct rx_securityClass *)0)
  	Abort("rxnull_NewServerSecurityObject");
      service =
! 	rx_NewService(0, VOLSERVICE_ID, "VOLSER", securityObjects, 3,
  		      AFSVolExecuteRequest);
      if (service == (struct rx_service *)0)
  	Abort("rx_NewService");
--- 504,510 ----
      if (securityObjects[0] == (struct rx_securityClass *)0)
  	Abort("rxnull_NewServerSecurityObject");
      service =
! 	rx_NewServiceHost(host, 0, VOLSERVICE_ID, "VOLSER", securityObjects, 3,
  		      AFSVolExecuteRequest);
      if (service == (struct rx_service *)0)
  	Abort("rx_NewService");
Index: openafs/src/xstat/xstat_cm.c
diff -c openafs/src/xstat/xstat_cm.c:1.9.2.1 openafs/src/xstat/xstat_cm.c:1.9.2.2
*** openafs/src/xstat/xstat_cm.c:1.9.2.1	Sun Mar  5 22:16:41 2006
--- openafs/src/xstat/xstat_cm.c	Mon Jun 26 12:19:06 2006
***************
*** 18,28 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_cm.c,v 1.9.2.1 2006/03/06 03:16:41 jaltman Exp $");
  
  #include "xstat_cm.h"		/*Interface for this module */
  #include <lwp.h>		/*Lightweight process package */
  
  #ifdef HAVE_STRING_H
  #include <string.h>
  #else
--- 18,30 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_cm.c,v 1.9.2.2 2006/06/26 16:19:06 rra Exp $");
  
  #include "xstat_cm.h"		/*Interface for this module */
  #include <lwp.h>		/*Lightweight process package */
  
+ #include <afs/afsutil.h>
+ 
  #ifdef HAVE_STRING_H
  #include <string.h>
  #else
Index: openafs/src/xstat/xstat_fs.c
diff -c openafs/src/xstat/xstat_fs.c:1.9.2.1 openafs/src/xstat/xstat_fs.c:1.9.2.2
*** openafs/src/xstat/xstat_fs.c:1.9.2.1	Sun Mar  5 22:16:41 2006
--- openafs/src/xstat/xstat_fs.c	Mon Jun 26 12:19:06 2006
***************
*** 18,28 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs.c,v 1.9.2.1 2006/03/06 03:16:41 jaltman Exp $");
  
  #include "xstat_fs.h"		/*Interface for this module */
  #include <lwp.h>		/*Lightweight process package */
  
  #ifdef HAVE_STRING_H
  #include <string.h>
  #else
--- 18,30 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs.c,v 1.9.2.2 2006/06/26 16:19:06 rra Exp $");
  
  #include "xstat_fs.h"		/*Interface for this module */
  #include <lwp.h>		/*Lightweight process package */
  
+ #include <afs/afsutil.h>
+ 
  #ifdef HAVE_STRING_H
  #include <string.h>
  #else
