Index: openafs/src/JAVA/libjafs/File.c
diff -c openafs/src/JAVA/libjafs/File.c:1.3.2.1 openafs/src/JAVA/libjafs/File.c:1.3.2.2
*** openafs/src/JAVA/libjafs/File.c:1.3.2.1	Fri Oct 14 22:14:11 2005
--- openafs/src/JAVA/libjafs/File.c	Tue Apr 10 14:43:28 2007
***************
*** 168,174 ****
          return JNI_TRUE;   /* not really an error */
        } else {
          fprintf(stderr, "File::setAttributes(): uafs_statmountpoint failed "
!                         "for %s (%s)\n", dirName, error_message(errno));
          return JNI_FALSE;
        }
      }
--- 168,174 ----
          return JNI_TRUE;   /* not really an error */
        } else {
          fprintf(stderr, "File::setAttributes(): uafs_statmountpoint failed "
!                         "for %s (%s)\n", dirName, afs_error_message(errno));
          return JNI_FALSE;
        }
      }
***************
*** 208,214 ****
          }
          fprintf(stderr, 
              "File::setAttributes(): uafs_stat failed for %s (%s)\n", 
!              dirName, error_message(errno));
          return JNI_FALSE;
        }
      }
--- 208,214 ----
          }
          fprintf(stderr, 
              "File::setAttributes(): uafs_stat failed for %s (%s)\n", 
!              dirName, afs_error_message(errno));
          return JNI_FALSE;
        }
      }
***************
*** 427,433 ****
      dirp = uafs_opendir(dirName);
      if(dirp == NULL) {
        fprintf(stderr, "File::listNative(): uafs_opendir(%s) failed(%s)\n",
!                        dirName, error_message(errno));
        setError(env, &obj, errno);
        //throwAFSSecurityException( env, errno );
        return 0;
--- 427,433 ----
      dirp = uafs_opendir(dirName);
      if(dirp == NULL) {
        fprintf(stderr, "File::listNative(): uafs_opendir(%s) failed(%s)\n",
!                        dirName, afs_error_message(errno));
        setError(env, &obj, errno);
        //throwAFSSecurityException( env, errno );
        return 0;
Index: openafs/src/WINNT/afsd/afskfw.c
diff -c openafs/src/WINNT/afsd/afskfw.c:1.8.2.20 openafs/src/WINNT/afsd/afskfw.c:1.8.2.21
*** openafs/src/WINNT/afsd/afskfw.c:1.8.2.20	Wed Jul 26 08:54:36 2006
--- openafs/src/WINNT/afsd/afskfw.c	Wed Apr 18 11:58:22 2007
***************
*** 1422,1428 ****
          }
          free(principals);
      }
!     pkrb5_free_context(ctx);
      return 0;
  }
  
--- 1422,1429 ----
          }
          free(principals);
      }
!     if (ctx)
! 		pkrb5_free_context(ctx);
      return 0;
  }
  
***************
*** 1476,1482 ****
          free(cells);
      }
  
!     pkrb5_free_context(ctx);
      return 0;
  }
  
--- 1477,1484 ----
          free(cells);
      }
  
!     if (ctx)
! 		pkrb5_free_context(ctx);
      return 0;
  }
  
***************
*** 1700,1706 ****
          code = -1;      // we did not renew the tokens 
  
    cleanup:
!     pkrb5_free_context(ctx);
      return (code ? FALSE : TRUE);
  
  }
--- 1702,1709 ----
          code = -1;      // we did not renew the tokens 
  
    cleanup:
!     if (ctx) 
! 		pkrb5_free_context(ctx);
      return (code ? FALSE : TRUE);
  
  }
Index: openafs/src/WINNT/afsd/cklog.c
diff -c openafs/src/WINNT/afsd/cklog.c:1.3 openafs/src/WINNT/afsd/cklog.c:1.3.2.1
*** openafs/src/WINNT/afsd/cklog.c:1.3	Fri Nov 14 22:20:01 2003
--- openafs/src/WINNT/afsd/cklog.c	Tue Apr 10 14:43:34 2007
***************
*** 311,317 ****
         code = krb_write_ticket_file (realm);
         if (!Silent) {
            if (code) 
!               com_err (rn, code, "writing Kerberos ticket file");
            else fprintf (stderr, "Wrote ticket file to /tmp\n");
        }
     }
--- 311,317 ----
         code = krb_write_ticket_file (realm);
         if (!Silent) {
            if (code) 
!               afs_com_err (rn, code, "writing Kerberos ticket file");
            else fprintf (stderr, "Wrote ticket file to /tmp\n");
        }
     }
Index: openafs/src/WINNT/afsd/fs.c
diff -c openafs/src/WINNT/afsd/fs.c:1.16.2.20 openafs/src/WINNT/afsd/fs.c:1.16.2.21
*** openafs/src/WINNT/afsd/fs.c:1.16.2.20	Fri Mar  2 20:30:45 2007
--- openafs/src/WINNT/afsd/fs.c	Tue Apr 10 14:43:35 2007
***************
*** 4594,4600 ****
  #ifdef WIN32
  	fprintf(stderr, ": code 0x%x\n", code);
  #else /* not WIN32 */
! 	fprintf(stderr,": %s\n", error_message(code));
  #endif /* not WIN32 */
      }
  } /*Die*/
--- 4594,4600 ----
  #ifdef WIN32
  	fprintf(stderr, ": code 0x%x\n", code);
  #else /* not WIN32 */
! 	fprintf(stderr,": %s\n", afs_error_message(code));
  #endif /* not WIN32 */
      }
  } /*Die*/
Index: openafs/src/WINNT/afsd/lanahelper.cpp
diff -c openafs/src/WINNT/afsd/lanahelper.cpp:1.8.2.6 openafs/src/WINNT/afsd/lanahelper.cpp:1.8.2.7
*** openafs/src/WINNT/afsd/lanahelper.cpp:1.8.2.6	Tue Feb 27 19:39:55 2007
--- openafs/src/WINNT/afsd/lanahelper.cpp	Mon Oct  1 16:07:14 2007
***************
*** 445,450 ****
--- 445,451 ----
  
      rv = RegOpenKeyEx(HKEY_LOCAL_MACHINE,AFSREG_CLT_SVC_PARAM_SUBKEY,0,KEY_READ,&hkConfig);
      if (rv == ERROR_SUCCESS) {
+ 	dummyLen = sizeof(regLana);
          rv = RegQueryValueEx(hkConfig, szForceLanaLoopback, NULL, NULL, (LPBYTE) &regLana, &dummyLen);
          RegCloseKey(hkConfig);
  
Index: openafs/src/WINNT/afsd/symlink.c
diff -c openafs/src/WINNT/afsd/symlink.c:1.2.20.4 openafs/src/WINNT/afsd/symlink.c:1.2.20.5
*** openafs/src/WINNT/afsd/symlink.c:1.2.20.4	Wed Aug 31 07:00:31 2005
--- openafs/src/WINNT/afsd/symlink.c	Tue Apr 10 14:43:36 2007
***************
*** 652,658 ****
  #ifdef WIN32
  	fprintf(stderr, ": code 0x%x\n", code);
  #else /* not WIN32 */
! 	fprintf(stderr,": %s\n", error_message(code));
  #endif /* not WIN32 */
      }
  } /*Die*/
--- 652,658 ----
  #ifdef WIN32
  	fprintf(stderr, ": code 0x%x\n", code);
  #else /* not WIN32 */
! 	fprintf(stderr,": %s\n", afs_error_message(code));
  #endif /* not WIN32 */
      }
  } /*Die*/
Index: openafs/src/WINNT/afsd/sample/token.c
diff -c openafs/src/WINNT/afsd/sample/token.c:1.3 openafs/src/WINNT/afsd/sample/token.c:1.3.2.1
*** openafs/src/WINNT/afsd/sample/token.c:1.3	Fri Nov 21 02:59:45 2003
--- openafs/src/WINNT/afsd/sample/token.c	Tue Apr 10 14:43:36 2007
***************
*** 276,282 ****
         code = krb_write_ticket_file (realm);
         if (!Silent) {
            if (code) 
!               com_err (rn, code, "writing Kerberos ticket file");
            else fprintf (stderr, "Wrote ticket file to /tmp\n");
        }
     }
--- 276,282 ----
         code = krb_write_ticket_file (realm);
         if (!Silent) {
            if (code) 
!               afs_com_err (rn, code, "writing Kerberos ticket file");
            else fprintf (stderr, "Wrote ticket file to /tmp\n");
        }
     }
Index: openafs/src/WINNT/afsreg/test/regman.c
diff -c openafs/src/WINNT/afsreg/test/regman.c:1.3 openafs/src/WINNT/afsreg/test/regman.c:1.3.8.1
*** openafs/src/WINNT/afsreg/test/regman.c:1.3	Tue Sep 18 00:26:55 2001
--- openafs/src/WINNT/afsreg/test/regman.c	Tue Apr 10 14:43:37 2007
***************
*** 60,71 ****
      vpDev = as->parms[1].items->data;
  
      if (!vpt_PartitionNameValid(vpName)) {
! 	com_err(whoami, 0, "Partition name invalid");
  	return 1;
      }
  
      if (!vpt_DeviceNameValid(vpDev)) {
! 	com_err(whoami, 0, "Device name invalid");
  	return 1;
      }
  
--- 60,71 ----
      vpDev = as->parms[1].items->data;
  
      if (!vpt_PartitionNameValid(vpName)) {
! 	afs_com_err(whoami, 0, "Partition name invalid");
  	return 1;
      }
  
      if (!vpt_DeviceNameValid(vpDev)) {
! 	afs_com_err(whoami, 0, "Device name invalid");
  	return 1;
      }
  
***************
*** 73,79 ****
      strcpy(vpentry.vp_dev, vpDev);
  
      if (vpt_AddEntry(&vpentry)) {
! 	com_err(whoami, 0, "Unable to create vice partition table entry");
  	return 1;
      }
      return 0;
--- 73,79 ----
      strcpy(vpentry.vp_dev, vpDev);
  
      if (vpt_AddEntry(&vpentry)) {
! 	afs_com_err(whoami, 0, "Unable to create vice partition table entry");
  	return 1;
      }
      return 0;
***************
*** 86,97 ****
      vpName = as->parms[0].items->data;
  
      if (!vpt_PartitionNameValid(vpName)) {
! 	com_err(whoami, 0, "Partition name invalid");
  	return 1;
      }
  
      if (vpt_RemoveEntry(vpName) && errno != ENOENT) {
! 	com_err(whoami, 0, "Unable to remove vice partition table entry");
  	return 1;
      }
      return 0;
--- 86,97 ----
      vpName = as->parms[0].items->data;
  
      if (!vpt_PartitionNameValid(vpName)) {
! 	afs_com_err(whoami, 0, "Partition name invalid");
  	return 1;
      }
  
      if (vpt_RemoveEntry(vpName) && errno != ENOENT) {
! 	afs_com_err(whoami, 0, "Unable to remove vice partition table entry");
  	return 1;
      }
      return 0;
***************
*** 103,109 ****
      char *buf;
  
      if (afssw_GetServerInstallDir(&buf)) {
! 	com_err(whoami, 0,
  		"Failed reading AFS install dir entry (or does not exist)");
  	return 1;
      }
--- 103,109 ----
      char *buf;
  
      if (afssw_GetServerInstallDir(&buf)) {
! 	afs_com_err(whoami, 0,
  		"Failed reading AFS install dir entry (or does not exist)");
  	return 1;
      }
***************
*** 136,142 ****
      }
  
      if (status) {
! 	com_err(whoami, 0, "Unable to set AFS installation directory entry");
      }
  
      return (status ? 1 : 0);
--- 136,142 ----
      }
  
      if (status) {
! 	afs_com_err(whoami, 0, "Unable to set AFS installation directory entry");
      }
  
      return (status ? 1 : 0);
***************
*** 157,163 ****
  	char *dirBuf;
  
  	if (afssw_GetServerInstallDir(&dirBuf)) {
! 	    com_err(whoami, 0,
  		    "binary path not specified and AFS server installation directory not set");
  	    return 1;
  	}
--- 157,163 ----
  	char *dirBuf;
  
  	if (afssw_GetServerInstallDir(&dirBuf)) {
! 	    afs_com_err(whoami, 0,
  		    "binary path not specified and AFS server installation directory not set");
  	    return 1;
  	}
***************
*** 177,183 ****
  	if (status == ERROR_ACCESS_DENIED) {
  	    reason = "(insufficient privilege)";
  	}
! 	com_err(whoami, 0, "unable to connect to the SCM %s", reason);
  	return 1;
      }
  
--- 177,183 ----
  	if (status == ERROR_ACCESS_DENIED) {
  	    reason = "(insufficient privilege)";
  	}
! 	afs_com_err(whoami, 0, "unable to connect to the SCM %s", reason);
  	return 1;
      }
  
***************
*** 202,208 ****
  	if (status == ERROR_SERVICE_EXISTS || status == ERROR_DUP_NAME) {
  	    reason = "(service or display name already exists)";
  	}
! 	com_err(whoami, 0, "unable to create service %s", reason);
  	CloseServiceHandle(scmHandle);
  	return 1;
      }
--- 202,208 ----
  	if (status == ERROR_SERVICE_EXISTS || status == ERROR_DUP_NAME) {
  	    reason = "(service or display name already exists)";
  	}
! 	afs_com_err(whoami, 0, "unable to create service %s", reason);
  	CloseServiceHandle(scmHandle);
  	return 1;
      }
***************
*** 227,233 ****
  	if (status == ERROR_ACCESS_DENIED) {
  	    reason = "(insufficient privilege)";
  	}
! 	com_err(whoami, 0, "unable to connect to the SCM %s", reason);
  	return 1;
      }
  
--- 227,233 ----
  	if (status == ERROR_ACCESS_DENIED) {
  	    reason = "(insufficient privilege)";
  	}
! 	afs_com_err(whoami, 0, "unable to connect to the SCM %s", reason);
  	return 1;
      }
  
***************
*** 238,244 ****
  	DWORD status = GetLastError();
  
  	if (status != ERROR_SERVICE_DOES_NOT_EXIST) {
! 	    com_err(whoami, 0, "unable to open service");
  	    rc = 1;
  	}
  	CloseServiceHandle(scmHandle);
--- 238,244 ----
  	DWORD status = GetLastError();
  
  	if (status != ERROR_SERVICE_DOES_NOT_EXIST) {
! 	    afs_com_err(whoami, 0, "unable to open service");
  	    rc = 1;
  	}
  	CloseServiceHandle(scmHandle);
***************
*** 249,255 ****
  	DWORD status = GetLastError();
  
  	if (status != ERROR_SERVICE_MARKED_FOR_DELETE) {
! 	    com_err(whoami, 0, "service delete failed");
  	    rc = 1;
  	}
      }
--- 249,255 ----
  	DWORD status = GetLastError();
  
  	if (status != ERROR_SERVICE_MARKED_FOR_DELETE) {
! 	    afs_com_err(whoami, 0, "service delete failed");
  	    rc = 1;
  	}
      }
Index: openafs/src/WINNT/aklog/NTMakefile
diff -c openafs/src/WINNT/aklog/NTMakefile:1.2.2.1 openafs/src/WINNT/aklog/NTMakefile:1.2.2.2
*** openafs/src/WINNT/aklog/NTMakefile:1.2.2.1	Sun Jun 12 07:26:15 2005
--- openafs/src/WINNT/aklog/NTMakefile	Tue Apr 10 14:43:38 2007
***************
*** 28,35 ****
  
  EXELIBS = \
  	$(DESTDIR)\lib\afs\afspioctl.lib \
!     $(DESTDIR)\lib\afsauthent.lib \
!     $(DESTDIR)\lib\afs\afskauth.lib
  
  OTHERLIBS = \
      ..\kfw\lib\i386\krbv4w32.lib \
--- 28,37 ----
  
  EXELIBS = \
  	$(DESTDIR)\lib\afs\afspioctl.lib \
!         $(DESTDIR)\lib\afsauthent.lib \
!         $(DESTDIR)\lib\afs\afskauth.lib \
!         $(DESTDIR)\lib\afs\afscom_err.lib \
!         $(DESTDIR)\lib\afs\afsutil.lib
  
  OTHERLIBS = \
      ..\kfw\lib\i386\krbv4w32.lib \
Index: openafs/src/WINNT/aklog/asetkey.c
diff -c openafs/src/WINNT/aklog/asetkey.c:1.1.2.2 openafs/src/WINNT/aklog/asetkey.c:1.1.2.3
*** openafs/src/WINNT/aklog/asetkey.c:1.1.2.2	Sun Jun 12 07:26:15 2005
--- openafs/src/WINNT/aklog/asetkey.c	Tue Apr 10 14:43:39 2007
***************
*** 1,5 ****
  /*
!  * $Id: asetkey.c,v 1.1.2.2 2005/06/12 11:26:15 jaltman Exp $
   *
   * asetkey - Manipulates an AFS KeyFile
   *
--- 1,5 ----
  /*
!  * $Id: asetkey.c,v 1.1.2.3 2007/04/10 18:43:39 shadow Exp $
   *
   * asetkey - Manipulates an AFS KeyFile
   *
***************
*** 17,22 ****
--- 17,23 ----
  #ifndef PRE_AFS35
  #include <afs/dirpath.h>
  #endif /* !PRE_AFS35 */
+ #include <afs/com_err.h>
  
  int
  main(int argc, char **argv)
***************
*** 61,73 ****
  	kvno = atoi(argv[2]);
  	retval = krb5_parse_name(context, argv[4], &principal);
  	if (retval != 0) {
! 		com_err(argv[0], retval, "while parsing AFS principal");
  		exit(1);
  	}
  	retval = krb5_kt_read_service_key(context, argv[3], principal, kvno,
  					  ENCTYPE_DES_CBC_CRC, &key);
  	if (retval != 0) {
! 		com_err(argv[0], retval, "while extracting AFS service key");
  		exit(1);
  	}
  
--- 62,74 ----
  	kvno = atoi(argv[2]);
  	retval = krb5_parse_name(context, argv[4], &principal);
  	if (retval != 0) {
! 		afs_com_err(argv[0], retval, "while parsing AFS principal");
  		exit(1);
  	}
  	retval = krb5_kt_read_service_key(context, argv[3], principal, kvno,
  					  ENCTYPE_DES_CBC_CRC, &key);
  	if (retval != 0) {
! 		afs_com_err(argv[0], retval, "while extracting AFS service key");
  		exit(1);
  	}
  
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm
diff -c openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm:1.1.24.6 openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm:1.1.24.7
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm:1.1.24.6	Fri Jan  5 15:15:41 2007
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/index.htm	Sat Jun 23 10:48:26 2007
***************
*** 198,204 ****
  
  <h1>OpenAFS for Windows</h1>
  
! <h2>Version 1.4.3</h2>
  
  <p class=MsoNormal><span style='mso-fareast-font-family:"MS Mincho"'>&nbsp; <o:p></o:p></span></p>
  
--- 198,204 ----
  
  <h1>OpenAFS for Windows</h1>
  
! <h2>Version 1.4.4</h2>
  
  <p class=MsoNormal><span style='mso-fareast-font-family:"MS Mincho"'>&nbsp; <o:p></o:p></span></p>
  
***************
*** 223,229 ****
  mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
  style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span></span><![endif]><a
! href="ReleaseNotes/relnotes-frames.htm">OpenAFS for Windows
  Release Notes</a></p>
  
  <p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1;
--- 223,229 ----
  mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span
  style='mso-list:Ignore'>·<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span></span><![endif]><a
! href="ReleaseNotes/relnotes-frames.htm">OpenAFS for Windows 1.4.4
  Release Notes</a></p>
  
  <p style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1;
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm
diff -c openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm:1.1.2.7 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm:1.1.2.8
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm:1.1.2.7	Fri Jan  5 15:15:45 2007
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm	Sat Jun 23 10:48:29 2007
***************
*** 3,9 ****
  <head>
  <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
  <meta name=Generator content="Microsoft Word 11 (filtered)">
! <title>OpenAFS for Windows 1.4.3 Release Notes</title>
  <style>
  <!--
   /* Font Definitions */
--- 3,9 ----
  <head>
  <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
  <meta name=Generator content="Microsoft Word 11 (filtered)">
! <title>OpenAFS for Windows 1.4.4 Release Notes</title>
  <style>
  <!--
   /* Font Definitions */
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes-frames.htm
diff -c openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes-frames.htm:1.1.2.2 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes-frames.htm:1.1.2.3
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes-frames.htm:1.1.2.2	Fri Jan  5 15:15:45 2007
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes-frames.htm	Sat Jun 23 10:48:29 2007
***************
*** 3,9 ****
  <head>
  <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
  <meta name=Generator content="Microsoft Word 11 (filtered)">
! <title>OpenAFS for Windows 1.4.3 Release Notes</title>
  <style>
  <!--
   /* Font Definitions */
--- 3,9 ----
  <head>
  <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
  <meta name=Generator content="Microsoft Word 11 (filtered)">
! <title>OpenAFS for Windows 1.4.4 Release Notes</title>
  <style>
  <!--
   /* Font Definitions */
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm
diff -c openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm:1.2.2.12 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm:1.2.2.13
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm:1.2.2.12	Fri Jan  5 15:15:45 2007
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm	Sat Jun 23 10:48:29 2007
***************
*** 3,9 ****
  <head>
  <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
  <meta name=Generator content="Microsoft Word 11 (filtered)">
! <title>OpenAFS for Windows 1.4.3 Release Notes</title>
  
  <style>
  <!--
--- 3,9 ----
  <head>
  <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
  <meta name=Generator content="Microsoft Word 11 (filtered)">
! <title>OpenAFS for Windows 1.4.4 Release Notes</title>
  
  <style>
  <!--
***************
*** 306,312 ****
  
  <div class=Section1>
  
! <p class=MsoTitle>OpenAFS for Windows 1.4.3<br>
  Release Notes</p>
  
  <p class=MsoBodyText>The Andrew File System (AFS) is a location-independent
--- 306,312 ----
  
  <div class=Section1>
  
! <p class=MsoTitle>OpenAFS for Windows 1.4.4<br>
  Release Notes</p>
  
  <p class=MsoBodyText>The Andrew File System (AFS) is a location-independent
Index: openafs/src/WINNT/install/InstallShield5/setup.bmp
Index: openafs/src/WINNT/install/NSIS/CellServDB
diff -c openafs/src/WINNT/install/NSIS/CellServDB:1.2.2.6 openafs/src/WINNT/install/NSIS/CellServDB:1.2.2.7
*** openafs/src/WINNT/install/NSIS/CellServDB:1.2.2.6	Fri Mar  9 23:52:48 2007
--- openafs/src/WINNT/install/NSIS/CellServDB	Thu Jul  5 19:44:55 2007
***************
*** 1,4 ****
! >grand.central.org      #GCO Public CellServDB 09 Mar 2007
  18.92.0.108                     #grand-opening.mit.edu
  128.2.203.61                    #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
--- 1,4 ----
! >grand.central.org      #GCO Public CellServDB 05 Jul 2007
  18.92.0.108                     #grand-opening.mit.edu
  128.2.203.61                    #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
***************
*** 18,23 ****
--- 18,26 ----
  129.27.161.7                    #faepafs1.tu-graz.ac.at
  129.27.161.15                   #faepafs2.tu-graz.ac.at
  129.27.161.114                  #faepafs3.tu-graz.ac.at
+ >sums.math.mcgill.ca    #Society of Undergraduate Mathematics Students of McGill Universi
+ 132.216.24.122                  #germain.sums.math.mcgill.ca
+ 132.216.24.125                  #turing.sums.math.mcgill.ca
  >cern.ch                #European Laboratory for Particle Physics, Geneva
  137.138.128.148                 #afsdb1.cern.ch
  137.138.246.50                  #afsdb3.cern.ch
***************
*** 110,115 ****
--- 113,120 ----
  141.35.2.180                    #afs00.rz.uni-jena.de
  141.35.2.181                    #afs01.rz.uni-jena.de
  141.35.2.182                    #afs02.rz.uni-jena.de
+ >impetus.uni-koeln.de   #Univ. of Cologne - Geophysics/Meteorology Inst.
+ 134.95.80.39                    #forano.meteo.uni-koeln.de
  >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
  134.95.144.22                   #afs1.meteo.uni-koeln.de
  134.95.144.24                   #afs2.meteo.uni-koeln.de
***************
*** 161,183 ****
  128.2.40.134                    #afs.chem.cmu.edu
  128.2.40.140                    #afs2.chem.cmu.edu
  >cs.cmu.edu             #Carnegie Mellon University - School of Comp. Sci.
! 128.2.194.178                   #cherry.srv.cs.cmu.edu
! 128.2.194.179                   #pumpkin.srv.cs.cmu.edu
! 128.2.194.180                   #strawberry.srv.cs.cmu.edu
  >ece.cmu.edu            #Carnegie Mellon University - Elec. Comp. Eng. Dept.
  128.2.129.7                     #porok.ece.cmu.edu
  128.2.129.8                     #vicio.ece.cmu.edu
  128.2.129.9                     #e-xing.ece.cmu.edu
  >scotch.ece.cmu.edu     #CMU ECE CALCM research group
  128.2.134.82                    #lagavulin.ece.cmu.edu
! >qatar.cmu.edu          #Carnegie Mellon University - Qatar Campus Cell
! 204.194.25.7                    #afs1.qatar.cmu.edu
! 204.194.25.8                    #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
  128.2.179.12                    #nihao.sbp.ri.cmu.edu
  128.2.179.113                   #youtheman.sbp.ri.cmu.edu
! >cnf.cornell.edu        #Cornell Nanoscale Science and Technology Facility
  128.253.198.9                   #hole.cnf.cornell.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
--- 166,189 ----
  128.2.40.134                    #afs.chem.cmu.edu
  128.2.40.140                    #afs2.chem.cmu.edu
  >cs.cmu.edu             #Carnegie Mellon University - School of Comp. Sci.
! 128.2.201.46                    #strawberry.srv.cs.cmu.edu
! 128.2.201.47                    #pumpkin.srv.cs.cmu.edu
! 128.2.201.48                    #cherry.srv.cs.cmu.edu
  >ece.cmu.edu            #Carnegie Mellon University - Elec. Comp. Eng. Dept.
  128.2.129.7                     #porok.ece.cmu.edu
  128.2.129.8                     #vicio.ece.cmu.edu
  128.2.129.9                     #e-xing.ece.cmu.edu
  >scotch.ece.cmu.edu     #CMU ECE CALCM research group
  128.2.134.82                    #lagavulin.ece.cmu.edu
! >qatar.cmu.edu          #Carnegie Mellon University - Qatar
! 86.36.46.6                      #afs1.qatar.cmu.edu
! 86.36.46.7                      #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
  128.2.179.12                    #nihao.sbp.ri.cmu.edu
  128.2.179.113                   #youtheman.sbp.ri.cmu.edu
! >cnf.cornell.edu        #CNF
  128.253.198.9                   #hole.cnf.cornell.edu
+ 128.253.198.27                  #smoke.cnf.cornell.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
***************
*** 285,290 ****
--- 291,300 ----
  128.174.251.8                   #alnitak.acm.uiuc.edu
  128.174.251.9                   #alnilam.acm.uiuc.edu
  128.174.251.10                  #mintaka.acm.uiuc.edu
+ >illigal.uiuc.edu       #Illinois Genetic Algorithms Labaratory
+ 128.174.193.200                 #ial.illigal.uiuc.edu
+ 128.174.193.201                 #cac.illigal.uiuc.edu
+ 128.174.193.202                 #gcs.illigal.uiuc.edu
  >ncsa.uiuc.edu          #University of Illinois
  141.142.3.5                     #congo.ncsa.uiuc.edu
  141.142.3.8                     #nile.ncsa.uiuc.edu
***************
*** 478,486 ****
  >slackers.net           #The Slackers' Network
  63.201.48.27                    #alexandria.slackers.net
  >tproa.net              #The People's Republic of Ames
! 209.234.76.70                   #service-3.tproa.net
! 209.234.76.75                   #service-4.tproa.net
! 209.234.76.76                   #service-5.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
--- 488,496 ----
  >slackers.net           #The Slackers' Network
  63.201.48.27                    #alexandria.slackers.net
  >tproa.net              #The People's Republic of Ames
! 72.13.4.23                      #service-3.tproa.net
! 72.13.4.24                      #service-4.tproa.net
! 72.13.4.25                      #service-5.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
***************
*** 519,526 ****
  130.237.24.104                  #afs2.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
  130.237.202.3                   #afsdb1.isk.kth.se
  130.237.209.9                   #afsdb3.isk.kth.se
- 130.237.209.39                  #ezri.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
--- 529,536 ----
  130.237.24.104                  #afs2.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
  130.237.202.3                   #afsdb1.isk.kth.se
+ 130.237.209.5                   #afsdb2.isk.kth.se
  130.237.209.9                   #afsdb3.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
***************
*** 546,552 ****
  >stacken.kth.se         #Stacken Computer Club
  130.237.234.3                   #milko.stacken.kth.se
  130.237.234.43                  #hot.stacken.kth.se
! 130.237.237.230                 #fishburger.stacken.kth.se
  >syd.kth.se             #Royal Institute of Technology, KTH-Syd
  130.237.83.23                   #afs.haninge.kth.se
  >physto.se              #Physics department Stockholm University
--- 556,562 ----
  >stacken.kth.se         #Stacken Computer Club
  130.237.234.3                   #milko.stacken.kth.se
  130.237.234.43                  #hot.stacken.kth.se
! 130.237.234.101                 #fishburger.stacken.kth.se
  >syd.kth.se             #Royal Institute of Technology, KTH-Syd
  130.237.83.23                   #afs.haninge.kth.se
  >physto.se              #Physics department Stockholm University
Index: openafs/src/WINNT/install/Win9x/CellServDB
diff -c openafs/src/WINNT/install/Win9x/CellServDB:1.2.2.6 openafs/src/WINNT/install/Win9x/CellServDB:1.2.2.7
*** openafs/src/WINNT/install/Win9x/CellServDB:1.2.2.6	Fri Mar  9 23:52:52 2007
--- openafs/src/WINNT/install/Win9x/CellServDB	Thu Jul  5 19:44:59 2007
***************
*** 1,4 ****
! >grand.central.org      #GCO Public CellServDB 09 Mar 2007
  18.92.0.108                     #grand-opening.mit.edu
  128.2.203.61                    #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
--- 1,4 ----
! >grand.central.org      #GCO Public CellServDB 05 Jul 2007
  18.92.0.108                     #grand-opening.mit.edu
  128.2.203.61                    #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
***************
*** 18,23 ****
--- 18,26 ----
  129.27.161.7                    #faepafs1.tu-graz.ac.at
  129.27.161.15                   #faepafs2.tu-graz.ac.at
  129.27.161.114                  #faepafs3.tu-graz.ac.at
+ >sums.math.mcgill.ca    #Society of Undergraduate Mathematics Students of McGill Universi
+ 132.216.24.122                  #germain.sums.math.mcgill.ca
+ 132.216.24.125                  #turing.sums.math.mcgill.ca
  >cern.ch                #European Laboratory for Particle Physics, Geneva
  137.138.128.148                 #afsdb1.cern.ch
  137.138.246.50                  #afsdb3.cern.ch
***************
*** 110,115 ****
--- 113,120 ----
  141.35.2.180                    #afs00.rz.uni-jena.de
  141.35.2.181                    #afs01.rz.uni-jena.de
  141.35.2.182                    #afs02.rz.uni-jena.de
+ >impetus.uni-koeln.de   #Univ. of Cologne - Geophysics/Meteorology Inst.
+ 134.95.80.39                    #forano.meteo.uni-koeln.de
  >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
  134.95.144.22                   #afs1.meteo.uni-koeln.de
  134.95.144.24                   #afs2.meteo.uni-koeln.de
***************
*** 161,183 ****
  128.2.40.134                    #afs.chem.cmu.edu
  128.2.40.140                    #afs2.chem.cmu.edu
  >cs.cmu.edu             #Carnegie Mellon University - School of Comp. Sci.
! 128.2.194.178                   #cherry.srv.cs.cmu.edu
! 128.2.194.179                   #pumpkin.srv.cs.cmu.edu
! 128.2.194.180                   #strawberry.srv.cs.cmu.edu
  >ece.cmu.edu            #Carnegie Mellon University - Elec. Comp. Eng. Dept.
  128.2.129.7                     #porok.ece.cmu.edu
  128.2.129.8                     #vicio.ece.cmu.edu
  128.2.129.9                     #e-xing.ece.cmu.edu
  >scotch.ece.cmu.edu     #CMU ECE CALCM research group
  128.2.134.82                    #lagavulin.ece.cmu.edu
! >qatar.cmu.edu          #Carnegie Mellon University - Qatar Campus Cell
! 204.194.25.7                    #afs1.qatar.cmu.edu
! 204.194.25.8                    #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
  128.2.179.12                    #nihao.sbp.ri.cmu.edu
  128.2.179.113                   #youtheman.sbp.ri.cmu.edu
! >cnf.cornell.edu        #Cornell Nanoscale Science and Technology Facility
  128.253.198.9                   #hole.cnf.cornell.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
--- 166,189 ----
  128.2.40.134                    #afs.chem.cmu.edu
  128.2.40.140                    #afs2.chem.cmu.edu
  >cs.cmu.edu             #Carnegie Mellon University - School of Comp. Sci.
! 128.2.201.46                    #strawberry.srv.cs.cmu.edu
! 128.2.201.47                    #pumpkin.srv.cs.cmu.edu
! 128.2.201.48                    #cherry.srv.cs.cmu.edu
  >ece.cmu.edu            #Carnegie Mellon University - Elec. Comp. Eng. Dept.
  128.2.129.7                     #porok.ece.cmu.edu
  128.2.129.8                     #vicio.ece.cmu.edu
  128.2.129.9                     #e-xing.ece.cmu.edu
  >scotch.ece.cmu.edu     #CMU ECE CALCM research group
  128.2.134.82                    #lagavulin.ece.cmu.edu
! >qatar.cmu.edu          #Carnegie Mellon University - Qatar
! 86.36.46.6                      #afs1.qatar.cmu.edu
! 86.36.46.7                      #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
  128.2.179.12                    #nihao.sbp.ri.cmu.edu
  128.2.179.113                   #youtheman.sbp.ri.cmu.edu
! >cnf.cornell.edu        #CNF
  128.253.198.9                   #hole.cnf.cornell.edu
+ 128.253.198.27                  #smoke.cnf.cornell.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
***************
*** 285,290 ****
--- 291,300 ----
  128.174.251.8                   #alnitak.acm.uiuc.edu
  128.174.251.9                   #alnilam.acm.uiuc.edu
  128.174.251.10                  #mintaka.acm.uiuc.edu
+ >illigal.uiuc.edu       #Illinois Genetic Algorithms Labaratory
+ 128.174.193.200                 #ial.illigal.uiuc.edu
+ 128.174.193.201                 #cac.illigal.uiuc.edu
+ 128.174.193.202                 #gcs.illigal.uiuc.edu
  >ncsa.uiuc.edu          #University of Illinois
  141.142.3.5                     #congo.ncsa.uiuc.edu
  141.142.3.8                     #nile.ncsa.uiuc.edu
***************
*** 478,486 ****
  >slackers.net           #The Slackers' Network
  63.201.48.27                    #alexandria.slackers.net
  >tproa.net              #The People's Republic of Ames
! 209.234.76.70                   #service-3.tproa.net
! 209.234.76.75                   #service-4.tproa.net
! 209.234.76.76                   #service-5.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
--- 488,496 ----
  >slackers.net           #The Slackers' Network
  63.201.48.27                    #alexandria.slackers.net
  >tproa.net              #The People's Republic of Ames
! 72.13.4.23                      #service-3.tproa.net
! 72.13.4.24                      #service-4.tproa.net
! 72.13.4.25                      #service-5.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
***************
*** 519,526 ****
  130.237.24.104                  #afs2.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
  130.237.202.3                   #afsdb1.isk.kth.se
  130.237.209.9                   #afsdb3.isk.kth.se
- 130.237.209.39                  #ezri.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
--- 529,536 ----
  130.237.24.104                  #afs2.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
  130.237.202.3                   #afsdb1.isk.kth.se
+ 130.237.209.5                   #afsdb2.isk.kth.se
  130.237.209.9                   #afsdb3.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
***************
*** 546,552 ****
  >stacken.kth.se         #Stacken Computer Club
  130.237.234.3                   #milko.stacken.kth.se
  130.237.234.43                  #hot.stacken.kth.se
! 130.237.237.230                 #fishburger.stacken.kth.se
  >syd.kth.se             #Royal Institute of Technology, KTH-Syd
  130.237.83.23                   #afs.haninge.kth.se
  >physto.se              #Physics department Stockholm University
--- 556,562 ----
  >stacken.kth.se         #Stacken Computer Club
  130.237.234.3                   #milko.stacken.kth.se
  130.237.234.43                  #hot.stacken.kth.se
! 130.237.234.101                 #fishburger.stacken.kth.se
  >syd.kth.se             #Royal Institute of Technology, KTH-Syd
  130.237.83.23                   #afs.haninge.kth.se
  >physto.se              #Physics department Stockholm University
Index: openafs/src/WINNT/install/wix/CellServDB
diff -c openafs/src/WINNT/install/wix/CellServDB:1.2.2.6 openafs/src/WINNT/install/wix/CellServDB:1.2.2.7
*** openafs/src/WINNT/install/wix/CellServDB:1.2.2.6	Fri Mar  9 23:52:52 2007
--- openafs/src/WINNT/install/wix/CellServDB	Thu Jul  5 19:44:59 2007
***************
*** 1,4 ****
! >grand.central.org      #GCO Public CellServDB 09 Mar 2007
  18.92.0.108                     #grand-opening.mit.edu
  128.2.203.61                    #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
--- 1,4 ----
! >grand.central.org      #GCO Public CellServDB 05 Jul 2007
  18.92.0.108                     #grand-opening.mit.edu
  128.2.203.61                    #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
***************
*** 18,23 ****
--- 18,26 ----
  129.27.161.7                    #faepafs1.tu-graz.ac.at
  129.27.161.15                   #faepafs2.tu-graz.ac.at
  129.27.161.114                  #faepafs3.tu-graz.ac.at
+ >sums.math.mcgill.ca    #Society of Undergraduate Mathematics Students of McGill Universi
+ 132.216.24.122                  #germain.sums.math.mcgill.ca
+ 132.216.24.125                  #turing.sums.math.mcgill.ca
  >cern.ch                #European Laboratory for Particle Physics, Geneva
  137.138.128.148                 #afsdb1.cern.ch
  137.138.246.50                  #afsdb3.cern.ch
***************
*** 110,115 ****
--- 113,120 ----
  141.35.2.180                    #afs00.rz.uni-jena.de
  141.35.2.181                    #afs01.rz.uni-jena.de
  141.35.2.182                    #afs02.rz.uni-jena.de
+ >impetus.uni-koeln.de   #Univ. of Cologne - Geophysics/Meteorology Inst.
+ 134.95.80.39                    #forano.meteo.uni-koeln.de
  >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
  134.95.144.22                   #afs1.meteo.uni-koeln.de
  134.95.144.24                   #afs2.meteo.uni-koeln.de
***************
*** 161,183 ****
  128.2.40.134                    #afs.chem.cmu.edu
  128.2.40.140                    #afs2.chem.cmu.edu
  >cs.cmu.edu             #Carnegie Mellon University - School of Comp. Sci.
! 128.2.194.178                   #cherry.srv.cs.cmu.edu
! 128.2.194.179                   #pumpkin.srv.cs.cmu.edu
! 128.2.194.180                   #strawberry.srv.cs.cmu.edu
  >ece.cmu.edu            #Carnegie Mellon University - Elec. Comp. Eng. Dept.
  128.2.129.7                     #porok.ece.cmu.edu
  128.2.129.8                     #vicio.ece.cmu.edu
  128.2.129.9                     #e-xing.ece.cmu.edu
  >scotch.ece.cmu.edu     #CMU ECE CALCM research group
  128.2.134.82                    #lagavulin.ece.cmu.edu
! >qatar.cmu.edu          #Carnegie Mellon University - Qatar Campus Cell
! 204.194.25.7                    #afs1.qatar.cmu.edu
! 204.194.25.8                    #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
  128.2.179.12                    #nihao.sbp.ri.cmu.edu
  128.2.179.113                   #youtheman.sbp.ri.cmu.edu
! >cnf.cornell.edu        #Cornell Nanoscale Science and Technology Facility
  128.253.198.9                   #hole.cnf.cornell.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
--- 166,189 ----
  128.2.40.134                    #afs.chem.cmu.edu
  128.2.40.140                    #afs2.chem.cmu.edu
  >cs.cmu.edu             #Carnegie Mellon University - School of Comp. Sci.
! 128.2.201.46                    #strawberry.srv.cs.cmu.edu
! 128.2.201.47                    #pumpkin.srv.cs.cmu.edu
! 128.2.201.48                    #cherry.srv.cs.cmu.edu
  >ece.cmu.edu            #Carnegie Mellon University - Elec. Comp. Eng. Dept.
  128.2.129.7                     #porok.ece.cmu.edu
  128.2.129.8                     #vicio.ece.cmu.edu
  128.2.129.9                     #e-xing.ece.cmu.edu
  >scotch.ece.cmu.edu     #CMU ECE CALCM research group
  128.2.134.82                    #lagavulin.ece.cmu.edu
! >qatar.cmu.edu          #Carnegie Mellon University - Qatar
! 86.36.46.6                      #afs1.qatar.cmu.edu
! 86.36.46.7                      #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
  128.2.179.12                    #nihao.sbp.ri.cmu.edu
  128.2.179.113                   #youtheman.sbp.ri.cmu.edu
! >cnf.cornell.edu        #CNF
  128.253.198.9                   #hole.cnf.cornell.edu
+ 128.253.198.27                  #smoke.cnf.cornell.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
***************
*** 285,290 ****
--- 291,300 ----
  128.174.251.8                   #alnitak.acm.uiuc.edu
  128.174.251.9                   #alnilam.acm.uiuc.edu
  128.174.251.10                  #mintaka.acm.uiuc.edu
+ >illigal.uiuc.edu       #Illinois Genetic Algorithms Labaratory
+ 128.174.193.200                 #ial.illigal.uiuc.edu
+ 128.174.193.201                 #cac.illigal.uiuc.edu
+ 128.174.193.202                 #gcs.illigal.uiuc.edu
  >ncsa.uiuc.edu          #University of Illinois
  141.142.3.5                     #congo.ncsa.uiuc.edu
  141.142.3.8                     #nile.ncsa.uiuc.edu
***************
*** 478,486 ****
  >slackers.net           #The Slackers' Network
  63.201.48.27                    #alexandria.slackers.net
  >tproa.net              #The People's Republic of Ames
! 209.234.76.70                   #service-3.tproa.net
! 209.234.76.75                   #service-4.tproa.net
! 209.234.76.76                   #service-5.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
--- 488,496 ----
  >slackers.net           #The Slackers' Network
  63.201.48.27                    #alexandria.slackers.net
  >tproa.net              #The People's Republic of Ames
! 72.13.4.23                      #service-3.tproa.net
! 72.13.4.24                      #service-4.tproa.net
! 72.13.4.25                      #service-5.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
***************
*** 519,526 ****
  130.237.24.104                  #afs2.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
  130.237.202.3                   #afsdb1.isk.kth.se
  130.237.209.9                   #afsdb3.isk.kth.se
- 130.237.209.39                  #ezri.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
--- 529,536 ----
  130.237.24.104                  #afs2.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
  130.237.202.3                   #afsdb1.isk.kth.se
+ 130.237.209.5                   #afsdb2.isk.kth.se
  130.237.209.9                   #afsdb3.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
***************
*** 546,552 ****
  >stacken.kth.se         #Stacken Computer Club
  130.237.234.3                   #milko.stacken.kth.se
  130.237.234.43                  #hot.stacken.kth.se
! 130.237.237.230                 #fishburger.stacken.kth.se
  >syd.kth.se             #Royal Institute of Technology, KTH-Syd
  130.237.83.23                   #afs.haninge.kth.se
  >physto.se              #Physics department Stockholm University
--- 556,562 ----
  >stacken.kth.se         #Stacken Computer Club
  130.237.234.3                   #milko.stacken.kth.se
  130.237.234.43                  #hot.stacken.kth.se
! 130.237.234.101                 #fishburger.stacken.kth.se
  >syd.kth.se             #Royal Institute of Technology, KTH-Syd
  130.237.83.23                   #afs.haninge.kth.se
  >physto.se              #Physics department Stockholm University
Index: openafs/src/WINNT/install/wix/files.wxi
diff -c openafs/src/WINNT/install/wix/files.wxi:1.9.2.11 openafs/src/WINNT/install/wix/files.wxi:1.9.2.12
*** openafs/src/WINNT/install/wix/files.wxi:1.9.2.11	Tue Jul 18 12:10:22 2006
--- openafs/src/WINNT/install/wix/files.wxi	Fri Apr 20 06:59:41 2007
***************
*** 686,692 ****
                                  <File Id="fileauarf284_HTM_$(var.Language)" Name="auarf284.htm" LongName="auarf284.htm" DiskId="1" />
                              </Component>
                          </Directory> <!-- CmdRef -->
!                         <Directory Id="dirInstallGd_$(var.Language)" Name="InstalGd" SourceName="InstGd" LongSource="InstallGuide" src="$(var.SrcDir)\WINNT\doc\install\Documentation\$(var.Language)\html\InstallGd\">
                              <Component Id="cmp_Install_Guide_$(var.Language)" Guid="$(var.DocHtmlInstallGuid)">
                                  <File Id="fileawqbg000_HTM_$(var.Language)" Name="awqbg000.htm" LongName="awqbg000.htm" KeyPath="yes" DiskId="1" />
                                  <File Id="fileawqbg002_HTM_$(var.Language)" Name="awqbg002.htm" LongName="awqbg002.htm" DiskId="1" />
--- 686,692 ----
                                  <File Id="fileauarf284_HTM_$(var.Language)" Name="auarf284.htm" LongName="auarf284.htm" DiskId="1" />
                              </Component>
                          </Directory> <!-- CmdRef -->
!                         <Directory Id="dirInstallGd_$(var.Language)" Name="InstallGd" SourceName="InstGd" LongSource="InstallGuide" src="$(var.SrcDir)\WINNT\doc\install\Documentation\$(var.Language)\html\InstallGd\">
                              <Component Id="cmp_Install_Guide_$(var.Language)" Guid="$(var.DocHtmlInstallGuid)">
                                  <File Id="fileawqbg000_HTM_$(var.Language)" Name="awqbg000.htm" LongName="awqbg000.htm" KeyPath="yes" DiskId="1" />
                                  <File Id="fileawqbg002_HTM_$(var.Language)" Name="awqbg002.htm" LongName="awqbg002.htm" DiskId="1" />
Index: openafs/src/WINNT/win9xpanel/CAfs.cpp
diff -c openafs/src/WINNT/win9xpanel/CAfs.cpp:1.2 openafs/src/WINNT/win9xpanel/CAfs.cpp:1.2.14.1
*** openafs/src/WINNT/win9xpanel/CAfs.cpp:1.2	Sun Aug 19 10:44:46 2001
--- openafs/src/WINNT/win9xpanel/CAfs.cpp	Tue Apr 10 14:43:40 2007
***************
*** 353,359 ****
  		code = krb_write_ticket_file (realm);
  		if (!Silent) {
  			if (code) 
! 				com_err (rn, code, "writing Kerberos ticket file");
  			else {
  				m_pParent->Log("Wrote ticket file to /tmp");
  			}
--- 353,359 ----
  		code = krb_write_ticket_file (realm);
  		if (!Silent) {
  			if (code) 
! 				afs_com_err (rn, code, "writing Kerberos ticket file");
  			else {
  				m_pParent->Log("Wrote ticket file to /tmp");
  			}
Index: openafs/src/WINNT/win9xpanel/CellServDB
diff -c openafs/src/WINNT/win9xpanel/CellServDB:1.1.18.6 openafs/src/WINNT/win9xpanel/CellServDB:1.1.18.7
*** openafs/src/WINNT/win9xpanel/CellServDB:1.1.18.6	Fri Mar  9 23:52:52 2007
--- openafs/src/WINNT/win9xpanel/CellServDB	Thu Jul  5 19:44:59 2007
***************
*** 1,4 ****
! >grand.central.org      #GCO Public CellServDB 09 Mar 2007
  18.92.0.108                     #grand-opening.mit.edu
  128.2.203.61                    #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
--- 1,4 ----
! >grand.central.org      #GCO Public CellServDB 05 Jul 2007
  18.92.0.108                     #grand-opening.mit.edu
  128.2.203.61                    #penn.central.org
  130.237.48.87                   #andrew.e.kth.se
***************
*** 18,23 ****
--- 18,26 ----
  129.27.161.7                    #faepafs1.tu-graz.ac.at
  129.27.161.15                   #faepafs2.tu-graz.ac.at
  129.27.161.114                  #faepafs3.tu-graz.ac.at
+ >sums.math.mcgill.ca    #Society of Undergraduate Mathematics Students of McGill Universi
+ 132.216.24.122                  #germain.sums.math.mcgill.ca
+ 132.216.24.125                  #turing.sums.math.mcgill.ca
  >cern.ch                #European Laboratory for Particle Physics, Geneva
  137.138.128.148                 #afsdb1.cern.ch
  137.138.246.50                  #afsdb3.cern.ch
***************
*** 110,115 ****
--- 113,120 ----
  141.35.2.180                    #afs00.rz.uni-jena.de
  141.35.2.181                    #afs01.rz.uni-jena.de
  141.35.2.182                    #afs02.rz.uni-jena.de
+ >impetus.uni-koeln.de   #Univ. of Cologne - Geophysics/Meteorology Inst.
+ 134.95.80.39                    #forano.meteo.uni-koeln.de
  >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
  134.95.144.22                   #afs1.meteo.uni-koeln.de
  134.95.144.24                   #afs2.meteo.uni-koeln.de
***************
*** 161,183 ****
  128.2.40.134                    #afs.chem.cmu.edu
  128.2.40.140                    #afs2.chem.cmu.edu
  >cs.cmu.edu             #Carnegie Mellon University - School of Comp. Sci.
! 128.2.194.178                   #cherry.srv.cs.cmu.edu
! 128.2.194.179                   #pumpkin.srv.cs.cmu.edu
! 128.2.194.180                   #strawberry.srv.cs.cmu.edu
  >ece.cmu.edu            #Carnegie Mellon University - Elec. Comp. Eng. Dept.
  128.2.129.7                     #porok.ece.cmu.edu
  128.2.129.8                     #vicio.ece.cmu.edu
  128.2.129.9                     #e-xing.ece.cmu.edu
  >scotch.ece.cmu.edu     #CMU ECE CALCM research group
  128.2.134.82                    #lagavulin.ece.cmu.edu
! >qatar.cmu.edu          #Carnegie Mellon University - Qatar Campus Cell
! 204.194.25.7                    #afs1.qatar.cmu.edu
! 204.194.25.8                    #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
  128.2.179.12                    #nihao.sbp.ri.cmu.edu
  128.2.179.113                   #youtheman.sbp.ri.cmu.edu
! >cnf.cornell.edu        #Cornell Nanoscale Science and Technology Facility
  128.253.198.9                   #hole.cnf.cornell.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
--- 166,189 ----
  128.2.40.134                    #afs.chem.cmu.edu
  128.2.40.140                    #afs2.chem.cmu.edu
  >cs.cmu.edu             #Carnegie Mellon University - School of Comp. Sci.
! 128.2.201.46                    #strawberry.srv.cs.cmu.edu
! 128.2.201.47                    #pumpkin.srv.cs.cmu.edu
! 128.2.201.48                    #cherry.srv.cs.cmu.edu
  >ece.cmu.edu            #Carnegie Mellon University - Elec. Comp. Eng. Dept.
  128.2.129.7                     #porok.ece.cmu.edu
  128.2.129.8                     #vicio.ece.cmu.edu
  128.2.129.9                     #e-xing.ece.cmu.edu
  >scotch.ece.cmu.edu     #CMU ECE CALCM research group
  128.2.134.82                    #lagavulin.ece.cmu.edu
! >qatar.cmu.edu          #Carnegie Mellon University - Qatar
! 86.36.46.6                      #afs1.qatar.cmu.edu
! 86.36.46.7                      #afs2.qatar.cmu.edu
  >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
  128.2.179.12                    #nihao.sbp.ri.cmu.edu
  128.2.179.113                   #youtheman.sbp.ri.cmu.edu
! >cnf.cornell.edu        #CNF
  128.253.198.9                   #hole.cnf.cornell.edu
+ 128.253.198.27                  #smoke.cnf.cornell.edu
  >msc.cornell.edu        #Cornell University Materials Science Center
  128.84.231.242                  #miranda.ccmr.cornell.edu
  128.84.241.35                   #co.ccmr.cornell.edu
***************
*** 285,290 ****
--- 291,300 ----
  128.174.251.8                   #alnitak.acm.uiuc.edu
  128.174.251.9                   #alnilam.acm.uiuc.edu
  128.174.251.10                  #mintaka.acm.uiuc.edu
+ >illigal.uiuc.edu       #Illinois Genetic Algorithms Labaratory
+ 128.174.193.200                 #ial.illigal.uiuc.edu
+ 128.174.193.201                 #cac.illigal.uiuc.edu
+ 128.174.193.202                 #gcs.illigal.uiuc.edu
  >ncsa.uiuc.edu          #University of Illinois
  141.142.3.5                     #congo.ncsa.uiuc.edu
  141.142.3.8                     #nile.ncsa.uiuc.edu
***************
*** 478,486 ****
  >slackers.net           #The Slackers' Network
  63.201.48.27                    #alexandria.slackers.net
  >tproa.net              #The People's Republic of Ames
! 209.234.76.70                   #service-3.tproa.net
! 209.234.76.75                   #service-4.tproa.net
! 209.234.76.76                   #service-5.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
--- 488,496 ----
  >slackers.net           #The Slackers' Network
  63.201.48.27                    #alexandria.slackers.net
  >tproa.net              #The People's Republic of Ames
! 72.13.4.23                      #service-3.tproa.net
! 72.13.4.24                      #service-4.tproa.net
! 72.13.4.25                      #service-5.tproa.net
  >nikhef.nl              #The Dutch National Institute for High Energy Physics
  192.16.185.26                   #afs1.nikhef.nl
  192.16.185.27                   #afs2.nikhef.nl
***************
*** 519,526 ****
  130.237.24.104                  #afs2.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
  130.237.202.3                   #afsdb1.isk.kth.se
  130.237.209.9                   #afsdb3.isk.kth.se
- 130.237.209.39                  #ezri.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
--- 529,536 ----
  130.237.24.104                  #afs2.hallf.kth.se
  >isk.kth.se             #Royal Institute of Technology, ISK
  130.237.202.3                   #afsdb1.isk.kth.se
+ 130.237.209.5                   #afsdb2.isk.kth.se
  130.237.209.9                   #afsdb3.isk.kth.se
  >it.kth.se              #Royal Institute of Technology, IT
  130.237.212.15                  #ptah.it.kth.se
  130.237.212.16                  #toth.it.kth.se
***************
*** 546,552 ****
  >stacken.kth.se         #Stacken Computer Club
  130.237.234.3                   #milko.stacken.kth.se
  130.237.234.43                  #hot.stacken.kth.se
! 130.237.237.230                 #fishburger.stacken.kth.se
  >syd.kth.se             #Royal Institute of Technology, KTH-Syd
  130.237.83.23                   #afs.haninge.kth.se
  >physto.se              #Physics department Stockholm University
--- 556,562 ----
  >stacken.kth.se         #Stacken Computer Club
  130.237.234.3                   #milko.stacken.kth.se
  130.237.234.43                  #hot.stacken.kth.se
! 130.237.234.101                 #fishburger.stacken.kth.se
  >syd.kth.se             #Royal Institute of Technology, KTH-Syd
  130.237.83.23                   #afs.haninge.kth.se
  >physto.se              #Physics department Stockholm University
Index: openafs/src/afs/afs.h
diff -c openafs/src/afs/afs.h:1.48.2.29 openafs/src/afs/afs.h:1.48.2.30
*** openafs/src/afs/afs.h:1.48.2.29	Thu Nov  9 19:08:52 2006
--- openafs/src/afs/afs.h	Wed Oct 10 12:57:54 2007
***************
*** 268,273 ****
--- 268,276 ----
  extern afs_int32 afs_gcpags;
  extern afs_int32 afs_gcpags_procsize;
  extern afs_int32 afs_bkvolpref;
+ extern char afs_cachebasedir[1024];
+ extern afs_int32 afs_numcachefiles;
+ extern afs_int32 afs_numfilesperdir;
  
  struct unixuser {
      struct unixuser *next;	/* next hash pointer */
Index: openafs/src/afs/afs_call.c
diff -c openafs/src/afs/afs_call.c:1.74.2.17 openafs/src/afs/afs_call.c:1.74.2.23
*** openafs/src/afs/afs_call.c:1.74.2.17	Thu Feb  8 20:07:54 2007
--- openafs/src/afs/afs_call.c	Wed Oct 10 12:57:54 2007
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_call.c,v 1.74.2.17 2007/02/09 01:07:54 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_call.c,v 1.74.2.23 2007/10/10 16:57:54 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 29,35 ****
  #ifdef AFS_LINUX22_ENV
  #include "h/smp_lock.h"
  #endif
! 
  
  #if defined(AFS_SUN5_ENV) || defined(AFS_AIX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_HPUX_ENV)
  #define	AFS_MINBUFFERS	100
--- 29,38 ----
  #ifdef AFS_LINUX22_ENV
  #include "h/smp_lock.h"
  #endif
! #ifdef AFS_SUN510_ENV
! #include "h/ksynch.h"
! #include "h/sunddi.h"
! #endif
  
  #if defined(AFS_SUN5_ENV) || defined(AFS_AIX_ENV) || defined(AFS_SGI_ENV) || defined(AFS_HPUX_ENV)
  #define	AFS_MINBUFFERS	100
***************
*** 84,89 ****
--- 87,97 ----
  simple_lock_data afs_global_lock;
  #endif
  
+ #ifdef AFS_SUN510_ENV
+ ddi_taskq_t *afs_taskq;
+ krwlock_t afsifinfo_lock;
+ #endif
+ 
  afs_int32 afs_initState = 0;
  afs_int32 afs_termState = 0;
  afs_int32 afs_setTime = 0;
***************
*** 96,101 ****
--- 104,112 ----
  extern struct interfaceAddr afs_cb_interface;
  static int afs_RX_Running = 0;
  static int afs_InitSetup_done = 0;
+ afs_int32 afs_numcachefiles = -1;
+ afs_int32 afs_numfilesperdir = -1;
+ char afs_cachebasedir[1024];
  
  afs_int32 afs_rx_deadtime = AFS_RXDEADTIME;
  afs_int32 afs_rx_harddead = AFS_HARDDEADTIME;
***************
*** 121,126 ****
--- 132,147 ----
      if (afs_InitSetup_done)
  	return EAGAIN;
  
+ #ifdef AFS_SUN510_ENV
+     /* Initialize a RW lock for the ifinfo global array */
+     rw_init(&afsifinfo_lock, NULL, RW_DRIVER, NULL);
+ 
+     /* Create a taskq */
+     afs_taskq = ddi_taskq_create(NULL, "afs_taskq", 2, TASKQ_DEFAULTPRI, 0);
+ 
+     osi_StartNetIfPoller();
+ #endif
+ 
  #ifndef AFS_NOSTATS
      /*
       * Set up all the AFS statistics variables.  This should be done
***************
*** 484,489 ****
--- 505,521 ----
  }
  #endif
  
+ static void
+ wait_for_cachedefs(void) {
+ #ifdef AFS_CACHE_VNODE_PATH
+     while ((afs_numcachefiles < 1) || (afs_numfilesperdir < 1) ||
+ 	   (afs_cachebasedir[0] != '/')) {
+ 	printf("afs: waiting for cache parameter definitions\n");
+ 	afs_osi_Sleep(&afs_initState);
+     }
+ #endif
+ }
+ 
  /* leaving as is, probably will barf if we add prototypes here since it's likely being called
  with partial list */
  int
***************
*** 498,523 ****
  #endif /* AFS_SGI61_ENV */
  
      AFS_STATCNT(afs_syscall_call);
  #ifdef	AFS_SUN5_ENV
!     if (!afs_suser(CRED()) && (parm != AFSOP_GETMTU)
! 	&& (parm != AFSOP_GETMASK)) {
! 	/* only root can run this code */
! 	return (EACCES);
  #else
!     if (!afs_suser(NULL) && (parm != AFSOP_GETMTU)
! 	&& (parm != AFSOP_GETMASK)) {
  	/* only root can run this code */
  #if defined(KERNEL_HAVE_UERROR)
! 	setuerror(EACCES);
! 	return (EACCES);
  #else
! #if defined(AFS_OSF_ENV)
! 	return EACCES;
! #else /* AFS_OSF_ENV */
! 	return EPERM;
! #endif /* AFS_OSF_ENV */
  #endif
  #endif
      }
      AFS_GLOCK();
  #ifdef AFS_DARWIN80_ENV
--- 530,556 ----
  #endif /* AFS_SGI61_ENV */
  
      AFS_STATCNT(afs_syscall_call);
+     if (
  #ifdef	AFS_SUN5_ENV
! 	!afs_suser(CRED())
  #else
! 	!afs_suser(NULL)
! #endif
! 		    && (parm != AFSOP_GETMTU) && (parm != AFSOP_GETMASK)) {
  	/* only root can run this code */
+ #if defined(AFS_OSF_ENV) || defined(AFS_SUN5_ENV) || defined(KERNEL_HAVE_UERROR)
  #if defined(KERNEL_HAVE_UERROR)
!         setuerror(EACCES);
! #endif
! 	code = EACCES;
  #else
! 	code = EPERM;
  #endif
+ 	AFS_GLOCK();
+ #ifdef AFS_DARWIN80_ENV
+ 	put_vfs_context();
  #endif
+ 	goto out;
      }
      AFS_GLOCK();
  #ifdef AFS_DARWIN80_ENV
***************
*** 792,798 ****
  	    afs_osi_Sleep(&afs_initState);
  
  #ifdef AFS_DARWIN80_ENV
!     get_vfs_context();
  #endif
  	/* do it by inode */
  #ifdef AFS_SGI62_ENV
--- 825,831 ----
  	    afs_osi_Sleep(&afs_initState);
  
  #ifdef AFS_DARWIN80_ENV
! 	get_vfs_context();
  #endif
  	/* do it by inode */
  #ifdef AFS_SGI62_ENV
***************
*** 800,807 ****
  #endif
  	code = afs_InitCacheFile(NULL, ainode);
  #ifdef AFS_DARWIN80_ENV
!     put_vfs_context();
  #endif
      } else if (parm == AFSOP_ROOTVOLUME) {
  	/* wait for basic init */
  	while (afs_initState < AFSOP_START_BKG)
--- 833,846 ----
  #endif
  	code = afs_InitCacheFile(NULL, ainode);
  #ifdef AFS_DARWIN80_ENV
! 	put_vfs_context();
  #endif
+     } else if (parm == AFSOP_CACHEDIRS) {
+ 	afs_numfilesperdir = parm2;
+ 	afs_osi_Wakeup(&afs_initState);
+     } else if (parm == AFSOP_CACHEFILES) {
+ 	afs_numcachefiles = parm2;
+ 	afs_osi_Wakeup(&afs_initState);
      } else if (parm == AFSOP_ROOTVOLUME) {
  	/* wait for basic init */
  	while (afs_initState < AFSOP_START_BKG)
***************
*** 815,821 ****
  	    code = 0;
      } else if (parm == AFSOP_CACHEFILE || parm == AFSOP_CACHEINFO
  	       || parm == AFSOP_VOLUMEINFO || parm == AFSOP_AFSLOG
! 	       || parm == AFSOP_CELLINFO) {
  	char *tbuffer = osi_AllocSmallSpace(AFS_SMALLOCSIZ);
  
  	code = 0;
--- 854,860 ----
  	    code = 0;
      } else if (parm == AFSOP_CACHEFILE || parm == AFSOP_CACHEINFO
  	       || parm == AFSOP_VOLUMEINFO || parm == AFSOP_AFSLOG
! 	       || parm == AFSOP_CELLINFO || parm == AFSOP_CACHEBASEDIR) {
  	char *tbuffer = osi_AllocSmallSpace(AFS_SMALLOCSIZ);
  
  	code = 0;
***************
*** 829,850 ****
  	    tbuffer[AFS_SMALLOCSIZ - 1] = '\0';	/* null-terminate the name */
  	    /* We have the cache dir copied in.  Call the cache init routine */
  #ifdef AFS_DARWIN80_ENV
!     get_vfs_context();
  #endif
! 	    if (parm == AFSOP_CACHEFILE)
  		code = afs_InitCacheFile(tbuffer, 0);
! 	    else if (parm == AFSOP_CACHEINFO)
  		code = afs_InitCacheInfo(tbuffer);
! 	    else if (parm == AFSOP_VOLUMEINFO)
  		code = afs_InitVolumeInfo(tbuffer);
! 	    else if (parm == AFSOP_CELLINFO)
  		code = afs_InitCellInfo(tbuffer);
  #ifdef AFS_DARWIN80_ENV
!     put_vfs_context();
  #endif
  	}
  	osi_FreeSmallSpace(tbuffer);
      } else if (parm == AFSOP_GO) {
  	/* the generic initialization calls come here.  One parameter: should we do the
  	 * set-time operation on this workstation */
  	if (afs_Go_Done)
--- 868,916 ----
  	    tbuffer[AFS_SMALLOCSIZ - 1] = '\0';	/* null-terminate the name */
  	    /* We have the cache dir copied in.  Call the cache init routine */
  #ifdef AFS_DARWIN80_ENV
! 	    get_vfs_context();
  #endif
! 	    if (parm == AFSOP_CACHEBASEDIR) {
! 		strncpy(afs_cachebasedir, tbuffer, 1024);
! 		afs_cachebasedir[1023] = '\0';
! 		afs_osi_Wakeup(&afs_initState);
! 	    } else if (parm == AFSOP_CACHEFILE) {
! 		wait_for_cachedefs();
  		code = afs_InitCacheFile(tbuffer, 0);
! 	    } else if (parm == AFSOP_CACHEINFO) {
! 		wait_for_cachedefs();
  		code = afs_InitCacheInfo(tbuffer);
! 	    } else if (parm == AFSOP_VOLUMEINFO) {
! 		wait_for_cachedefs();
  		code = afs_InitVolumeInfo(tbuffer);
! 	    } else if (parm == AFSOP_CELLINFO) {
! 		wait_for_cachedefs();
  		code = afs_InitCellInfo(tbuffer);
+ 	    }
  #ifdef AFS_DARWIN80_ENV
! 	    put_vfs_context();
  #endif
  	}
  	osi_FreeSmallSpace(tbuffer);
      } else if (parm == AFSOP_GO) {
+ #ifdef AFS_CACHE_VNODE_PATH
+        afs_int32 dummy;
+ 
+        wait_for_cachedefs();
+ 
+ #ifdef AFS_DARWIN80_ENV
+        get_vfs_context();
+ #endif
+        if ((afs_numcachefiles > 0) && (afs_numfilesperdir > 0) && 
+            (afs_cachebasedir[0] == '/')) {
+            for (dummy = 0; dummy < afs_numcachefiles; dummy++) {
+                code = afs_InitCacheFile(NULL, dummy);
+            }
+        }
+ #ifdef AFS_DARWIN80_ENV
+        put_vfs_context();
+ #endif
+ #endif
  	/* the generic initialization calls come here.  One parameter: should we do the
  	 * set-time operation on this workstation */
  	if (afs_Go_Done)
***************
*** 858,863 ****
--- 924,930 ----
  #if	(!defined(AFS_NONFSTRANS)) || defined(AFS_AIX_IAUTH_ENV)
  	afs_nfsclient_init();
  #endif
+ 	afs_uuid_create(&afs_cb_interface.uuid);
  	printf("found %d non-empty cache files (%d%%).\n",
  	       afs_stats_cmperf.cacheFilesReused,
  	       (100 * afs_stats_cmperf.cacheFilesReused) /
***************
*** 866,871 ****
--- 933,940 ----
      } else if (parm == AFSOP_ADVISEADDR) {
  	/* pass in the host address to the rx package */
  	int rxbind = 0;
+ 	int refresh = 0;
+ 
  	afs_int32 count = parm2;
  	afs_int32 *buffer =
  	    afs_osi_Alloc(sizeof(afs_int32) * AFS_MAX_INTERFACE_ADDR);
***************
*** 875,880 ****
--- 944,957 ----
  	    afs_osi_Alloc(sizeof(afs_int32) * AFS_MAX_INTERFACE_ADDR);
  	int i;
  
+ 	/* This is a refresh */
+ 	if (count & 0x40000000) {
+ 	    count &= ~0x40000000;
+ 	    /* Can't bind after we start. Fix? */
+ 	    count &= ~0x80000000;
+ 	    refresh = 1;
+ 	}
+ 
  	/* Bind, but only if there's only one address configured */ 
  	if ( count & 0x80000000) {
  	    count &= ~0x80000000;
***************
*** 914,929 ****
  	    afs_cb_interface.mtu[i] = (parm5 ? mtubuffer[i] : htonl(1500));
  #endif
  	}
- 	afs_uuid_create(&afs_cb_interface.uuid);
  	rxi_setaddr(buffer[0]);
! 	if (rxbind)
! 	    rx_bindhost = buffer[0];
! 	else
! 	    rx_bindhost = htonl(INADDR_ANY);
  
  	afs_osi_Free(buffer, sizeof(afs_int32) * AFS_MAX_INTERFACE_ADDR);
  	afs_osi_Free(maskbuffer, sizeof(afs_int32) * AFS_MAX_INTERFACE_ADDR);
  	afs_osi_Free(mtubuffer, sizeof(afs_int32) * AFS_MAX_INTERFACE_ADDR);
      }
  #ifdef	AFS_SGI53_ENV
      else if (parm == AFSOP_NFSSTATICADDR) {
--- 991,1012 ----
  	    afs_cb_interface.mtu[i] = (parm5 ? mtubuffer[i] : htonl(1500));
  #endif
  	}
  	rxi_setaddr(buffer[0]);
! 	if (!refresh) {
! 	    if (rxbind)
! 		rx_bindhost = buffer[0];
! 	    else
! 		rx_bindhost = htonl(INADDR_ANY);
! 	}
  
  	afs_osi_Free(buffer, sizeof(afs_int32) * AFS_MAX_INTERFACE_ADDR);
  	afs_osi_Free(maskbuffer, sizeof(afs_int32) * AFS_MAX_INTERFACE_ADDR);
  	afs_osi_Free(mtubuffer, sizeof(afs_int32) * AFS_MAX_INTERFACE_ADDR);
+ 
+ 	if (refresh) {
+ 	    afs_CheckServers(1, NULL);     /* check down servers */
+ 	    afs_CheckServers(0, NULL);     /* check down servers */
+ 	}
      }
  #ifdef	AFS_SGI53_ENV
      else if (parm == AFSOP_NFSSTATICADDR) {
***************
*** 1072,1080 ****
  	code = EINVAL;
  
    out:
- #ifdef AFS_DARWIN80_ENV /* to balance the put in afs3_syscall() */
-     get_vfs_context();
- #endif
      AFS_GUNLOCK();
  #ifdef AFS_LINUX20_ENV
      return -code;
--- 1155,1160 ----
***************
*** 1658,1664 ****
      }
  
  #if defined(AFS_DARWIN80_ENV)
!     put_vfs_context();
  #endif
  #ifdef AFS_LINUX20_ENV
      code = -code;
--- 1738,1745 ----
      }
  
  #if defined(AFS_DARWIN80_ENV)
!     if (uap->syscall != AFSCALL_CALL)
! 	put_vfs_context();
  #endif
  #ifdef AFS_LINUX20_ENV
      code = -code;
Index: openafs/src/afs/afs_dcache.c
diff -c openafs/src/afs/afs_dcache.c:1.42.2.20 openafs/src/afs/afs_dcache.c:1.42.2.22
*** openafs/src/afs/afs_dcache.c:1.42.2.20	Thu Nov  9 19:16:29 2006
--- openafs/src/afs/afs_dcache.c	Mon Aug 20 13:53:15 2007
***************
*** 14,20 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_dcache.c,v 1.42.2.20 2006/11/10 00:16:29 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/afs_dcache.c,v 1.42.2.22 2007/08/20 17:53:15 shadow Exp $");
  
  #include "afs/sysincludes.h"	/*Standard vendor system headers */
  #include "afsincludes.h"	/*AFS-based standard headers */
***************
*** 1201,1214 ****
  	}
  	index = afs_dcnextTbl[index];
      }
-     MReleaseWriteLock(&afs_xdcache);
      if (index != NULLIDX) {
  	hset(afs_indexTimes[tdc->index], afs_indexCounter);
  	hadd32(afs_indexCounter, 1);
  	return tdc;
!     } else
! 	return NULL;
! 
  }				/*afs_FindDCache */
  
  
--- 1201,1214 ----
  	}
  	index = afs_dcnextTbl[index];
      }
      if (index != NULLIDX) {
  	hset(afs_indexTimes[tdc->index], afs_indexCounter);
  	hadd32(afs_indexCounter, 1);
+ 	MReleaseWriteLock(&afs_xdcache);
  	return tdc;
!     } 
!     MReleaseWriteLock(&afs_xdcache);
!     return NULL;
  }				/*afs_FindDCache */
  
  
***************
*** 2382,2398 ****
  	    }
  	    ReleaseWriteLock(&tdc->lock);
  	    afs_PutDCache(tdc);
! 	    ObtainWriteLock(&afs_xcbhash, 454);
! 	    afs_DequeueCallback(avc);
! 	    avc->states &= ~(CStatd | CUnique);
! 	    ReleaseWriteLock(&afs_xcbhash);
! 	    if (avc->fid.Fid.Vnode & 1 || (vType(avc) == VDIR))
! 		osi_dnlc_purgedp(avc);
! 	    /*
! 	     * Locks held:
! 	     * avc->lock(W); assert(!setLocks || slowPass)
! 	     */
! 	    osi_Assert(!setLocks || slowPass);
  	    tdc = NULL;
  	    goto done;
  	}
--- 2382,2400 ----
  	    }
  	    ReleaseWriteLock(&tdc->lock);
  	    afs_PutDCache(tdc);
! 	    if (!afs_IsDynroot(avc)) {
! 		ObtainWriteLock(&afs_xcbhash, 454);
! 		afs_DequeueCallback(avc);
! 		avc->states &= ~(CStatd | CUnique);
! 		ReleaseWriteLock(&afs_xcbhash);
! 		if (avc->fid.Fid.Vnode & 1 || (vType(avc) == VDIR))
! 		    osi_dnlc_purgedp(avc);
! 		/*
! 		 * Locks held:
! 		 * avc->lock(W); assert(!setLocks || slowPass)
! 		 */
! 		osi_Assert(!setLocks || slowPass);
! 	    }
  	    tdc = NULL;
  	    goto done;
  	}
Index: openafs/src/afs/afs_init.c
diff -c openafs/src/afs/afs_init.c:1.28.2.5 openafs/src/afs/afs_init.c:1.28.2.7
*** openafs/src/afs/afs_init.c:1.28.2.5	Wed Oct  5 01:58:27 2005
--- openafs/src/afs/afs_init.c	Wed Oct 10 13:43:35 2007
***************
*** 17,23 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_init.c,v 1.28.2.5 2005/10/05 05:58:27 shadow Exp $");
  
  #include "afs/stds.h"
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
--- 17,23 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_init.c,v 1.28.2.7 2007/10/10 17:43:35 shadow Exp $");
  
  #include "afs/stds.h"
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
***************
*** 244,251 ****
--- 244,255 ----
      ino_t inode;
      int code;
  
+ #ifdef AFS_CACHE_VNODE_PATH
+     return afs_cellname_init(AFS_CACHE_CELLS_INODE, code);
+ #else
      code = LookupInodeByPath(afile, &inode, NULL);
      return afs_cellname_init(inode, code);
+ #endif
  }
  
  /*
***************
*** 286,291 ****
--- 290,297 ----
       * it in the cache...
       */
      code = LookupInodeByPath(afile, &volumeInode, &volumeVnode);
+ #elif defined(AFS_CACHE_VNODE_PATH)
+     volumeInode = AFS_CACHE_VOLUME_INODE;
  #else
      code = LookupInodeByPath(afile, &volumeInode, NULL);
  #endif
***************
*** 416,426 ****
  #if defined(AFS_SGI62_ENV) || defined(AFS_HAVE_VXFS) || defined(AFS_DARWIN_ENV)
      afs_InitDualFSCacheOps(filevp);
  #endif
!     cacheInode = afs_vnodeToInumber(filevp);
!     cacheDev.dev = afs_vnodeToDev(filevp);
  #ifndef AFS_DARWIN80_ENV
      afs_cacheVfsp = filevp->v_vfsp;
  #endif
  #endif /* AFS_LINUX20_ENV */
      AFS_RELE(filevp);
  #endif /* AFS_LINUX22_ENV */
--- 422,436 ----
  #if defined(AFS_SGI62_ENV) || defined(AFS_HAVE_VXFS) || defined(AFS_DARWIN_ENV)
      afs_InitDualFSCacheOps(filevp);
  #endif
! #ifndef AFS_CACHE_VNODE_PATH
  #ifndef AFS_DARWIN80_ENV
      afs_cacheVfsp = filevp->v_vfsp;
  #endif
+     cacheInode = afs_vnodeToInumber(filevp);
+ #else
+     cacheInode = AFS_CACHE_ITEMS_INODE;
+ #endif
+     cacheDev.dev = afs_vnodeToDev(filevp);
  #endif /* AFS_LINUX20_ENV */
      AFS_RELE(filevp);
  #endif /* AFS_LINUX22_ENV */
Index: openafs/src/afs/afs_memcache.c
diff -c openafs/src/afs/afs_memcache.c:1.15.2.5 openafs/src/afs/afs_memcache.c:1.15.2.6
*** openafs/src/afs/afs_memcache.c:1.15.2.5	Wed Oct  5 01:58:27 2005
--- openafs/src/afs/afs_memcache.c	Sat Jun 23 11:31:11 2007
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_memcache.c,v 1.15.2.5 2005/10/05 05:58:27 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #ifndef AFS_LINUX22_ENV
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_memcache.c,v 1.15.2.6 2007/06/23 15:31:11 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #ifndef AFS_LINUX22_ENV
***************
*** 247,252 ****
--- 247,259 ----
  	char *oldData = mceP->data;
  
  	mceP->data = afs_osi_Alloc(size + offset);
+ 	if (mceP->data == NULL) {	/* no available memory */
+ 	    mceP->data = oldData;	/* revert back change that was made */
+ 	    MReleaseWriteLock(&mceP->afs_memLock);
+ 	    afs_warn("afs: afs_MemWriteBlk mem alloc failure (%d bytes)\n",
+ 		     size + offset);
+ 	    return -ENOMEM;
+ 	}
  
  	/* may overlap, but this is OK */
  	AFS_GUNLOCK();
***************
*** 285,290 ****
--- 292,304 ----
  	char *oldData = mceP->data;
  
  	mceP->data = afs_osi_Alloc(AFS_UIO_RESID(uioP) + AFS_UIO_OFFSET(uioP));
+ 	if (mceP->data == NULL) {	/* no available memory */
+ 	    mceP->data = oldData;	/* revert back change that was made */
+ 	    MReleaseWriteLock(&mceP->afs_memLock);
+ 	    afs_warn("afs: afs_MemWriteBlk mem alloc failure (%d bytes)\n",
+ 		     AFS_UIO_RESID(uioP) + AFS_UIO_OFFSET(uioP));
+ 	    return -ENOMEM;
+ 	}
  
  	AFS_GUNLOCK();
  	memcpy(mceP->data, oldData, mceP->size);
***************
*** 314,322 ****
      MObtainWriteLock(&mceP->afs_memLock, 313);
      /* old directory entry; g.c. */
      if (size == 0 && mceP->dataSize > memCacheBlkSize) {
! 	afs_osi_Free(mceP->data, mceP->dataSize);
  	mceP->data = afs_osi_Alloc(memCacheBlkSize);
! 	mceP->dataSize = memCacheBlkSize;
      }
  
      if (size < mceP->size)
--- 328,344 ----
      MObtainWriteLock(&mceP->afs_memLock, 313);
      /* old directory entry; g.c. */
      if (size == 0 && mceP->dataSize > memCacheBlkSize) {
! 	char *oldData = mceP->data;
  	mceP->data = afs_osi_Alloc(memCacheBlkSize);
! 	if (mceP->data == NULL) {	/* no available memory */
! 	    mceP->data = oldData;
! 	    MReleaseWriteLock(&mceP->afs_memLock);
! 	    afs_warn("afs: afs_MemWriteBlk mem alloc failure (%d bytes)\n",
! 		     memCacheBlkSize);
! 	} else {
! 	    afs_osi_Free(oldData, mceP->dataSize);
! 	    mceP->dataSize = memCacheBlkSize;
! 	}
      }
  
      if (size < mceP->size)
Index: openafs/src/afs/afs_nfsclnt.c
diff -c openafs/src/afs/afs_nfsclnt.c:1.12.2.2 openafs/src/afs/afs_nfsclnt.c:1.12.2.3
*** openafs/src/afs/afs_nfsclnt.c:1.12.2.2	Wed Dec 20 15:09:06 2006
--- openafs/src/afs/afs_nfsclnt.c	Tue Mar 20 15:24:11 2007
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_nfsclnt.c,v 1.12.2.2 2006/12/20 20:09:06 shadow Exp $");
  
  #if !defined(AFS_NONFSTRANS) || defined(AFS_AIX_IAUTH_ENV)
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_nfsclnt.c,v 1.12.2.3 2007/03/20 19:24:11 shadow Exp $");
  
  #if !defined(AFS_NONFSTRANS) || defined(AFS_AIX_IAUTH_ENV)
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
***************
*** 314,324 ****
  #endif
      AFS_STATCNT(afs_nfsclient_sysname);
      if (inname) {
- 	if (np->sysname) {
  	    for(count=0; count < np->sysnamecount;++count) {
  		afs_osi_Free(np->sysname[count], MAXSYSNAME);
  	    }
- 	}
  	for(count=0; count < *num;++count) {
  	    np->sysname[count]= afs_osi_Alloc(MAXSYSNAME);
  	}
--- 314,323 ----
  #endif
      AFS_STATCNT(afs_nfsclient_sysname);
      if (inname) {
  	    for(count=0; count < np->sysnamecount;++count) {
  		afs_osi_Free(np->sysname[count], MAXSYSNAME);
+ 		np->sysname[count] = NULL;
  	    }
  	for(count=0; count < *num;++count) {
  	    np->sysname[count]= afs_osi_Alloc(MAXSYSNAME);
  	}
***************
*** 329,336 ****
  	    cp += t+1;
  	}
  	np->sysnamecount = *num;
-     } else if (!np->sysname) {
- 	return ENODEV;      /* XXX */
      }
      *outname = np->sysname;
      *num = np->sysnamecount;
--- 328,333 ----
***************
*** 346,351 ****
--- 343,349 ----
  {
      register struct nfsclientpag *np, **tnp, *nnp;
      register afs_int32 i, delflag;
+ 	int count;
  
  #if defined(AFS_SGIMP_ENV)
      osi_Assert(ISAFS_GLOCK());
***************
*** 361,368 ****
  	    if ((pag == -1) || (!pag && delflag)
  		|| (pag && (np->refCount == 0) && (np->pag == pag))) {
  		*tnp = np->next;
! 		if (np->sysname)
! 		    afs_osi_Free(np->sysname, MAXSYSNAME);
  		afs_osi_Free(np, sizeof(struct nfsclientpag));
  	    } else {
  		tnp = &np->next;
--- 359,367 ----
  	    if ((pag == -1) || (!pag && delflag)
  		|| (pag && (np->refCount == 0) && (np->pag == pag))) {
  		*tnp = np->next;
! 		for(count=0; count < np->sysnamecount;++count) {
! 			afs_osi_Free(np->sysname[count], MAXSYSNAME);
! 		}
  		afs_osi_Free(np, sizeof(struct nfsclientpag));
  	    } else {
  		tnp = &np->next;
Index: openafs/src/afs/afs_osi.c
diff -c openafs/src/afs/afs_osi.c:1.48.2.11 openafs/src/afs/afs_osi.c:1.48.2.12
*** openafs/src/afs/afs_osi.c:1.48.2.11	Thu Feb  8 20:30:32 2007
--- openafs/src/afs/afs_osi.c	Tue Apr  3 14:57:06 2007
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_osi.c,v 1.48.2.11 2007/02/09 01:30:32 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_osi.c,v 1.48.2.12 2007/04/03 18:57:06 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 807,812 ****
--- 807,815 ----
  #endif
  
  #if defined(AFS_LINUX22_ENV)
+ #ifdef EXPORTED_TASKLIST_LOCK
+ extern rwlock_t tasklist_lock __attribute__((weak));
+ #endif
  void
  afs_osi_TraverseProcTable()
  {
***************
*** 814,821 ****
      struct task_struct *p;
  
  #ifdef EXPORTED_TASKLIST_LOCK
-     extern rwlock_t tasklist_lock __attribute__((weak));
- 
      if (&tasklist_lock)
         read_lock(&tasklist_lock);
  #endif
--- 817,822 ----
Index: openafs/src/afs/afs_pioctl.c
diff -c openafs/src/afs/afs_pioctl.c:1.81.2.25 openafs/src/afs/afs_pioctl.c:1.81.2.28
*** openafs/src/afs/afs_pioctl.c:1.81.2.25	Thu Mar  2 01:44:05 2006
--- openafs/src/afs/afs_pioctl.c	Tue Aug 21 22:15:33 2007
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_pioctl.c,v 1.81.2.25 2006/03/02 06:44:05 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #ifdef AFS_OBSD_ENV
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_pioctl.c,v 1.81.2.28 2007/08/22 02:15:33 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #ifdef AFS_OBSD_ENV
***************
*** 90,96 ****
  DECL_PIOCTL(PPrefetchFromTape);
  DECL_PIOCTL(PResidencyCmd);
  DECL_PIOCTL(PCallBackAddr);
! 
  /*
   * A macro that says whether we're going to need HandleClientContext().
   * This is currently used only by the nfs translator.
--- 90,96 ----
  DECL_PIOCTL(PPrefetchFromTape);
  DECL_PIOCTL(PResidencyCmd);
  DECL_PIOCTL(PCallBackAddr);
! DECL_PIOCTL(PNewUuid);
  /*
   * A macro that says whether we're going to need HandleClientContext().
   * This is currently used only by the nfs translator.
***************
*** 192,197 ****
--- 192,203 ----
  	PNewAlias,		/* 1 -- create new cell alias */
  	PListAliases,		/* 2 -- list cell aliases */
  	PCallBackAddr,		/* 3 -- request addr for callback rxcon */
+     PBogus,			/* 0 */
+     PBogus,			/* 0 */
+     PBogus,			/* 0 */
+     PBogus,			/* 0 */
+     PBogus,			/* 0 */
+     PNewUuid,                   /* 9 -- generate new uuid */
  };
  
  #define PSetClientContext 99	/*  Special pioctl to setup caller's creds  */
***************
*** 3354,3359 ****
--- 3360,3366 ----
      struct afs_exporter *exporter, *outexporter;
      struct AFS_UCRED *newcred;
      struct unixuser *au;
+     afs_uint32 comp = *com & 0xff00;
  
  #if defined(AFS_SGIMP_ENV)
      osi_Assert(ISAFS_GLOCK());
***************
*** 3479,3484 ****
--- 3486,3493 ----
      } else if (!code) {
  	EXP_RELE(outexporter);
      }
+     if (!code) 
+       *com = (*com) | comp;
      return code;
  }
  #endif /* AFS_NEED_CLIENTCONTEXT */
***************
*** 3830,3835 ****
--- 3839,3859 ----
      return code;
  }
  
+ DECL_PIOCTL(PNewUuid)
+ {
+     /*AFS_STATCNT(PNewUuid); */
+     if (!afs_resourceinit_flag)	/* afs deamons havn't started yet */
+ 	return EIO;		/* Inappropriate ioctl for device */
+ 
+     if (!afs_osi_suser(acred))
+ 	return EACCES;
+ 
+     ObtainWriteLock(&afs_xinterface, 555);
+     afs_uuid_create(&afs_cb_interface.uuid);
+     ReleaseWriteLock(&afs_xinterface);
+     ForceAllNewConnections();
+ }
+ 
  DECL_PIOCTL(PCallBackAddr)
  {
  #ifndef UKERNEL
Index: openafs/src/afs/afs_prototypes.h
diff -c openafs/src/afs/afs_prototypes.h:1.53.2.19 openafs/src/afs/afs_prototypes.h:1.53.2.20
*** openafs/src/afs/afs_prototypes.h:1.53.2.19	Mon Jan 15 15:51:57 2007
--- openafs/src/afs/afs_prototypes.h	Wed Jun 27 12:32:12 2007
***************
*** 692,697 ****
--- 692,698 ----
  				    afs_int32 acell, u_short aport,
  				    afs_int32 locktype, afsUUID * uuidp,
  				    afs_int32 addr_uniquifier);
+ extern void ForceAllNewConnections(void);
  extern void afs_MarkServerUpOrDown(struct srvAddr *sa, int a_isDown);
  extern void afs_ServerDown(struct srvAddr *sa);
  extern void afs_CountServers(void);
Index: openafs/src/afs/afs_server.c
diff -c openafs/src/afs/afs_server.c:1.33.2.8 openafs/src/afs/afs_server.c:1.33.2.10
*** openafs/src/afs/afs_server.c:1.33.2.8	Thu Nov  9 19:16:29 2006
--- openafs/src/afs/afs_server.c	Thu Oct  4 22:54:08 2007
***************
*** 33,39 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_server.c,v 1.33.2.8 2006/11/10 00:16:29 shadow Exp $");
  
  #include "afs/stds.h"
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
--- 33,39 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_server.c,v 1.33.2.10 2007/10/05 02:54:08 shadow Exp $");
  
  #include "afs/stds.h"
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
***************
*** 488,493 ****
--- 488,529 ----
  }				/*afs_CountServers */
  
  
+ void
+ ForceAllNewConnections()
+ {
+     int srvAddrCount;
+     struct srvAddr **addrs;
+     struct srvAddr *sa;
+     afs_int32 i, j;
+ 
+     ObtainReadLock(&afs_xserver);	/* Necessary? */
+     ObtainReadLock(&afs_xsrvAddr);
+ 
+     srvAddrCount = 0;
+     for (i = 0; i < NSERVERS; i++) {
+ 	for (sa = afs_srvAddrs[i]; sa; sa = sa->next_bkt) {
+ 	    srvAddrCount++;
+ 	}
+     }
+ 
+     addrs = afs_osi_Alloc(srvAddrCount * sizeof(*addrs));
+     j = 0;
+     for (i = 0; i < NSERVERS; i++) {
+ 	for (sa = afs_srvAddrs[i]; sa; sa = sa->next_bkt) {
+ 	    if (j >= srvAddrCount)
+ 		break;
+ 	    addrs[j++] = sa;
+ 	}
+     }
+ 
+     ReleaseReadLock(&afs_xsrvAddr);
+     ReleaseReadLock(&afs_xserver);
+     for (i = 0; i < j; i++) {
+         sa = addrs[i];
+ 	ForceNewConnections(sa);
+     }
+ }
+ 
  /* check down servers (if adown), or running servers (if !adown) */
  void
  afs_CheckServers(int adown, struct cell *acellp)
***************
*** 1237,1259 ****
  #else				/* AFS_USERSPACE_IP_ADDR */
  #if	defined(AFS_SUN5_ENV)
  #ifdef AFS_SUN510_ENV
!     ill_walk_context_t ctx;
  #else
      extern struct ill_s *ill_g_headp;
      long *addr = (long *)ill_g_headp;
- #endif
      ill_t *ill;
      ipif_t *ipif;
      int subnet, subnetmask, net, netmask;
  
      if (sa)
  	  sa->sa_iprank = 0;
  #ifdef AFS_SUN510_ENV
!     for (ill = ILL_START_WALK_ALL(&ctx) ; ill ; ill = ill_next(&ctx, ill)) {
  #else
      for (ill = (struct ill_s *)*addr /*ill_g_headp */ ; ill;
  	 ill = ill->ill_next) {
- #endif
  #ifdef AFS_SUN58_ENV
  	/* Make sure this is an IPv4 ILL */
  	if (ill->ill_isv6)
--- 1273,1346 ----
  #else				/* AFS_USERSPACE_IP_ADDR */
  #if	defined(AFS_SUN5_ENV)
  #ifdef AFS_SUN510_ENV
!     int i = 0;
  #else
      extern struct ill_s *ill_g_headp;
      long *addr = (long *)ill_g_headp;
      ill_t *ill;
      ipif_t *ipif;
+ #endif
      int subnet, subnetmask, net, netmask;
  
      if (sa)
  	  sa->sa_iprank = 0;
  #ifdef AFS_SUN510_ENV
!     rw_enter(&afsifinfo_lock, RW_READER);
! 
!     for (i = 0; (afsifinfo[i].ipaddr != NULL) && (i < ADDRSPERSITE); i++) {
! 
! 	if (IN_CLASSA(afsifinfo[i].ipaddr)) {
! 	    netmask = IN_CLASSA_NET;
! 	} else if (IN_CLASSB(afsifinfo[i].ipaddr)) {
! 	    netmask = IN_CLASSB_NET;
! 	} else if (IN_CLASSC(afsifinfo[i].ipaddr)) {
! 	    netmask = IN_CLASSC_NET;
! 	} else {
! 	    netmask = 0;
! 	}
! 	net = afsifinfo[i].ipaddr & netmask;
! 
! #ifdef notdef
! 	if (!s) {
! 	    if (afsifinfo[i].ipaddr != 0x7f000001) {	/* ignore loopback */
! 		*cnt += 1;
! 		if (*cnt > 16)
! 		    return;
! 		*addrp++ = afsifinfo[i].ipaddr;
! 	    }
! 	} else
! #endif /* notdef */
!         {
!             /* XXXXXX Do the individual ip ranking below XXXXX */
!             if ((sa->sa_ip & netmask) == net) {
!                 if ((sa->sa_ip & subnetmask) == subnet) {
!                     if (afsifinfo[i].ipaddr == sa->sa_ip) {   /* ie, ME!  */
!                         sa->sa_iprank = TOPR;
!                     } else {
!                         sa->sa_iprank = HI + afsifinfo[i].metric; /* case #2 */
!                     }
!                 } else {
!                     sa->sa_iprank = MED + afsifinfo[i].metric;    /* case #3 */
!                 }
!             } else {
!                     sa->sa_iprank = LO + afsifinfo[i].metric;     /* case #4 */
!             }
!             /* check for case #5 -- point-to-point link */
!             if ((afsifinfo[i].flags & IFF_POINTOPOINT)
!                 && (afsifinfo[i].dstaddr == sa->sa_ip)) {
! 
!                     if (afsifinfo[i].metric >= (MAXDEFRANK - MED) / PPWEIGHT)
!                         sa->sa_iprank = MAXDEFRANK;
!                     else
!                         sa->sa_iprank = MED + (PPWEIGHT << afsifinfo[i].metric);
!             }
!         }
!     }
!     
!     rw_exit(&afsifinfo_lock);
  #else
      for (ill = (struct ill_s *)*addr /*ill_g_headp */ ; ill;
  	 ill = ill->ill_next) {
  #ifdef AFS_SUN58_ENV
  	/* Make sure this is an IPv4 ILL */
  	if (ill->ill_isv6)
***************
*** 1313,1318 ****
--- 1400,1406 ----
  	    }
  	}
      }
+ #endif /* AFS_SUN510_ENV */
  #else
  #ifndef USEIFADDR
      struct ifnet *ifn = NULL;
Index: openafs/src/afs/AIX/osi_file.c
diff -c openafs/src/afs/AIX/osi_file.c:1.9.2.1 openafs/src/afs/AIX/osi_file.c:1.9.2.2
*** openafs/src/afs/AIX/osi_file.c:1.9.2.1	Thu Nov  9 18:26:25 2006
--- openafs/src/afs/AIX/osi_file.c	Wed Aug 15 23:54:26 2007
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/AIX/osi_file.c,v 1.9.2.1 2006/11/09 23:26:25 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/AIX/osi_file.c,v 1.9.2.2 2007/08/16 03:54:26 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 30,36 ****
  {
      struct inode *ip;
      register struct osi_file *afile = NULL;
-     extern struct vfs *rootvfs;
      struct vnode *vp = NULL;
      extern int cacheDiskType;
      afs_int32 code = 0;
--- 30,35 ----
***************
*** 48,54 ****
      afile = (struct osi_file *)osi_AllocSmallSpace(sizeof(struct osi_file));
      setuerror(0);
      AFS_GUNLOCK();
!     ip = (struct inode *)igetinode((dev_t) cacheDev.dev, rootvfs,
  				   (ino_t) ainode, &vp, &dummy);
      AFS_GLOCK();
      if (getuerror()) {
--- 47,53 ----
      afile = (struct osi_file *)osi_AllocSmallSpace(sizeof(struct osi_file));
      setuerror(0);
      AFS_GUNLOCK();
!     ip = (struct inode *)igetinode((dev_t) cacheDev.dev, afs_cacheVfsp,
  				   (ino_t) ainode, &vp, &dummy);
      AFS_GLOCK();
      if (getuerror()) {
Index: openafs/src/afs/AIX/osi_inode.c
diff -c openafs/src/afs/AIX/osi_inode.c:1.8.2.2 openafs/src/afs/AIX/osi_inode.c:1.8.2.3
*** openafs/src/afs/AIX/osi_inode.c:1.8.2.2	Sat Oct 15 10:24:25 2005
--- openafs/src/afs/AIX/osi_inode.c	Wed Aug 15 23:54:26 2007
***************
*** 17,23 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/AIX/osi_inode.c,v 1.8.2.2 2005/10/15 14:24:25 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 17,23 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/AIX/osi_inode.c,v 1.8.2.3 2007/08/16 03:54:26 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 262,268 ****
      struct inode *ip, *newip, *pip;
      register int err, rval1, rc = 0;
      struct vnode *vp = NULL;
-     extern struct vfs *rootvfs;
      register struct vfs *vfsp;
      struct vfs *nvfsp = NULL;
      char error;
--- 262,267 ----
Index: openafs/src/afs/AIX/osi_sleep.c
diff -c openafs/src/afs/AIX/osi_sleep.c:1.10 openafs/src/afs/AIX/osi_sleep.c:1.10.2.1
*** openafs/src/afs/AIX/osi_sleep.c:1.10	Tue Jul 15 19:14:17 2003
--- openafs/src/afs/AIX/osi_sleep.c	Mon Jun 25 16:25:31 2007
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/AIX/osi_sleep.c,v 1.10 2003/07/15 23:14:17 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/AIX/osi_sleep.c,v 1.10.2.1 2007/06/25 20:25:31 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 26,32 ****
--- 26,35 ----
  static void
  AfsWaitHack(struct trb *trb)
  {
+ #if 0
+ /* this gets called at interrupt context; let's not tempt fate... */
      AFS_STATCNT(WaitHack);
+ #endif
  
      e_clear_wait(trb->func_data, THREAD_TIMED_OUT);
  }
***************
*** 121,127 ****
  	evp = evp->next;
      }
      if (!newp) {
! 	newp = (afs_event_t *) osi_AllocSmallSpace(sizeof(afs_event_t));
  	afs_evhashcnt++;
  	newp->next = afs_evhasht[hashcode];
  	afs_evhasht[hashcode] = newp;
--- 124,130 ----
  	evp = evp->next;
      }
      if (!newp) {
! 	newp = (afs_event_t *) xmalloc(sizeof(afs_event_t), 5, pinned_heap);
  	afs_evhashcnt++;
  	newp->next = afs_evhasht[hashcode];
  	afs_evhasht[hashcode] = newp;
Index: openafs/src/afs/DARWIN/osi_file.c
diff -c openafs/src/afs/DARWIN/osi_file.c:1.8.2.6 openafs/src/afs/DARWIN/osi_file.c:1.8.2.7
*** openafs/src/afs/DARWIN/osi_file.c:1.8.2.6	Thu Nov  9 18:26:25 2006
--- openafs/src/afs/DARWIN/osi_file.c	Wed Oct 10 12:57:55 2007
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_file.c,v 1.8.2.6 2006/11/09 23:26:25 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_file.c,v 1.8.2.7 2007/10/10 16:57:55 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 141,146 ****
--- 141,149 ----
      extern int cacheDiskType;
      afs_int32 code = 0;
      int dummy;
+     char fname[1024];
+     struct osi_stat tstat;
+ 
      AFS_STATCNT(osi_UFSOpen);
      if (cacheDiskType != AFS_FCACHE_TYPE_UFS) {
  	osi_Panic("UFSOpen called for non-UFS cache\n");
***************
*** 154,159 ****
--- 157,184 ----
      }
      afile = (struct osi_file *)osi_AllocSmallSpace(sizeof(struct osi_file));
      AFS_GUNLOCK();
+ #ifdef AFS_CACHE_VNODE_PATH
+     if (ainode < 0) {
+ 	switch (ainode) {
+ 	case AFS_CACHE_CELLS_INODE:
+ 	    snprintf(fname, 1024, "%s/%s", afs_cachebasedir, "CellItems");
+ 	    break;
+ 	case AFS_CACHE_ITEMS_INODE:
+ 	    snprintf(fname, 1024, "%s/%s", afs_cachebasedir, "CacheItems");
+ 	    break;
+ 	case AFS_CACHE_VOLUME_INODE:
+ 	    snprintf(fname, 1024, "%s/%s", afs_cachebasedir, "VolumeItems");
+ 	    break;
+ 	default:
+ 	    osi_Panic("Invalid negative inode");
+ 	}
+     } else {
+ 	dummy = ainode / afs_numfilesperdir;
+ 	snprintf(fname, 1024, "%s/D%d/V%d", afs_cachebasedir, dummy, ainode);
+     }
+ 
+     code = vnode_open(fname, O_RDWR, 0, 0, &vp, afs_osi_ctxtp);
+ #else
  #ifndef AFS_DARWIN80_ENV
      if (afs_CacheFSType == AFS_APPL_HFS_CACHE)
  	code = igetinode(afs_cacheVfsp, (dev_t) cacheDev.dev, &ainode, &vp, &va, &dummy);	/* XXX hfs is broken */
***************
*** 166,181 ****
      else
  	panic("osi_UFSOpen called before cacheops initialized\n");
  #endif
      AFS_GLOCK();
      if (code) {
  	osi_FreeSmallSpace(afile);
  	osi_Panic("UFSOpen: igetinode failed");
      }
      afile->vnode = vp;
-     afile->size = va.va_size;
      afile->offset = 0;
      afile->proc = (int (*)())0;
      afile->inum = ainode;	/* for hint validity checking */
      return (void *)afile;
  }
  
--- 191,212 ----
      else
  	panic("osi_UFSOpen called before cacheops initialized\n");
  #endif
+ #endif
      AFS_GLOCK();
      if (code) {
  	osi_FreeSmallSpace(afile);
  	osi_Panic("UFSOpen: igetinode failed");
      }
      afile->vnode = vp;
      afile->offset = 0;
      afile->proc = (int (*)())0;
      afile->inum = ainode;	/* for hint validity checking */
+ #ifndef AFS_CACHE_VNODE_PATH
+     afile->size = va.va_size;
+ #else
+     code = afs_osi_Stat(afile, &tstat);
+     afile->size = tstat.size;
+ #endif
      return (void *)afile;
  }
  
Index: openafs/src/afs/DARWIN/osi_vnodeops.c
diff -c openafs/src/afs/DARWIN/osi_vnodeops.c:1.18.2.21 openafs/src/afs/DARWIN/osi_vnodeops.c:1.18.2.23
*** openafs/src/afs/DARWIN/osi_vnodeops.c:1.18.2.21	Wed Feb 14 19:29:51 2007
--- openafs/src/afs/DARWIN/osi_vnodeops.c	Sat Jul 28 10:35:06 2007
***************
*** 5,11 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_vnodeops.c,v 1.18.2.21 2007/02/15 00:29:51 shadow Exp $");
  
  #include <afs/sysincludes.h>	/* Standard vendor system headers */
  #include <afsincludes.h>	/* Afs-based standard headers */
--- 5,11 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_vnodeops.c,v 1.18.2.23 2007/07/28 14:35:06 shadow Exp $");
  
  #include <afs/sysincludes.h>	/* Standard vendor system headers */
  #include <afsincludes.h>	/* Afs-based standard headers */
***************
*** 1194,1201 ****
      cache_purge(vp);
      if (!error) {
  #ifdef AFS_DARWIN80_ENV
!         ubc_setsize(vp, (off_t)0);
!         vnode_recycle(vp);
  #else
          /* necessary so we don't deadlock ourselves in vclean */
          VOP_UNLOCK(vp, 0, cnp->cn_proc);
--- 1194,1205 ----
      cache_purge(vp);
      if (!error) {
  #ifdef AFS_DARWIN80_ENV
! 	struct vcache *tvc = VTOAFS(vp);
! 	
! 	if (!(tvc->states & CUnlinked)) {
!             ubc_setsize(vp, (off_t)0);
!             vnode_recycle(vp);
! 	}
  #else
          /* necessary so we don't deadlock ourselves in vclean */
          VOP_UNLOCK(vp, 0, cnp->cn_proc);
***************
*** 1626,1634 ****
  	vprint("afs_vop_inactive(): pushing active", vp);
  #endif
      if (tvc) {
!        AFS_GLOCK();
!        afs_InactiveVCache(tvc, 0);	/* decrs ref counts */
!        AFS_GUNLOCK();
      }
  #ifndef AFS_DARWIN80_ENV
      VOP_UNLOCK(vp, 0, ap->a_p);
--- 1630,1647 ----
  	vprint("afs_vop_inactive(): pushing active", vp);
  #endif
      if (tvc) {
! #ifdef AFS_DARWIN80_ENV
!         int unlinked = tvc->states & CUnlinked;
! #endif
! 	AFS_GLOCK();
! 	afs_InactiveVCache(tvc, 0);     /* decrs ref counts */
! 	AFS_GUNLOCK();
! #ifdef AFS_DARWIN80_ENV
! 	if (unlinked) {
! 	    vnode_recycle(vp);
! 	    cache_purge(vp);
! 	}
! #endif
      }
  #ifndef AFS_DARWIN80_ENV
      VOP_UNLOCK(vp, 0, ap->a_p);
***************
*** 2083,2093 ****
         par.vnfs_markroot = 1;
     error = vnode_create(VNCREATE_FLAVOR, VCREATESIZE, &par, &nvp);
     if (!error) {
!      vnode_addfsref(nvp);
!      avc->v = nvp;
!      avc->states &=~ CDeadVnode;
!      vnode_clearfsnode(ovp);
!      vnode_removefsref(ovp);
     }
     AFS_GLOCK();
     ReleaseWriteLock(&avc->lock);
--- 2096,2108 ----
         par.vnfs_markroot = 1;
     error = vnode_create(VNCREATE_FLAVOR, VCREATESIZE, &par, &nvp);
     if (!error) {
!        vnode_addfsref(nvp);
!        avc->v = nvp;
!        avc->states &=~ CDeadVnode;
!        if (!(avc->states & CVInit)) {
! 	   vnode_clearfsnode(ovp);
! 	   vnode_removefsref(ovp);
!        }
     }
     AFS_GLOCK();
     ReleaseWriteLock(&avc->lock);
Index: openafs/src/afs/LINUX/osi_alloc.c
diff -c openafs/src/afs/LINUX/osi_alloc.c:1.22.2.1 openafs/src/afs/LINUX/osi_alloc.c:1.22.2.2
*** openafs/src/afs/LINUX/osi_alloc.c:1.22.2.1	Tue Dec  7 01:12:12 2004
--- openafs/src/afs/LINUX/osi_alloc.c	Wed Apr 18 14:04:10 2007
***************
*** 15,21 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_alloc.c,v 1.22.2.1 2004/12/07 06:12:12 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
--- 15,21 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_alloc.c,v 1.22.2.2 2007/04/18 18:04:10 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
***************
*** 98,104 ****
--- 98,109 ----
  	    if (new)		/* piggy back alloc type */
  		new = (void *)(KM_TYPE | (unsigned long)new);
  	} else {
+ 	    osi_Assert(drop_glock || !haveGlock);
+ 	    if (drop_glock && haveGlock)
+ 		AFS_GUNLOCK();
  	    new = (void *)vmalloc(asize);
+ 	    if (drop_glock && haveGlock)
+ 		AFS_GLOCK();
  	    if (new)		/* piggy back alloc type */
  		new = (void *)(VM_TYPE | (unsigned long)new);
  	}
Index: openafs/src/afs/LINUX/osi_groups.c
diff -c openafs/src/afs/LINUX/osi_groups.c:1.25.2.8 openafs/src/afs/LINUX/osi_groups.c:1.25.2.10
*** openafs/src/afs/LINUX/osi_groups.c:1.25.2.8	Mon Jan 15 10:52:46 2007
--- openafs/src/afs/LINUX/osi_groups.c	Tue Mar 20 14:48:52 2007
***************
*** 20,26 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_groups.c,v 1.25.2.8 2007/01/15 15:52:46 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
--- 20,26 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_groups.c,v 1.25.2.10 2007/03/20 18:48:52 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
***************
*** 594,606 ****
--- 594,611 ----
  {
      afs_uint32 pag = key->payload.value;
      struct unixuser *pu;
+     int locked = ISAFS_GLOCK();
  
+     if (!locked)
+ 	AFS_GLOCK();
      pu = afs_FindUser(pag, -1, READ_LOCK);
      if (pu) {
  	pu->ct.EndTimestamp = 0;
  	pu->tokenTime = 0;
  	afs_PutUser(pu, READ_LOCK);
      }
+     if (!locked)
+ 	AFS_GUNLOCK();
  }
  
  struct key_type key_type_afs_pag =
***************
*** 612,624 ****
      .destroy     = afs_pag_destroy,
  };
  
  void osi_keyring_init(void)
  {
      struct task_struct *p;
! 
      p = find_task_by_pid(1);
      if (p && p->user->session_keyring)
  	__key_type_keyring = p->user->session_keyring->type;
  
      register_key_type(&key_type_afs_pag);
  }
--- 617,652 ----
      .destroy     = afs_pag_destroy,
  };
  
+ #ifdef EXPORTED_TASKLIST_LOCK
+ extern rwlock_t tasklist_lock __attribute__((weak));
+ #endif
+ 
  void osi_keyring_init(void)
  {
      struct task_struct *p;
! #ifdef EXPORTED_TASKLIST_LOCK
!     if (&tasklist_lock)
!       read_lock(&tasklist_lock);
! #endif
! #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
! #ifdef EXPORTED_TASKLIST_LOCK
!     else
! #endif
!       rcu_read_lock();
! #endif
      p = find_task_by_pid(1);
      if (p && p->user->session_keyring)
  	__key_type_keyring = p->user->session_keyring->type;
+ #ifdef EXPORTED_TASKLIST_LOCK
+     if (&tasklist_lock)
+        read_unlock(&tasklist_lock);
+ #endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+ #ifdef EXPORTED_TASKLIST_LOCK
+     else
+ #endif
+       rcu_read_unlock();
+ #endif
  
      register_key_type(&key_type_afs_pag);
  }
Index: openafs/src/afs/LINUX/osi_module.c
diff -c openafs/src/afs/LINUX/osi_module.c:1.52.2.26 openafs/src/afs/LINUX/osi_module.c:1.52.2.28
*** openafs/src/afs/LINUX/osi_module.c:1.52.2.26	Thu Feb  8 20:30:33 2007
--- openafs/src/afs/LINUX/osi_module.c	Tue Aug 21 22:19:28 2007
***************
*** 15,21 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_module.c,v 1.52.2.26 2007/02/09 01:30:33 shadow Exp $");
  
  #include <linux/module.h> /* early to avoid printf->printk mapping */
  #include "afs/sysincludes.h"
--- 15,21 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_module.c,v 1.52.2.28 2007/08/22 02:19:28 shadow Exp $");
  
  #include <linux/module.h> /* early to avoid printf->printk mapping */
  #include "afs/sysincludes.h"
***************
*** 370,378 ****
      if (err)
  	return err;
      err = afs_init_inodecache();
!     if (err)
  	return err;
!     register_filesystem(&afs_fs_type);
      osi_sysctl_init();
  #ifdef LINUX_KEYRING_SUPPORT
      osi_keyring_init();
--- 370,390 ----
      if (err)
  	return err;
      err = afs_init_inodecache();
!     if (err) {
! #ifndef LINUX_KEYRING_SUPPORT
! 	osi_syscall_clean();
! #endif
! 	return err;
!     }
!     err = register_filesystem(&afs_fs_type);
!     if (err) {
! 	afs_destroy_inodecache();
! #ifndef LINUX_KEYRING_SUPPORT
! 	osi_syscall_clean();
! #endif
  	return err;
!     }
! 
      osi_sysctl_init();
  #ifdef LINUX_KEYRING_SUPPORT
      osi_keyring_init();
***************
*** 392,400 ****
--- 404,416 ----
  cleanup_module(void)
  #endif
  {
+ #ifdef LINUX_KEYRING_SUPPORT
      osi_keyring_shutdown();
+ #endif
      osi_sysctl_clean();
+ #ifndef LINUX_KEYRING_SUPPORT
      osi_syscall_clean();
+ #endif
      unregister_filesystem(&afs_fs_type);
  
      afs_destroy_inodecache();
Index: openafs/src/afs/LINUX/osi_probe.c
diff -c openafs/src/afs/LINUX/osi_probe.c:1.1.2.20 openafs/src/afs/LINUX/osi_probe.c:1.1.2.24
*** openafs/src/afs/LINUX/osi_probe.c:1.1.2.20	Tue Feb 13 17:54:20 2007
--- openafs/src/afs/LINUX/osi_probe.c	Tue Aug 21 17:31:59 2007
***************
*** 59,64 ****
--- 59,65 ----
  #include "afsincludes.h"
  #endif
  #include <linux/version.h>
+ #include <linux/sched.h>
  #ifdef CONFIG_H_EXISTS
  #include <linux/config.h>
  #endif
***************
*** 128,134 ****
  
  /* If this is set, we are more careful about avoiding duplicate matches */
  static int probe_carefully = 1;
! #ifdef module_param
  module_param(probe_carefully, int, 0);
  #else
  MODULE_PARM(probe_carefully, "i");
--- 129,135 ----
  
  /* If this is set, we are more careful about avoiding duplicate matches */
  static int probe_carefully = 1;
! #if defined(module_param) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9)
  module_param(probe_carefully, int, 0);
  #else
  MODULE_PARM(probe_carefully, "i");
***************
*** 153,161 ****
   * 0x0010 - detail - check_harder
   * 0x0020 - detail - check_harder/zapped
   * 0x0040 - automatically ignore setgroups and afs_syscall
   */
  static int probe_debug = 0x41;
! #ifdef module_param
  module_param(probe_debug, int, 0);
  #else
  MODULE_PARM(probe_debug, "i");
--- 154,163 ----
   * 0x0010 - detail - check_harder
   * 0x0020 - detail - check_harder/zapped
   * 0x0040 - automatically ignore setgroups and afs_syscall
+  * 0x0080 - detail - check_table_readable
   */
  static int probe_debug = 0x41;
! #if defined(module_param) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9)
  module_param(probe_debug, int, 0);
  #else
  MODULE_PARM(probe_debug, "i");
***************
*** 171,177 ****
  MODULE_PARM_DESC(probe_debug_addr, "Debug range starting locations");
  
  static unsigned long probe_debug_range = 0;
! #ifdef module_param
  module_param(probe_debug_range, long, 0);
  #else
  MODULE_PARM(probe_debug_range, "l");
--- 173,179 ----
  MODULE_PARM_DESC(probe_debug_addr, "Debug range starting locations");
  
  static unsigned long probe_debug_range = 0;
! #if defined(module_param) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9)
  module_param(probe_debug_range, long, 0);
  #else
  MODULE_PARM(probe_debug_range, "l");
***************
*** 179,185 ****
  MODULE_PARM_DESC(probe_debug_range, "Debug range length");
  
  static unsigned long probe_debug_tag = 0;
! #ifdef module_param
  module_param(probe_debug_tag, long, 0);
  #else
  MODULE_PARM(probe_debug_tag, "l");
--- 181,187 ----
  MODULE_PARM_DESC(probe_debug_range, "Debug range length");
  
  static unsigned long probe_debug_tag = 0;
! #if defined(module_param) && LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9)
  module_param(probe_debug_tag, long, 0);
  #else
  MODULE_PARM(probe_debug_tag, "l");
***************
*** 298,303 ****
--- 300,309 ----
      int debug_ignore_NR[4];         /* syscalls to ignore for debugging */
  } probectl;
  
+ #if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
+ static int check_access(unsigned long, int);
+ static int check_table_readable(probectl *, PROBETYPE *);
+ #endif
  
  
  /********** Probing Configuration: sys_call_table **********/
***************
*** 512,520 ****
      /* symbol in section to try scanning */
  #if defined(AFS_SPARC64_LINUX20_ENV) || defined(AFS_S390_LINUX20_ENV) || defined(AFS_S390X_LINUX20_ENV)
      (unsigned long)&sys_close,
! #elif defined(AFS_AMD64_LINUX20_ENV)
      /* On this platform, it's in a different section! */
      (unsigned long)&generic_ro_fops,
  #else
      (unsigned long)&init_mm,
  #endif
--- 518,529 ----
      /* symbol in section to try scanning */
  #if defined(AFS_SPARC64_LINUX20_ENV) || defined(AFS_S390_LINUX20_ENV) || defined(AFS_S390X_LINUX20_ENV)
      (unsigned long)&sys_close,
! #elif defined(AFS_AMD64_LINUX26_ENV)
      /* On this platform, it's in a different section! */
      (unsigned long)&generic_ro_fops,
+ #elif defined(AFS_AMD64_LINUX20_ENV)
+     /* On this platform, it's in a different section! */
+     (unsigned long)&tasklist_lock,
  #else
      (unsigned long)&init_mm,
  #endif
***************
*** 535,544 ****
      (unsigned long)(&init_mm),
      0x1fffff,
      0x30000,
! #elif defined(AFS_AMD64_LINUX20_ENV)
      (unsigned long)(&generic_ro_fops) - 0x30000,
      0,
      0x6000,
  #elif defined(AFS_PPC64_LINUX26_ENV)
      (unsigned long)(&do_signal),
      0xfff,
--- 544,557 ----
      (unsigned long)(&init_mm),
      0x1fffff,
      0x30000,
! #elif defined(AFS_AMD64_LINUX26_ENV)
      (unsigned long)(&generic_ro_fops) - 0x30000,
      0,
      0x6000,
+ #elif defined(AFS_AMD64_LINUX20_ENV)
+     (unsigned long)(&tasklist_lock) - 0x30000,
+     0,
+     0x6000,
  #elif defined(AFS_PPC64_LINUX26_ENV)
      (unsigned long)(&do_signal),
      0xfff,
***************
*** 940,945 ****
--- 953,963 ----
      PROBETYPE *x;
      int i, j;
  
+ #if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
+     i = check_table_readable(P, ptr);
+     if (i >= 0) return i;
+ #endif
+ 
      for (x = ptr, i = 0; i < _SS(NR_syscalls); i++, x++) {
  #ifdef OSI_PROBE_DEBUG
  	if (probe_debug & 0x0040) {
***************
*** 1062,1067 ****
--- 1080,1090 ----
      unsigned long ip1;
      int i, s;
  
+ #if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
+     i = check_table_readable(P, p);
+     if (i >= 0) return 0;
+ #endif
+ 
      /* Check zapped syscalls */
      for (i = 1; i < P->n_zapped_syscalls; i++) {
  	if (p[_SS(P->zapped_syscalls[i])] != p[_SS(P->zapped_syscalls[0])]) {
***************
*** 1349,1355 ****
  }
  
  #if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
! static int check_writable(unsigned long address) 
  { 
      pgd_t *pgd = pgd_offset_k(address);
  #ifdef PUD_SIZE
--- 1372,1378 ----
  }
  
  #if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
! static int check_access(unsigned long address, int mode) 
  { 
      pgd_t *pgd = pgd_offset_k(address);
  #ifdef PUD_SIZE
***************
*** 1374,1383 ****
  	pte = (pte_t *)pmd;
      else
  	pte = pte_offset_kernel(pmd, address);
!     if (pte_none(*pte) || !pte_present(*pte) || !pte_write(*pte))
  	return 0;
      return 1;
  }
  #endif
  
  void *osi_find_syscall_table(int which)
--- 1397,1430 ----
  	pte = (pte_t *)pmd;
      else
  	pte = pte_offset_kernel(pmd, address);
!     if (pte_none(*pte) || !pte_present(*pte))
! 	return 0;
!     if (mode && !pte_write(*pte))
  	return 0;
      return 1;
  }
+ 
+ static int check_table_readable(probectl *P, PROBETYPE *ptr)
+ {
+     PROBETYPE *next_page;
+     int i = 0, delta;
+ 
+     while (i < _SS(NR_syscalls)) {
+ 	next_page = (PROBETYPE *)PAGE_ALIGN((unsigned long)(ptr+1));
+ 	delta = next_page - ptr;
+ 	if (!check_access((unsigned long)ptr, 0)) {
+ #ifdef OSI_PROBE_DEBUG
+ 	    if (probe_debug & 0x0080)
+ 		printk("<7>osi_probe: %s                      0x%016lx not readable; delta=0x%lx\n",
+ 		       P->symbol, (unsigned long)ptr, delta);
+ #endif
+ 	    return delta - 1;
+ 	}
+ 	ptr += delta;
+ 	i += delta;
+     }
+     return -1;
+ }
  #endif
  
  void *osi_find_syscall_table(int which)
***************
*** 1405,1411 ****
      }
      printk("Found %s at 0x%lx (%s)\n", P->desc, (unsigned long)answer, method);
  #if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
!     if (!check_writable((unsigned long)answer)) {
  	printk("Address 0x%lx is not writable.\n", (unsigned long)answer);
  	printk("System call hooks will not be installed; proceeding anyway\n");
  	return 0;
--- 1452,1458 ----
      }
      printk("Found %s at 0x%lx (%s)\n", P->desc, (unsigned long)answer, method);
  #if defined(AFS_I386_LINUX26_ENV) || defined(AFS_AMD64_LINUX26_ENV)
!     if (!check_access((unsigned long)answer, 1)) {
  	printk("Address 0x%lx is not writable.\n", (unsigned long)answer);
  	printk("System call hooks will not be installed; proceeding anyway\n");
  	return 0;
Index: openafs/src/afs/LINUX/osi_sleep.c
diff -c openafs/src/afs/LINUX/osi_sleep.c:1.22.2.10 openafs/src/afs/LINUX/osi_sleep.c:1.22.2.11
*** openafs/src/afs/LINUX/osi_sleep.c:1.22.2.10	Thu Jan  4 16:26:34 2007
--- openafs/src/afs/LINUX/osi_sleep.c	Tue Jun 12 01:47:47 2007
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_sleep.c,v 1.22.2.10 2007/01/04 21:26:34 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_sleep.c,v 1.22.2.11 2007/06/12 05:47:47 rra Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 205,211 ****
--- 205,215 ----
  #if defined(STRUCT_TASK_STRUCT_HAS_TODO)
  	    !current->todo
  #else
+ #if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
              test_ti_thread_flag(current->thread_info, TIF_FREEZE)
+ #else
+             test_ti_thread_flag(task_thread_info(current), TIF_FREEZE)
+ #endif
  #endif
  #endif
  	    )
***************
*** 303,309 ****
--- 307,317 ----
  #if defined(STRUCT_TASK_STRUCT_HAS_TODO)
  	    !current->todo
  #else
+ #if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
              test_ti_thread_flag(current->thread_info, TIF_FREEZE)
+ #else
+             test_ti_thread_flag(task_thread_info(current), TIF_FREEZE)
+ #endif
  #endif
  #endif
  	    )
Index: openafs/src/afs/LINUX/osi_syscall.c
diff -c openafs/src/afs/LINUX/osi_syscall.c:1.1.2.8 openafs/src/afs/LINUX/osi_syscall.c:1.1.2.9
*** openafs/src/afs/LINUX/osi_syscall.c:1.1.2.8	Fri Dec  1 13:49:28 2006
--- openafs/src/afs/LINUX/osi_syscall.c	Mon Mar 26 23:22:25 2007
***************
*** 15,21 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_syscall.c,v 1.1.2.8 2006/12/01 18:49:28 shadow Exp $");
  
  #ifdef AFS_LINUX24_ENV
  #include <linux/module.h> /* early to avoid printf->printk mapping */
--- 15,21 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_syscall.c,v 1.1.2.9 2007/03/27 03:22:25 shadow Exp $");
  
  #ifdef AFS_LINUX24_ENV
  #include <linux/module.h> /* early to avoid printf->printk mapping */
***************
*** 56,64 ****
  
  #if defined(AFS_S390X_LINUX24_ENV) 
  #define INSERT_SYSCALL(SLOT, TMPPAGE, FUNC) \
! 	if (POINTER2SYSCALL FUNC > 0x7fffffff) { \
  	    TMPPAGE = kmalloc ( PAGE_SIZE, GFP_DMA|GFP_KERNEL );	\
! 	    if (POINTER2SYSCALL TMPPAGE > 0x7fffffff) { \
  		printf("Cannot allocate page for FUNC syscall jump vector\n"); \
  		return EINVAL; \
  	    } \
--- 56,64 ----
  
  #if defined(AFS_S390X_LINUX24_ENV) 
  #define INSERT_SYSCALL(SLOT, TMPPAGE, FUNC) \
! 	if (SYSCALL2POINTER FUNC > 0x7fffffff) { \
  	    TMPPAGE = kmalloc ( PAGE_SIZE, GFP_DMA|GFP_KERNEL );	\
! 	    if (SYSCALL2POINTER TMPPAGE > 0x7fffffff) { \
  		printf("Cannot allocate page for FUNC syscall jump vector\n"); \
  		return EINVAL; \
  	    } \
Index: openafs/src/afs/LINUX/osi_sysctl.c
diff -c openafs/src/afs/LINUX/osi_sysctl.c:1.7.2.4 openafs/src/afs/LINUX/osi_sysctl.c:1.7.2.5
*** openafs/src/afs/LINUX/osi_sysctl.c:1.7.2.4	Thu Feb 22 16:49:01 2007
--- openafs/src/afs/LINUX/osi_sysctl.c	Tue Jun 12 14:28:49 2007
***************
*** 1,7 ****
  /*
   * osi_sysctl.c: Linux sysctl interface to OpenAFS
   *
!  * $Id: osi_sysctl.c,v 1.7.2.4 2007/02/22 21:49:01 shadow Exp $
   *
   * Written Jan 30, 2002 by Kris Van Hees (Sine Nomine Associates)
   */
--- 1,7 ----
  /*
   * osi_sysctl.c: Linux sysctl interface to OpenAFS
   *
!  * $Id: osi_sysctl.c,v 1.7.2.5 2007/06/12 18:28:49 shadow Exp $
   *
   * Written Jan 30, 2002 by Kris Van Hees (Sine Nomine Associates)
   */
***************
*** 27,61 ****
  static struct ctl_table_header *afs_sysctl = NULL;
  
  static ctl_table afs_sysctl_table[] = {
!     {1, "hm_retry_RO",
!      &hm_retry_RO, sizeof(afs_int32), 0644, NULL,
!      &proc_dointvec}
!     ,
!     {2, "hm_retry_RW",
!      &hm_retry_RW, sizeof(afs_int32), 0644, NULL,
!      &proc_dointvec}
!     ,
!     {3, "hm_retry_int",
!      &hm_retry_int, sizeof(afs_int32), 0644, NULL,
!      &proc_dointvec}
!     ,
!     {4, "GCPAGs",
!      &afs_gcpags, sizeof(afs_int32), 0644, NULL,
!      &proc_dointvec}
!     ,
!     {5, "rx_deadtime",
!      &afs_rx_deadtime, sizeof(afs_int32), 0644, NULL,
!      &proc_dointvec}
!     ,
!     {6, "bkVolPref",
!      &afs_bkvolpref, sizeof(afs_int32), 0644, NULL,
!      &proc_dointvec}
!     ,
      {0}
  };
  
  static ctl_table fs_sysctl_table[] = {
!     {1, "afs", NULL, 0, 0555, afs_sysctl_table},
      {0}
  };
  
--- 27,90 ----
  static struct ctl_table_header *afs_sysctl = NULL;
  
  static ctl_table afs_sysctl_table[] = {
!     {
! 	.ctl_name 	= 1, 
! 	.procname 	= "hm_retry_RO",
! 	.data 		= &hm_retry_RO, 
! 	.maxlen		= sizeof(afs_int32), 
! 	.mode     	= 0644,
! 	.proc_handler	= &proc_dointvec
!     },
!     {
!         .ctl_name 	= 2, 
!         .procname 	= "hm_retry_RW",
!         .data		= &hm_retry_RW,
! 	.maxlen		= sizeof(afs_int32), 
! 	.mode		= 0644,
!      	.proc_handler	= &proc_dointvec
!     },
!     {
! 	.ctl_name	= 3, 
! 	.procname	= "hm_retry_int",
! 	.data		= &hm_retry_int, 
! 	.maxlen		= sizeof(afs_int32), 
! 	.mode		= 0644,
! 	.proc_handler	= &proc_dointvec
!     },
!     {
! 	.ctl_name	= 4, 
! 	.procname	= "GCPAGs",
! 	.data		= &afs_gcpags, 
! 	.maxlen		= sizeof(afs_int32), 
! 	.mode		= 0644,
! 	.proc_handler 	= &proc_dointvec
!     },
!     {
! 	.ctl_name	= 5, 
! 	.procname	= "rx_deadtime",
! 	.data		= &afs_rx_deadtime, 
! 	.maxlen		= sizeof(afs_int32), 
! 	.mode		= 0644,
! 	.proc_handler	= &proc_dointvec
!     },
!     {
! 	.ctl_name	= 6, 
! 	.procname	= "bkVolPref",
! 	.data		= &afs_bkvolpref, 
! 	.maxlen		= sizeof(afs_int32), 
! 	.mode		= 0644,
! 	.proc_handler	= &proc_dointvec
!     },
      {0}
  };
  
  static ctl_table fs_sysctl_table[] = {
!     {
! 	.ctl_name	= 1, 
! 	.procname	= "afs", 
! 	.mode		= 0555, 
! 	.child		= afs_sysctl_table
!     },
      {0}
  };
  
Index: openafs/src/afs/LINUX/osi_vfsops.c
diff -c openafs/src/afs/LINUX/osi_vfsops.c:1.29.2.23 openafs/src/afs/LINUX/osi_vfsops.c:1.29.2.25
*** openafs/src/afs/LINUX/osi_vfsops.c:1.29.2.23	Thu Feb  8 20:25:48 2007
--- openafs/src/afs/LINUX/osi_vfsops.c	Tue Jun 12 01:47:47 2007
***************
*** 16,22 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_vfsops.c,v 1.29.2.23 2007/02/09 01:25:48 shadow Exp $");
  
  #define __NO_VERSION__		/* don't define kernel_version in module.h */
  #include <linux/module.h> /* early to avoid printf->printk mapping */
--- 16,22 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_vfsops.c,v 1.29.2.25 2007/06/12 05:47:47 rra Exp $");
  
  #define __NO_VERSION__		/* don't define kernel_version in module.h */
  #include <linux/module.h> /* early to avoid printf->printk mapping */
***************
*** 292,299 ****
--- 292,301 ----
  {
      struct vcache *vcp = (struct vcache *) foo;
  
+ #if defined(SLAB_CTOR_VERIFY)
      if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
  	SLAB_CTOR_CONSTRUCTOR)
+ #endif
  	inode_init_once(AFSTOV(vcp));
  }
  
***************
*** 316,322 ****
  void
  afs_destroy_inodecache(void)
  {
!     (void) kmem_cache_destroy(afs_inode_cachep);
  }
  #else
  int
--- 318,325 ----
  void
  afs_destroy_inodecache(void)
  {
!     if (afs_inode_cachep)
! 	(void) kmem_cache_destroy(afs_inode_cachep);
  }
  #else
  int
Index: openafs/src/afs/LINUX/osi_vnodeops.c
diff -c openafs/src/afs/LINUX/osi_vnodeops.c:1.81.2.51 openafs/src/afs/LINUX/osi_vnodeops.c:1.81.2.56
*** openafs/src/afs/LINUX/osi_vnodeops.c:1.81.2.51	Tue Feb 20 13:06:24 2007
--- openafs/src/afs/LINUX/osi_vnodeops.c	Tue Jun 12 14:35:48 2007
***************
*** 22,28 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.81.2.51 2007/02/20 18:06:24 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
--- 22,28 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.81.2.56 2007/06/12 18:35:48 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
***************
*** 473,483 ****
  #ifdef AFS_LINUX24_ENV
      if ((code == 0 || flp->fl_type == F_UNLCK) && 
          (cmd == F_SETLK || cmd == F_SETLKW)) {
! #ifdef AFS_LINUX26_ENV
  	flp->fl_flags &=~ FL_SLEEP;
  	code = posix_lock_file(fp, flp);
- #else
- 	code = posix_lock_file(fp, flp, 0);
  #endif 
  	if (code && flp->fl_type != F_UNLCK) {
  	    struct AFS_FLOCK flock2;
--- 473,483 ----
  #ifdef AFS_LINUX24_ENV
      if ((code == 0 || flp->fl_type == F_UNLCK) && 
          (cmd == F_SETLK || cmd == F_SETLKW)) {
! #ifdef POSIX_LOCK_FILE_WAIT_ARG
! 	code = posix_lock_file(fp, flp, 0);
! #else
  	flp->fl_flags &=~ FL_SLEEP;
  	code = posix_lock_file(fp, flp);
  #endif 
  	if (code && flp->fl_type != F_UNLCK) {
  	    struct AFS_FLOCK flock2;
***************
*** 557,563 ****
--- 557,567 ----
   * afs_StoreAllSegments() with AFS_LASTSTORE
   */
  static int
+ #if defined(FOP_FLUSH_TAKES_FL_OWNER_T)
+ afs_linux_flush(struct file *fp, fl_owner_t id)
+ #else
  afs_linux_flush(struct file *fp)
+ #endif
  {
      struct vrequest treq;
      struct vcache *vcp = VTOAFS(FILE_INODE(fp));
***************
*** 1091,1096 ****
--- 1095,1102 ----
              }
              tvc->uncred = credp;
  	    tvc->states |= CUnlinked;
+ 	} else {
+ 	    osi_FreeSmallSpace(__name);	
  	}
  	AFS_GUNLOCK();
  
***************
*** 1279,1285 ****
  	return -code;
  }
  
! #if !defined(AFS_LINUX24_ENV)
  /* afs_linux_readlink 
   * Fill target (which is in user space) with contents of symlink.
   */
--- 1285,1291 ----
  	return -code;
  }
  
! #if !defined(USABLE_KERNEL_PAGE_SYMLINK_CACHE)
  /* afs_linux_readlink 
   * Fill target (which is in user space) with contents of symlink.
   */
***************
*** 1299,1304 ****
--- 1305,1340 ----
  /* afs_linux_follow_link
   * a file system dependent link following routine.
   */
+ #if defined(AFS_LINUX24_ENV)
+ static int afs_linux_follow_link(struct dentry *dentry, struct nameidata *nd)
+ {
+     int code;
+     char *name;
+ 
+     name = osi_Alloc(PATH_MAX);
+     if (!name) {
+ 	return -EIO;
+     }
+ 
+     AFS_GLOCK();
+     code = afs_linux_ireadlink(dentry->d_inode, name, PATH_MAX - 1, AFS_UIOSYS);
+     AFS_GUNLOCK();
+ 
+     if (code < 0) {
+ 	goto out;
+     }
+ 
+     name[code] = '\0';
+     code = vfs_follow_link(nd, name);
+ 
+ out:
+     osi_Free(name, PATH_MAX);
+ 
+     return code;
+ }
+ 
+ #else /* !defined(AFS_LINUX24_ENV) */
+ 
  static struct dentry *
  afs_linux_follow_link(struct dentry *dp, struct dentry *basep,
  		      unsigned int follow)
***************
*** 1332,1338 ****
      AFS_GUNLOCK();
      return res;
  }
! #endif
  
  /* afs_linux_readpage
   * all reads come through here. A strategy-like read call.
--- 1368,1375 ----
      AFS_GUNLOCK();
      return res;
  }
! #endif /* AFS_LINUX24_ENV */
! #endif /* USABLE_KERNEL_PAGE_SYMLINK_CACHE */
  
  /* afs_linux_readpage
   * all reads come through here. A strategy-like read call.
***************
*** 1697,1703 ****
  /* We really need a separate symlink set of ops, since do_follow_link()
   * determines if it _is_ a link by checking if the follow_link op is set.
   */
! #if defined(AFS_LINUX24_ENV)
  static int
  afs_symlink_filler(struct file *file, struct page *page)
  {
--- 1734,1740 ----
  /* We really need a separate symlink set of ops, since do_follow_link()
   * determines if it _is_ a link by checking if the follow_link op is set.
   */
! #if defined(USABLE_KERNEL_PAGE_SYMLINK_CACHE)
  static int
  afs_symlink_filler(struct file *file, struct page *page)
  {
***************
*** 1732,1741 ****
  static struct address_space_operations afs_symlink_aops = {
    .readpage =	afs_symlink_filler
  };
! #endif
  
  static struct inode_operations afs_symlink_iops = {
! #if defined(AFS_LINUX24_ENV)
    .readlink = 		page_readlink,
  #if defined(HAVE_KERNEL_PAGE_FOLLOW_LINK)
    .follow_link =	page_follow_link,
--- 1769,1778 ----
  static struct address_space_operations afs_symlink_aops = {
    .readpage =	afs_symlink_filler
  };
! #endif	/* USABLE_KERNEL_PAGE_SYMLINK_CACHE */
  
  static struct inode_operations afs_symlink_iops = {
! #if defined(USABLE_KERNEL_PAGE_SYMLINK_CACHE)
    .readlink = 		page_readlink,
  #if defined(HAVE_KERNEL_PAGE_FOLLOW_LINK)
    .follow_link =	page_follow_link,
***************
*** 1743,1755 ****
    .follow_link =	page_follow_link_light,
    .put_link =           page_put_link,
  #endif
!   .setattr =		afs_notify_change,
! #else
    .readlink = 		afs_linux_readlink,
    .follow_link =	afs_linux_follow_link,
    .permission =		afs_linux_permission,
    .revalidate =		afs_linux_revalidate,
  #endif
  };
  
  void
--- 1780,1796 ----
    .follow_link =	page_follow_link_light,
    .put_link =           page_put_link,
  #endif
! #else /* !defined(USABLE_KERNEL_PAGE_SYMLINK_CACHE) */
    .readlink = 		afs_linux_readlink,
    .follow_link =	afs_linux_follow_link,
+ #if !defined(AFS_LINUX24_ENV)
    .permission =		afs_linux_permission,
    .revalidate =		afs_linux_revalidate,
  #endif
+ #endif /* USABLE_KERNEL_PAGE_SYMLINK_CACHE */
+ #if defined(AFS_LINUX24_ENV)
+   .setattr =		afs_notify_change,
+ #endif
  };
  
  void
***************
*** 1775,1781 ****
  
      } else if (S_ISLNK(ip->i_mode)) {
  	ip->i_op = &afs_symlink_iops;
! #if defined(AFS_LINUX24_ENV)
  	ip->i_data.a_ops = &afs_symlink_aops;
  	ip->i_mapping = &ip->i_data;
  #endif
--- 1816,1822 ----
  
      } else if (S_ISLNK(ip->i_mode)) {
  	ip->i_op = &afs_symlink_iops;
! #if defined(USABLE_KERNEL_PAGE_SYMLINK_CACHE)
  	ip->i_data.a_ops = &afs_symlink_aops;
  	ip->i_mapping = &ip->i_data;
  #endif
Index: openafs/src/afs/SOLARIS/osi_machdep.h
diff -c openafs/src/afs/SOLARIS/osi_machdep.h:1.7.2.4 openafs/src/afs/SOLARIS/osi_machdep.h:1.7.2.6
*** openafs/src/afs/SOLARIS/osi_machdep.h:1.7.2.4	Tue Jan  2 02:36:10 2007
--- openafs/src/afs/SOLARIS/osi_machdep.h	Fri Oct  5 18:23:49 2007
***************
*** 104,107 ****
--- 104,126 ----
  #define AfsLargeFileSize(pos, off) ( ((offset_t)(pos)+(offset_t)(off) > (offset_t)0x7fffffff)?1:0)
  #endif
  
+ #if defined(AFS_SUN510_ENV)
+ #include "h/sunddi.h"
+ extern ddi_taskq_t *afs_taskq;
+ extern krwlock_t afsifinfo_lock;
+ 
+ /* this should be in rx/SOLARIS/rx_knet.c accessed via accessor functions,
+    eventually */
+ #include "net/if.h"
+ /* Global interface info struct */
+ struct afs_ifinfo {
+   char        ifname[LIFNAMSIZ];
+   ipaddr_t    ipaddr;
+   ipaddr_t    netmask;
+   uint_t      mtu;
+   uint64_t    flags;
+   int         metric;
+   ipaddr_t    dstaddr;
+ };
+ #endif
  #endif /* _OSI_MACHDEP_H_ */
Index: openafs/src/afsd/CellServDB
diff -c /dev/null openafs/src/afsd/CellServDB:1.1.4.2
*** /dev/null	Thu Oct 11 16:05:05 2007
--- openafs/src/afsd/CellServDB	Wed Sep  5 17:54:41 2007
***************
*** 0 ****
--- 1,589 ----
+ >grand.central.org      #GCO Public CellServDB 05 Jul 2007
+ 18.92.0.108                     #grand-opening.mit.edu
+ 128.2.203.61                    #penn.central.org
+ 130.237.48.87                   #andrew.e.kth.se
+ >wu-wien.ac.at          #University of Economics, Vienna, Austria
+ 137.208.3.33                    #goya.wu-wien.ac.at
+ 137.208.7.57                    #caravaggio.wu-wien.ac.at
+ 137.208.127.57                  #vermeer.wu-wien.ac.at
+ >hephy.at               #hephy-vienna
+ 193.170.243.10                  #mowgli.oeaw.ac.at
+ 193.170.243.12                  #baloo.oeaw.ac.at
+ 193.170.243.14                  #akela.oeaw.ac.at
+ >cgv.tugraz.at          #CGV cell
+ 129.27.224.133                  #phobos.cgv.tugraz.at
+ 129.27.224.134                  #deimos.cgv.tugraz.at
+ 129.27.224.210                  #trinculo.cgv.tugraz.at
+ >itp.tugraz.at          #Institute of Theoretical and Computational Physics, TU Graz, Aus
+ 129.27.161.7                    #faepafs1.tu-graz.ac.at
+ 129.27.161.15                   #faepafs2.tu-graz.ac.at
+ 129.27.161.114                  #faepafs3.tu-graz.ac.at
+ >sums.math.mcgill.ca    #Society of Undergraduate Mathematics Students of McGill Universi
+ 132.216.24.122                  #germain.sums.math.mcgill.ca
+ 132.216.24.125                  #turing.sums.math.mcgill.ca
+ >cern.ch                #European Laboratory for Particle Physics, Geneva
+ 137.138.128.148                 #afsdb1.cern.ch
+ 137.138.246.50                  #afsdb3.cern.ch
+ 137.138.246.51                  #afsdb2.cern.ch
+ >ams.cern.ch            #AMS Experiment
+ 137.138.188.185                 #ams.cern.ch
+ 137.138.199.58                  #pcamsf4.cern.ch
+ >epfl.ch                #Swiss Federal Institute of Technology at Lausanne
+ 128.178.109.111                 #kd1.epfl.ch
+ 128.178.109.112                 #kd2.epfl.ch
+ 128.178.109.113                 #kd3.epfl.ch
+ >ethz.ch                #Swiss Federal Inst. of Tech. - Zurich, Switzerland
+ 129.132.97.19                   #amalthea.ethz.ch
+ 129.132.97.27                   #nethzafs-001.ethz.ch
+ 129.132.115.3                   #himalia.ethz.ch
+ 129.132.115.37                  #nethzafs-005.ethz.ch
+ 129.132.115.38                  #nethzafs-006.ethz.ch
+ >psi.ch                 #Paul Scherrer Institut - Villigen, Switzerland
+ 129.129.190.140                 #afs00.psi.ch
+ 129.129.190.141                 #afs01.psi.ch
+ 129.129.190.142                 #afs02.psi.ch
+ >extundo.com            #Simon Josefsson's cell
+ 195.42.214.241                  #slipsten.extundo.com
+ >membrain.com           #membrain.com
+ 66.93.118.125                   #stormy
+ 130.85.24.11                    #weasel
+ 130.85.24.13                    #straykitten
+ >midnightlinux.com      #Midnight Linux, Pittsburgh PA
+ 208.10.142.82                   #outpost.midnightlinux.com
+ >setfilepointer.com     #SetFilePointer.com
+ 63.224.10.2                     #hamlet.SetFilePointer.com
+ 63.224.10.4                     #troilus.SetFilePointer.com
+ >sodre.cx               #Sodre.cx
+ 128.8.140.165                   #greed.sodre.cx
+ >desy.de                #Deutsches Elektronen-Synchrotron
+ 131.169.40.62                   #vayu.desy.de
+ 131.169.244.60                  #solar00.desy.de
+ >gppc.de                #GPP Chemnitz mbH
+ 213.187.92.33                   #gpp1.gppc.de
+ 213.187.92.34                   #paulchen.gppc.de
+ 213.187.92.35                   #lotus.gppc.de
+ >ifh.de                 #DESY Zeuthen
+ 141.34.22.10                    #romulus.ifh.de
+ 141.34.22.11                    #remus.ifh.de
+ 141.34.22.29                    #hekate.ifh.de
+ >lrz-muenchen.de        #Leibniz Computing Centre, Germany
+ 129.187.10.36                   #afs1.lrz-muenchen.de
+ 129.187.10.56                   #afs3.lrz-muenchen.de
+ 129.187.10.57                   #afs2.lrz-muenchen.de
+ >ipp-garching.mpg.de    #Institut fuer Plasmaphysik
+ 130.183.9.5                     #afs-db1.rzg.mpg.de
+ 130.183.100.10                  #afs-db2.aug.ipp-garching.mpg.de
+ 130.183.100.23                  #afs-db3.aug.ipp-garching.mpg.de
+ >mpe.mpg.de             #MPE cell
+ 130.183.130.7                   #irafs1.mpe-garching.mpg.de
+ 130.183.134.20                  #irafs2.mpe-garching.mpg.de
+ >i1.informatik.rwth-aachen.de #Informatik I, RWTH Aachen
+ 137.226.244.79                  #remus.informatik.rwth-aachen.de
+ >tu-bs.de               #Technical University of Braunschweig, Germany
+ 134.169.1.1                     #rzafs1.rz.tu-bs.de
+ 134.169.1.5                     #rzafs2.rz.tu-bs.de
+ 134.169.1.6                     #rzafs3.rz.tu-bs.de
+ >tu-chemnitz.de         #Technische Universitaet Chemnitz, Germany
+ 134.109.2.1                     #zuse.hrz.tu-chemnitz.de
+ 134.109.2.15                    #phoenix.hrz.tu-chemnitz.de
+ 134.109.200.7                   #aetius.hrz.tu-chemnitz.de
+ >e18.ph.tum.de          #Experimental Physics, TU Munich, Germany
+ 129.187.154.223                 #hamlet.e18.physik.tu-muenchen.de
+ >uni-bonn.de            #University of Bonn, Computing Center
+ 131.220.14.198                  #work15-eth.rhrz.uni-bonn.de
+ 131.220.14.205                  #node05.rhrz.uni-bonn.de
+ 131.220.15.197                  #afs-db1.rhrz.uni-bonn.de
+ >atlass01.physik.uni-bonn.de #Bonn ATLAS
+ 131.220.165.43                  #atlass01.physik.uni-bonn.de
+ >uni-freiburg.de        #Albert-Ludwigs-Universitat Freiburg
+ 132.230.6.235                   #sv6.ruf.uni-freiburg.de
+ 132.230.6.236                   #sv7.ruf.uni-freiburg.de
+ 132.230.6.237                   #sv8.ruf.uni-freiburg.de
+ >physik.uni-freiburg.de #institute of physics, university Freiburg, Germany
+ 132.230.77.16                   #hepafs.physik.uni-freiburg.de
+ >urz.uni-heidelberg.de  #Uni Heidelberg (Rechenzentrum)
+ 129.206.119.10                  #afsdb.urz.uni-heidelberg.de
+ 129.206.119.16                  #afsdb1.urz.uni-heidelberg.de
+ 129.206.119.17                  #afsdb2.urz.uni-heidelberg.de
+ >uni-hohenheim.de       #University of Hohenheim
+ 144.41.2.2                      #rs13.serv.uni-hohenheim.de
+ 144.41.2.3                      #rs14.serv.uni-hohenheim.de
+ 144.41.2.4                      #rs15.serv.uni-hohenheim.de
+ >rz.uni-jena.de         #Rechenzentrum University of Jena, Germany
+ 141.35.2.180                    #afs00.rz.uni-jena.de
+ 141.35.2.181                    #afs01.rz.uni-jena.de
+ 141.35.2.182                    #afs02.rz.uni-jena.de
+ >impetus.uni-koeln.de   #Univ. of Cologne - Geophysics/Meteorology Inst.
+ 134.95.80.39                    #forano.meteo.uni-koeln.de
+ >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
+ 134.95.144.22                   #afs1.meteo.uni-koeln.de
+ 134.95.144.24                   #afs2.meteo.uni-koeln.de
+ >rrz.uni-koeln.de       #University of Cologne - Reg Comp Center
+ 134.95.19.3                     #afsdb1.rrz.uni-koeln.de
+ 134.95.19.10                    #lyra.rrz.uni-koeln.de
+ 134.95.67.97                    #afs.thp.uni-koeln.de
+ 134.95.141.243                  #agrippina.rrz.uni-koeln.de
+ >physik.uni-mainz.de    #institute of physics, university Mainz, Germany
+ 134.93.130.93                   #hardy.physik.uni-mainz.de
+ >uni-mannheim.de        #Uni Mannheim (Rechenzentrum)
+ 134.155.97.204                  #afsdb1.uni-mannheim.de
+ 134.155.97.205                  #afsdb2.uni-mannheim.de
+ 134.155.97.206                  #afsdb3.uni-mannheim.de
+ >uni-paderborn.de       #University of Paderborn, Germany
+ 131.234.137.10                  #afsdb1.uni-paderborn.de
+ 131.234.137.11                  #afsdb2.uni-paderborn.de
+ 131.234.137.12                  #afsdb3.uni-paderborn.de
+ >physik.uni-wuppertal.de #Physics department of Bergische Universität Wuppertal
+ 132.195.104.3                   #afs1.physik.uni-wuppertal.de
+ 132.195.104.230                 #afs2.physik.uni-wuppertal.de
+ >s-et.aau.dk            #Aalborg Univ., The Student Society, Denmark
+ 130.225.196.22                  #afs.s-et.aau.dk
+ >ies.auc.dk             #Aalborg Univ., Inst. of Electronic Systems, Denmark
+ 130.225.51.73                   #afsdb1.kom.auc.dk
+ 130.225.51.74                   #afsdb2.kom.auc.dk
+ 130.225.51.85                   #afsdb3.kom.auc.dk
+ >asu.edu                #Arizona State University
+ 129.219.10.69                   #authen2.asu.edu
+ 129.219.10.70                   #authen1.asu.edu
+ 129.219.10.72                   #authen3.asu.edu
+ 129.219.100.16                  #authen4.asu.edu
+ >hep.caltech.edu        #CalTech High Energy Physics
+ 131.215.126.150                 #afs.hep.caltech.edu
+ >clarkson.edu           #Clarkson University, Potsdam, New York USA
+ 128.153.1.111                   #arthur.clarkson.edu
+ 128.153.9.111                   #lancelot.clarkson.edu
+ 128.153.17.111                  #uther.clarkson.edu
+ >andrew.cmu.edu         #Carnegie Mellon University - Computing Services Cell
+ 128.2.10.2                      #vice2.fs.andrew.cmu.edu
+ 128.2.10.7                      #vice7.fs.andrew.cmu.edu
+ 128.2.10.11                     #vice11.fs.andrew.cmu.edu
+ 128.2.10.28                     #vice28.fs.andrew.cmu.edu
+ 128.2.32.44                     #new-vice12.fs.andrew.cmu.edu
+ >club.cc.cmu.edu        #Carnegie Mellon University Computer Club
+ 128.237.157.11                  #sodium.club.cc.cmu.edu
+ 128.237.157.13                  #potassium.club.cc.cmu.edu
+ >chem.cmu.edu           #Carnegie Mellon University - Chemistry Dept.
+ 128.2.40.134                    #afs.chem.cmu.edu
+ 128.2.40.140                    #afs2.chem.cmu.edu
+ >cs.cmu.edu             #Carnegie Mellon University - School of Comp. Sci.
+ 128.2.201.46                    #strawberry.srv.cs.cmu.edu
+ 128.2.201.47                    #pumpkin.srv.cs.cmu.edu
+ 128.2.201.48                    #cherry.srv.cs.cmu.edu
+ >ece.cmu.edu            #Carnegie Mellon University - Elec. Comp. Eng. Dept.
+ 128.2.129.7                     #porok.ece.cmu.edu
+ 128.2.129.8                     #vicio.ece.cmu.edu
+ 128.2.129.9                     #e-xing.ece.cmu.edu
+ >scotch.ece.cmu.edu     #CMU ECE CALCM research group
+ 128.2.134.82                    #lagavulin.ece.cmu.edu
+ >qatar.cmu.edu          #Carnegie Mellon University - Qatar
+ 86.36.46.6                      #afs1.qatar.cmu.edu
+ 86.36.46.7                      #afs2.qatar.cmu.edu
+ >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
+ 128.2.179.12                    #nihao.sbp.ri.cmu.edu
+ 128.2.179.113                   #youtheman.sbp.ri.cmu.edu
+ >cnf.cornell.edu        #CNF
+ 128.253.198.9                   #hole.cnf.cornell.edu
+ 128.253.198.27                  #smoke.cnf.cornell.edu
+ >msc.cornell.edu        #Cornell University Materials Science Center
+ 128.84.231.242                  #miranda.ccmr.cornell.edu
+ 128.84.241.35                   #co.ccmr.cornell.edu
+ 128.84.249.78                   #dax.ccmr.cornell.edu
+ >dbic.dartmouth.edu     #Dartmouth Brain Imaging Center
+ 129.170.30.143                  #dbicafs1.dartmouth.edu
+ 129.170.30.144                  #dbicafs2.dartmouth.edu
+ 129.170.30.145                  #dbicafs3.dartmouth.edu
+ >northstar.dartmouth.edu #Dartmouth College Research Computing
+ 129.170.16.22                   #halley.dartmouth.edu
+ 129.170.16.42                   #oort.dartmouth.edu
+ 129.170.16.43                   #cygnusx1.dartmouth.edu
+ >cs.fhm.edu             #Department Computer Science Munich University Of Applied Science
+ 129.187.208.2                   #srv1.informatik.fh-muenchen.de
+ >eecs.harvard.edu       #Harvard - EECS
+ 140.247.60.61                   #zermelo.eecs.harvard.edu
+ 140.247.60.83                   #corfu.eecs.harvard.edu
+ >iastate.edu            #Iowa State University
+ 129.186.1.243                   #afsdb-1.iastate.edu
+ 129.186.6.243                   #afsdb-2.iastate.edu
+ 129.186.142.243                 #afsdb-3.iastate.edu
+ >athena.mit.edu         #MIT/Athena cell
+ 18.7.1.66                       #paris.mit.edu.
+ 18.7.1.74                       #chimera.mit.edu.
+ 18.158.0.37                     #prill.mit.edu.
+ >dev.mit.edu            #MIT/IS Development cell
+ 18.7.1.70                       #wham.mit.edu.
+ 18.92.1.219                     #click.mit.edu.
+ 18.92.1.220                     #whirr.mit.edu.
+ >net.mit.edu            #MIT/Network Group cell
+ 18.7.7.73                       #gracie.mit.edu
+ 18.7.21.95                      #george.mit.edu
+ >sipb.mit.edu           #MIT/SIPB cell
+ 18.181.0.19                     #reynelda.mit.edu.
+ 18.181.0.22                     #rosebud.mit.edu.
+ 18.181.0.23                     #ronald-ann.mit.edu.
+ >soap.mit.edu           #MIT School Of Architecture & Planning
+ 18.89.1.204                     #crypt.mit.edu
+ 18.89.1.209                     #grotto.mit.edu
+ 18.89.2.156                     #ac.mit.edu
+ >msu.edu                #Michigan State University Main Cell
+ 35.9.7.10                       #afsdb0.cl.msu.edu
+ >nd.edu                 #University of Notre Dame
+ 129.74.223.17                   #john.helios.nd.edu
+ 129.74.223.33                   #lizardo.helios.nd.edu
+ 129.74.223.65                   #buckaroo.helios.nd.edu
+ >pitt.edu               #University of Pittsburgh
+ 136.142.8.15                    #afs09.srv.cis.pitt.edu
+ 136.142.8.20                    #afs10.srv.cis.pitt.edu
+ 136.142.8.21                    #afs11.srv.cis.pitt.edu
+ >cs.pitt.edu            #University of Pittsburgh - Computer Science
+ 130.49.220.11                   #afs01.cs.pitt.edu
+ 130.49.220.12                   #afs02.cs.pitt.edu
+ 130.49.220.13                   #afs03.cs.pitt.edu
+ >psc.edu                #PSC (Pittsburgh Supercomputing Center)
+ 128.182.59.182                  #shaggy.psc.edu
+ 128.182.66.184                  #velma.psc.edu
+ 128.182.66.185                  #daphne.psc.edu
+ >scoobydoo.psc.edu      #PSC Test Cell
+ 128.182.59.181                  #scooby.psc.edu
+ >cede.psu.edu           #Penn State - Center for Engr. Design & Entrepeneurship
+ 146.186.218.10                  #greenly.cede.psu.edu
+ 146.186.218.60                  #b50.cede.psu.edu
+ 146.186.218.246                 #stalin.cede.psu.edu
+ >rose-hulman.edu        #Rose-Hulman Institute of Technology
+ 137.112.7.11                    #afs1.rose-hulman.edu
+ 137.112.7.12                    #afs2.rose-hulman.edu
+ 137.112.7.13                    #afs3.rose-hulman.edu
+ >cs.rose-hulman.edu     #Rose-Hulman CS Department
+ 137.112.40.10                   #galaxy.cs.rose-hulman.edu
+ >rpi.edu                #Rensselaer Polytechnic Institute
+ 128.113.22.11                   #saul.server.rpi.edu
+ 128.113.22.12                   #joab.server.rpi.edu
+ 128.113.22.13                   #korah.server.rpi.edu
+ 128.113.22.14                   #achan.server.rpi.edu
+ >hep.sc.edu             #University of South Carolina, Dept. of Physics
+ 129.252.78.77                   #cpeven.physics.sc.edu
+ >cs.stanford.edu        #Stanford University Computer Science Department
+ 171.64.64.10                    #cs-afs-1.Stanford.EDU
+ 171.64.64.66                    #cs-afs-2.stanford.edu
+ 171.64.64.69                    #cs-afs-3.stanford.edu
+ >ir.stanford.edu        #Stanford University
+ 171.64.7.222                    #afsdb1.stanford.edu
+ 171.64.7.234                    #afsdb2.stanford.edu
+ 171.64.7.246                    #afsdb3.stanford.edu
+ >slac.stanford.edu      #Stanford Linear Accelerator Center
+ 134.79.18.25                    #afsdb1.slac.stanford.edu
+ 134.79.18.26                    #afsdb2.slac.stanford.edu
+ 134.79.18.27                    #afsdb3.slac.stanford.edu
+ >ucdavis.edu            #University of California at Davis
+ 169.237.104.100                 #afs1.ucdavis.edu
+ 169.237.235.176                 #afs2.ucdavis.edu
+ 169.237.247.91                  #afs3.ucdavis.edu
+ >home.ucdavis.edu       #University of California at Davis home directories
+ 169.237.105.91                  #home1.ucdavis.edu
+ 169.237.105.92                  #home2.ucdavis.edu
+ 169.237.105.93                  #home3.ucdavis.edu
+ >physics.ucsb.edu       #UC Santa Barbara, Physics Dept
+ 128.111.18.161                  #ledzeppelin.physics.ucsb.edu
+ >cats.ucsc.edu          #UC Santa Cruz, Comp and Tech Services, California U.S.A
+ 128.114.123.14                  #elan.ucsc.edu
+ 128.114.123.15                  #ichabod.ucsc.edu
+ 128.114.123.18                  #maneki.ucsc.edu
+ >acm.uiuc.edu           #ACM at the University of Illinois
+ 128.174.251.8                   #alnitak.acm.uiuc.edu
+ 128.174.251.9                   #alnilam.acm.uiuc.edu
+ 128.174.251.10                  #mintaka.acm.uiuc.edu
+ >illigal.uiuc.edu       #Illinois Genetic Algorithms Labaratory
+ 128.174.193.200                 #ial.illigal.uiuc.edu
+ 128.174.193.201                 #cac.illigal.uiuc.edu
+ 128.174.193.202                 #gcs.illigal.uiuc.edu
+ >ncsa.uiuc.edu          #University of Illinois
+ 141.142.3.5                     #congo.ncsa.uiuc.edu
+ 141.142.3.8                     #nile.ncsa.uiuc.edu
+ 141.142.3.9                     #kaskaskia.ncsa.uiuc.edu
+ >umbc.edu               #University of Maryland, Baltimore County
+ 130.85.24.23                    #db2.afs.umbc.edu
+ 130.85.24.87                    #db3.afs.umbc.edu
+ 130.85.24.101                   #db1.afs.umbc.edu
+ >glue.umd.edu           #University of Maryland - Project Glue
+ 128.8.70.11                     #olmec.umd.edu
+ 128.8.236.4                     #egypt.umd.edu
+ 128.8.236.230                   #babylon.umd.edu
+ >wam.umd.edu            #University of Maryland Network WAM Project
+ 128.8.70.9                      #csc-srv.wam.umd.edu
+ 128.8.236.5                     #avw-srv.wam.umd.edu
+ 128.8.236.231                   #ptx-srv.wam.umd.edu
+ >umich.edu              #University of Michigan - Campus
+ 141.211.1.32                    #fear.ifs.umich.edu
+ 141.211.1.33                    #surprise.ifs.umich.edu
+ 141.211.1.34                    #ruthless.ifs.umich.edu
+ >atlas.umich.edu        #ATLAS group cell in physics at University of Michigan
+ 141.211.43.102                  #linat02.grid.umich.edu
+ 141.211.43.103                  #linat03.grid.umich.edu
+ 141.211.43.104                  #linat04.grid.umich.edu
+ >citi.umich.edu         #Center for Information Technology Integration
+ 141.211.133.5                   #babylon.citi.umich.edu
+ >lsa.umich.edu          #University of Michigan - College of LS&A
+ 141.211.211.53                  #gerow.lsa.umich.edu
+ 141.211.211.72                  #collines.lsa.umich.edu
+ 141.211.211.153                 #hodges.lsa.umich.edu
+ >sph.umich.edu          #University of Michigan -- School of Public  Health
+ 141.211.51.137                  #afssph7.sph.umich.edu
+ 141.211.51.139                  #afssph0.sph.umich.edu
+ 141.211.51.142                  #afssph6.sph.umich.edu
+ >isis.unc.edu           #Univ. of NC at Chapel Hill - ITS
+ 152.2.1.5                       #db0.isis.unc.edu
+ 152.2.1.6                       #db1.isis.unc.edu
+ 152.2.1.7                       #db2.isis.unc.edu
+ >physics.unc.edu        #Univ. of NC at Chapel Hill, Dept. of Physics
+ 152.2.4.1                       #who.physics.unc.edu
+ 152.2.4.3                       #what.physics.unc.edu
+ 152.2.4.5                       #when.physics.unc.edu
+ >uncc.edu               #University of NC at Charlotte Mosaic AFS Cell
+ 152.15.10.70                    #as-sm1.uncc.edu
+ 152.15.93.186                   #as-ece1.uncc.edu
+ 152.15.181.175                  #as-me1.uncc.edu
+ >eng.utah.edu           #University of Utah - Engineering
+ 155.98.111.9                    #lenny.eng.utah.edu
+ 155.98.111.10                   #carl.eng.utah.edu
+ >cs.uwm.edu             #University of Wisconsin--Milwaukee
+ 129.89.38.124                   #solomons.cs.uwm.edu
+ >cs.wisc.edu            #Univ. of Wisconsin-Madison, Computer Sciences Dept.
+ 128.105.132.14                  #timon.cs.wisc.edu
+ 128.105.132.15                  #pumbaa.cs.wisc.edu
+ 128.105.132.16                  #zazu.cs.wisc.edu
+ >engr.wisc.edu          #University of Wisconsin-Madison, College of Engineering
+ 144.92.13.14                    #larry.cae.wisc.edu
+ 144.92.13.15                    #curly.cae.wisc.edu
+ 144.92.13.16                    #moe.cae.wisc.edu
+ >hep.wisc.edu           #University of Wisconsin -- High Energy Physics
+ 128.104.28.219                  #anise.hep.wisc.edu
+ >physics.wisc.edu       #Univ. of Wisconsin-Madison, Physics Department
+ 128.104.160.13                  #kendra.physics.wisc.edu
+ 128.104.160.14                  #fray.physics.wisc.edu
+ 128.104.160.15                  #buffy.physics.wisc.edu
+ >ciemat.es              #Ciemat, Madrid, Spain
+ 130.206.11.42                   #afsdb1.ciemat.es
+ 130.206.11.217                  #afsdb2.ciemat.es
+ 130.206.11.247                  #afsdb3.ciemat.es
+ >ifca.unican.es         #Instituto de Fisica de Cantabria (IFCA), Santander, Spain
+ 193.144.209.20                  #gridwall.ifca.unican.es
+ >ific.uv.es             #Instituto de Fisica Corpuscular, Valencia, Spain
+ 147.156.163.11                  #alpha.ific.uv.es
+ >biocenter.helsinki.fi  #University of Helsinki, Institute of Biotechnology
+ 128.214.58.174                  #afsdb1.biocenter.helsinki.fi
+ 128.214.88.114                  #afsdb2.biocenter.helsinki.fi
+ >dapnia.saclay.cea.fr   #CEA DAPNIA
+ 132.166.32.7                    #dphrsg.saclay.cea.fr
+ 132.166.32.12                   #dphrsl.saclay.cea.fr
+ >grif.fr                #GRIF cell
+ 192.54.208.18                   #node03.datagrid.cea.fr
+ >in2p3.fr               #IN2P3 production cell
+ 134.158.232.11                  #ccafsdb1.in2p3.fr
+ 134.158.232.12                  #ccafsdb2.in2p3.fr
+ 134.158.232.13                  #ccafsdb3.in2p3.fr
+ >anl.gov                #Argonne National Laboratory
+ 146.137.96.33                   #arteus.ctd.anl.gov
+ 146.137.162.88                  #agamemnon.ctd.anl.gov
+ 146.137.194.80                  #antenor.ctd.anl.gov
+ >rhic.bnl.gov           #Relativistic Heavy Ion Collider
+ 130.199.6.51                    #rafs03.rcf.bnl.gov
+ 130.199.6.52                    #rafs02.rcf.bnl.gov
+ 130.199.6.69                    #rafs01.rcf.bnl.gov
+ >usatlas.bnl.gov        #US Atlas Tier 1 Facility at BNL
+ 130.199.48.32                   #aafs01.usatlas.bnl.gov
+ 130.199.48.33                   #aafs02.usatlas.bnl.gov
+ 130.199.48.34                   #aafs03.usatlas.bnl.gov
+ >fnal.gov               #Fermi National Acclerator Laboratory
+ 131.225.68.1                    #fsus01.fnal.gov
+ 131.225.68.4                    #fsus03.fnal.gov
+ 131.225.68.14                   #fsus04.fnal.gov
+ >ic-afs.arc.nasa.gov    #Code IC, Ames Research Center
+ 128.102.105.62                  #udanax.arc.nasa.gov
+ >jpl.nasa.gov           #Jet Propulsion Laboratory
+ 137.78.160.21                   #afsdb08.jpl.nasa.gov
+ 137.78.160.22                   #afsdb09.jpl.nasa.gov
+ 137.78.160.23                   #afsdb10.jpl.nasa.gov
+ >nersc.gov              #National Energy Research Supercomputer Center
+ 128.55.128.250                  #mars.nersc.gov
+ 128.55.128.252                  #alfred.nersc.gov
+ 128.55.128.254                  #lurch.nersc.gov
+ >bme.hu                 #Budapest University of Technology and Economics
+ 152.66.241.6                    #afs.iit.bme.hu
+ >kfki.hu                #Research Institute for Nuclear and Particle Physics - Budapest,H
+ 148.6.8.14                      #afs.kfki.hu
+ >caspur.it              #CASPUR Inter-University Computing Consortium, Rome
+ 193.204.5.45                    #pomodoro.caspur.it
+ 193.204.5.46                    #banana.caspur.it
+ 193.204.5.50                    #maslo.caspur.it
+ >enea.it                #ENEA New Tech. Energy & Environment Agency, Italy
+ 192.107.54.5                    #aixfs.frascati.enea.it
+ 192.107.54.11                   #rs2ced.frascati.enea.it
+ 192.107.54.12                   #43p.frascati.enea.it
+ 192.107.61.235                  #serverinfo02.bologna.enea.it
+ 192.107.71.6                    #glauco.casaccia.enea.it
+ 192.107.96.233                  #riscdb.trisaia.enea.it
+ >fusione.it             #Assoz. FUSIONE/Euratom, ENEA, Frascati-Italy
+ 192.107.90.2                    #fusafs1.frascati.enea.it
+ 192.107.90.3                    #fusafs2.frascati.enea.it
+ 192.107.90.4                    #fusafs3.frascati.enea.it
+ >icemb.it               #ICEMB, Universita' La Sapienza - Rome - Italy
+ 193.204.6.130                   #icembfs.caspur.it
+ >infn.it                #Istituto Nazionale di Fisica Nucleare (INFN), Italia
+ 131.154.1.7                     #afscnaf.infn.it
+ 141.108.26.75                   #afsrm1.roma1.infn.it
+ 192.84.134.75                   #afsna.na.infn.it
+ >ba.infn.it             #INFN, Sezione di Bari
+ 193.206.185.235                 #baafsserver.ba.infn.it
+ 193.206.185.236                 #debsrv.ba.infn.it
+ >kloe.infn.it           #INFN, KLOE experiment at Laboratori di Frascati
+ 192.135.25.111                  #kloeafs1.lnf.infn.it
+ 192.135.25.112                  #kloeafs2.lnf.infn.it
+ >le.infn.it             #INFN, Sezione di Lecce
+ 192.84.152.40                   #afs01.le.infn.it
+ 192.84.152.148                  #afs02.le.infn.it
+ >lnf.infn.it            #INFN, Laboratori Nazionali di Frascati
+ 193.206.84.121                  #afs1.lnf.infn.it
+ 193.206.84.122                  #afs2.lnf.infn.it
+ 193.206.84.123                  #afs3.lnf.infn.it
+ >lngs.infn.it           #INFN, Laboratori Nazionali di Gran Sasso
+ 192.84.135.21                   #rsgs05.lngs.infn.it
+ >pi.infn.it             #INFN, Sezione di Pisa
+ 131.114.134.26                  #unknownhost.pi.infn.it
+ 192.84.133.50                   #aix1.pi.infn.it
+ >psm.it                 #Progetto San Marco, Universita' di Roma-1
+ 151.100.1.65                    #atlante.psm.uniroma1.it
+ >tgrid.it               #CASPUR-CILEA-CINECA Grid Cell
+ 193.204.5.33                    #cccgrid.caspur.it
+ >ictp.trieste.it        #The Abdus Salam International Centre for Theoretical Physics (IC
+ 140.105.16.8                    #fs1.ictp.trieste.it
+ 140.105.16.9                    #fs2.ictp.trieste.it
+ >math.unifi.it          #math.unifi.it
+ 150.217.34.182                  #xeno.math.unifi.it
+ >ing.uniroma1.it        #Universita' La Sapienza, Fac. Ingeneria
+ 151.100.85.253                  #alfa.ing.uniroma1.it
+ >dia.uniroma3.it        #University Roma Tre - DIA
+ 193.204.161.79                  #plm.dia.uniroma3.it
+ 193.204.161.118                 #afs.dia.uniroma3.it
+ >vn.uniroma3.it         #University of Rome 3, Area Vasca Navale
+ 193.204.161.136                 #alfa.dia.uniroma3.it
+ 193.204.161.137                 #beta.dia.uniroma3.it
+ 193.204.161.138                 #gamma.dia.uniroma3.it
+ >italia                 #Italian public AFS cell
+ 193.204.5.9                     #afs.caspur.it
+ >cmf.nrl.navy.mil       #Naval Research Lab - CCS
+ 134.207.10.68                   #picard.cmf.nrl.navy.mil
+ 134.207.10.69                   #riker.cmf.nrl.navy.mil
+ 134.207.10.70                   #kirk.cmf.nrl.navy.mil
+ >lcp.nrl.navy.mil       #Naval Research Lab - Lab for Computational Physics
+ 132.250.114.2                   #afs1.lcp.nrl.navy.mil
+ 132.250.114.4                   #afs2.lcp.nrl.navy.mil
+ 132.250.114.6                   #afs3.lcp.nrl.navy.mil
+ >es.net                 #Energy Sciences Net
+ 198.128.3.21                    #fs1.es.net
+ 198.128.3.22                    #fs2.es.net
+ 198.128.3.23                    #fs3.es.net
+ >laroia.net             #Laroia Networks
+ 66.66.102.254                   #supercore.laroia.net
+ >sinenomine.net         #Sine Nomine Associates
+ 192.204.203.218                 #va.sinenomine.net
+ >slackers.net           #The Slackers' Network
+ 63.201.48.27                    #alexandria.slackers.net
+ >tproa.net              #The People's Republic of Ames
+ 72.13.4.23                      #service-3.tproa.net
+ 72.13.4.24                      #service-4.tproa.net
+ 72.13.4.25                      #service-5.tproa.net
+ >nikhef.nl              #The Dutch National Institute for High Energy Physics
+ 192.16.185.26                   #afs1.nikhef.nl
+ 192.16.185.27                   #afs2.nikhef.nl
+ >1ts.org                #1TS.ORG, Cambridge, MA
+ 69.25.196.51                    #pancake.1ts.org
+ >acm-csuf.org           #California State Univerisity Fullerton ACM
+ 137.151.29.193                  #afs1.acm-csuf.org
+ >bazquux.org            #Baz Quux Organization
+ 66.207.142.196                  #baxquux.org
+ >coed.org               #Adam Pennington's Cell
+ 66.93.61.184                    #vice1.coed.org
+ 128.237.157.35                  #vice3.coed.org
+ >dementia.org           #Dementia Unlimited
+ 128.2.12.45                     #alycia.dementia.org
+ 128.2.120.216                   #meredith.dementia.org
+ >hackish.org            #Hackish.org
+ 24.167.65.213                   #avatar.sys.hackish.org
+ 128.2.120.138                   #kurma.sys.hackish.org
+ >idahofuturetruck.org   #University of Idaho hybrid vehicle development
+ 12.18.238.210                   #dsle210.fsr.net
+ >nimlabs.org            #Nimlabs, Ink. Cell.
+ 18.238.1.103                    #olfin.nimlabs.org
+ 18.238.1.105                    #caerbanog.nimlabs.org
+ >nomh.org               #nomh.org
+ 204.29.154.12                   #iota.nomh.org
+ 204.29.154.32                   #adversity.xi.nomh.org
+ >oc7.org                #The OC7 Project
+ 128.2.122.140                   #knife.oc7.org
+ 207.22.77.170                   #spoon.oc7.org
+ >kth.se                 #Royal Institute of Technology, Stockholm, Sweden
+ 130.237.32.145                  #sonen.e.kth.se
+ 130.237.48.7                    #anden.e.kth.se
+ 130.237.48.244                  #fadern.e.kth.se
+ >hallf.kth.se           #Royal Institute of Technology, HALLF
+ 130.237.24.11                   #afs1.hallf.kth.se
+ 130.237.24.104                  #afs2.hallf.kth.se
+ >isk.kth.se             #Royal Institute of Technology, ISK
+ 130.237.202.3                   #afsdb1.isk.kth.se
+ 130.237.209.5                   #afsdb2.isk.kth.se
+ 130.237.209.9                   #afsdb3.isk.kth.se
+ >it.kth.se              #Royal Institute of Technology, IT
+ 130.237.212.15                  #ptah.it.kth.se
+ 130.237.212.16                  #toth.it.kth.se
+ 130.237.215.7                   #isis.it.kth.se
+ >md.kth.se              #Royal Institute of Technology, MMK
+ 130.237.57.68                   #trinity.md.kth.se
+ 130.237.57.72                   #morpheus.md.kth.se
+ 130.237.67.230                  #neo.speech.kth.se
+ >mech.kth.se            #Royal Institute of Technology, MECH
+ 130.237.233.142                 #matterhorn.mech.kth.se
+ 130.237.233.143                 #castor.mech.kth.se
+ 130.237.233.144                 #pollux.mech.kth.se
+ >nada.kth.se            #Royal Institute of Technology, NADA
+ 130.237.222.20                  #kosmos.nada.kth.se
+ 130.237.223.12                  #sputnik.nada.kth.se
+ 130.237.224.78                  #mir.nada.kth.se
+ 130.237.227.23                  #gagarin.nada.kth.se
+ 130.237.228.28                  #laika.nada.kth.se
+ >pdc.kth.se             #Royal Institute of Technology, PDC
+ 130.237.232.29                  #crab.pdc.kth.se
+ 130.237.232.112                 #anna.pdc.kth.se
+ 130.237.232.114                 #hokkigai.pdc.kth.se
+ >stacken.kth.se         #Stacken Computer Club
+ 130.237.234.3                   #milko.stacken.kth.se
+ 130.237.234.43                  #hot.stacken.kth.se
+ 130.237.234.101                 #fishburger.stacken.kth.se
+ >syd.kth.se             #Royal Institute of Technology, KTH-Syd
+ 130.237.83.23                   #afs.haninge.kth.se
+ >physto.se              #Physics department Stockholm University
+ 130.237.205.36                  #sysafs1.physto.se
+ 130.237.205.72                  #sysafs2.physto.se
+ >sanchin.se             #Sanchin Consulting AB, Sweden
+ 192.195.148.10                  #sesan.sanchin.se
+ >su.se                  #Stockholm University
+ 130.237.162.81                  #afsdb1.su.se
+ 130.237.162.82                  #afsdb2.su.se
+ 130.237.162.230                 #afsdb3.su.se
+ >f9.ijs.si              #F9, Jozef Stefan Institue
+ 194.249.156.1                   #brenta.ijs.si
+ >p-ng.si                #Nova Gorica Polytechnic
+ 193.2.120.2                     #solkan.p-ng.si
+ >phy.bris.ac.uk         #Bristol University - phyics
+ 137.222.58.9                    #afs1.phy.bris.ac.uk
+ >inf.ed.ac.uk           #School of Informatics, University of Edinburgh
+ 129.215.64.16                   #afsdb0.inf.ed.ac.uk
+ 129.215.64.17                   #afsdb1.inf.ed.ac.uk
+ 129.215.64.18                   #afsdb2.inf.ed.ac.uk
+ >ic.ac.uk               #Imperial College London
+ 155.198.63.148                  #icafs2.cc.ic.ac.uk
+ 155.198.63.149                  #icafs1.cc.ic.ac.uk
+ >hep.man.ac.uk          #Manchester HEP
+ 194.36.2.3                      #afs1.hep.man.ac.uk
+ 194.36.2.4                      #afs2.hep.man.ac.uk
+ 194.36.2.5                      #afs3.hep.man.ac.uk
+ >rl.ac.uk               #Rutherford Appleton Lab, England
+ 130.246.183.164                 #wallace.cc.rl.ac.uk
Index: openafs/src/afsd/afsd.c
diff -c openafs/src/afsd/afsd.c:1.43.2.18 openafs/src/afsd/afsd.c:1.43.2.22
*** openafs/src/afsd/afsd.c:1.43.2.18	Mon Aug 21 16:39:40 2006
--- openafs/src/afsd/afsd.c	Wed Oct 10 12:57:56 2007
***************
*** 58,64 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsd/afsd.c,v 1.43.2.18 2006/08/21 20:39:40 shadow Exp $");
  
  #define VFS 1
  
--- 58,64 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsd/afsd.c,v 1.43.2.22 2007/10/10 16:57:56 shadow Exp $");
  
  #define VFS 1
  
***************
*** 165,170 ****
--- 165,200 ----
  kern_return_t DiskArbDiskAppearedWithMountpointPing_auto(char *, unsigned int,
  							 char *);
  #define DISK_ARB_NETWORK_DISK_FLAG 8
+ 
+ #include <mach/mach_port.h>
+ #include <mach/mach_interface.h>
+ #include <mach/mach_init.h>
+ 
+ #include <CoreFoundation/CoreFoundation.h>
+ 
+ #include <SystemConfiguration/SystemConfiguration.h>
+ #include <SystemConfiguration/SCDynamicStore.h>
+ 
+ #include <IOKit/pwr_mgt/IOPMLib.h>
+ #include <IOKit/IOMessage.h>
+ 
+ #include <dns_sd.h>
+ 
+ typedef struct DNSSDState
+ {
+     DNSServiceRef       service;
+     CFRunLoopSourceRef  source;
+     CFSocketRef         socket;
+ } DNSSDState;
+ 
+ static io_connect_t root_port;
+ static IONotificationPortRef notify;
+ static io_object_t iterator;
+ static CFRunLoopSourceRef source;
+ static DNSSDState dnsstate;
+ 
+ static int event_pid;
+ 
  #endif /* AFS_DARWIN_ENV */
  
  #ifndef MOUNT_AFS
***************
*** 302,309 ****
--- 332,341 ----
  				 * -2: file exists in top-level
  				 * >=0: file exists in Dxxx
  				 */
+ #ifndef AFS_CACHE_VNODE_PATH
  AFSD_INO_T *inode_for_V;	/* Array of inodes for desired
  				 * cache files */
+ #endif
  int missing_DCacheFile = 1;	/*Is the DCACHEFILE missing? */
  int missing_VolInfoFile = 1;	/*Is the VOLINFOFILE missing? */
  int missing_CellInfoFile = 1;	/*Is the CELLINFOFILE missing? */
***************
*** 312,317 ****
--- 344,505 ----
  
  static int HandleMTab();
  
+ #ifdef AFS_DARWIN_ENV
+ static void
+ afsd_sleep_callback(void * refCon, io_service_t service, 
+ 		    natural_t messageType, void * messageArgument )
+ {
+     afs_int32 code;
+     
+     switch (messageType) {
+     case kIOMessageCanSystemSleep:
+ 	/* Idle sleep is about to kick in; can 
+ 	   prevent sleep by calling IOCancelPowerChange, otherwise 
+ 	   if we don't ack in 30s the system sleeps anyway */
+ 	
+ 	/* allow it */
+ 	IOAllowPowerChange(root_port, (long)messageArgument);
+ 	break;
+ 	
+     case kIOMessageSystemWillSleep:
+ 	/* The system WILL go to sleep. Ack or suffer delay */
+ 	
+ 	IOAllowPowerChange(root_port, (long)messageArgument);
+ 	break;
+ 	
+     case kIOMessageSystemWillRestart:
+ 	/* The system WILL restart. Ack or suffer delay */
+ 	
+ 	IOAllowPowerChange(root_port, (long)messageArgument);
+ 	break;
+ 	
+     case kIOMessageSystemWillPowerOn:
+     case kIOMessageSystemHasPoweredOn:
+ 	/* coming back from sleep */
+ 	
+ 	IOAllowPowerChange(root_port, (long)messageArgument);
+ 	break;
+ 	
+     default:
+ 	IOAllowPowerChange(root_port, (long)messageArgument);
+ 	break;
+     }
+ }
+ 
+ static void
+ afsd_update_addresses(CFRunLoopTimerRef timer, void *info)
+ {
+     /* parse multihomed address files */
+     afs_int32 addrbuf[MAXIPADDRS], maskbuf[MAXIPADDRS],
+ 	mtubuf[MAXIPADDRS];
+     char reason[1024];
+     afs_int32 code;
+ 
+     code =
+ 	parseNetFiles(addrbuf, maskbuf, mtubuf, MAXIPADDRS, reason,
+ 		      AFSDIR_CLIENT_NETINFO_FILEPATH,
+ 		      AFSDIR_CLIENT_NETRESTRICT_FILEPATH);
+ 
+     if (code > 0) {
+ 	/* Note we're refreshing */
+ 	code = code | 0x40000000;
+ 	call_syscall(AFSOP_ADVISEADDR, code, addrbuf, maskbuf, mtubuf);
+     } else
+ 	printf("ADVISEADDR: Error in specifying interface addresses:%s\n",
+ 	       reason);
+ }
+ 
+ /* This function is called when the system's ip addresses may have changed. */
+ static void
+ afsd_ipaddr_callback (SCDynamicStoreRef store, CFArrayRef changed_keys, void *info)
+ {
+       CFRunLoopTimerRef timer;
+ 
+       timer = CFRunLoopTimerCreate (NULL, CFAbsoluteTimeGetCurrent () + 1.0,
+ 				    0.0, 0, 0, afsd_update_addresses, NULL);
+       CFRunLoopAddTimer (CFRunLoopGetCurrent (), timer,
+ 			 kCFRunLoopDefaultMode);
+       CFRelease (timer);
+ }
+ 
+ static void 
+ afsd_event_cleanup(int signo) {
+     DNSSDState *query = &dnsstate;
+ 
+     CFRunLoopRemoveSource(CFRunLoopGetCurrent(), source, kCFRunLoopDefaultMode);
+     CFRelease (source);
+     IODeregisterForSystemPower(iterator);
+     IOServiceClose(root_port);
+     IONotificationPortDestroy(notify);
+ 
+     exit(0);
+ }
+ 
+ /* Adapted from "Living in a Dynamic TCP/IP Environment" technote. */
+ static Boolean
+ afsd_install_events(void)
+ {
+     SCDynamicStoreContext ctx = {0};
+     SCDynamicStoreRef store;
+ 
+     root_port = IORegisterForSystemPower(0,&notify,afsd_sleep_callback,&iterator);
+     
+     if (root_port) {
+ 	CFRunLoopAddSource(CFRunLoopGetCurrent(),
+ 			   IONotificationPortGetRunLoopSource(notify),
+ 			   kCFRunLoopDefaultMode);
+     }
+     
+     
+     store = SCDynamicStoreCreate (NULL,
+ 				  CFSTR ("AddIPAddressListChangeCallbackSCF"),
+ 				  afsd_ipaddr_callback, &ctx);
+     
+     if (store) {
+ 	const void *keys[1];
+ 	
+ 	/* Request IPV4 address change notification */
+ 	keys[0] = (SCDynamicStoreKeyCreateNetworkServiceEntity
+ 		   (NULL, kSCDynamicStoreDomainState,
+ 		    kSCCompAnyRegex, kSCEntNetIPv4));
+ 	
+ #if 0
+ 	/* This should tell us when the hostname(s) change. do we care? */
+ 	keys[N] = SCDynamicStoreKeyCreateHostNames (NULL);
+ #endif
+ 	
+ 	if (keys[0] != NULL) {
+ 	    CFArrayRef pattern_array;
+ 	    
+ 	    pattern_array = CFArrayCreate (NULL, keys, 1,
+ 					   &kCFTypeArrayCallBacks);
+ 	    
+ 	    if (pattern_array != NULL)
+ 	    {
+ 		SCDynamicStoreSetNotificationKeys (store, NULL, pattern_array);
+ 		source = SCDynamicStoreCreateRunLoopSource (NULL, store, 0);
+ 		
+ 		CFRelease (pattern_array);
+ 	    }
+ 	    
+ 	    if (keys[0] != NULL)
+ 		CFRelease (keys[0]);
+ 	}
+ 	
+ 	CFRelease (store); 
+     }
+     
+     if (source != NULL) {
+ 	CFRunLoopAddSource (CFRunLoopGetCurrent(),
+ 			    source, kCFRunLoopDefaultMode);
+     }
+     
+     signal(SIGTERM, afsd_event_cleanup);
+ 
+     CFRunLoopRun();
+ }
+ #endif
+ 
  /* ParseArgs is now obsolete, being handled by cmd */
  
  /*------------------------------------------------------------------------------
***************
*** 817,823 ****
--- 1005,1013 ----
  	     * file's inode, directory, and bump the number of files found
  	     * total and in this directory.
  	     */
+ #ifndef AFS_CACHE_VNODE_PATH
  	    inode_for_V[vFileNum] = currp->d_ino;
+ #endif
  	    dir_for_V[vFileNum] = dirNum;	/* remember this directory */
  
  	    if (!maxDir) {
***************
*** 954,960 ****
--- 1144,1152 ----
  			   vFileNum);
  		else {
  		    struct stat statb;
+ #ifndef AFS_CACHE_VNODE_PATH
  		    assert(inode_for_V[vFileNum] == (AFSD_INO_T) 0);
+ #endif
  		    sprintf(vFilePtr, "D%d/V%d", thisDir, vFileNum);
  		    if (afsd_verbose)
  			printf("%s: Creating '%s'\n", rn, fullpn_VFile);
***************
*** 965,971 ****
--- 1157,1165 ----
  		    if (CreateCacheFile(fullpn_VFile, &statb))
  			printf("%s: Can't create '%s'\n", rn, fullpn_VFile);
  		    else {
+ #ifndef AFS_CACHE_VNODE_PATH
  			inode_for_V[vFileNum] = statb.st_ino;
+ #endif
  			dir_for_V[vFileNum] = thisDir;
  			cache_dir_list[thisDir]++;
  			(*vFilesFound)++;
***************
*** 1247,1252 ****
--- 1441,1456 ----
      kernelMsg[1] = 0;
      acellName[0] = '\0';
  
+ #ifdef AFS_DARWIN_ENV
+     /* Fork the event handler also. */
+     code = fork();
+     if (code == 0) {
+ 	afsd_install_events();
+ 	exit(1);
+     } else if (code != -1) {
+ 	event_pid = code;
+     }
+ #endif
      while (1) {
  	/* On some platforms you only get 4 args to an AFS call */
  	int sizeArg = ((sizeof acellName) << 16) | (sizeof kernelMsg);
***************
*** 1276,1282 ****
  	    acellName[sizeof(acellName) - 1] = '\0';
  	}
      }
! 
      exit(1);
  }
  #endif
--- 1480,1488 ----
  	    acellName[sizeof(acellName) - 1] = '\0';
  	}
      }
! #ifdef AFS_DARWIN_ENV
!     kill(event_pid, SIGTERM);
! #endif
      exit(1);
  }
  #endif
***************
*** 1705,1710 ****
--- 1911,1917 ----
  		   cacheStatEntries);
      }
  
+ #ifndef AFS_CACHE_VNODE_PATH
      /*
       * Create and zero the inode table for the desired cache files.
       */
***************
*** 1719,1724 ****
--- 1926,1932 ----
      if (afsd_debug)
  	printf("%s: %d inode_for_V entries at 0x%x, %d bytes\n", rn,
  	       cacheFiles, inode_for_V, (cacheFiles * sizeof(AFSD_INO_T)));
+ #endif
  
      /*
       * Set up all the pathnames we'll need for later.
***************
*** 1737,1746 ****
  	exit(1);
  #endif
      }
- #if 0
-     fputs(AFS_GOVERNMENT_MESSAGE, stdout);
-     fflush(stdout);
- #endif
  
      /*
       * Set up all the kernel processes needed for AFS.
--- 1945,1950 ----
***************
*** 1903,1908 ****
--- 2107,2129 ----
  		     rn, vFilesFound, cacheFiles, cacheIteration);
  	} while ((vFilesFound < cacheFiles)
  		 && (cacheIteration < MAX_CACHE_LOOPS));
+ #ifdef AFS_CACHE_VNODE_PATH
+ 	if (afsd_debug)
+ 	    printf
+ 		("%s: Calling AFSOP_CACHEBASEDIR with '%s'\n",
+ 		 rn, cacheBaseDir);
+ 	call_syscall(AFSOP_CACHEBASEDIR, cacheBaseDir);
+ 	if (afsd_debug)
+ 	    printf
+ 		("%s: Calling AFSOP_CACHEDIRS with %d dirs\n",
+ 		 rn, nFilesPerDir);
+ 	call_syscall(AFSOP_CACHEDIRS, nFilesPerDir);
+ 	if (afsd_debug)
+ 	    printf
+ 		("%s: Calling AFSOP_CACHEFILES with %d files\n",
+ 		 rn, cacheFiles);
+ 	call_syscall(AFSOP_CACHEFILES, cacheFiles);
+ #endif
      } else if (afsd_verbose)
  	printf("%s: Using memory cache, not swept\n", rn);
  
***************
*** 2037,2042 ****
--- 2258,2264 ----
      if (!(cacheFlags & AFSCALL_INIT_MEMCACHE)) 
  	call_syscall(AFSOP_VOLUMEINFO, fullpn_VolInfoFile);
  
+ #ifndef AFS_CACHE_VNODE_PATH
      /*
       * Give the kernel the names of the AFS files cached on the workstation's
       * disk.
***************
*** 2055,2061 ****
  	    call_syscall(AFSOP_CACHEINODE, inode_for_V[currVFile]);
  #endif
  	}
! 
  
      /*end for */
      /*
--- 2277,2283 ----
  	    call_syscall(AFSOP_CACHEINODE, inode_for_V[currVFile]);
  #endif
  	}
! #endif
  
      /*end for */
      /*
Index: openafs/src/aklog/Makefile.in
diff -c openafs/src/aklog/Makefile.in:1.1.2.8 openafs/src/aklog/Makefile.in:1.1.2.9
*** openafs/src/aklog/Makefile.in:1.1.2.8	Thu Jan  4 22:22:00 2007
--- openafs/src/aklog/Makefile.in	Tue Apr 10 14:43:40 2007
***************
*** 11,17 ****
  	  ${TOP_LIBDIR}/libauth.a ${TOP_LIBDIR}/librxkad.a \
  	  ${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/liblwp.a \
  	  ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libdes.a \
! 	  ${TOP_LIBDIR}/libafsutil.a
  
  SRCS=	aklog.c aklog_main.c  krb_util.c linked_list.c
  OBJS=   aklog.o aklog_main.o krb_util.o linked_list.o
--- 11,17 ----
  	  ${TOP_LIBDIR}/libauth.a ${TOP_LIBDIR}/librxkad.a \
  	  ${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/liblwp.a \
  	  ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libdes.a \
! 	  ${TOP_LIBDIR}/libcom_err.a ${TOP_LIBDIR}/libafsutil.a
  
  SRCS=	aklog.c aklog_main.c  krb_util.c linked_list.c
  OBJS=   aklog.o aklog_main.o krb_util.o linked_list.o
Index: openafs/src/aklog/aklog.h
diff -c openafs/src/aklog/aklog.h:1.1.2.5 openafs/src/aklog/aklog.h:1.1.2.6
*** openafs/src/aklog/aklog.h:1.1.2.5	Wed Apr  5 11:42:13 2006
--- openafs/src/aklog/aklog.h	Wed Jul 11 00:32:27 2007
***************
*** 1,5 ****
  /* 
!  * $Id: aklog.h,v 1.1.2.5 2006/04/05 15:42:13 shadow Exp $
   *
   * Copyright 1990,1991 by the Massachusetts Institute of Technology
   * For distribution and copying rights, see the file "mit-copyright.h"
--- 1,5 ----
  /* 
!  * $Id: aklog.h,v 1.1.2.6 2007/07/11 04:32:27 shadow Exp $
   *
   * Copyright 1990,1991 by the Massachusetts Institute of Technology
   * For distribution and copying rights, see the file "mit-copyright.h"
***************
*** 9,15 ****
  #define __AKLOG_H__
  
  #if !defined(lint) && !defined(SABER)
! static char *rcsid_aklog_h = "$Id: aklog.h,v 1.1.2.5 2006/04/05 15:42:13 shadow Exp $";
  #endif /* lint || SABER */
  
  #include <krb5.h>
--- 9,15 ----
  #define __AKLOG_H__
  
  #if !defined(lint) && !defined(SABER)
! static char *rcsid_aklog_h = "$Id: aklog.h,v 1.1.2.6 2007/07/11 04:32:27 shadow Exp $";
  #endif /* lint || SABER */
  
  #include <krb5.h>
***************
*** 51,56 ****
--- 51,60 ----
  #define INST_SZ 40
  #endif /* INST_SZ */
  
+ #ifndef u_int32_t
+ #define u_int32_t uint32_t
+ #endif
+ 
  struct ktext {
      unsigned int length;
      unsigned char dat[MAX_KTXT_LEN];
Index: openafs/src/aklog/aklog_main.c
diff -c openafs/src/aklog/aklog_main.c:1.1.2.15 openafs/src/aklog/aklog_main.c:1.1.2.20
*** openafs/src/aklog/aklog_main.c:1.1.2.15	Sat Feb 10 08:56:54 2007
--- openafs/src/aklog/aklog_main.c	Wed Oct 10 13:47:58 2007
***************
*** 1,13 ****
  /* 
!  * $Id: aklog_main.c,v 1.1.2.15 2007/02/10 13:56:54 jaltman Exp $
   *
   * Copyright 1990,1991 by the Massachusetts Institute of Technology
   * For distribution and copying rights, see the file "mit-copyright.h"
   */
  
  #if !defined(lint) && !defined(SABER)
  static char *rcsid =
! 	"$Id: aklog_main.c,v 1.1.2.15 2007/02/10 13:56:54 jaltman Exp $";
  #endif /* lint || SABER */
  
  #include <afsconfig.h>
--- 1,42 ----
  /* 
!  * $Id: aklog_main.c,v 1.1.2.20 2007/10/10 17:47:58 shadow Exp $
   *
   * Copyright 1990,1991 by the Massachusetts Institute of Technology
   * For distribution and copying rights, see the file "mit-copyright.h"
   */
+ /*
+  * Copyright (c) 2005, 2006                                     
+  * The Linux Box Corporation                                    
+  * ALL RIGHTS RESERVED                                          
+  *                                                              
+  * Permission is granted to use, copy, create derivative works  
+  * and redistribute this software and such derivative works     
+  * for any purpose, so long as the name of the Linux Box        
+  * Corporation is not used in any advertising or publicity      
+  * pertaining to the use or distribution of this software       
+  * without specific, written prior authorization.  If the       
+  * above copyright notice or any other identification of the    
+  * Linux Box Corporation is included in any copy of any         
+  * portion of this software, then the disclaimer below must     
+  * also be included.                                            
+  *                                                              
+  * This software is provided as is, without representation      
+  * from the Linux Box Corporation as to its fitness for any     
+  * purpose, and without warranty by the Linux Box Corporation   
+  * of any kind, either express or implied, including            
+  * without limitation the implied warranties of                 
+  * merchantability and fitness for a particular purpose.  The   
+  * regents of the Linux Box Corporation shall not be liable     
+  * for any damages, including special, indirect, incidental, or 
+  * consequential damages, with respect to any claim arising     
+  * out of or in connection with the use of the software, even   
+  * if it has been or is hereafter advised of the possibility of 
+  * such damages.                                                
+  */
  
  #if !defined(lint) && !defined(SABER)
  static char *rcsid =
! 	"$Id: aklog_main.c,v 1.1.2.20 2007/10/10 17:47:58 shadow Exp $";
  #endif /* lint || SABER */
  
  #include <afsconfig.h>
***************
*** 39,65 ****
  #include <pwd.h>
  #endif /* WINDOWS */
  
- /* on AIX AFS has an unresolved reference to osi_audit. We will define
-  * it here as extern. It also trys to call the ntohl and htonl routines
-  * as routines rather then macros. We need a real routine here. 
-  * We do this before the ntohl and htonl macros are defined in net/in.h
-  */
- int osi_audit()
-     { return(0);}
- 
- #if 0
- #ifdef _AIX
- u_long htonl(u_long x)
-     { return(x);}
- 
- u_long ntohl(u_long x)
-     { return(x);}
- #endif
- 
- #include <netinet/in.h>
- /* #include <krb.h> */
- #endif /* 0 */
- 
  #include <afs/stds.h>
  #include <krb5.h>
  
--- 68,73 ----
***************
*** 90,95 ****
--- 98,110 ----
  #include "aklog.h"
  #include "linked_list.h"
  
+ #ifdef HAVE_KRB5_CREDS_KEYBLOCK
+ #define USING_MIT 1
+ #endif
+ #ifdef HAVE_KRB5_CREDS_SESSION
+ #define USING_HEIMDAL 1
+ #endif
+ 
  #define AFSKEY "afs"
  #define AFSINST ""
  
***************
*** 184,189 ****
--- 199,239 ----
  #error "Must have either krb5_princ_size or krb5_principal_get_comp_string"
  #endif
  
+ #if !defined(HAVE_KRB5_ENCRYPT_TKT_PART) && defined(HAVE_ENCODE_KRB5_ENC_TKT_PART)
+ krb5_error_code
+ krb5_encrypt_tkt_part(krb5_context context,
+ 		      const krb5_keyblock *key,
+ 		      krb5_ticket *ticket)
+ {
+     krb5_data *data = 0;
+     int code;
+     size_t enclen;
+     
+     if ((code = encode_krb5_enc_tkt_part(ticket->enc_part2, &data)))
+ 	goto Done;
+     if ((code = krb5_c_encrypt_length(context, key->enctype,
+ 				      data->length, &enclen)))
+ 	goto Done;
+     ticket->enc_part.ciphertext.length = enclen;
+     if (!(ticket->enc_part.ciphertext.data = malloc(enclen))) {
+ 	code = ENOMEM;
+ 	goto Done;
+     }
+     if ((code = krb5_c_encrypt(context, key, KRB5_KEYUSAGE_KDC_REP_TICKET,
+ 			       0, data, &ticket->enc_part))) {
+ 	free(ticket->enc_part.ciphertext.data);
+ 	ticket->enc_part.ciphertext.data = 0;
+     }
+ Done:
+     if (data) {
+ 	if (data->data)
+ 	    free(data->data);
+ 	free(data);
+     }
+     return code;
+ }
+ #endif
+ 
  #if defined(HAVE_KRB5_CREDS_KEYBLOCK)
  
  #define get_cred_keydata(c) c->keyblock.contents
***************
*** 203,211 ****
  #if !defined(HAVE_KRB5_524_CONVERT_CREDS) && defined(HAVE_KRB524_CONVERT_CREDS_KDC)
  #define krb5_524_convert_creds krb524_convert_creds_kdc
  #elif !defined(HAVE_KRB5_524_CONVERT_CREDS) && !defined(HAVE_KRB524_CONVERT_CREDS_KDC)
! #error "You must have one of krb5_524_convert_creds or krb524_convert_creds_kdc available"
  #endif
  
  #endif /* WINDOWS */
  
  /*
--- 253,305 ----
  #if !defined(HAVE_KRB5_524_CONVERT_CREDS) && defined(HAVE_KRB524_CONVERT_CREDS_KDC)
  #define krb5_524_convert_creds krb524_convert_creds_kdc
  #elif !defined(HAVE_KRB5_524_CONVERT_CREDS) && !defined(HAVE_KRB524_CONVERT_CREDS_KDC)
! #define HAVE_NO_KRB5_524
  #endif
  
+ #if USING_HEIMDAL
+ #define deref_keyblock_enctype(kb)		\
+     ((kb)->keytype)
+ 
+ #define deref_entry_keyblock(entry)		\
+     entry->keyblock
+ 
+ #define deref_session_key(creds)		\
+     creds->session
+ 
+ #define deref_enc_tkt_addrs(tkt)		\
+     tkt->caddr
+ 
+ #define deref_enc_length(enc)			\
+     ((enc)->cipher.length)
+ 
+ #define deref_enc_data(enc)			\
+     ((enc)->cipher.data)
+ 
+ #define krb5_free_keytab_entry_contents krb5_kt_free_entry
+ 
+ #else
+ #define deref_keyblock_enctype(kb)		\
+     ((kb)->enctype)
+ 
+ #define deref_entry_keyblock(entry)		\
+     entry->key
+ 
+ #define deref_session_key(creds)		\
+     creds->keyblock
+ 
+ #define deref_enc_tkt_addrs(tkt)		\
+     tkt->caddrs
+ 
+ #define deref_enc_length(enc)			\
+     ((enc)->ciphertext.length)
+ 
+ #define deref_enc_data(enc)			\
+     ((enc)->ciphertext.data)
+ 
+ #endif
+ 
+ #define deref_entry_enctype(entry)			\
+     deref_keyblock_enctype(&deref_entry_keyblock(entry))
  #endif /* WINDOWS */
  
  /*
***************
*** 223,232 ****
  static int zsubs = FALSE;	/* Are we keeping track of zephyr subs? */
  static int hosts = FALSE;	/* Are we keeping track of hosts? */
  static int noprdb = FALSE;	/* Skip resolving name to id? */
! static int linked = FALSE;  /* try for both AFS nodes */
! static int afssetpag = FALSE; /* setpag for AFS */
  static int force = FALSE;	/* Bash identical tokens? */
  static int do524 = FALSE;	/* Should we do 524 instead of rxkad2b? */
  static linked_list zsublist;	/* List of zephyr subscriptions */
  static linked_list hostlist;	/* List of host addresses */
  static linked_list authedcells;	/* List of cells already logged to */
--- 317,328 ----
  static int zsubs = FALSE;	/* Are we keeping track of zephyr subs? */
  static int hosts = FALSE;	/* Are we keeping track of hosts? */
  static int noprdb = FALSE;	/* Skip resolving name to id? */
! static int linked = FALSE;      /* try for both AFS nodes */
! static int afssetpag = FALSE;   /* setpag for AFS */
  static int force = FALSE;	/* Bash identical tokens? */
  static int do524 = FALSE;	/* Should we do 524 instead of rxkad2b? */
+ static char *keytab = NULL;     /* keytab for akimpersonate */
+ static char *client = NULL;     /* client principal for akimpersonate */
  static linked_list zsublist;	/* List of zephyr subscriptions */
  static linked_list hostlist;	/* List of host addresses */
  static linked_list authedcells;	/* List of cells already logged to */
***************
*** 247,263 ****
  }
  
  
- static char *copy_string(char *string)    
- {
-     char *new_string;
- 
-     if ((new_string = (char *)calloc(strlen(string) + 1, sizeof(char))))
- 	(void) strcpy(new_string, string);
- 
-     return (new_string);
- }
- 
- 
  static int get_cellconfig(char *cell, struct afsconf_cell *cellconfig, char *local_cell, char *linkedcell)
  {
      int status = AKLOG_SUCCESS;
--- 343,348 ----
***************
*** 625,631 ****
  	    }
  	    fprintf(stderr, "%s: Couldn't get %s AFS tickets:\n",
  		    progname, cell_to_use);
! 		com_err(progname, status, "while getting AFS tickets");
  	    return(AKLOG_KERBEROS);
  	}
  
--- 710,716 ----
  	    }
  	    fprintf(stderr, "%s: Couldn't get %s AFS tickets:\n",
  		    progname, cell_to_use);
! 		afs_com_err(progname, status, "while getting AFS tickets");
  	    return(AKLOG_KERBEROS);
  	}
  
***************
*** 669,674 ****
--- 754,760 ----
  		   get_cred_keylen(v5cred));
  	    atoken.ticketLen = v5cred->ticket.length;
  	    memcpy(atoken.ticket, v5cred->ticket.data, atoken.ticketLen);
+ #ifndef HAVE_NO_KRB5_524
  	} else {
      	    CREDENTIALS cred;
  
***************
*** 678,684 ****
  	    status = krb5_524_convert_creds(context, v5cred, &cred);
  
  	    if (status) {
! 		com_err(progname, status, "while converting tickets "
  			"to Kerberos V4 format");
  		return(AKLOG_KERBEROS);
  	    }
--- 764,770 ----
  	    status = krb5_524_convert_creds(context, v5cred, &cred);
  
  	    if (status) {
! 		afs_com_err(progname, status, "while converting tickets "
  			"to Kerberos V4 format");
  		return(AKLOG_KERBEROS);
  	    }
***************
*** 703,708 ****
--- 789,795 ----
  	    memcpy(&atoken.sessionKey, cred.session, 8);
  	    atoken.ticketLen = cred.ticket_st.length;
  	    memcpy(atoken.ticket, cred.ticket_st.dat, atoken.ticketLen);
+ #endif /* HAVE_NO_KRB5_524 */
  	}
  	
  	if (!force &&
***************
*** 735,741 ****
  	    if ((status = get_user_realm(context, realm_of_user))) {
  		fprintf(stderr, "%s: Couldn't determine realm of user:)",
  			progname);
! 		com_err(progname, status, " while getting realm");
  		return(AKLOG_KERBEROS);
  	    }
  	    if (strcmp(realm_of_user, realm_of_cell)) {
--- 822,828 ----
  	    if ((status = get_user_realm(context, realm_of_user))) {
  		fprintf(stderr, "%s: Couldn't determine realm of user:)",
  			progname);
! 		afs_com_err(progname, status, " while getting realm");
  		return(AKLOG_KERBEROS);
  	    }
  	    if (strcmp(realm_of_user, realm_of_cell)) {
***************
*** 812,818 ****
  		if ((status = pr_CreateUser(username, &id))) {
  		    fprintf(stderr, "%s: %s so unable to create remote PTS "
  			    "user %s in cell %s (status: %d).\n", progname,
! 			    error_message(status), username, cell_to_use,
  			    status);
  		} else {
  		    printf("created cross-cell entry for %s (Id %d) at %s\n",
--- 899,905 ----
  		if ((status = pr_CreateUser(username, &id))) {
  		    fprintf(stderr, "%s: %s so unable to create remote PTS "
  			    "user %s in cell %s (status: %d).\n", progname,
! 			    afs_error_message(status), username, cell_to_use,
  			    status);
  		} else {
  		    printf("created cross-cell entry for %s (Id %d) at %s\n",
***************
*** 1225,1231 ****
  	    "[-d] [[-cell | -c] cell [-k krb_realm]] ",
  	    "[[-p | -path] pathname]\n",
  	    "    [-zsubs] [-hosts] [-noauth] [-noprdb] [-force] [-setpag] \n"
! 	    "    [-linked] [-524]\n");
      fprintf(stderr, "    -d gives debugging information.\n");
      fprintf(stderr, "    krb_realm is the kerberos realm of a cell.\n");
      fprintf(stderr, "    pathname is the name of a directory to which ");
--- 1312,1322 ----
  	    "[-d] [[-cell | -c] cell [-k krb_realm]] ",
  	    "[[-p | -path] pathname]\n",
  	    "    [-zsubs] [-hosts] [-noauth] [-noprdb] [-force] [-setpag] \n"
! 		"    [-linked]"
! #ifndef HAVE_NO_KRB5_524
! 		" [-524]"
! #endif
! 		"\n");
      fprintf(stderr, "    -d gives debugging information.\n");
      fprintf(stderr, "    krb_realm is the kerberos realm of a cell.\n");
      fprintf(stderr, "    pathname is the name of a directory to which ");
***************
*** 1237,1243 ****
--- 1328,1336 ----
      fprintf(stderr, "    -force means replace identical tickets. \n");
      fprintf(stderr, "    -linked means if AFS node is linked, try both. \n");
      fprintf(stderr, "    -setpag set the AFS process authentication group.\n");
+ #ifndef HAVE_NO_KRB5_524
      fprintf(stderr, "    -524 means use the 524 converter instead of V5 directly\n");
+ #endif
      fprintf(stderr, "    No commandline arguments means ");
      fprintf(stderr, "authenticate to the local cell.\n");
      fprintf(stderr, "\n");
***************
*** 1310,1317 ****
--- 1403,1412 ----
  		linked++;
  	else if (strcmp(argv[i], "-force") == 0)
  	    force++;
+ #ifndef HAVE_NO_KRB5_524
  	else if (strcmp(argv[i], "-524") == 0)
  	    do524++;
+ #endif
      else if (strcmp(argv[i], "-setpag") == 0)
  	    afssetpag++;
  	else if (((strcmp(argv[i], "-cell") == 0) ||
***************
*** 1322,1327 ****
--- 1417,1434 ----
  	    }
  	    else
  		usage();
+ 	else if ((strcmp(argv[i], "-keytab") == 0))
+ 	    if (++i < argc) {
+ 		keytab = argv[i];
+ 	    }
+ 	    else
+ 		usage();
+ 	else if ((strcmp(argv[i], "-principal") == 0))
+ 	    if (++i < argc) {
+ 		client = argv[i];
+ 	    }
+ 	    else
+ 		usage();
  	else if (((strcmp(argv[i], "-path") == 0) ||
  		  (strcmp(argv[i], "-p") == 0)) && !cmode)
  #ifndef WINDOWS
***************
*** 1394,1401 ****
  	else if (pmode) {
  	    /* Add this path to list of paths */
  	    if ((cur_node = ll_add_node(&paths, ll_tail))) {
! 		char *new_path; 
! 		if ((new_path = copy_string(path)))
  		    ll_add_data(cur_node, new_path);
  		else {
  		    fprintf(stderr, "%s: failure copying path name.\n",
--- 1501,1508 ----
  	else if (pmode) {
  	    /* Add this path to list of paths */
  	    if ((cur_node = ll_add_node(&paths, ll_tail))) {
! 		char *new_path;
! 		if ((new_path = strdup(path)))
  		    ll_add_data(cur_node, new_path);
  		else {
  		    fprintf(stderr, "%s: failure copying path name.\n",
***************
*** 1558,1580 ****
      exit(status);
  }
  
- #ifndef HAVE_ADD_TO_ERROR_TABLE
- 
- #define error_table error_table_compat
- #include <afs/error_table.h>
- #undef error_table
- 
- #ifndef HAVE_ADD_ERROR_TABLE
- void add_error_table (const struct error_table *);
- #endif /* !HAVE_ADD_ERROR_TABLE */
- 
- void
- add_to_error_table(struct et_list *new_table)
- {
- 	add_error_table((struct error_table *) new_table->table);
- }
- #endif /* HAVE_ADD_TO_ERROR_TABLE */
- 
  static int isdir(char *path, unsigned char *val)
  {
      struct stat statbuf;
--- 1665,1670 ----
***************
*** 1590,1612 ****
      }  
  }
  
  static krb5_error_code get_credv5(krb5_context context, 
! 			char *name, char *inst, char *realm,
! 			krb5_creds **creds)
  {
      krb5_creds increds;
      krb5_error_code r;
      static krb5_principal client_principal = 0;
! 
      memset((char *)&increds, 0, sizeof(increds));
  /* ANL - instance may be ptr to a null string. Pass null then */
      if ((r = krb5_build_principal(context, &increds.server,
!                      strlen(realm), realm,
!                      name,
!            (inst && strlen(inst)) ? inst : (void *) NULL,
!                      (void *) NULL))) {
          return r;
      }
  
      if (!_krb425_ccache) {
          r = krb5_cc_default(context, &_krb425_ccache);
--- 1680,2024 ----
      }  
  }
  
+ static krb5_error_code get_credv5_akimpersonate(krb5_context context,
+ 						char* keytab,
+ 						krb5_principal service_principal,
+ 						krb5_principal client_principal,
+ 						time_t starttime,
+ 						time_t endtime,
+ 						int *allowed_enctypes,
+ 						int *paddress,
+ 						krb5_creds** out_creds /* out */ )
+ {
+ #if defined(USING_HEIMDAL) || (defined(HAVE_ENCODE_KRB5_ENC_TKT) && defined(HAVE_ENCODE_KRB5_TICKET))
+     krb5_error_code code;
+     krb5_keytab kt = 0;
+     krb5_kt_cursor cursor[1];
+     krb5_keytab_entry entry[1];
+     krb5_ccache cc = 0;
+     krb5_creds *creds = 0;
+     krb5_enctype enctype;
+     krb5_kvno kvno;
+     krb5_keyblock session_key[1];
+ #if USING_HEIMDAL
+     Ticket ticket_reply[1];
+     EncTicketPart enc_tkt_reply[1];
+     krb5_address address[30];
+     krb5_addresses faddr[1];
+     int temp_vno[1];
+     time_t temp_time[2];
+ #else
+     krb5_ticket ticket_reply[1];
+     krb5_enc_tkt_part enc_tkt_reply[1];
+     krb5_address address[30], *faddr[30];
+ #endif
+     krb5_data * temp;
+     int i;
+     static int any_enctype[] = {0};
+     *out_creds = 0;
+     if (!(creds = malloc(sizeof *creds))) {
+         code = ENOMEM;
+         goto cleanup;
+     }
+     if (!allowed_enctypes)
+         allowed_enctypes = any_enctype;
+ 
+     cc = 0;
+     enctype = 0; /* AKIMPERSONATE_IGNORE_ENCTYPE */
+     kvno = 0; /* AKIMPERSONATE_IGNORE_VNO */
+     memset((char*)creds, 0, sizeof *creds);
+     memset((char*)entry, 0, sizeof *entry);
+     memset((char*)session_key, 0, sizeof *session_key);
+     memset((char*)ticket_reply, 0, sizeof *ticket_reply);
+     memset((char*)enc_tkt_reply, 0, sizeof *enc_tkt_reply);
+     code = krb5_kt_resolve(context, keytab, &kt);
+     if (code) {
+         if (keytab)
+             com_err(progname, code, "while resolving keytab %s", keytab);
+         else
+             com_err(progname, code, "while resolving default keytab");
+         goto cleanup;
+     }
+ 
+     if (service_principal) {
+         for (i = 0; (enctype = allowed_enctypes[i]) || !i; ++i) {
+ 	    code = krb5_kt_get_entry(context,
+ 				     kt,
+ 				     service_principal,
+ 				     kvno,
+ 				     enctype,
+ 				     entry);
+ 	    if (!code) {
+ 		if (allowed_enctypes[i])
+ 		    deref_keyblock_enctype(session_key) = allowed_enctypes[i];
+ 		break;
+ 	    }
+         }
+         if (code) {
+ 	    com_err(progname, code,"while scanning keytab entries");
+ 	    goto cleanup;
+         }
+     } else {
+         krb5_keytab_entry new[1];
+         int best = -1;
+         memset(new, 0, sizeof *new);
+         if ((code == krb5_kt_start_seq_get(context, kt, cursor))) {
+             com_err(progname, code, "while starting keytab scan");
+             goto cleanup;
+         }
+         while (!(code = krb5_kt_next_entry(context, kt, new, cursor))) {
+             for (i = 0;
+                     allowed_enctypes[i] && allowed_enctypes[i]
+ 		     != deref_entry_enctype(new); ++i)
+                 ;
+             if ((!i || allowed_enctypes[i]) &&
+ 		(best < 0 || best > i)) {
+                 krb5_free_keytab_entry_contents(context, entry);
+                 *entry = *new;
+                 memset(new, 0, sizeof *new);
+             } else krb5_free_keytab_entry_contents(context, new);
+         }
+         if ((i = krb5_kt_end_seq_get(context, kt, cursor))) {
+             com_err(progname, i, "while ending keytab scan");
+             code = i;
+             goto cleanup;
+         }
+         if (best < 0) {
+             com_err(progname, code, "while scanning keytab");
+             goto cleanup;
+         }
+         deref_keyblock_enctype(session_key) = deref_entry_enctype(entry);
+     }
+ 
+     /* Make Ticket */
+ 
+ #if USING_HEIMDAL
+     if ((code = krb5_generate_random_keyblock(context,
+ 					      deref_keyblock_enctype(session_key), session_key))) {
+         com_err(progname, code, "while making session key");
+         goto cleanup;
+     }
+     enc_tkt_reply->flags.initial = 1;
+     enc_tkt_reply->transited.tr_type = DOMAIN_X500_COMPRESS;
+     enc_tkt_reply->cname = client_principal->name;
+     enc_tkt_reply->crealm = client_principal->realm;
+     enc_tkt_reply->key = *session_key;
+     {
+         static krb5_data empty_string;
+         enc_tkt_reply->transited.contents = empty_string;
+     }
+     enc_tkt_reply->authtime = starttime;
+     enc_tkt_reply->starttime = temp_time;
+     *enc_tkt_reply->starttime = starttime;
+ #if 0
+     enc_tkt_reply->renew_till = temp_time + 1;
+     *enc_tkt_reply->renew_till = endtime;
+ #endif
+     enc_tkt_reply->endtime = endtime;
+ #else
+     if ((code = krb5_c_make_random_key(context,
+ 				       deref_keyblock_enctype(session_key), session_key))) {
+         com_err(progname, code, "while making session key");
+         goto cleanup;
+     }
+     enc_tkt_reply->magic = KV5M_ENC_TKT_PART;
+ #define DATACAST        (unsigned char *)
+     enc_tkt_reply->flags |= TKT_FLG_INITIAL;
+     enc_tkt_reply->transited.tr_type = KRB5_DOMAIN_X500_COMPRESS;
+     enc_tkt_reply->session = session_key;
+     enc_tkt_reply->client = client_principal;
+     {
+         static krb5_data empty_string;
+         enc_tkt_reply->transited.tr_contents = empty_string;
+     }
+     enc_tkt_reply->times.authtime = starttime;
+     enc_tkt_reply->times.starttime = starttime; /* krb524init needs this */
+     enc_tkt_reply->times.endtime = endtime;
+ #endif  /* USING_HEIMDAL */
+     /* NB:  We will discard address for now--ignoring caddr field               
+        in any case.  MIT branch does what it always did. */
+ 
+     if (paddress && *paddress) {
+         deref_enc_tkt_addrs(enc_tkt_reply) = faddr;
+ #if USING_HEIMDAL
+         faddr->len = 0;
+         faddr->val = address;
+ #endif
+         for (i = 0; paddress[i]; ++i) {
+ #if USING_HEIMDAL
+             address[i].addr_type = KRB5_ADDRESS_INET;
+             address[i].address.data = (void*)(paddress+i);
+             address[i].address.length = sizeof(paddress[i]);
+ #else
+ #if !USING_SSL
+             address[i].magic = KV5M_ADDRESS;
+             address[i].addrtype = ADDRTYPE_INET;
+ #else
+             address[i].addrtype = AF_INET;
+ #endif
+             address[i].contents = (void*)(paddress+i);
+             address[i].length = sizeof(int);
+             faddr[i] = address+i;
+ #endif
+         }
+ #if USING_HEIMDAL
+         faddr->len = i;
+ #else
+         faddr[i] = 0;
+ #endif
+     }
+ 
+ #if USING_HEIMDAL
+     ticket_reply->sname = service_principal->name;
+     ticket_reply->realm = service_principal->realm;
+ 
+     { /* crypto block */
+         krb5_crypto crypto = 0;
+         unsigned char *buf = 0;
+         size_t buf_size, buf_len;
+         char *what;
+ 
+         ASN1_MALLOC_ENCODE(EncTicketPart, buf, buf_size,
+ 			   enc_tkt_reply, &buf_len, code);
+         if(code) {
+             com_err(progname, code, "while encoding ticket");
+             goto cleanup;
+         }
+ 
+         if(buf_len != buf_size) {
+             com_err(progname, code,
+ 		    "%d != %d while encoding ticket (internal ASN.1 encoder error",
+ 		    buf_len, buf_size);
+             goto cleanup;
+         }
+         what = "krb5_crypto_init";
+         code = krb5_crypto_init(context,
+ 				&deref_entry_keyblock(entry),
+ 				deref_entry_enctype(entry),
+ 				&crypto);
+         if(!code) {
+             what = "krb5_encrypt";
+             code = krb5_encrypt_EncryptedData(context, crypto, KRB5_KU_TICKET,
+ 					      buf, buf_len, entry->vno, &(ticket_reply->enc_part));
+         }
+         if (buf) free(buf);
+         if (crypto) krb5_crypto_destroy(context, crypto);
+         if(code) {
+             com_err(progname, code, "while %s", what);
+             goto cleanup;
+         }
+     } /* crypto block */
+     ticket_reply->enc_part.etype = deref_entry_enctype(entry);
+     ticket_reply->enc_part.kvno = temp_vno;
+     *ticket_reply->enc_part.kvno = entry->vno;
+     ticket_reply->tkt_vno = 5;
+ #else
+     ticket_reply->server = service_principal;
+     ticket_reply->enc_part2 = enc_tkt_reply;
+     if ((code = krb5_encrypt_tkt_part(context, &deref_entry_keyblock(entry), ticket_reply))) {
+         com_err(progname, code, "while making ticket");
+         goto cleanup;
+     }
+     ticket_reply->enc_part.kvno = entry->vno;
+ #endif
+ 
+     /* Construct Creds */
+ 
+     if ((code = krb5_copy_principal(context, service_principal,
+ 				    &creds->server))) {
+         com_err(progname, code, "while copying service principal");
+         goto cleanup;
+     }
+     if ((code = krb5_copy_principal(context, client_principal,
+ 				    &creds->client))) {
+         com_err(progname, code, "while copying client principal");
+         goto cleanup;
+     }
+     if ((code = krb5_copy_keyblock_contents(context, session_key,
+ 					    &deref_session_key(creds)))) {
+         com_err(progname, code, "while copying session key");
+         goto cleanup;
+     }
+ 
+ #if USING_HEIMDAL
+     creds->times.authtime = enc_tkt_reply->authtime;
+     creds->times.starttime = *(enc_tkt_reply->starttime);
+     creds->times.endtime = enc_tkt_reply->endtime;
+     creds->times.renew_till = 0; /* *(enc_tkt_reply->renew_till) */
+     creds->flags.b = enc_tkt_reply->flags;
+ #else
+     creds->times = enc_tkt_reply->times;
+     creds->ticket_flags = enc_tkt_reply->flags;
+ #endif
+     if (!deref_enc_tkt_addrs(enc_tkt_reply))
+         ;
+     else if ((code = krb5_copy_addresses(context,
+ 					 deref_enc_tkt_addrs(enc_tkt_reply), &creds->addresses))) {
+         com_err(progname, code, "while copying addresses");
+         goto cleanup;
+     }
+ 
+ #if USING_HEIMDAL
+     {
+ 	size_t creds_tkt_len;
+ 	ASN1_MALLOC_ENCODE(Ticket, creds->ticket.data, creds->ticket.length,
+ 			   ticket_reply, &creds_tkt_len, code);
+ 	if(code) {
+ 	    com_err(progname, code, "while encoding ticket");
+ 	    goto cleanup;
+ 	}
+     }
+ #else
+     if ((code = encode_krb5_ticket(ticket_reply, &temp))) {
+ 	com_err(progname, code, "while encoding ticket");
+ 	goto cleanup;
+     }
+     creds->ticket = *temp;
+     free(temp);
+ #endif
+     /* return creds */
+     *out_creds = creds;
+     creds = 0;
+ cleanup:
+     if (deref_enc_data(&ticket_reply->enc_part))
+         free(deref_enc_data(&ticket_reply->enc_part));
+     krb5_free_keytab_entry_contents(context, entry);
+     if (client_principal)
+         krb5_free_principal(context, client_principal);
+     if (service_principal)
+         krb5_free_principal(context, service_principal);
+     if (cc)
+         krb5_cc_close(context, cc);
+     if (kt)
+         krb5_kt_close(context, kt);
+     if (creds) krb5_free_creds(context, creds);
+     krb5_free_keyblock_contents(context, session_key);
+ out:
+     return code;
+ #else
+     return -1;
+ #endif
+ }
+ 
+ 
  static krb5_error_code get_credv5(krb5_context context, 
! 				  char *name, char *inst, char *realm,
! 				  krb5_creds **creds)
  {
      krb5_creds increds;
      krb5_error_code r;
      static krb5_principal client_principal = 0;
!     
      memset((char *)&increds, 0, sizeof(increds));
  /* ANL - instance may be ptr to a null string. Pass null then */
      if ((r = krb5_build_principal(context, &increds.server,
! 				  strlen(realm), realm,
! 				  name,
! 				  (inst && strlen(inst)) ? inst : (void *) NULL,
! 				  (void *) NULL))) {
          return r;
      }
+     
  
      if (!_krb425_ccache) {
          r = krb5_cc_default(context, &_krb425_ccache);
***************
*** 1614,1631 ****
  	    return r;
      }
      if (!client_principal) {
!         r = krb5_cc_get_principal(context, _krb425_ccache, &client_principal);
  	if (r)
  	    return r;
      }
! 
      increds.client = client_principal;
      increds.times.endtime = 0;
! 	/* Ask for DES since that is what V4 understands */
      get_creds_enctype((&increds)) = ENCTYPE_DES_CBC_CRC;
! 
!     r = krb5_get_credentials(context, 0, _krb425_ccache, &increds, creds);
! 
      return r;
  }
  
--- 2026,2061 ----
  	    return r;
      }
      if (!client_principal) {
! 	if (client) {
! 	    r = krb5_parse_name(context, client,  &client_principal);
! 	} else {
! 	    r = krb5_cc_get_principal(context, _krb425_ccache, &client_principal);
! 	}
  	if (r)
  	    return r;
      }
!     
      increds.client = client_principal;
      increds.times.endtime = 0;
!     /* Ask for DES since that is what V4 understands */
      get_creds_enctype((&increds)) = ENCTYPE_DES_CBC_CRC;
!     
!     if (keytab) {
! 	int allowed_enctypes[] = {
! 	    ENCTYPE_DES_CBC_CRC, 0
! 	};
! 
! 	r = get_credv5_akimpersonate(context,
! 				     keytab,
! 				     increds.server,
! 				     increds.client,
! 				     300, ((~0U)>>1),
! 				     allowed_enctypes,
! 				     0 /* paddress */,
! 				     creds /* out */);
!     } else {
! 	r = krb5_get_credentials(context, 0, _krb425_ccache, &increds, creds);
!     }    
      return r;
  }
  
***************
*** 1634,1649 ****
  {
      static krb5_principal client_principal = 0;
      int i;
  
      if (!_krb425_ccache)
          krb5_cc_default(context, &_krb425_ccache);
!     if (!client_principal)
!         krb5_cc_get_principal(context, _krb425_ccache, &client_principal);
  
      i = realm_len(context, client_principal);
      if (i > REALM_SZ-1) i = REALM_SZ-1;
      strncpy(realm,realm_data(context, client_principal), i);
      realm[i] = 0;
  
!     return(0);
  }
--- 2064,2087 ----
  {
      static krb5_principal client_principal = 0;
      int i;
+     krb5_error_code r = 0;
  
      if (!_krb425_ccache)
          krb5_cc_default(context, &_krb425_ccache);
!     if (!client_principal) {
! 	if (client) {
! 	    r = krb5_parse_name(context, client,  &client_principal);
! 	} else {
! 	    r = krb5_cc_get_principal(context, _krb425_ccache, &client_principal);
! 	}
! 	if (r)
! 	    return r;
!     }
  
      i = realm_len(context, client_principal);
      if (i > REALM_SZ-1) i = REALM_SZ-1;
      strncpy(realm,realm_data(context, client_principal), i);
      realm[i] = 0;
  
!     return(r);
  }
Index: openafs/src/aklog/asetkey.c
diff -c openafs/src/aklog/asetkey.c:1.4.2.6 openafs/src/aklog/asetkey.c:1.4.2.7
*** openafs/src/aklog/asetkey.c:1.4.2.6	Thu Jan  4 22:22:00 2007
--- openafs/src/aklog/asetkey.c	Tue Apr 10 14:43:40 2007
***************
*** 1,5 ****
  /*
!  * $Id: asetkey.c,v 1.4.2.6 2007/01/05 03:22:00 shadow Exp $
   *
   * asetkey - Manipulates an AFS KeyFile
   *
--- 1,5 ----
  /*
!  * $Id: asetkey.c,v 1.4.2.7 2007/04/10 18:43:40 shadow Exp $
   *
   * asetkey - Manipulates an AFS KeyFile
   *
***************
*** 85,97 ****
  	kvno = atoi(argv[2]);
  	retval = krb5_parse_name(context, argv[4], &principal);
  	if (retval != 0) {
! 		com_err(argv[0], retval, "while parsing AFS principal");
  		exit(1);
  	}
  	retval = krb5_kt_read_service_key(context, argv[3], principal, kvno,
  					  ENCTYPE_DES_CBC_CRC, &key);
  	if (retval != 0) {
! 		com_err(argv[0], retval, "while extracting AFS service key");
  		exit(1);
  	}
  
--- 85,97 ----
  	kvno = atoi(argv[2]);
  	retval = krb5_parse_name(context, argv[4], &principal);
  	if (retval != 0) {
! 		afs_com_err(argv[0], retval, "while parsing AFS principal");
  		exit(1);
  	}
  	retval = krb5_kt_read_service_key(context, argv[3], principal, kvno,
  					  ENCTYPE_DES_CBC_CRC, &key);
  	if (retval != 0) {
! 		afs_com_err(argv[0], retval, "while extracting AFS service key");
  		exit(1);
  	}
  
Index: openafs/src/auth/ktc.c
diff -c openafs/src/auth/ktc.c:1.15.2.6 openafs/src/auth/ktc.c:1.15.2.7
*** openafs/src/auth/ktc.c:1.15.2.6	Fri Oct  6 08:44:40 2006
--- openafs/src/auth/ktc.c	Thu Aug  9 10:59:54 2007
***************
*** 17,23 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/ktc.c,v 1.15.2.6 2006/10/06 12:44:40 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
--- 17,23 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/ktc.c,v 1.15.2.7 2007/08/09 14:59:54 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
***************
*** 1163,1168 ****
--- 1163,1169 ----
  {
      int k_errno;
      int kvno, lifetime;
+     long mit_compat;		/* MIT Kerberos 5 with Krb4 uses a "long" for issue_date */
  
      if (fd < 0) {
  	return TKT_FIL_INI;
***************
*** 1199,1208 ****
  	/* don't try to read a silly amount into ticket->dat */
  	token->ticketLen > MAXKTCTICKETLEN
  	|| tf_read((char *)(token->ticket), token->ticketLen) < 1
! 	|| tf_read((char *)&(token->startTime),
! 		   sizeof(token->startTime)) < 1) {
  	return TKT_FIL_FMT;
      }
      token->endTime = life_to_time(token->startTime, lifetime);
      token->kvno = kvno;
      return 0;
--- 1200,1209 ----
  	/* don't try to read a silly amount into ticket->dat */
  	token->ticketLen > MAXKTCTICKETLEN
  	|| tf_read((char *)(token->ticket), token->ticketLen) < 1
! 	|| tf_read((char *)&mit_compat, sizeof(mit_compat)) < 1) {
  	return TKT_FIL_FMT;
      }
+     token->startTime = mit_compat;
      token->endTime = life_to_time(token->startTime, lifetime);
      token->kvno = kvno;
      return 0;
***************
*** 1330,1335 ****
--- 1331,1337 ----
      off_t start;
      int lifetime, kvno;
      int count;			/* count for write */
+     long mit_compat;		/* MIT Kerberos 5 with Krb4 uses a "long" for issue_date */
  
      if (fd < 0) {		/* fd is ticket file as set by afs_tf_init */
  	return TKT_FIL_INI;
***************
*** 1399,1406 ****
      if (write(fd, atoken->ticket, count) != count)
  	goto bad;
      /* Issue date */
!     if (write(fd, (char *)&atoken->startTime, sizeof(afs_int32))
! 	!= sizeof(afs_int32))
  	goto bad;
  
      /* Actually, we should check each write for success */
--- 1401,1409 ----
      if (write(fd, atoken->ticket, count) != count)
  	goto bad;
      /* Issue date */
!     mit_compat = atoken->startTime;
!     if (write(fd, (char *)&mit_compat, sizeof(mit_compat))
! 	!= sizeof(mit_compat))
  	goto bad;
  
      /* Actually, we should check each write for success */
Index: openafs/src/bozo/bos.c
diff -c openafs/src/bozo/bos.c:1.20.2.2 openafs/src/bozo/bos.c:1.20.2.3
*** openafs/src/bozo/bos.c:1.20.2.2	Mon Oct 18 13:43:53 2004
--- openafs/src/bozo/bos.c	Tue Apr 10 14:43:40 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bos.c,v 1.20.2.2 2004/10/18 17:43:53 shadow Exp $");
  
  #include <afs/stds.h>
  #include <stdlib.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bos.c,v 1.20.2.3 2007/04/10 18:43:40 shadow Exp $");
  
  #include <afs/stds.h>
  #include <stdlib.h>
***************
*** 93,99 ****
      else if (acode == -3)
  	return "communications timeout (-3)";
      else
! 	return (char *)error_message(acode);
  }
  
  /* get partition id from a name */
--- 93,99 ----
      else if (acode == -3)
  	return "communications timeout (-3)";
      else
! 	return (char *)afs_error_message(acode);
  }
  
  /* get partition id from a name */
***************
*** 204,210 ****
  	 * local cell */
  	code = afsconf_GetCellInfo(tdir, tname, NULL, &info);
  	if (code) {
! 	    com_err("bos", code, "(can't find cell '%s' in cell database)",
  		    (tname ? tname : "<default>"));
  	    exit(1);
  	} else
--- 204,210 ----
  	 * local cell */
  	code = afsconf_GetCellInfo(tdir, tname, NULL, &info);
  	if (code) {
! 	    afs_com_err("bos", code, "(can't find cell '%s' in cell database)",
  		    (tname ? tname : "<default>"));
  	    exit(1);
  	} else
***************
*** 224,237 ****
  	if (as->parms[ADDPARMOFFSET + 2].items) {	/* -localauth */
  	    code = afsconf_GetLatestKey(tdir, 0, 0);
  	    if (code)
! 		com_err("bos", code, "(getting key from local KeyFile)");
  	    else {
  		if (aencrypt)
  		    code = afsconf_ClientAuthSecure(tdir, &sc[2], &scIndex);
  		else
  		    code = afsconf_ClientAuth(tdir, &sc[2], &scIndex);
  		if (code)
! 		    com_err("bos", code, "(calling ClientAuth)");
  		else if (scIndex != 2)	/* this shouldn't happen */
  		    sc[scIndex] = sc[2];
  	    }
--- 224,237 ----
  	if (as->parms[ADDPARMOFFSET + 2].items) {	/* -localauth */
  	    code = afsconf_GetLatestKey(tdir, 0, 0);
  	    if (code)
! 		afs_com_err("bos", code, "(getting key from local KeyFile)");
  	    else {
  		if (aencrypt)
  		    code = afsconf_ClientAuthSecure(tdir, &sc[2], &scIndex);
  		else
  		    code = afsconf_ClientAuth(tdir, &sc[2], &scIndex);
  		if (code)
! 		    afs_com_err("bos", code, "(calling ClientAuth)");
  		else if (scIndex != 2)	/* this shouldn't happen */
  		    sc[scIndex] = sc[2];
  	    }
***************
*** 258,264 ****
  						  ttoken.ticket);
  		scIndex = 2;
  	    } else
! 		com_err("bos", code, "(getting tickets)");
  	}
  	if ((scIndex == 0) || (sc[scIndex] == 0)) {
  	    fprintf(stderr, "bos: running unauthenticated\n");
--- 258,264 ----
  						  ttoken.ticket);
  		scIndex = 2;
  	    } else
! 		afs_com_err("bos", code, "(getting tickets)");
  	}
  	if ((scIndex == 0) || (sc[scIndex] == 0)) {
  	    fprintf(stderr, "bos: running unauthenticated\n");
***************
*** 300,306 ****
      }
      code = BOZO_SetNoAuthFlag(tconn, flag);
      if (code)
! 	com_err("bos", code, "(failed to set authentication flag)");
      return 0;
  }
  
--- 300,306 ----
      }
      code = BOZO_SetNoAuthFlag(tconn, flag);
      if (code)
! 	afs_com_err("bos", code, "(failed to set authentication flag)");
      return 0;
  }
  
***************
*** 368,374 ****
  	flags |= 0xff;
      code = BOZO_Prune(tconn, flags);
      if (code)
! 	com_err("bos", code, "(failed to prune server files)");
      return code;
  }
  
--- 368,374 ----
  	flags |= 0xff;
      code = BOZO_Prune(tconn, flags);
      if (code)
! 	afs_com_err("bos", code, "(failed to prune server files)");
      return code;
  }
  
***************
*** 1467,1473 ****
  
    done:
      if (code)
! 	com_err("bos", code, "(while reading log)");
      return code;
  }
  
--- 1467,1473 ----
  
    done:
      if (code)
! 	afs_com_err("bos", code, "(while reading log)");
      return code;
  }
  
Index: openafs/src/bozo/bosserver.c
diff -c openafs/src/bozo/bosserver.c:1.23.2.10 openafs/src/bozo/bosserver.c:1.23.2.11
*** openafs/src/bozo/bosserver.c:1.23.2.10	Thu Dec 21 18:15:35 2006
--- openafs/src/bozo/bosserver.c	Mon May 14 15:27:49 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bosserver.c,v 1.23.2.10 2006/12/21 23:15:35 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bosserver.c,v 1.23.2.11 2007/05/14 19:27:49 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 1100,1111 ****
  	    fprintf(bozo_logFile, "%s ", tdate);
  	    fprintf(bozo_logFile, a, b, c, d, e, f);
  	    fflush(bozo_logFile);
  	} else {
  	    printf("%s ", tdate);
  	    printf(a, b, c, d, e, f);
  	}
- 
- 	/* close so rm BosLog works */
- 	fclose(bozo_logFile);
      }
  }
--- 1100,1110 ----
  	    fprintf(bozo_logFile, "%s ", tdate);
  	    fprintf(bozo_logFile, a, b, c, d, e, f);
  	    fflush(bozo_logFile);
+ 	    /* close so rm BosLog works */
+ 	    fclose(bozo_logFile);
  	} else {
  	    printf("%s ", tdate);
  	    printf(a, b, c, d, e, f);
  	}
      }
  }
Index: openafs/src/bucoord/bc_status.c
diff -c openafs/src/bucoord/bc_status.c:1.11.2.1 openafs/src/bucoord/bc_status.c:1.11.2.2
*** openafs/src/bucoord/bc_status.c:1.11.2.1	Thu Jan  4 22:34:08 2007
--- openafs/src/bucoord/bc_status.c	Tue Apr 10 14:43:41 2007
***************
*** 11,17 ****
  #include <afs/stds.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/bc_status.c,v 1.11.2.1 2007/01/05 03:34:08 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/stds.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/bc_status.c,v 1.11.2.2 2007/04/10 18:43:41 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 119,125 ****
  
      code = cmd_ParseLine(internalCmdLine, targv, &targc, MAXV);
      if (code) {
! 	printf("Couldn't parse line: '%s'", error_message(code));
  	return (1);
      }
      free(internalCmdLine);
--- 119,125 ----
  
      code = cmd_ParseLine(internalCmdLine, targv, &targc, MAXV);
      if (code) {
! 	printf("Couldn't parse line: '%s'", afs_error_message(code));
  	return (1);
      }
      free(internalCmdLine);
***************
*** 267,274 ****
  	if (localTaskFlags & ABORT_REQUEST) {
  	    code = TC_RequestAbort(tconn, taskId);
  	    if (code) {
! 		com_err("statusWatcher", code, "; Can't post abort request");
! 		com_err("statusWatcher", 0, "...Deleting job");
  		if (localTaskFlags & NOREMOVE) {
  		    curPollPtr->flags |= (STARTING | TASK_ERROR);
  		    curPollPtr->scheduledDump = 0;
--- 267,274 ----
  	if (localTaskFlags & ABORT_REQUEST) {
  	    code = TC_RequestAbort(tconn, taskId);
  	    if (code) {
! 		afs_com_err("statusWatcher", code, "; Can't post abort request");
! 		afs_com_err("statusWatcher", 0, "...Deleting job");
  		if (localTaskFlags & NOREMOVE) {
  		    curPollPtr->flags |= (STARTING | TASK_ERROR);
  		    curPollPtr->scheduledDump = 0;
Index: openafs/src/bucoord/commands.c
diff -c openafs/src/bucoord/commands.c:1.14.2.7 openafs/src/bucoord/commands.c:1.14.2.9
*** openafs/src/bucoord/commands.c:1.14.2.7	Thu Jan  4 22:34:08 2007
--- openafs/src/bucoord/commands.c	Sat Jun 23 11:27:22 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/commands.c,v 1.14.2.7 2007/01/05 03:34:08 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.9 2007/06/23 15:27:22 shadow Exp $");
  
  #include <afs/stds.h>
  #if defined(AFS_LINUX24_ENV)
***************
*** 119,125 ****
      if (!(*ss)) {
  	*ss = (struct serversort *)malloc(sizeof(struct serversort));
  	if (!(*ss)) {
! 	    com_err(whoami, BC_NOMEM, "");
  	    *ss = 0;
  	    return (BC_NOMEM);
  	}
--- 119,125 ----
      if (!(*ss)) {
  	*ss = (struct serversort *)malloc(sizeof(struct serversort));
  	if (!(*ss)) {
! 	    afs_com_err(whoami, BC_NOMEM, "");
  	    *ss = 0;
  	    return (BC_NOMEM);
  	}
***************
*** 140,146 ****
      if (!(*ps)) {
  	*ps = (struct partitionsort *)malloc(sizeof(struct partitionsort));
  	if (!(*ps)) {
! 	    com_err(whoami, BC_NOMEM, "");
  	    free(*ss);
  	    *ps = 0;
  	    *ss = 0;
--- 140,146 ----
      if (!(*ps)) {
  	*ps = (struct partitionsort *)malloc(sizeof(struct partitionsort));
  	if (!(*ps)) {
! 	    afs_com_err(whoami, BC_NOMEM, "");
  	    free(*ss);
  	    *ps = 0;
  	    *ss = 0;
***************
*** 287,293 ****
  				 entries[e].serverPartition[ei], &servers,
  				 &ss, &ps);
  		if (tcode) {
! 		    com_err(whoami, tcode, "");
  		    ERROR(tcode);
  		}
  
--- 287,293 ----
  				 entries[e].serverPartition[ei], &servers,
  				 &ss, &ps);
  		if (tcode) {
! 		    afs_com_err(whoami, tcode, "");
  		    ERROR(tcode);
  		}
  
***************
*** 319,332 ****
  		    tvd = (struct bc_volumeDump *)
  			malloc(sizeof(struct bc_volumeDump));
  		    if (!tvd) {
! 			com_err(whoami, BC_NOMEM, "");
  			ERROR(BC_NOMEM);
  		    }
  		    memset(tvd, 0, sizeof(*tvd));
  
  		    tvd->name = (char *)malloc(strlen(entries[e].name) + 10);
  		    if (!(tvd->name)) {
! 			com_err(whoami, BC_NOMEM, "");
  			free(tvd);
  			ERROR(BC_NOMEM);
  		    }
--- 319,332 ----
  		    tvd = (struct bc_volumeDump *)
  			malloc(sizeof(struct bc_volumeDump));
  		    if (!tvd) {
! 			afs_com_err(whoami, BC_NOMEM, "");
  			ERROR(BC_NOMEM);
  		    }
  		    memset(tvd, 0, sizeof(*tvd));
  
  		    tvd->name = (char *)malloc(strlen(entries[e].name) + 10);
  		    if (!(tvd->name)) {
! 			afs_com_err(whoami, BC_NOMEM, "");
  			free(tvd);
  			ERROR(BC_NOMEM);
  		    }
***************
*** 489,495 ****
  		    sprintf(patt, "^%s$", tve->name);
  		    errm = (char *)re_comp(patt);
  		    if (errm) {
! 			com_err(whoami, 0,
  				"Can't compile regular expression '%s': %s",
  				patt, errm);
  			return (-1);
--- 489,495 ----
  		    sprintf(patt, "^%s$", tve->name);
  		    errm = (char *)re_comp(patt);
  		    if (errm) {
! 			afs_com_err(whoami, 0,
  				"Can't compile regular expression '%s': %s",
  				patt, errm);
  			return (-1);
***************
*** 543,549 ****
  		}
  
  		if (code < 0)
! 		    com_err(whoami, 0, "Internal error in regex package");
  	    }			/*s */
  
  	    /* If found a match, then create a new volume dump entry */
--- 543,549 ----
  		}
  
  		if (code < 0)
! 		    afs_com_err(whoami, 0, "Internal error in regex package");
  	    }			/*s */
  
  	    /* If found a match, then create a new volume dump entry */
***************
*** 554,560 ****
  				 entry.serverPartition[foundentry], &servers,
  				 &ss, &ps);
  		if (code) {
! 		    com_err(whoami, code, "");
  		    return (code);
  		}
  
--- 554,560 ----
  				 entry.serverPartition[foundentry], &servers,
  				 &ss, &ps);
  		if (code) {
! 		    afs_com_err(whoami, code, "");
  		    return (code);
  		}
  
***************
*** 562,575 ****
  		tvd = (struct bc_volumeDump *)
  		    malloc(sizeof(struct bc_volumeDump));
  		if (!tvd) {
! 		    com_err(whoami, BC_NOMEM, "");
  		    return (BC_NOMEM);
  		}
  		memset(tvd, 0, sizeof(*tvd));
  
  		tvd->name = (char *)malloc(strlen(entry.name) + 10);
  		if (!(tvd->name)) {
! 		    com_err(whoami, BC_NOMEM, "");
  		    free(tvd);
  		    return (BC_NOMEM);
  		}
--- 562,575 ----
  		tvd = (struct bc_volumeDump *)
  		    malloc(sizeof(struct bc_volumeDump));
  		if (!tvd) {
! 		    afs_com_err(whoami, BC_NOMEM, "");
  		    return (BC_NOMEM);
  		}
  		memset(tvd, 0, sizeof(*tvd));
  
  		tvd->name = (char *)malloc(strlen(entry.name) + 10);
  		if (!(tvd->name)) {
! 		    afs_com_err(whoami, BC_NOMEM, "");
  		    free(tvd);
  		    return (BC_NOMEM);
  		}
***************
*** 712,718 ****
      tlen = strlen(astring);
      tp = (char *)malloc(tlen + 1);	/* don't forget the terminating null */
      if (!tp) {
! 	com_err(whoami, BC_NOMEM, "");
  	return (tp);
      }
      strcpy(tp, astring);
--- 712,718 ----
      tlen = strlen(astring);
      tp = (char *)malloc(tlen + 1);	/* don't forget the terminating null */
      if (!tp) {
! 	afs_com_err(whoami, BC_NOMEM, "");
  	return (tp);
      }
      strcpy(tp, astring);
***************
*** 740,752 ****
      }
  
      if (length == 0) {		/* no string (0 length) */
! 	com_err(whoami, 0, "Can't have zero length date and time string");
  	return (NULL);
      }
  
      string = (char *)malloc(length);	/* allocate the string */
      if (!string) {
! 	com_err(whoami, BC_NOMEM, "");
  	return (NULL);
      }
      string[0] = 0;
--- 740,752 ----
      }
  
      if (length == 0) {		/* no string (0 length) */
! 	afs_com_err(whoami, 0, "Can't have zero length date and time string");
  	return (NULL);
      }
  
      string = (char *)malloc(length);	/* allocate the string */
      if (!string) {
! 	afs_com_err(whoami, BC_NOMEM, "");
  	return (NULL);
      }
      string[0] = 0;
***************
*** 809,818 ****
      portOffset = bc_SafeATOI(port);
  
      if (portOffset < 0) {
! 	com_err(whoami, 0, "Can't decode port offset '%s'", port);
  	return (-1);
      } else if (portOffset > BC_MAXPORTOFFSET) {
! 	com_err(whoami, 0, "%u exceeds max port offset %u", portOffset,
  		BC_MAXPORTOFFSET);
  	return (-1);
      }
--- 809,818 ----
      portOffset = bc_SafeATOI(port);
  
      if (portOffset < 0) {
! 	afs_com_err(whoami, 0, "Can't decode port offset '%s'", port);
  	return (-1);
      } else if (portOffset > BC_MAXPORTOFFSET) {
! 	afs_com_err(whoami, 0, "%u exceeds max port offset %u", portOffset,
  		BC_MAXPORTOFFSET);
  	return (-1);
      }
***************
*** 838,844 ****
  
      code = bc_UpdateHosts();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
--- 838,844 ----
  
      code = bc_UpdateHosts();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
***************
*** 861,867 ****
  	if (code) {
  	    if (code == TC_NOTASKS)
  		break;
! 	    com_err(whoami, code, "; Can't get status from butc");
  	    return (-1);
  	}
  	if ((flags & TSK_STAT_NOTFOUND))
--- 861,867 ----
  	if (code) {
  	    if (code == TC_NOTASKS)
  		break;
! 	    afs_com_err(whoami, code, "; Can't get status from butc");
  	    return (-1);
  	}
  	if ((flags & TSK_STAT_NOTFOUND))
***************
*** 897,903 ****
  
      extern dlqlinkT statusHead;
  
!     com_err(whoami, 0, "waiting for job termination");
  
      while (usefulJobRunning) {
  	usefulJobRunning = (dlqEmpty(&statusHead) ? 0 : 1);
--- 897,903 ----
  
      extern dlqlinkT statusHead;
  
!     afs_com_err(whoami, 0, "waiting for job termination");
  
      while (usefulJobRunning) {
  	usefulJobRunning = (dlqEmpty(&statusHead) ? 0 : 1);
***************
*** 1058,1064 ****
      if (strchr(tp, '.') == 0) {
  	slot = bc_SafeATOI(tp);
  	if (slot == -1) {
! 	    com_err(whoami, 0, "Bad syntax for number '%s'", tp);
  	    return -1;
  	}
  
--- 1058,1064 ----
      if (strchr(tp, '.') == 0) {
  	slot = bc_SafeATOI(tp);
  	if (slot == -1) {
! 	    afs_com_err(whoami, 0, "Bad syntax for number '%s'", tp);
  	    return -1;
  	}
  
***************
*** 1091,1097 ****
  	    }
  	}
  	if (i >= BC_MAXSIMDUMPS) {
! 	    com_err(whoami, 0, "Can't find job %s", tp);
  	    return -1;
  	}
  
--- 1091,1097 ----
  	    }
  	}
  	if (i >= BC_MAXSIMDUMPS) {
! 	    afs_com_err(whoami, 0, "Can't find job %s", tp);
  	    return -1;
  	}
  
***************
*** 1099,1105 ****
  	statusPtr = findStatus(td->dumpID);
  
  	if (statusPtr == 0) {
! 	    com_err(whoami, 0, "Can't locate status - internal error");
  	    unlock_Status();
  	    return (-1);
  	}
--- 1099,1105 ----
  	statusPtr = findStatus(td->dumpID);
  
  	if (statusPtr == 0) {
! 	    afs_com_err(whoami, 0, "Can't locate status - internal error");
  	    unlock_Status();
  	    return (-1);
  	}
***************
*** 1139,1144 ****
--- 1139,1145 ----
      afs_int32 code;
      int oldFlag;
      afs_int32 fromDate;
+     afs_int32 dumpID = 0;
      char *newExt, *timeString;
      afs_int32 i;
      afs_int32 *ports = NULL;
***************
*** 1147,1153 ****
  
      code = bc_UpdateHosts();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
--- 1148,1154 ----
  
      code = bc_UpdateHosts();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
***************
*** 1155,1161 ****
      if (as->parms[0].items) {
  	tp = as->parms[0].items->data;
  	if (bc_ParseHost(tp, &destServ)) {
! 	    com_err(whoami, 0, "Failed to locate destination host '%s'", tp);
  	    return -1;
  	}
      }
--- 1156,1162 ----
      if (as->parms[0].items) {
  	tp = as->parms[0].items->data;
  	if (bc_ParseHost(tp, &destServ)) {
! 	    afs_com_err(whoami, 0, "Failed to locate destination host '%s'", tp);
  	    return -1;
  	}
      }
***************
*** 1164,1170 ****
      if (as->parms[1].items) {
  	tp = as->parms[1].items->data;
  	if (bc_GetPartitionID(tp, &destPartition)) {
! 	    com_err(whoami, 0, "Can't parse destination partition '%s'", tp);
  	    return -1;
  	}
      }
--- 1165,1171 ----
      if (as->parms[1].items) {
  	tp = as->parms[1].items->data;
  	if (bc_GetPartitionID(tp, &destPartition)) {
! 	    afs_com_err(whoami, 0, "Can't parse destination partition '%s'", tp);
  	    return -1;
  	}
      }
***************
*** 1173,1186 ****
  	/* build list of volume items */
  	tvol = (struct bc_volumeDump *)malloc(sizeof(struct bc_volumeDump));
  	if (!tvol) {
! 	    com_err(whoami, BC_NOMEM, "");
  	    return BC_NOMEM;
  	}
  	memset(tvol, 0, sizeof(struct bc_volumeDump));
  
  	tvol->name = (char *)malloc(VOLSER_MAXVOLNAME + 1);
  	if (!tvol->name) {
! 	    com_err(whoami, BC_NOMEM, "");
  	    return BC_NOMEM;
  	}
  	strncpy(tvol->name, ti->data, VOLSER_OLDMAXVOLNAME);
--- 1174,1187 ----
  	/* build list of volume items */
  	tvol = (struct bc_volumeDump *)malloc(sizeof(struct bc_volumeDump));
  	if (!tvol) {
! 	    afs_com_err(whoami, BC_NOMEM, "");
  	    return BC_NOMEM;
  	}
  	memset(tvol, 0, sizeof(struct bc_volumeDump));
  
  	tvol->name = (char *)malloc(VOLSER_MAXVOLNAME + 1);
  	if (!tvol->name) {
! 	    afs_com_err(whoami, BC_NOMEM, "");
  	    return BC_NOMEM;
  	}
  	strncpy(tvol->name, ti->data, VOLSER_OLDMAXVOLNAME);
***************
*** 1201,1208 ****
  	code = ktime_DateToLong(timeString, &fromDate);
  	free(timeString);
  	if (code) {
! 	    com_err(whoami, 0, "Can't parse restore date and time");
! 	    com_err(whoami, 0, "%s", ktime_GetDateUsage());
  	    return code;
  	}
      } else {
--- 1202,1209 ----
  	code = ktime_DateToLong(timeString, &fromDate);
  	free(timeString);
  	if (code) {
! 	    afs_com_err(whoami, 0, "Can't parse restore date and time");
! 	    afs_com_err(whoami, 0, "%s", ktime_GetDateUsage());
  	    return code;
  	}
      } else {
***************
*** 1220,1226 ****
  	    portCount++;
  	ports = (afs_int32 *) malloc(portCount * sizeof(afs_int32));
  	if (!ports) {
! 	    com_err(whoami, BC_NOMEM, "");
  	    return BC_NOMEM;
  	}
  
--- 1221,1227 ----
  	    portCount++;
  	ports = (afs_int32 *) malloc(portCount * sizeof(afs_int32));
  	if (!ports) {
! 	    afs_com_err(whoami, BC_NOMEM, "");
  	    return BC_NOMEM;
  	}
  
***************
*** 1233,1249 ****
  
      dontExecute = (as->parms[6].items ? 1 : 0);	/* -n */
  
      /*
       * Perform the call to start the restore.
       */
      code =
  	bc_StartDmpRst(bc_globalConfig, "volume", "restore", volsToRestore,
  		       &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");
  
      return (code);
  }
--- 1234,1257 ----
  
      dontExecute = (as->parms[6].items ? 1 : 0);	/* -n */
  
+     if (as->parms[7].items)
+       {
+ 	dumpID = atoi(as->parms[7].items->data);
+ 	if (dumpID <= 0)
+ 	  dumpID = 0;
+       }
+     
      /*
       * Perform the call to start the restore.
       */
      code =
  	bc_StartDmpRst(bc_globalConfig, "volume", "restore", volsToRestore,
  		       &destServ, destPartition, fromDate, newExt, oldFlag,
! 		       /*parentDump */ dumpID, /*dumpLevel */ 0,
  		       bc_Restorer, ports, portCount,
  		       /*dumpSched */ NULL, /*append */ 0, dontExecute);
      if (code)
! 	afs_com_err(whoami, code, "; Failed to queue restore");
  
      return (code);
  }
***************
*** 1289,1300 ****
  
      code = bc_UpdateVolumeSet();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
      code = bc_UpdateHosts();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
--- 1297,1308 ----
  
      code = bc_UpdateVolumeSet();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
      code = bc_UpdateHosts();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
***************
*** 1307,1319 ****
      tvolumeEntry.partname = as->parms[1].items->data;
  
      if (bc_GetPartitionID(tvolumeEntry.partname, &tvolumeEntry.partition)) {
! 	com_err(whoami, 0, "Can't parse partition '%s'",
  		tvolumeEntry.partname);
  	return -1;
      }
  
      if (bc_ParseHost(tvolumeEntry.serverName, &tvolumeEntry.server)) {
! 	com_err(whoami, 0, "Can't locate host '%s'", tvolumeEntry.serverName);
  	return -1;
      }
  
--- 1315,1327 ----
      tvolumeEntry.partname = as->parms[1].items->data;
  
      if (bc_GetPartitionID(tvolumeEntry.partname, &tvolumeEntry.partition)) {
! 	afs_com_err(whoami, 0, "Can't parse partition '%s'",
  		tvolumeEntry.partname);
  	return -1;
      }
  
      if (bc_ParseHost(tvolumeEntry.serverName, &tvolumeEntry.server)) {
! 	afs_com_err(whoami, 0, "Can't locate host '%s'", tvolumeEntry.serverName);
  	return -1;
      }
  
***************
*** 1321,1327 ****
      if (as->parms[8].items) {
  	tp = as->parms[8].items->data;
  	if (bc_ParseHost(tp, &destServ)) {
! 	    com_err(whoami, 0, "Can't locate destination host '%s'", tp);
  	    return -1;
  	}
      } else			/* use destination host == original host */
--- 1329,1335 ----
      if (as->parms[8].items) {
  	tp = as->parms[8].items->data;
  	if (bc_ParseHost(tp, &destServ)) {
! 	    afs_com_err(whoami, 0, "Can't locate destination host '%s'", tp);
  	    return -1;
  	}
      } else			/* use destination host == original host */
***************
*** 1331,1337 ****
      if (as->parms[9].items) {
  	tp = as->parms[9].items->data;
  	if (bc_GetPartitionID(tp, &destPartition)) {
! 	    com_err(whoami, 0, "Can't parse destination partition '%s'", tp);
  	    return -1;
  	}
      } else			/* use original partition */
--- 1339,1345 ----
      if (as->parms[9].items) {
  	tp = as->parms[9].items->data;
  	if (bc_GetPartitionID(tp, &destPartition)) {
! 	    afs_com_err(whoami, 0, "Can't parse destination partition '%s'", tp);
  	    return -1;
  	}
      } else			/* use original partition */
***************
*** 1344,1350 ****
  	    portCount++;
  	ports = (afs_int32 *) malloc(portCount * sizeof(afs_int32));
  	if (!ports) {
! 	    com_err(whoami, BC_NOMEM, "");
  	    return BC_NOMEM;
  	}
  
--- 1352,1358 ----
  	    portCount++;
  	ports = (afs_int32 *) malloc(portCount * sizeof(afs_int32));
  	if (!ports) {
! 	    afs_com_err(whoami, BC_NOMEM, "");
  	    return BC_NOMEM;
  	}
  
***************
*** 1365,1371 ****
  	bc_EvalVolumeSet(bc_globalConfig, &tvolumeSet, &volsToRestore,
  			 cstruct);
      if (code) {
! 	com_err(whoami, code, "; Failed to evaluate volume set");
  	return (-1);
      }
  
--- 1373,1379 ----
  	bc_EvalVolumeSet(bc_globalConfig, &tvolumeSet, &volsToRestore,
  			 cstruct);
      if (code) {
! 	afs_com_err(whoami, code, "; Failed to evaluate volume set");
  	return (-1);
      }
  
***************
*** 1406,1412 ****
  		       bc_Restorer, ports, portCount,
  		       /*dumpSched */ NULL, /*append */ 0, dontExecute);
      if (code)
! 	com_err(whoami, code, "; Failed to queue restore");
  
      return (code);
  }
--- 1414,1420 ----
  		       bc_Restorer, ports, portCount,
  		       /*dumpSched */ NULL, /*append */ 0, dontExecute);
      if (code)
! 	afs_com_err(whoami, code, "; Failed to queue restore");
  
      return (code);
  }
***************
*** 1439,1463 ****
  
      code = bc_UpdateVolumeSet();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
      code = bc_UpdateHosts();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
      if (as->parms[0].items) {
  	if (as->parms[1].items) {
! 	    com_err(whoami, 0, "Can't have both -name and -file options");
  	    return (-1);
  	}
  
  	volsetName = as->parms[0].items->data;
  	volsetPtr = bc_FindVolumeSet(bc_globalConfig, volsetName);
  	if (!volsetPtr) {
! 	    com_err(whoami, 0,
  		    "Can't find volume set '%s' in backup database",
  		    volsetName);
  	    return (-1);
--- 1447,1471 ----
  
      code = bc_UpdateVolumeSet();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
      code = bc_UpdateHosts();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
      if (as->parms[0].items) {
  	if (as->parms[1].items) {
! 	    afs_com_err(whoami, 0, "Can't have both -name and -file options");
  	    return (-1);
  	}
  
  	volsetName = as->parms[0].items->data;
  	volsetPtr = bc_FindVolumeSet(bc_globalConfig, volsetName);
  	if (!volsetPtr) {
! 	    afs_com_err(whoami, 0,
  		    "Can't find volume set '%s' in backup database",
  		    volsetName);
  	    return (-1);
***************
*** 1468,1474 ****
  	    bc_EvalVolumeSet(bc_globalConfig, volsetPtr, &volsToRestore,
  			     cstruct);
  	if (code) {
! 	    com_err(whoami, code, "; Failed to evaluate volume set");
  	    return (-1);
  	}
      } else if (as->parms[1].items) {
--- 1476,1482 ----
  	    bc_EvalVolumeSet(bc_globalConfig, volsetPtr, &volsToRestore,
  			     cstruct);
  	if (code) {
! 	    afs_com_err(whoami, code, "; Failed to evaluate volume set");
  	    return (-1);
  	}
      } else if (as->parms[1].items) {
***************
*** 1480,1486 ****
  
  	fd = fopen(as->parms[1].items->data, "r");
  	if (!fd) {
! 	    com_err(whoami, errno, "; Cannot open file '%s'",
  		    as->parms[1].items->data);
  	    return (-1);
  	}
--- 1488,1494 ----
  
  	fd = fopen(as->parms[1].items->data, "r");
  	if (!fd) {
! 	    afs_com_err(whoami, errno, "; Cannot open file '%s'",
  		    as->parms[1].items->data);
  	    return (-1);
  	}
***************
*** 1499,1510 ****
  	    }
  
  	    if (bc_ParseHost(server, &destServer)) {
! 		com_err(whoami, 0, "Failed to locate host '%s'", server);
  		continue;
  	    }
  
  	    if (bc_GetPartitionID(partition, &destPartition)) {
! 		com_err(whoami, 0,
  			"Failed to parse destination partition '%s'",
  			partition);
  		continue;
--- 1507,1518 ----
  	    }
  
  	    if (bc_ParseHost(server, &destServer)) {
! 		afs_com_err(whoami, 0, "Failed to locate host '%s'", server);
  		continue;
  	    }
  
  	    if (bc_GetPartitionID(partition, &destPartition)) {
! 		afs_com_err(whoami, 0,
  			"Failed to parse destination partition '%s'",
  			partition);
  		continue;
***************
*** 1517,1523 ****
  
  	    tvol->name = (char *)malloc(VOLSER_MAXVOLNAME + 1);
  	    if (!tvol->name) {
! 		com_err(whoami, BC_NOMEM, "");
  		return BC_NOMEM;
  	    }
  	    strncpy(tvol->name, volume, VOLSER_OLDMAXVOLNAME);
--- 1525,1531 ----
  
  	    tvol->name = (char *)malloc(VOLSER_MAXVOLNAME + 1);
  	    if (!tvol->name) {
! 		afs_com_err(whoami, BC_NOMEM, "");
  		return BC_NOMEM;
  	    }
  	    strncpy(tvol->name, volume, VOLSER_OLDMAXVOLNAME);
***************
*** 1532,1538 ****
  	}
  	fclose(fd);
      } else {
! 	com_err(whoami, 0, "-name or -file option required");
  	return (-1);
      }
  
--- 1540,1546 ----
  	}
  	fclose(fd);
      } else {
! 	afs_com_err(whoami, 0, "-name or -file option required");
  	return (-1);
      }
  
***************
*** 1543,1549 ****
  	    portCount++;
  	ports = (afs_int32 *) malloc(portCount * sizeof(afs_int32));
  	if (!ports) {
! 	    com_err(whoami, BC_NOMEM, "");
  	    return BC_NOMEM;
  	}
  
--- 1551,1557 ----
  	    portCount++;
  	ports = (afs_int32 *) malloc(portCount * sizeof(afs_int32));
  	if (!ports) {
! 	    afs_com_err(whoami, BC_NOMEM, "");
  	    return BC_NOMEM;
  	}
  
***************
*** 1568,1574 ****
  			  bc_Restorer, ports, portCount,
  			  /*dumpSched */ NULL, /*append */ 0, dontExecute);
      if (code)
! 	com_err(whoami, code, "; Failed to queue restore");
  
      return code;
  }
--- 1576,1582 ----
  			  bc_Restorer, ports, portCount,
  			  /*dumpSched */ NULL, /*append */ 0, dontExecute);
      if (code)
! 	afs_com_err(whoami, code, "; Failed to queue restore");
  
      return code;
  }
***************
*** 1631,1647 ****
  
      code = bc_UpdateDumpSchedule();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve dump schedule");
  	return (code);
      }
      code = bc_UpdateVolumeSet();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
      code = bc_UpdateHosts();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
--- 1639,1655 ----
  
      code = bc_UpdateDumpSchedule();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve dump schedule");
  	return (code);
      }
      code = bc_UpdateVolumeSet();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
      code = bc_UpdateHosts();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
***************
*** 1654,1666 ****
  	loadfile = 1;
  	if (as->parms[0].items || as->parms[1].items || as->parms[2].items
  	    || as->parms[4].items) {
! 	    com_err(whoami, 0, "Invalid option specified with -file option");
  	    return -1;
  	}
      } else {
  	loadfile = 0;
  	if (!as->parms[0].items || !as->parms[1].items) {
! 	    com_err(whoami, 0,
  		    "Must specify volume set name and dump level name");
  	    return -1;
  	}
--- 1662,1674 ----
  	loadfile = 1;
  	if (as->parms[0].items || as->parms[1].items || as->parms[2].items
  	    || as->parms[4].items) {
! 	    afs_com_err(whoami, 0, "Invalid option specified with -file option");
  	    return -1;
  	}
      } else {
  	loadfile = 0;
  	if (!as->parms[0].items || !as->parms[1].items) {
! 	    afs_com_err(whoami, 0,
  		    "Must specify volume set name and dump level name");
  	    return -1;
  	}
***************
*** 1682,1689 ****
  	code = ktime_DateToLong(timeString, &atTime);
  	free(timeString);
  	if (code) {
! 	    com_err(whoami, 0, "Can't parse dump start date and time");
! 	    com_err(whoami, 0, "%s", ktime_GetDateUsage());
  	    return (1);
  	}
      } else
--- 1690,1697 ----
  	code = ktime_DateToLong(timeString, &atTime);
  	free(timeString);
  	if (code) {
! 	    afs_com_err(whoami, 0, "Can't parse dump start date and time");
! 	    afs_com_err(whoami, 0, "%s", ktime_GetDateUsage());
  	    return (1);
  	}
      } else
***************
*** 1703,1709 ****
  	    portCount = 1;
  	    portp = (afs_int32 *) malloc(sizeof(afs_int32));
  	    if (!portp) {
! 		com_err(whoami, BC_NOMEM, "");
  		return BC_NOMEM;
  	    }
  
--- 1711,1717 ----
  	    portCount = 1;
  	    portp = (afs_int32 *) malloc(sizeof(afs_int32));
  	    if (!portp) {
! 		afs_com_err(whoami, BC_NOMEM, "");
  		return BC_NOMEM;
  	    }
  
***************
*** 1719,1731 ****
  	 */
  	tvs = bc_FindVolumeSet(bc_globalConfig, vsName);
  	if (!tvs) {
! 	    com_err(whoami, 0,
  		    "Can't find volume set '%s' in backup database", vsName);
  	    return (-1);
  	}
  	baseds = bc_FindDumpSchedule(bc_globalConfig, dumpPath);
  	if (!baseds) {
! 	    com_err(whoami, 0,
  		    "Can't find dump schedule '%s' in backup database",
  		    dumpPath);
  	    return (-1);
--- 1727,1739 ----
  	 */
  	tvs = bc_FindVolumeSet(bc_globalConfig, vsName);
  	if (!tvs) {
! 	    afs_com_err(whoami, 0,
  		    "Can't find volume set '%s' in backup database", vsName);
  	    return (-1);
  	}
  	baseds = bc_FindDumpSchedule(bc_globalConfig, dumpPath);
  	if (!baseds) {
! 	    afs_com_err(whoami, 0,
  		    "Can't find dump schedule '%s' in backup database",
  		    dumpPath);
  	    return (-1);
***************
*** 1745,1751 ****
       */
      if (doAt) {
  	if (atTime < time(0)) {
! 	    com_err(whoami, 0,
  		    "Time of dump is earlier then current time - not added");
  	} else {
  	    statusPtr = createStatusNode();
--- 1753,1759 ----
       */
      if (doAt) {
  	if (atTime < time(0)) {
! 	    afs_com_err(whoami, 0,
  		    "Time of dump is earlier then current time - not added");
  	} else {
  	    statusPtr = createStatusNode();
***************
*** 1784,1790 ****
  	    statusPtr->scheduledDump = atTime;
  	    statusPtr->cmdLine = (char *)malloc(length);
  	    if (!statusPtr->cmdLine) {
! 		com_err(whoami, BC_NOMEM, "");
  		return BC_NOMEM;
  	    }
  
--- 1792,1798 ----
  	    statusPtr->scheduledDump = atTime;
  	    statusPtr->cmdLine = (char *)malloc(length);
  	    if (!statusPtr->cmdLine) {
! 		afs_com_err(whoami, BC_NOMEM, "");
  		return BC_NOMEM;
  	    }
  
***************
*** 1818,1824 ****
  
  	    printf("Add scheduled dump as job %d\n", statusPtr->jobNumber);
  	    if ((atTime > ttoken.endTime) && (ttoken.endTime != NEVERDATE))
! 		com_err(whoami, 0,
  			"Warning: job %d starts after expiration of AFS token",
  			statusPtr->jobNumber);
  
--- 1826,1832 ----
  
  	    printf("Add scheduled dump as job %d\n", statusPtr->jobNumber);
  	    if ((atTime > ttoken.endTime) && (ttoken.endTime != NEVERDATE))
! 		afs_com_err(whoami, 0,
  			"Warning: job %d starts after expiration of AFS token",
  			statusPtr->jobNumber);
  
***************
*** 1836,1842 ****
      if (loadfile) {
  	loadFile = (char *)malloc(strlen(as->parms[6].items->data) + 1);
  	if (!loadFile) {
! 	    com_err(whoami, BC_NOMEM, "");
  	    return BC_NOMEM;
  	}
  	strcpy(loadFile, as->parms[6].items->data);
--- 1844,1850 ----
      if (loadfile) {
  	loadFile = (char *)malloc(strlen(as->parms[6].items->data) + 1);
  	if (!loadFile) {
! 	    afs_com_err(whoami, BC_NOMEM, "");
  	    return BC_NOMEM;
  	}
  	strcpy(loadFile, as->parms[6].items->data);
***************
*** 1898,1904 ****
       * dump at the level we requested it be done at.
       */
      if (problemFindingDump) {
! 	com_err(whoami, 0,
  		"Warning: Doing level %d dump due to missing higher-level dumps",
  		level);
  	if (parent) {
--- 1906,1912 ----
       * dump at the level we requested it be done at.
       */
      if (problemFindingDump) {
! 	afs_com_err(whoami, 0,
  		"Warning: Doing level %d dump due to missing higher-level dumps",
  		level);
  	if (parent) {
***************
*** 1911,1917 ****
      /* Expand out the volume set into its component list of volumes. */
      code = bc_EvalVolumeSet(bc_globalConfig, tvs, &volsToDump, cstruct);
      if (code) {
! 	com_err(whoami, code, "; Failed to evaluate volume set");
  	return (-1);
      }
      if (!volsToDump) {
--- 1919,1925 ----
      /* Expand out the volume set into its component list of volumes. */
      code = bc_EvalVolumeSet(bc_globalConfig, tvs, &volsToDump, cstruct);
      if (code) {
! 	afs_com_err(whoami, code, "; Failed to evaluate volume set");
  	return (-1);
      }
      if (!volsToDump) {
***************
*** 1941,1947 ****
  		    tve->cloneDate = 0;
  
  		if (tve->cloneDate && (tve->cloneDate == tve->date)) {
! 		    com_err(whoami, 0,
  			    "Warning: Timestamp on volume %s unchanged from previous dump",
  			    tve->name);
  		}
--- 1949,1955 ----
  		    tve->cloneDate = 0;
  
  		if (tve->cloneDate && (tve->cloneDate == tve->date)) {
! 		    afs_com_err(whoami, 0,
  			    "Warning: Timestamp on volume %s unchanged from previous dump",
  			    tve->name);
  		}
***************
*** 1966,1972 ****
  			  parent, level, bc_Dumper, portp, /*portCount */ 1,
  			  baseds, doAppend, dontExecute);
      if (code)
! 	com_err(whoami, code, "; Failed to queue dump");
  
      return (code);
  }				/*bc_DumpCmd */
--- 1974,1980 ----
  			  parent, level, bc_Dumper, portp, /*portCount */ 1,
  			  baseds, doAppend, dontExecute);
      if (code)
! 	afs_com_err(whoami, code, "; Failed to queue dump");
  
      return (code);
  }				/*bc_DumpCmd */
***************
*** 1996,2004 ****
  	statusPtr = (statusP) ptr;
  	if (!(statusPtr->flags & ABORT_REQUEST)) {
  	    unlock_Status();
! 	    com_err(whoami, 0, "Job %d still running (and not aborted)",
  		    statusPtr->jobNumber);
! 	    com_err(whoami, 0,
  		    "You must at least 'kill' all running jobs before quitting");
  	    return -1;
  	}
--- 2004,2012 ----
  	statusPtr = (statusP) ptr;
  	if (!(statusPtr->flags & ABORT_REQUEST)) {
  	    unlock_Status();
! 	    afs_com_err(whoami, 0, "Job %d still running (and not aborted)",
  		    statusPtr->jobNumber);
! 	    afs_com_err(whoami, 0,
  		    "You must at least 'kill' all running jobs before quitting");
  	    return -1;
  	}
***************
*** 2010,2017 ****
       */
      for (td = bc_dumpTasks, i = 0; i < BC_MAXSIMDUMPS; i++, td++) {
  	if (td->flags & BC_DI_INUSE) {
! 	    com_err(whoami, 0, "A job is still running");
! 	    com_err(whoami, 0,
  		    "You must at least 'kill' all running jobs before quitting");
  	    return -1;
  	}
--- 2018,2025 ----
       */
      for (td = bc_dumpTasks, i = 0; i < BC_MAXSIMDUMPS; i++, td++) {
  	if (td->flags & BC_DI_INUSE) {
! 	    afs_com_err(whoami, 0, "A job is still running");
! 	    afs_com_err(whoami, 0,
  		    "You must at least 'kill' all running jobs before quitting");
  	    return -1;
  	}
***************
*** 2042,2067 ****
  
      code = bc_UpdateHosts();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
      if (as->parms[0].items) {	/* -name */
  	tapename = as->parms[0].items->data;
  	if (strlen(tapename) >= TC_MAXTAPELEN) {
! 	    com_err(whoami, 0, "AFS tape name '%s' is too long", tapename);
  	    return -1;
  	}
      }
  
      if (as->parms[3].items) {	/* -pname */
  	if (tapename) {
! 	    com_err(whoami, 0, "Can only specify -name or -pname");
  	    return -1;
  	}
  	pname = as->parms[3].items->data;
  	if (strlen(pname) >= TC_MAXTAPELEN) {
! 	    com_err(whoami, 0, "Permanent tape name '%s' is too long", pname);
  	    return -1;
  	}
      }
--- 2050,2075 ----
  
      code = bc_UpdateHosts();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
      if (as->parms[0].items) {	/* -name */
  	tapename = as->parms[0].items->data;
  	if (strlen(tapename) >= TC_MAXTAPELEN) {
! 	    afs_com_err(whoami, 0, "AFS tape name '%s' is too long", tapename);
  	    return -1;
  	}
      }
  
      if (as->parms[3].items) {	/* -pname */
  	if (tapename) {
! 	    afs_com_err(whoami, 0, "Can only specify -name or -pname");
  	    return -1;
  	}
  	pname = as->parms[3].items->data;
  	if (strlen(pname) >= TC_MAXTAPELEN) {
! 	    afs_com_err(whoami, 0, "Permanent tape name '%s' is too long", pname);
  	    return -1;
  	}
      }
***************
*** 2069,2075 ****
      if (as->parms[1].items) {
  	size = bc_FloatATOI(as->parms[1].items->data);
  	if (size == -1) {
! 	    com_err(whoami, 0, "Bad syntax for tape size '%s'",
  		    as->parms[1].items->data);
  	    return -1;
  	}
--- 2077,2083 ----
      if (as->parms[1].items) {
  	size = bc_FloatATOI(as->parms[1].items->data);
  	if (size == -1) {
! 	    afs_com_err(whoami, 0, "Bad syntax for tape size '%s'",
  		    as->parms[1].items->data);
  	    return -1;
  	}
***************
*** 2103,2109 ****
  
      code = bc_UpdateHosts();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
--- 2111,2117 ----
  
      code = bc_UpdateHosts();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
***************
*** 2134,2140 ****
  
      code = bc_UpdateHosts();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
--- 2142,2148 ----
  
      code = bc_UpdateHosts();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
***************
*** 2275,2281 ****
  		  &host);
  
      if (code) {
! 	com_err(whoami, code, "; Unable to verify database");
  	return (-1);
      }
  
--- 2283,2289 ----
  		  &host);
  
      if (code) {
! 	afs_com_err(whoami, code, "; Unable to verify database");
  	return (-1);
      }
  
***************
*** 2284,2290 ****
      if (status == 0)
  	printf("Database OK\n");
      else
! 	com_err(whoami, status, "; Database is NOT_OK");
  
      if (detail) {
  	printf("Orphan blocks %d\n", orphans);
--- 2292,2298 ----
      if (status == 0)
  	printf("Database OK\n");
      else
! 	afs_com_err(whoami, status, "; Database is NOT_OK");
  
      if (detail) {
  	printf("Orphan blocks %d\n", orphans);
***************
*** 2324,2337 ****
      if (port >= 0) {
  	tcode = bc_UpdateHosts();
  	if (tcode) {
! 	    com_err(whoami, tcode, "; Can't retrieve tape hosts");
  	    ERROR(tcode);
  	}
  
  	/* Find the dump in the backup database */
  	tcode = bcdb_FindDumpByID(dumpid, &dumpEntry);
  	if (tcode) {
! 	    com_err(whoami, tcode, "; Unable to locate dumpID %u in database",
  		    dumpid);
  	    ERROR(tcode);
  	}
--- 2332,2345 ----
      if (port >= 0) {
  	tcode = bc_UpdateHosts();
  	if (tcode) {
! 	    afs_com_err(whoami, tcode, "; Can't retrieve tape hosts");
  	    ERROR(tcode);
  	}
  
  	/* Find the dump in the backup database */
  	tcode = bcdb_FindDumpByID(dumpid, &dumpEntry);
  	if (tcode) {
! 	    afs_com_err(whoami, tcode, "; Unable to locate dumpID %u in database",
  		    dumpid);
  	    ERROR(tcode);
  	}
***************
*** 2351,2357 ****
  	    if (tcode) {
  		if (tcode == RXGEN_OPCODE)
  		    tcode = BC_VERSIONFAIL;
! 		com_err(whoami, tcode,
  			"; Unable to delete dumpID %u via butc", dumpid);
  		ERROR(tcode);
  	    }
--- 2359,2365 ----
  	    if (tcode) {
  		if (tcode == RXGEN_OPCODE)
  		    tcode = BC_VERSIONFAIL;
! 		afs_com_err(whoami, tcode,
  			"; Unable to delete dumpID %u via butc", dumpid);
  		ERROR(tcode);
  	    }
***************
*** 2369,2375 ****
  	    /* Wait for task to finish */
  	    taskflag = waitForTask(taskId);
  	    if (taskflag & (TASK_ERROR | ABORT_DONE)) {
! 		com_err(whoami, BUTX_DELETEOBJFAIL,
  			"; Unable to delete dumpID %u via butc", dumpid);
  		ERROR(BUTX_DELETEOBJFAIL);	/* the task failed */
  	    }
--- 2377,2383 ----
  	    /* Wait for task to finish */
  	    taskflag = waitForTask(taskId);
  	    if (taskflag & (TASK_ERROR | ABORT_DONE)) {
! 		afs_com_err(whoami, BUTX_DELETEOBJFAIL,
  			"; Unable to delete dumpID %u via butc", dumpid);
  		ERROR(BUTX_DELETEOBJFAIL);	/* the task failed */
  	    }
***************
*** 2389,2395 ****
  
  	tcode = bcdb_deleteDump(dumpid, 0, 0, &dumps);
  	if (tcode) {
! 	    com_err(whoami, tcode,
  		    "; Unable to delete dumpID %u from database", dumpid);
  	    dumps.budb_dumpsList_len = 0;
  	    if (!code)
--- 2397,2403 ----
  
  	tcode = bcdb_deleteDump(dumpid, 0, 0, &dumps);
  	if (tcode) {
! 	    afs_com_err(whoami, tcode,
  		    "; Unable to delete dumpID %u from database", dumpid);
  	    dumps.budb_dumpsList_len = 0;
  	    if (!code)
***************
*** 2431,2443 ****
      /* Must specify at least one of -dumpid, -from, or -to */
      if (!as->parms[0].items && !as->parms[1].items && !as->parms[2].items
  	&& !as->parms[4].items) {
! 	com_err(whoami, 0, "Must specify at least one field");
  	return (-1);
      }
  
      /* Must have -to option with -from option */
      if (as->parms[1].items && !as->parms[2].items) {
! 	com_err(whoami, 0, "Must specify '-to' field with '-from' field");
  	return (-1);
      }
  
--- 2439,2451 ----
      /* Must specify at least one of -dumpid, -from, or -to */
      if (!as->parms[0].items && !as->parms[1].items && !as->parms[2].items
  	&& !as->parms[4].items) {
! 	afs_com_err(whoami, 0, "Must specify at least one field");
  	return (-1);
      }
  
      /* Must have -to option with -from option */
      if (as->parms[1].items && !as->parms[2].items) {
! 	afs_com_err(whoami, 0, "Must specify '-to' field with '-from' field");
  	return (-1);
      }
  
***************
*** 2453,2460 ****
  	code = ktime_DateToLong(timeString, &fromTime);
  	free(timeString);
  	if (code) {
! 	    com_err(whoami, 0, "Can't parse 'from' date and time");
! 	    com_err(whoami, 0, "%s", ktime_GetDateUsage());
  	    return (-1);
  	}
  	havetime = 1;
--- 2461,2468 ----
  	code = ktime_DateToLong(timeString, &fromTime);
  	free(timeString);
  	if (code) {
! 	    afs_com_err(whoami, 0, "Can't parse 'from' date and time");
! 	    afs_com_err(whoami, 0, "%s", ktime_GetDateUsage());
  	    return (-1);
  	}
  	havetime = 1;
***************
*** 2485,2492 ****
  	code = ktime_DateToLong(timeString, &toTime);
  	free(timeString);
  	if (code) {
! 	    com_err(whoami, 0, "Can't parse 'to' date and time");
! 	    com_err(whoami, 0, "%s", ktime_GetDateUsage());
  	    return (-1);
  	}
  	toTime += 59;
--- 2493,2500 ----
  	code = ktime_DateToLong(timeString, &toTime);
  	free(timeString);
  	if (code) {
! 	    afs_com_err(whoami, 0, "Can't parse 'to' date and time");
! 	    afs_com_err(whoami, 0, "%s", ktime_GetDateUsage());
  	    return (-1);
  	}
  	toTime += 59;
***************
*** 2494,2500 ****
      }
  
      if (fromTime > toTime) {
! 	com_err(whoami, 0,
  		"'-from' date/time cannot be later than '-to' date/time");
  	return (-1);
      }
--- 2502,2508 ----
      }
  
      if (fromTime > toTime) {
! 	afs_com_err(whoami, 0,
  		"'-from' date/time cannot be later than '-to' date/time");
  	return (-1);
      }
***************
*** 2528,2534 ****
  	code =
  	    bcdb_listDumps(sflags, groupId, fromTime, toTime, &dumps, &flags);
  	if (code) {
! 	    com_err(whoami, code,
  		    "; Error while deleting dumps from %u to %u", fromTime,
  		    toTime);
  	    rcode = -1;
--- 2536,2542 ----
  	code =
  	    bcdb_listDumps(sflags, groupId, fromTime, toTime, &dumps, &flags);
  	if (code) {
! 	    afs_com_err(whoami, code,
  		    "; Error while deleting dumps from %u to %u", fromTime,
  		    toTime);
  	    rcode = -1;
***************
*** 2582,2588 ****
  
      code = bc_UpdateHosts();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
--- 2590,2596 ----
  
      code = bc_UpdateHosts();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
***************
*** 2605,2612 ****
  	code = ktime_DateToLong(timeString, &toTime);
  	free(timeString);
  	if (code) {
! 	    com_err(whoami, 0, "Can't parse '-archive' date and time");
! 	    com_err(whoami, 0, "%s", ktime_GetDateUsage());
  	    return (-1);
  	}
  	toTime += 59;
--- 2613,2620 ----
  	code = ktime_DateToLong(timeString, &toTime);
  	free(timeString);
  	if (code) {
! 	    afs_com_err(whoami, 0, "Can't parse '-archive' date and time");
! 	    afs_com_err(whoami, 0, "%s", ktime_GetDateUsage());
  	    return (-1);
  	}
  	toTime += 59;
***************
*** 2619,2625 ****
  
      code = TC_SaveDb(tconn, toTime, &taskId);
      if (code) {
! 	com_err(whoami, code, "; Failed to save database");
  	goto exit;
      }
  
--- 2627,2633 ----
  
      code = TC_SaveDb(tconn, toTime, &taskId);
      if (code) {
! 	afs_com_err(whoami, code, "; Failed to save database");
  	goto exit;
      }
  
***************
*** 2650,2656 ****
  
      code = bc_UpdateHosts();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
--- 2658,2664 ----
  
      code = bc_UpdateHosts();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
***************
*** 2666,2672 ****
  
      code = TC_RestoreDb(tconn, &taskId);
      if (code) {
! 	com_err(whoami, code, "; Failed to restore database");
  	goto exit;
      }
  
--- 2674,2680 ----
  
      code = TC_RestoreDb(tconn, &taskId);
      if (code) {
! 	afs_com_err(whoami, code, "; Failed to restore database");
  	goto exit;
      }
  
***************
*** 2833,2839 ****
      }
  
      if (code)
! 	com_err(whoami, code, "");
      return (code);
  }
  
--- 2841,2847 ----
      }
  
      if (code)
! 	afs_com_err(whoami, code, "");
      return (code);
  }
  
***************
*** 2923,2929 ****
      for (tapeNumber = dumpEntry.tapes.b; tapeNumber <= dumpEntry.tapes.maxTapes; tapeNumber++) {	/*f */
  	tapeLinkPtr = (struct tapeLink *)malloc(sizeof(struct tapeLink));
  	if (!tapeLinkPtr) {
! 	    com_err(whoami, BC_NOMEM, "");
  	    ERROR(BC_NOMEM);
  	}
  
--- 2931,2937 ----
      for (tapeNumber = dumpEntry.tapes.b; tapeNumber <= dumpEntry.tapes.maxTapes; tapeNumber++) {	/*f */
  	tapeLinkPtr = (struct tapeLink *)malloc(sizeof(struct tapeLink));
  	if (!tapeLinkPtr) {
! 	    afs_com_err(whoami, BC_NOMEM, "");
  	    ERROR(BC_NOMEM);
  	}
  
***************
*** 2975,2981 ****
  		volumeLinkPtr =
  		    (struct volumeLink *)malloc(sizeof(struct volumeLink));
  		if (!volumeLinkPtr) {
! 		    com_err(whoami, BC_NOMEM, "");
  		    ERROR(BC_NOMEM);
  		}
  		memset(volumeLinkPtr, 0, sizeof(*volumeLinkPtr));
--- 2983,2989 ----
  		volumeLinkPtr =
  		    (struct volumeLink *)malloc(sizeof(struct volumeLink));
  		if (!volumeLinkPtr) {
! 		    afs_com_err(whoami, BC_NOMEM, "");
  		    ERROR(BC_NOMEM);
  		}
  		memset(volumeLinkPtr, 0, sizeof(*volumeLinkPtr));
***************
*** 3044,3050 ****
  
    error_exit:
      if (code)
! 	com_err("dumpInfo", code, "; Can't get dump information");
  
      /* free all allocated structures */
      tapeLinkPtr = head;
--- 3052,3058 ----
  
    error_exit:
      if (code)
! 	afs_com_err("dumpInfo", code, "; Can't get dump information");
  
      /* free all allocated structures */
      tapeLinkPtr = head;
***************
*** 3103,3109 ****
  	if (code) {
  	    if (code == BUDB_ENDOFLIST)
  		return 0;
! 	    com_err("dumpInfo", code, "; Can't get dump information");
  	    return (code);
  	}
  
--- 3111,3117 ----
  	if (code) {
  	    if (code == BUDB_ENDOFLIST)
  		return 0;
! 	    afs_com_err("dumpInfo", code, "; Can't get dump information");
  	    return (code);
  	}
  
***************
*** 3156,3168 ****
  
      if (as->parms[0].items) {
  	if (as->parms[1].items) {
! 	    com_err(whoami, 0,
  		    "These options are exclusive - select only one");
  	    return (BC_BADARG);
  	}
  	ndumps = atoi(as->parms[0].items->data);
  	if (ndumps <= 0) {
! 	    com_err(whoami, 0, "Must provide a positive number");
  	    return -1;
  	}
  
--- 3164,3176 ----
  
      if (as->parms[0].items) {
  	if (as->parms[1].items) {
! 	    afs_com_err(whoami, 0,
  		    "These options are exclusive - select only one");
  	    return (BC_BADARG);
  	}
  	ndumps = atoi(as->parms[0].items->data);
  	if (ndumps <= 0) {
! 	    afs_com_err(whoami, 0, "Must provide a positive number");
  	    return -1;
  	}
  
Index: openafs/src/bucoord/dump.c
diff -c openafs/src/bucoord/dump.c:1.12.2.2 openafs/src/bucoord/dump.c:1.12.2.3
*** openafs/src/bucoord/dump.c:1.12.2.2	Thu Jan  4 22:34:09 2007
--- openafs/src/bucoord/dump.c	Tue Apr 10 14:43:41 2007
***************
*** 15,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/dump.c,v 1.12.2.2 2007/01/05 03:34:09 shadow Exp $");
  
  #include <sys/types.h>
  #include <afs/cmd.h>
--- 15,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/dump.c,v 1.12.2.3 2007/04/10 18:43:41 shadow Exp $");
  
  #include <sys/types.h>
  #include <afs/cmd.h>
***************
*** 94,100 ****
      volDesc =
  	(struct tc_dumpDesc *)malloc(count * sizeof(struct tc_dumpDesc));
      if (!volDesc) {
! 	com_err(whoami, BC_NOMEM, "");
  	ERROR(BC_NOMEM);
      }
  
--- 94,100 ----
      volDesc =
  	(struct tc_dumpDesc *)malloc(count * sizeof(struct tc_dumpDesc));
      if (!volDesc) {
! 	afs_com_err(whoami, BC_NOMEM, "");
  	ERROR(BC_NOMEM);
      }
  
***************
*** 144,154 ****
      printf("Starting dump\n");
      code = TC_PerformDump(tconn, tcdiPtr, &volArray, &dumpTaskPtr->dumpID);
      if (code) {
! 	com_err(whoami, code, "; Failed to start dump");
  	ERROR(code);
      }
  
!     com_err(whoami, 0, "Task %u: Dump (%s)", dumpTaskPtr->dumpID,
  	    tcdiPtr->dumpName);
  
      /* create status monitor block */
--- 144,154 ----
      printf("Starting dump\n");
      code = TC_PerformDump(tconn, tcdiPtr, &volArray, &dumpTaskPtr->dumpID);
      if (code) {
! 	afs_com_err(whoami, code, "; Failed to start dump");
  	ERROR(code);
      }
  
!     afs_com_err(whoami, 0, "Task %u: Dump (%s)", dumpTaskPtr->dumpID,
  	    tcdiPtr->dumpName);
  
      /* create status monitor block */
***************
*** 266,272 ****
  	    break;
  
      if (i >= BC_MAXSIMDUMPS) {
! 	com_err(whoami, BC_NOTLOCKED,
  		"All of the dump/restore slots are in use, try again later");
  	return (BC_NOTLOCKED);
      }
--- 266,272 ----
  	    break;
  
      if (i >= BC_MAXSIMDUMPS) {
! 	afs_com_err(whoami, BC_NOTLOCKED,
  		"All of the dump/restore slots are in use, try again later");
  	return (BC_NOTLOCKED);
      }
***************
*** 305,311 ****
  			  (void *)i, "helper", &junk);
      if (code) {
  	bc_HandleMisc(code);
! 	com_err(whoami, code, "; Can't start thread");
  
  	/* Cleanup allocated data structures */
  	freeDumpTaskVolumeList(bc_dumpTasks[i].volumes);
--- 305,311 ----
  			  (void *)i, "helper", &junk);
      if (code) {
  	bc_HandleMisc(code);
! 	afs_com_err(whoami, code, "; Can't start thread");
  
  	/* Cleanup allocated data structures */
  	freeDumpTaskVolumeList(bc_dumpTasks[i].volumes);
***************
*** 384,390 ****
  
      code = TC_LabelTape(tconn, &label, &taskId);
      if (code) {
! 	com_err(whoami, code, "; Failed to start labeltape");
  	return (code);
      }
  
--- 384,390 ----
  
      code = TC_LabelTape(tconn, &label, &taskId);
      if (code) {
! 	afs_com_err(whoami, code, "; Failed to start labeltape");
  	return (code);
      }
  
***************
*** 430,436 ****
  	    printf("Tape read was unlabelled\n");
  	    return 0;
  	}
! 	com_err(whoami, code, "; Failed to start readlabel");
  	return (code);
      }
  
--- 430,436 ----
  	    printf("Tape read was unlabelled\n");
  	    return 0;
  	}
! 	afs_com_err(whoami, code, "; Failed to start readlabel");
  	return (code);
      }
  
***************
*** 468,474 ****
  
      code = TC_ScanDumps(tconn, dbAddFlag, &taskId);
      if (code) {
! 	com_err(whoami, code, "; Failed to start scantape");
  	return (code);
      }
  
--- 468,474 ----
  
      code = TC_ScanDumps(tconn, dbAddFlag, &taskId);
      if (code) {
! 	afs_com_err(whoami, code, "; Failed to start scantape");
  	return (code);
      }
  
***************
*** 559,565 ****
  
      code = bc_GetConn(config, port, tconn);
      if (code) {
! 	com_err(whoami, code,
  		"; Can't connect to tape coordinator at port %d", port);
  	return (code);
      }
--- 559,565 ----
  
      code = bc_GetConn(config, port, tconn);
      if (code) {
! 	afs_com_err(whoami, code,
  		"; Can't connect to tape coordinator at port %d", port);
  	return (code);
      }
***************
*** 569,578 ****
  	rx_DestroyConnection(*tconn);
  
  	if (code == BC_VERSIONFAIL)
! 	    com_err(whoami, code,
  		    "; Backup and butc are not the same version");
  	else
! 	    com_err(whoami, code,
  		    "; Can't access tape coordinator at port %d", port);
  
  	return (code);
--- 569,578 ----
  	rx_DestroyConnection(*tconn);
  
  	if (code == BC_VERSIONFAIL)
! 	    afs_com_err(whoami, code,
  		    "; Backup and butc are not the same version");
  	else
! 	    afs_com_err(whoami, code,
  		    "; Can't access tape coordinator at port %d", port);
  
  	return (code);
Index: openafs/src/bucoord/dump_sched.c
diff -c openafs/src/bucoord/dump_sched.c:1.7.2.4 openafs/src/bucoord/dump_sched.c:1.7.2.5
*** openafs/src/bucoord/dump_sched.c:1.7.2.4	Thu Jan  4 22:34:09 2007
--- openafs/src/bucoord/dump_sched.c	Tue Apr 10 14:43:41 2007
***************
*** 16,22 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/dump_sched.c,v 1.7.2.4 2007/01/05 03:34:09 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
--- 16,22 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/dump_sched.c,v 1.7.2.5 2007/04/10 18:43:41 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
***************
*** 91,97 ****
  
      code = bc_UpdateDumpSchedule();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve dump schedule");
  	return (code);
      }
  
--- 91,97 ----
  
      code = bc_UpdateDumpSchedule();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve dump schedule");
  	return (code);
      }
  
***************
*** 102,110 ****
  
  	/* validate the name dump name length */
  	if (strlen(dname) >= BU_MAX_DUMP_PATH) {
! 	    com_err(whoami, 0, "Dump names must be < %d characters",
  		    BU_MAX_DUMP_PATH);
! 	    com_err(whoami, 0, "Dump %s not added", dname);
  	    code = -1;
  	    continue;
  	}
--- 102,110 ----
  
  	/* validate the name dump name length */
  	if (strlen(dname) >= BU_MAX_DUMP_PATH) {
! 	    afs_com_err(whoami, 0, "Dump names must be < %d characters",
  		    BU_MAX_DUMP_PATH);
! 	    afs_com_err(whoami, 0, "Dump %s not added", dname);
  	    code = -1;
  	    continue;
  	}
***************
*** 113,138 ****
  	    bc_CreateDumpSchedule(bc_globalConfig, dname, expDate, expType);
  	if (code) {
  	    if (code == -1)
! 		com_err(whoami, 0, "Dump already exists");
  	    else if (code == -2)
! 		com_err(whoami, 0, "Invalid path name '%s'", dname);
  	    else if (code == -3)
! 		com_err(whoami, 0, "Name specification error");
  	    else
! 		com_err(whoami, code, "; Failed to create dump schedule");
  	    continue;
  	}
  
  	/* save the new schedule item */
  	code = bc_SaveDumpSchedule();
  	if (code) {
! 	    com_err(whoami, code, "Cannot save dump schedule");
! 	    com_err(whoami, 0,
  		    "Changes are temporary - for this session only");
  	    break;
  	}
  
! 	com_err(whoami, 0, "Created new dump schedule %s", dname);
      }
  
    error_exit:
--- 113,138 ----
  	    bc_CreateDumpSchedule(bc_globalConfig, dname, expDate, expType);
  	if (code) {
  	    if (code == -1)
! 		afs_com_err(whoami, 0, "Dump already exists");
  	    else if (code == -2)
! 		afs_com_err(whoami, 0, "Invalid path name '%s'", dname);
  	    else if (code == -3)
! 		afs_com_err(whoami, 0, "Name specification error");
  	    else
! 		afs_com_err(whoami, code, "; Failed to create dump schedule");
  	    continue;
  	}
  
  	/* save the new schedule item */
  	code = bc_SaveDumpSchedule();
  	if (code) {
! 	    afs_com_err(whoami, code, "Cannot save dump schedule");
! 	    afs_com_err(whoami, 0,
  		    "Changes are temporary - for this session only");
  	    break;
  	}
  
! 	afs_com_err(whoami, 0, "Created new dump schedule %s", dname);
      }
  
    error_exit:
***************
*** 167,173 ****
  
      code = bc_UpdateDumpSchedule();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve dump schedule");
  	return (code);
      }
  
--- 167,173 ----
  
      code = bc_UpdateDumpSchedule();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve dump schedule");
  	return (code);
      }
  
***************
*** 176,184 ****
      code = bc_DeleteDumpSchedule(bc_globalConfig, dname);
      if (code) {
  	if (code == -1)
! 	    com_err(whoami, 0, "No such dump as %s", dname);
  	else
! 	    com_err(whoami, code, "; Failed to delete dump schedule");
  	goto error_exit;
      }
  
--- 176,184 ----
      code = bc_DeleteDumpSchedule(bc_globalConfig, dname);
      if (code) {
  	if (code == -1)
! 	    afs_com_err(whoami, 0, "No such dump as %s", dname);
  	else
! 	    afs_com_err(whoami, code, "; Failed to delete dump schedule");
  	goto error_exit;
      }
  
***************
*** 186,193 ****
      if (code == 0)
  	printf("backup: deleted dump schedule %s\n", dname);
      else {
! 	com_err(whoami, code, "Cannot save dump schedule file");
! 	com_err(whoami, 0, "Deletion is temporary - for this session only");
      }
  
    error_exit:
--- 186,193 ----
      if (code == 0)
  	printf("backup: deleted dump schedule %s\n", dname);
      else {
! 	afs_com_err(whoami, code, "Cannot save dump schedule file");
! 	afs_com_err(whoami, 0, "Deletion is temporary - for this session only");
      }
  
    error_exit:
***************
*** 275,281 ****
      /* first check to see if schedules must be updated */
      code = bc_UpdateDumpSchedule();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve dump schedule");
  	return (code);
      }
  
--- 275,281 ----
      /* first check to see if schedules must be updated */
      code = bc_UpdateDumpSchedule();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve dump schedule");
  	return (code);
      }
  
***************
*** 334,340 ****
  
      code = bc_UpdateDumpSchedule();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve dump schedule");
  	return (code);
      }
  
--- 334,340 ----
  
      code = bc_UpdateDumpSchedule();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve dump schedule");
  	return (code);
      }
  
***************
*** 346,360 ****
  	/* validate the name dump name length */
  	if (strlen(dname) >= BU_MAX_DUMP_PATH) {
  	    code = -1;
! 	    com_err(whoami, 0, "Dump names must be < %d characters",
  		    BU_MAX_DUMP_PATH);
! 	    com_err(whoami, 0, "Dump %s not added", dname);
  	    continue;
  	}
  
  	code = FindDump(bc_globalConfig, dname, &parent, &node);
  	if (code) {
! 	    com_err(whoami, 0, "Dump level %s not found", dname);
  	    continue;
  	}
  
--- 346,360 ----
  	/* validate the name dump name length */
  	if (strlen(dname) >= BU_MAX_DUMP_PATH) {
  	    code = -1;
! 	    afs_com_err(whoami, 0, "Dump names must be < %d characters",
  		    BU_MAX_DUMP_PATH);
! 	    afs_com_err(whoami, 0, "Dump %s not added", dname);
  	    continue;
  	}
  
  	code = FindDump(bc_globalConfig, dname, &parent, &node);
  	if (code) {
! 	    afs_com_err(whoami, 0, "Dump level %s not found", dname);
  	    continue;
  	}
  
***************
*** 364,371 ****
  
      code = bc_SaveDumpSchedule();
      if (code) {
! 	com_err(whoami, code, "Cannot save dump schedule");
! 	com_err(whoami, 0,
  		"Expiration changes effective for this session only");
      }
  
--- 364,371 ----
  
      code = bc_SaveDumpSchedule();
      if (code) {
! 	afs_com_err(whoami, code, "Cannot save dump schedule");
! 	afs_com_err(whoami, 0,
  		"Expiration changes effective for this session only");
      }
  
***************
*** 423,429 ****
  	    || (dsversion != BC_SCHEDULE_VERSION)
  	    ) {
  	    /* invalid or unexpected header - error */
! 	    com_err(whoami, 0, "Unable to understand dump schedule file");
  	    return (BC_INTERNALERROR);
  	}
      }
--- 423,429 ----
  	    || (dsversion != BC_SCHEDULE_VERSION)
  	    ) {
  	    /* invalid or unexpected header - error */
! 	    afs_com_err(whoami, 0, "Unable to understand dump schedule file");
  	    return (BC_INTERNALERROR);
  	}
      }
***************
*** 437,443 ****
  	    sscanf(tbuffer, "%s %s %d %d", dsname, period, &expDate,
  		   &expType);
  	if (code != 4) {
! 	    com_err(whoami, 0,
  		    "Syntax error in dump schedule file, line is: %s",
  		    tbuffer);
  	    return (BC_INTERNALERROR);
--- 437,443 ----
  	    sscanf(tbuffer, "%s %s %d %d", dsname, period, &expDate,
  		   &expType);
  	if (code != 4) {
! 	    afs_com_err(whoami, 0,
  		    "Syntax error in dump schedule file, line is: %s",
  		    tbuffer);
  	    return (BC_INTERNALERROR);
Index: openafs/src/bucoord/main.c
diff -c openafs/src/bucoord/main.c:1.16.2.1 openafs/src/bucoord/main.c:1.16.2.3
*** openafs/src/bucoord/main.c:1.16.2.1	Thu Jan  4 22:34:09 2007
--- openafs/src/bucoord/main.c	Sat Jun 23 11:27:22 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/main.c,v 1.16.2.1 2007/01/05 03:34:09 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/main.c,v 1.16.2.3 2007/06/23 15:27:22 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 251,264 ****
  
      /* don't run more than once */
      if (initd) {
! 	com_err(whoami, 0, "Backup already initialized.");
  	return 0;
      }
      initd = 1;
  
      code = bc_InitConfig(DefaultConfDir);
      if (code) {
! 	com_err(whoami, code,
  		"Can't initialize from config files in directory '%s'",
  		DefaultConfDir);
  	return (code);
--- 251,264 ----
  
      /* don't run more than once */
      if (initd) {
! 	afs_com_err(whoami, 0, "Backup already initialized.");
  	return 0;
      }
      initd = 1;
  
      code = bc_InitConfig(DefaultConfDir);
      if (code) {
! 	afs_com_err(whoami, code,
  		"Can't initialize from config files in directory '%s'",
  		DefaultConfDir);
  	return (code);
***************
*** 269,281 ****
       */
      code = LWP_InitializeProcessSupport(LWP_NORMAL_PRIORITY, &pid);
      if (code) {
! 	com_err(whoami, code, "; Can't initialize LWP");
  	return (code);
      }
  
      code = rx_Init(htons(0));
      if (code) {
! 	com_err(whoami, code, "; Can't initialize Rx");
  	return (code);
      }
  
--- 269,281 ----
       */
      code = LWP_InitializeProcessSupport(LWP_NORMAL_PRIORITY, &pid);
      if (code) {
! 	afs_com_err(whoami, code, "; Can't initialize LWP");
  	return (code);
      }
  
      code = rx_Init(htons(0));
      if (code) {
! 	afs_com_err(whoami, code, "; Can't initialize Rx");
  	return (code);
      }
  
***************
*** 297,303 ****
  	LWP_CreateProcess(statusWatcher, 20480, LWP_NORMAL_PRIORITY,
  			  (void *)2, "statusWatcher", &watcherPid);
      if (code) {
! 	com_err(whoami, code, "; Can't create status monitor task");
  	return (code);
      }
  
--- 297,303 ----
  	LWP_CreateProcess(statusWatcher, 20480, LWP_NORMAL_PRIORITY,
  			  (void *)2, "statusWatcher", &watcherPid);
      if (code) {
! 	afs_com_err(whoami, code, "; Can't create status monitor task");
  	return (code);
      }
  
***************
*** 341,354 ****
  
  	code = backupInit();
  	if (code) {
! 	    com_err(whoami, code, "; Can't initialize backup");
  	    exit(1);
  	}
  
  	/* Get initial information from the database */
  	code = bc_InitTextConfig();
  	if (code) {
! 	    com_err(whoami, code,
  		    "; Can't obtain configuration text from backup database");
  	    exit(1);
  	}
--- 341,354 ----
  
  	code = backupInit();
  	if (code) {
! 	    afs_com_err(whoami, code, "; Can't initialize backup");
  	    exit(1);
  	}
  
  	/* Get initial information from the database */
  	code = bc_InitTextConfig();
  	if (code) {
! 	    afs_com_err(whoami, code,
  		    "; Can't obtain configuration text from backup database");
  	    exit(1);
  	}
***************
*** 409,415 ****
  
      if (internalLoadFile) {	/* Load a file in */
  	if (dispatchCount > MAXRECURSION) {	/* Beware recursive loops. */
! 	    com_err(whoami, 0, "Potential recursion: will not load file %s",
  		    internalLoadFile);
  	    code = -1;
  	    goto done;
--- 409,415 ----
  
      if (internalLoadFile) {	/* Load a file in */
  	if (dispatchCount > MAXRECURSION) {	/* Beware recursive loops. */
! 	    afs_com_err(whoami, 0, "Potential recursion: will not load file %s",
  		    internalLoadFile);
  	    code = -1;
  	    goto done;
***************
*** 417,423 ****
  
  	fd = fopen(internalLoadFile, "r");	/* Open the load file */
  	if (!fd) {
! 	    com_err(whoami, errno, "; Cannot open file %s", internalLoadFile);
  	    code = -1;
  	    goto done;
  	}
--- 417,423 ----
  
  	fd = fopen(internalLoadFile, "r");	/* Open the load file */
  	if (!fd) {
! 	    afs_com_err(whoami, errno, "; Cannot open file %s", internalLoadFile);
  	    code = -1;
  	    goto done;
  	}
***************
*** 444,450 ****
  		(!noExecute)) {	/*      or no execute */
  		c = cmd_ParseLine(lineBuffer, sargv, &sargc, MAXV);
  		if (c) {
! 		    com_err(whoami, c, "; Can't parse line");
  		} else {
  		    doDispatch(sargc, sargv, dispatchCount + 1);	/* Recursive - ignore error */
  		    cmd_FreeArgv(sargv);	/* Free up arguments */
--- 444,450 ----
  		(!noExecute)) {	/*      or no execute */
  		c = cmd_ParseLine(lineBuffer, sargv, &sargc, MAXV);
  		if (c) {
! 		    afs_com_err(whoami, c, "; Can't parse line");
  		} else {
  		    doDispatch(sargc, sargv, dispatchCount + 1);	/* Recursive - ignore error */
  		    cmd_FreeArgv(sargv);	/* Free up arguments */
***************
*** 544,549 ****
--- 544,551 ----
  		"date from which to restore");
      cmd_AddParm(ts, "-portoffset", CMD_LIST, CMD_OPTIONAL, "TC port offsets");
      cmd_AddParm(ts, "-n", CMD_FLAG, CMD_OPTIONAL, "don't really execute it");
+     cmd_AddParm(ts, "-usedump", CMD_SINGLE, CMD_OPTIONAL,
+ 		"specify the dumpID to restore from");
      if (!interact)
  	add_std_args(ts);
  
***************
*** 796,803 ****
  	if (!LineIsBlank(lineBuffer)) {
  	    code = cmd_ParseLine(lineBuffer, targv, &targc, MAXV);
  	    if (code)
! 		com_err(whoami, code, "; Can't parse line: '%s'",
! 			error_message(code));
  	    else {
  		doDispatch(targc, targv, 1);
  		cmd_FreeArgv(targv);
--- 798,805 ----
  	if (!LineIsBlank(lineBuffer)) {
  	    code = cmd_ParseLine(lineBuffer, targv, &targc, MAXV);
  	    if (code)
! 		afs_com_err(whoami, code, "; Can't parse line: '%s'",
! 			afs_error_message(code));
  	    else {
  		doDispatch(targc, targv, 1);
  		cmd_FreeArgv(targv);
Index: openafs/src/bucoord/restore.c
diff -c openafs/src/bucoord/restore.c:1.8.2.3 openafs/src/bucoord/restore.c:1.8.2.7
*** openafs/src/bucoord/restore.c:1.8.2.3	Thu Jan  4 22:34:09 2007
--- openafs/src/bucoord/restore.c	Tue Jun 26 01:44:57 2007
***************
*** 15,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/restore.c,v 1.8.2.3 2007/01/05 03:34:09 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 15,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/restore.c,v 1.8.2.7 2007/06/26 05:44:57 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 40,46 ****
  extern struct bc_dumpTask bc_dumpTasks[BC_MAXSIMDUMPS];
  extern char *whoami;
  
- #define	BC_MAXLEVELS	    20
  #define	MAXTAPESATONCE	    10
  
  #define HOSTADDR(sockaddr) (sockaddr)->sin_addr.s_addr
--- 40,45 ----
***************
*** 182,190 ****
      statusP statusPtr, newStatusPtr;
  
      struct dumpinfo *dumpinfolist = NULL;
!     struct dumpinfo *pdi, *ndi, *di, dlevels[BC_MAXLEVELS];
      struct volinfo *pvi, *nvi, *vi;
      afs_int32 lvl, lv;
  
      afs_int32 serverAll;	/* The server to which all volumes are to be restore to */
      afs_int32 partitionAll;	/* Likewise for partition */
--- 181,190 ----
      statusP statusPtr, newStatusPtr;
  
      struct dumpinfo *dumpinfolist = NULL;
!     struct dumpinfo *pdi, *ndi, *di, *dlevels;
      struct volinfo *pvi, *nvi, *vi;
      afs_int32 lvl, lv;
+     int num_dlevels = 20;
  
      afs_int32 serverAll;	/* The server to which all volumes are to be restore to */
      afs_int32 partitionAll;	/* Likewise for partition */
***************
*** 196,201 ****
--- 196,203 ----
      extern statusP createStatusNode();
      extern statusP findStatus();
  
+     dlevels = (struct dumpinfo *) malloc(num_dlevels * sizeof(*dlevels));
+ 
      dumpTaskPtr = &bc_dumpTasks[aindex];
      serverAll = HOSTADDR(&dumpTaskPtr->destServer);
      partitionAll = dumpTaskPtr->destPartition;
***************
*** 203,209 ****
      volumeEntries = (struct budb_volumeEntry *)
  	malloc(MAXTAPESATONCE * sizeof(struct budb_volumeEntry));
      if (!volumeEntries) {
! 	com_err(whoami, BC_NOMEM, "");
  	ERROR(BC_NOMEM);
      }
  
--- 205,211 ----
      volumeEntries = (struct budb_volumeEntry *)
  	malloc(MAXTAPESATONCE * sizeof(struct budb_volumeEntry));
      if (!volumeEntries) {
! 	afs_com_err(whoami, BC_NOMEM, "");
  	ERROR(BC_NOMEM);
      }
  
***************
*** 214,242 ****
      for (tvol = dumpTaskPtr->volumes; tvol; tvol = tvol->next) {	/*tvol */
  	strcpy(vname, tvol->name);
  	dumpDescr = &dumpDescr1;
! 	code = bcdb_FindDump(vname, dumpTaskPtr->fromDate, dumpDescr);
! 
! 	if (!BackupName(vname)) {	/* See if backup volume is there */
! 	    strcat(vname, ".backup");
! 	    dumpDescr = &dumpDescr2;
! 	    tcode = code;
  	    code = bcdb_FindDump(vname, dumpTaskPtr->fromDate, dumpDescr);
  
! 	    if (code) {		/* Can't find backup, go with first results */
  		strcpy(vname, tvol->name);
  		dumpDescr = &dumpDescr1;
  		code = tcode;
! 	    } else if (!tcode) {	/* Both found an entry, go with latest result */
  		if (dumpDescr1.created > dumpDescr2.created) {
! 		    strcpy(vname, tvol->name);
! 		    dumpDescr = &dumpDescr1;
! 		    code = tcode;
  		}
  	    }
! 	}
  
  	if (code) {		/* If FindDump took an error */
! 	    com_err(whoami, code, "; Can't find any dump for volume %s",
  		    tvol->name);
  	    continue;
  	}
--- 216,270 ----
      for (tvol = dumpTaskPtr->volumes; tvol; tvol = tvol->next) {	/*tvol */
  	strcpy(vname, tvol->name);
  	dumpDescr = &dumpDescr1;
! 	if (dumpTaskPtr->parentDumpID > 0) /* Told which dump to try */
! 	  {
! 	    /* Right now, this assumes that all volumes listed will be
! 	     * from the given dumpID.  FIXME
! 	     */
! 	    code = bcdb_FindDumpByID(dumpTaskPtr->parentDumpID, dumpDescr);
! 	    if (code)
! 	      {
! 		afs_com_err(whoami, "Couldn't look up info for dump %d\n",
! 			dumpTaskPtr->parentDumpID);
! 		continue;
! 	      }
! 	    code = bcdb_FindVolumes(dumpTaskPtr->parentDumpID, vname, volumeEntries,
! 				    last, &next, MAXTAPESATONCE, &vecount);
! 	    if (code)
! 	      {
! 		if (!BackupName(vname))
! 		  {
! 		    strcat(vname, ".backup");
! 		    code = bcdb_FindVolumes(dumpTaskPtr->parentDumpID, vname, volumeEntries,
! 					    last, &next, MAXTAPESATONCE, &vecount);
! 		  }
! 	      }
! 	  }
! 	else
! 	  {
  	    code = bcdb_FindDump(vname, dumpTaskPtr->fromDate, dumpDescr);
+ 	    if (!BackupName(vname)) {	/* See if backup volume is there */
+ 	      strcat(vname, ".backup");
+ 	      dumpDescr = &dumpDescr2;
+ 	      tcode = code;
+ 	      code = bcdb_FindDump(vname, dumpTaskPtr->fromDate, dumpDescr);
  
! 	      if (code) {	/* Can't find backup, go with first results */
  		strcpy(vname, tvol->name);
  		dumpDescr = &dumpDescr1;
  		code = tcode;
! 	      } else if (!tcode) {	/* Both found an entry, go with latest result */
  		if (dumpDescr1.created > dumpDescr2.created) {
! 		  strcpy(vname, tvol->name);
! 		  dumpDescr = &dumpDescr1;
! 		  code = tcode;
  		}
+ 	      }
  	    }
! 	  }
  
  	if (code) {		/* If FindDump took an error */
! 	    afs_com_err(whoami, code, "; Can't find any dump for volume %s",
  		    tvol->name);
  	    continue;
  	}
***************
*** 255,261 ****
  	if (!di) {
  	    di = (struct dumpinfo *)malloc(sizeof(struct dumpinfo));
  	    if (!di) {
! 		com_err(whoami, BC_NOMEM, "");
  		ERROR(BC_NOMEM);
  	    }
  	    memset(di, 0, sizeof(struct dumpinfo));
--- 283,289 ----
  	if (!di) {
  	    di = (struct dumpinfo *)malloc(sizeof(struct dumpinfo));
  	    if (!di) {
! 		afs_com_err(whoami, BC_NOMEM, "");
  		ERROR(BC_NOMEM);
  	    }
  	    memset(di, 0, sizeof(struct dumpinfo));
***************
*** 277,283 ****
  	/* Create one and thread into list */
  	vi = (struct volinfo *)malloc(sizeof(struct volinfo));
  	if (!vi) {
! 	    com_err(whoami, BC_NOMEM, "");
  	    ERROR(BC_NOMEM);
  	}
  	memset(vi, 0, sizeof(struct volinfo));
--- 305,311 ----
  	/* Create one and thread into list */
  	vi = (struct volinfo *)malloc(sizeof(struct volinfo));
  	if (!vi) {
! 	    afs_com_err(whoami, BC_NOMEM, "");
  	    ERROR(BC_NOMEM);
  	}
  	memset(vi, 0, sizeof(struct volinfo));
***************
*** 285,291 ****
  	vi->volname = (char *)malloc(strlen(vname) + 1);
  	if (!vi->volname) {
  	    free(vi);
! 	    com_err(whoami, BC_NOMEM, "");
  	    ERROR(BC_NOMEM);
  	}
  
--- 313,319 ----
  	vi->volname = (char *)malloc(strlen(vname) + 1);
  	if (!vi->volname) {
  	    free(vi);
! 	    afs_com_err(whoami, BC_NOMEM, "");
  	    ERROR(BC_NOMEM);
  	}
  
***************
*** 314,323 ****
  	memcpy(&dlevels[0], di, sizeof(struct dumpinfo));
  	for (lvl = 1, parent = dlevels[0].parentDumpId; parent;
  	     parent = dlevels[lvl].parentDumpId, lvl++) {
  	    code = bcdb_FindDumpByID(parent, &dumpDescr1);
  	    if (code) {
  		for (vi = di->volinfolist; vi; vi = vi->next) {
! 		    com_err(whoami, code,
  			    "; Can't find parent DumpID %u for volume %s",
  			    parent, vi->volname);
  		}
--- 342,359 ----
  	memcpy(&dlevels[0], di, sizeof(struct dumpinfo));
  	for (lvl = 1, parent = dlevels[0].parentDumpId; parent;
  	     parent = dlevels[lvl].parentDumpId, lvl++) {
+ 	    if (lvl >= num_dlevels) {		/* running out of dump levels */
+ 		struct dumpinfo *tdl = dlevels;
+ 
+ 		num_dlevels += num_dlevels;	/* double */
+ 		dlevels = (struct dumpinfo *) malloc(num_dlevels * sizeof(*dlevels));
+ 		memcpy(dlevels, tdl, (num_dlevels/2) * sizeof(*dlevels));
+ 		free(tdl);
+ 	    }
  	    code = bcdb_FindDumpByID(parent, &dumpDescr1);
  	    if (code) {
  		for (vi = di->volinfolist; vi; vi = vi->next) {
! 		    afs_com_err(whoami, code,
  			    "; Can't find parent DumpID %u for volume %s",
  			    parent, vi->volname);
  		}
***************
*** 369,375 ****
  			    break;
  			}
  
! 			com_err(whoami, code,
  				"; Can't find volume %s in DumpID %u",
  				vi->volname, dlevels[lv].DumpId);
  			ERROR(code);
--- 405,411 ----
  			    break;
  			}
  
! 			afs_com_err(whoami, code,
  				"; Can't find volume %s in DumpID %u",
  				vi->volname, dlevels[lv].DumpId);
  			ERROR(code);
***************
*** 450,456 ****
  			    tle = (struct bc_tapeList *)
  				malloc(sizeof(struct bc_tapeList));
  			    if (!tle) {
! 				com_err(whoami, BC_NOMEM, "");
  				return (BC_NOMEM);
  			    }
  			    memset(tle, 0, sizeof(struct bc_tapeList));
--- 486,492 ----
  			    tle = (struct bc_tapeList *)
  				malloc(sizeof(struct bc_tapeList));
  			    if (!tle) {
! 				afs_com_err(whoami, BC_NOMEM, "");
  				return (BC_NOMEM);
  			    }
  			    memset(tle, 0, sizeof(struct bc_tapeList));
***************
*** 460,466 ****
  					       + 1);
  			    if (!tle->tapeName) {
  				free(tle);
! 				com_err(whoami, BC_NOMEM, "");
  				return (BC_NOMEM);
  			    }
  
--- 496,502 ----
  					       + 1);
  			    if (!tle->tapeName) {
  				free(tle);
! 				afs_com_err(whoami, BC_NOMEM, "");
  				return (BC_NOMEM);
  			    }
  
***************
*** 505,511 ****
  			    ti = (struct bc_tapeItem *)
  				malloc(sizeof(struct bc_tapeItem));
  			    if (!ti) {
! 				com_err(whoami, BC_NOMEM, "");
  				return (BC_NOMEM);
  			    }
  			    memset(ti, 0, sizeof(struct bc_tapeItem));
--- 541,547 ----
  			    ti = (struct bc_tapeItem *)
  				malloc(sizeof(struct bc_tapeItem));
  			    if (!ti) {
! 				afs_com_err(whoami, BC_NOMEM, "");
  				return (BC_NOMEM);
  			    }
  			    memset(ti, 0, sizeof(struct bc_tapeItem));
***************
*** 515,521 ****
  					       + 1);
  			    if (!ti->volumeName) {
  				free(ti);
! 				com_err(whoami, BC_NOMEM, "");
  				return (BC_NOMEM);
  			    }
  
--- 551,557 ----
  					       + 1);
  			    if (!ti->volumeName) {
  				free(ti);
! 				afs_com_err(whoami, BC_NOMEM, "");
  				return (BC_NOMEM);
  			    }
  
***************
*** 548,554 ****
      }				/* di: For each dump */
  
      if (!nentries) {
! 	com_err(whoami, 0, "No volumes to restore");
  	ERROR(0);
      }
  
--- 584,590 ----
      }				/* di: For each dump */
  
      if (!nentries) {
! 	afs_com_err(whoami, 0, "No volumes to restore");
  	ERROR(0);
      }
  
***************
*** 605,611 ****
  	(struct tc_restoreDesc *)malloc(nentries *
  					sizeof(struct tc_restoreDesc));
      if (!tcarray) {
! 	com_err(whoami, BC_NOMEM, "");
  	ERROR(BC_NOMEM);
      }
      memset(tcarray, 0, nentries * sizeof(struct tc_restoreDesc));
--- 641,647 ----
  	(struct tc_restoreDesc *)malloc(nentries *
  					sizeof(struct tc_restoreDesc));
      if (!tcarray) {
! 	afs_com_err(whoami, BC_NOMEM, "");
  	ERROR(BC_NOMEM);
      }
      memset(tcarray, 0, nentries * sizeof(struct tc_restoreDesc));
***************
*** 687,693 ****
  	    TC_PerformRestore(aconn, "DumpSetName", &rpcArray,
  			      &dumpTaskPtr->dumpID);
  	if (code) {
! 	    com_err(whoami, code, "; Failed to start restore");
  	    break;
  	}
  
--- 723,729 ----
  	    TC_PerformRestore(aconn, "DumpSetName", &rpcArray,
  			      &dumpTaskPtr->dumpID);
  	if (code) {
! 	    afs_com_err(whoami, code, "; Failed to start restore");
  	    break;
  	}
  
***************
*** 768,772 ****
--- 804,810 ----
      if (volumeEntries)
  	free(volumeEntries);
  
+     free(dlevels);
+ 
      return code;
  }
Index: openafs/src/bucoord/tape_hosts.c
diff -c openafs/src/bucoord/tape_hosts.c:1.7.2.2 openafs/src/bucoord/tape_hosts.c:1.7.2.3
*** openafs/src/bucoord/tape_hosts.c:1.7.2.2	Thu Jan  4 22:34:09 2007
--- openafs/src/bucoord/tape_hosts.c	Tue Apr 10 14:43:41 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/tape_hosts.c,v 1.7.2.2 2007/01/05 03:34:09 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/tape_hosts.c,v 1.7.2.3 2007/04/10 18:43:41 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 66,72 ****
  
      code = bc_UpdateHosts();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
--- 66,72 ----
  
      code = bc_UpdateHosts();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
***************
*** 85,98 ****
  	    printf("failed\n");
  	    fflush(stdout);
  	    if (code == EEXIST)
! 		com_err(whoami, 0, "Port offset already in tape database");
  	    ERROR(code);
  	}
  
  	code = bc_SaveHosts();
  	if (code) {
! 	    com_err(whoami, code, "Cannot save tape hosts");
! 	    com_err(whoami, 0,
  		    "Changes are temporary - for this session only");
  	    ERROR(code);
  	}
--- 85,98 ----
  	    printf("failed\n");
  	    fflush(stdout);
  	    if (code == EEXIST)
! 		afs_com_err(whoami, 0, "Port offset already in tape database");
  	    ERROR(code);
  	}
  
  	code = bc_SaveHosts();
  	if (code) {
! 	    afs_com_err(whoami, code, "Cannot save tape hosts");
! 	    afs_com_err(whoami, 0,
  		    "Changes are temporary - for this session only");
  	    ERROR(code);
  	}
***************
*** 124,130 ****
  
      code = bc_UpdateHosts();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
--- 124,130 ----
  
      code = bc_UpdateHosts();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
***************
*** 150,157 ****
  
  	code = bc_SaveHosts();
  	if (code) {
! 	    com_err(whoami, code, "Cannot save tape hosts");
! 	    com_err(whoami, 0,
  		    "Changes are temporary - for this session only");
  	    ERROR(code);
  	}
--- 150,157 ----
  
  	code = bc_SaveHosts();
  	if (code) {
! 	    afs_com_err(whoami, code, "Cannot save tape hosts");
! 	    afs_com_err(whoami, 0,
  		    "Changes are temporary - for this session only");
  	    ERROR(code);
  	}
***************
*** 184,190 ****
  
      code = bc_UpdateHosts();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
--- 184,190 ----
  
      code = bc_UpdateHosts();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve tape hosts");
  	return (code);
      }
  
***************
*** 264,270 ****
  	sscanf(tbuffer, "%s %u", hostName, &port);
  	th = gethostbyname(hostName);
  	if (th == 0) {
! 	    com_err(whoami, 0,
  		    "can't get host info for %s from nameserver or /etc/hosts.",
  		    hostName);
  	}
--- 264,270 ----
  	sscanf(tbuffer, "%s %u", hostName, &port);
  	th = gethostbyname(hostName);
  	if (th == 0) {
! 	    afs_com_err(whoami, 0,
  		    "can't get host info for %s from nameserver or /etc/hosts.",
  		    hostName);
  	}
***************
*** 378,384 ****
      }
  
      if (ctPtr->textVersion != -1) {
! 	com_err(whoami, 0, "obsolete tapehosts - updating");
  	bc_ClearHosts();
      }
  
--- 378,384 ----
      }
  
      if (ctPtr->textVersion != -1) {
! 	afs_com_err(whoami, 0, "obsolete tapehosts - updating");
  	bc_ClearHosts();
      }
  
Index: openafs/src/bucoord/ubik_db_if.c
diff -c openafs/src/bucoord/ubik_db_if.c:1.10.2.1 openafs/src/bucoord/ubik_db_if.c:1.10.2.2
*** openafs/src/bucoord/ubik_db_if.c:1.10.2.1	Thu Jan  4 22:34:09 2007
--- openafs/src/bucoord/ubik_db_if.c	Tue Apr 10 14:43:41 2007
***************
*** 13,19 ****
  #include <afs/stds.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/ubik_db_if.c,v 1.10.2.1 2007/01/05 03:34:09 shadow Exp $");
  
  #include <sys/types.h>
  #include <fcntl.h>
--- 13,19 ----
  #include <afs/stds.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/ubik_db_if.c,v 1.10.2.2 2007/04/10 18:43:41 shadow Exp $");
  
  #include <sys/types.h>
  #include <fcntl.h>
***************
*** 32,37 ****
--- 32,38 ----
  #include <afs/bubasics.h>
  #include <afs/budb_client.h>
  #include <afs/budb.h>
+ #include <afs/com_err.h>
  #include <errno.h>
  
  #include "bc.h"
***************
*** 727,733 ****
  
  	/* Mention something every 30 seconds */
  	if (++j >= 30) {
! 	    com_err(whoami, code,
  		    "; Waiting for db configuration text unlock");
  	    j = 0;
  	}
--- 728,734 ----
  
  	/* Mention something every 30 seconds */
  	if (++j >= 30) {
! 	    afs_com_err(whoami, code,
  		    "; Waiting for db configuration text unlock");
  	    j = 0;
  	}
***************
*** 823,829 ****
  	afsconf_Open((localauth ? AFSDIR_SERVER_ETC_DIRPATH :
  		      AFSDIR_CLIENT_ETC_DIRPATH));
      if (!acdir) {
! 	com_err(whoami, 0, "Can't open configuration directory '%s'",
  		(localauth ? AFSDIR_SERVER_ETC_DIRPATH :
  		 AFSDIR_CLIENT_ETC_DIRPATH));
  	ERROR(BC_NOCELLCONFIG);
--- 824,830 ----
  	afsconf_Open((localauth ? AFSDIR_SERVER_ETC_DIRPATH :
  		      AFSDIR_CLIENT_ETC_DIRPATH));
      if (!acdir) {
! 	afs_com_err(whoami, 0, "Can't open configuration directory '%s'",
  		(localauth ? AFSDIR_SERVER_ETC_DIRPATH :
  		 AFSDIR_CLIENT_ETC_DIRPATH));
  	ERROR(BC_NOCELLCONFIG);
***************
*** 834,840 ****
  
  	code = afsconf_GetLocalCell(acdir, cname, sizeof(cname));
  	if (code) {
! 	    com_err(whoami, code,
  		    "; Can't get the local cell name - check %s/%s",
  		    (localauth ? AFSDIR_SERVER_ETC_DIRPATH :
  		     AFSDIR_CLIENT_ETC_DIRPATH), AFSDIR_THISCELL_FILE);
--- 835,841 ----
  
  	code = afsconf_GetLocalCell(acdir, cname, sizeof(cname));
  	if (code) {
! 	    afs_com_err(whoami, code,
  		    "; Can't get the local cell name - check %s/%s",
  		    (localauth ? AFSDIR_SERVER_ETC_DIRPATH :
  		     AFSDIR_CLIENT_ETC_DIRPATH), AFSDIR_THISCELL_FILE);
***************
*** 845,851 ****
  
      code = afsconf_GetCellInfo(acdir, cellName, AFSCONF_VLDBSERVICE, &info);
      if (code) {
! 	com_err(whoami, code, "; Can't find cell %s's hosts in %s/%s",
  		cellName,
  		(localauth ? AFSDIR_SERVER_ETC_DIRPATH :
  		 AFSDIR_CLIENT_ETC_DIRPATH), AFSDIR_CELLSERVDB_FILE);
--- 846,852 ----
  
      code = afsconf_GetCellInfo(acdir, cellName, AFSCONF_VLDBSERVICE, &info);
      if (code) {
! 	afs_com_err(whoami, code, "; Can't find cell %s's hosts in %s/%s",
  		cellName,
  		(localauth ? AFSDIR_SERVER_ETC_DIRPATH :
  		 AFSDIR_CLIENT_ETC_DIRPATH), AFSDIR_CELLSERVDB_FILE);
***************
*** 859,870 ****
      if (localauth) {
  	code = afsconf_GetLatestKey(acdir, 0, 0);
  	if (code) {
! 	    com_err(whoami, code, "; Can't get key from local key file");
  	    ERROR(code);
  	} else {
  	    code = afsconf_ClientAuth(acdir, &sc, &scIndex);
  	    if (code) {
! 		com_err(whoami, code, "; Calling ClientAuth");
  		ERROR(code);
  	    }
  
--- 860,871 ----
      if (localauth) {
  	code = afsconf_GetLatestKey(acdir, 0, 0);
  	if (code) {
! 	    afs_com_err(whoami, code, "; Can't get key from local key file");
  	    ERROR(code);
  	} else {
  	    code = afsconf_ClientAuth(acdir, &sc, &scIndex);
  	    if (code) {
! 		afs_com_err(whoami, code, "; Calling ClientAuth");
  		ERROR(code);
  	    }
  
***************
*** 879,889 ****
  	    code =
  		ktc_GetToken(&sname, ttoken, sizeof(struct ktc_token), NULL);
  	    if (code) {
! 		com_err(whoami, code, 0,
  			"; Can't get AFS tokens - running unauthenticated");
  	    } else {
  		if ((ttoken->kvno < 0) || (ttoken->kvno > 255))
! 		    com_err(whoami, 0,
  			    "Funny kvno (%d) in ticket, proceeding",
  			    ttoken->kvno);
  
--- 880,890 ----
  	    code =
  		ktc_GetToken(&sname, ttoken, sizeof(struct ktc_token), NULL);
  	    if (code) {
! 		afs_com_err(whoami, code, 0,
  			"; Can't get AFS tokens - running unauthenticated");
  	    } else {
  		if ((ttoken->kvno < 0) || (ttoken->kvno > 255))
! 		    afs_com_err(whoami, 0,
  			    "Funny kvno (%d) in ticket, proceeding",
  			    ttoken->kvno);
  
***************
*** 903,916 ****
  					      ttoken->ticket);
  	    break;
  	default:
! 	    com_err(whoami, 0, "Unsupported authentication type %d", scIndex);
  	    ERROR(-1);
  	    break;
  	}
      }
  
      if (!sc) {
! 	com_err(whoami, 0,
  		"Can't create a security object with security index %d",
  		scIndex);
  	ERROR(-1);
--- 904,917 ----
  					      ttoken->ticket);
  	    break;
  	default:
! 	    afs_com_err(whoami, 0, "Unsupported authentication type %d", scIndex);
  	    ERROR(-1);
  	    break;
  	}
      }
  
      if (!sc) {
! 	afs_com_err(whoami, 0,
  		"Can't create a security object with security index %d",
  		scIndex);
  	ERROR(-1);
***************
*** 920,926 ****
      UV_SetSecurity(sc, scIndex);
  
      if (info.numServers > VLDB_MAXSERVERS) {
! 	com_err(whoami, 0,
  		"Warning: %d VLDB servers exist for cell '%s', can only remember the first %d",
  		info.numServers, cellName, VLDB_MAXSERVERS);
  	info.numServers = VLDB_MAXSERVERS;
--- 921,927 ----
      UV_SetSecurity(sc, scIndex);
  
      if (info.numServers > VLDB_MAXSERVERS) {
! 	afs_com_err(whoami, 0,
  		"Warning: %d VLDB servers exist for cell '%s', can only remember the first %d",
  		info.numServers, cellName, VLDB_MAXSERVERS);
  	info.numServers = VLDB_MAXSERVERS;
***************
*** 936,942 ****
      *cstruct = 0;
      code = ubik_ClientInit(serverconns, cstruct);
      if (code) {
! 	com_err(whoami, code, "; Can't initialize ubik connection to vldb");
  	ERROR(code);
      }
  
--- 937,943 ----
      *cstruct = 0;
      code = ubik_ClientInit(serverconns, cstruct);
      if (code) {
! 	afs_com_err(whoami, code, "; Can't initialize ubik connection to vldb");
  	ERROR(code);
      }
  
***************
*** 967,973 ****
  	afsconf_Open((localauth ? AFSDIR_SERVER_ETC_DIRPATH :
  		      AFSDIR_CLIENT_ETC_DIRPATH));
      if (!acdir) {
! 	com_err(whoami, 0, "Can't open configuration directory '%s'",
  		(localauth ? AFSDIR_SERVER_ETC_DIRPATH :
  		 AFSDIR_CLIENT_ETC_DIRPATH));
  	ERROR(BC_NOCELLCONFIG);
--- 968,974 ----
  	afsconf_Open((localauth ? AFSDIR_SERVER_ETC_DIRPATH :
  		      AFSDIR_CLIENT_ETC_DIRPATH));
      if (!acdir) {
! 	afs_com_err(whoami, 0, "Can't open configuration directory '%s'",
  		(localauth ? AFSDIR_SERVER_ETC_DIRPATH :
  		 AFSDIR_CLIENT_ETC_DIRPATH));
  	ERROR(BC_NOCELLCONFIG);
***************
*** 978,984 ****
  
  	code = afsconf_GetLocalCell(acdir, cname, sizeof(cname));
  	if (code) {
! 	    com_err(whoami, code,
  		    "; Can't get the local cell name - check %s/%s",
  		    (localauth ? AFSDIR_SERVER_ETC_DIRPATH :
  		     AFSDIR_CLIENT_ETC_DIRPATH), AFSDIR_THISCELL_FILE);
--- 979,985 ----
  
  	code = afsconf_GetLocalCell(acdir, cname, sizeof(cname));
  	if (code) {
! 	    afs_com_err(whoami, code,
  		    "; Can't get the local cell name - check %s/%s",
  		    (localauth ? AFSDIR_SERVER_ETC_DIRPATH :
  		     AFSDIR_CLIENT_ETC_DIRPATH), AFSDIR_THISCELL_FILE);
***************
*** 989,995 ****
  
      code = afsconf_GetCellInfo(acdir, cellName, 0, &info);
      if (code) {
! 	com_err(whoami, code, "; Can't find cell %s's hosts in %s/%s",
  		cellName,
  		(localauth ? AFSDIR_SERVER_ETC_DIRPATH :
  		 AFSDIR_CLIENT_ETC_DIRPATH), AFSDIR_CELLSERVDB_FILE);
--- 990,996 ----
  
      code = afsconf_GetCellInfo(acdir, cellName, 0, &info);
      if (code) {
! 	afs_com_err(whoami, code, "; Can't find cell %s's hosts in %s/%s",
  		cellName,
  		(localauth ? AFSDIR_SERVER_ETC_DIRPATH :
  		 AFSDIR_CLIENT_ETC_DIRPATH), AFSDIR_CELLSERVDB_FILE);
***************
*** 1001,1014 ****
      if (localauth) {
  	code = afsconf_GetLatestKey(acdir, 0, 0);
  	if (code) {
! 	    com_err(whoami, code, "; Can't get key from local key file");
  	    ERROR(-1);
  	} else {
  	    code =
  		afsconf_ClientAuth(acdir, &udbHandle.uh_secobj,
  				   &udbHandle.uh_scIndex);
  	    if (code) {
! 		com_err(whoami, code, "; Calling ClientAuth");
  		ERROR(-1);
  	    }
  	}
--- 1002,1015 ----
      if (localauth) {
  	code = afsconf_GetLatestKey(acdir, 0, 0);
  	if (code) {
! 	    afs_com_err(whoami, code, "; Can't get key from local key file");
  	    ERROR(-1);
  	} else {
  	    code =
  		afsconf_ClientAuth(acdir, &udbHandle.uh_secobj,
  				   &udbHandle.uh_scIndex);
  	    if (code) {
! 		afs_com_err(whoami, code, "; Calling ClientAuth");
  		ERROR(-1);
  	    }
  	}
***************
*** 1022,1032 ****
  	    /* get token */
  	    code = ktc_GetToken(&principal, &token, sizeof(token), NULL);
  	    if (code) {
! 		com_err(whoami, code,
  			"; Can't get tokens - running unauthenticated");
  	    } else {
  		if ((token.kvno < 0) || (token.kvno > 255))
! 		    com_err(whoami, 0,
  			    "Unexpected kvno (%d) in ticket - proceeding",
  			    token.kvno);
  		udbHandle.uh_scIndex = RX_SCINDEX_KAD;	/* Kerberos */
--- 1023,1033 ----
  	    /* get token */
  	    code = ktc_GetToken(&principal, &token, sizeof(token), NULL);
  	    if (code) {
! 		afs_com_err(whoami, code,
  			"; Can't get tokens - running unauthenticated");
  	    } else {
  		if ((token.kvno < 0) || (token.kvno > 255))
! 		    afs_com_err(whoami, 0,
  			    "Unexpected kvno (%d) in ticket - proceeding",
  			    token.kvno);
  		udbHandle.uh_scIndex = RX_SCINDEX_KAD;	/* Kerberos */
***************
*** 1046,1052 ****
  	    break;
  
  	default:
! 	    com_err(whoami, 0, "Unsupported authentication type %d",
  		    udbHandle.uh_scIndex);
  	    ERROR(-1);
  	    break;
--- 1047,1053 ----
  	    break;
  
  	default:
! 	    afs_com_err(whoami, 0, "Unsupported authentication type %d",
  		    udbHandle.uh_scIndex);
  	    ERROR(-1);
  	    break;
***************
*** 1054,1067 ****
      }
  
      if (!udbHandle.uh_secobj) {
! 	com_err(whoami, 0,
  		"Can't create a security object with security index %d",
  		udbHandle.uh_secobj);
  	ERROR(-1);
      }
  
      if (info.numServers > MAXSERVERS) {
! 	com_err(whoami, 0,
  		"Warning: %d BDB servers exist for cell '%s', can only remember the first %d",
  		info.numServers, cellName, MAXSERVERS);
  	info.numServers = MAXSERVERS;
--- 1055,1068 ----
      }
  
      if (!udbHandle.uh_secobj) {
! 	afs_com_err(whoami, 0,
  		"Can't create a security object with security index %d",
  		udbHandle.uh_secobj);
  	ERROR(-1);
      }
  
      if (info.numServers > MAXSERVERS) {
! 	afs_com_err(whoami, 0,
  		"Warning: %d BDB servers exist for cell '%s', can only remember the first %d",
  		info.numServers, cellName, MAXSERVERS);
  	info.numServers = MAXSERVERS;
***************
*** 1078,1084 ****
  
      code = ubik_ClientInit(udbHandle.uh_serverConn, &udbHandle.uh_client);
      if (code) {
! 	com_err(whoami, code,
  		"; Can't initialize ubik connection to backup database");
  	ERROR(code);
      }
--- 1079,1085 ----
  
      code = ubik_ClientInit(udbHandle.uh_serverConn, &udbHandle.uh_client);
      if (code) {
! 	afs_com_err(whoami, code,
  		"; Can't initialize ubik connection to backup database");
  	ERROR(code);
      }
***************
*** 1100,1106 ****
  	    ubik_Call(BUDB_GetInstanceId, udbHandle.uh_client, 0,
  		      &udbHandle.uh_instanceId);
      if (code) {
! 	com_err(whoami, code, "; Can't access backup database");
  	ERROR(code);
      }
  
--- 1101,1107 ----
  	    ubik_Call(BUDB_GetInstanceId, udbHandle.uh_client, 0,
  		      &udbHandle.uh_instanceId);
      if (code) {
! 	afs_com_err(whoami, code, "; Can't access backup database");
  	ERROR(code);
      }
  
***************
*** 1313,1319 ****
  
      code = ubik_ParseClientList(3, args, serverList);
      if (code) {
! 	com_err(whoami, code, "; udbLocalInit: parsing ubik server list");
  	return (-1);
      }
  
--- 1314,1320 ----
  
      code = ubik_ParseClientList(3, args, serverList);
      if (code) {
! 	afs_com_err(whoami, code, "; udbLocalInit: parsing ubik server list");
  	return (-1);
      }
  
***************
*** 1327,1340 ****
  			     BUDB_SERVICE, udbHandle.uh_secobj,
  			     udbHandle.uh_scIndex);
  	if (udbHandle.uh_serverConn[i] == 0) {
! 	    com_err(whoami, 0, "connection %d failed", i);
  	    continue;
  	}
      }
      udbHandle.uh_serverConn[i] = 0;
      code = ubik_ClientInit(udbHandle.uh_serverConn, &udbHandle.uh_client);
      if (code) {
! 	com_err(whoami, code, "; in ubik_ClientInit");
  	return (code);
      }
  
--- 1328,1341 ----
  			     BUDB_SERVICE, udbHandle.uh_secobj,
  			     udbHandle.uh_scIndex);
  	if (udbHandle.uh_serverConn[i] == 0) {
! 	    afs_com_err(whoami, 0, "connection %d failed", i);
  	    continue;
  	}
      }
      udbHandle.uh_serverConn[i] = 0;
      code = ubik_ClientInit(udbHandle.uh_serverConn, &udbHandle.uh_client);
      if (code) {
! 	afs_com_err(whoami, code, "; in ubik_ClientInit");
  	return (code);
      }
  
***************
*** 1342,1348 ****
  	ubik_Call(BUDB_GetInstanceId, udbHandle.uh_client, 0,
  		  &udbHandle.uh_instanceId);
      if (code) {
! 	com_err(whoami, code, "; Can't estblish instance Id");
  	return (code);
      }
  
--- 1343,1349 ----
  	ubik_Call(BUDB_GetInstanceId, udbHandle.uh_client, 0,
  		  &udbHandle.uh_instanceId);
      if (code) {
! 	afs_com_err(whoami, code, "; Can't estblish instance Id");
  	return (code);
      }
  
Index: openafs/src/bucoord/vol_sets.c
diff -c openafs/src/bucoord/vol_sets.c:1.10.2.3 openafs/src/bucoord/vol_sets.c:1.10.2.4
*** openafs/src/bucoord/vol_sets.c:1.10.2.3	Thu Jan  4 22:34:09 2007
--- openafs/src/bucoord/vol_sets.c	Tue Apr 10 14:43:41 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/vol_sets.c,v 1.10.2.3 2007/01/05 03:34:09 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/vol_sets.c,v 1.10.2.4 2007/04/10 18:43:41 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 73,79 ****
  
      code = bc_UpdateVolumeSet();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
  
--- 73,79 ----
  
      code = bc_UpdateVolumeSet();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
  
***************
*** 81,87 ****
  
      tset = bc_FindVolumeSet(bc_globalConfig, volSetName);
      if (!tset) {
! 	com_err(whoami, code, "; Volume entry not added");
  	ERROR(code);
      }
  
--- 81,87 ----
  
      tset = bc_FindVolumeSet(bc_globalConfig, volSetName);
      if (!tset) {
! 	afs_com_err(whoami, code, "; Volume entry not added");
  	ERROR(code);
      }
  
***************
*** 93,99 ****
  
      code = bc_UpdateVolumeSet();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
  
--- 93,99 ----
  
      code = bc_UpdateVolumeSet();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
  
***************
*** 101,115 ****
  	bc_AddVolumeItem(bc_globalConfig, volSetName, serverName,
  			 partitionName, volRegExp);
      if (code) {
! 	com_err(whoami, code, "; Volume entry not added");
  	ERROR(code);
      }
  
      if (!(tset->flags & VSFLAG_TEMPORARY)) {
  	code = bc_SaveVolumeSet();
  	if (code) {
! 	    com_err(whoami, code, "Cannot save volume set file");
! 	    com_err(whoami, 0,
  		    "Changes are temporary - for this session only");
  	}
      }
--- 101,115 ----
  	bc_AddVolumeItem(bc_globalConfig, volSetName, serverName,
  			 partitionName, volRegExp);
      if (code) {
! 	afs_com_err(whoami, code, "; Volume entry not added");
  	ERROR(code);
      }
  
      if (!(tset->flags & VSFLAG_TEMPORARY)) {
  	code = bc_SaveVolumeSet();
  	if (code) {
! 	    afs_com_err(whoami, code, "Cannot save volume set file");
! 	    afs_com_err(whoami, 0,
  		    "Changes are temporary - for this session only");
  	}
      }
***************
*** 154,160 ****
  
      code = bc_UpdateVolumeSet();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
  
--- 154,160 ----
  
      code = bc_UpdateVolumeSet();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
  
***************
*** 164,177 ****
  			   flags);
      if (code) {
  	if (code == -1)
! 	    com_err(whoami, 0, "Volume set '%s' already exists", ti->data);
  	else
! 	    com_err(whoami, 0, "Unknown problem");
      } else if (!(flags & VSFLAG_TEMPORARY)) {
  	code = bc_SaveVolumeSet();
  	if (code) {
! 	    com_err(whoami, code, "Cannot save new volume set file");
! 	    com_err(whoami, 0,
  		    "Changes are temporary - for this session only");
  	}
      }
--- 164,177 ----
  			   flags);
      if (code) {
  	if (code == -1)
! 	    afs_com_err(whoami, 0, "Volume set '%s' already exists", ti->data);
  	else
! 	    afs_com_err(whoami, 0, "Unknown problem");
      } else if (!(flags & VSFLAG_TEMPORARY)) {
  	code = bc_SaveVolumeSet();
  	if (code) {
! 	    afs_com_err(whoami, code, "Cannot save new volume set file");
! 	    afs_com_err(whoami, 0,
  		    "Changes are temporary - for this session only");
  	}
      }
***************
*** 205,211 ****
  
      code = bc_UpdateVolumeSet();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
  
--- 205,211 ----
  
      code = bc_UpdateVolumeSet();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
  
***************
*** 214,220 ****
  
      tset = bc_FindVolumeSet(bc_globalConfig, vsname);
      if (!tset) {
! 	com_err(whoami, 0, "No such volume set as '%s'", vsname);
  	ERROR(code);
      }
  
--- 214,220 ----
  
      tset = bc_FindVolumeSet(bc_globalConfig, vsname);
      if (!tset) {
! 	afs_com_err(whoami, 0, "No such volume set as '%s'", vsname);
  	ERROR(code);
      }
  
***************
*** 226,238 ****
  
      code = bc_UpdateVolumeSet();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
  
      entry = bc_SafeATOI(as->parms[1].items->data);
      if (entry < 0) {
! 	com_err(whoami, 0, "Can't parse entry number '%s' as decimal integer",
  		as->parms[1].items->data);
  	ERROR(BC_BADARG);
      }
--- 226,238 ----
  
      code = bc_UpdateVolumeSet();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
  
      entry = bc_SafeATOI(as->parms[1].items->data);
      if (entry < 0) {
! 	afs_com_err(whoami, 0, "Can't parse entry number '%s' as decimal integer",
  		as->parms[1].items->data);
  	ERROR(BC_BADARG);
      }
***************
*** 240,251 ****
      code = bc_DeleteVolumeItem(bc_globalConfig, vsname, entry);
      if (code) {
  	if (code == -1) {
! 	    com_err(whoami, 0, "No such volume set as '%s'", vsname);
  	} else if (code == -2) {
! 	    com_err(whoami, 0,
  		    "There aren't %d volume items for this volume set",
  		    entry);
! 	    com_err(whoami, 0,
  		    "Use the 'listvolsets' command to examine the volume set");
  	}
  	ERROR(code);
--- 240,251 ----
      code = bc_DeleteVolumeItem(bc_globalConfig, vsname, entry);
      if (code) {
  	if (code == -1) {
! 	    afs_com_err(whoami, 0, "No such volume set as '%s'", vsname);
  	} else if (code == -2) {
! 	    afs_com_err(whoami, 0,
  		    "There aren't %d volume items for this volume set",
  		    entry);
! 	    afs_com_err(whoami, 0,
  		    "Use the 'listvolsets' command to examine the volume set");
  	}
  	ERROR(code);
***************
*** 257,264 ****
  	    printf("backup: deleted volume entry %d from volume set %s\n",
  		   entry, vsname);
  	} else {
! 	    com_err(whoami, code, "Cannot save volume set file");
! 	    com_err(whoami, 0,
  		    "Deletion is temporary - for this session only");
  	}
      }
--- 257,264 ----
  	    printf("backup: deleted volume entry %d from volume set %s\n",
  		   entry, vsname);
  	} else {
! 	    afs_com_err(whoami, code, "Cannot save volume set file");
! 	    afs_com_err(whoami, 0,
  		    "Deletion is temporary - for this session only");
  	}
      }
***************
*** 300,306 ****
  
      code = bc_UpdateVolumeSet();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
  
--- 300,306 ----
  
      code = bc_UpdateVolumeSet();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
  
***************
*** 308,316 ****
  	code = bc_DeleteVolumeSet(bc_globalConfig, ti->data, &flags);
  	if (code) {
  	    if (code == -1)
! 		com_err(whoami, 0, "Can't find volume set '%s'", ti->data);
  	    else
! 		com_err(whoami, code,
  			"; Unknown problem deleting volume set '%s'",
  			ti->data);
  	} else {
--- 308,316 ----
  	code = bc_DeleteVolumeSet(bc_globalConfig, ti->data, &flags);
  	if (code) {
  	    if (code == -1)
! 		afs_com_err(whoami, 0, "Can't find volume set '%s'", ti->data);
  	    else
! 		afs_com_err(whoami, code,
  			"; Unknown problem deleting volume set '%s'",
  			ti->data);
  	} else {
***************
*** 326,333 ****
  	if (c) {
  	    if (!code)
  		code = c;
! 	    com_err(whoami, c, "Cannot save updated volume set file");
! 	    com_err(whoami, 0, "Deletion effective for this session only");
  	}
  
      }
--- 326,333 ----
  	if (c) {
  	    if (!code)
  		code = c;
! 	    afs_com_err(whoami, c, "Cannot save updated volume set file");
! 	    afs_com_err(whoami, 0, "Deletion effective for this session only");
  	}
  
      }
***************
*** 374,380 ****
  
      code = bc_UpdateVolumeSet();
      if (code) {
! 	com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
  
--- 374,380 ----
  
      code = bc_UpdateVolumeSet();
      if (code) {
! 	afs_com_err(whoami, code, "; Can't retrieve volume sets");
  	return (code);
      }
  
***************
*** 387,393 ****
  		ListVolSet(tset);
  		printf("\n");
  	    } else {
! 		com_err(whoami, 0, "Can't find volume set '%s'", ti->data);
  		code = 1;
  	    }
  	}
--- 387,393 ----
  		ListVolSet(tset);
  		printf("\n");
  	    } else {
! 		afs_com_err(whoami, 0, "Can't find volume set '%s'", ti->data);
  		code = 1;
  	    }
  	}
***************
*** 495,501 ****
  	    if ((code != 2)
  		|| (strcmp(serverName, "volumeset") != 0)
  		) {
! 		com_err(whoami, 0, "Bad volume header line: '%s'", tbuffer);
  		return (-1);
  	    }
  
--- 495,501 ----
  	    if ((code != 2)
  		|| (strcmp(serverName, "volumeset") != 0)
  		) {
! 		afs_com_err(whoami, 0, "Bad volume header line: '%s'", tbuffer);
  		return (-1);
  	    }
  
***************
*** 534,546 ****
  	    tve = (struct bc_volumeEntry *)
  		malloc(sizeof(struct bc_volumeEntry));
  	    if (!tve) {
! 		com_err(whoami, 0,
  			"Can't malloc() a new volume spec record!");
  		return (-1);
  	    }
  	    memset(tve, 0, sizeof(*tve));
  	    if (bc_ParseHost(serverName, &(tve->server)))
! 		com_err(whoami, 0, "Can't get required info on host '%s'",
  			serverName);
  
  	    /* The above code has filled in the server sockaddr, now fill in
--- 534,546 ----
  	    tve = (struct bc_volumeEntry *)
  		malloc(sizeof(struct bc_volumeEntry));
  	    if (!tve) {
! 		afs_com_err(whoami, 0,
  			"Can't malloc() a new volume spec record!");
  		return (-1);
  	    }
  	    memset(tve, 0, sizeof(*tve));
  	    if (bc_ParseHost(serverName, &(tve->server)))
! 		afs_com_err(whoami, 0, "Can't get required info on host '%s'",
  			serverName);
  
  	    /* The above code has filled in the server sockaddr, now fill in
***************
*** 548,573 ****
  	     */
  	    tve->serverName = (char *)malloc(strlen(serverName) + 1);
  	    if (!tve->serverName) {
! 		com_err(whoami, 0,
  			"Can't malloc() a new volume spec server name field!");
  		return (-1);
  	    }
  	    strcpy(tve->serverName, serverName);
  	    tve->partname = (char *)malloc(strlen(partName) + 1);
  	    if (!tve->partname) {
! 		com_err(whoami, 0,
  			"Can't malloc() a new volume spec partition pattern field!");
  		return (-1);
  	    }
  	    strcpy(tve->partname, partName);
  	    code = bc_GetPartitionID(partName, &tve->partition);
  	    if (code) {
! 		com_err(whoami, 0, "Can't parse partition '%s'", partName);
  		return -1;
  	    }
  	    tp = (char *)malloc(strlen(vsname) + 1);
  	    if (!tp) {
! 		com_err(whoami, 0,
  			"Can't malloc() a new volume spec volume pattern field!");
  		return (-1);
  	    }
--- 548,573 ----
  	     */
  	    tve->serverName = (char *)malloc(strlen(serverName) + 1);
  	    if (!tve->serverName) {
! 		afs_com_err(whoami, 0,
  			"Can't malloc() a new volume spec server name field!");
  		return (-1);
  	    }
  	    strcpy(tve->serverName, serverName);
  	    tve->partname = (char *)malloc(strlen(partName) + 1);
  	    if (!tve->partname) {
! 		afs_com_err(whoami, 0,
  			"Can't malloc() a new volume spec partition pattern field!");
  		return (-1);
  	    }
  	    strcpy(tve->partname, partName);
  	    code = bc_GetPartitionID(partName, &tve->partition);
  	    if (code) {
! 		afs_com_err(whoami, 0, "Can't parse partition '%s'", partName);
  		return -1;
  	    }
  	    tp = (char *)malloc(strlen(vsname) + 1);
  	    if (!tp) {
! 		afs_com_err(whoami, 0,
  			"Can't malloc() a new volume spec volume pattern field!");
  		return (-1);
  	    }
Index: openafs/src/bucoord/volstub.c
diff -c openafs/src/bucoord/volstub.c:1.6.2.2 openafs/src/bucoord/volstub.c:1.6.2.3
*** openafs/src/bucoord/volstub.c:1.6.2.2	Thu Jan  4 22:34:09 2007
--- openafs/src/bucoord/volstub.c	Tue Apr 10 14:43:41 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/volstub.c,v 1.6.2.2 2007/01/05 03:34:09 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bucoord/volstub.c,v 1.6.2.3 2007/04/10 18:43:41 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 27,32 ****
--- 27,33 ----
  #include "volser.h"
  #include "bc.h"
  #include <afs/volint.h>
+ #include <afs/com_err.h>
  
  extern char *whoami;
  
***************
*** 76,82 ****
  
      code = UV_ListOneVolume(htonl(serv), part, volid, &viptr);
      if (code) {
! 	com_err(whoami, code,
  		"Warning: Can't get clone time of volume %u - using 0",
  		volid);
  	*clDatePtr = 0;
--- 77,83 ----
  
      code = UV_ListOneVolume(htonl(serv), part, volid, &viptr);
      if (code) {
! 	afs_com_err(whoami, code,
  		"Warning: Can't get clone time of volume %u - using 0",
  		volid);
  	*clDatePtr = 0;
***************
*** 98,104 ****
  	break;
  
      default:
! 	com_err(whoami, 0,
  		"Can't get clone time of volume %u - unknown volume type",
  		volid);
  	return (-1);
--- 99,105 ----
  	break;
  
      default:
! 	afs_com_err(whoami, 0,
  		"Can't get clone time of volume %u - unknown volume type",
  		volid);
  	return (-1);
Index: openafs/src/budb/database.c
diff -c openafs/src/budb/database.c:1.7 openafs/src/budb/database.c:1.7.2.1
*** openafs/src/budb/database.c:1.7	Tue Jul 15 19:14:48 2003
--- openafs/src/budb/database.c	Fri Jul  6 07:34:00 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/database.c,v 1.7 2003/07/15 23:14:48 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/database.c,v 1.7.2.1 2007/07/06 11:34:00 jaltman Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
***************
*** 75,85 ****
   */
  
  afs_int32
! dbwrite(ut, pos, buff, len)
!      struct ubik_trans *ut;
!      afs_int32 pos;
!      char *buff;
!      afs_int32 len;
  {
      afs_int32 code = 0;
  
--- 75,81 ----
   */
  
  afs_int32
! dbwrite(struct ubik_trans *ut, afs_int32 pos, void *buff, afs_int32 len)
  {
      afs_int32 code = 0;
  
***************
*** 111,121 ****
  /* same thing for read */
  
  afs_int32
! dbread(ut, pos, buff, len)
!      struct ubik_trans *ut;
!      afs_int32 pos;
!      char *buff;
!      afs_int32 len;
  {
      afs_int32 code = 0;
  
--- 107,113 ----
  /* same thing for read */
  
  afs_int32
! dbread(struct ubik_trans *ut, afs_int32 pos, void *buff, afs_int32 len)
  {
      afs_int32 code = 0;
  
***************
*** 146,157 ****
  
  /* Same as dbread excepts it does checking */
  afs_int32
! cdbread(ut, type, pos, buff, len)
!      struct ubik_trans *ut;
!      int type;
!      afs_int32 pos;
!      char *buff;
!      afs_int32 len;
  {
      afs_int32 code = 0;
  
--- 138,144 ----
  
  /* Same as dbread excepts it does checking */
  afs_int32
! cdbread(struct ubik_trans *ut, int type, afs_int32 pos, void *buff, afs_int32 len)
  {
      afs_int32 code = 0;
  
Index: openafs/src/budb/database.h
diff -c openafs/src/budb/database.h:1.4 openafs/src/budb/database.h:1.4.2.1
*** openafs/src/budb/database.h:1.4	Sun Dec  7 17:49:19 2003
--- openafs/src/budb/database.h	Fri Jul  6 07:34:00 2007
***************
*** 315,320 ****
  extern afs_uint32 ht_HashEntry();
  extern dbadr ht_LookupBucket();
  
! extern afs_int32 dbwrite(struct ubik_trans *ut, afs_int32 pos, char *buff, afs_int32 len);
  extern void db_panic(char *reason);
  extern void ht_Reset(struct memoryHashTable *mht);
--- 315,322 ----
  extern afs_uint32 ht_HashEntry();
  extern dbadr ht_LookupBucket();
  
! extern afs_int32 dbwrite(struct ubik_trans *ut, afs_int32 pos, void *buff, afs_int32 len);
! extern afs_int32 dbread(struct ubik_trans *ut, afs_int32 pos, void *buff, afs_int32 len);
! extern afs_int32 cdbread(struct ubik_trans *ut, int type, afs_int32 pos, void *buff, afs_int32 len);
  extern void db_panic(char *reason);
  extern void ht_Reset(struct memoryHashTable *mht);
Index: openafs/src/budb/ol_verify.c
diff -c openafs/src/budb/ol_verify.c:1.13 openafs/src/budb/ol_verify.c:1.13.2.1
*** openafs/src/budb/ol_verify.c:1.13	Sat Nov 29 17:08:09 2003
--- openafs/src/budb/ol_verify.c	Fri Jul  6 07:38:31 2007
***************
*** 13,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/ol_verify.c,v 1.13 2003/11/29 22:08:09 jaltman Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
--- 13,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/ol_verify.c,v 1.13.2.1 2007/07/06 11:38:31 jaltman Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
***************
*** 303,311 ****
      return (typeName[index]);
  }
  
! getDumpID(ut, tapePtr, dumpID)
!      struct tape *tapePtr;
!      afs_int32 *dumpID;
  {
      struct dump d;
      afs_int32 code;
--- 303,312 ----
      return (typeName[index]);
  }
  
! int
! getDumpID(struct ubik_trans *ut,
!     struct tape *tapePtr,
!     afs_int32 *dumpID)
  {
      struct dump d;
      afs_int32 code;
***************
*** 314,319 ****
--- 315,321 ----
      code = dbread(ut, ntohl(tapePtr->dump), &d, sizeof(d));
      if (!code)
  	*dumpID = ntohl(d.id);
+     return code;
  }
  
  /* ------------------------------------
Index: openafs/src/budb/server.c
diff -c openafs/src/budb/server.c:1.14.2.4 openafs/src/budb/server.c:1.14.2.5
*** openafs/src/budb/server.c:1.14.2.4	Tue Jun 20 16:35:00 2006
--- openafs/src/budb/server.c	Tue Apr 10 14:43:41 2007
***************
*** 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>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/server.c,v 1.14.2.5 2007/04/10 18:43:41 shadow Exp $");
  
  #include <fcntl.h>
  #include <sys/stat.h>
***************
*** 410,416 ****
  #ifdef AFS_NT40_ENV
  	ReportErrorEventAlt(AFSEVT_SVR_NO_INSTALL_DIR, 0, argv[0], 0);
  #endif
! 	com_err(whoami, errno, "; Unable to obtain AFS server directory.");
  	exit(2);
      }
  
--- 410,416 ----
  #ifdef AFS_NT40_ENV
  	ReportErrorEventAlt(AFSEVT_SVR_NO_INSTALL_DIR, 0, argv[0], 0);
  #endif
! 	afs_com_err(whoami, errno, "; Unable to obtain AFS server directory.");
  	exit(2);
      }
  
***************
*** 468,474 ****
      BU_conf = afsconf_Open(globalConfPtr->cellConfigdir);
      if (BU_conf == 0) {
  	LogError(code, "Failed getting cell info\n");
! 	com_err(whoami, code, "Failed getting cell info");
  	ERROR(BUDB_NOCELLS);
      }
  
--- 468,474 ----
      BU_conf = afsconf_Open(globalConfPtr->cellConfigdir);
      if (BU_conf == 0) {
  	LogError(code, "Failed getting cell info\n");
! 	afs_com_err(whoami, code, "Failed getting cell info");
  	ERROR(BUDB_NOCELLS);
      }
  
***************
*** 551,557 ****
  
      if (code) {
  	LogError(code, "Ubik init failed\n");
! 	com_err(whoami, code, "Ubik init failed");
  	ERROR(code);
      }
  
--- 551,557 ----
  
      if (code) {
  	LogError(code, "Ubik init failed\n");
! 	afs_com_err(whoami, code, "Ubik init failed");
  	ERROR(code);
      }
  
***************
*** 678,685 ****
  	fprintf(globalConfPtr->log, "%s ", TimeStamp(now));
  
  	if (code)
! 	    fprintf(globalConfPtr->log, "%s: %s\n", error_table_name(code),
! 		    error_message(code));
  	fprintf(globalConfPtr->log, a, b, c, d, e, f, g, h, i);
  	fflush(globalConfPtr->log);
  	fclose(globalConfPtr->log);
--- 678,685 ----
  	fprintf(globalConfPtr->log, "%s ", TimeStamp(now));
  
  	if (code)
! 	    fprintf(globalConfPtr->log, "%s: %s\n", afs_error_table_name(code),
! 		    afs_error_message(code));
  	fprintf(globalConfPtr->log, a, b, c, d, e, f, g, h, i);
  	fflush(globalConfPtr->log);
  	fclose(globalConfPtr->log);
Index: openafs/src/butc/butc_xbsa.c
diff -c openafs/src/butc/butc_xbsa.c:1.8 openafs/src/butc/butc_xbsa.c:1.8.2.1
*** openafs/src/butc/butc_xbsa.c:1.8	Wed Jul 14 00:46:48 2004
--- openafs/src/butc/butc_xbsa.c	Mon Jul 16 16:43:31 2007
***************
*** 13,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/butc_xbsa.c,v 1.8 2004/07/14 04:46:48 shadow Exp $");
  
  #include <sys/types.h>
  #include <afs/stds.h>
--- 13,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/butc_xbsa.c,v 1.8.2.1 2007/07/16 20:43:31 shadow Exp $");
  
  #include <sys/types.h>
  #include <afs/stds.h>
***************
*** 132,138 ****
  		       RTLD_NOW | RTLD_LOCAL | RTLD_MEMBER);
  	}
  #elif defined(AFS_SUN5_ENV)
! 	dynlib = dlopen("/usr/lib/libXApi.so", RTLD_NOW | RTLD_LOCAL);
  #else
  	dynlib = NULL;
  #endif
--- 132,139 ----
  		       RTLD_NOW | RTLD_LOCAL | RTLD_MEMBER);
  	}
  #elif defined(AFS_SUN5_ENV)
! 	dlopen ("/usr/lib/libCstd.so.1", RTLD_NOW | RTLD_GLOBAL);
! 	dynlib = dlopen("/usr/lib/libXApi.so", RTLD_NOW | RTLD_GLOBAL);
  #else
  	dynlib = NULL;
  #endif
Index: openafs/src/butc/lwps.c
diff -c openafs/src/butc/lwps.c:1.12.2.2 openafs/src/butc/lwps.c:1.12.2.3
*** openafs/src/butc/lwps.c:1.12.2.2	Mon Jul 11 15:29:36 2005
--- openafs/src/butc/lwps.c	Tue Apr 10 14:43:41 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/lwps.c,v 1.12.2.2 2005/07/11 19:29:36 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butc/lwps.c,v 1.12.2.3 2007/04/10 18:43:41 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 175,182 ****
  	    err1 = "Volume has moved to another server";
  	    break;
  	default:
! 	    err1 = (char *)error_message(error1);
! 	    err2 = (char *)error_table_name(error1);
  	    break;
  	}
  	if (error1 == -1)
--- 175,182 ----
  	    err1 = "Volume has moved to another server";
  	    break;
  	default:
! 	    err1 = (char *)afs_error_message(error1);
! 	    err2 = (char *)afs_error_table_name(error1);
  	    break;
  	}
  	if (error1 == -1)
***************
*** 184,190 ****
  	else
  	    fprintf(log, "     %s: %s", err2, err1);
  	if (error2)
! 	    fprintf(log, ": %s", error_message(error2));
  	fprintf(log, "\n");
      }
      fflush(log);
--- 184,190 ----
  	else
  	    fprintf(log, "     %s: %s", err2, err1);
  	if (error2)
! 	    fprintf(log, ": %s", afs_error_message(error2));
  	fprintf(log, "\n");
      }
      fflush(log);
***************
*** 573,579 ****
  	    }
  	    if (rcpid == -1 && errno != EINTR) {
  		tapemounted = 0;
! 		com_err(whoami, errno,
  			"Error waiting for callout script to terminate.");
  		break;
  	    }
--- 573,579 ----
  	    }
  	    if (rcpid == -1 && errno != EINTR) {
  		tapemounted = 0;
! 		afs_com_err(whoami, errno,
  			"Error waiting for callout script to terminate.");
  		break;
  	    }
***************
*** 737,743 ****
  	    }
  	    /* if waitpid experienced an error, we prompt */
  	    if (rcpid == -1 && errno != EINTR) {
! 		com_err(whoami, errno,
  			"Error waiting for callout script to terminate.");
  		TLog(taskId,
  		     "Can't get exit status from callout script. will prompt\n");
--- 737,743 ----
  	    }
  	    /* if waitpid experienced an error, we prompt */
  	    if (rcpid == -1 && errno != EINTR) {
! 		afs_com_err(whoami, errno,
  			"Error waiting for callout script to terminate.");
  		TLog(taskId,
  		     "Can't get exit status from callout script. will prompt\n");
Index: openafs/src/butm/butm_test.c
diff -c openafs/src/butm/butm_test.c:1.8 openafs/src/butm/butm_test.c:1.8.2.1
*** openafs/src/butm/butm_test.c:1.8	Tue Jul 15 19:14:49 2003
--- openafs/src/butm/butm_test.c	Tue Apr 10 14:43:42 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butm/butm_test.c,v 1.8 2003/07/15 23:14:49 shadow Exp $");
  
  #include <errno.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butm/butm_test.c,v 1.8.2.1 2007/04/10 18:43:42 shadow Exp $");
  
  #include <errno.h>
  #include <sys/types.h>
***************
*** 34,40 ****
                         if (code != err) \
                         { \
                            printf("FAILURE: expected %u; got %u\n", err, code); \
!                           if (code) com_err(whoami, code, ""); \
  		       } \
                         else printf("PASSED; got %u\n", err); \
                         printf("\n");
--- 34,40 ----
                         if (code != err) \
                         { \
                            printf("FAILURE: expected %u; got %u\n", err, code); \
!                           if (code) afs_com_err(whoami, code, ""); \
  		       } \
                         else printf("PASSED; got %u\n", err); \
                         printf("\n");
***************
*** 43,49 ****
                          { \
  			   printf("TEST: %s\n", str); \
                             printf("FAILURE: expected %u; got %u\n", err, code); \
!                            if (code) com_err(whoami, code, ""); \
  			   printf("\n"); \
  		        }
  #define NOREWIND 0
--- 43,49 ----
                          { \
  			   printf("TEST: %s\n", str); \
                             printf("FAILURE: expected %u; got %u\n", err, code); \
!                            if (code) afs_com_err(whoami, code, ""); \
  			   printf("\n"); \
  		        }
  #define NOREWIND 0
Index: openafs/src/butm/file_tm.c
diff -c openafs/src/butm/file_tm.c:1.11.2.1 openafs/src/butm/file_tm.c:1.11.2.2
*** openafs/src/butm/file_tm.c:1.11.2.1	Sun Apr  3 14:15:47 2005
--- openafs/src/butm/file_tm.c	Tue Apr 10 14:43:42 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butm/file_tm.c,v 1.11.2.1 2005/04/03 18:15:47 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butm/file_tm.c,v 1.11.2.2 2007/04/10 18:43:42 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
***************
*** 1752,1758 ****
       struct tapeConfig *file;
  {
      if (!file) {
! 	com_err(whoami, BUTM_BADCONFIG, "device not specified");
  	return BUTM_BADCONFIG;
      }
  
--- 1752,1758 ----
       struct tapeConfig *file;
  {
      if (!file) {
! 	afs_com_err(whoami, BUTM_BADCONFIG, "device not specified");
  	return BUTM_BADCONFIG;
      }
  
***************
*** 1763,1775 ****
  
      /* Tape must be large enough to at least fit a label */
      if (config.tapeSize <= 0) {
! 	com_err(whoami, BUTM_BADCONFIG, "Tape size bogus: %d Kbytes",
  		config.tapeSize);
  	return BUTM_BADCONFIG;
      }
  
      if (strlen(config.tapedir) == 0) {
! 	com_err(whoami, BUTM_BADCONFIG, "no tape device specified");
  	return BUTM_BADCONFIG;
      }
  
--- 1763,1775 ----
  
      /* Tape must be large enough to at least fit a label */
      if (config.tapeSize <= 0) {
! 	afs_com_err(whoami, BUTM_BADCONFIG, "Tape size bogus: %d Kbytes",
  		config.tapeSize);
  	return BUTM_BADCONFIG;
      }
  
      if (strlen(config.tapedir) == 0) {
! 	afs_com_err(whoami, BUTM_BADCONFIG, "no tape device specified");
  	return BUTM_BADCONFIG;
      }
  
Index: openafs/src/butm/test_ftm.c
diff -c openafs/src/butm/test_ftm.c:1.10.2.1 openafs/src/butm/test_ftm.c:1.10.2.2
*** openafs/src/butm/test_ftm.c:1.10.2.1	Mon Oct 18 03:11:52 2004
--- openafs/src/butm/test_ftm.c	Tue Apr 10 14:43:42 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butm/test_ftm.c,v 1.10.2.1 2004/10/18 07:11:52 shadow Exp $");
  
  #include <sys/types.h>
  #include <fcntl.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/butm/test_ftm.c,v 1.10.2.2 2007/04/10 18:43:42 shadow Exp $");
  
  #include <sys/types.h>
  #include <fcntl.h>
***************
*** 131,144 ****
  	    else if (strncmp(argv[i], "-tapename", strlen(argv[i])) == 0)
  		tape = argv[++i];
  	    else {
! 		com_err(whoami, 0, "unexpected command argument: '%s'",
  			argv[i]);
  		goto usage;
  	    }
  	} else {
  	    struct stat buf;
  	    if (stat(argv[i], &buf)) {
! 		com_err(whoami, errno, "can't stat filename parameter %s\n",
  			argv[i]);
  	    } else {
  		if ((buf.st_mode & S_IFREG) && (buf.st_mode & 0444))
--- 131,144 ----
  	    else if (strncmp(argv[i], "-tapename", strlen(argv[i])) == 0)
  		tape = argv[++i];
  	    else {
! 		afs_com_err(whoami, 0, "unexpected command argument: '%s'",
  			argv[i]);
  		goto usage;
  	    }
  	} else {
  	    struct stat buf;
  	    if (stat(argv[i], &buf)) {
! 		afs_com_err(whoami, errno, "can't stat filename parameter %s\n",
  			argv[i]);
  	    } else {
  		if ((buf.st_mode & S_IFREG) && (buf.st_mode & 0444))
***************
*** 152,163 ****
  	goto usage;
  
      if ((strlen(tape) == 0) || (strlen(tape) >= BU_MAXTAPELEN)) {
! 	com_err(whoami, 0, "bogus tape name");
  	goto usage;
      }
      code = GetDeviceInfo(config, &confInfo);
      if (code) {
! 	com_err(whoami, 0, "cant find tape config info");
  	goto usage;
      }
  
--- 152,163 ----
  	goto usage;
  
      if ((strlen(tape) == 0) || (strlen(tape) >= BU_MAXTAPELEN)) {
! 	afs_com_err(whoami, 0, "bogus tape name");
  	goto usage;
      }
      code = GetDeviceInfo(config, &confInfo);
      if (code) {
! 	afs_com_err(whoami, 0, "cant find tape config info");
  	goto usage;
      }
  
***************
*** 169,180 ****
      printf("%s: Beginning Dump Tests\n", whoami);
      code = LWP_InitializeProcessSupport(1, &parent_pid);
      if (code) {
! 	com_err(whoami, code, "Can't init LWP lib");
  	exit(1);
      }
      code = IOMGR_Initialize();
      if (code) {
! 	com_err(whoami, code, "Can't init LWP IOMGR lib");
  	exit(1);
      }
      /* Perform normal test */
--- 169,180 ----
      printf("%s: Beginning Dump Tests\n", whoami);
      code = LWP_InitializeProcessSupport(1, &parent_pid);
      if (code) {
! 	afs_com_err(whoami, code, "Can't init LWP lib");
  	exit(1);
      }
      code = IOMGR_Initialize();
      if (code) {
! 	afs_com_err(whoami, code, "Can't init LWP IOMGR lib");
  	exit(1);
      }
      /* Perform normal test */
***************
*** 182,188 ****
  	LWP_CreateProcess(PerformDumpTest, 100000, 0, (void *)&ti,
  			  "BUTM Tester", &pid);
      if (code) {
! 	com_err(whoami, code, "libbutm.a: Normal Tests failed!. :-( ");
  	exit(code);
      }
      LWP_WaitProcess(&ti.dumpDone);
--- 182,188 ----
  	LWP_CreateProcess(PerformDumpTest, 100000, 0, (void *)&ti,
  			  "BUTM Tester", &pid);
      if (code) {
! 	afs_com_err(whoami, code, "libbutm.a: Normal Tests failed!. :-( ");
  	exit(code);
      }
      LWP_WaitProcess(&ti.dumpDone);
***************
*** 195,201 ****
  	    LWP_CreateProcess(PerformDumpTest, 100000, 0, (void *)&ti,
  			      "BUTM Tester", &pid);
  	if (code) {
! 	    com_err(whoami, code, "libbutm.a: Appended Tests failed!. :-( ");
  	    exit(code);
  	}
  
--- 195,201 ----
  	    LWP_CreateProcess(PerformDumpTest, 100000, 0, (void *)&ti,
  			      "BUTM Tester", &pid);
  	if (code) {
! 	    afs_com_err(whoami, code, "libbutm.a: Appended Tests failed!. :-( ");
  	    exit(code);
  	}
  
***************
*** 228,234 ****
  
      info.structVersion = BUTM_MAJORVERSION;
      if (code = butm_file_Instantiate(&info, tip->tc_Infop)) {
! 	com_err(whoami, code, "instantiating file tape");
  	ERROR_EXIT(2);
      }
  
--- 228,234 ----
  
      info.structVersion = BUTM_MAJORVERSION;
      if (code = butm_file_Instantiate(&info, tip->tc_Infop)) {
! 	afs_com_err(whoami, code, "instantiating file tape");
  	ERROR_EXIT(2);
      }
  
***************
*** 251,269 ****
      strcpy(label.comment, T_COMMENT);
  
      if (code = butm_Mount(&info, tip->tapeName)) {
! 	com_err(whoami, code, "setting up tape");
  	ERROR_EXIT(2);
      }
      if (tip->appended) {	/* This is to be an appended dump */
  	code = butm_SeekEODump(&info, tip->nFiles + 1);
  	if (code) {
! 	    com_err(whoami, code,
  		    "Can't append: Can't position to end of dump on tape\n");
  	    ERROR_EXIT(code);
  	}
      }
      if ((code = butm_Create(&info, &label, !tip->appended /*Rewind */ ))) {
! 	com_err(whoami, code, "Writing tape label");
  	ERROR_EXIT(2);
      }
  
--- 251,269 ----
      strcpy(label.comment, T_COMMENT);
  
      if (code = butm_Mount(&info, tip->tapeName)) {
! 	afs_com_err(whoami, code, "setting up tape");
  	ERROR_EXIT(2);
      }
      if (tip->appended) {	/* This is to be an appended dump */
  	code = butm_SeekEODump(&info, tip->nFiles + 1);
  	if (code) {
! 	    afs_com_err(whoami, code,
  		    "Can't append: Can't position to end of dump on tape\n");
  	    ERROR_EXIT(code);
  	}
      }
      if ((code = butm_Create(&info, &label, !tip->appended /*Rewind */ ))) {
! 	afs_com_err(whoami, code, "Writing tape label");
  	ERROR_EXIT(2);
      }
  
***************
*** 272,305 ****
  	int len;
  	int fid = open(tip->files[i], O_RDONLY, 0);
  	if (fid < 0) {
! 	    com_err(whoami, errno, "opening file to write on tape");
  	    ERROR_EXIT(3);
  	}
  	if (code = butm_WriteFileBegin(&info)) {
! 	    com_err(whoami, code, "beginning butm write file");
  	    ERROR_EXIT(3);
  	}
  	while ((len = read(fid, bufferBlock->data, BUTM_BLKSIZE)) > 0) {
  	    if (code = butm_WriteFileData(&info, bufferBlock->data, 1, len)) {
! 		com_err(whoami, code, "butm writing file data");
  		ERROR_EXIT(3);
  	    }
  	}
  	if (len < 0) {
! 	    com_err(whoami, errno, "reading file data");
  	    ERROR_EXIT(3);
  	}
  	if (code = butm_WriteFileEnd(&info)) {
! 	    com_err(whoami, code, "ending butm write file");
  	    ERROR_EXIT(3);
  	}
  	if (close(fid) < 0) {
! 	    com_err(whoami, errno, "closing file");
  	    ERROR_EXIT(3);
  	}
      }
      if ((code = butm_WriteEOT(&info)) || (code = butm_Dismount(&info))) {
! 	com_err(whoami, code, "finishing up tape");
  	ERROR_EXIT(4);
      }
  
--- 272,305 ----
  	int len;
  	int fid = open(tip->files[i], O_RDONLY, 0);
  	if (fid < 0) {
! 	    afs_com_err(whoami, errno, "opening file to write on tape");
  	    ERROR_EXIT(3);
  	}
  	if (code = butm_WriteFileBegin(&info)) {
! 	    afs_com_err(whoami, code, "beginning butm write file");
  	    ERROR_EXIT(3);
  	}
  	while ((len = read(fid, bufferBlock->data, BUTM_BLKSIZE)) > 0) {
  	    if (code = butm_WriteFileData(&info, bufferBlock->data, 1, len)) {
! 		afs_com_err(whoami, code, "butm writing file data");
  		ERROR_EXIT(3);
  	    }
  	}
  	if (len < 0) {
! 	    afs_com_err(whoami, errno, "reading file data");
  	    ERROR_EXIT(3);
  	}
  	if (code = butm_WriteFileEnd(&info)) {
! 	    afs_com_err(whoami, code, "ending butm write file");
  	    ERROR_EXIT(3);
  	}
  	if (close(fid) < 0) {
! 	    afs_com_err(whoami, errno, "closing file");
  	    ERROR_EXIT(3);
  	}
      }
      if ((code = butm_WriteEOT(&info)) || (code = butm_Dismount(&info))) {
! 	afs_com_err(whoami, code, "finishing up tape");
  	ERROR_EXIT(4);
      }
  
***************
*** 307,325 ****
  
      label.structVersion = BUTM_MAJORVERSION;
      if (code = butm_Mount(&info, tip->tapeName)) {
! 	com_err(whoami, code, "setting up tape");
  	ERROR_EXIT(5);
      }
      if (tip->appended) {	/* This is to be an appended dump */
  	code = butm_SeekEODump(&info, tip->nFiles + 1);
  	if (code) {
! 	    com_err(whoami, code,
  		    "Can't append: Can't position to end of dump on tape\n");
  	    ERROR_EXIT(code);
  	}
      }
      if (code = butm_ReadLabel(&info, &label, !tip->appended /*rewind */ )) {
! 	com_err(whoami, code, "reading tape label");
  	ERROR_EXIT(5);
      }
      past = time(0) - label.creationTime;
--- 307,325 ----
  
      label.structVersion = BUTM_MAJORVERSION;
      if (code = butm_Mount(&info, tip->tapeName)) {
! 	afs_com_err(whoami, code, "setting up tape");
  	ERROR_EXIT(5);
      }
      if (tip->appended) {	/* This is to be an appended dump */
  	code = butm_SeekEODump(&info, tip->nFiles + 1);
  	if (code) {
! 	    afs_com_err(whoami, code,
  		    "Can't append: Can't position to end of dump on tape\n");
  	    ERROR_EXIT(code);
  	}
      }
      if (code = butm_ReadLabel(&info, &label, !tip->appended /*rewind */ )) {
! 	afs_com_err(whoami, code, "reading tape label");
  	ERROR_EXIT(5);
      }
      past = time(0) - label.creationTime;
***************
*** 359,370 ****
  
  	fid = open(tip->files[i], O_RDONLY, 0);
  	if (fid < 0) {
! 	    com_err(whoami, errno, "Opening %dth file to compare with tape",
  		    i + 1);
  	    ERROR_EXIT(6);
  	}
  	if (code = butm_ReadFileBegin(&info)) {
! 	    com_err(whoami, code, "Beginning butm %dth read file", i + 1);
  	    ERROR_EXIT(6);
  	}
  
--- 359,370 ----
  
  	fid = open(tip->files[i], O_RDONLY, 0);
  	if (fid < 0) {
! 	    afs_com_err(whoami, errno, "Opening %dth file to compare with tape",
  		    i + 1);
  	    ERROR_EXIT(6);
  	}
  	if (code = butm_ReadFileBegin(&info)) {
! 	    afs_com_err(whoami, code, "Beginning butm %dth read file", i + 1);
  	    ERROR_EXIT(6);
  	}
  
***************
*** 374,386 ****
  	    code = butm_ReadFileData(&info, tbuffer, BUTM_BLKSIZE, &tlen);
  
  	    if (code && code != BUTM_STATUS_EOF) {
! 		com_err(whoami, code, "Reading %dth tape data", i + 1);
  		ERROR_EXIT(6);
  	    }
  	    memset(fbuffer, 0, BUTM_BLKSIZE);
  	    flen = read(fid, fbuffer, sizeof(fbuffer));
  	    if (flen < 0) {
! 		com_err(whoami, errno, "Reading %dth file data", i + 1);
  		ERROR_EXIT(6);
  	    }
  	    if (code == BUTM_STATUS_EOF)
--- 374,386 ----
  	    code = butm_ReadFileData(&info, tbuffer, BUTM_BLKSIZE, &tlen);
  
  	    if (code && code != BUTM_STATUS_EOF) {
! 		afs_com_err(whoami, code, "Reading %dth tape data", i + 1);
  		ERROR_EXIT(6);
  	    }
  	    memset(fbuffer, 0, BUTM_BLKSIZE);
  	    flen = read(fid, fbuffer, sizeof(fbuffer));
  	    if (flen < 0) {
! 		afs_com_err(whoami, errno, "Reading %dth file data", i + 1);
  		ERROR_EXIT(6);
  	    }
  	    if (code == BUTM_STATUS_EOF)
***************
*** 402,412 ****
  	}
  
  	if (code = butm_ReadFileEnd(&info)) {
! 	    com_err(whoami, code, "Ending butm %dth read file", i + 1);
  	    ERROR_EXIT(7);
  	}
  	if (close(fid) < 0) {
! 	    com_err(whoami, errno, "Closing %dth file", i + 1);
  	    ERROR_EXIT(7);
  	}
      }
--- 402,412 ----
  	}
  
  	if (code = butm_ReadFileEnd(&info)) {
! 	    afs_com_err(whoami, code, "Ending butm %dth read file", i + 1);
  	    ERROR_EXIT(7);
  	}
  	if (close(fid) < 0) {
! 	    afs_com_err(whoami, errno, "Closing %dth file", i + 1);
  	    ERROR_EXIT(7);
  	}
      }
***************
*** 414,425 ****
      if ((info.status & BUTM_STATUS_EOD) == 0) {
  	code = butm_ReadFileBegin(&info);
  	if (code && (code != BUTM_EOD)) {
! 	    com_err(whoami, code, "Should have encountered an 'End Of Tape'");
  	    ERROR_EXIT(8);
  	}
      }
      if (code = butm_Dismount(&info)) {
! 	com_err(whoami, code, "Finishing up tape");
  	ERROR_EXIT(8);
      }
  
--- 414,425 ----
      if ((info.status & BUTM_STATUS_EOD) == 0) {
  	code = butm_ReadFileBegin(&info);
  	if (code && (code != BUTM_EOD)) {
! 	    afs_com_err(whoami, code, "Should have encountered an 'End Of Tape'");
  	    ERROR_EXIT(8);
  	}
      }
      if (code = butm_Dismount(&info)) {
! 	afs_com_err(whoami, code, "Finishing up tape");
  	ERROR_EXIT(8);
      }
  
Index: openafs/src/cf/kerberos.m4
diff -c openafs/src/cf/kerberos.m4:1.1.2.10 openafs/src/cf/kerberos.m4:1.1.2.11
*** openafs/src/cf/kerberos.m4:1.1.2.10	Thu Jan  4 22:22:01 2007
--- openafs/src/cf/kerberos.m4	Wed Oct 10 13:47:59 2007
***************
*** 1,5 ****
  dnl
! dnl $Id: kerberos.m4,v 1.1.2.10 2007/01/05 03:22:01 shadow Exp $
  dnl
  dnl Kerberos autoconf glue
  dnl
--- 1,5 ----
  dnl
! dnl $Id: kerberos.m4,v 1.1.2.11 2007/10/10 17:47:59 shadow Exp $
  dnl
  dnl Kerberos autoconf glue
  dnl
***************
*** 58,64 ****
  	CPPFLAGS="$CPPFLAGS $KRB5CFLAGS"
  	save_LIBS="$LIBS"
  	LIBS="$LIBS $KRB5LIBS"
! 	AC_CHECK_FUNCS([add_to_error_table add_error_table krb5_princ_size krb5_principal_get_comp_string])
  	AC_CHECK_FUNCS([krb5_524_convert_creds], ,
  	    [AC_CHECK_FUNCS([krb524_convert_creds_kdc], ,
  		[AC_CHECK_LIB([krb524], [krb524_convert_creds_kdc],
--- 58,64 ----
  	CPPFLAGS="$CPPFLAGS $KRB5CFLAGS"
  	save_LIBS="$LIBS"
  	LIBS="$LIBS $KRB5LIBS"
! 	AC_CHECK_FUNCS([add_to_error_table add_error_table krb5_princ_size krb5_principal_get_comp_string encode_krb5_enc_tkt_part encode_krb5_ticket])
  	AC_CHECK_FUNCS([krb5_524_convert_creds], ,
  	    [AC_CHECK_FUNCS([krb524_convert_creds_kdc], ,
  		[AC_CHECK_LIB([krb524], [krb524_convert_creds_kdc],
Index: openafs/src/cf/linux-test2.m4
diff -c openafs/src/cf/linux-test2.m4:1.9.2.4 openafs/src/cf/linux-test2.m4:1.9.2.5
*** openafs/src/cf/linux-test2.m4:1.9.2.4	Mon Aug 14 18:04:41 2006
--- openafs/src/cf/linux-test2.m4	Tue Jun 12 14:41:09 2007
***************
*** 10,13 ****
--- 10,14 ----
  cp  $tmpldir/osi_vfs.hin $outputdir/osi_vfs.h
  # chmod +x $configdir/make_vnode.pl
  # $configdir/make_vnode.pl -i $LINUX_KERNEL_PATH -t ${tmpldir} -o $outputdir
+   AC_MSG_RESULT(yes)
  ])
Index: openafs/src/cf/linux-test4.m4
diff -c openafs/src/cf/linux-test4.m4:1.20.2.29 openafs/src/cf/linux-test4.m4:1.20.2.33
*** openafs/src/cf/linux-test4.m4:1.20.2.29	Mon Feb 26 12:53:33 2007
--- openafs/src/cf/linux-test4.m4	Tue Jun 12 14:35:49 2007
***************
*** 444,449 ****
--- 444,461 ----
    AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_exit_state)])
  
  
+ AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_THREAD_INFO], [
+   AC_MSG_CHECKING([for thread_info in struct task_struct])
+   AC_CACHE_VAL([ac_cv_linux_sched_struct_task_struct_has_thread_info], [
+     AC_TRY_KBUILD(
+ [#include <linux/sched.h>],
+ [struct task_struct _tsk;
+ printk("%d\n", _tsk.thread_info);],
+       ac_cv_linux_sched_struct_task_struct_has_thread_info=yes,
+       ac_cv_linux_sched_struct_task_struct_has_thread_info=no)])
+   AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_thread_info)])
+ 
+ 
  AC_DEFUN([LINUX_FS_STRUCT_SUPER_HAS_ALLOC_INODE], [
    AC_MSG_CHECKING([for alloc_inode in struct super_operations])
    AC_CACHE_VAL([ac_cv_linux_fs_struct_super_has_alloc_inode], [
***************
*** 456,461 ****
--- 468,484 ----
    AC_MSG_RESULT($ac_cv_linux_fs_struct_super_has_alloc_inode)])
  
  
+ AC_DEFUN([LINUX_KERNEL_POSIX_LOCK_FILE_WAIT_ARG], [
+   AC_MSG_CHECKING([for 3rd argument in posix_lock_file found in new kernels])
+   AC_CACHE_VAL([ac_cv_linux_kernel_posix_lock_file_wait_arg], [
+     AC_TRY_KBUILD(
+ [#include <linux/fs.h>],
+ [posix_lock_file(0,0,0);],
+       ac_cv_linux_kernel_posix_lock_file_wait_arg=yes,
+       ac_cv_linux_kernel_posix_lock_file_wait_arg=no)])
+   AC_MSG_RESULT($ac_cv_linux_kernel_posix_lock_file_wait_arg)])
+ 
+ 
  AC_DEFUN([LINUX_KERNEL_SOCK_CREATE], [
    AC_MSG_CHECKING([for 5th argument in sock_create found in some SELinux kernels])
    AC_CACHE_VAL([ac_cv_linux_kernel_sock_create_v], [
***************
*** 644,649 ****
--- 667,688 ----
    AC_MSG_RESULT($ac_cv_linux_func_i_permission_takes_nameidata)])
  
  
+ AC_DEFUN([LINUX_IOP_I_PUT_LINK_TAKES_COOKIE], [
+   AC_MSG_CHECKING([whether inode_operations.put_link takes an opaque cookie])
+   AC_CACHE_VAL([ac_cv_linux_func_i_put_link_takes_cookie], [
+     AC_TRY_KBUILD(
+ [#include <linux/fs.h>
+ #include <linux/namei.h>],
+ [struct inode _inode;
+ struct dentry _dentry;
+ struct nameidata _nameidata;
+ void *cookie;
+ (void)_inode.i_op->put_link(&_dentry, &_nameidata, cookie);],
+       ac_cv_linux_func_i_put_link_takes_cookie=yes,
+       ac_cv_linux_func_i_put_link_takes_cookie=no)])
+   AC_MSG_RESULT($ac_cv_linux_func_i_put_link_takes_cookie)])
+ 
+ 
  AC_DEFUN([LINUX_DOP_D_REVALIDATE_TAKES_NAMEIDATA], [
    AC_MSG_CHECKING([whether dentry_operations.d_revalidate takes a nameidata])
    AC_CACHE_VAL([ac_cv_linux_func_d_revalidate_takes_nameidata], [
***************
*** 811,813 ****
--- 850,865 ----
        ac_cv_linux_register_sysctl_table_noflag=no)])
    AC_MSG_RESULT($ac_cv_linux_register_sysctl_table_noflag)])
  
+ AC_DEFUN([LINUX_FOP_F_FLUSH_TAKES_FL_OWNER_T], [
+   AC_MSG_CHECKING([whether file_operations.flush takes a fl_owner_t])
+   AC_CACHE_VAL([ac_cv_linux_func_f_flush_takes_fl_owner_t], [
+     AC_TRY_KBUILD(
+ [#include <linux/fs.h>],
+ [struct inode _inode;
+ struct file _file;
+ fl_owner_t id;
+ (void)_inode.i_fop->flush(&_file, &id);],
+       ac_cv_linux_func_f_flush_takes_fl_owner_t=yes,
+       ac_cv_linux_func_f_flush_takes_fl_owner_t=no)])
+   AC_MSG_RESULT($ac_cv_linux_func_f_flush_takes_fl_owner_t)])
+ 
Index: openafs/src/cf/osconf.m4
diff -c openafs/src/cf/osconf.m4:1.51.2.28 openafs/src/cf/osconf.m4:1.51.2.30
*** openafs/src/cf/osconf.m4:1.51.2.28	Thu Dec 28 16:59:45 2006
--- openafs/src/cf/osconf.m4	Wed Oct 10 13:47:59 2007
***************
*** 448,454 ****
  		;;
  
  	*_darwin_80)
! 		AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
  		LEX="lex -l"
  		MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}'
  		KROOT=
--- 448,454 ----
  		;;
  
  	*_darwin_80)
! 		AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
  		LEX="lex -l"
  		MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}'
  		KROOT=
***************
*** 461,470 ****
  		EXTRA_VLIBOBJS="fstab.o"
  		SHLIB_LINKER="${MT_CC} -dynamiclib"
  		SHLIB_SUFFIX="dylib"
  		;;
  
  	*_darwin_90)
! 		AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
  		LEX="lex -l"
  		MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}'
  		KROOT=
--- 461,471 ----
  		EXTRA_VLIBOBJS="fstab.o"
  		SHLIB_LINKER="${MT_CC} -dynamiclib"
  		SHLIB_SUFFIX="dylib"
+ 		RANLIB="ranlib -c"
  		;;
  
  	*_darwin_90)
! 		AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration -framework SystemConfiguration -framework IOKit -framework CoreFoundation"
  		LEX="lex -l"
  		MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}'
  		KROOT=
***************
*** 478,483 ****
--- 479,485 ----
  		EXTRA_VLIBOBJS="fstab.o"
  		SHLIB_LINKER="${MT_CC} -dynamiclib"
  		SHLIB_SUFFIX="dylib"
+ 		RANLIB="ranlib -c"
  		;;
  
  	ppc_linux*)
Index: openafs/src/cmd/test/itest.c
diff -c openafs/src/cmd/test/itest.c:1.7 openafs/src/cmd/test/itest.c:1.7.2.1
*** openafs/src/cmd/test/itest.c:1.7	Tue Jul 15 19:14:52 2003
--- openafs/src/cmd/test/itest.c	Tue Apr 10 14:43:42 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/cmd/test/itest.c,v 1.7 2003/07/15 23:14:52 shadow Exp $");
  
  #include "cmd.h"
  #include <stdio.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/cmd/test/itest.c,v 1.7.2.1 2007/04/10 18:43:42 shadow Exp $");
  
  #include "cmd.h"
  #include <stdio.h>
***************
*** 84,96 ****
  	    break;
  	code = cmd_ParseLine(tline, tv, &tc, 100);
  	if (code) {
! 	    printf("itest: parsing failure: %s\n", error_message(code));
  	    exit(1);
  	}
  	code = cmd_Dispatch(tc, tv);
  	cmd_FreeArgv(tv);
  	if (code) {
! 	    printf("itest: execution failed: %s\n", error_message(code));
  	}
      }
      return 0;
--- 84,96 ----
  	    break;
  	code = cmd_ParseLine(tline, tv, &tc, 100);
  	if (code) {
! 	    printf("itest: parsing failure: %s\n", afs_error_message(code));
  	    exit(1);
  	}
  	code = cmd_Dispatch(tc, tv);
  	cmd_FreeArgv(tv);
  	if (code) {
! 	    printf("itest: execution failed: %s\n", afs_error_message(code));
  	}
      }
      return 0;
Index: openafs/src/comerr/com_err.c
diff -c openafs/src/comerr/com_err.c:1.5 openafs/src/comerr/com_err.c:1.5.2.1
*** openafs/src/comerr/com_err.c:1.5	Tue Jul 15 19:14:53 2003
--- openafs/src/comerr/com_err.c	Tue Apr 10 14:43:42 2007
***************
*** 8,14 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/comerr/com_err.c,v 1.5 2003/07/15 23:14:53 shadow Exp $");
  
  #include "internal.h"
  #include <stdio.h>
--- 8,14 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/comerr/com_err.c,v 1.5.2.1 2007/04/10 18:43:42 shadow Exp $");
  
  #include "internal.h"
  #include <stdio.h>
***************
*** 25,31 ****
  	fputs(": ", stderr);
      }
      if (code) {
! 	fputs(error_message(code), stderr);
  	fputs(" ", stderr);
      }
      if (fmt) {
--- 25,31 ----
  	fputs(": ", stderr);
      }
      if (code) {
! 	fputs(afs_error_message(code), stderr);
  	fputs(" ", stderr);
      }
      if (fmt) {
***************
*** 42,66 ****
  static errf com_err_hook = default_com_err_proc;
  
  void
! com_err_va(const char *whoami, afs_int32 code, const char *fmt, va_list args)
  {
      (*com_err_hook) (whoami, code, fmt, args);
  }
  
  void
! com_err(const char *whoami, afs_int32 code, const char *fmt, ...)
  {
      va_list pvar;
  
      if (!com_err_hook)
  	com_err_hook = default_com_err_proc;
      va_start(pvar, fmt);
!     com_err_va(whoami, code, fmt, pvar);
      va_end(pvar);
  }
  
  errf
! set_com_err_hook(errf new_proc)
  {
      errf x = com_err_hook;
      if (new_proc)
--- 42,66 ----
  static errf com_err_hook = default_com_err_proc;
  
  void
! afs_com_err_va(const char *whoami, afs_int32 code, const char *fmt, va_list args)
  {
      (*com_err_hook) (whoami, code, fmt, args);
  }
  
  void
! afs_com_err(const char *whoami, afs_int32 code, const char *fmt, ...)
  {
      va_list pvar;
  
      if (!com_err_hook)
  	com_err_hook = default_com_err_proc;
      va_start(pvar, fmt);
!     afs_com_err_va(whoami, code, fmt, pvar);
      va_end(pvar);
  }
  
  errf
! afs_set_com_err_hook(errf new_proc)
  {
      errf x = com_err_hook;
      if (new_proc)
***************
*** 71,77 ****
  }
  
  errf
! reset_com_err_hook(void)
  {
      errf x = com_err_hook;
      com_err_hook = default_com_err_proc;
--- 71,77 ----
  }
  
  errf
! afs_reset_com_err_hook(void)
  {
      errf x = com_err_hook;
      com_err_hook = default_com_err_proc;
Index: openafs/src/comerr/com_err.h
diff -c openafs/src/comerr/com_err.h:1.3 openafs/src/comerr/com_err.h:1.3.2.1
*** openafs/src/comerr/com_err.h:1.3	Tue Jul 15 19:14:53 2003
--- openafs/src/comerr/com_err.h	Tue Apr 10 14:43:42 2007
***************
*** 8,28 ****
   * with this package.
   */
  
! #ifndef __COM_ERR_H
  
  #include <stdarg.h>
  
! extern void com_err(const char *, afs_int32, const char *, ...);
! extern void com_err_va(const char *whoami, afs_int32 code, const char *fmt,
  		       va_list args);
! extern const char *error_table_name(afs_int32);
! extern const char *error_message(afs_int32);
  extern
! void (*set_com_err_hook
        (void (*)(const char *, afs_int32, const char *, va_list)))
    (const char *, afs_int32, const char *, va_list);
! extern void (*reset_com_err_hook(void)) (const char *, afs_int32,
  					 const char *, va_list);
  
! #define __COM_ERR_H
! #endif /* ! defined(__COM_ERR_H) */
--- 8,36 ----
   * with this package.
   */
  
! #ifndef __AFS_COM_ERR_H
  
  #include <stdarg.h>
  
! extern void afs_com_err(const char *, afs_int32, const char *, ...);
! extern void afs_com_err_va(const char *whoami, afs_int32 code, const char *fmt,
  		       va_list args);
! extern const char *afs_error_table_name(afs_int32);
! extern const char *afs_error_message(afs_int32);
  extern
! void (*afs_set_com_err_hook
        (void (*)(const char *, afs_int32, const char *, va_list)))
    (const char *, afs_int32, const char *, va_list);
! extern void (*afs_reset_com_err_hook(void)) (const char *, afs_int32,
  					 const char *, va_list);
  
! #define __AFS_COM_ERR_H
! #ifdef AFS_OLD_COM_ERR 
! #define com_err                 afs_com_err
! #define com_err_va              afs_com_err_va
! #define error_table_name        afs_error_table_name
! #define error_message           afs_error_message
! #define set_com_err_hook        afs_set_com_err_hook
! #define reset_com_err_hook      afs_reset_com_err_hook
! #endif /* AFS_OLD_COM_ERR */
! #endif /* ! defined(__AFS_COM_ERR_H) */
Index: openafs/src/comerr/compile_et.c
diff -c openafs/src/comerr/compile_et.c:1.14 openafs/src/comerr/compile_et.c:1.14.2.1
*** openafs/src/comerr/compile_et.c:1.14	Sat Nov 29 17:08:10 2003
--- openafs/src/comerr/compile_et.c	Tue Apr 10 14:43:42 2007
***************
*** 13,19 ****
  #include <afs/afsutil.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/comerr/compile_et.c,v 1.14 2003/11/29 22:08:10 jaltman Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
--- 13,19 ----
  #include <afs/afsutil.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/comerr/compile_et.c,v 1.14.2.1 2007/04/10 18:43:42 shadow Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
***************
*** 375,381 ****
  	fputs("static struct et_list etlink = { 0, &et};\n\n", cfile);
  	fprintf(cfile, "void initialize_%s_error_table(void) {\n",
  		table_name);
! 	fputs("    add_to_error_table(&etlink);\n", cfile);
  	fputs("}\n", cfile);
  	fclose(cfile);
  
--- 375,381 ----
  	fputs("static struct et_list etlink = { 0, &et};\n\n", cfile);
  	fprintf(cfile, "void initialize_%s_error_table(void) {\n",
  		table_name);
! 	fputs("    afs_add_to_error_table(&etlink);\n", cfile);
  	fputs("}\n", cfile);
  	fclose(cfile);
  
Index: openafs/src/comerr/error_msg.c
diff -c openafs/src/comerr/error_msg.c:1.5.2.1 openafs/src/comerr/error_msg.c:1.5.2.2
*** openafs/src/comerr/error_msg.c:1.5.2.1	Wed Aug 25 03:09:36 2004
--- openafs/src/comerr/error_msg.c	Tue Apr 10 14:43:42 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/comerr/error_msg.c,v 1.5.2.1 2004/08/25 07:09:36 shadow Exp $");
  
  #include "internal.h"
  #include <stdio.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/comerr/error_msg.c,v 1.5.2.2 2007/04/10 18:43:42 shadow Exp $");
  
  #include "internal.h"
  #include <stdio.h>
***************
*** 45,51 ****
   * Function to initialize the et_list_mutex
   */
  
! void
  et_mutex_once(void)
  {
      assert(!pthread_mutex_init
--- 45,51 ----
   * Function to initialize the et_list_mutex
   */
  
! static void
  et_mutex_once(void)
  {
      assert(!pthread_mutex_init
***************
*** 110,116 ****
  }
  
  const char *
! error_message(afs_int32 code)
  {
      int offset;
      struct et_list *et;
--- 110,116 ----
  }
  
  const char *
! afs_error_message(afs_int32 code)
  {
      int offset;
      struct et_list *et;
***************
*** 147,153 ****
      UNLOCK_ET_LIST;
      strcpy(buffer, "Unknown code ");
      if (table_num) {
! 	strcat(buffer, error_table_name(table_num));
  	strcat(buffer, " ");
      }
      for (cp = buffer; *cp; cp++);
--- 147,153 ----
      UNLOCK_ET_LIST;
      strcpy(buffer, "Unknown code ");
      if (table_num) {
! 	strcat(buffer, afs_error_table_name(table_num));
  	strcat(buffer, " ");
      }
      for (cp = buffer; *cp; cp++);
***************
*** 169,175 ****
  }
  
  void
! add_to_error_table(struct et_list *new_table)
  {
      struct et_list *et;
  
--- 169,175 ----
  }
  
  void
! afs_add_to_error_table(struct et_list *new_table)
  {
      struct et_list *et;
  
Index: openafs/src/comerr/error_table.h
diff -c openafs/src/comerr/error_table.h:1.3 openafs/src/comerr/error_table.h:1.3.2.1
*** openafs/src/comerr/error_table.h:1.3	Tue Jul 15 19:14:53 2003
--- openafs/src/comerr/error_table.h	Tue Apr 10 14:43:42 2007
***************
*** 9,15 ****
  
  #include <errno.h>
  
! #ifndef _ET_H
  
  struct error_table {
      char const *const *msgs;
--- 9,15 ----
  
  #include <errno.h>
  
! #ifndef _AFS_ET_H
  
  struct error_table {
      char const *const *msgs;
***************
*** 25,31 ****
  #define	ERRCODE_RANGE	8	/* # of bits to shift table number */
  #define	BITS_PER_CHAR	6	/* # bits to shift per character in name */
  
! extern char const *error_table_name(afs_int32 num);
! extern void add_to_error_table(struct et_list *new_table);
! #define _ET_H
  #endif
--- 25,35 ----
  #define	ERRCODE_RANGE	8	/* # of bits to shift table number */
  #define	BITS_PER_CHAR	6	/* # bits to shift per character in name */
  
! extern char const *afs_error_table_name(afs_int32 num);
! extern void afs_add_to_error_table(struct et_list *new_table);
! #ifdef AFS_OLD_COM_ERR
! #define error_table_name        afs_error_table_name
! #define add_to_error_table(X)   afs_add_to_error_table(X)
! #endif /* AFS_OLD_COM_ERR */
! #define _AFS_ET_H
  #endif
Index: openafs/src/comerr/et_name.c
diff -c openafs/src/comerr/et_name.c:1.5 openafs/src/comerr/et_name.c:1.5.2.1
*** openafs/src/comerr/et_name.c:1.5	Tue Jul 15 19:14:53 2003
--- openafs/src/comerr/et_name.c	Tue Apr 10 14:43:42 2007
***************
*** 9,15 ****
  #include <afs/afsutil.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/comerr/et_name.c,v 1.5 2003/07/15 23:14:53 shadow Exp $");
  
  #include "error_table.h"
  #include "mit-sipb-cr.h"
--- 9,15 ----
  #include <afs/afsutil.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/comerr/et_name.c,v 1.5.2.1 2007/04/10 18:43:42 shadow Exp $");
  
  #include "error_table.h"
  #include "mit-sipb-cr.h"
***************
*** 26,32 ****
  static char buf[6];
  
  const char *
! error_table_name(afs_int32 num)
  {
      int ch;
      int i;
--- 26,32 ----
  static char buf[6];
  
  const char *
! afs_error_table_name(afs_int32 num)
  {
      int ch;
      int i;
Index: openafs/src/comerr/test/test.c
diff -c openafs/src/comerr/test/test.c:1.6 openafs/src/comerr/test/test.c:1.6.2.1
*** openafs/src/comerr/test/test.c:1.6	Tue Jul 15 19:14:54 2003
--- openafs/src/comerr/test/test.c	Tue Apr 10 14:43:42 2007
***************
*** 2,8 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/comerr/test/test.c,v 1.6 2003/07/15 23:14:54 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
--- 2,8 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/comerr/test/test.c,v 1.6.2.1 2007/04/10 18:43:42 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
***************
*** 18,55 ****
  main()
  {
      printf("Before initiating error table:\n\n");
!     printf("Table name '%s'\n", error_table_name(KRB_MK_AP_TGTEXP));
!     printf("UNIX  name '%s'\n", error_table_name(EPERM));
!     printf("Msg TGT-expired is '%s'\n", error_message(KRB_MK_AP_TGTEXP));
!     printf("Msg EPERM is '%s'\n", error_message(EPERM));
!     printf("Msg FOO_ERR is '%s'\n", error_message(FOO_ERR));
!     printf("Msg {sys_nerr-1} is '%s'\n", error_message(sys_nerr - 1));
!     printf("Msg {sys_nerr} is '%s'\n", error_message(sys_nerr));
  
!     printf("With 0: tgt-expired -> %s\n", error_message(KRB_MK_AP_TGTEXP));
  
      initialize_KRB_error_table();
      initialize_KRB_error_table();
      printf("KRB error table initialized:  base %d (%s), name %s\n",
! 	   ERROR_TABLE_BASE_KRB, error_message(ERROR_TABLE_BASE_KRB),
! 	   error_table_name(ERROR_TABLE_BASE_KRB));
!     printf("With krb: tgt-expired -> %s\n", error_message(KRB_MK_AP_TGTEXP));
  
      initialize_QUUX_error_table();
      printf("QUUX error table initialized: base %d (%s), name %s\n",
! 	   ERROR_TABLE_BASE_QUUX, error_message(ERROR_TABLE_BASE_QUUX),
! 	   error_table_name(ERROR_TABLE_BASE_QUUX));
  
!     printf("Msg for TGT-expired is '%s'\n", error_message(KRB_MK_AP_TGTEXP));
!     printf("Msg {sys_nerr-1} is '%s'\n", error_message(sys_nerr - 1));
!     printf("Msg FOO_ERR is '%s'\n", error_message(FOO_ERR));
!     printf("Msg KRB_SKDC_CANT is '%s'\n", error_message(KRB_SKDC_CANT));
!     printf("Msg 1e6 (8B 64) is '%s'\n", error_message(1000000));
      printf("\n\nCOM_ERR tests:\n");
!     com_err("whoami", FOO_ERR, (char *)NULL);
!     com_err("whoami", FOO_ERR, " -- message goes %s", "here");
!     com_err("whoami", 0, NULL);
!     com_err("whoami", 0, "error number %d\n", 0);
  
      return 0;
  }
--- 18,55 ----
  main()
  {
      printf("Before initiating error table:\n\n");
!     printf("Table name '%s'\n", afs_error_table_name(KRB_MK_AP_TGTEXP));
!     printf("UNIX  name '%s'\n", afs_error_table_name(EPERM));
!     printf("Msg TGT-expired is '%s'\n", afs_error_message(KRB_MK_AP_TGTEXP));
!     printf("Msg EPERM is '%s'\n", afs_error_message(EPERM));
!     printf("Msg FOO_ERR is '%s'\n", afs_error_message(FOO_ERR));
!     printf("Msg {sys_nerr-1} is '%s'\n", afs_error_message(sys_nerr - 1));
!     printf("Msg {sys_nerr} is '%s'\n", afs_error_message(sys_nerr));
  
!     printf("With 0: tgt-expired -> %s\n", afs_error_message(KRB_MK_AP_TGTEXP));
  
      initialize_KRB_error_table();
      initialize_KRB_error_table();
      printf("KRB error table initialized:  base %d (%s), name %s\n",
! 	   ERROR_TABLE_BASE_KRB, afs_error_message(ERROR_TABLE_BASE_KRB),
! 	   afs_error_table_name(ERROR_TABLE_BASE_KRB));
!     printf("With krb: tgt-expired -> %s\n", afs_error_message(KRB_MK_AP_TGTEXP));
  
      initialize_QUUX_error_table();
      printf("QUUX error table initialized: base %d (%s), name %s\n",
! 	   ERROR_TABLE_BASE_QUUX, afs_error_message(ERROR_TABLE_BASE_QUUX),
! 	   afs_error_table_name(ERROR_TABLE_BASE_QUUX));
  
!     printf("Msg for TGT-expired is '%s'\n", afs_error_message(KRB_MK_AP_TGTEXP));
!     printf("Msg {sys_nerr-1} is '%s'\n", afs_error_message(sys_nerr - 1));
!     printf("Msg FOO_ERR is '%s'\n", afs_error_message(FOO_ERR));
!     printf("Msg KRB_SKDC_CANT is '%s'\n", afs_error_message(KRB_SKDC_CANT));
!     printf("Msg 1e6 (8B 64) is '%s'\n", afs_error_message(1000000));
      printf("\n\nCOM_ERR tests:\n");
!     afs_com_err("whoami", FOO_ERR, (char *)NULL);
!     afs_com_err("whoami", FOO_ERR, " -- message goes %s", "here");
!     afs_com_err("whoami", 0, NULL);
!     afs_com_err("whoami", 0, "error number %d\n", 0);
  
      return 0;
  }
Index: openafs/src/config/afs_args.h
diff -c openafs/src/config/afs_args.h:1.13.2.7 openafs/src/config/afs_args.h:1.13.2.8
*** openafs/src/config/afs_args.h:1.13.2.7	Wed Oct  5 01:58:34 2005
--- openafs/src/config/afs_args.h	Wed Oct 10 12:57:57 2007
***************
*** 86,91 ****
--- 86,99 ----
  /* For SGI, this can't interfere with any of the 64 bit inode calls. */
  #define AFSOP_RXLISTENER_DAEMON  48	/* starts kernel RX listener */
  
+ /* skip 64 bit calls */
+ #define AFSOP_CACHEBASEDIR       50     /* cache base dir */
+ #define AFSOP_CACHEDIRS          51     /* number of files per dir */
+ #define AFSOP_CACHEFILES         52     /* number of files */
+ 
+ #define AFSOP_SETINT             60     /* we should just set key/value pairs 
+                                           for things which are just ints */
+ 
  /* these are for initialization flags */
  
  #define AFSCALL_INIT_MEMCACHE 0x1
***************
*** 220,223 ****
--- 228,237 ----
  #define SYSCALL_DEV_FNAME "/dev/openafs_ioctl"
  #endif
  
+ #ifdef AFS_CACHE_VNODE_PATH
+ #define AFS_CACHE_CELLS_INODE -2
+ #define AFS_CACHE_ITEMS_INODE -3
+ #define AFS_CACHE_VOLUME_INODE -4
+ #endif
+ 
  #endif /* _AFS_ARGS_H_ */
Index: openafs/src/config/param.ia64_linux24.h
diff -c openafs/src/config/param.ia64_linux24.h:1.9.2.4 openafs/src/config/param.ia64_linux24.h:1.9.2.5
*** openafs/src/config/param.ia64_linux24.h:1.9.2.4	Thu Nov  9 18:18:31 2006
--- openafs/src/config/param.ia64_linux24.h	Tue Apr  3 15:31:27 2007
***************
*** 87,92 ****
--- 87,93 ----
  #endif
  #endif /* KERNEL */
  
+ #define USE_UCONTEXT		/* should be in afsconfig.h */
  
  #endif /* _PARAM_IA64_LINUX20_H_ */
  
***************
*** 157,162 ****
--- 158,164 ----
  #define CMSERVERPREF
  #endif
  
+ #define USE_UCONTEXT		/* should be in afsconfig.h */
  
  #endif /* AFS_PARAM_H */
  
Index: openafs/src/config/param.ia64_linux26.h
diff -c openafs/src/config/param.ia64_linux26.h:1.1.2.6 openafs/src/config/param.ia64_linux26.h:1.1.2.7
*** openafs/src/config/param.ia64_linux26.h:1.1.2.6	Thu Nov  9 18:18:31 2006
--- openafs/src/config/param.ia64_linux26.h	Tue Apr  3 15:31:27 2007
***************
*** 96,101 ****
--- 96,102 ----
  #endif
  #endif /* KERNEL */
  
+ #define USE_UCONTEXT		/* should be in afsconfig.h */
  
  #endif /* _PARAM_IA64_LINUX20_H_ */
  
***************
*** 167,172 ****
--- 168,174 ----
  #define CMSERVERPREF
  #endif
  
+ #define USE_UCONTEXT		/* should be in afsconfig.h */
  
  #endif /* AFS_PARAM_H */
  
Index: openafs/src/config/param.ppc64_linux24.h
diff -c openafs/src/config/param.ppc64_linux24.h:1.2.2.4 openafs/src/config/param.ppc64_linux24.h:1.2.2.5
*** openafs/src/config/param.ppc64_linux24.h:1.2.2.4	Thu Nov  9 18:18:31 2006
--- openafs/src/config/param.ppc64_linux24.h	Wed Jun  6 13:33:50 2007
***************
*** 75,80 ****
--- 75,86 ----
  #endif
  #endif /* KERNEL */
  
+ #ifdef __GLIBC__
+ #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
+ #define USE_UCONTEXT
+ #endif
+ #endif
+ 
  #endif /* _PARAM_PPC64_LINUX20_H_ */
  
  #else /* !defined(UKERNEL) */
Index: openafs/src/config/param.ppc64_linux26.h
diff -c openafs/src/config/param.ppc64_linux26.h:1.1.2.5 openafs/src/config/param.ppc64_linux26.h:1.1.2.6
*** openafs/src/config/param.ppc64_linux26.h:1.1.2.5	Thu Nov  9 18:18:31 2006
--- openafs/src/config/param.ppc64_linux26.h	Wed Jun  6 13:33:50 2007
***************
*** 76,81 ****
--- 76,87 ----
  #endif
  #endif /* KERNEL */
  
+ #ifdef __GLIBC__
+ #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
+ #define USE_UCONTEXT
+ #endif
+ #endif
+ 
  #endif /* _PARAM_PPC64_LINUX20_H_ */
  
  #else /* !defined(UKERNEL) */
Index: openafs/src/config/param.ppc_darwin_90.h
diff -c openafs/src/config/param.ppc_darwin_90.h:1.1.2.2 openafs/src/config/param.ppc_darwin_90.h:1.1.2.3
*** openafs/src/config/param.ppc_darwin_90.h:1.1.2.2	Thu Mar  9 01:41:42 2006
--- openafs/src/config/param.ppc_darwin_90.h	Wed Oct 10 12:57:57 2007
***************
*** 30,35 ****
--- 30,36 ----
  #define AFS_SYSCALL             230
  #define AFS_NAMEI_ENV 1
  #define DARWIN_REFBASE 3
+ #define AFS_CACHE_VNODE_PATH
  
  /* File system entry (used if mount.h doesn't define MOUNT_AFS */
  #define AFS_MOUNT_AFS    "afs"
Index: openafs/src/config/param.ppc_linux24.h
diff -c openafs/src/config/param.ppc_linux24.h:1.10.2.4 openafs/src/config/param.ppc_linux24.h:1.10.2.5
*** openafs/src/config/param.ppc_linux24.h:1.10.2.4	Thu Nov  9 18:18:31 2006
--- openafs/src/config/param.ppc_linux24.h	Wed Jun  6 13:33:50 2007
***************
*** 72,77 ****
--- 72,83 ----
  #endif
  #endif /* KERNEL */
  
+ #ifdef __GLIBC__
+ #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
+ #define USE_UCONTEXT
+ #endif
+ #endif
+ 
  #endif /* AFS_PARAM_H */
  
  #else /* !defined(UKERNEL) */
Index: openafs/src/config/param.ppc_linux26.h
diff -c openafs/src/config/param.ppc_linux26.h:1.1.2.5 openafs/src/config/param.ppc_linux26.h:1.1.2.6
*** openafs/src/config/param.ppc_linux26.h:1.1.2.5	Thu Nov  9 18:18:31 2006
--- openafs/src/config/param.ppc_linux26.h	Wed Jun  6 13:33:50 2007
***************
*** 74,79 ****
--- 74,85 ----
  #endif
  #endif /* KERNEL */
  
+ #ifdef __GLIBC__
+ #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
+ #define USE_UCONTEXT
+ #endif
+ #endif
+ 
  #endif /* AFS_PARAM_H */
  
  #else /* !defined(UKERNEL) */
Index: openafs/src/config/param.sparc64_linux24.h
diff -c openafs/src/config/param.sparc64_linux24.h:1.7.2.4 openafs/src/config/param.sparc64_linux24.h:1.7.2.5
*** openafs/src/config/param.sparc64_linux24.h:1.7.2.4	Thu Nov  9 18:18:31 2006
--- openafs/src/config/param.sparc64_linux24.h	Wed Jun  6 13:33:50 2007
***************
*** 94,99 ****
--- 94,105 ----
  #endif
  #endif
  
+ #ifdef __GLIBC__
+ #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
+ #define USE_UCONTEXT
+ #endif
+ #endif
+ 
  #endif /* _PARAM_SPARC64_LINUX24_H_ */
  
  #else /* !defined(UKERNEL) */
Index: openafs/src/config/param.sparc64_linux26.h
diff -c openafs/src/config/param.sparc64_linux26.h:1.1.4.5 openafs/src/config/param.sparc64_linux26.h:1.1.4.6
*** openafs/src/config/param.sparc64_linux26.h:1.1.4.5	Thu Nov  9 18:18:31 2006
--- openafs/src/config/param.sparc64_linux26.h	Wed Jun  6 13:33:50 2007
***************
*** 95,100 ****
--- 95,106 ----
  #endif
  #endif
  
+ #ifdef __GLIBC__
+ #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
+ #define USE_UCONTEXT
+ #endif
+ #endif
+ 
  #endif /* _PARAM_SPARC64_LINUX26_H_ */
  
  #else /* !defined(UKERNEL) */
Index: openafs/src/config/param.sparc_linux24.h
diff -c openafs/src/config/param.sparc_linux24.h:1.8.2.4 openafs/src/config/param.sparc_linux24.h:1.8.2.6
*** openafs/src/config/param.sparc_linux24.h:1.8.2.4	Thu Nov  9 18:18:31 2006
--- openafs/src/config/param.sparc_linux24.h	Tue Jul 17 00:06:41 2007
***************
*** 98,103 ****
--- 98,106 ----
  #endif
  #endif
  
+ /* Don't define USE_UCONTEXT on this platform.  It requires getcontext and
+    setcontext from glibc, which aren't implemented for 32-bit SPARC. */
+ 
  #endif /* AFS_PARAM_H */
  
  #else /* !defined(UKERNEL) */
Index: openafs/src/config/param.x86_darwin_90.h
diff -c openafs/src/config/param.x86_darwin_90.h:1.1.2.2 openafs/src/config/param.x86_darwin_90.h:1.1.2.3
*** openafs/src/config/param.x86_darwin_90.h:1.1.2.2	Thu Mar  9 01:41:42 2006
--- openafs/src/config/param.x86_darwin_90.h	Wed Oct 10 12:57:57 2007
***************
*** 30,35 ****
--- 30,36 ----
  #define AFS_SYSCALL             230
  #define AFS_NAMEI_ENV 1
  #define DARWIN_REFBASE 3
+ #define AFS_CACHE_VNODE_PATH
  
  /* File system entry (used if mount.h doesn't define MOUNT_AFS */
  #define AFS_MOUNT_AFS    "afs"
Index: openafs/src/config/venus.h
diff -c openafs/src/config/venus.h:1.10.2.1 openafs/src/config/venus.h:1.10.2.2
*** openafs/src/config/venus.h:1.10.2.1	Sun May  8 02:18:12 2005
--- openafs/src/config/venus.h	Tue Jun 12 15:20:13 2007
***************
*** 181,185 ****
--- 181,186 ----
  #define VIOC_NEWALIAS		_CVICEIOCTL(1)	/* create new cell alias */
  #define VIOC_GETALIAS		_CVICEIOCTL(2)	/* get alias info */
  #define VIOC_CBADDR		_CVICEIOCTL(3)	/* push callback addr */
+ #define VIOC_NEWUUID		_CVICEIOCTL(9)	/* new uuid */
  
  #endif /* AFS_VENUS_H */
Index: openafs/src/dauth/dlog.c
diff -c openafs/src/dauth/dlog.c:1.9.2.1 openafs/src/dauth/dlog.c:1.9.2.2
*** openafs/src/dauth/dlog.c:1.9.2.1	Mon Jul 31 13:07:50 2006
--- openafs/src/dauth/dlog.c	Tue Apr 10 14:43:42 2007
***************
*** 72,78 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/dauth/Attic/dlog.c,v 1.9.2.1 2006/07/31 17:07:50 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 72,78 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/dauth/Attic/dlog.c,v 1.9.2.2 2007/04/10 18:43:42 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 548,554 ****
  	ap[1] = "-servers";
  	code = ubik_ParseClientList(i, ap, serverList);
  	if (code) {
! 	    com_err(rn, code, "-- could not parse server list");
  	    exit(1);
  	}
      } else {
--- 548,554 ----
  	ap[1] = "-servers";
  	code = ubik_ParseClientList(i, ap, serverList);
  	if (code) {
! 	    afs_com_err(rn, code, "-- could not parse server list");
  	    exit(1);
  	}
      } else {
***************
*** 560,566 ****
  	 */
  	code = afsconf_GetCellInfo(cdir, realm, 0, &cellinfo);
  	if (code) {
! 	    com_err(rn, code, "-- unable to get cell info");
  	    exit(1);
  	}
  	strncpy(realm, cellinfo.name, sizeof(realm) - 1);
--- 560,566 ----
  	 */
  	code = afsconf_GetCellInfo(cdir, realm, 0, &cellinfo);
  	if (code) {
! 	    afs_com_err(rn, code, "-- unable to get cell info");
  	    exit(1);
  	}
  	strncpy(realm, cellinfo.name, sizeof(realm) - 1);
***************
*** 688,694 ****
       * Check for simple communication failures.
       */
      if (code) {
! 	com_err(rn, code, "-- failed to contact authentication service");
  	exit(1);
      }
  
--- 688,694 ----
       * Check for simple communication failures.
       */
      if (code) {
! 	afs_com_err(rn, code, "-- failed to contact authentication service");
  	exit(1);
      }
  
***************
*** 719,725 ****
  	} else {
  	    code = des_read_pw_string(passwd, sizeof(passwd), "Password:", 0);
  	    if (code) {
! 		com_err(rn, code, "-- couldn't read password");
  		exit(1);
  	    }
  	}
--- 719,725 ----
  	} else {
  	    code = des_read_pw_string(passwd, sizeof(passwd), "Password:", 0);
  	    if (code) {
! 		afs_com_err(rn, code, "-- couldn't read password");
  		exit(1);
  	    }
  	}
***************
*** 751,757 ****
  			    passwd_key, DECRYPT);
      }
      if (code) {
! 	com_err(rn, code, "-- unable to decrypt reply from the DCE KDC");
  	exit(1);
      }
  
--- 751,757 ----
  			    passwd_key, DECRYPT);
      }
      if (code) {
! 	afs_com_err(rn, code, "-- unable to decrypt reply from the DCE KDC");
  	exit(1);
      }
  
***************
*** 799,805 ****
  			kdcrep.endtime, dosetpag);
  
      if (code) {
! 	com_err("dlog", code, "-- failed to store tickets");
  	exit(1);
      }
  
--- 799,805 ----
  			kdcrep.endtime, dosetpag);
  
      if (code) {
! 	afs_com_err("dlog", code, "-- failed to store tickets");
  	exit(1);
      }
  
Index: openafs/src/des/des.c
diff -c openafs/src/des/des.c:1.11.2.5 openafs/src/des/des.c:1.11.2.6
*** openafs/src/des/des.c:1.11.2.5	Thu Aug 18 00:56:14 2005
--- openafs/src/des/des.c	Tue Jul  3 00:24:45 2007
***************
*** 37,43 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/des.c,v 1.11.2.5 2005/08/18 04:56:14 shadow Exp $");
  
  #ifndef KERNEL
  #include <stdio.h>
--- 37,43 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/des.c,v 1.11.2.6 2007/07/03 04:24:45 shadow Exp $");
  
  #ifndef KERNEL
  #include <stdio.h>
***************
*** 90,96 ****
  #error dunno how to do this machine type, you lose;
  #endif
  #endif
!     afs_uint32 P_temp;
      volatile unsigned char *P_temp_p = (unsigned char *)&P_temp;
  #ifdef BITS16
      sbox_out S_out;
--- 90,96 ----
  #error dunno how to do this machine type, you lose;
  #endif
  #endif
!     volatile afs_uint32 P_temp;
      volatile unsigned char *P_temp_p = (unsigned char *)&P_temp;
  #ifdef BITS16
      sbox_out S_out;
Index: openafs/src/des/des.h
diff -c openafs/src/des/des.h:1.3 openafs/src/des/des.h:1.3.2.1
*** openafs/src/des/des.h:1.3	Tue Jul 15 19:14:59 2003
--- openafs/src/des/des.h	Mon Jul  9 15:16:48 2007
***************
*** 20,26 ****
--- 20,29 ----
  typedef unsigned char des_cblock[8];	/* crypto-block size */
  /* Key schedule */
  typedef struct des_ks_struct {
+     union {
+     afs_uint32 i[2];
      des_cblock _;
+     } _;
  } des_key_schedule[16];
  
  #define DES_KEY_SZ 	(sizeof(des_cblock))
Index: openafs/src/des/pcbc_encrypt.c
diff -c openafs/src/des/pcbc_encrypt.c:1.9.2.1 openafs/src/des/pcbc_encrypt.c:1.9.2.2
*** openafs/src/des/pcbc_encrypt.c:1.9.2.1	Mon Oct 18 03:11:56 2004
--- openafs/src/des/pcbc_encrypt.c	Mon Jul  9 15:16:48 2007
***************
*** 24,36 ****
  #ifndef KERNEL
  #include <stdio.h>
  #endif
- #include <des.h>
  #include <afsconfig.h>
  #include <afs/param.h>
  #include "des_prototypes.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/pcbc_encrypt.c,v 1.9.2.1 2004/10/18 07:11:56 shadow Exp $");
  
  #include "des_internal.h"
  
--- 24,36 ----
  #ifndef KERNEL
  #include <stdio.h>
  #endif
  #include <afsconfig.h>
  #include <afs/param.h>
+ #include <des.h>
  #include "des_prototypes.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/pcbc_encrypt.c,v 1.9.2.2 2007/07/09 19:16:48 shadow Exp $");
  
  #include "des_internal.h"
  
Index: openafs/src/dir/dir.c
diff -c openafs/src/dir/dir.c:1.21.2.3 openafs/src/dir/dir.c:1.21.2.6
*** openafs/src/dir/dir.c:1.21.2.3	Wed Oct  5 01:58:37 2005
--- openafs/src/dir/dir.c	Thu Oct 11 13:48:35 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/dir/dir.c,v 1.21.2.3 2005/10/05 05:58:37 shadow Exp $");
  
  #ifdef KERNEL
  #if !defined(UKERNEL)
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/dir/dir.c,v 1.21.2.6 2007/10/11 17:48:35 shadow Exp $");
  
  #ifdef KERNEL
  #if !defined(UKERNEL)
***************
*** 478,484 ****
  {
      /* Hash a string to a number between 0 and NHASHENT. */
      register unsigned char tc;
!     register int hval;
      register int tval;
      hval = 0;
      while ((tc = (*string++))) {
--- 478,484 ----
  {
      /* Hash a string to a number between 0 and NHASHENT. */
      register unsigned char tc;
!     unsigned int hval;
      register int tval;
      hval = 0;
      while ((tc = (*string++))) {
***************
*** 488,494 ****
      tval = hval & (NHASHENT - 1);
      if (tval == 0)
  	return tval;
!     else if (hval < 0)
  	tval = NHASHENT - tval;
      return tval;
  }
--- 488,494 ----
      tval = hval & (NHASHENT - 1);
      if (tval == 0)
  	return tval;
!     else if (hval >= 1<<31)
  	tval = NHASHENT - tval;
      return tval;
  }
Index: openafs/src/finale/translate_et.c
diff -c openafs/src/finale/translate_et.c:1.8 openafs/src/finale/translate_et.c:1.8.2.1
*** openafs/src/finale/translate_et.c:1.8	Tue Jul 15 19:15:06 2003
--- openafs/src/finale/translate_et.c	Tue Apr 10 14:43:42 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/finale/translate_et.c,v 1.8 2003/07/15 23:15:06 shadow Exp $");
  
  #include <afs/com_err.h>
  #include <rx/rxkad.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/finale/translate_et.c,v 1.8.2.1 2007/04/10 18:43:42 shadow Exp $");
  
  #include <afs/com_err.h>
  #include <rx/rxkad.h>
***************
*** 74,81 ****
  	code = atoi(argv[i]);
  	offset = code & ((1 << ERRCODE_RANGE) - 1);
  
! 	printf("%d (%s).%d = %s\n", (int)code, error_table_name(code),
! 	       (int)offset, error_message(code));
      }
      return 0;
  }
--- 74,81 ----
  	code = atoi(argv[i]);
  	offset = code & ((1 << ERRCODE_RANGE) - 1);
  
! 	printf("%d (%s).%d = %s\n", (int)code, afs_error_table_name(code),
! 	       (int)offset, afs_error_message(code));
      }
      return 0;
  }
Index: openafs/src/kauth/Makefile.in
diff -c openafs/src/kauth/Makefile.in:1.11.2.2 openafs/src/kauth/Makefile.in:1.11.2.3
*** openafs/src/kauth/Makefile.in:1.11.2.2	Mon Jul 31 13:07:50 2006
--- openafs/src/kauth/Makefile.in	Sun Aug 19 18:17:44 2007
***************
*** 52,58 ****
  KOBJS=kauth.xdr.o kauth.cs.o kaaux.o client.o authclient.o token.o kautils.o kalocalcell.o kaerrors.o user.krb.o krb_tf.o
  
  
! all: kaserver kas kpwvalid klog klog.krb knfs kpasswd rebuild kdb \
  	${TOP_LIBDIR}/libkauth.a \
  	${TOP_LIBDIR}/libkauth.krb.a \
  	depinstall
--- 52,58 ----
  KOBJS=kauth.xdr.o kauth.cs.o kaaux.o client.o authclient.o token.o kautils.o kalocalcell.o kaerrors.o user.krb.o krb_tf.o
  
  
! all: kaserver kas kpwvalid klog klog.krb knfs kpasswd rebuild kdb ka-forwarder \
  	${TOP_LIBDIR}/libkauth.a \
  	${TOP_LIBDIR}/libkauth.krb.a \
  	depinstall
***************
*** 200,205 ****
--- 200,208 ----
  krb_udp: krb_udp.o libkauth.a $(KLIBS)
  	${CC} ${LDFLAGS} -o krb_udp krb_udp.o libkauth.a $(KLIBS)
  
+ ka-forwarder: ka-forwarder.o
+ 	${CC} -o $@ ${CFLAGS} ka-forwarder.o ${LIBS} ${XLIBS}
+ 
  rebuild.o: rebuild.c $(INCLS) AFS_component_version_number.o
  
  rebuild: rebuild.o kautils.o $(LIBS)
***************
*** 240,245 ****
--- 243,249 ----
  	${DESTDIR}${libdir}/afs/libkauth.krb.a \
  	${DESTDIR}${afssrvsbindir}/kadb_check \
  	${DESTDIR}${afssrvsbindir}/kdb \
+ 	${DESTDIR}${afssrvsbindir}/ka-forwarder \
  	${DESTDIR}${includedir}/afs/kautils.h \
  	${DESTDIR}${includedir}/afs/kauth.h \
  	${DESTDIR}${includedir}/afs/kaport.h
***************
*** 292,297 ****
--- 296,304 ----
  ${DESTDIR}${afssrvsbindir}/kdb: kdb
  	${INSTALL} -s $? $@
  
+ ${DESTDIR}${afssrvsbindir}/ka-forwarder: ka-forwarder
+ 	${INSTALL} $? $@
+ 
  ${DESTDIR}${includedir}/afs/kautils.h: kautils.h
  	${INSTALL} $? $@
  
***************
*** 318,323 ****
--- 325,331 ----
  	${DEST}/lib/afs/libkauth.krb.a \
  	${DEST}/etc/kdb \
  	${DEST}/etc/kadb_check \
+ 	${DEST}/root.server/usr/afs/bin/ka-forwarder \
  	${DEST}/include/afs/kautils.h \
  	${DEST}/include/afs/kauth.h \
  	${DEST}/include/afs/kaport.h
***************
*** 355,360 ****
--- 363,371 ----
  ${DEST}/etc/kdb: kdb 
  	${INSTALL} -s $? $@
  
+ ${DEST}/root.server/usr/afs/bin/ka-forwarder: ka-forwarder
+ 	${INSTALL} $? $@
+ 
  ${DEST}/include/afs/kautils.h: kautils.h
  	${INSTALL} $? $@
  
Index: openafs/src/kauth/admin_tools.c
diff -c openafs/src/kauth/admin_tools.c:1.16.2.3 openafs/src/kauth/admin_tools.c:1.16.2.4
*** openafs/src/kauth/admin_tools.c:1.16.2.3	Mon Dec 13 14:38:51 2004
--- openafs/src/kauth/admin_tools.c	Tue Apr 10 14:43:43 2007
***************
*** 16,22 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/admin_tools.c,v 1.16.2.3 2004/12/13 19:38:51 shadow Exp $");
  
  #include <afs/stds.h>
  #include <afs/debug.h>
--- 16,22 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/admin_tools.c,v 1.16.2.4 2007/04/10 18:43:43 shadow Exp $");
  
  #include <afs/stds.h>
  #include <afs/debug.h>
***************
*** 68,74 ****
  	return 0;
      code = ka_ExpandCell(0, cell, 0 /*local */ );
      if (code) {
! 	com_err(whoami, code, "Can't expand cell name");
      }
      return code;
  }
--- 68,74 ----
  	return 0;
      code = ka_ExpandCell(0, cell, 0 /*local */ );
      if (code) {
! 	afs_com_err(whoami, code, "Can't expand cell name");
      }
      return code;
  }
***************
*** 88,94 ****
  
      code = ka_ParseLoginName(user, name, instance, 0);
      if (code) {
! 	com_err(whoami, code, "parsing user's name '%s'", user);
  	return KABADCMD;
      }
  
--- 88,94 ----
  
      code = ka_ParseLoginName(user, name, instance, 0);
      if (code) {
! 	afs_com_err(whoami, code, "parsing user's name '%s'", user);
  	return KABADCMD;
      }
  
***************
*** 97,103 ****
      code =
  	ubik_Call(KAM_GetEntry, conn, 0, name, inst, KAMAJORVERSION, &tentry);
      if (code) {
! 	com_err(whoami, code, "getting information for %s.%s", name, inst);
  	return code;
      }
      if (tentry.minor_version != KAMINORVERSION)
--- 97,103 ----
      code =
  	ubik_Call(KAM_GetEntry, conn, 0, name, inst, KAMAJORVERSION, &tentry);
      if (code) {
! 	afs_com_err(whoami, code, "getting information for %s.%s", name, inst);
  	return code;
      }
      if (tentry.minor_version != KAMINORVERSION)
***************
*** 254,260 ****
  	    ubik_Call(KAM_ListEntry, conn, 0, index, &next_index, &count,
  		      &name);
  	if (code) {
! 	    com_err(whoami, code, "calling KAM_ListEntry");
  	    break;
  	}
  	if (!next_index)
--- 254,260 ----
  	    ubik_Call(KAM_ListEntry, conn, 0, index, &next_index, &count,
  		      &name);
  	if (code) {
! 	    afs_com_err(whoami, code, "calling KAM_ListEntry");
  	    break;
  	}
  	if (!next_index)
***************
*** 300,306 ****
  	}
      }
  
!     printf(" : [%s] %s", error_table_name(code), error_message(code));
      switch (code) {
      case UNOQUORUM:
  	printf(", wait one second\n");
--- 300,306 ----
  	}
      }
  
!     printf(" : [%s] %s", afs_error_table_name(code), afs_error_message(code));
      switch (code) {
      case UNOQUORUM:
  	printf(", wait one second\n");
***************
*** 331,337 ****
  
      code = ka_ParseLoginName(as->parms[0].items->data, name, instance, 0);
      if (code) {
! 	com_err(whoami, code, "parsing user's name '%s'",
  		as->parms[0].items->data);
  	return KABADCMD;
      }
--- 331,337 ----
  
      code = ka_ParseLoginName(as->parms[0].items->data, name, instance, 0);
      if (code) {
! 	afs_com_err(whoami, code, "parsing user's name '%s'",
  		as->parms[0].items->data);
  	return KABADCMD;
      }
***************
*** 359,365 ****
      OKlist[0].code = 0;
      code = ka_ParseLoginName(as->parms[0].items->data, name, instance, 0);
      if (code) {
! 	com_err(whoami, code, "parsing user's name '%s'",
  		as->parms[0].items->data);
  	return KABADCMD;
      }
--- 359,365 ----
      OKlist[0].code = 0;
      code = ka_ParseLoginName(as->parms[0].items->data, name, instance, 0);
      if (code) {
! 	afs_com_err(whoami, code, "parsing user's name '%s'",
  		as->parms[0].items->data);
  	return KABADCMD;
      }
***************
*** 431,437 ****
  		ubik_Call(KAM_GetEntry, conn, 0, name, inst, KAMAJORVERSION,
  			  &tentry);
  	    if (code) {
! 		com_err(whoami, code,
  			"could get current flag value for %s.%s", name, inst);
  		return -1;
  	    }
--- 431,437 ----
  		ubik_Call(KAM_GetEntry, conn, 0, name, inst, KAMAJORVERSION,
  			  &tentry);
  	    if (code) {
! 		afs_com_err(whoami, code,
  			"could get current flag value for %s.%s", name, inst);
  		return -1;
  	    }
***************
*** 517,523 ****
  			  0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  	if (code) {
  	    if (seriouserror(code))
! 		com_err(whoami, code, "");
  	} else if (tempwhen) {	/* user is locked */
  	    if (!*when || tempwhen < *when) {
  		*when = tempwhen;
--- 517,523 ----
  			  0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
  	if (code) {
  	    if (seriouserror(code))
! 		afs_com_err(whoami, code, "");
  	} else if (tempwhen) {	/* user is locked */
  	    if (!*when || tempwhen < *when) {
  		*when = tempwhen;
***************
*** 542,548 ****
  
      code = ka_ParseLoginName(as->parms[0].items->data, name, instance, 0);
      if (code) {
! 	com_err(whoami, code, "parsing user's name '%s'",
  		as->parms[0].items->data);
  	return KABADCMD;
      }
--- 542,548 ----
  
      code = ka_ParseLoginName(as->parms[0].items->data, name, instance, 0);
      if (code) {
! 	afs_com_err(whoami, code, "parsing user's name '%s'",
  		as->parms[0].items->data);
  	return KABADCMD;
      }
***************
*** 557,563 ****
  		&& conn->conns[count - 1]->peer) {
  		server = conn->conns[count - 1]->peer->host;
  	    }
! 	    com_err(whoami, code,
  		    "so %s.%s may still be locked (on server %d.%d.%d.%d)",
  		    name, instance, ((server >> 24) & 0xFF),
  		    ((server >> 16) & 0xFF), ((server >> 8) & 0xFF),
--- 557,563 ----
  		&& conn->conns[count - 1]->peer) {
  		server = conn->conns[count - 1]->peer->host;
  	    }
! 	    afs_com_err(whoami, code,
  		    "so %s.%s may still be locked (on server %d.%d.%d.%d)",
  		    name, instance, ((server >> 24) & 0xFF),
  		    ((server >> 16) & 0xFF), ((server >> 8) & 0xFF),
***************
*** 589,595 ****
  
      code = ka_ParseLoginName(as->parms[0].items->data, name, instance, 0);
      if (code) {
! 	com_err(whoami, code, "parsing user's name '%s'",
  		as->parms[0].items->data);
  	return KABADCMD;
      }
--- 589,595 ----
  
      code = ka_ParseLoginName(as->parms[0].items->data, name, instance, 0);
      if (code) {
! 	afs_com_err(whoami, code, "parsing user's name '%s'",
  		as->parms[0].items->data);
  	return KABADCMD;
      }
***************
*** 729,735 ****
  	return KABADCMD;
      }
      if (code)
! 	com_err(whoami, code, "calling KAM_SetFields for %s.%s", name,
  		instance);
      return code;
  }
--- 729,735 ----
  	return KABADCMD;
      }
      if (code)
! 	afs_com_err(whoami, code, "calling KAM_SetFields for %s.%s", name,
  		instance);
      return code;
  }
***************
*** 744,750 ****
      if (as->parms[1].items) {
  	code = ka_ExpandCell(as->parms[1].items->data, realm, 0 /*local */ );
  	if (code) {
! 	    com_err(whoami, code,
  		    "expanding %s as cell name, attempting to continue",
  		    as->parms[1].items->data);
  	}
--- 744,750 ----
      if (as->parms[1].items) {
  	code = ka_ExpandCell(as->parms[1].items->data, realm, 0 /*local */ );
  	if (code) {
! 	    afs_com_err(whoami, code,
  		    "expanding %s as cell name, attempting to continue",
  		    as->parms[1].items->data);
  	}
***************
*** 783,789 ****
  
      code = ka_ParseLoginName(as->parms[0].items->data, name, instance, realm);
      if (code) {
! 	com_err(whoami, code, "parsing user's name '%s'",
  		as->parms[0].items->data);
  	return KABADCMD;
      }
--- 783,789 ----
  
      code = ka_ParseLoginName(as->parms[0].items->data, name, instance, realm);
      if (code) {
! 	afs_com_err(whoami, code, "parsing user's name '%s'",
  		as->parms[0].items->data);
  	return KABADCMD;
      }
***************
*** 824,830 ****
      code = ubik_Call(KAM_SetPassword, conn, 0, name, instance, kvno, key);
  #endif
      if (code)
! 	com_err(whoami, code, "so can't set password for %s.%s", name,
  		instance);
      return code;
  }
--- 824,830 ----
      code = ubik_Call(KAM_SetPassword, conn, 0, name, instance, kvno, key);
  #endif
      if (code)
! 	afs_com_err(whoami, code, "so can't set password for %s.%s", name,
  		instance);
      return code;
  }
***************
*** 849,855 ****
      if (left) {
        bad_name:
  	code = KABADNAME;
! 	com_err(whoami, code, "PrintName: principal name was '%s'.'%s'@'%s'",
  		name, inst, acell);
  	return code;
      }
--- 849,855 ----
      if (left) {
        bad_name:
  	code = KABADNAME;
! 	afs_com_err(whoami, code, "PrintName: principal name was '%s'.'%s'@'%s'",
  		name, inst, acell);
  	return code;
      }
***************
*** 919,925 ****
      /* get the ticket info itself */
      code = ktc_GetToken(server, &token, sizeof(token), &client);
      if (code) {
! 	com_err(whoami, code, "failed to get token info for server %s",
  		PrintedPrincipal(server));
  	return code;
      }
--- 919,925 ----
      /* get the ticket info itself */
      code = ktc_GetToken(server, &token, sizeof(token), &client);
      if (code) {
! 	afs_com_err(whoami, code, "failed to get token info for server %s",
  		PrintedPrincipal(server));
  	return code;
      }
***************
*** 980,986 ****
  	ka_ParseLoginName(as->parms[0].items->data, server.name,
  			  server.instance, server.cell);
      if (code) {
! 	com_err(whoami, code, "parsing user's name '%s'",
  		as->parms[0].items->data);
  	return KABADCMD;
      }
--- 980,986 ----
  	ka_ParseLoginName(as->parms[0].items->data, server.name,
  			  server.instance, server.cell);
      if (code) {
! 	afs_com_err(whoami, code, "parsing user's name '%s'",
  		as->parms[0].items->data);
  	return KABADCMD;
      }
***************
*** 991,997 ****
      } else {
  	code = ka_ExpandCell(server.cell, server.cell, 0 /*local */ );
  	if (code) {
! 	    com_err(whoami, code, "Can't expand cell name");
  	    return code;
  	}
      }
--- 991,997 ----
      } else {
  	code = ka_ExpandCell(server.cell, server.cell, 0 /*local */ );
  	if (code) {
! 	    afs_com_err(whoami, code, "Can't expand cell name");
  	    return code;
  	}
      }
***************
*** 1001,1007 ****
  	ka_GetServerToken(server.name, server.instance, server.cell, life,
  			  &token, /*new */ 1, /*dosetpag */ 0);
      if (code)
! 	com_err(whoami, code, "getting ticket for %s",
  		PrintedPrincipal(&server));
      else {
  	code = ListTicket(&server, /*verbose */ 1);
--- 1001,1007 ----
  	ka_GetServerToken(server.name, server.instance, server.cell, life,
  			  &token, /*new */ 1, /*dosetpag */ 0);
      if (code)
! 	afs_com_err(whoami, code, "getting ticket for %s",
  		PrintedPrincipal(&server));
      else {
  	code = ListTicket(&server, /*verbose */ 1);
***************
*** 1021,1027 ****
      code = ka_ParseLoginName(as->parms[0].items->data, name, 0, 0);
      if (code) {
        abort:
! 	com_err(whoami, code,
  		"getting %s's password via loopback connection to GetPassword",
  		name);
  	/* if we got a timeout, print a clarification, too */
--- 1021,1027 ----
      code = ka_ParseLoginName(as->parms[0].items->data, name, 0, 0);
      if (code) {
        abort:
! 	afs_com_err(whoami, code,
  		"getting %s's password via loopback connection to GetPassword",
  		name);
  	/* if we got a timeout, print a clarification, too */
***************
*** 1069,1075 ****
  
      code = ubik_Call(KAM_GetRandomKey, conn, 0, &key);
      if (code)
! 	com_err(whoami, code, "so can't get random key");
      else {
  	int i;
  	printf("Key: ");
--- 1069,1075 ----
  
      code = ubik_Call(KAM_GetRandomKey, conn, 0, &key);
      if (code)
! 	afs_com_err(whoami, code, "so can't get random key");
      else {
  	int i;
  	printf("Key: ");
***************
*** 1159,1169 ****
  	if (code) {
  	    struct afsconf_cell cellinfo;
  
! 	    com_err(whoami, code, "couldn't find host %s in cell %s",
  		    as->parms[0].items->data, cell);
  	    code = ka_GetServers(cell, &cellinfo);
  	    if (code)
! 		com_err(whoami, code, "getting servers in cell %s", cell);
  	    else {
  		printf("Servers in cell %s, are:\n", cell);
  		for (i = 0; i < cellinfo.numServers; i++)
--- 1159,1169 ----
  	if (code) {
  	    struct afsconf_cell cellinfo;
  
! 	    afs_com_err(whoami, code, "couldn't find host %s in cell %s",
  		    as->parms[0].items->data, cell);
  	    code = ka_GetServers(cell, &cellinfo);
  	    if (code)
! 		afs_com_err(whoami, code, "getting servers in cell %s", cell);
  	    else {
  		printf("Servers in cell %s, are:\n", cell);
  		for (i = 0; i < cellinfo.numServers; i++)
***************
*** 1177,1183 ****
  	code = ubik_Call(KAM_Debug, conn, 0, KAMAJORVERSION, 0, &info);
  
      if (code) {
! 	com_err(whoami, code, "call to Debug failed");
  	return code;
      }
      now = time(0);
--- 1177,1183 ----
  	code = ubik_Call(KAM_Debug, conn, 0, KAMAJORVERSION, 0, &info);
  
      if (code) {
! 	afs_com_err(whoami, code, "call to Debug failed");
  	return code;
      }
      now = time(0);
***************
*** 1332,1338 ****
  		ka_ParseLoginName(as->parms[12].items->data, name, instance,
  				  newCell);
  	    if (code) {
! 		com_err(whoami, code, "parsing user's name '%s'",
  			as->parms[12].items->data);
  		return code;
  	    }
--- 1332,1338 ----
  		ka_ParseLoginName(as->parms[12].items->data, name, instance,
  				  newCell);
  	    if (code) {
! 		afs_com_err(whoami, code, "parsing user's name '%s'",
  			as->parms[12].items->data);
  		return code;
  	    }
***************
*** 1363,1369 ****
  	}
  	code = ka_ExpandCell(newCell, newCell, 0 /*local */ );
  	if (code) {
! 	    com_err(whoami, code, "Can't expand cell name");
  	    return code;
  	}
  	strcpy(cell, newCell);
--- 1363,1369 ----
  	}
  	code = ka_ExpandCell(newCell, newCell, 0 /*local */ );
  	if (code) {
! 	    afs_com_err(whoami, code, "Can't expand cell name");
  	    return code;
  	}
  	strcpy(cell, newCell);
***************
*** 1378,1384 ****
  		ap[i] = ip->data;
  	    code = ubik_ParseClientList(i, ap, serverList);
  	    if (code) {
! 		com_err(whoami, code, "could not parse server list");
  		return code;
  	    }
  	    ka_ExplicitCell(cell, serverList);
--- 1378,1384 ----
  		ap[i] = ip->data;
  	    code = ubik_ParseClientList(i, ap, serverList);
  	    if (code) {
! 		afs_com_err(whoami, code, "could not parse server list");
  		return code;
  	    }
  	    ka_ExplicitCell(cell, serverList);
***************
*** 1412,1418 ****
  		else if (strlen(passwd) == 0)
  		    code = KANULLPASSWORD;
  		if (code) {
! 		    com_err(whoami, code, "reading password");
  		    return code;
  		}
  	    }
--- 1412,1418 ----
  		else if (strlen(passwd) == 0)
  		    code = KANULLPASSWORD;
  		if (code) {
! 		    afs_com_err(whoami, code, "reading password");
  		    return code;
  		}
  	    }
***************
*** 1453,1459 ****
  		    reason = "Authentication Server was unavailable";
  		    break;
  		default:
! 		    reason = (char *)error_message(code);
  		}
  		fprintf(stderr,
  			"%s: Auth. as %s to AuthServer failed: %s\nProceeding w/o authentication\n",
--- 1453,1459 ----
  		    reason = "Authentication Server was unavailable";
  		    break;
  		default:
! 		    reason = (char *)afs_error_message(code);
  		}
  		fprintf(stderr,
  			"%s: Auth. as %s to AuthServer failed: %s\nProceeding w/o authentication\n",
***************
*** 1474,1480 ****
  				    /*Don't need pwd expiration info here */
  		    );
  		if (acode && (acode != code))	/* codes are usually the same */
! 		    com_err(whoami, code,
  			    "getting Authentication token for %s",
  			    PrintedName(name, instance, cell));
  	    }
--- 1474,1480 ----
  				    /*Don't need pwd expiration info here */
  		    );
  		if (acode && (acode != code))	/* codes are usually the same */
! 		    afs_com_err(whoami, code,
  			    "getting Authentication token for %s",
  			    PrintedName(name, instance, cell));
  	    }
***************
*** 1485,1499 ****
      pToken = ((token.ticketLen == 0) ? 0 : &token);
      code = ka_AuthServerConn(cell, KA_MAINTENANCE_SERVICE, pToken, &conn);
      if (code && pToken) {
! 	com_err(whoami, code,
  		"connecting to AuthServer: now trying w/o authentication");
  	code = ka_AuthServerConn(cell, KA_MAINTENANCE_SERVICE, 0, &conn);
  	if (code)
! 	    com_err(whoami, code,
  		    "making unauthenticated connection to AuthServer");
      }
      if (code) {
! 	com_err(whoami, code,
  		"Couldn't establish connection to Authentication Server");
  	return code;
      }
--- 1485,1499 ----
      pToken = ((token.ticketLen == 0) ? 0 : &token);
      code = ka_AuthServerConn(cell, KA_MAINTENANCE_SERVICE, pToken, &conn);
      if (code && pToken) {
! 	afs_com_err(whoami, code,
  		"connecting to AuthServer: now trying w/o authentication");
  	code = ka_AuthServerConn(cell, KA_MAINTENANCE_SERVICE, 0, &conn);
  	if (code)
! 	    afs_com_err(whoami, code,
  		    "making unauthenticated connection to AuthServer");
      }
      if (code) {
! 	afs_com_err(whoami, code,
  		"Couldn't establish connection to Authentication Server");
  	return code;
      }
***************
*** 1518,1524 ****
  		    else if (strlen(password) == 0)
  			code = KANULLPASSWORD;
  		    if (code) {
! 			com_err(whoami, code, "prompting for %s", p + 1);
  			return code;
  		    }
  		    ip = (struct cmd_item *)malloc(sizeof(struct cmd_item));
--- 1518,1524 ----
  		    else if (strlen(password) == 0)
  			code = KANULLPASSWORD;
  		    if (code) {
! 			afs_com_err(whoami, code, "prompting for %s", p + 1);
  			return code;
  		    }
  		    ip = (struct cmd_item *)malloc(sizeof(struct cmd_item));
***************
*** 1552,1558 ****
  	    ka_ParseLoginName(name, server.name, server.instance,
  			      server.cell);
  	if (code) {
! 	    com_err(whoami, code, "couldn't interpret name '%s'", name);
  	    return code;
  	}
  	if (server.cell[0] == 0) {
--- 1552,1558 ----
  	    ka_ParseLoginName(name, server.name, server.instance,
  			      server.cell);
  	if (code) {
! 	    afs_com_err(whoami, code, "couldn't interpret name '%s'", name);
  	    return code;
  	}
  	if (server.cell[0] == 0) {
***************
*** 1562,1574 ****
  	} else {
  	    code = ka_ExpandCell(server.cell, server.cell, 0 /*local */ );
  	    if (code) {
! 		com_err(whoami, code, "Can't expand cell name");
  		return code;
  	    }
  	}
  	code = ktc_ForgetToken(&server);
  	if (code) {
! 	    com_err(whoami, code, "couldn't remove tokens for %s",
  		    PrintedPrincipal(&server));
  	    return code;
  	}
--- 1562,1574 ----
  	} else {
  	    code = ka_ExpandCell(server.cell, server.cell, 0 /*local */ );
  	    if (code) {
! 		afs_com_err(whoami, code, "Can't expand cell name");
  		return code;
  	    }
  	}
  	code = ktc_ForgetToken(&server);
  	if (code) {
! 	    afs_com_err(whoami, code, "couldn't remove tokens for %s",
  		    PrintedPrincipal(&server));
  	    return code;
  	}
***************
*** 1579,1592 ****
  	}
  	code = ktc_ForgetAllTokens();
  	if (code) {
! 	    com_err(whoami, code, "couldn't delete all tokens");
  	    return code;
  	}
      }
  #endif
      code = ktc_ForgetAllTokens();
      if (code) {
! 	com_err(whoami, code, "couldn't delete all tokens");
  	return code;
      }
      return 0;
--- 1579,1592 ----
  	}
  	code = ktc_ForgetAllTokens();
  	if (code) {
! 	    afs_com_err(whoami, code, "couldn't delete all tokens");
  	    return code;
  	}
      }
  #endif
      code = ktc_ForgetAllTokens();
      if (code) {
! 	afs_com_err(whoami, code, "couldn't delete all tokens");
  	return code;
      }
      return 0;
***************
*** 1608,1614 ****
  	    ka_ParseLoginName(name, server.name, server.instance,
  			      server.cell);
  	if (code) {
! 	    com_err(whoami, code, "couldn't interpret name '%s'", name);
  	    return code;
  	}
  	if (server.cell[0] == 0) {
--- 1608,1614 ----
  	    ka_ParseLoginName(name, server.name, server.instance,
  			      server.cell);
  	if (code) {
! 	    afs_com_err(whoami, code, "couldn't interpret name '%s'", name);
  	    return code;
  	}
  	if (server.cell[0] == 0) {
***************
*** 1618,1624 ****
  	} else {
  	    code = ka_ExpandCell(server.cell, server.cell, 0 /*local */ );
  	    if (code) {
! 		com_err(whoami, code, "Can't expand cell name");
  		return code;
  	    }
  	}
--- 1618,1624 ----
  	} else {
  	    code = ka_ExpandCell(server.cell, server.cell, 0 /*local */ );
  	    if (code) {
! 		afs_com_err(whoami, code, "Can't expand cell name");
  		return code;
  	    }
  	}
***************
*** 1833,1839 ****
  	code =
  	    cmd_ParseLine(line, argv, &argc, sizeof(argv) / sizeof(argv[0]));
  	if (code) {
! 	    com_err(whoami, code, "parsing line: '%s'", line);
  	    return code;
  	}
  	code = cmd_Dispatch(argc, argv);
--- 1833,1839 ----
  	code =
  	    cmd_ParseLine(line, argv, &argc, sizeof(argv) / sizeof(argv[0]));
  	if (code) {
! 	    afs_com_err(whoami, code, "parsing line: '%s'", line);
  	    return code;
  	}
  	code = cmd_Dispatch(argc, argv);
Index: openafs/src/kauth/decode_ticket.c
diff -c openafs/src/kauth/decode_ticket.c:1.6 openafs/src/kauth/decode_ticket.c:1.6.2.1
*** openafs/src/kauth/decode_ticket.c:1.6	Tue Jul 15 19:15:16 2003
--- openafs/src/kauth/decode_ticket.c	Tue Apr 10 14:43:43 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/decode_ticket.c,v 1.6 2003/07/15 23:15:16 shadow Exp $");
  
  #include <des.h>
  #include <afs/com_err.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/decode_ticket.c,v 1.6.2.1 2007/04/10 18:43:43 shadow Exp $");
  
  #include <des.h>
  #include <afs/com_err.h>
***************
*** 45,51 ****
      if (ka_ReadBytes(argv[1], key, sizeof(key)) != 8)
  	printf("Key must be 8 bytes long\n");
      if (!des_check_key_parity(key) || des_is_weak_key(key)) {
! 	com_err(whoami, KABADKEY, "server's key for decoding ticket is bad");
  	exit(1);
      }
      ticketLen = ka_ReadBytes(argv[2], ticket, sizeof(ticket));
--- 45,51 ----
      if (ka_ReadBytes(argv[1], key, sizeof(key)) != 8)
  	printf("Key must be 8 bytes long\n");
      if (!des_check_key_parity(key) || des_is_weak_key(key)) {
! 	afs_com_err(whoami, KABADKEY, "server's key for decoding ticket is bad");
  	exit(1);
      }
      ticketLen = ka_ReadBytes(argv[2], ticket, sizeof(ticket));
***************
*** 55,68 ****
  	tkt_DecodeTicket(ticket, ticketLen, key, client.name, client.instance,
  			 client.cell, &sessionkey, &host, &start, &end);
      if (code) {
! 	com_err(whoami, code, "decoding ticket");
  	if (code = tkt_CheckTimes(start, end, time(0)) <= 0)
! 	    com_err(whoami, 0, "because of start or end times");
  	exit(1);
      }
  
      if (!des_check_key_parity(&sessionkey) || des_is_weak_key(&sessionkey)) {
! 	com_err(whoami, KABADKEY, "checking ticket's session key");
  	exit(1);
      }
  
--- 55,68 ----
  	tkt_DecodeTicket(ticket, ticketLen, key, client.name, client.instance,
  			 client.cell, &sessionkey, &host, &start, &end);
      if (code) {
! 	afs_com_err(whoami, code, "decoding ticket");
  	if (code = tkt_CheckTimes(start, end, time(0)) <= 0)
! 	    afs_com_err(whoami, 0, "because of start or end times");
  	exit(1);
      }
  
      if (!des_check_key_parity(&sessionkey) || des_is_weak_key(&sessionkey)) {
! 	afs_com_err(whoami, KABADKEY, "checking ticket's session key");
  	exit(1);
      }
  
Index: openafs/src/kauth/ka-forwarder.c
diff -c /dev/null openafs/src/kauth/ka-forwarder.c:1.2.4.2
*** /dev/null	Thu Oct 11 16:05:08 2007
--- openafs/src/kauth/ka-forwarder.c	Sun Aug 19 18:17:44 2007
***************
*** 0 ****
--- 1,294 ----
+ /*
+  * COPYRIGHT NOTICE
+  * Copyright (c) 1994 Carnegie Mellon University
+  * All Rights Reserved.
+  * 
+  * See <cmu_copyright.h> for use and distribution information.
+  */
+ 
+ /*
+  * HISTORY
+  * $Log: ka-forwarder.c,v $
+  * Revision 1.2.4.2  2007/08/19 22:17:44  rra
+  * DELTA STABLE14-ka-forwarder-20060731
+  * AUTHOR rra@stanford.edu
+  *
+  * Add ka-forwarder.
+  *
+  * Revision 1.1  2006/07/31 17:34:26  rra
+  * DELTA ka-forwarder-20060731
+  * AUTHOR rra@stanford.edu
+  *
+  * Add ka-forwarder.
+  *
+  * Revision 1.1  1997/06/03 18:23:54  kenh
+  * .
+  *
+  * Revision 1.4  1996/08/09  01:00:21  jhutz
+  * 	When initializing the array of fakeka servers, remember to set
+  * 	the address family of each server; otherwise SunOS complains.
+  * 	[1996/08/09  00:58:46  jhutz]
+  *
+  * Revision 1.3  1996/08/09  00:17:19  jhutz
+  * 	Merged in changes from Chuck Silvers:
+  * 	- Support for more than one fakeka server
+  * 	- Support for specifying ports for each fakeka server separately from the
+  * 	  others, and from the port we listen on.
+  * 
+  * 	Plus a minor bug fix to Chuck's code.
+  * 	Basically, this version is designed to provide both reliability and
+  * 	load-balancing cheaply.  Basically, we forward packets to all of the
+  * 	fakeka servers in round-robin fashion.  So, if a client is losing on
+  * 	one server, its retry should go to a different one, if more than one
+  * 	is specified.
+  * 	[1996/08/03  02:13:36  jhutz]
+  * 
+  * Revision 1.2  1995/02/23  18:26:36  chs
+  * 	Created.
+  * 	[1995/02/23  18:26:03  chs]
+  * 
+  * $EndLog$
+  */
+ 
+ /*
+  * This program is intended to run on afs DB servers.
+  * Its function is to forward KA requests to a fakeka server
+  * running on an MIT kerberos server.
+  */
+ 
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <stdio.h>
+ #include <netdb.h>
+ #include <ctype.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <syslog.h>
+ #include <unistd.h>
+ 
+ #if	HAVE_GETOPT_H
+ #include <getopt.h>
+ #else
+ int getopt (int, char * const *, const char *);
+ int optind, opterr;
+ char *optarg;
+ #endif
+ 
+ #define BUFFER_SIZE 2048
+ 
+ 
+ char *prog;
+ 
+ int num_servers, cur_server;
+ struct sockaddr_in *servers;
+ 
+ 
+ void
+ perrorexit(str)
+ char *str;
+ {
+     perror(str);
+     exit(1);
+ }
+ 
+ 
+ void
+ setup_servers(argc, argv)
+ int argc;
+ char **argv;
+ {
+     int i;
+     u_int fwdaddr;
+     u_short fwdport;
+ 
+     num_servers = argc;
+ 
+     servers = malloc(sizeof(*servers) * num_servers);
+     if (servers == NULL)
+ 	perrorexit("malloc failed");
+ 
+     for (i = 0; i < num_servers; i++) {
+ 	char *host, *port;
+ 
+ 	fwdport = htons(7004);
+ 
+ 	host = argv[i];
+ 	port = strchr(host, '/');
+ 	if (port != NULL) {
+ 	    *port++ = 0;
+ 
+ 	    if (isdigit(port[0])) {
+ 		fwdport = htons(atoi(port));
+ 	    }
+ 	    else {
+ 		struct servent *srv = getservbyname(port, "udp");
+ 		if (!srv) {
+ 		    fprintf(stderr, "%s: unknown service %s\n", prog, port);
+ 		    exit(1);
+ 		}
+ 		fwdport = srv->s_port;
+ 	    }
+ 	}
+ 
+ 	if (isdigit(host[0])) {
+ 	    fwdaddr = inet_addr(host);
+ 	}
+ 	else {
+ 	    struct hostent *h = gethostbyname(host);
+ 	    if (!h) {
+ 		fprintf(stderr, "%s: unknown host %s\n", prog, host);
+ 		exit(1);
+ 	    }
+ 	    bcopy(h->h_addr, &fwdaddr, 4);
+ 	}
+ 
+ 	servers[i].sin_family = AF_INET;
+ 	servers[i].sin_addr.s_addr = fwdaddr;
+ 	servers[i].sin_port = fwdport;
+     }
+ }
+ 
+ 
+ int
+ setup_socket(port)
+ u_short port;
+ {
+     int s, rv;
+     struct sockaddr_in sin;
+ 
+     s = socket(AF_INET, SOCK_DGRAM, 0);
+     if (s < 0)
+ 	perrorexit("Couldn't create socket");
+ 
+     sin.sin_family = AF_INET;
+     sin.sin_addr.s_addr = 0;
+     sin.sin_port = htons(port);
+ 
+     rv = bind(s, (struct sockaddr *)&sin, sizeof(sin));
+     if (rv < 0)
+ 	perrorexit("Couldn't bind socket");
+ 
+     return s;
+ }
+ 
+ 
+ int
+ packet_is_reply(from)
+ struct sockaddr_in *from;
+ {
+     int i;
+ 
+     for (i = 0; i < num_servers; i++) {
+ 	struct sockaddr_in *sin = &servers[i];
+ 
+ 	if (from->sin_addr.s_addr == sin->sin_addr.s_addr &&
+ 	    from->sin_port == sin->sin_port)
+ 	{
+ 	    return 1;
+ 	}
+     }
+ 
+     return 0;
+ }
+ 
+ 
+ int
+ main(argc, argv)
+ int argc;
+ char **argv;
+ {
+     int c, s, rv;
+     u_short port;
+ 
+     if (argc < 2) {
+ 	fprintf(stderr,
+ 		"usage: %s [-p port] <host>[/port] [host/port ...]\n",
+ 		argv[0]);
+ 	exit(1);
+     }
+ 
+     prog = argv[0];
+     port = 7004;
+ 
+     while ((c = getopt(argc, argv, "p:")) != -1) {
+ 	switch (c) {
+ 	case 'p':
+ 	    port = atoi(optarg);
+ 	    break;
+ 	default:
+ 	    fprintf(stderr, "%s: invalid option '%c'\n", prog, c);
+ 	    exit(1);
+ 	}
+     }
+ 
+     /*
+      * hmm, different implementations of getopt seem to do different things
+      * when there aren't any options.  linux sets optind = 1, which I would
+      * call correct, but sunos sets optind = 0.  try to do the right thing.
+      */
+     if (optind == 0)
+ 	optind = 1;
+ 
+     setup_servers(argc - optind, argv + optind);
+     s = setup_socket(port);
+ 
+     openlog("ka-forwarder", LOG_PID, LOG_DAEMON);
+ 
+     for (;;) {
+ 	char buf[BUFFER_SIZE], *bufp, *sendptr;
+ 	struct sockaddr_in from, reply, *to;
+ 	int fromlen, sendlen;
+ 
+ 	bufp = buf + 8;
+ 	fromlen = sizeof(from);
+ 
+ 	rv = recvfrom(s, bufp, sizeof(buf) - 8,
+ 		      0, (struct sockaddr *)&from, &fromlen);
+ 	if (rv < 0) {
+ 	    syslog(LOG_ERR, "recvfrom: %m");
+ 	    sleep(1);
+ 	    continue;
+ 	}
+ 
+ 	if (packet_is_reply(&from)) {
+ 	    /* this is a reply, forward back to user */
+ 
+ 	    to = &reply;
+ 	    reply.sin_family = AF_INET;
+ 	    bcopy(bufp, &reply.sin_addr.s_addr, 4);
+ 	    bcopy(bufp + 4, &reply.sin_port, 2);
+ 	    sendptr = bufp + 8;
+ 	    sendlen = rv - 8;
+ 	}
+ 	else {
+ 	    /* this is a request, forward to server */
+ 
+ 	    cur_server = (cur_server + 1) % num_servers;
+ 	    to = &servers[cur_server];
+ 
+ 	    bcopy(&from.sin_addr.s_addr, bufp - 8, 4);
+ 	    bcopy(&from.sin_port, bufp - 4, 2);
+ 
+ 	    sendptr = bufp - 8;
+ 	    sendlen = rv + 8;
+ 	}
+ 
+ 	{
+ 	    char a1[16], a2[16];
+ 	    strcpy(a1, inet_ntoa(from.sin_addr));
+ 	    strcpy(a2, inet_ntoa(to->sin_addr));
+ 
+ 	    syslog(LOG_INFO, "forwarding %d bytes from %s/%d to %s/%d\n",
+ 		   sendlen, a1, htons(from.sin_port), a2, htons(to->sin_port));
+ 	}
+ 
+ 	rv = sendto(s, sendptr, sendlen,
+ 		    0, (struct sockaddr *)to, sizeof(*to));
+ 	if (rv < 0) {
+ 	    syslog(LOG_ERR, "sendto: %m");
+ 	}
+     }
+ }
Index: openafs/src/kauth/kaprocs.c
diff -c openafs/src/kauth/kaprocs.c:1.16.2.1 openafs/src/kauth/kaprocs.c:1.16.2.2
*** openafs/src/kauth/kaprocs.c:1.16.2.1	Wed Aug 25 03:09:38 2004
--- openafs/src/kauth/kaprocs.c	Tue Apr 10 14:43:43 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kaprocs.c,v 1.16.2.1 2004/08/25 07:09:38 shadow Exp $");
  
  #include <afs/stds.h>
  #include <errno.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kaprocs.c,v 1.16.2.2 2007/04/10 18:43:43 shadow Exp $");
  
  #include <afs/stds.h>
  #include <errno.h>
***************
*** 40,45 ****
--- 40,46 ----
  #include <des.h>
  #include <afs/cellconfig.h>
  #include <afs/auth.h>
+ #include <afs/com_err.h>
  #include "kautils.h"
  #include "kaserver.h"
  #include "kalog.h"
***************
*** 176,182 ****
  		} else {
  		    es_Report
  			("in get_time: set_password failed because: %s\n",
! 			 error_message(code));
  		    return code;
  		}
  	    }
--- 177,183 ----
  		} else {
  		    es_Report
  			("in get_time: set_password failed because: %s\n",
! 			 afs_error_message(code));
  		    return code;
  		}
  	    }
Index: openafs/src/kauth/kas.c
diff -c openafs/src/kauth/kas.c:1.7 openafs/src/kauth/kas.c:1.7.2.1
*** openafs/src/kauth/kas.c:1.7	Tue Jul 15 19:15:16 2003
--- openafs/src/kauth/kas.c	Tue Apr 10 14:43:43 2007
***************
*** 12,18 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kas.c,v 1.7 2003/07/15 23:15:16 shadow Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
--- 12,18 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kas.c,v 1.7.2.1 2007/04/10 18:43:43 shadow Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
***************
*** 82,88 ****
  
      code = ka_Init(0);
      if (code) {
! 	com_err(whoami, code, "Can't get cell info");
  	exit(1);
      }
  
--- 82,88 ----
  
      code = ka_Init(0);
      if (code) {
! 	afs_com_err(whoami, code, "Can't get cell info");
  	exit(1);
      }
  
Index: openafs/src/kauth/kaserver.c
diff -c openafs/src/kauth/kaserver.c:1.17.2.5 openafs/src/kauth/kaserver.c:1.17.2.6
*** openafs/src/kauth/kaserver.c:1.17.2.5	Sat Dec 30 12:02:35 2006
--- openafs/src/kauth/kaserver.c	Tue Apr 10 14:43:43 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kaserver.c,v 1.17.2.5 2006/12/30 17:02:35 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.6 2007/04/10 18:43:43 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 47,52 ****
--- 47,53 ----
  #include <afs/cellconfig.h>
  #include <lock.h>
  #include <afs/afsutil.h>
+ #include <afs/com_err.h>
  #include <ubik.h>
  #include <sys/stat.h>
  #include "kauth.h"
***************
*** 330,336 ****
      if (!KA_conf) {
  	code = KANOCELLS;
        abort:
! 	com_err(whoami, code, "Failed getting cell info");
  	exit(1);
      }
  #ifdef        AUTH_DBM_LOG
--- 331,337 ----
      if (!KA_conf) {
  	code = KANOCELLS;
        abort:
! 	afs_com_err(whoami, code, "Failed getting cell info");
  	exit(1);
      }
  #ifdef        AUTH_DBM_LOG
***************
*** 356,362 ****
  				    &cellinfo, &clones);
      if (servers) {
  	if (code = ubik_ParseServerList(argc, argv, &myHost, serverList)) {
! 	    com_err(whoami, code, "Couldn't parse server list");
  	    exit(1);
  	}
  	cellinfo.hostAddr[0].sin_addr.s_addr = myHost;
--- 357,363 ----
  				    &cellinfo, &clones);
      if (servers) {
  	if (code = ubik_ParseServerList(argc, argv, &myHost, serverList)) {
! 	    afs_com_err(whoami, code, "Couldn't parse server list");
  	    exit(1);
  	}
  	cellinfo.hostAddr[0].sin_addr.s_addr = myHost;
***************
*** 424,430 ****
  				  &clones, dbpath, &KA_dbase);
  
      if (code) {
! 	com_err(whoami, code, "Ubik init failed");
  	exit(2);
      }
  
--- 425,431 ----
  				  &clones, dbpath, &KA_dbase);
  
      if (code) {
! 	afs_com_err(whoami, code, "Ubik init failed");
  	exit(2);
      }
  
Index: openafs/src/kauth/kautils.p.h
diff -c openafs/src/kauth/kautils.p.h:1.10 openafs/src/kauth/kautils.p.h:1.10.2.1
*** openafs/src/kauth/kautils.p.h:1.10	Sun Dec  7 17:49:26 2003
--- openafs/src/kauth/kautils.p.h	Tue Apr 10 14:43:43 2007
***************
*** 291,297 ****
  };
  
  #ifndef ERROR_TABLE_BASE_KA
! #define ka_ErrorString error_message
  #undef  KAMINERROR
  #define KAMINERROR ERROR_TABLE_BASE_KA
  #define KAMAXERROR (KAMINERROR+255)
--- 291,297 ----
  };
  
  #ifndef ERROR_TABLE_BASE_KA
! #define ka_ErrorString afs_error_message
  #undef  KAMINERROR
  #define KAMINERROR ERROR_TABLE_BASE_KA
  #define KAMAXERROR (KAMINERROR+255)
Index: openafs/src/kauth/klog.c
diff -c openafs/src/kauth/klog.c:1.8 openafs/src/kauth/klog.c:1.8.2.1
*** openafs/src/kauth/klog.c:1.8	Tue Jul 15 19:15:16 2003
--- openafs/src/kauth/klog.c	Tue Apr 10 14:43:43 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/klog.c,v 1.8 2003/07/15 23:15:16 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/klog.c,v 1.8.2.1 2007/04/10 18:43:43 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 222,228 ****
      if (code || !(lcell = ka_LocalCell())) {
        nocell:
  	if (!Silent)
! 	    com_err(rn, code, "Can't get local cell name!");
  	KLOGEXIT(code);
      }
      if (code = ka_CellToRealm(lcell, lrealm, 0))
--- 222,228 ----
      if (code || !(lcell = ka_LocalCell())) {
        nocell:
  	if (!Silent)
! 	    afs_com_err(rn, code, "Can't get local cell name!");
  	KLOGEXIT(code);
      }
      if (code = ka_CellToRealm(lcell, lrealm, 0))
***************
*** 255,261 ****
  	code = ubik_ParseClientList(i, ap, serverList);
  	if (code) {
  	    if (!Silent) {
! 		com_err(rn, code, "could not parse server list");
  	    }
  	    return code;
  	}
--- 255,261 ----
  	code = ubik_ParseClientList(i, ap, serverList);
  	if (code) {
  	    if (!Silent) {
! 		afs_com_err(rn, code, "could not parse server list");
  	    }
  	    return code;
  	}
***************
*** 354,360 ****
  	strcpy(realm, lcell);
      if (code = ka_CellToRealm(realm, realm, &local)) {
  	if (!Silent)
! 	    com_err(rn, code, "Can't convert cell to realm");
  	KLOGEXIT(code);
      }
  
--- 354,360 ----
  	strcpy(realm, lcell);
      if (code = ka_CellToRealm(realm, realm, &local)) {
  	if (!Silent)
! 	    afs_com_err(rn, code, "Can't convert cell to realm");
  	KLOGEXIT(code);
      }
  
***************
*** 392,398 ****
  	code = krb_write_ticket_file(realm);
  	if (!Silent) {
  	    if (code)
! 		com_err(rn, code, "writing Kerberos ticket file");
  	    else
  		fprintf(stderr, "Wrote ticket file to /tmp\n");
  	}
--- 392,398 ----
  	code = krb_write_ticket_file(realm);
  	if (!Silent) {
  	    if (code)
! 		afs_com_err(rn, code, "writing Kerberos ticket file");
  	    else
  		fprintf(stderr, "Wrote ticket file to /tmp\n");
  	}
Index: openafs/src/kauth/kpasswd.c
diff -c openafs/src/kauth/kpasswd.c:1.14.2.1 openafs/src/kauth/kpasswd.c:1.14.2.2
*** openafs/src/kauth/kpasswd.c:1.14.2.1	Wed Aug 25 03:09:38 2004
--- openafs/src/kauth/kpasswd.c	Tue Apr 10 14:43:43 2007
***************
*** 12,18 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kpasswd.c,v 1.14.2.1 2004/08/25 07:09:38 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 12,18 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kpasswd.c,v 1.14.2.2 2007/04/10 18:43:43 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 262,268 ****
      if (code || !(lcell = ka_LocalCell())) {
  #ifndef AFS_FREELANCE_CLIENT
  	if (!Pipe)
! 	    com_err(rn, code, "Can't get local cell name!");
  	exit(1);
  #endif
      }
--- 262,268 ----
      if (code || !(lcell = ka_LocalCell())) {
  #ifndef AFS_FREELANCE_CLIENT
  	if (!Pipe)
! 	    afs_com_err(rn, code, "Can't get local cell name!");
  	exit(1);
  #endif
      }
***************
*** 270,276 ****
      code = rx_Init(0);
      if (code) {
  	if (!Pipe)
! 	    com_err(rn, code, "Failed to initialize Rx");
  	exit(1);
      }
  
--- 270,276 ----
      code = rx_Init(0);
      if (code) {
  	if (!Pipe)
! 	    afs_com_err(rn, code, "Failed to initialize Rx");
  	exit(1);
      }
  
***************
*** 301,307 ****
  	code = ubik_ParseClientList(i, ap, serverList);
  	if (code) {
  	    if (!Pipe)
! 		com_err(rn, code, "could not parse server list");
  	    return code;
  	}
  	lexplicit = 1;
--- 301,307 ----
  	code = ubik_ParseClientList(i, ap, serverList);
  	if (code) {
  	    if (!Pipe)
! 		afs_com_err(rn, code, "could not parse server list");
  	    return code;
  	}
  	lexplicit = 1;
***************
*** 382,388 ****
  #ifdef AFS_FREELANCE_CLIENT
      if (!foundExplicitCell && !lcell) {
  	if (!Pipe)
! 	    com_err(rn, code, "no cell name provided");
  	exit(1);
      }
  #else
--- 382,388 ----
  #ifdef AFS_FREELANCE_CLIENT
      if (!foundExplicitCell && !lcell) {
  	if (!Pipe)
! 	    afs_com_err(rn, code, "no cell name provided");
  	exit(1);
      }
  #else
***************
*** 392,398 ****
  
      if (code = ka_CellToRealm(realm, realm, &local)) {
  	if (!Pipe)
! 	    com_err(rn, code, "Can't convert cell to realm");
  	exit(1);
      }
      lcstring(cell, realm, sizeof(cell));
--- 392,398 ----
  
      if (code = ka_CellToRealm(realm, realm, &local)) {
  	if (!Pipe)
! 	    afs_com_err(rn, code, "Can't convert cell to realm");
  	exit(1);
      }
      lcstring(cell, realm, sizeof(cell));
***************
*** 413,419 ****
  		memset(&key, 0, sizeof(key));
  		memset(passwd, 0, sizeof(passwd));
  		if (code)
! 		    com_err(rn, code, "reading password");
  		exit(1);
  	    }
  	}
--- 413,419 ----
  		memset(&key, 0, sizeof(key));
  		memset(passwd, 0, sizeof(passwd));
  		if (code)
! 		    afs_com_err(rn, code, "reading password");
  		exit(1);
  	    }
  	}
***************
*** 522,538 ****
      memset(&mitkey, 0, sizeof(mitkey));
      memset(&key, 0, sizeof(key));
      if (code == KAUBIKCALL)
! 	com_err(rn, code, "(Authentication Server unavailable, try later)");
      else if (code) {
  	if (code == KABADREQUEST)
  	    fprintf(stderr, "%s: Incorrect old password.\n", rn);
  	else
! 	    com_err(rn, code, "so couldn't change password");
      } else {
  	code =
  	    ka_AuthServerConn(realm, KA_MAINTENANCE_SERVICE, &token, &conn);
  	if (code)
! 	    com_err(rn, code, "contacting Admin Server");
  	else {
  	    if (dess2k == 1)
  		code =
--- 522,538 ----
      memset(&mitkey, 0, sizeof(mitkey));
      memset(&key, 0, sizeof(key));
      if (code == KAUBIKCALL)
! 	afs_com_err(rn, code, "(Authentication Server unavailable, try later)");
      else if (code) {
  	if (code == KABADREQUEST)
  	    fprintf(stderr, "%s: Incorrect old password.\n", rn);
  	else
! 	    afs_com_err(rn, code, "so couldn't change password");
      } else {
  	code =
  	    ka_AuthServerConn(realm, KA_MAINTENANCE_SERVICE, &token, &conn);
  	if (code)
! 	    afs_com_err(rn, code, "contacting Admin Server");
  	else {
  	    if (dess2k == 1)
  		code =
***************
*** 546,552 ****
  	    memset(&newmitkey, 0, sizeof(newmitkey));
  	    if (code) {
  		char *reason;
! 		reason = (char *)error_message(code);
  		fprintf(stderr, "%s: Password was not changed because %s\n",
  			rn, reason);
  	    } else
--- 546,552 ----
  	    memset(&newmitkey, 0, sizeof(newmitkey));
  	    if (code) {
  		char *reason;
! 		reason = (char *)afs_error_message(code);
  		fprintf(stderr, "%s: Password was not changed because %s\n",
  			rn, reason);
  	    } else
***************
*** 567,573 ****
  
    no_change:			/* yuck, yuck, yuck */
      if (code)
! 	com_err(rn, code, "getting new password");
    no_change_no_msg:
      memset(&key, 0, sizeof(key));
      memset(npasswd, 0, sizeof(npasswd));
--- 567,573 ----
  
    no_change:			/* yuck, yuck, yuck */
      if (code)
! 	afs_com_err(rn, code, "getting new password");
    no_change_no_msg:
      memset(&key, 0, sizeof(key));
      memset(npasswd, 0, sizeof(npasswd));
Index: openafs/src/kauth/krb_tf.c
diff -c openafs/src/kauth/krb_tf.c:1.6 openafs/src/kauth/krb_tf.c:1.6.2.2
*** openafs/src/kauth/krb_tf.c:1.6	Tue Jul 15 19:15:17 2003
--- openafs/src/kauth/krb_tf.c	Mon Aug 20 13:29:25 2007
***************
*** 48,54 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/krb_tf.c,v 1.6 2003/07/15 23:15:17 shadow Exp $");
  
  #ifdef HAVE_FCNTL_H
  #include <fcntl.h>
--- 48,54 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/krb_tf.c,v 1.6.2.2 2007/08/20 17:29:25 shadow Exp $");
  
  #ifdef HAVE_FCNTL_H
  #include <fcntl.h>
***************
*** 72,77 ****
--- 72,232 ----
  #include "kauth.h"
  #include "kautils.h"
  
+ #ifndef WORDS_BIGENDIAN
+ /* This was taken from jhutz's patch for heimdal krb4. It only
+  * applies to little endian systems. Big endian systems have a
+  * less elegant solution documented below.
+  *
+  * This record is written after every real ticket, to ensure that
+  * both 32- and 64-bit readers will perceive the next real ticket
+  * as starting in the same place.  This record looks like a ticket
+  * with the following properties:
+  *   Field         32-bit             64-bit
+  *   ============  =================  =================
+  *   sname         "."                "."
+  *   sinst         ""                 ""
+  *   srealm        ".."               ".."
+  *   session key   002E2E00 xxxxxxxx  xxxxxxxx 00000000
+  *   lifetime      0                  0
+  *   kvno          0                  12
+  *   ticket        12 nulls           4 nulls
+  *   issue         0                  0
+  */
+ static unsigned char align_rec[] = {
+     0x2e, 0x00, 0x00, 0x2e, 0x2e, 0x00, 0x00, 0x2e,
+     0x2e, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
+     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00,
+     0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+     0x00, 0x00
+ };
+ 
+ #else /* AFSLITTLE_ENDIAN */
+ 
+ /* This was taken from asedeno's patch for MIT Kerberos. These
+  * alignment records are for big endian systems. We need more of them
+  * because the portion of the 64-bit issue_date that overlaps with the
+  * start of a ticket on 32-bit systems contains an unpredictable
+  * number of NULL bytes. Preceeding these records is a second copy of
+  * the 32-bit issue_date. The srealm for the alignment records is
+  * always one of ".." or "?.."
+  */
+ 
+ /* No NULL bytes
+  * This is actually two alignment records since both 32- and 64-bit
+  * readers will agree on everything in the first record up through the
+  * issue_date size, except where sname starts.
+  *   Field (1)     32-bit             64-bit
+  *   ============  =================  =================
+  *   sname         "????."            "."
+  *   sinst         ""                 ""
+  *   srealm        ".."               ".."
+  *   session key   00000000 xxxxxxxx  00000000 xxxxxxxx
+  *   lifetime      0                  0
+  *   kvno          0                  0
+  *   ticket        4 nulls           4 nulls
+  *   issue         0                  0
+  *
+  *   Field (2)     32-bit             64-bit
+  *   ============  =================  =================
+  *   sname         "."                "."
+  *   sinst         ""                 ""
+  *   srealm        ".."               ".."
+  *   session key   002E2E00 xxxxxxxx  xxxxxxxx 00000000
+  *   lifetime      0                  0
+  *   kvno          0                  12
+  *   ticket        12 nulls           4 nulls
+  *   issue         0                  0
+  *
+  */
+ static unsigned char align_rec_0[] = {
+     0x2e, 0x00, 0x00, 0x2e, 0x2e, 0x00, 0x00, 0x00,
+     0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
+     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+     0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+     0x00, 0x00, 0x2e, 0x00, 0x00, 0x2e, 0x2e, 0x00,
+     0x00, 0x2e, 0x2e, 0x00, 0xff, 0xff, 0xff, 0xff,
+     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+     0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04,
+     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+     0x00, 0x00, 0x00, 0x00
+ };
+ 
+ /* One NULL byte
+  *   Field         32-bit             64-bit
+  *   ============  =================  =================
+  *   sname         "x"  |"xx"|"xxx"   "."
+  *   sinst         "xx."|"x."|"."     ".."
+  *   srealm        ".."               "..."
+  *   session key   2E2E2E00 xxxxxxxx  xxxxxxxx 00000000
+  *   lifetime      0                  0
+  *   kvno          0                  12
+  *   ticket        12 nulls           4 nulls
+  *   issue         0                  0
+  */
+ static unsigned char align_rec_1[] = {
+     0x2e, 0x00, 0x2e, 0x2e, 0x00, 0x2e, 0x2e, 0x2e,
+     0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
+     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+     0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+     0x00
+ };
+ 
+ /* Two NULL bytes
+  *   Field         32-bit             64-bit
+  *   ============  =================  =================
+  *   sname         "x"  |"x" |"xx"    ".."
+  *   sinst         ""   |"x" |""      ""
+  *   srealm        "x.."|".."|".."    ".."
+  *   session key   002E2E00 xxxxxxxx  xxxxxxxx 00000000
+  *   lifetime      0                  0
+  *   kvno          0                  12
+  *   ticket        12 nulls           4 nulls
+  *   issue         0                  0
+  */
+  static unsigned char align_rec_2[] = {
+     0x2e, 0x2e, 0x00, 0x00, 0x2e, 0x2e, 0x00, 0xff,
+     0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00,
+     0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
+     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+ 
+ /* Three NULL bytes
+  * Things break here for 32-bit krb4 libraries that don't
+  * understand this alignment record. We can't really do
+  * anything about the fact that the three strings ended
+  * in the duplicate timestamp. The good news is that this
+  * only happens once every 0x1000000 seconds, once roughly
+  * every six and a half months. We'll live.
+  *
+  * Discussion on the krbdev list has suggested the
+  * issue_date be incremented by one in this case to avoid
+  * the problem. I'm leaving this here just in case.
+  *
+  *   Field         32-bit             64-bit
+  *   ============  =================  =================
+  *   sname         ""                 "."
+  *   sinst         ""                 ""
+  *   srealm        ""                 ".."
+  *   session key   2E00002E 2E00FFFF  xxxx0000 0000xxxx
+  *   lifetime      0                  0
+  *   kvno          4294901760         917504
+  *   ticket        14 nulls           4 nulls
+  *   issue         0                  0
+  */
+ /*
+ static unsigned char align_rec_3[] = {
+     0x2e, 0x00, 0x00, 0x2e, 0x2e, 0x00, 0xff, 0xff,
+     0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
+     0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00,
+     0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+     0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ };
+ */
+ #endif /* AFSLITTLE_ENDIAN */
+ 
  afs_int32
  krb_write_ticket_file(realm)
       char *realm;
***************
*** 149,160 ****
      if (write(fd, (char *)(token.ticket), count) != count)
  	goto bad;
      /* Issue date */
!     if (write(fd, (char *)&token.startTime, sizeof(afs_int32))
  	!= sizeof(afs_int32))
  	goto bad;
      close(fd);
      return 0;
  
    bad:
      close(fd);
      return -1;
--- 304,376 ----
      if (write(fd, (char *)(token.ticket), count) != count)
  	goto bad;
      /* Issue date */
!     if (write(fd, (char *)&(token.startTime), sizeof(afs_int32))
  	!= sizeof(afs_int32))
  	goto bad;
      close(fd);
      return 0;
  
+     /* Alignment Record, from MIT Kerberos */
+ #ifndef WORDS_BIGENDIAN
+     if (write(fd, align_rec, sizeof(align_rec)) != sizeof(align_rec))
+ 	goto bad;
+ #else /* AFSLITTLE_ENDIAN */
+     {
+ 	int null_bytes = 0;
+ 	if (0 == (token.startTime & 0xff000000))
+ 	    ++null_bytes;
+ 	if (0 == (token.startTime & 0x00ff0000))
+ 	    ++null_bytes;
+ 	if (0 == (token.startTime & 0x0000ff00))
+ 	    ++null_bytes;
+ 	if (0 == (token.startTime & 0x000000ff))
+ 	    ++null_bytes;
+ 
+ 	switch(null_bytes) {
+ 	case 0:
+ 	     /* Issue date */
+ 	    if (write(fd, (char *) token.startTime, sizeof(afs_int32))
+ 		!= sizeof(afs_int32))
+ 		goto bad;
+ 	    if (write(fd, align_rec_0, sizeof(align_rec_0))
+ 		!= sizeof(align_rec_0))
+ 		goto bad;
+ 	    break;
+ 
+ 	case 1:
+ 	    /* Issue date */
+ 	    if (write(fd, (char *) &token.startTime, sizeof(afs_int32))
+ 		!= sizeof(afs_int32))
+ 		goto bad;
+ 	    if (write(fd, align_rec_1, sizeof(align_rec_1))
+ 		!= sizeof(align_rec_1))
+ 		goto bad;
+ 	    break;
+ 
+ 	case 3:
+ 	    /* Three NULLS are troublesome but rare. We'll just pretend
+ 	     * they don't exist by decrementing the token.startTime.
+ 	     */
+ 	    --token.startTime;
+ 	case 2:
+ 	    /* Issue date */
+ 	    if (write(fd, (char *) &token.startTime, sizeof(afs_int32))
+ 		!= sizeof(afs_int32))
+ 		goto bad;
+ 	    if (write(fd, align_rec_2, sizeof(align_rec_2))
+ 		!= sizeof(align_rec_2))
+ 		goto bad;
+ 	    break;
+ 
+ 	default:
+ 	     goto bad;
+ 	}
+     }
+ #endif  /* AFSLITTLE_ENDIAN */
+     close(fd);
+     return 0;
+       
+     
    bad:
      close(fd);
      return -1;
Index: openafs/src/kauth/krb_udp.c
diff -c openafs/src/kauth/krb_udp.c:1.23 openafs/src/kauth/krb_udp.c:1.23.2.1
*** openafs/src/kauth/krb_udp.c:1.23	Sun Dec  7 17:49:27 2003
--- openafs/src/kauth/krb_udp.c	Tue Apr 10 14:43:43 2007
***************
*** 16,22 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/krb_udp.c,v 1.23 2003/12/07 22:49:27 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 16,22 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/krb_udp.c,v 1.23.2.1 2007/04/10 18:43:43 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 735,746 ****
      if (code) {
  	if (code == KANOENT) {
  	    code = KERB_ERR_PRINCIPAL_UNKNOWN;
! 	    err_packet(ksoc, pkt, code, (char *)error_message(code));
  	} else if (code == KAPWEXPIRED) {
  	    code = KERB_ERR_NAME_EXP;
  	    err_packet(ksoc, pkt, code, "password has expired");
  	} else
! 	    err_packet(ksoc, pkt, code, (char *)error_message(code));
      }
      return 0;
  }
--- 735,746 ----
      if (code) {
  	if (code == KANOENT) {
  	    code = KERB_ERR_PRINCIPAL_UNKNOWN;
! 	    err_packet(ksoc, pkt, code, (char *)afs_error_message(code));
  	} else if (code == KAPWEXPIRED) {
  	    code = KERB_ERR_NAME_EXP;
  	    err_packet(ksoc, pkt, code, "password has expired");
  	} else
! 	    err_packet(ksoc, pkt, code, (char *)afs_error_message(code));
      }
      return 0;
  }
***************
*** 784,790 ****
      if (code) {
  	if (code == KANOENT)
  	    code = KERB_ERR_PRINCIPAL_UNKNOWN;
! 	err_packet(ksoc, pkt, code, (char *)error_message(code));
  	return -1;
      }
      return 0;
--- 784,790 ----
      if (code) {
  	if (code == KANOENT)
  	    code = KERB_ERR_PRINCIPAL_UNKNOWN;
! 	err_packet(ksoc, pkt, code, (char *)afs_error_message(code));
  	return -1;
      }
      return 0;
Index: openafs/src/kauth/manyklog.c
diff -c openafs/src/kauth/manyklog.c:1.7 openafs/src/kauth/manyklog.c:1.7.2.1
*** openafs/src/kauth/manyklog.c:1.7	Tue Jul 15 19:15:17 2003
--- openafs/src/kauth/manyklog.c	Tue Apr 10 14:43:43 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/manyklog.c,v 1.7 2003/07/15 23:15:17 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/manyklog.c,v 1.7.2.1 2007/04/10 18:43:43 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 214,220 ****
      p if (code || !(lcell = ka_LocalCell())) {
        nocell:
  	if (!Silent)
! 	    com_err(rn, code, "Can't get local cell name!");
  	KLOGEXIT(code);
      }
      if (code = ka_CellToRealm(lcell, lrealm, 0))
--- 214,220 ----
      p if (code || !(lcell = ka_LocalCell())) {
        nocell:
  	if (!Silent)
! 	    afs_com_err(rn, code, "Can't get local cell name!");
  	KLOGEXIT(code);
      }
      if (code = ka_CellToRealm(lcell, lrealm, 0))
***************
*** 251,257 ****
  	code = ubik_ParseClientList(i, ap, serverList);
  	if (code) {
  	    if (!Silent) {
! 		com_err(rn, code, "could not parse server list");
  	    }
  	    return code;
  	}
--- 251,257 ----
  	code = ubik_ParseClientList(i, ap, serverList);
  	if (code) {
  	    if (!Silent) {
! 		afs_com_err(rn, code, "could not parse server list");
  	    }
  	    return code;
  	}
***************
*** 350,356 ****
  	strcpy(realm, lcell);
      if (code = ka_CellToRealm(realm, realm, &local)) {
  	if (!Silent)
! 	    com_err(rn, code, "Can't convert cell to realm");
  	KLOGEXIT(code);
      }
  
--- 350,356 ----
  	strcpy(realm, lcell);
      if (code = ka_CellToRealm(realm, realm, &local)) {
  	if (!Silent)
! 	    afs_com_err(rn, code, "Can't convert cell to realm");
  	KLOGEXIT(code);
      }
  
Index: openafs/src/kauth/rebuild.c
diff -c openafs/src/kauth/rebuild.c:1.11.2.1 openafs/src/kauth/rebuild.c:1.11.2.2
*** openafs/src/kauth/rebuild.c:1.11.2.1	Mon Mar 20 08:39:11 2006
--- openafs/src/kauth/rebuild.c	Tue Apr 10 14:43:43 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/rebuild.c,v 1.11.2.1 2006/03/20 13:39:11 jaltman Exp $");
  
  #include <sys/types.h>
  #include <sys/stat.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/rebuild.c,v 1.11.2.2 2007/04/10 18:43:43 shadow Exp $");
  
  #include <sys/types.h>
  #include <sys/stat.h>
***************
*** 391,402 ****
      offset += UBIK_HEADERSIZE;
      code = lseek(fd, offset, SEEK_SET);
      if (code != offset) {
! 	com_err(whoami, errno, "skipping Ubik header");
  	exit(2);
      }
      code = read(fd, buffer, size);
      if (code != size) {
! 	com_err(whoami, errno, "reading db got %d bytes", code);
  	exit(3);
      }
  }
--- 391,402 ----
      offset += UBIK_HEADERSIZE;
      code = lseek(fd, offset, SEEK_SET);
      if (code != offset) {
! 	afs_com_err(whoami, errno, "skipping Ubik header");
  	exit(2);
      }
      code = read(fd, buffer, size);
      if (code != size) {
! 	afs_com_err(whoami, errno, "reading db got %d bytes", code);
  	exit(3);
      }
  }
***************
*** 427,433 ****
      if (outFile) {
  	out = fopen(outFile, "w");
  	if (!out) {
! 	    com_err(whoami, errno, "opening output file %s", outFile);
  	    exit(7);
  	}
      } else
--- 427,433 ----
      if (outFile) {
  	out = fopen(outFile, "w");
  	if (!out) {
! 	    afs_com_err(whoami, errno, "opening output file %s", outFile);
  	    exit(7);
  	}
      } else
***************
*** 435,446 ****
  
      fd = open(dbFile, O_RDONLY, 0);
      if (fd < 0) {
! 	com_err(whoami, errno, "opening database file %s", dbFile);
  	exit(6);
      }
      code = fstat(fd, &info);
      if (code) {
! 	com_err(whoami, errno, "stat'ing file %s", dbFile);
  	exit(6);
      }
      if ((info.st_size - UBIK_HEADERSIZE) % UBIK_BUFFERSIZE)
--- 435,446 ----
  
      fd = open(dbFile, O_RDONLY, 0);
      if (fd < 0) {
! 	afs_com_err(whoami, errno, "opening database file %s", dbFile);
  	exit(6);
      }
      code = fstat(fd, &info);
      if (code) {
! 	afs_com_err(whoami, errno, "stat'ing file %s", dbFile);
  	exit(6);
      }
      if ((info.st_size - UBIK_HEADERSIZE) % UBIK_BUFFERSIZE)
Index: openafs/src/kauth/user.c
diff -c openafs/src/kauth/user.c:1.11.2.1 openafs/src/kauth/user.c:1.11.2.2
*** openafs/src/kauth/user.c:1.11.2.1	Wed Aug 25 03:09:38 2004
--- openafs/src/kauth/user.c	Tue Apr 10 14:43:43 2007
***************
*** 18,24 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/user.c,v 1.11.2.1 2004/08/25 07:09:38 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
--- 18,24 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/user.c,v 1.11.2.2 2007/04/10 18:43:43 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
***************
*** 111,117 ****
  	    return code;
  	code = pr_Initialize(0, AFSDIR_CLIENT_ETC_DIRPATH, server.cell);
  	if (code) {
! 	    com_err(whoami, code, "initializing ptserver in cell '%s'",
  		    server.cell);
  	    return 0;
  	}
--- 111,117 ----
  	    return code;
  	code = pr_Initialize(0, AFSDIR_CLIENT_ETC_DIRPATH, server.cell);
  	if (code) {
! 	    afs_com_err(whoami, code, "initializing ptserver in cell '%s'",
  		    server.cell);
  	    return 0;
  	}
***************
*** 134,140 ****
  	if ((code == 0) && (viceId == ANONYMOUSID))
  	    code = PRNOENT;
  	if (code) {
! 	    com_err(whoami, code, "translating %s to id", username);
  	    return 0;
  	}
  
--- 134,140 ----
  	if ((code == 0) && (viceId == ANONYMOUSID))
  	    code = PRNOENT;
  	if (code) {
! 	    afs_com_err(whoami, code, "translating %s to id", username);
  	    return 0;
  	}
  
***************
*** 285,291 ****
  	    *reasonP = "Authentication Server was unavailable";
  	    break;
  	default:
! 	    *reasonP = (char *)error_message(code);
  	}
      return code;
  }
--- 285,291 ----
  	    *reasonP = "Authentication Server was unavailable";
  	    break;
  	default:
! 	    *reasonP = (char *)afs_error_message(code);
  	}
      return code;
  }
***************
*** 322,328 ****
  	return 0;
  
      if (reasonP) {
! 	*reasonP = (char *)error_message(code);
      }
      return code;
  }
--- 322,328 ----
  	return 0;
  
      if (reasonP) {
! 	*reasonP = (char *)afs_error_message(code);
      }
      return code;
  }
Index: openafs/src/kauth/test/multiklog.c
diff -c openafs/src/kauth/test/multiklog.c:1.7 openafs/src/kauth/test/multiklog.c:1.7.2.1
*** openafs/src/kauth/test/multiklog.c:1.7	Tue Jul 15 19:15:17 2003
--- openafs/src/kauth/test/multiklog.c	Tue Apr 10 14:43:43 2007
***************
*** 18,24 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/test/multiklog.c,v 1.7 2003/07/15 23:15:17 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 18,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/test/multiklog.c,v 1.7.2.1 2007/04/10 18:43:43 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 177,183 ****
      if (code || !(lcell = ka_LocalCell())) {
        nocell:
  	if (!Silent)
! 	    com_err(rn, code, "Can't get local cell name!");
  	exit(code);
      }
      if (code = ka_CellToRealm(lcell, lrealm, 0))
--- 177,183 ----
      if (code || !(lcell = ka_LocalCell())) {
        nocell:
  	if (!Silent)
! 	    afs_com_err(rn, code, "Can't get local cell name!");
  	exit(code);
      }
      if (code = ka_CellToRealm(lcell, lrealm, 0))
***************
*** 214,220 ****
  	code = ubik_ParseClientList(i, ap, serverList);
  	if (code) {
  	    if (!Silent) {
! 		com_err(rn, code, "could not parse server list");
  	    }
  	    return code;
  	}
--- 214,220 ----
  	code = ubik_ParseClientList(i, ap, serverList);
  	if (code) {
  	    if (!Silent) {
! 		afs_com_err(rn, code, "could not parse server list");
  	    }
  	    return code;
  	}
***************
*** 317,323 ****
  	strcpy(realm, lcell);
      if (code = ka_CellToRealm(realm, realm, &local)) {
  	if (!Silent)
! 	    com_err(rn, code, "Can't convert cell to realm");
  	exit(code);
      }
  
--- 317,323 ----
  	strcpy(realm, lcell);
      if (code = ka_CellToRealm(realm, realm, &local)) {
  	if (!Silent)
! 	    afs_com_err(rn, code, "Can't convert cell to realm");
  	exit(code);
      }
  
***************
*** 363,369 ****
  	code = krb_write_ticket_file(realm);
  	if (!Silent) {
  	    if (code)
! 		com_err(rn, code, "writing Kerberos ticket file");
  	    else
  		fprintf(stderr, "Wrote ticket file to /tmp\n");
  	}
--- 363,369 ----
  	code = krb_write_ticket_file(realm);
  	if (!Silent) {
  	    if (code)
! 		afs_com_err(rn, code, "writing Kerberos ticket file");
  	    else
  		fprintf(stderr, "Wrote ticket file to /tmp\n");
  	}
Index: openafs/src/kauth/test/test_badtix.c
diff -c openafs/src/kauth/test/test_badtix.c:1.7 openafs/src/kauth/test/test_badtix.c:1.7.2.1
*** openafs/src/kauth/test/test_badtix.c:1.7	Tue Jul 15 19:15:18 2003
--- openafs/src/kauth/test/test_badtix.c	Tue Apr 10 14:43:43 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/test/test_badtix.c,v 1.7 2003/07/15 23:15:18 shadow Exp $");
  
  #include <sys/types.h>
  #include <des.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/test/test_badtix.c,v 1.7.2.1 2007/04/10 18:43:43 shadow Exp $");
  
  #include <sys/types.h>
  #include <des.h>
***************
*** 170,176 ****
  			      &adminConn))
  	) {
        abort:
! 	com_err(whoami, code, "testing old keys");
  	exit(1);
      }
  
--- 170,176 ----
  			      &adminConn))
  	) {
        abort:
! 	afs_com_err(whoami, code, "testing old keys");
  	exit(1);
      }
  
***************
*** 275,281 ****
  	}
  	if (code) {
  	  abort_1:
! 	    com_err(whoami, code, "at %d seconds: calling server with v=%x",
  		    sleep, v);
  	    exit(2);
  	}
--- 275,281 ----
  	}
  	if (code) {
  	  abort_1:
! 	    afs_com_err(whoami, code, "at %d seconds: calling server with v=%x",
  		    sleep, v);
  	    exit(2);
  	}
***************
*** 296,302 ****
  			      &adminTokens[i], &conn);
  	if (code) {
  	  abort_ta:
! 	    com_err(whoami, code, "Checking admin token #%d with kvno %d\n",
  		    i, (int)adminTokens[i].kvno);
  	    exit(5);
  	}
--- 296,302 ----
  			      &adminTokens[i], &conn);
  	if (code) {
  	  abort_ta:
! 	    afs_com_err(whoami, code, "Checking admin token #%d with kvno %d\n",
  		    i, (int)adminTokens[i].kvno);
  	    exit(5);
  	}
***************
*** 321,327 ****
  	    ka_GetToken(name, inst, localCell, name, inst, tgsConn, now,
  			now + 3600, &tgsTokens[i], "", &token);
  	if (code) {
! 	    com_err(whoami, code, "Checking tgs token #%d with kvno %d\n", i,
  		    (int)tgsTokens[i].kvno);
  	    exit(6);
  	}
--- 321,327 ----
  	    ka_GetToken(name, inst, localCell, name, inst, tgsConn, now,
  			now + 3600, &tgsTokens[i], "", &token);
  	if (code) {
! 	    afs_com_err(whoami, code, "Checking tgs token #%d with kvno %d\n", i,
  		    (int)tgsTokens[i].kvno);
  	    exit(6);
  	}
***************
*** 329,335 ****
  
      code = ubik_Call(KAM_DeleteUser, adminConn, 0, aaname, aainst);
      if (code) {
! 	com_err(whoami, code, "Deleting alternate admin user");
  	exit(3);
      }
      return;
--- 329,335 ----
  
      code = ubik_Call(KAM_DeleteUser, adminConn, 0, aaname, aainst);
      if (code) {
! 	afs_com_err(whoami, code, "Deleting alternate admin user");
  	exit(3);
      }
      return;
***************
*** 414,420 ****
  
      code = ka_CellConfig(AFSCONF_CLIENTNAME);
      if (code)
! 	com_err(whoami, code, "calling cell config");
      localCell = ka_LocalCell();
  
      for (i = 0; i < (sizeof(truncate) / sizeof(int)); i++) {
--- 414,420 ----
  
      code = ka_CellConfig(AFSCONF_CLIENTNAME);
      if (code)
! 	afs_com_err(whoami, code, "calling cell config");
      localCell = ka_LocalCell();
  
      for (i = 0; i < (sizeof(truncate) / sizeof(int)); i++) {
***************
*** 453,467 ****
  
      code = rx_Init(0);
      if (code) {
! 	com_err(whoami, code, "rx_Init'ing");
  	exit(1);
      }
      if (code = ka_Init(0)) {
! 	com_err(whoami, code, "ka_Init'ing");
  	exit(1);
      }
      if (code = ubik_ParseClientList(3, args, serverList)) {
! 	com_err(whoami, code, "parsing Ubik server list");
  	exit(1);
      }
      ka_ExplicitCell(localCell, serverList);
--- 453,467 ----
  
      code = rx_Init(0);
      if (code) {
! 	afs_com_err(whoami, code, "rx_Init'ing");
  	exit(1);
      }
      if (code = ka_Init(0)) {
! 	afs_com_err(whoami, code, "ka_Init'ing");
  	exit(1);
      }
      if (code = ubik_ParseClientList(3, args, serverList)) {
! 	afs_com_err(whoami, code, "parsing Ubik server list");
  	exit(1);
      }
      ka_ExplicitCell(localCell, serverList);
***************
*** 480,486 ****
  	code = ubik_ClientInit(conns, &lpbkConn);
  	if (code) {
  	  abort_4:
! 	    com_err(whoami, code,
  		    "getting %s's password via loopback connection to GetPassword",
  		    name);
  	    exit(1);
--- 480,486 ----
  	code = ubik_ClientInit(conns, &lpbkConn);
  	if (code) {
  	  abort_4:
! 	    afs_com_err(whoami, code,
  		    "getting %s's password via loopback connection to GetPassword",
  		    name);
  	    exit(1);
***************
*** 497,503 ****
      code = ka_AuthServerConn(localCell, KA_AUTHENTICATION_SERVICE, 0, &aconn);
      if (code) {
        abort:
! 	com_err(whoami, code, "connecting to authentication service");
  	exit(1);
      }
      end = now + 100 * 3600 + 2;
--- 497,503 ----
      code = ka_AuthServerConn(localCell, KA_AUTHENTICATION_SERVICE, 0, &aconn);
      if (code) {
        abort:
! 	afs_com_err(whoami, code, "connecting to authentication service");
  	exit(1);
      }
      end = now + 100 * 3600 + 2;
***************
*** 522,528 ****
  			&token, 0);
      if (code) {
        abort_1:
! 	com_err(whoami, code, "using admin ticket with time jitter");
  	exit(1);
      }
  
--- 522,528 ----
  			&token, 0);
      if (code) {
        abort_1:
! 	afs_com_err(whoami, code, "using admin ticket with time jitter");
  	exit(1);
      }
  
***************
*** 544,550 ****
  	code = ubik_Call(KAM_SetPassword, conn, 0, name, inst, 0, badkey);
  	if (code != KABADKEY) {
  	  abort_5:
! 	    com_err(whoami, code, "Trying to set bad key");
  	    exit(1);
  	}
  	memset(&badkey, 0, sizeof(badkey));
--- 544,550 ----
  	code = ubik_Call(KAM_SetPassword, conn, 0, name, inst, 0, badkey);
  	if (code != KABADKEY) {
  	  abort_5:
! 	    afs_com_err(whoami, code, "Trying to set bad key");
  	    exit(1);
  	}
  	memset(&badkey, 0, sizeof(badkey));
***************
*** 566,572 ****
  	code = ubik_Call(KAM_SetPassword, conn, 0, aname, ainst, 0, akey);
  	if (code) {
  	  abort_6:
! 	    com_err(whoami, code, "Checking SetPassword");
  	    exit(2);
  	}
  	code =
--- 566,572 ----
  	code = ubik_Call(KAM_SetPassword, conn, 0, aname, ainst, 0, akey);
  	if (code) {
  	  abort_6:
! 	    afs_com_err(whoami, code, "Checking SetPassword");
  	    exit(2);
  	}
  	code =
***************
*** 595,601 ****
  			   &atoken.sessionKey, 0, aname, ainst);
  	if (code) {
  	  abort_3:
! 	    com_err(whoami, code, "faking up AuthServer ticket");
  	    exit(1);
  	}
  	{
--- 595,601 ----
  			   &atoken.sessionKey, 0, aname, ainst);
  	if (code) {
  	  abort_3:
! 	    afs_com_err(whoami, code, "faking up AuthServer ticket");
  	    exit(1);
  	}
  	{
***************
*** 644,656 ****
      code =
  	ka_AuthServerConn(localCell, KA_MAINTENANCE_SERVICE, &atoken, &conn);
      if (code) {
! 	com_err(whoami, code, "contacting admin server with bashed ticket");
  	exit(0);		/* this is supposed to happen */
      }
      code =
  	ubik_Call(KAM_GetEntry, conn, 0, name, inst, KAMAJORVERSION, &tentry);
      if (code != RXKADBADTICKET) {
! 	com_err(whoami, code,
  		"GetEntry failed to fail even with damaged ticket!!!!\n");
  	exit(1);
      }
--- 644,656 ----
      code =
  	ka_AuthServerConn(localCell, KA_MAINTENANCE_SERVICE, &atoken, &conn);
      if (code) {
! 	afs_com_err(whoami, code, "contacting admin server with bashed ticket");
  	exit(0);		/* this is supposed to happen */
      }
      code =
  	ubik_Call(KAM_GetEntry, conn, 0, name, inst, KAMAJORVERSION, &tentry);
      if (code != RXKADBADTICKET) {
! 	afs_com_err(whoami, code,
  		"GetEntry failed to fail even with damaged ticket!!!!\n");
  	exit(1);
      }
***************
*** 661,667 ****
      if (argc == 2) {
  	code = setpag();
  	if (code)
! 	    com_err(whoami, code, "calling SetPAG");
  	else
  	    printf("Calling SetPAG and exec'ing %s\n", argv[1]);
  	execve(argv[1], argv + 1, 0);
--- 661,667 ----
      if (argc == 2) {
  	code = setpag();
  	if (code)
! 	    afs_com_err(whoami, code, "calling SetPAG");
  	else
  	    printf("Calling SetPAG and exec'ing %s\n", argv[1]);
  	execve(argv[1], argv + 1, 0);
Index: openafs/src/kauth/test/test_getticket.c
diff -c openafs/src/kauth/test/test_getticket.c:1.7.2.1 openafs/src/kauth/test/test_getticket.c:1.7.2.2
*** openafs/src/kauth/test/test_getticket.c:1.7.2.1	Mon May 30 00:57:34 2005
--- openafs/src/kauth/test/test_getticket.c	Tue Apr 10 14:43:43 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/test/test_getticket.c,v 1.7.2.1 2005/05/30 04:57:34 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/test/test_getticket.c,v 1.7.2.2 2007/04/10 18:43:43 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 130,136 ****
  		  lifetime, -1,
  		  /* spares */ 0, 0);
      if (code) {
! 	com_err(whoami, code, "calling set fields on %s", name);
  	CRASH();
      }
  }
--- 130,136 ----
  		  lifetime, -1,
  		  /* spares */ 0, 0);
      if (code) {
! 	afs_com_err(whoami, code, "calling set fields on %s", name);
  	CRASH();
      }
  }
***************
*** 201,207 ****
      }
      code = ktc_GetToken(&afs, &t, sizeof(t), 0);
      if (code) {
! 	com_err(whoami, code, "getting afs token from ktc");
  	CRASH();
      }
      CheckLife(t.endTime, t.startTime, expectedLife, match);
--- 201,207 ----
      }
      code = ktc_GetToken(&afs, &t, sizeof(t), 0);
      if (code) {
! 	afs_com_err(whoami, code, "getting afs token from ktc");
  	CRASH();
      }
      CheckLife(t.endTime, t.startTime, expectedLife, match);
***************
*** 243,249 ****
  	    ka_ParseLoginName(as->parms[12].items->data, name, instance,
  			      newCell);
  	if (code) {
! 	    com_err(whoami, code, "parsing user's name '%s'",
  		    as->parms[12].items->data);
  	    return code;
  	}
--- 243,249 ----
  	    ka_ParseLoginName(as->parms[12].items->data, name, instance,
  			      newCell);
  	if (code) {
! 	    afs_com_err(whoami, code, "parsing user's name '%s'",
  		    as->parms[12].items->data);
  	    return code;
  	}
***************
*** 273,285 ****
  
      code = ka_ExpandCell(newCell, newCell, 0 /*local */ );
      if (code) {
! 	com_err(whoami, code, "Can't expand cell name");
  	return code;
      }
      cell = newCell;
      code = ka_CellToRealm(cell, realm, 0);
      if (code) {
! 	com_err(whoami, code, "Can't get realm from cell name");
  	return code;
      }
  
--- 273,285 ----
  
      code = ka_ExpandCell(newCell, newCell, 0 /*local */ );
      if (code) {
! 	afs_com_err(whoami, code, "Can't expand cell name");
  	return code;
      }
      cell = newCell;
      code = ka_CellToRealm(cell, realm, 0);
      if (code) {
! 	afs_com_err(whoami, code, "Can't get realm from cell name");
  	return code;
      }
  
***************
*** 299,305 ****
  	else if (strlen(passwd) == 0)
  	    code = KANULLPASSWORD;
  	if (code) {
! 	    com_err(whoami, code, "reading password");
  	    return code;
  	}
      }
--- 299,305 ----
  	else if (strlen(passwd) == 0)
  	    code = KANULLPASSWORD;
  	if (code) {
! 	    afs_com_err(whoami, code, "reading password");
  	    return code;
  	}
      }
***************
*** 313,319 ****
  	ap[1] = "-servers";
  	code = ubik_ParseClientList(i, ap, serverList);
  	if (code) {
! 	    com_err(whoami, code, "could not parse server list");
  	    return code;
  	}
  	ka_ExplicitCell(cell, serverList);
--- 313,319 ----
  	ap[1] = "-servers";
  	code = ubik_ParseClientList(i, ap, serverList);
  	if (code) {
! 	    afs_com_err(whoami, code, "could not parse server list");
  	    return code;
  	}
  	ka_ExplicitCell(cell, serverList);
***************
*** 326,332 ****
      strcpy(afs.cell, cell);
      code = ktc_GetToken(&afs, &oldAFSToken, sizeof(oldAFSToken), &oldClient);
      if (code) {
! 	com_err(whoami, code, "saving existing afs token");
  	return code;
      }
  
--- 326,332 ----
      strcpy(afs.cell, cell);
      code = ktc_GetToken(&afs, &oldAFSToken, sizeof(oldAFSToken), &oldClient);
      if (code) {
! 	afs_com_err(whoami, code, "saving existing afs token");
  	return code;
      }
  
***************
*** 345,351 ****
  	    ka_GetAdminToken(name, instance, cell, &key, 3600, &token,
  			     1 /*new */ );
  	if (code) {
! 	    com_err(whoami, code, "getting admin token");
  	    return code;
  	}
  	pToken = &token;
--- 345,351 ----
  	    ka_GetAdminToken(name, instance, cell, &key, 3600, &token,
  			     1 /*new */ );
  	if (code) {
! 	    afs_com_err(whoami, code, "getting admin token");
  	    return code;
  	}
  	pToken = &token;
***************
*** 358,364 ****
  	    ka_AuthServerConn(cell, KA_MAINTENANCE_SERVICE, pToken,
  			      &ubikConn);
  	if (code) {
! 	    com_err(whoami, code, "Getting AuthServer ubik conn");
  	    return code;
  	}
  
--- 358,364 ----
  	    ka_AuthServerConn(cell, KA_MAINTENANCE_SERVICE, pToken,
  			      &ubikConn);
  	if (code) {
! 	    afs_com_err(whoami, code, "Getting AuthServer ubik conn");
  	    return code;
  	}
  
***************
*** 383,389 ****
  	    ktc_GetToken(&tgs_server, &tgs_token, sizeof(tgs_token),
  			 &tgs_client);
  	if (code) {
! 	    com_err(whoami, code, "saving tgs token");
  	    return code;
  	}
  
--- 383,389 ----
  	    ktc_GetToken(&tgs_server, &tgs_token, sizeof(tgs_token),
  			 &tgs_client);
  	if (code) {
! 	    afs_com_err(whoami, code, "saving tgs token");
  	    return code;
  	}
  
***************
*** 418,424 ****
  	/* since the rest should be errors, restore good AFS ticket */
  	code = ktc_SetToken(&afs, &oldAFSToken, &oldClient, 0);
  	if (code) {
! 	    com_err(whoami, code, "restoring old afs token");
  	    return code;
  	}
  
--- 418,424 ----
  	/* since the rest should be errors, restore good AFS ticket */
  	code = ktc_SetToken(&afs, &oldAFSToken, &oldClient, 0);
  	if (code) {
! 	    afs_com_err(whoami, code, "restoring old afs token");
  	    return code;
  	}
  
***************
*** 439,451 ****
  	/* restore old tgs, since GetTicket are prohibited too. */
  	code = ktc_SetToken(&tgs_server, &tgs_token, &tgs_client, 0);
  	if (code) {
! 	    com_err(whoami, code, "restoring old tgs token");
  	    return code;
  	}
  	printf("Restoring TGT obtained before NOTGS set\n");
  	code = ka_GetServerToken(AUTH_SUPERUSER, "", cell, 100, 0, 1);
  	if (code != KABADUSER) {
! 	    com_err(whoami, code,
  		    "expected BADUSER error, getting AFS token w/ old tgs token but with NOTGS set");
  	    CRASH();
  	} else
--- 439,451 ----
  	/* restore old tgs, since GetTicket are prohibited too. */
  	code = ktc_SetToken(&tgs_server, &tgs_token, &tgs_client, 0);
  	if (code) {
! 	    afs_com_err(whoami, code, "restoring old tgs token");
  	    return code;
  	}
  	printf("Restoring TGT obtained before NOTGS set\n");
  	code = ka_GetServerToken(AUTH_SUPERUSER, "", cell, 100, 0, 1);
  	if (code != KABADUSER) {
! 	    afs_com_err(whoami, code,
  		    "expected BADUSER error, getting AFS token w/ old tgs token but with NOTGS set");
  	    CRASH();
  	} else
***************
*** 456,462 ****
  	    struct ktc_token afsToken;
  	    code = ktc_SetToken(&afs, &oldAFSToken, &oldClient, 0);
  	    if (code) {
! 		com_err(whoami, code, "restoring old afs token");
  		return code;
  	    }
  	    fprintf(stdout, "Waiting for TGS ticket to age (about 5 min)...");
--- 456,462 ----
  	    struct ktc_token afsToken;
  	    code = ktc_SetToken(&afs, &oldAFSToken, &oldClient, 0);
  	    if (code) {
! 		afs_com_err(whoami, code, "restoring old afs token");
  		return code;
  	    }
  	    fprintf(stdout, "Waiting for TGS ticket to age (about 5 min)...");
***************
*** 472,485 ****
  	    /* restore old tgs */
  	    code = ktc_SetToken(&tgs_server, &tgs_token, &tgs_client, 0);
  	    if (code) {
! 		com_err(whoami, code, "restoring old tgs token");
  		return code;
  	    }
  	    code =
  		ka_GetServerToken(AUTH_SUPERUSER, "", cell,
  				  MAXKTCTICKETLIFETIME, &afsToken, 1);
  	    if (code) {
! 		com_err(whoami, code, "getting AFS token w/ old tgs token");
  		CRASH();
  	    }
  	    CheckLife(afsToken.endTime, afsToken.startTime, 3600 - (5 * 60),
--- 472,485 ----
  	    /* restore old tgs */
  	    code = ktc_SetToken(&tgs_server, &tgs_token, &tgs_client, 0);
  	    if (code) {
! 		afs_com_err(whoami, code, "restoring old tgs token");
  		return code;
  	    }
  	    code =
  		ka_GetServerToken(AUTH_SUPERUSER, "", cell,
  				  MAXKTCTICKETLIFETIME, &afsToken, 1);
  	    if (code) {
! 		afs_com_err(whoami, code, "getting AFS token w/ old tgs token");
  		CRASH();
  	    }
  	    CheckLife(afsToken.endTime, afsToken.startTime, 3600 - (5 * 60),
Index: openafs/src/kauth/test/test_interim_ktc.c
diff -c openafs/src/kauth/test/test_interim_ktc.c:1.7 openafs/src/kauth/test/test_interim_ktc.c:1.7.2.1
*** openafs/src/kauth/test/test_interim_ktc.c:1.7	Tue Jul 15 19:15:18 2003
--- openafs/src/kauth/test/test_interim_ktc.c	Tue Apr 10 14:43:43 2007
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/test/test_interim_ktc.c,v 1.7 2003/07/15 23:15:18 shadow Exp $");
  
  #include <afs/stds.h>
  #include <afs/com_err.h>
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/test/test_interim_ktc.c,v 1.7.2.1 2007/04/10 18:43:43 shadow Exp $");
  
  #include <afs/stds.h>
  #include <afs/com_err.h>
***************
*** 117,123 ****
  
      code = ktc_SetToken(server, token, client, 0);
      if (code) {
! 	com_err(whoami, code, "using SetToken to set vice id");
  	return 1;
      }
      sprintf(name_buf, "Unix UID %d", getuid());
--- 117,123 ----
  
      code = ktc_SetToken(server, token, client, 0);
      if (code) {
! 	afs_com_err(whoami, code, "using SetToken to set vice id");
  	return 1;
      }
      sprintf(name_buf, "Unix UID %d", getuid());
***************
*** 128,140 ****
  	fprintf(stderr, "GetToken returned bad client: '");
  	PrintPrincipal(stderr, &nclient);
  	fprintf(stderr, "'\n");
! 	com_err(whoami, code, "should have gotten '%s'", name_buf);
  	return 1;
      }
      lifetime =
  	(unsigned long)ntoken.endTime - (unsigned long)ntoken.startTime;
      if ((lifetime & 1) == 1) {
! 	com_err(whoami, code, "GetToken returned even lifetime (%d)",
  		lifetime);
  	return 1;
      }
--- 128,140 ----
  	fprintf(stderr, "GetToken returned bad client: '");
  	PrintPrincipal(stderr, &nclient);
  	fprintf(stderr, "'\n");
! 	afs_com_err(whoami, code, "should have gotten '%s'", name_buf);
  	return 1;
      }
      lifetime =
  	(unsigned long)ntoken.endTime - (unsigned long)ntoken.startTime;
      if ((lifetime & 1) == 1) {
! 	afs_com_err(whoami, code, "GetToken returned even lifetime (%d)",
  		lifetime);
  	return 1;
      }
***************
*** 157,163 ****
      viceId = atoi((client->name) + 7);
      code = ktc_SetToken(server, token, client, 0);
      if (code) {
! 	com_err(whoami, code, "using SetToken to set vice id to %d", viceId);
  	return 1;
      }
      code = ktc_GetToken(server, &ntoken, sizeof(ntoken), &nclient);
--- 157,163 ----
      viceId = atoi((client->name) + 7);
      code = ktc_SetToken(server, token, client, 0);
      if (code) {
! 	afs_com_err(whoami, code, "using SetToken to set vice id to %d", viceId);
  	return 1;
      }
      code = ktc_GetToken(server, &ntoken, sizeof(ntoken), &nclient);
***************
*** 169,181 ****
  	fprintf(stderr, "' should have gotten '");
  	PrintPrincipal(stderr, client);
  	fprintf(stderr, "'\n");
! 	com_err(whoami, code, "didn't preserve AFS ID");
  	return 1;
      }
      lifetime =
  	(unsigned long)ntoken.endTime - (unsigned long)ntoken.startTime;
      if ((lifetime & 1) == 0) {
! 	com_err(whoami, code, "GetToken returned even lifetime (%d)",
  		lifetime);
  	return 1;
      }
--- 169,181 ----
  	fprintf(stderr, "' should have gotten '");
  	PrintPrincipal(stderr, client);
  	fprintf(stderr, "'\n");
! 	afs_com_err(whoami, code, "didn't preserve AFS ID");
  	return 1;
      }
      lifetime =
  	(unsigned long)ntoken.endTime - (unsigned long)ntoken.startTime;
      if ((lifetime & 1) == 0) {
! 	afs_com_err(whoami, code, "GetToken returned even lifetime (%d)",
  		lifetime);
  	return 1;
      }
***************
*** 265,271 ****
      buffer.out_size = 0;
      code = pioctl(0, _VICEIOCTL(3), &buffer, 1);
      if (code) {
! 	com_err(whoami, errno, "setting old-style token");
  	return 1;
      }
  
--- 265,271 ----
      buffer.out_size = 0;
      code = pioctl(0, _VICEIOCTL(3), &buffer, 1);
      if (code) {
! 	afs_com_err(whoami, errno, "setting old-style token");
  	return 1;
      }
  
***************
*** 322,328 ****
  	    if (errno == EDOM)
  		break;		/* done with the list */
  	    else {
! 		com_err(whoami, code, "getting cell list");
  		exit(1);
  	    }
  	}
--- 322,328 ----
  	    if (errno == EDOM)
  		break;		/* done with the list */
  	    else {
! 		afs_com_err(whoami, code, "getting cell list");
  		exit(1);
  	    }
  	}
***************
*** 494,500 ****
      blob.out = space;
      code = pioctl(pathname, VIOCGETAL, &blob, 1);
      if (code) {
! 	com_err(whoami, errno, "getting acl for %s", pathname);
  	return 1;
      }
      if (verbose > 1)
--- 494,500 ----
      blob.out = space;
      code = pioctl(pathname, VIOCGETAL, &blob, 1);
      if (code) {
! 	afs_com_err(whoami, errno, "getting acl for %s", pathname);
  	return 1;
      }
      if (verbose > 1)
***************
*** 538,544 ****
      blob.in_size = 1 + strlen(blob.in);
      code = pioctl(pathname, VIOCSETAL, &blob, 1);
      if (code) {
! 	com_err(whoami, errno, "setting acl on %s to %s", pathname, blob.in);
  	return 1;
      }
      if (verbose > 1) {
--- 538,544 ----
      blob.in_size = 1 + strlen(blob.in);
      code = pioctl(pathname, VIOCSETAL, &blob, 1);
      if (code) {
! 	afs_com_err(whoami, errno, "setting acl on %s to %s", pathname, blob.in);
  	return 1;
      }
      if (verbose > 1) {
***************
*** 566,572 ****
      token.endTime = 0;
      code = ktc_SetToken(&server, &token, &client, 0);
      if (code) {
! 	com_err(whoami, code, "freeing cell");
  	exit(1);
      }
  }
--- 566,572 ----
      token.endTime = 0;
      code = ktc_SetToken(&server, &token, &client, 0);
      if (code) {
! 	afs_com_err(whoami, code, "freeing cell");
  	exit(1);
      }
  }
***************
*** 596,602 ****
      strcpy(server.cell, cell);
      code = ktc_GetToken(&server, &token, sizeof(token), &client);
      if (code) {
! 	com_err(whoami, code, "so couldn't get %s's afs token in %s", name,
  		cell);
  	return code;
      }
--- 596,602 ----
      strcpy(server.cell, cell);
      code = ktc_GetToken(&server, &token, sizeof(token), &client);
      if (code) {
! 	afs_com_err(whoami, code, "so couldn't get %s's afs token in %s", name,
  		cell);
  	return code;
      }
***************
*** 648,670 ****
      strcpy(server.cell, ka_LocalCell());
      code = ktc_GetToken(&server, &token, sizeof(token), &client);
      if (code) {
! 	com_err(whoami, code, "so couldn't get afs token");
  	return code;
      }
  
      code = mkdir(tdpath, 0777);
      if (code && (errno != EEXIST)) {
! 	com_err(whoami, errno, "making test dir %s", tdpath);
  	return code;
      }
      fd = open(tfpath, O_WRONLY + O_CREAT + O_TRUNC, 0777);
      if (fd == -1) {
! 	com_err(whoami, errno, "making test file %s", tfpath);
  	goto failed;
      }
      code = close(fd);
      if (code) {
! 	com_err(whoami, errno, "failed to close %s after create", tfpath);
  	goto failed;
      }
  
--- 648,670 ----
      strcpy(server.cell, ka_LocalCell());
      code = ktc_GetToken(&server, &token, sizeof(token), &client);
      if (code) {
! 	afs_com_err(whoami, code, "so couldn't get afs token");
  	return code;
      }
  
      code = mkdir(tdpath, 0777);
      if (code && (errno != EEXIST)) {
! 	afs_com_err(whoami, errno, "making test dir %s", tdpath);
  	return code;
      }
      fd = open(tfpath, O_WRONLY + O_CREAT + O_TRUNC, 0777);
      if (fd == -1) {
! 	afs_com_err(whoami, errno, "making test file %s", tfpath);
  	goto failed;
      }
      code = close(fd);
      if (code) {
! 	afs_com_err(whoami, errno, "failed to close %s after create", tfpath);
  	goto failed;
      }
  
***************
*** 678,684 ****
  	goto failed;
      code = ktc_GetToken(&server, &ntoken, sizeof(ntoken), &nclient);
      if (code) {
! 	com_err(whoami, code, "getting new local afs token");
  	goto failed;
      }
  
--- 678,684 ----
  	goto failed;
      code = ktc_GetToken(&server, &ntoken, sizeof(ntoken), &nclient);
      if (code) {
! 	afs_com_err(whoami, code, "getting new local afs token");
  	goto failed;
      }
  
***************
*** 705,733 ****
  
      code = open(tfpath, O_RDONLY, 0);	/* check for read access */
      if (!((code == -1) && ((errno == ENOENT) || (errno == EACCES)))) {
! 	com_err(whoami, errno, "didn't fail to open %s for read", tfpath);
  	goto failed;
      }
  
      /* as tester we should have read but not write */
      code = ktc_SetToken(&server, &ntoken, &nclient, 0);
      if (code) {
! 	com_err(whoami, code, "restoring new local afs token");
  	goto failed;
      }
      code = open(tfpath, O_RDWR + O_TRUNC, 0);
      if ((code != -1) || (errno != EACCES)) {
! 	com_err(whoami, errno, "didn't fail to open %s for write", tfpath);
  	goto failed;
      }
      fd = open(tfpath, O_RDONLY, 0);
      if (fd == -1) {
! 	com_err(whoami, errno, "failed to open %s for read", tfpath);
  	goto failed;
      }
      code = close(fd);
      if (code) {
! 	com_err(whoami, errno, "failed to close %s after open", tfpath);
  	goto failed;
      }
  
--- 705,733 ----
  
      code = open(tfpath, O_RDONLY, 0);	/* check for read access */
      if (!((code == -1) && ((errno == ENOENT) || (errno == EACCES)))) {
! 	afs_com_err(whoami, errno, "didn't fail to open %s for read", tfpath);
  	goto failed;
      }
  
      /* as tester we should have read but not write */
      code = ktc_SetToken(&server, &ntoken, &nclient, 0);
      if (code) {
! 	afs_com_err(whoami, code, "restoring new local afs token");
  	goto failed;
      }
      code = open(tfpath, O_RDWR + O_TRUNC, 0);
      if ((code != -1) || (errno != EACCES)) {
! 	afs_com_err(whoami, errno, "didn't fail to open %s for write", tfpath);
  	goto failed;
      }
      fd = open(tfpath, O_RDONLY, 0);
      if (fd == -1) {
! 	afs_com_err(whoami, errno, "failed to open %s for read", tfpath);
  	goto failed;
      }
      code = close(fd);
      if (code) {
! 	afs_com_err(whoami, errno, "failed to close %s after open", tfpath);
  	goto failed;
      }
  
***************
*** 735,745 ****
      /* go back to original privileges */
      code = ktc_SetToken(&server, &token, &client, 0);
      if (code) {
! 	com_err(whoami, code, "so couldn't set afs token in new pag");
  	exit(1);
      }
      if (unlink(tfpath) || rmdir(tdpath)) {
! 	com_err(whoami, errno, "removing test dir %s", tdpath);
  	return 1;
      }
      return exitCode;
--- 735,745 ----
      /* go back to original privileges */
      code = ktc_SetToken(&server, &token, &client, 0);
      if (code) {
! 	afs_com_err(whoami, code, "so couldn't set afs token in new pag");
  	exit(1);
      }
      if (unlink(tfpath) || rmdir(tdpath)) {
! 	afs_com_err(whoami, errno, "removing test dir %s", tdpath);
  	return 1;
      }
      return exitCode;
***************
*** 765,771 ****
  
      srandom(1);
  
!     /* Initialize com_err error code hacking */
      initialize_U_error_table();
      initialize_KA_error_table();
      initialize_RXK_error_table();
--- 765,771 ----
  
      srandom(1);
  
!     /* Initialize afs_com_err error code hacking */
      initialize_U_error_table();
      initialize_KA_error_table();
      initialize_RXK_error_table();
***************
*** 824,833 ****
      /* expand requested cell name */
      code = ka_CellConfig(AFSCONF_CLIENTNAME);
      if (code)
! 	com_err(whoami, code, "calling cell config");
      code = ka_ExpandCell(cell, cell, 0);
      if (code) {
! 	com_err(whoami, code, "expanding cell %s", cell);
  	exit(1);
      }
  
--- 824,833 ----
      /* expand requested cell name */
      code = ka_CellConfig(AFSCONF_CLIENTNAME);
      if (code)
! 	afs_com_err(whoami, code, "calling cell config");
      code = ka_ExpandCell(cell, cell, 0);
      if (code) {
! 	afs_com_err(whoami, code, "expanding cell %s", cell);
  	exit(1);
      }
  
***************
*** 837,843 ****
      if (printToken) {
  	code = ktc_GetToken(&server, &token, sizeof(token), &client);
  	if (code) {
! 	    com_err(whoami, code, "so couldn't get afs token");
  	    exit(1);
  	}
  	PrintAuthentication(stdout, &server, &token, &client);
--- 837,843 ----
      if (printToken) {
  	code = ktc_GetToken(&server, &token, sizeof(token), &client);
  	if (code) {
! 	    afs_com_err(whoami, code, "so couldn't get afs token");
  	    exit(1);
  	}
  	PrintAuthentication(stdout, &server, &token, &client);
***************
*** 867,873 ****
      memcpy(&ntoken, &token, sizeof(ntoken));
      code = ktc_SetToken(&server, &ntoken, &client, 0);
      if (code != KTC_NOCELL) {
! 	com_err(whoami, code,
  		"should have gotten bad pioctl error calling SetToken with bogus cell name");
  	goto failed;
      }
--- 867,873 ----
      memcpy(&ntoken, &token, sizeof(ntoken));
      code = ktc_SetToken(&server, &ntoken, &client, 0);
      if (code != KTC_NOCELL) {
! 	afs_com_err(whoami, code,
  		"should have gotten bad pioctl error calling SetToken with bogus cell name");
  	goto failed;
      }
***************
*** 876,882 ****
      ntoken.ticketLen = 0;
      code = ktc_SetToken(&server, &ntoken, &client, 0);
      if ((code != KTC_TOOBIG) && (code != KTC_PIOCTLFAIL)) {
! 	com_err(whoami, code,
  		"should have gotten error calling SetToken with zero ticket length");
  	goto failed;
      }
--- 876,882 ----
      ntoken.ticketLen = 0;
      code = ktc_SetToken(&server, &ntoken, &client, 0);
      if ((code != KTC_TOOBIG) && (code != KTC_PIOCTLFAIL)) {
! 	afs_com_err(whoami, code,
  		"should have gotten error calling SetToken with zero ticket length");
  	goto failed;
      }
***************
*** 884,890 ****
      ntoken.endTime = 0;
      code = ktc_SetToken(&server, &ntoken, &client, 0);
      if (code) {
! 	com_err(whoami, code, "calling SetToken with zero expiration time");
  	goto failed;
      }
      strcpy(nclient.name, "foo");
--- 884,890 ----
      ntoken.endTime = 0;
      code = ktc_SetToken(&server, &ntoken, &client, 0);
      if (code) {
! 	afs_com_err(whoami, code, "calling SetToken with zero expiration time");
  	goto failed;
      }
      strcpy(nclient.name, "foo");
***************
*** 892,898 ****
      strcpy(nclient.cell, "foo.bar.baz");
      code = ktc_SetToken(&server, &ntoken, &nclient, 0);
      if (code) {
! 	com_err(whoami, code, "calling SetToken with bogus client cell");
  	goto failed;
      }
      memcpy(&ntoken, &token, sizeof(ntoken));
--- 892,898 ----
      strcpy(nclient.cell, "foo.bar.baz");
      code = ktc_SetToken(&server, &ntoken, &nclient, 0);
      if (code) {
! 	afs_com_err(whoami, code, "calling SetToken with bogus client cell");
  	goto failed;
      }
      memcpy(&ntoken, &token, sizeof(ntoken));
Index: openafs/src/kauth/test/test_rxkad_free.c
diff -c openafs/src/kauth/test/test_rxkad_free.c:1.7.2.1 openafs/src/kauth/test/test_rxkad_free.c:1.7.2.2
*** openafs/src/kauth/test/test_rxkad_free.c:1.7.2.1	Mon May 30 00:57:34 2005
--- openafs/src/kauth/test/test_rxkad_free.c	Tue Apr 10 14:43:43 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/test/test_rxkad_free.c,v 1.7.2.1 2005/05/30 04:57:34 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/test/test_rxkad_free.c,v 1.7.2.2 2007/04/10 18:43:43 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 111,117 ****
  	    ka_ParseLoginName(as->parms[12].items->data, name, instance,
  			      newCell);
  	if (code) {
! 	    com_err(whoami, code, "parsing user's name '%s'",
  		    as->parms[12].items->data);
  	    return code;
  	}
--- 111,117 ----
  	    ka_ParseLoginName(as->parms[12].items->data, name, instance,
  			      newCell);
  	if (code) {
! 	    afs_com_err(whoami, code, "parsing user's name '%s'",
  		    as->parms[12].items->data);
  	    return code;
  	}
***************
*** 139,145 ****
  
      code = ka_ExpandCell(newCell, newCell, 0 /*local */ );
      if (code) {
! 	com_err(whoami, code, "Can't expand cell name");
  	return code;
      }
      cell = newCell;
--- 139,145 ----
  
      code = ka_ExpandCell(newCell, newCell, 0 /*local */ );
      if (code) {
! 	afs_com_err(whoami, code, "Can't expand cell name");
  	return code;
      }
      cell = newCell;
***************
*** 160,166 ****
  	else if (strlen(passwd) == 0)
  	    code = KANULLPASSWORD;
  	if (code) {
! 	    com_err(whoami, code, "reading password");
  	    return code;
  	}
      }
--- 160,166 ----
  	else if (strlen(passwd) == 0)
  	    code = KANULLPASSWORD;
  	if (code) {
! 	    afs_com_err(whoami, code, "reading password");
  	    return code;
  	}
      }
***************
*** 174,180 ****
  	ap[1] = "-servers";
  	code = ubik_ParseClientList(i, ap, serverList);
  	if (code) {
! 	    com_err(whoami, code, "could not parse server list");
  	    return code;
  	}
  	ka_ExplicitCell(cell, serverList);
--- 174,180 ----
  	ap[1] = "-servers";
  	code = ubik_ParseClientList(i, ap, serverList);
  	if (code) {
! 	    afs_com_err(whoami, code, "could not parse server list");
  	    return code;
  	}
  	ka_ExplicitCell(cell, serverList);
***************
*** 212,218 ****
  		ka_GetAdminToken(name, instance, cell, &key, 3600, &token,
  				 1 /*new */ );
  	    if (code) {
! 		com_err(whoami, code, "getting admin token");
  		return code;
  	    }
  	    pToken = &token;
--- 212,218 ----
  		ka_GetAdminToken(name, instance, cell, &key, 3600, &token,
  				 1 /*new */ );
  	    if (code) {
! 		afs_com_err(whoami, code, "getting admin token");
  		return code;
  	    }
  	    pToken = &token;
***************
*** 225,231 ****
  		ka_AuthServerConn(cell, KA_MAINTENANCE_SERVICE, pToken,
  				  &ubikConn);
  	    if (code) {
! 		com_err(whoami, code, "Getting AuthServer ubik conn");
  		return code;
  	    }
  
--- 225,231 ----
  		ka_AuthServerConn(cell, KA_MAINTENANCE_SERVICE, pToken,
  				  &ubikConn);
  	    if (code) {
! 		afs_com_err(whoami, code, "Getting AuthServer ubik conn");
  		return code;
  	    }
  
***************
*** 247,253 ****
  		ubik_Call(KAM_GetEntry, ubikConn, 0, name, instance,
  			  KAMAJORVERSION, &tentry);
  	    if (code) {
! 		com_err(whoami, code, "getting information for %s.%s", name,
  			instance);
  		return code;
  	    }
--- 247,253 ----
  		ubik_Call(KAM_GetEntry, ubikConn, 0, name, instance,
  			  KAMAJORVERSION, &tentry);
  	    if (code) {
! 		afs_com_err(whoami, code, "getting information for %s.%s", name,
  			instance);
  		return code;
  	    }
Index: openafs/src/libadmin/adminutil/afs_utilAdmin.c
diff -c openafs/src/libadmin/adminutil/afs_utilAdmin.c:1.7.2.2 openafs/src/libadmin/adminutil/afs_utilAdmin.c:1.7.2.3
*** openafs/src/libadmin/adminutil/afs_utilAdmin.c:1.7.2.2	Mon Jul 11 15:09:46 2005
--- openafs/src/libadmin/adminutil/afs_utilAdmin.c	Tue Apr 10 14:43:44 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/adminutil/afs_utilAdmin.c,v 1.7.2.2 2005/07/11 19:09:46 shadow Exp $");
  
  #include <afs/stds.h>
  #include <afs/afs_Admin.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/adminutil/afs_utilAdmin.c,v 1.7.2.3 2007/04/10 18:43:44 shadow Exp $");
  
  #include <afs/stds.h>
  #include <afs/afs_Admin.h>
***************
*** 104,110 ****
      if (!error_init_done)
  	pthread_once(&error_init_once, init_once);
      code = (afs_int32) errorCode;
!     *errorTextP = error_message(code);
      rc = 1;
  
    fail_util_AdminErrorCodeTranslate:
--- 104,110 ----
      if (!error_init_done)
  	pthread_once(&error_init_once, init_once);
      code = (afs_int32) errorCode;
!     *errorTextP = afs_error_message(code);
      rc = 1;
  
    fail_util_AdminErrorCodeTranslate:
Index: openafs/src/libadmin/client/afs_clientAdmin.c
diff -c openafs/src/libadmin/client/afs_clientAdmin.c:1.9.2.2 openafs/src/libadmin/client/afs_clientAdmin.c:1.9.2.3
*** openafs/src/libadmin/client/afs_clientAdmin.c:1.9.2.2	Thu Jul 21 00:57:17 2005
--- openafs/src/libadmin/client/afs_clientAdmin.c	Sun Jul 15 20:00:37 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/client/afs_clientAdmin.c,v 1.9.2.2 2005/07/21 04:57:17 shadow Exp $");
  
  #include <afs/stds.h>
  #include "afs_clientAdmin.h"
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/client/afs_clientAdmin.c,v 1.9.2.3 2007/07/16 00:00:37 jaltman Exp $");
  
  #include <afs/stds.h>
  #include "afs_clientAdmin.h"
***************
*** 193,199 ****
  	 * The token has been retrieved successfully, initialize
  	 * the rest of the token handle structure
  	 */
! 	strcpy(t_handle->cell, cellName);
  	t_handle->afs_token_set = 1;
  	t_handle->from_kernel = 1;
  	t_handle->kas_token_set = 0;
--- 193,200 ----
  	 * The token has been retrieved successfully, initialize
  	 * the rest of the token handle structure
  	 */
! 	strncpy(t_handle->cell, cellName, MAXCELLCHARS);
!         t_handle->cell[MAXCELLCHARS - 1] = '\0';
  	t_handle->afs_token_set = 1;
  	t_handle->from_kernel = 1;
  	t_handle->kas_token_set = 0;
***************
*** 568,574 ****
  
  	if ((GetAFSToken(cellName, principal, password, t_handle, &tst))
  	    && (GetKASToken(cellName, principal, password, t_handle, &tst))) {
! 	    strcpy(t_handle->cell, cellName);
  	    t_handle->from_kernel = 0;
  	    t_handle->afs_token_set = 1;
  	    t_handle->kas_token_set = 1;
--- 569,576 ----
  
  	if ((GetAFSToken(cellName, principal, password, t_handle, &tst))
  	    && (GetKASToken(cellName, principal, password, t_handle, &tst))) {
! 	    strncpy(t_handle->cell, cellName, MAXCELLCHARS);
!             t_handle->cell[MAXCELLCHARS - 1] = '\0';
  	    t_handle->from_kernel = 0;
  	    t_handle->afs_token_set = 1;
  	    t_handle->kas_token_set = 1;
***************
*** 868,874 ****
       * information for each server in the cell
       */
  
!     strcpy(c_handle->working_cell, cellName);
      if (!(tdir = afsconf_Open(AFSDIR_CLIENT_ETC_DIRPATH))) {
  	tst = ADMCLIENTBADCLIENTCONFIG;
  	goto fail_afsclient_CellOpen;
--- 870,877 ----
       * information for each server in the cell
       */
  
!     strncpy(c_handle->working_cell, cellName, MAXCELLCHARS);
!     c_handle->working_cell[MAXCELLCHARS - 1] = '\0';
      if (!(tdir = afsconf_Open(AFSDIR_CLIENT_ETC_DIRPATH))) {
  	tst = ADMCLIENTBADCLIENTCONFIG;
  	goto fail_afsclient_CellOpen;
***************
*** 878,884 ****
       * We must copy the cellName here because afsconf_GetCellInfo
       * actually writes over the cell name it is passed.
       */
!     strncpy(copyCell, cellName, MAXCELLCHARS - 1);
      for (i = 0; (i < NUM_SERVER_TYPES); i++) {
  	if (i == KAS) {
  	    tst =
--- 881,888 ----
       * We must copy the cellName here because afsconf_GetCellInfo
       * actually writes over the cell name it is passed.
       */
!     strncpy(copyCell, cellName, MAXCELLCHARS);
!     copyCell[MAXCELLCHARS - 1] ='\0';
      for (i = 0; (i < NUM_SERVER_TYPES); i++) {
  	if (i == KAS) {
  	    tst =
***************
*** 1963,1968 ****
--- 1967,1973 ----
  	if (host != NULL) {
  	    strncpy(serv->server[iserv].serverName, host->h_name,
  		    AFS_MAX_SERVER_NAME_LEN);
+             serv->server[iserv].serverName[AFS_MAX_SERVER_NAME_LEN - 1] = '\0';
  	}
      }
      UNLOCK_GLOBAL_MUTEX;
Index: openafs/src/libadmin/kas/afs_kasAdmin.c
diff -c openafs/src/libadmin/kas/afs_kasAdmin.c:1.9.2.3 openafs/src/libadmin/kas/afs_kasAdmin.c:1.9.2.4
*** openafs/src/libadmin/kas/afs_kasAdmin.c:1.9.2.3	Tue Aug 16 14:48:34 2005
--- openafs/src/libadmin/kas/afs_kasAdmin.c	Sun Jul 15 20:00:37 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/kas/afs_kasAdmin.c,v 1.9.2.3 2005/08/16 18:48:34 shadow Exp $");
  
  #include <stdio.h>
  
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/kas/afs_kasAdmin.c,v 1.9.2.4 2007/07/16 00:00:37 jaltman Exp $");
  
  #include <stdio.h>
  
***************
*** 35,42 ****
  
  #undef ENCRYPT
  
- extern int ubik_Call();
- 
  typedef struct {
      int begin_magic;
      int is_valid;
--- 35,40 ----
***************
*** 539,545 ****
      afs_cell_handle_p c_handle = (afs_cell_handle_p) cellHandle;
      kas_server_p k_handle = (kas_server_p) serverHandle;
      kas_server_t kaserver;
!     struct kas_encryptionKey key;
  
      /*
       * Validate input arguments and make rpc.
--- 537,544 ----
      afs_cell_handle_p c_handle = (afs_cell_handle_p) cellHandle;
      kas_server_p k_handle = (kas_server_p) serverHandle;
      kas_server_t kaserver;
!     EncryptionKey key;
!     struct kas_encryptionKey kas_key;
  
      /*
       * Validate input arguments and make rpc.
***************
*** 559,570 ****
  	goto fail_kas_PrincipalCreate;
      }
  
!     if (!kas_StringToKey(kaserver.cell, password, &key, &tst)) {
  	goto fail_kas_PrincipalCreate;
      }
  
      tst =
! 	ubik_Call(KAM_CreateUser, kaserver.servers, 0, who->principal,
  		  who->instance, key);
      if (tst) {
  	goto fail_kas_PrincipalCreate;
--- 558,571 ----
  	goto fail_kas_PrincipalCreate;
      }
  
!     if (!kas_StringToKey(kaserver.cell, password, &kas_key, &tst)) {
  	goto fail_kas_PrincipalCreate;
      }
  
+     memcpy(&key, &kas_key, sizeof(key));
+ 
      tst =
! 	ubik_KAM_CreateUser(kaserver.servers, 0, who->principal,
  		  who->instance, key);
      if (tst) {
  	goto fail_kas_PrincipalCreate;
***************
*** 624,630 ****
  	goto fail_kas_PrincipalDelete;
      }
      tst =
! 	ubik_Call(KAM_DeleteUser, kaserver.servers, 0, who->principal,
  		  who->instance);
      if (tst) {
  	goto fail_kas_PrincipalDelete;
--- 625,631 ----
  	goto fail_kas_PrincipalDelete;
      }
      tst =
! 	ubik_KAM_DeleteUser(kaserver.servers, 0, who->principal,
  		  who->instance);
      if (tst) {
  	goto fail_kas_PrincipalDelete;
***************
*** 802,808 ****
      }
  
      tst =
! 	ubik_Call(KAM_GetEntry, kaserver.servers, 0, who->principal,
  		  who->instance, KAMAJORVERSION, &entry);
      if (tst) {
  	goto fail_kas_PrincipalGet;
--- 803,809 ----
      }
  
      tst =
! 	ubik_KAM_GetEntry(kaserver.servers, 0, who->principal,
  		  who->instance, KAMAJORVERSION, &entry);
      if (tst) {
  	goto fail_kas_PrincipalGet;
***************
*** 858,865 ****
      principal_get_p prin = (principal_get_p) rpc_specific;
  
      tst =
! 	ubik_Call(KAM_ListEntry, prin->kaserver.servers, 0, prin->current,
! 		  &prin->next, &prin->count, &prin->principal[slot]);
      if (tst == 0) {
  	prin->current = prin->next;
  	if (prin->next == 0) {
--- 859,866 ----
      principal_get_p prin = (principal_get_p) rpc_specific;
  
      tst =
! 	ubik_KAM_ListEntry(prin->kaserver.servers, 0, prin->current,
!                            &prin->next, &prin->count, (kaident *)&prin->principal[slot]);
      if (tst == 0) {
  	prin->current = prin->next;
  	if (prin->next == 0) {
***************
*** 1109,1121 ****
  int ADMINAPI
  kas_PrincipalKeySet(const void *cellHandle, const void *serverHandle,
  		    const kas_identity_p who, int keyVersion,
! 		    const kas_encryptionKey_p key, afs_status_p st)
  {
      int rc = 0;
      afs_status_t tst = 0;
      afs_cell_handle_p c_handle = (afs_cell_handle_p) cellHandle;
      kas_server_p k_handle = (kas_server_p) serverHandle;
      kas_server_t kaserver;
  
      /*
       * Validate input arguments and make rpc.
--- 1110,1123 ----
  int ADMINAPI
  kas_PrincipalKeySet(const void *cellHandle, const void *serverHandle,
  		    const kas_identity_p who, int keyVersion,
! 		    const kas_encryptionKey_p kas_keyp, afs_status_p st)
  {
      int rc = 0;
      afs_status_t tst = 0;
      afs_cell_handle_p c_handle = (afs_cell_handle_p) cellHandle;
      kas_server_p k_handle = (kas_server_p) serverHandle;
      kas_server_t kaserver;
+     EncryptionKey key; 
  
      /*
       * Validate input arguments and make rpc.
***************
*** 1126,1132 ****
  	goto fail_kas_PrincipalKeySet;
      }
  
!     if (key == NULL) {
  	tst = ADMKASKEYNULL;
  	goto fail_kas_PrincipalKeySet;
      }
--- 1128,1134 ----
  	goto fail_kas_PrincipalKeySet;
      }
  
!     if (kas_keyp == NULL) {
  	tst = ADMKASKEYNULL;
  	goto fail_kas_PrincipalKeySet;
      }
***************
*** 1135,1143 ****
  	goto fail_kas_PrincipalKeySet;
      }
  
      tst =
! 	ubik_Call(KAM_SetPassword, kaserver.servers, 0, who->principal,
! 		  who->instance, keyVersion, *key);
      if (tst) {
  	goto fail_kas_PrincipalKeySet;
      }
--- 1137,1148 ----
  	goto fail_kas_PrincipalKeySet;
      }
  
+     memcpy(&key, kas_keyp, sizeof(key));
+ 
      tst =
! 	ubik_KAM_SetPassword(kaserver.servers, 0, who->principal,
! 		  who->instance, keyVersion, key);
!     memset(&key, 0, sizeof(key));
      if (tst) {
  	goto fail_kas_PrincipalKeySet;
      }
***************
*** 1311,1317 ****
      }
  
      tst =
! 	ubik_Call(KAM_GetEntry, kaserver.servers, 0, who->principal,
  		  who->instance, KAMAJORVERSION, &tentry);
      if (tst == 0) {
  	*cur_flags = tentry.flags;
--- 1316,1322 ----
      }
  
      tst =
! 	ubik_KAM_GetEntry(kaserver.servers, 0, who->principal,
  		  who->instance, KAMAJORVERSION, &tentry);
      if (tst == 0) {
  	*cur_flags = tentry.flags;
***************
*** 1518,1524 ****
  	    goto fail_kas_PrincipalFieldsSet;
  	}
  	tst =
! 	    ubik_Call(KAM_SetFields, kaserver.servers, 0, who->principal,
  		      who->instance, flags, expiration, lifetime, -1,
  		      was_spare, 0);
  	if (tst == 0) {
--- 1523,1529 ----
  	    goto fail_kas_PrincipalFieldsSet;
  	}
  	tst =
! 	    ubik_KAM_SetFields(kaserver.servers, 0, who->principal,
  		      who->instance, flags, expiration, lifetime, -1,
  		      was_spare, 0);
  	if (tst == 0) {
***************
*** 1584,1590 ****
      }
  
      tst =
! 	ubik_Call(KAM_GetStats, kaserver.servers, 0, KAMAJORVERSION, &admins,
  		  &statics, &dynamics);
      if (tst) {
  	goto fail_kas_ServerStatsGet;
--- 1589,1595 ----
      }
  
      tst =
! 	ubik_KAM_GetStats(kaserver.servers, 0, KAMAJORVERSION, &admins,
  		  &statics, &dynamics);
      if (tst) {
  	goto fail_kas_ServerStatsGet;
***************
*** 1672,1678 ****
      if (!ChooseValidServer(c_handle, k_handle, &kaserver, &tst)) {
  	goto fail_kas_ServerDebugGet;
      }
!     tst = ubik_Call(KAM_Debug, kaserver.servers, 0, KAMAJORVERSION, 0, &info);
      if (tst) {
  	goto fail_kas_ServerDebugGet;
      }
--- 1677,1683 ----
      if (!ChooseValidServer(c_handle, k_handle, &kaserver, &tst)) {
  	goto fail_kas_ServerDebugGet;
      }
!     tst = ubik_KAM_Debug(kaserver.servers, 0, KAMAJORVERSION, 0, &info);
      if (tst) {
  	goto fail_kas_ServerDebugGet;
      }
***************
*** 1741,1759 ****
  
  int ADMINAPI
  kas_ServerRandomKeyGet(const void *cellHandle, const void *serverHandle,
! 		       kas_encryptionKey_p key, afs_status_p st)
  {
      int rc = 0;
      afs_status_t tst = 0;
      afs_cell_handle_p c_handle = (afs_cell_handle_p) cellHandle;
      kas_server_p k_handle = (kas_server_p) serverHandle;
      kas_server_t kaserver;
  
      /*
       * Validate input arguments and make rpc.
       */
  
!     if (key == NULL) {
  	tst = ADMKASKEYNULL;
  	goto fail_kas_ServerRandomKeyGet;
      }
--- 1746,1765 ----
  
  int ADMINAPI
  kas_ServerRandomKeyGet(const void *cellHandle, const void *serverHandle,
! 		       kas_encryptionKey_p kas_keyp, afs_status_p st)
  {
      int rc = 0;
      afs_status_t tst = 0;
      afs_cell_handle_p c_handle = (afs_cell_handle_p) cellHandle;
      kas_server_p k_handle = (kas_server_p) serverHandle;
      kas_server_t kaserver;
+     EncryptionKey key;
  
      /*
       * Validate input arguments and make rpc.
       */
  
!     if (kas_keyp == NULL) {
  	tst = ADMKASKEYNULL;
  	goto fail_kas_ServerRandomKeyGet;
      }
***************
*** 1762,1771 ****
  	goto fail_kas_ServerRandomKeyGet;
      }
  
!     tst = ubik_Call(KAM_GetRandomKey, kaserver.servers, 0, key);
      if (tst) {
  	goto fail_kas_ServerRandomKeyGet;
      }
      rc = 1;
  
    fail_kas_ServerRandomKeyGet:
--- 1768,1778 ----
  	goto fail_kas_ServerRandomKeyGet;
      }
  
!     tst = ubik_KAM_GetRandomKey(kaserver.servers, 0, &key);
      if (tst) {
  	goto fail_kas_ServerRandomKeyGet;
      }
+     memcpy(kas_keyp, &key, sizeof(*kas_keyp));
      rc = 1;
  
    fail_kas_ServerRandomKeyGet:
Index: openafs/src/libadmin/pts/afs_ptsAdmin.c
diff -c openafs/src/libadmin/pts/afs_ptsAdmin.c:1.11 openafs/src/libadmin/pts/afs_ptsAdmin.c:1.11.2.1
*** openafs/src/libadmin/pts/afs_ptsAdmin.c:1.11	Fri Apr  2 01:54:15 2004
--- openafs/src/libadmin/pts/afs_ptsAdmin.c	Sun Jul 15 20:00:37 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/pts/afs_ptsAdmin.c,v 1.11 2004/04/02 06:54:15 jaltman Exp $");
  
  #include <stdio.h>
  
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/pts/afs_ptsAdmin.c,v 1.11.2.1 2007/07/16 00:00:37 jaltman Exp $");
  
  #include <stdio.h>
  
***************
*** 124,130 ****
  	}
      }
  
!     tst = ubik_Call(PR_NameToID, cellHandle->pts, 0, names, ids);
  
      if (tst) {
  	goto fail_TranslatePTSNames;
--- 124,130 ----
  	}
      }
  
!     tst = ubik_PR_NameToID(cellHandle->pts, 0, names, ids);
  
      if (tst) {
  	goto fail_TranslatePTSNames;
***************
*** 200,206 ****
--- 200,208 ----
      names.namelist_val = (prname *) & tmp_array[0];
  
      strncpy(names.namelist_val[0], id1, PTS_MAX_NAME_LEN);
+     names.namelist_val[0][PTS_MAX_NAME_LEN - 1] = '\0';
      strncpy(names.namelist_val[1], id2, PTS_MAX_NAME_LEN);
+     names.namelist_val[1][PTS_MAX_NAME_LEN - 1] = '\0';
      ids->idlist_val = 0;
      ids->idlist_len = 0;
  
***************
*** 277,283 ****
      names[0].namelist_len = 1;
      names[0].namelist_val = (prname *) & tmp_array[0];
  
!     strncpy(names[0].namelist_val, ptsName, PTS_MAX_NAME_LEN);
      ids.idlist_val = 0;
      ids.idlist_len = 0;
  
--- 279,286 ----
      names[0].namelist_len = 1;
      names[0].namelist_val = (prname *) & tmp_array[0];
  
!     strncpy((char *)names[0].namelist_val, ptsName, PTS_MAX_NAME_LEN);
!     ((char *)names[0].namelist_val)[PTS_MAX_NAME_LEN - 1] = '\0';
      ids.idlist_val = 0;
      ids.idlist_len = 0;
  
***************
*** 344,350 ****
      int rc = 0;
      afs_status_t tst = 0;
  
!     tst = ubik_Call(PR_IDToName, cellHandle->pts, 0, ids, names);
  
      if (tst) {
  	goto fail_TranslatePTSIds;
--- 347,353 ----
      int rc = 0;
      afs_status_t tst = 0;
  
!     tst = ubik_PR_IDToName(cellHandle->pts, 0, ids, names);
  
      if (tst) {
  	goto fail_TranslatePTSIds;
***************
*** 419,425 ****
       */
  
      tst =
! 	ubik_Call(PR_AddToGroup, c_handle->pts, 0, ids.idlist_val[0],
  		  ids.idlist_val[1]);
  
      if (tst != 0) {
--- 422,428 ----
       */
  
      tst =
! 	ubik_PR_AddToGroup(c_handle->pts, 0, ids.idlist_val[0],
  		  ids.idlist_val[1]);
  
      if (tst != 0) {
***************
*** 499,505 ****
       */
  
      tst =
! 	ubik_Call(PR_ChangeEntry, c_handle->pts, 0, ids.idlist_val[1], "",
  		  ids.idlist_val[0], 0);
  
      if (tst != 0) {
--- 502,508 ----
       */
  
      tst =
! 	ubik_PR_ChangeEntry(c_handle->pts, 0, ids.idlist_val[1], "",
  		  ids.idlist_val[0], 0);
  
      if (tst != 0) {
***************
*** 596,606 ****
  
      if (*newGroupId != 0) {
  	tst =
! 	    ubik_Call(PR_INewEntry, c_handle->pts, 0, newGroup, *newGroupId,
  		      newOwnerId);
      } else {
  	tst =
! 	    ubik_Call(PR_NewEntry, c_handle->pts, 0, newGroup, PRGRP,
  		      newOwnerId, newGroupId);
      }
  
--- 599,609 ----
  
      if (*newGroupId != 0) {
  	tst =
! 	    ubik_PR_INewEntry(c_handle->pts, 0, newGroup, *newGroupId,
  		      newOwnerId);
      } else {
  	tst =
! 	    ubik_PR_NewEntry(c_handle->pts, 0, newGroup, PRGRP,
  		      newOwnerId, newGroupId);
      }
  
***************
*** 722,728 ****
       * Retrieve information about the group
       */
  
!     tst = ubik_Call(PR_ListEntry, c_handle->pts, 0, groupId, &groupEntry);
  
      if (tst != 0) {
  	goto fail_pts_GroupGet;
--- 725,731 ----
       * Retrieve information about the group
       */
  
!     tst = ubik_PR_ListEntry(c_handle->pts, 0, groupId, &groupEntry);
  
      if (tst != 0) {
  	goto fail_pts_GroupGet;
***************
*** 732,738 ****
      groupP->nameUid = groupEntry.id;
      groupP->ownerUid = groupEntry.owner;
      groupP->creatorUid = groupEntry.creator;
!     strcpy(groupP->name, groupEntry.name);
      /*
       * Set the access rights based upon the value of the flags member
       * of the groupEntry struct.
--- 735,742 ----
      groupP->nameUid = groupEntry.id;
      groupP->ownerUid = groupEntry.owner;
      groupP->creatorUid = groupEntry.creator;
!     strncpy(groupP->name, groupEntry.name, PTS_MAX_NAME_LEN);
!     groupP->name[PTS_MAX_NAME_LEN - 1] = '\0';
      /*
       * Set the access rights based upon the value of the flags member
       * of the groupEntry struct.
***************
*** 821,828 ****
  	goto fail_pts_GroupGet;
      }
  
!     strcpy(groupP->owner, names.namelist_val[0]);
!     strcpy(groupP->creator, names.namelist_val[1]);
      free(names.namelist_val);
      rc = 1;
  
--- 825,834 ----
  	goto fail_pts_GroupGet;
      }
  
!     strncpy(groupP->owner, names.namelist_val[0], PTS_MAX_NAME_LEN);
!     groupP->owner[PTS_MAX_NAME_LEN - 1] = '\0';
!     strncpy(groupP->creator, names.namelist_val[1], PTS_MAX_NAME_LEN);
!     groupP->creator[PTS_MAX_NAME_LEN - 1] = '\0';
      free(names.namelist_val);
      rc = 1;
  
***************
*** 894,900 ****
       * Make the rpc
       */
  
!     tst = ubik_Call(PR_Delete, c_handle->pts, 0, entryId);
  
      if (tst != 0) {
  	goto fail_EntryDelete;
--- 900,906 ----
       * Make the rpc
       */
  
!     tst = ubik_PR_Delete(c_handle->pts, 0, entryId);
  
      if (tst != 0) {
  	goto fail_EntryDelete;
***************
*** 981,987 ****
  	goto fail_pts_GroupMaxGet;
      }
  
!     tst = ubik_Call(PR_ListMax, c_handle->pts, 0, &maxUserId, maxGroupId);
  
      if (tst != 0) {
  	goto fail_pts_GroupMaxGet;
--- 987,993 ----
  	goto fail_pts_GroupMaxGet;
      }
  
!     tst = ubik_PR_ListMax(c_handle->pts, 0, &maxUserId, maxGroupId);
  
      if (tst != 0) {
  	goto fail_pts_GroupMaxGet;
***************
*** 1031,1037 ****
  	goto fail_pts_GroupMaxSet;
      }
  
!     tst = ubik_Call(PR_SetMax, c_handle->pts, 0, maxGroupId, PRGRP);
  
      if (tst != 0) {
  	goto fail_pts_GroupMaxSet;
--- 1037,1043 ----
  	goto fail_pts_GroupMaxSet;
      }
  
!     tst = ubik_PR_SetMax(c_handle->pts, 0, maxGroupId, PRGRP);
  
      if (tst != 0) {
  	goto fail_pts_GroupMaxSet;
***************
*** 1202,1208 ****
      iter->ids.prlist_val = 0;
  
      tst =
! 	ubik_Call(PR_ListElements, c_handle->pts, 0, groupId, &iter->ids,
  		  &exceeded);
  
      if (tst != 0) {
--- 1208,1214 ----
      iter->ids.prlist_val = 0;
  
      tst =
! 	ubik_PR_ListElements(c_handle->pts, 0, groupId, &iter->ids,
  		  &exceeded);
  
      if (tst != 0) {
***************
*** 1510,1516 ****
       */
  
      tst =
! 	ubik_Call(PR_RemoveFromGroup, c_handle->pts, 0, ids.idlist_val[0],
  		  ids.idlist_val[1]);
  
      if (tst != 0) {
--- 1516,1522 ----
       */
  
      tst =
! 	ubik_PR_RemoveFromGroup(c_handle->pts, 0, ids.idlist_val[0],
  		  ids.idlist_val[1]);
  
      if (tst != 0) {
***************
*** 1592,1598 ****
       * Make the rpc
       */
  
!     tst = ubik_Call(PR_ChangeEntry, c_handle->pts, 0, groupId, newName, 0, 0);
  
      if (tst != 0) {
  	goto fail_pts_GroupRename;
--- 1598,1604 ----
       * Make the rpc
       */
  
!     tst = ubik_PR_ChangeEntry(c_handle->pts, 0, groupId, newName, 0, 0);
  
      if (tst != 0) {
  	goto fail_pts_GroupRename;
***************
*** 1751,1757 ****
       */
  
      tst =
! 	ubik_Call(PR_SetFieldsEntry, c_handle->pts, 0, groupId, PR_SF_ALLBITS,
  		  flags, 0, 0, 0, 0);
  
      if (tst != 0) {
--- 1757,1763 ----
       */
  
      tst =
! 	ubik_PR_SetFieldsEntry(c_handle->pts, 0, groupId, PR_SF_ALLBITS,
  		  flags, 0, 0, 0, 0);
  
      if (tst != 0) {
***************
*** 1823,1833 ****
  
      if (*newUserId != 0) {
  	tst =
! 	    ubik_Call(PR_INewEntry, c_handle->pts, 0, userName, *newUserId,
  		      0);
      } else {
  	tst =
! 	    ubik_Call(PR_NewEntry, c_handle->pts, 0, userName, 0, 0,
  		      newUserId);
      }
  
--- 1829,1839 ----
  
      if (*newUserId != 0) {
  	tst =
! 	    ubik_PR_INewEntry(c_handle->pts, 0, userName, *newUserId,
  		      0);
      } else {
  	tst =
! 	    ubik_PR_NewEntry(c_handle->pts, 0, userName, 0, 0,
  		      newUserId);
      }
  
***************
*** 1945,1951 ****
  	    goto fail_IsAdministrator;
  	}
  	tst =
! 	    ubik_Call(PR_IsAMemberOf, c_handle->pts, 0, userId, adminId,
  		      &isAdmin);
  	if (tst != 0) {
  	    goto fail_IsAdministrator;
--- 1951,1957 ----
  	    goto fail_IsAdministrator;
  	}
  	tst =
! 	    ubik_PR_IsAMemberOf(c_handle->pts, 0, userId, adminId,
  		      &isAdmin);
  	if (tst != 0) {
  	    goto fail_IsAdministrator;
***************
*** 2035,2041 ****
       * Retrieve information about the group
       */
  
!     tst = ubik_Call(PR_ListEntry, c_handle->pts, 0, userId, &userEntry);
  
      if (tst != 0) {
  	goto fail_pts_UserGet;
--- 2041,2047 ----
       * Retrieve information about the group
       */
  
!     tst = ubik_PR_ListEntry(c_handle->pts, 0, userId, &userEntry);
  
      if (tst != 0) {
  	goto fail_pts_UserGet;
***************
*** 2060,2066 ****
      userP->nameUid = userEntry.id;
      userP->ownerUid = userEntry.owner;
      userP->creatorUid = userEntry.creator;
!     strcpy(userP->name, userEntry.name);
  
      /*
       * The permission bits are described in the GroupGet function above.
--- 2066,2073 ----
      userP->nameUid = userEntry.id;
      userP->ownerUid = userEntry.owner;
      userP->creatorUid = userEntry.creator;
!     strncpy(userP->name, userEntry.name, PTS_MAX_NAME_LEN);
!     userP->name[PTS_MAX_NAME_LEN - 1] = '\0';
  
      /*
       * The permission bits are described in the GroupGet function above.
***************
*** 2104,2111 ****
  	goto fail_pts_UserGet;
      }
  
!     strcpy(userP->owner, names.namelist_val[0]);
!     strcpy(userP->creator, names.namelist_val[1]);
      free(names.namelist_val);
      rc = 1;
  
--- 2111,2120 ----
  	goto fail_pts_UserGet;
      }
  
!     strncpy(userP->owner, names.namelist_val[0], PTS_MAX_NAME_LEN);
!     userP->owner[PTS_MAX_NAME_LEN - 1] ='\0';
!     strncpy(userP->creator, names.namelist_val[1], PTS_MAX_NAME_LEN);
!     userP->creator[PTS_MAX_NAME_LEN - 1] = '\0';
      free(names.namelist_val);
      rc = 1;
  
***************
*** 2179,2185 ****
       * Make the rpc
       */
  
!     tst = ubik_Call(PR_ChangeEntry, c_handle->pts, 0, userId, newName, 0, 0);
  
      if (tst != 0) {
  	goto fail_pts_UserRename;
--- 2188,2194 ----
       * Make the rpc
       */
  
!     tst = ubik_PR_ChangeEntry(c_handle->pts, 0, userId, newName, 0, 0);
  
      if (tst != 0) {
  	goto fail_pts_UserRename;
***************
*** 2323,2329 ****
       */
  
      tst =
! 	ubik_Call(PR_SetFieldsEntry, c_handle->pts, 0, userId, mask, flags,
  		  newQuota, 0, 0, 0);
  
      if (tst != 0) {
--- 2332,2338 ----
       */
  
      tst =
! 	ubik_PR_SetFieldsEntry(c_handle->pts, 0, userId, mask, flags,
  		  newQuota, 0, 0, 0);
  
      if (tst != 0) {
***************
*** 2380,2386 ****
  	goto fail_pts_UserMaxGet;
      }
  
!     tst = ubik_Call(PR_ListMax, c_handle->pts, 0, maxUserId, &maxGroupId);
  
      if (tst != 0) {
  	goto fail_pts_UserMaxGet;
--- 2389,2395 ----
  	goto fail_pts_UserMaxGet;
      }
  
!     tst = ubik_PR_ListMax(c_handle->pts, 0, maxUserId, &maxGroupId);
  
      if (tst != 0) {
  	goto fail_pts_UserMaxGet;
***************
*** 2430,2436 ****
  	goto fail_pts_UserMaxSet;
      }
  
!     tst = ubik_Call(PR_SetMax, c_handle->pts, 0, maxUserId, 0);
  
      if (tst != 0) {
  	goto fail_pts_UserMaxSet;
--- 2439,2445 ----
  	goto fail_pts_UserMaxSet;
      }
  
!     tst = ubik_PR_SetMax(c_handle->pts, 0, maxUserId, 0);
  
      if (tst != 0) {
  	goto fail_pts_UserMaxSet;
***************
*** 2595,2601 ****
  
      if ((!list->finished_retrieving) && (list->owned_names.namelist_len == 0)) {
  	tst =
! 	    ubik_Call(PR_ListOwned, list->c_handle->pts, 0, list->owner,
  		      &list->owned_ids, &list->more);
  	if (tst != 0) {
  	    goto fail_GetOwnedGroupRPC;
--- 2604,2610 ----
  
      if ((!list->finished_retrieving) && (list->owned_names.namelist_len == 0)) {
  	tst =
! 	    ubik_PR_ListOwned(list->c_handle->pts, 0, list->owner,
  		      &list->owned_ids, &list->more);
  	if (tst != 0) {
  	    goto fail_GetOwnedGroupRPC;
***************
*** 2940,2946 ****
  	bulkentries.prentries_len = 0;
  
  	tst =
! 	    ubik_Call(PR_ListEntries, list->c_handle->pts, 0, list->flag,
  		      start, &bulkentries, &(list->nextstartindex));
  
  	if (tst != 0) {
--- 2949,2955 ----
  	bulkentries.prentries_len = 0;
  
  	tst =
! 	    ubik_PR_ListEntries(list->c_handle->pts, 0, list->flag,
  		      start, &bulkentries, &(list->nextstartindex));
  
  	if (tst != 0) {
Index: openafs/src/libadmin/pts/afs_ptsAdmin.h
diff -c openafs/src/libadmin/pts/afs_ptsAdmin.h:1.5 openafs/src/libadmin/pts/afs_ptsAdmin.h:1.5.2.1
*** openafs/src/libadmin/pts/afs_ptsAdmin.h:1.5	Tue Jul 15 19:15:31 2003
--- openafs/src/libadmin/pts/afs_ptsAdmin.h	Sun Jul 15 20:00:37 2007
***************
*** 13,20 ****
  #include <afs/param.h>
  #include <afs/afs_Admin.h>
  
! #define PTS_MAX_NAME_LEN 64
! #define PTS_MAX_GROUPS 5000
  
  typedef enum {
      PTS_USER_OWNER_ACCESS,
--- 13,20 ----
  #include <afs/param.h>
  #include <afs/afs_Admin.h>
  
! #define PTS_MAX_NAME_LEN 64     /* must equal PR_MAXNAMELEN */
! #define PTS_MAX_GROUPS 5000     /* must equal PR_MAXGROUPS */
  
  typedef enum {
      PTS_USER_OWNER_ACCESS,
Index: openafs/src/libadmin/vos/afs_vosAdmin.c
diff -c openafs/src/libadmin/vos/afs_vosAdmin.c:1.9.2.1 openafs/src/libadmin/vos/afs_vosAdmin.c:1.9.2.2
*** openafs/src/libadmin/vos/afs_vosAdmin.c:1.9.2.1	Tue Oct 25 02:35:55 2005
--- openafs/src/libadmin/vos/afs_vosAdmin.c	Sun Jul 15 20:00:38 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/vos/afs_vosAdmin.c,v 1.9.2.1 2005/10/25 06:35:55 shadow Exp $");
  
  #include <afs/stds.h>
  #include <stdio.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/vos/afs_vosAdmin.c,v 1.9.2.2 2007/07/16 00:00:38 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <stdio.h>
***************
*** 567,574 ****
      if (tst) {
  	goto fail_vos_PartitionGet;
      }
!     strcpy(partitionP->name, part_info.name);
!     strcpy(partitionP->deviceName, part_info.devName);
      partitionP->lockFileDescriptor = part_info.lock_fd;
      partitionP->totalSpace = part_info.minFree;
      partitionP->totalFreeSpace = part_info.free;
--- 567,576 ----
      if (tst) {
  	goto fail_vos_PartitionGet;
      }
!     strncpy(partitionP->name, part_info.name, VOS_MAX_PARTITION_NAME_LEN);
!     partitionP->name[VOS_MAX_PARTITION_NAME_LEN-1] = '\0';
!     strncpy(partitionP->deviceName, part_info.devName, VOS_MAX_PARTITION_NAME_LEN);
!     partitionP->deviceName[VOS_MAX_PARTITION_NAME_LEN-1] = '\0';
      partitionP->lockFileDescriptor = part_info.lock_fd;
      partitionP->totalSpace = part_info.minFree;
      partitionP->totalFreeSpace = part_info.free;
***************
*** 1215,1221 ****
  	    addr_multi.bulkaddrs_val = 0;
  	    addr_multi.bulkaddrs_len = 0;
  	    tst =
! 		ubik_Call(VL_GetAddrsU, serv->vldb, 0, &m_attrs, &m_uuid,
  			  &m_unique, &total_multi, &addr_multi);
  	    if (tst) {
  		goto fail_GetServerRPC;
--- 1217,1223 ----
  	    addr_multi.bulkaddrs_val = 0;
  	    addr_multi.bulkaddrs_len = 0;
  	    tst =
! 		ubik_VL_GetAddrsU(serv->vldb, 0, &m_attrs, &m_uuid,
  			  &m_unique, &total_multi, &addr_multi);
  	    if (tst) {
  		goto fail_GetServerRPC;
***************
*** 1880,1886 ****
  	dest->status |= VOS_VLDB_ENTRY_BACKEXISTS;
      }
  
!     strcpy(dest->name, source->name);
      for (i = 0; i < VOS_MAX_REPLICA_SITES; i++) {
  	dest->volumeSites[i].serverAddress = source->serverNumber[i];
  	dest->volumeSites[i].serverPartition = source->serverPartition[i];
--- 1882,1889 ----
  	dest->status |= VOS_VLDB_ENTRY_BACKEXISTS;
      }
  
!     strncpy(dest->name, source->name, VOS_MAX_VOLUME_NAME_LEN);
!     dest->name[VOS_MAX_VOLUME_NAME_LEN - 1] = '\0';
      for (i = 0; i < VOS_MAX_REPLICA_SITES; i++) {
  	dest->volumeSites[i].serverAddress = source->serverNumber[i];
  	dest->volumeSites[i].serverPartition = source->serverPartition[i];
***************
*** 2354,2360 ****
       */
  
      if (volumeId != NULL) {
! 	tst = ubik_Call(VL_DeleteEntry, c_handle->vos, 0, *volumeId, -1);
  	if (tst != 0) {
  	    goto fail_vos_VLDBEntryRemove;
  	}
--- 2357,2363 ----
       */
  
      if (volumeId != NULL) {
! 	tst = ubik_VL_DeleteEntry(c_handle->vos, 0, *volumeId, -1);
  	if (tst != 0) {
  	    goto fail_vos_VLDBEntryRemove;
  	}
***************
*** 2392,2399 ****
      }
  
      for (i = 0; i < nentries; i++) {
! 	ubik_Call(VL_DeleteEntry, c_handle->vos, 0,
! 		  entries.nbulkentries_val[i].volumeId[RWVOL]);
      }
      rc = 1;
  
--- 2395,2402 ----
      }
  
      for (i = 0; i < nentries; i++) {
! 	ubik_VL_DeleteEntry(c_handle->vos, 0,
! 		  entries.nbulkentries_val[i].volumeId[RWVOL], -1);
      }
      rc = 1;
  
***************
*** 2546,2552 ****
  	goto fail_vos_VLDBEntryLock;
      }
  
!     tst = ubik_Call(VL_SetLock, c_handle->vos, 0, volumeId, -1, VLOP_DELETE);
      if (tst != 0) {
  	goto fail_vos_VLDBEntryLock;
      }
--- 2549,2555 ----
  	goto fail_vos_VLDBEntryLock;
      }
  
!     tst = ubik_VL_SetLock(c_handle->vos, 0, volumeId, -1, VLOP_DELETE);
      if (tst != 0) {
  	goto fail_vos_VLDBEntryLock;
      }
***************
*** 2600,2606 ****
  
  
      tst =
! 	ubik_Call(VL_ReleaseLock, c_handle->vos, 0, volumeId, -1,
  		  LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
      if (tst != 0) {
  	goto fail_vos_VLDBEntryUnlock;
--- 2603,2609 ----
  
  
      tst =
! 	ubik_VL_ReleaseLock(c_handle->vos, 0, volumeId, -1,
  		  LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
      if (tst != 0) {
  	goto fail_vos_VLDBEntryUnlock;
***************
*** 3545,3551 ****
       */
  
      if (dest->status == VOS_OK) {
! 	strcpy(dest->name, source->name);
  	dest->id = source->volid;
  	if (source->type == 0) {
  	    dest->type = VOS_READ_WRITE_VOLUME;
--- 3548,3555 ----
       */
  
      if (dest->status == VOS_OK) {
! 	strncpy(dest->name, source->name, VOS_MAX_VOLUME_NAME_LEN);
!         dest->name[VOS_MAX_VOLUME_NAME_LEN - 1] = '\0';
  	dest->id = source->volid;
  	if (source->type == 0) {
  	    dest->type = VOS_READ_WRITE_VOLUME;
Index: openafs/src/libadmin/vos/vosutils.c
diff -c openafs/src/libadmin/vos/vosutils.c:1.10.2.2 openafs/src/libadmin/vos/vosutils.c:1.10.2.3
*** openafs/src/libadmin/vos/vosutils.c:1.10.2.2	Tue Oct 25 02:35:56 2005
--- openafs/src/libadmin/vos/vosutils.c	Sun Jul 15 20:00:38 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/vos/vosutils.c,v 1.10.2.2 2005/10/25 06:35:56 shadow Exp $");
  
  #include "vosutils.h"
  #include "vsprocs.h"
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/vos/vosutils.c,v 1.10.2.3 2007/07/16 00:00:38 jaltman Exp $");
  
  #include "vosutils.h"
  #include "vsprocs.h"
***************
*** 108,114 ****
  
      do {
  	if (cellHandle->vos_new) {
! 	    tst = ubik_Call(VL_CreateEntryN, cellHandle->vos, 0, entryp);
  	    if (tst) {
  		if (tst == RXGEN_OPCODE) {
  		    cellHandle->vos_new = 0;
--- 108,114 ----
  
      do {
  	if (cellHandle->vos_new) {
! 	    tst = ubik_VL_CreateEntryN(cellHandle->vos, 0, entryp);
  	    if (tst) {
  		if (tst == RXGEN_OPCODE) {
  		    cellHandle->vos_new = 0;
***************
*** 118,124 ****
  	    }
  	} else {
  	    if (NewVLDB_to_OldVLDB(entryp, &oentry, &tst)) {
! 		tst = ubik_Call(VL_CreateEntry, cellHandle->vos, 0, &oentry);
  		if (!tst) {
  		    rc = 1;
  		}
--- 118,124 ----
  	    }
  	} else {
  	    if (NewVLDB_to_OldVLDB(entryp, &oentry, &tst)) {
! 		tst = ubik_VL_CreateEntry(cellHandle->vos, 0, &oentry);
  		if (!tst) {
  		    rc = 1;
  		}
***************
*** 144,150 ****
      do {
  	if (cellHandle->vos_new) {
  	    tst =
! 		ubik_Call(VL_GetEntryByIDN, cellHandle->vos, 0, volid,
  			  voltype, entryp);
  	    if (tst) {
  		if (tst == RXGEN_OPCODE) {
--- 144,150 ----
      do {
  	if (cellHandle->vos_new) {
  	    tst =
! 		ubik_VL_GetEntryByIDN(cellHandle->vos, 0, volid,
  			  voltype, entryp);
  	    if (tst) {
  		if (tst == RXGEN_OPCODE) {
***************
*** 155,161 ****
  	    }
  	} else {
  	    tst =
! 		ubik_Call(VL_GetEntryByID, cellHandle->vos, 0, volid, voltype,
  			  &oentry);
  	    if (tst == 0) {
  		rc = OldVLDB_to_NewVLDB(&oentry, entryp, &tst);
--- 155,161 ----
  	    }
  	} else {
  	    tst =
! 		ubik_VL_GetEntryByID(cellHandle->vos, 0, volid, voltype,
  			  &oentry);
  	    if (tst == 0) {
  		rc = OldVLDB_to_NewVLDB(&oentry, entryp, &tst);
***************
*** 181,187 ****
      do {
  	if (cellHandle->vos_new) {
  	    tst =
! 		ubik_Call(VL_GetEntryByNameN, cellHandle->vos, 0, namep,
  			  entryp);
  	    if (tst) {
  		if (tst == RXGEN_OPCODE) {
--- 181,187 ----
      do {
  	if (cellHandle->vos_new) {
  	    tst =
! 		ubik_VL_GetEntryByNameN(cellHandle->vos, 0, namep,
  			  entryp);
  	    if (tst) {
  		if (tst == RXGEN_OPCODE) {
***************
*** 192,198 ****
  	    }
  	} else {
  	    tst =
! 		ubik_Call(VL_GetEntryByNameO, cellHandle->vos, 0, namep,
  			  &oentry);
  	    if (tst == 0) {
  		rc = OldVLDB_to_NewVLDB(&oentry, entryp, &tst);
--- 192,198 ----
  	    }
  	} else {
  	    tst =
! 		ubik_VL_GetEntryByNameO(cellHandle->vos, 0, namep,
  			  &oentry);
  	    if (tst == 0) {
  		rc = OldVLDB_to_NewVLDB(&oentry, entryp, &tst);
***************
*** 219,225 ****
      do {
  	if (cellHandle->vos_new) {
  	    tst =
! 		ubik_Call(VL_ReplaceEntryN, cellHandle->vos, 0, volid,
  			  voltype, entryp, releasetype);
  	    if (tst) {
  		if (tst == RXGEN_OPCODE) {
--- 219,225 ----
      do {
  	if (cellHandle->vos_new) {
  	    tst =
! 		ubik_VL_ReplaceEntryN(cellHandle->vos, 0, volid,
  			  voltype, entryp, releasetype);
  	    if (tst) {
  		if (tst == RXGEN_OPCODE) {
***************
*** 231,237 ****
  	} else {
  	    if (NewVLDB_to_OldVLDB(entryp, &oentry, &tst)) {
  		tst =
! 		    ubik_Call(VL_ReplaceEntry, cellHandle->vos, 0, volid,
  			      voltype, &oentry, releasetype);
  		if (!tst) {
  		    rc = 1;
--- 231,237 ----
  	} else {
  	    if (NewVLDB_to_OldVLDB(entryp, &oentry, &tst)) {
  		tst =
! 		    ubik_VL_ReplaceEntry(cellHandle->vos, 0, volid,
  			      voltype, &oentry, releasetype);
  		if (!tst) {
  		    rc = 1;
***************
*** 259,265 ****
      do {
  	if (cellHandle->vos_new) {
  	    tst =
! 		ubik_Call(VL_ListAttributesN, cellHandle->vos, 0, attrp,
  			  entriesp, blkentriesp);
  	    if (tst) {
  		if (tst == RXGEN_OPCODE) {
--- 259,265 ----
      do {
  	if (cellHandle->vos_new) {
  	    tst =
! 		ubik_VL_ListAttributesN(cellHandle->vos, 0, attrp,
  			  entriesp, blkentriesp);
  	    if (tst) {
  		if (tst == RXGEN_OPCODE) {
***************
*** 271,278 ****
  	} else {
  	    memset((void *)&arrayEntries, 0, sizeof(arrayEntries));
  	    tst =
! 		ubik_Call(VL_ListAttributes, cellHandle->vos, 0, attrp,
! 			  entriesp, arrayEntries);
  	    if (tst == 0) {
  		blkentriesp->nbulkentries_val =
  		    (nvldbentry *) malloc(*entriesp * sizeof(*blkentriesp));
--- 271,278 ----
  	} else {
  	    memset((void *)&arrayEntries, 0, sizeof(arrayEntries));
  	    tst =
! 		ubik_VL_ListAttributes(cellHandle->vos, 0, attrp,
! 			  entriesp, &arrayEntries);
  	    if (tst == 0) {
  		blkentriesp->nbulkentries_val =
  		    (nvldbentry *) malloc(*entriesp * sizeof(*blkentriesp));
***************
*** 312,318 ****
      afs_status_t tst = 0;
  
      tst =
! 	ubik_Call(VL_ListAttributesN2, cellHandle->vos, 0, attrp,
  		  (name ? name : ""), thisindex, nentriesp, blkentriesp,
  		  nextindexp);
      if (!tst) {
--- 312,318 ----
      afs_status_t tst = 0;
  
      tst =
! 	ubik_VL_ListAttributesN2(cellHandle->vos, 0, attrp,
  		  (name ? name : ""), thisindex, nentriesp, blkentriesp,
  		  nextindexp);
      if (!tst) {
***************
*** 351,357 ****
      memset(&addrs, 0, sizeof(addrs));
      memset(&uuid, 0, sizeof(uuid));
      tst =
! 	ubik_Call(VL_GetAddrsU, cellHandle->vos, 0, &attrs, &uuid, &unique,
  		  &nentries, &addrs);
      if (tst) {
  	*equal = 0;
--- 351,357 ----
      memset(&addrs, 0, sizeof(addrs));
      memset(&uuid, 0, sizeof(uuid));
      tst =
! 	ubik_VL_GetAddrsU(cellHandle->vos, 0, &attrs, &uuid, &unique,
  		  &nentries, &addrs);
      if (tst) {
  	*equal = 0;
***************
*** 517,523 ****
      char sname[32];
      size_t total;
  
!     strcpy(sname, name);
      total = strlen(sname);
      if ((total > 9) && (!strcmp(&sname[total - 9], ".readonly"))) {
  	/*discard the last 8 chars */
--- 517,524 ----
      char sname[32];
      size_t total;
  
!     strncpy(sname, name, 32);
!     sname[31] ='\0';
      total = strlen(sname);
      if ((total > 9) && (!strcmp(&sname[total - 9], ".readonly"))) {
  	/*discard the last 8 chars */
Index: openafs/src/libadmin/vos/vsprocs.c
diff -c openafs/src/libadmin/vos/vsprocs.c:1.11.2.1 openafs/src/libadmin/vos/vsprocs.c:1.11.2.3
*** openafs/src/libadmin/vos/vsprocs.c:1.11.2.1	Tue Oct 25 02:35:56 2005
--- openafs/src/libadmin/vos/vsprocs.c	Wed Jul 18 10:24:30 2007
***************
*** 22,28 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/vos/vsprocs.c,v 1.11.2.1 2005/10/25 06:35:56 shadow Exp $");
  
  #include "vsprocs.h"
  #include "vosutils.h"
--- 22,28 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/vos/vsprocs.c,v 1.11.2.3 2007/07/18 14:24:30 shadow Exp $");
  
  #include "vsprocs.h"
  #include "vosutils.h"
***************
*** 150,156 ****
      tstatus.maxquota = quota;
  
      /* next the next 3 available ids from the VLDB */
!     tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 3, volumeId);
      if (tst) {
  	goto fail_UV_CreateVolume;
      }
--- 150,156 ----
      tstatus.maxquota = quota;
  
      /* next the next 3 available ids from the VLDB */
!     tst = ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 3, volumeId);
      if (tst) {
  	goto fail_UV_CreateVolume;
      }
***************
*** 229,235 ****
  
      /* Find and read the VLDB entry for this volume */
      tst =
! 	ubik_Call(VL_SetLock, cellHandle->vos, 0, volumeId, avoltype,
  		  VLOP_DELETE);
      if (tst) {
  	if (tst != VL_NOENT) {
--- 229,235 ----
  
      /* Find and read the VLDB entry for this volume */
      tst =
! 	ubik_VL_SetLock(cellHandle->vos, 0, volumeId, avoltype,
  		  VLOP_DELETE);
      if (tst) {
  	if (tst != VL_NOENT) {
***************
*** 332,338 ****
      }
  
      if ((entry.nServers <= 0) || !(entry.flags & (RO_EXISTS | RW_EXISTS))) {
! 	tst = ubik_Call(VL_DeleteEntry, cellHandle->vos, 0, volumeId, vtype);
  	if (tst) {
  	    goto fail_UV_DeleteVolume;
  	}
--- 332,338 ----
      }
  
      if ((entry.nServers <= 0) || !(entry.flags & (RO_EXISTS | RW_EXISTS))) {
! 	tst = ubik_VL_DeleteEntry(cellHandle->vos, 0, volumeId, vtype);
  	if (tst) {
  	    goto fail_UV_DeleteVolume;
  	}
***************
*** 364,370 ****
  
      if (islocked) {
  	temp =
! 	    ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, volumeId, -1,
  		      (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
  	if (temp) {
  	    if (!tst)
--- 364,370 ----
  
      if (islocked) {
  	temp =
! 	    ubik_VL_ReleaseLock(cellHandle->vos, 0, volumeId, -1,
  		      (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
  	if (temp) {
  	    if (!tst)
***************
*** 437,443 ****
      }
  
      tst =
! 	ubik_Call(VL_SetLock, cellHandle->vos, 0, afromvol, RWVOL, VLOP_MOVE);
      if (tst) {
  	goto fail_UV_MoveVolume;
      }
--- 437,443 ----
      }
  
      tst =
! 	ubik_VL_SetLock(cellHandle->vos, 0, afromvol, RWVOL, VLOP_MOVE);
      if (tst) {
  	goto fail_UV_MoveVolume;
      }
***************
*** 454,460 ****
  	if (!Lp_Match(cellHandle, &entry, atoserver, atopart, &tst)) {
  	    /* the to server and partition do not exist in the vldb entry corresponding to volid */
  	    tst =
! 		ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, -1,
  			  (LOCKREL_OPCODE | LOCKREL_AFSID |
  			   LOCKREL_TIMESTAMP));
  	    if (tst) {
--- 454,460 ----
  	if (!Lp_Match(cellHandle, &entry, atoserver, atopart, &tst)) {
  	    /* the to server and partition do not exist in the vldb entry corresponding to volid */
  	    tst =
! 		ubik_VL_ReleaseLock(cellHandle->vos, 0, afromvol, -1,
  			  (LOCKREL_OPCODE | LOCKREL_AFSID |
  			   LOCKREL_TIMESTAMP));
  	    if (tst) {
***************
*** 561,567 ****
  
      /* Get a clone id */
      newVol = 0;
!     tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, &newVol);
      if (tst) {
  	goto fail_UV_MoveVolume;
      }
--- 561,567 ----
  
      /* Get a clone id */
      newVol = 0;
!     tst = ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 1, &newVol);
      if (tst) {
  	goto fail_UV_MoveVolume;
      }
***************
*** 824,830 ****
  
      if (islocked) {
  	etst =
! 	    ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, -1,
  		      (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
  	if (etst) {
  	    if (!tst)
--- 824,830 ----
  
      if (islocked) {
  	etst =
! 	    ubik_VL_ReleaseLock(cellHandle->vos, 0, afromvol, -1,
  		      (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
  	if (etst) {
  	    if (!tst)
***************
*** 878,884 ****
  
      /* unlock VLDB entry */
      if (islocked)
! 	ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, -1,
  		  (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
  
      if (clonetid)
--- 878,884 ----
  
      /* unlock VLDB entry */
      if (islocked)
! 	ubik_VL_ReleaseLock(cellHandle->vos, 0, afromvol, -1,
  		  (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
  
      if (clonetid)
***************
*** 962,968 ****
      }
  
      /* unlock VLDB entry */
!     ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, -1,
  	      (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
  
    done:			/* routine cleanup */
--- 962,968 ----
      }
  
      /* unlock VLDB entry */
!     ubik_VL_ReleaseLock(cellHandle->vos, 0, afromvol, -1,
  	      (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
  
    done:			/* routine cleanup */
***************
*** 1018,1024 ****
  	/* no assigned backup volume id */
  
  	tst =
! 	    ubik_Call(VL_SetLock, cellHandle->vos, 0, avolid, RWVOL,
  		      VLOP_BACKUP);
  	if (tst) {
  	    goto fail_UV_BackupVolume;
--- 1018,1024 ----
  	/* no assigned backup volume id */
  
  	tst =
! 	    ubik_VL_SetLock(cellHandle->vos, 0, avolid, RWVOL,
  		      VLOP_BACKUP);
  	if (tst) {
  	    goto fail_UV_BackupVolume;
***************
*** 1041,1047 ****
  	/* Get a backup volume id from the VLDB and update the vldb
  	 * entry with it. 
  	 */
! 	tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, &backupID);
  	if (tst) {
  	    goto fail_UV_BackupVolume;
  	}
--- 1041,1047 ----
  	/* Get a backup volume id from the VLDB and update the vldb
  	 * entry with it. 
  	 */
! 	tst = ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 1, &backupID);
  	if (tst) {
  	    goto fail_UV_BackupVolume;
  	}
***************
*** 1160,1166 ****
  	    }
  	} else {
  	    temp =
! 		ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, avolid, RWVOL,
  			  (LOCKREL_OPCODE | LOCKREL_AFSID |
  			   LOCKREL_TIMESTAMP));
  	    if (temp) {
--- 1160,1166 ----
  	    }
  	} else {
  	    temp =
! 		ubik_VL_ReleaseLock(cellHandle->vos, 0, avolid, RWVOL,
  			  (LOCKREL_OPCODE | LOCKREL_AFSID |
  			   LOCKREL_TIMESTAMP));
  	    if (temp) {
***************
*** 1223,1229 ****
      /* Get the RO volume id. Allocate a new one if need to */
      *rovidp = entry->volumeId[ROVOL];
      if (*rovidp == INVALID_BID) {
! 	tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, rovidp);
  	if (tst) {
  	    goto fail_CloneVol;
  	}
--- 1223,1229 ----
      /* Get the RO volume id. Allocate a new one if need to */
      *rovidp = entry->volumeId[ROVOL];
      if (*rovidp == INVALID_BID) {
! 	tst = ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 1, rovidp);
  	if (tst) {
  	    goto fail_CloneVol;
  	}
***************
*** 1495,1501 ****
      memset((char *)&results, 0, sizeof(results));
  
      tst =
! 	ubik_Call(VL_SetLock, cellHandle->vos, 0, afromvol, RWVOL,
  		  VLOP_RELEASE);
      if ((tst) && (tst != VL_RERELEASE)) {
  	goto fail_UV_ReleaseVolume;
--- 1495,1501 ----
      memset((char *)&results, 0, sizeof(results));
  
      tst =
! 	ubik_VL_SetLock(cellHandle->vos, 0, afromvol, RWVOL,
  		  VLOP_RELEASE);
      if ((tst) && (tst != VL_RERELEASE)) {
  	goto fail_UV_ReleaseVolume;
***************
*** 1544,1550 ****
      /* Make sure we have a RO volume id to work with */
      if (entry.volumeId[ROVOL] == INVALID_BID) {
  	/* need to get a new RO volume id */
! 	tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, &roVolId);
  	if (tst) {
  	    goto fail_UV_ReleaseVolume;
  	}
--- 1544,1550 ----
      /* Make sure we have a RO volume id to work with */
      if (entry.volumeId[ROVOL] == INVALID_BID) {
  	/* need to get a new RO volume id */
! 	tst = ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 1, &roVolId);
  	if (tst) {
  	    goto fail_UV_ReleaseVolume;
  	}
***************
*** 1969,1975 ****
      }
      if (islocked) {
  	tst =
! 	    ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (tst) {
  	    rc = 0;
--- 1969,1975 ----
      }
      if (islocked) {
  	tst =
! 	    ubik_VL_ReleaseLock(cellHandle->vos, 0, afromvol, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (tst) {
  	    rc = 0;
***************
*** 2154,2160 ****
  
      if (islocked) {
  	etst =
! 	    ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, -1,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (etst) {
  	    if (!tst)
--- 2154,2160 ----
  
      if (islocked) {
  	etst =
! 	    ubik_VL_ReleaseLock(cellHandle->vos, 0, afromvol, -1,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (etst) {
  	    if (!tst)
***************
*** 2332,2338 ****
  	aVLDB_GetEntryByName(cellHandle, tovolname, &entry, &tst);
  	if (tst == VL_NOENT) {
  	    tst =
! 		ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, &pvolid);
  	    if (tst) {
  		goto fail_UV_RestoreVolume;
  	    }
--- 2332,2338 ----
  	aVLDB_GetEntryByName(cellHandle, tovolname, &entry, &tst);
  	if (tst == VL_NOENT) {
  	    tst =
! 		ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 1, &pvolid);
  	    if (tst) {
  		goto fail_UV_RestoreVolume;
  	    }
***************
*** 2479,2485 ****
  	    islocked = 0;
  	} else {		/*update the existing entry */
  	    tst =
! 		ubik_Call(VL_SetLock, cellHandle->vos, 0, pvolid, RWVOL,
  			  VLOP_RESTORE);
  	    if (tst) {
  		goto fail_UV_RestoreVolume;
--- 2479,2485 ----
  	    islocked = 0;
  	} else {		/*update the existing entry */
  	    tst =
! 		ubik_VL_SetLock(cellHandle->vos, 0, pvolid, RWVOL,
  			  VLOP_RESTORE);
  	    if (tst) {
  		goto fail_UV_RestoreVolume;
***************
*** 2557,2563 ****
      }
      if (islocked) {
  	etst =
! 	    ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, pvolid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (etst) {
  	    if (!tst)
--- 2557,2563 ----
      }
      if (islocked) {
  	etst =
! 	    ubik_VL_ReleaseLock(cellHandle->vos, 0, pvolid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (etst) {
  	    if (!tst)
***************
*** 2607,2613 ****
      int same = 0;
  
      tst =
! 	ubik_Call(VL_SetLock, cellHandle->vos, 0, volid, RWVOL, VLOP_ADDSITE);
      if (tst) {
  	goto fail_UV_AddSite;
      }
--- 2607,2613 ----
      int same = 0;
  
      tst =
! 	ubik_VL_SetLock(cellHandle->vos, 0, volid, RWVOL, VLOP_ADDSITE);
      if (tst) {
  	goto fail_UV_AddSite;
      }
***************
*** 2665,2671 ****
  
      if (islocked) {
  	tst =
! 	    ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, volid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
      }
  
--- 2665,2671 ----
  
      if (islocked) {
  	tst =
! 	    ubik_VL_ReleaseLock(cellHandle->vos, 0, volid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
      }
  
***************
*** 2686,2692 ****
      int islocked = 0;
  
      tst =
! 	ubik_Call(VL_SetLock, cellHandle->vos, 0, volid, RWVOL, VLOP_ADDSITE);
      if (tst) {
  	goto fail_UV_RemoveSite;
      }
--- 2686,2692 ----
      int islocked = 0;
  
      tst =
! 	ubik_VL_SetLock(cellHandle->vos, 0, volid, RWVOL, VLOP_ADDSITE);
      if (tst) {
  	goto fail_UV_RemoveSite;
      }
***************
*** 2704,2710 ****
  	if ((entry.nServers == 1) && (entry.flags & RW_EXISTS))
  	    entry.flags &= ~RO_EXISTS;
  	if (entry.nServers < 1) {	/*this is the last ref */
! 	    tst = ubik_Call(VL_DeleteEntry, cellHandle->vos, 0, volid, ROVOL);
  	    if (tst) {
  		goto fail_UV_RemoveSite;
  	    }
--- 2704,2710 ----
  	if ((entry.nServers == 1) && (entry.flags & RW_EXISTS))
  	    entry.flags &= ~RO_EXISTS;
  	if (entry.nServers < 1) {	/*this is the last ref */
! 	    tst = ubik_VL_DeleteEntry(cellHandle->vos, 0, volid, ROVOL);
  	    if (tst) {
  		goto fail_UV_RemoveSite;
  	    }
***************
*** 2721,2727 ****
  
      if (islocked) {
  	afs_status_t t;
! 	t = ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, volid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (tst == 0) {
  	    tst = t;
--- 2721,2727 ----
  
      if (islocked) {
  	afs_status_t t;
! 	t = ubik_VL_ReleaseLock(cellHandle->vos, 0, volid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (tst == 0) {
  	    tst = t;
***************
*** 2957,2963 ****
      counter = 0;
  
      /* get the next  available id's from the vldb server */
!     vcode = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 0, &maxVolid);
      if (vcode) {
  	return (vcode);
      }
--- 2957,2963 ----
      counter = 0;
  
      /* get the next  available id's from the vldb server */
!     vcode = ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 0, &maxVolid);
      if (vcode) {
  	return (vcode);
      }
***************
*** 2979,2985 ****
  	    temp2 = elem.ids[RWVOL] - maxVolid + 1;
  	    maxVolid = 0;
  	    vcode =
! 		ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, temp2,
  			  &maxVolid);
  	    maxVolid += temp2;
  
--- 2979,2985 ----
  	    temp2 = elem.ids[RWVOL] - maxVolid + 1;
  	    maxVolid = 0;
  	    vcode =
! 		ubik_VL_GetNewVolumeId(cellHandle->vos, 0, temp2,
  			  &maxVolid);
  	    maxVolid += temp2;
  
***************
*** 2991,2997 ****
  	    temp2 = elem.ids[ROVOL] - maxVolid + 1;
  	    maxVolid = 0;
  	    vcode =
! 		ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, temp2,
  			  &maxVolid);
  	    maxVolid += temp2;
  
--- 2991,2997 ----
  	    temp2 = elem.ids[ROVOL] - maxVolid + 1;
  	    maxVolid = 0;
  	    vcode =
! 		ubik_VL_GetNewVolumeId(cellHandle->vos, 0, temp2,
  			  &maxVolid);
  	    maxVolid += temp2;
  
***************
*** 3001,3007 ****
  	    temp2 = elem.ids[BACKVOL] - temp1 + 1;
  	    maxVolid = 0;
  	    vcode =
! 		ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, temp2,
  			  &maxVolid);
  	    maxVolid += temp2;
  
--- 3001,3007 ----
  	    temp2 = elem.ids[BACKVOL] - temp1 + 1;
  	    maxVolid = 0;
  	    vcode =
! 		ubik_VL_GetNewVolumeId(cellHandle->vos, 0, temp2,
  			  &maxVolid);
  	    maxVolid += temp2;
  
***************
*** 3188,3194 ****
  		totalUE++;
  
  		vcode =
! 		    ubik_Call(VL_ReleaseLock, cellHandle->vos, 0,
  			      elem.ids[RWVOL], RWVOL,
  			      LOCKREL_OPCODE | LOCKREL_AFSID |
  			      LOCKREL_TIMESTAMP);
--- 3188,3194 ----
  		totalUE++;
  
  		vcode =
! 		    ubik_VL_ReleaseLock(cellHandle->vos, 0,
  			      elem.ids[RWVOL], RWVOL,
  			      LOCKREL_OPCODE | LOCKREL_AFSID |
  			      LOCKREL_TIMESTAMP);
***************
*** 3488,3494 ****
       */
      if (++pass == 2) {
  	tst =
! 	    ubik_Call(VL_SetLock, cellHandle->vos, 0, entry->volumeId[RWVOL],
  		      RWVOL, VLOP_DELETE);
  	if (tst) {
  	    goto fail_CheckVldb;
--- 3488,3494 ----
       */
      if (++pass == 2) {
  	tst =
! 	    ubik_VL_SetLock(cellHandle->vos, 0, entry->volumeId[RWVOL],
  		      RWVOL, VLOP_DELETE);
  	if (tst) {
  	    goto fail_CheckVldb;
***************
*** 3528,3534 ****
  	    && !(entry->flags & RO_EXISTS)) {
  	    /* The RW, BK, nor RO volumes do not exist. Delete the VLDB entry */
  	    tst =
! 		ubik_Call(VL_DeleteEntry, cellHandle->vos, 0,
  			  entry->volumeId[RWVOL], RWVOL);
  	    if (tst) {
  		goto fail_CheckVldb;
--- 3528,3534 ----
  	    && !(entry->flags & RO_EXISTS)) {
  	    /* The RW, BK, nor RO volumes do not exist. Delete the VLDB entry */
  	    tst =
! 		ubik_VL_DeleteEntry(cellHandle->vos, 0,
  			  entry->volumeId[RWVOL], RWVOL);
  	    if (tst) {
  		goto fail_CheckVldb;
***************
*** 3553,3562 ****
  
      if (islocked) {
  	vcode =
! 	    ubik_Call(VL_ReleaseLock, cellHandle->vos, 0,
! 		      entry->volumeId[RWVOL], RWVOL,
! 		      (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP),
! 		      &tst);
  	if (vcode) {
  	    if (!tst)
  		tst = vcode;
--- 3553,3561 ----
  
      if (islocked) {
  	vcode =
! 	    ubik_VL_ReleaseLock(cellHandle->vos, 0,
! 				entry->volumeId[RWVOL], RWVOL,
! 				(LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
  	if (vcode) {
  	    if (!tst)
  		tst = vcode;
***************
*** 3661,3667 ****
      tid = 0;
      islocked = 0;
  
!     tst = ubik_Call(VL_SetLock, cellHandle->vos, 0, entry->volumeId[RWVOL], RWVOL, VLOP_ADDSITE);	/*last param is dummy */
      if (tst) {
  	goto fail_UV_RenameVolume;
      }
--- 3660,3666 ----
      tid = 0;
      islocked = 0;
  
!     tst = ubik_VL_SetLock(cellHandle->vos, 0, entry->volumeId[RWVOL], RWVOL, VLOP_ADDSITE);	/*last param is dummy */
      if (tst) {
  	goto fail_UV_RenameVolume;
      }
***************
*** 3793,3799 ****
  
      if (islocked) {
  	etst =
! 	    ubik_Call(VL_ReleaseLock, cellHandle->vos, 0,
  		      entry->volumeId[RWVOL], RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (etst) {
--- 3792,3798 ----
  
      if (islocked) {
  	etst =
! 	    ubik_VL_ReleaseLock(cellHandle->vos, 0,
  		      entry->volumeId[RWVOL], RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (etst) {
Index: openafs/src/libafs/Makefile.common.in
diff -c openafs/src/libafs/Makefile.common.in:1.21.2.4 openafs/src/libafs/Makefile.common.in:1.21.2.5
*** openafs/src/libafs/Makefile.common.in:1.21.2.4	Tue Jun 20 17:40:46 2006
--- openafs/src/libafs/Makefile.common.in	Wed May 16 17:00:14 2007
***************
*** 47,54 ****
  	$(CC) $(COMMON_INCLUDE) $(CFLAGS) -P -c $<
  
  .c.o:
! 	$(CC) $(COMMON_INCLUDE) $(CFLAGS) $(CFLAGS-$@) $(KERN_DBG) -c $<
! CRULE_NOOPT=	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS) $(CFLAGS-$@) -o $@ -c $?
  CRULE_OPT=	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS) $(CFLAGS-$@) -o $@ -c $?
  
  system:	all
--- 47,54 ----
  	$(CC) $(COMMON_INCLUDE) $(CFLAGS) -P -c $<
  
  .c.o:
! 	$(CC) $(COMMON_INCLUDE) $(CFLAGS) $(CFLAGS-$(@)) $(KERN_DBG) -c $<
! CRULE_NOOPT=	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS) $(CFLAGS-$(@)) -o $@ -c $?
  CRULE_OPT=	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS) $(CFLAGS-$@) -o $@ -c $?
  
  system:	all
Index: openafs/src/libafs/MakefileProto.DARWIN.in
diff -c openafs/src/libafs/MakefileProto.DARWIN.in:1.21.2.5 openafs/src/libafs/MakefileProto.DARWIN.in:1.21.2.7
*** openafs/src/libafs/MakefileProto.DARWIN.in:1.21.2.5	Thu Mar  9 01:41:47 2006
--- openafs/src/libafs/MakefileProto.DARWIN.in	Tue Oct  9 17:32:01 2007
***************
*** 4,10 ****
  # This software has been released under the terms of the IBM Public
  # License.  For details, see the LICENSE file in the top-level source
  # directory or online at http://www.openafs.org/dl/license10.html
! # $Header: /cvs/openafs/src/libafs/MakefileProto.DARWIN.in,v 1.21.2.5 2006/03/09 06:41:47 shadow Exp $
  # 
  # MakefileProto for Digital Unix systems
  #
--- 4,10 ----
  # This software has been released under the terms of the IBM Public
  # License.  For details, see the LICENSE file in the top-level source
  # directory or online at http://www.openafs.org/dl/license10.html
! # $Header: /cvs/openafs/src/libafs/MakefileProto.DARWIN.in,v 1.21.2.7 2007/10/09 21:32:01 shadow Exp $
  # 
  # MakefileProto for Digital Unix systems
  #
***************
*** 33,60 ****
  KDEFS=
  DBUG = 
  DEFINES= -D_KERNEL -DKERNEL -DKERNEL_PRIVATE -DDIAGNOSTIC -DUSE_SELECT -DMACH_USER_API -DMACH_KERNEL
  <ppc_darwin_80 x86_darwin_80 ppc_darwin_90 x86_darwin_90>
! KOPTS_ppc=-static -g -nostdinc -nostdlib -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch ppc -Dppc -DPPC -D__PPC__ -DPAGE_SIZE_FIXED -mcpu=750 -mmultiple -fschedule-insns
! KOPTS_x86=-static -g -nostdinc -nostdlib -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch i386 -Di386 -DI386 -D__I386__ -DPAGE_SIZE_FIXED -march=i686 -mpreferred-stack-boundary=2 -falign-functions=4
  ARCH_ppc=$(shell echo "${ARCHFLAGS}" | grep -q -w ppc && echo yes)
  ARCH_x86=$(shell echo "${ARCHFLAGS}" | grep -q -w i386 && echo yes)
  ifeq ($(ARCH_ppc),yes)
  ifeq ($(ARCH_x86),yes)
! MODLD=$(CC) -static -g -nostdlib -arch ppc -arch i386
! CFLAGS_ppc=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS_ppc)
! CFLAGS_x86=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS_x86)
  else
! MODLD=$(CC) -static -g -nostdlib -arch ppc
  KOPTS=$(KOPTS_ppc)
  CFLAGS=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS)
  endif
  else
  ifeq ($(ARCH_x86),yes)
! MODLD=$(CC) -static -g -nostdlib -arch i386
  KOPTS=$(KOPTS_x86)
  else
  _ARCH=$(shell arch)
! MODLD=$(CC) -static -g -nostdlib -arch $(_ARCH)
  KOPTS=$(KOPTS_$(shell echo $(_ARCH) | sed 's/i386/x86/'))
  endif
  CFLAGS=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS)
--- 33,64 ----
  KDEFS=
  DBUG = 
  DEFINES= -D_KERNEL -DKERNEL -DKERNEL_PRIVATE -DDIAGNOSTIC -DUSE_SELECT -DMACH_USER_API -DMACH_KERNEL
+ <ppc_darwin_80 x86_darwin_80>
+ KOPTS_DBUG=-g
+ <ppc_darwin_90 x86_darwin_90>
+ KOPTS_DBUG=-ggdb
  <ppc_darwin_80 x86_darwin_80 ppc_darwin_90 x86_darwin_90>
! KOPTS_ppc=-static -nostdinc -nostdlib -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch ppc -Dppc -DPPC -D__PPC__ -DPAGE_SIZE_FIXED -mcpu=750 -mmultiple -fschedule-insns -force_cpusubtype_ALL
! KOPTS_x86=-static -nostdinc -nostdlib -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch i386 -Di386 -DI386 -D__I386__ -DPAGE_SIZE_FIXED -march=i686 -mpreferred-stack-boundary=2 -falign-functions=4
  ARCH_ppc=$(shell echo "${ARCHFLAGS}" | grep -q -w ppc && echo yes)
  ARCH_x86=$(shell echo "${ARCHFLAGS}" | grep -q -w i386 && echo yes)
  ifeq ($(ARCH_ppc),yes)
  ifeq ($(ARCH_x86),yes)
! MODLD=$(CC) -static $(KOPTS_DBUG) -nostdlib -arch ppc -arch i386
! CFLAGS_ppc=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS_ppc) $(KOPTS_DBUG)
! CFLAGS_x86=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS_x86) $(KOPTS_DBUG)
  else
! MODLD=$(CC) -static $(KOPTS_DBUG) -nostdlib -arch ppc
  KOPTS=$(KOPTS_ppc)
  CFLAGS=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS)
  endif
  else
  ifeq ($(ARCH_x86),yes)
! MODLD=$(CC) -static $(KOPTS_DBUG) -nostdlib -arch i386
  KOPTS=$(KOPTS_x86)
  else
  _ARCH=$(shell arch)
! MODLD=$(CC) -static $(KOPTS_DBUG) -nostdlib -arch $(_ARCH)
  KOPTS=$(KOPTS_$(shell echo $(_ARCH) | sed 's/i386/x86/'))
  endif
  CFLAGS=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS)
***************
*** 141,146 ****
--- 145,156 ----
  
  ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
  	$(MODLD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS} -lcc_kext
+ <ppc_darwin_90 x86_darwin_90>
+ 	dsymutil -o ${LIBAFS}.dSYM ${LIBAFS}
+ <all>
  
  ${LIBAFSNONFS}:  $(AFSAOBJS) $(AFSNONFSOBJS)
  	$(MODLD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS} -lcc_kext
+ <ppc_darwin_90 x86_darwin_90>
+ 	dsymutil -o ${LIBAFSNONFS}.dSYM ${LIBAFSNONFS}
+ <all>
Index: openafs/src/libafs/MakefileProto.SOLARIS.in
diff -c openafs/src/libafs/MakefileProto.SOLARIS.in:1.24.2.3 openafs/src/libafs/MakefileProto.SOLARIS.in:1.24.2.4
*** openafs/src/libafs/MakefileProto.SOLARIS.in:1.24.2.3	Thu Dec 28 16:59:45 2006
--- openafs/src/libafs/MakefileProto.SOLARIS.in	Tue Jun  5 13:12:51 2007
***************
*** 33,39 ****
  KDEFS= -D_KERNEL -DSYSV -dn ${ARCH_DEFS}
  
  <sun4x_57 sun4x_58 sun4x_59 sun4x_510 sun4x_511>
! KDEFS_32 = 
  KDEFS_64 = -xarch=v9 
  
  <sunx86_57 sunx86_58 sunx86_59 sunx86_510 sunx86_511>
--- 33,39 ----
  KDEFS= -D_KERNEL -DSYSV -dn ${ARCH_DEFS}
  
  <sun4x_57 sun4x_58 sun4x_59 sun4x_510 sun4x_511>
! KDEFS_32 = -xarch=v8
  KDEFS_64 = -xarch=v9 
  
  <sunx86_57 sunx86_58 sunx86_59 sunx86_510 sunx86_511>
Index: openafs/src/libafs/afs.ppc_darwin_12.plist.in
diff -c openafs/src/libafs/afs.ppc_darwin_12.plist.in:1.1 openafs/src/libafs/afs.ppc_darwin_12.plist.in:1.1.10.1
*** openafs/src/libafs/afs.ppc_darwin_12.plist.in:1.1	Wed Sep 12 01:00:53 2001
--- openafs/src/libafs/afs.ppc_darwin_12.plist.in	Thu Oct 11 13:32:54 2007
***************
*** 15,25 ****
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>@VERSION@</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>@VERSION@</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kernel.bsd</key>
--- 15,25 ----
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>@MACOS_VERSION@</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>@MACOS_VERSION@</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kernel.bsd</key>
Index: openafs/src/libafs/afs.ppc_darwin_13.plist.in
diff -c openafs/src/libafs/afs.ppc_darwin_13.plist.in:1.1 openafs/src/libafs/afs.ppc_darwin_13.plist.in:1.1.10.1
*** openafs/src/libafs/afs.ppc_darwin_13.plist.in:1.1	Wed Sep 12 01:00:53 2001
--- openafs/src/libafs/afs.ppc_darwin_13.plist.in	Thu Oct 11 13:32:54 2007
***************
*** 15,25 ****
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>@VERSION@</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>@VERSION@</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kernel.bsd</key>
--- 15,25 ----
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>@MACOS_VERSION@</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>@MACOS_VERSION@</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kernel.bsd</key>
Index: openafs/src/libafs/afs.ppc_darwin_14.plist.in
diff -c openafs/src/libafs/afs.ppc_darwin_14.plist.in:1.2 openafs/src/libafs/afs.ppc_darwin_14.plist.in:1.2.8.1
*** openafs/src/libafs/afs.ppc_darwin_14.plist.in:1.2	Sat Nov 10 18:20:21 2001
--- openafs/src/libafs/afs.ppc_darwin_14.plist.in	Thu Oct 11 13:32:54 2007
***************
*** 15,25 ****
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>@VERSION@</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>@VERSION@</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kernel.bsd</key>
--- 15,25 ----
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>@MACOS_VERSION@</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>@MACOS_VERSION@</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kernel.bsd</key>
Index: openafs/src/libafs/afs.ppc_darwin_60.plist.in
diff -c openafs/src/libafs/afs.ppc_darwin_60.plist.in:1.1 openafs/src/libafs/afs.ppc_darwin_60.plist.in:1.1.8.1
*** openafs/src/libafs/afs.ppc_darwin_60.plist.in:1.1	Wed Aug 21 18:07:54 2002
--- openafs/src/libafs/afs.ppc_darwin_60.plist.in	Thu Oct 11 13:32:54 2007
***************
*** 15,25 ****
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>@VERSION@</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>@VERSION@</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kernel.bsd</key>
--- 15,25 ----
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>@MACOS_VERSION@</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>@MACOS_VERSION@</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kernel.bsd</key>
Index: openafs/src/libafs/afs.ppc_darwin_70.plist.in
diff -c openafs/src/libafs/afs.ppc_darwin_70.plist.in:1.2.2.21 openafs/src/libafs/afs.ppc_darwin_70.plist.in:1.2.2.23
*** openafs/src/libafs/afs.ppc_darwin_70.plist.in:1.2.2.21	Mon Mar 19 20:54:11 2007
--- openafs/src/libafs/afs.ppc_darwin_70.plist.in	Thu Oct 11 13:32:54 2007
***************
*** 15,25 ****
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.4</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>1.4.4</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kernel.bsd</key>
--- 15,25 ----
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>@MACOS_VERSION@</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>@MACOS_VERSION@</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.16 openafs/src/libafs/afs.ppc_darwin_80.plist.in:1.1.2.18
*** openafs/src/libafs/afs.ppc_darwin_80.plist.in:1.1.2.16	Mon Mar 19 20:54:11 2007
--- openafs/src/libafs/afs.ppc_darwin_80.plist.in	Thu Oct 11 13:32:54 2007
***************
*** 15,25 ****
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.4</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>1.4.4</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kpi.bsd</key>
--- 15,25 ----
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>@MACOS_VERSION@</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>@MACOS_VERSION@</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.15 openafs/src/libafs/afs.ppc_darwin_90.plist.in:1.1.2.17
*** openafs/src/libafs/afs.ppc_darwin_90.plist.in:1.1.2.15	Mon Mar 19 20:54:11 2007
--- openafs/src/libafs/afs.ppc_darwin_90.plist.in	Thu Oct 11 13:32:54 2007
***************
*** 15,25 ****
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.4</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>1.4.4</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kpi.bsd</key>
--- 15,25 ----
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>@MACOS_VERSION@</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>@MACOS_VERSION@</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.15 openafs/src/libafs/afs.x86_darwin_80.plist.in:1.1.2.17
*** openafs/src/libafs/afs.x86_darwin_80.plist.in:1.1.2.15	Mon Mar 19 20:54:11 2007
--- openafs/src/libafs/afs.x86_darwin_80.plist.in	Thu Oct 11 13:32:54 2007
***************
*** 15,25 ****
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.4</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>1.4.4</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kpi.bsd</key>
--- 15,25 ----
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>@MACOS_VERSION@</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>@MACOS_VERSION@</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.15 openafs/src/libafs/afs.x86_darwin_90.plist.in:1.1.2.17
*** openafs/src/libafs/afs.x86_darwin_90.plist.in:1.1.2.15	Mon Mar 19 20:54:11 2007
--- openafs/src/libafs/afs.x86_darwin_90.plist.in	Thu Oct 11 13:32:54 2007
***************
*** 15,25 ****
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.4</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>1.4.4</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kpi.bsd</key>
--- 15,25 ----
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>@MACOS_VERSION@</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>@MACOS_VERSION@</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kpi.bsd</key>
Index: openafs/src/libafs/make_kbuild_makefile.pl
diff -c openafs/src/libafs/make_kbuild_makefile.pl:1.1.2.1 openafs/src/libafs/make_kbuild_makefile.pl:1.1.2.2
*** openafs/src/libafs/make_kbuild_makefile.pl:1.1.2.1	Sun Apr  3 15:32:41 2005
--- openafs/src/libafs/make_kbuild_makefile.pl	Mon Jun  4 23:56:14 2007
***************
*** 79,85 ****
  foreach (@objects) {
    die "No source known for $_\n" unless exists $deps{$_};
    if($deps{$_} =~ /\.s$/) {
!      ($src = $_) =~ s/\.o$/.s/;
    } else {
       ($src = $_) =~ s/\.o$/.c/;
    }
--- 79,85 ----
  foreach (@objects) {
    die "No source known for $_\n" unless exists $deps{$_};
    if($deps{$_} =~ /\.s$/) {
!      ($src = $_) =~ s/\.o$/.S/;
    } else {
       ($src = $_) =~ s/\.o$/.c/;
    }
Index: openafs/src/libafsauthent/afsauthent.def
diff -c openafs/src/libafsauthent/afsauthent.def:1.3.2.3 openafs/src/libafsauthent/afsauthent.def:1.3.2.4
*** openafs/src/libafsauthent/afsauthent.def:1.3.2.3	Wed Aug 30 00:41:44 2006
--- openafs/src/libafsauthent/afsauthent.def	Tue Apr 10 18:31:36 2007
***************
*** 63,69 ****
  	pr_GetCPS					@62
  	pr_Initialize					@63
  	pr_GetHostCPS					@64
! 	afs_krb_get_lrealm				@65
  	pr_NameToId					@66
  	pr_IdToName					@67
  	afs_gettimeofday				@68
--- 63,69 ----
  	pr_GetCPS					@62
  	pr_Initialize					@63
  	pr_GetHostCPS					@64
! ;	afs_krb_get_lrealm				@65
  	pr_NameToId					@66
  	pr_IdToName					@67
  	afs_gettimeofday				@68
Index: openafs/src/libafsrpc/afsrpc.def
diff -c openafs/src/libafsrpc/afsrpc.def:1.3.2.8 openafs/src/libafsrpc/afsrpc.def:1.3.2.10
*** openafs/src/libafsrpc/afsrpc.def:1.3.2.8	Tue Jun 20 17:00:18 2006
--- openafs/src/libafsrpc/afsrpc.def	Tue Apr 10 18:07:22 2007
***************
*** 68,75 ****
  	xdrrx_create				@72
  	hton_syserr_conv			@73
  	rxkad_global_stats			@74 DATA
! 	com_err					@75
! 	error_message				@76
  	rx_socket				@77 DATA
  ;	AssertionFailed				@79
  	afs_winsockInit				@80
--- 68,75 ----
  	xdrrx_create				@72
  	hton_syserr_conv			@73
  	rxkad_global_stats			@74 DATA
! 	afs_com_err					@75
! 	afs_error_message				@76
  	rx_socket				@77 DATA
  ;	AssertionFailed				@79
  	afs_winsockInit				@80
***************
*** 92,98 ****
  	multi_Select				@97
  	multi_Init				@98
  	multi_Finalize_Ignore			@99
! 	add_to_error_table			@100
  	xdr_afsUUID				@101
  	rx_GetSpecific				@102
  	rx_SetSpecific				@103
--- 92,98 ----
  	multi_Select				@97
  	multi_Init				@98
  	multi_Finalize_Ignore			@99
! 	afs_add_to_error_table			@100
  	xdr_afsUUID				@101
  	rx_GetSpecific				@102
  	rx_SetSpecific				@103
Index: openafs/src/libafsrpc/afsrpc.exp
diff -c openafs/src/libafsrpc/afsrpc.exp:1.2.18.1 openafs/src/libafsrpc/afsrpc.exp:1.2.18.2
*** openafs/src/libafsrpc/afsrpc.exp:1.2.18.1	Mon May 30 00:57:35 2005
--- openafs/src/libafsrpc/afsrpc.exp	Tue Apr 10 14:43:44 2007
***************
*** 84,91 ****
  rxkad_stats_key
  _et_list
  et_list_mutex
! com_err
! error_message
  rx_socket
  des_pcbc_init
  rx_BusyError
--- 84,91 ----
  rxkad_stats_key
  _et_list
  et_list_mutex
! afs_com_err
! afs_error_message
  rx_socket
  des_pcbc_init
  rx_BusyError
Index: openafs/src/log/Makefile.in
diff -c openafs/src/log/Makefile.in:1.7 openafs/src/log/Makefile.in:1.7.2.1
*** openafs/src/log/Makefile.in:1.7	Sat Jan 11 02:34:43 2003
--- openafs/src/log/Makefile.in	Sun Aug 19 18:31:27 2007
***************
*** 8,14 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! PROGRAMS=	unlog tokens tokens.krb kseal
  
  INCLS=${TOP_INCDIR}/afs/auth.h ${TOP_INCDIR}/rx/rx.h \
  ${TOP_INCDIR}/rx/xdr.h ${TOP_INCDIR}/des.h ${TOP_INCDIR}/rx/rxkad.h \
--- 8,14 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! PROGRAMS=	unlog tokens tokens.krb
  
  INCLS=${TOP_INCDIR}/afs/auth.h ${TOP_INCDIR}/rx/rx.h \
  ${TOP_INCDIR}/rx/xdr.h ${TOP_INCDIR}/des.h ${TOP_INCDIR}/rx/rxkad.h \
***************
*** 32,38 ****
  #
  # Main targets
  #
! all: unlog tokens tokens.krb kseal
  
  #
  # Build targets
--- 32,38 ----
  #
  # Main targets
  #
! all: unlog tokens tokens.krb
  
  #
  # Build targets
***************
*** 67,74 ****
  	${DESTDIR}${bindir}/tokens \
  	${DESTDIR}${bindir}/tokens.krb \
  	${DESTDIR}${afssrvbindir}/tokens \
! 	${DESTDIR}${afssrvbindir}/tokens.krb \
! 	${DESTDIR}${sbindir}/kseal
  
  ${DEST}/bin/unlog: unlog
  	${INSTALL} $? $@
--- 67,73 ----
  	${DESTDIR}${bindir}/tokens \
  	${DESTDIR}${bindir}/tokens.krb \
  	${DESTDIR}${afssrvbindir}/tokens \
! 	${DESTDIR}${afssrvbindir}/tokens.krb
  
  ${DEST}/bin/unlog: unlog
  	${INSTALL} $? $@
***************
*** 122,127 ****
  	${DEST}/bin/tokens \
  	${DEST}/bin/tokens.krb \
  	${DEST}/root.server/usr/afs/bin/tokens \
! 	${DEST}/root.server/usr/afs/bin/tokens.krb \
! 	${DEST}/etc/kseal
  
--- 121,125 ----
  	${DEST}/bin/tokens \
  	${DEST}/bin/tokens.krb \
  	${DEST}/root.server/usr/afs/bin/tokens \
! 	${DEST}/root.server/usr/afs/bin/tokens.krb
  
Index: openafs/src/lwp/lwp.c
diff -c openafs/src/lwp/lwp.c:1.27.2.7 openafs/src/lwp/lwp.c:1.27.2.8
*** openafs/src/lwp/lwp.c:1.27.2.7	Thu Mar  9 01:41:50 2006
--- openafs/src/lwp/lwp.c	Wed Jun  6 13:23:24 2007
***************
*** 17,23 ****
  #include <afsconfig.h>
  #include <afs/param.h>
  
! RCSID("$Header: /cvs/openafs/src/lwp/lwp.c,v 1.27.2.7 2006/03/09 06:41:50 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
--- 17,23 ----
  #include <afsconfig.h>
  #include <afs/param.h>
  
! RCSID("$Header: /cvs/openafs/src/lwp/lwp.c,v 1.27.2.8 2007/06/06 17:23:24 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
***************
*** 33,38 ****
--- 33,39 ----
  #include <sys/pseg.h>
  #include <sys/core.h>
  #pragma alloca
+ int setlim(int limcon, uchar_t hard, int limit);
  #endif
  #ifdef AFS_SGI64_ENV
  extern char *getenv();
Index: openafs/src/lwp/process.c
diff -c openafs/src/lwp/process.c:1.21.2.2 openafs/src/lwp/process.c:1.21.2.4
*** openafs/src/lwp/process.c:1.21.2.2	Fri Mar 31 00:53:01 2006
--- openafs/src/lwp/process.c	Mon Jul 16 23:13:59 2007
***************
*** 13,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/lwp/process.c,v 1.21.2.2 2006/03/31 05:53:01 shadow Exp $");
  
  #include <stdio.h>
  #include <assert.h>
--- 13,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/lwp/process.c,v 1.21.2.4 2007/07/17 03:13:59 shadow Exp $");
  
  #include <stdio.h>
  #include <assert.h>
***************
*** 142,147 ****
--- 142,176 ----
  static int rc;
  static jmp_buf_type *jmpBuffer;
  
+ /** Starting with Glibc 2.4 pointers in jmp_buf are mangled (XOR) for "protection".
+   * On Sparc ucontext functions are not implemented.
+   */
+ #define ptr_mangle(x) (x)
+ #ifdef AFS_LINUX20_ENV
+ 
+ #ifdef __GLIBC__
+ #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
+ 
+ #if defined(AFS_SPARC64_LINUX24_ENV) || defined(AFS_SPARC_LINUX24_ENV)
+ /* technically we should use POINTER_GUARD 
+  * ( == offsetof (tcbhead_t, pointer_guard) )
+  * instead of 0x18
+  */
+ #undef ptr_mangle
+ static int ptr_mangle(int p)
+ {   
+     register char *tls_ptr __asm__("%g7");
+     return p ^ *(int*)(tls_ptr + 0x18);
+ }
+ #else
+ #error need ptr_mangle support or use UCONTEXT
+ #endif
+ 
+ #endif
+ #endif
+ #endif
+ 
+ 
  afs_int32
  savecontext(ep, savearea, sp)
       char (*ep) ();
***************
*** 155,161 ****
  
      code = setjmp(savearea->setjmp_buffer);
      jmpBuffer = (jmp_buf_type *) savearea->setjmp_buffer;
!     savearea->topstack = (char *)jmpBuffer[LWP_SP];
  
  #if	defined(DEBUG)
      {
--- 184,190 ----
  
      code = setjmp(savearea->setjmp_buffer);
      jmpBuffer = (jmp_buf_type *) savearea->setjmp_buffer;
!     savearea->topstack = (char *) ptr_mangle(jmpBuffer[LWP_SP]);
  
  #if	defined(DEBUG)
      {
***************
*** 178,186 ****
  	    switch (rc) {
  	    case 0:
  		jmpBuffer = (jmp_buf_type *) jmp_tmp;
! 		jmpBuffer[LWP_SP] = (jmp_buf_type) sp;
  #if defined(AFS_S390_LINUX20_ENV) || defined(AFS_SPARC_LINUX20_ENV) || (defined(AFS_SPARC64_LINUX20_ENV) && defined(AFS_32BIT_USR_ENV))
! 		jmpBuffer[LWP_FP] = (jmp_buf_type) sp;
  #endif
  		longjmp(jmp_tmp, 1);
  		break;
--- 207,215 ----
  	    switch (rc) {
  	    case 0:
  		jmpBuffer = (jmp_buf_type *) jmp_tmp;
! 		jmpBuffer[LWP_SP] = ptr_mangle((jmp_buf_type) sp);
  #if defined(AFS_S390_LINUX20_ENV) || defined(AFS_SPARC_LINUX20_ENV) || (defined(AFS_SPARC64_LINUX20_ENV) && defined(AFS_32BIT_USR_ENV))
! 		jmpBuffer[LWP_FP] = ptr_mangle((jmp_buf_type) sp);
  #endif
  		longjmp(jmp_tmp, 1);
  		break;
Index: openafs/src/package/package.c
diff -c openafs/src/package/package.c:1.5 openafs/src/package/package.c:1.5.2.1
*** openafs/src/package/package.c:1.5	Wed Jun 23 10:27:40 2004
--- openafs/src/package/package.c	Tue Apr 10 14:43:45 2007
***************
*** 341,347 ****
       */
      code = cmd_Dispatch(argc, argv);
      if (code) {
! 	com_err(argv[0], code, "while dispatching command line");
  	exit(-1);
      }
  
--- 341,347 ----
       */
      code = cmd_Dispatch(argc, argv);
      if (code) {
! 	afs_com_err(argv[0], code, "while dispatching command line");
  	exit(-1);
      }
  
Index: openafs/src/packaging/Debian/CellServDB
diff -c openafs/src/packaging/Debian/CellServDB:1.1.2.2 openafs/src/packaging/Debian/CellServDB:removed
*** openafs/src/packaging/Debian/CellServDB:1.1.2.2	Thu Mar 23 15:20:31 2006
--- openafs/src/packaging/Debian/CellServDB	Thu Oct 11 16:05:10 2007
***************
*** 1,559 ****
- >grand.central.org      #GCO Public CellServDB 15 Oct 2005
- 18.7.14.88                      #grand-opening.mit.edu
- 128.2.191.224                   #penn.central.org
- 130.237.48.87                   #andrew.e.kth.se
- >wu-wien.ac.at          #University of Economics, Vienna, Austria
- 137.208.3.33                    #afsdb1.wu-wien.ac.at
- 137.208.8.12                    #caesar.wu-wien.ac.at
- 137.208.127.33                  #buddy.wu-wien.ac.at
- >hephy.at               #hephy-vienna
- 193.170.243.10                  #mowgli.oeaw.ac.at
- 193.170.243.12                  #baloo.oeaw.ac.at
- 193.170.243.14                  #akela.oeaw.ac.at
- >itp.tugraz.at          #Institute for Theoretical Physics, TU Graz, Austria
- 129.27.157.6                    #fubphsv2.tu-graz.ac.at
- 129.27.161.7                    #faepsv01.tu-graz.ac.at
- 129.27.161.15                   #faepsv02.tu-graz.ac.at
- >cern.ch                #European Laboratory for Particle Physics, Geneva
- 137.138.128.148                 #afsdb1.cern.ch
- 137.138.246.50                  #afsdb3.cern.ch
- 137.138.246.51                  #afsdb2.cern.ch
- >ams.cern.ch            #AMS Experiment
- 137.138.206.77                  #pcamsf2.cern.ch
- 137.138.206.123                 #pcamsf4.cern.ch
- >epfl.ch                #Swiss Federal Institute of Technology at Lausanne
- 128.178.2.6                     #kd1.epfl.ch
- 128.178.2.7                     #kd2.epfl.ch
- 128.178.2.8                     #kd3.epfl.ch
- >ethz.ch                #Swiss Federal Inst. of Tech. - Zurich, Switzerland
- 129.132.97.19                   #amalthea.ethz.ch
- 129.132.97.27                   #nethzafs-001.ethz.ch
- 129.132.115.3                   #himalia.ethz.ch
- 129.132.115.37                  #nethzafs-005.ethz.ch
- 129.132.115.38                  #nethzafs-006.ethz.ch
- >psi.ch                 #Paul Scherrer Institut - Villigen, Switzerland
- 129.129.190.140                 #afs00.psi.ch
- 129.129.190.141                 #afs01.psi.ch
- 129.129.190.142                 #afs02.psi.ch
- >extundo.com            #Simon Josefsson's cell
- 195.42.214.241                  #slipsten.extundo.com
- >mekinok.com            #Mekinok, Inc.
- 4.36.43.98                      #loggerhead.mekinok.com
- >membrain.com           #membrain.com
- 66.93.118.125                   #stormy
- 130.85.24.11                    #weasel
- 130.85.24.13                    #straykitten
- >midnightlinux.com      #Midnight Linux, Pittsburgh PA
- 208.10.142.82                   #outpost.midnightlinux.com
- >setfilepointer.com     #SetFilePointer.com
- 63.224.10.2                     #hamlet.SetFilePointer.com
- 63.224.10.4                     #troilus.SetFilePointer.com
- >sodre.cx               #Sodre.cx
- 128.8.140.165                   #greed.sodre.cx
- >desy.de                #Deutsches Elektronen-Synchrotron
- 131.169.40.62                   #vayu.desy.de
- 131.169.244.60                  #solar00.desy.de
- >gppc.de                #GPP Chemnitz mbH
- 213.187.92.33                   #gpp1.gppc.de
- 213.187.92.34                   #paulchen.gppc.de
- 213.187.92.35                   #lotus.gppc.de
- >ifh.de                 #DESY Zeuthen
- 141.34.22.10                    #romulus.ifh.de
- 141.34.22.11                    #remus.ifh.de
- 141.34.22.29                    #hekate.ifh.de
- >lrz-muenchen.de        #Leibniz Computing Centre, Germany
- 129.187.10.36                   #afs1.lrz-muenchen.de
- 129.187.10.56                   #afs3.lrz-muenchen.de
- 129.187.10.57                   #afs2.lrz-muenchen.de
- >ipp-garching.mpg.de    #Institut fuer Plasmaphysik
- 130.183.9.5                     #afs-db1.rzg.mpg.de
- 130.183.100.10                  #afs-db2.aug.ipp-garching.mpg.de
- 130.183.100.23                  #afs-db3.aug.ipp-garching.mpg.de
- >mpe.mpg.de             #MPE cell
- 130.183.130.7                   #irafs1.mpe-garching.mpg.de
- 130.183.134.20                  #irafs2.mpe-garching.mpg.de
- >i1.informatik.rwth-aachen.de #Informatik I, RWTH Aachen
- 137.226.244.79                  #remus.informatik.rwth-aachen.de
- >tu-bs.de               #Technical University of Braunschweig, Germany
- 134.169.1.1                     #rzafs1.rz.tu-bs.de
- 134.169.1.5                     #rzafs2.rz.tu-bs.de
- 134.169.1.6                     #rzafs3.rz.tu-bs.de
- >tu-chemnitz.de         #Technische Universitaet Chemnitz, Germany
- 134.109.2.1                     #zuse.hrz.tu-chemnitz.de
- 134.109.2.15                    #phoenix.hrz.tu-chemnitz.de
- 134.109.200.7                   #aetius.hrz.tu-chemnitz.de
- >e18.ph.tum.de          #Experimental Physics, TU Munich, Germany
- 129.187.154.223                 #hamlet.e18.physik.tu-muenchen.de
- >uni-bonn.de            #University of Bonn, Computing Center
- 131.220.14.198                  #work15-eth.rhrz.uni-bonn.de
- 131.220.14.205                  #node05.rhrz.uni-bonn.de
- 131.220.15.197                  #afs-db1.rhrz.uni-bonn.de
- >atlass01.physik.uni-bonn.de #Bonn ATLAS
- 131.220.165.43                  #atlass01.physik.uni-bonn.de
- >uni-freiburg.de        #Albert-Ludwigs-Universitat Freiburg
- 132.230.6.235                   #sv6.ruf.uni-freiburg.de
- 132.230.6.236                   #sv7.ruf.uni-freiburg.de
- 132.230.6.237                   #sv8.ruf.uni-freiburg.de
- >physik.uni-freiburg.de #institute of physics, university Freiburg, Germany
- 132.230.77.16                   #hepafs.physik.uni-freiburg.de
- >urz.uni-heidelberg.de  #Uni Heidelberg (Rechenzentrum)
- 129.206.119.10                  #afsdb.urz.uni-heidelberg.de
- 129.206.119.16                  #afsdb1.urz.uni-heidelberg.de
- 129.206.119.17                  #afsdb2.urz.uni-heidelberg.de
- >uni-hohenheim.de       #University of Hohenheim
- 144.41.2.2                      #rs13.serv.uni-hohenheim.de
- 144.41.2.3                      #rs14.serv.uni-hohenheim.de
- 144.41.2.4                      #rs15.serv.uni-hohenheim.de
- >rz.uni-jena.de         #Rechenzentrum University of Jena, Germany
- 141.35.2.160                    #lc00.rz.uni-jena.de
- 141.35.7.9                      #fsuj01.rz.uni-jena.de
- 141.35.7.10                     #zaphod.rz.uni-jena
- >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
- 134.95.144.22                   #afs1.meteo.uni-koeln.de
- 134.95.144.24                   #afs2.meteo.uni-koeln.de
- >rrz.uni-koeln.de       #University of Cologne - Reg Comp Center
- 134.95.19.3                     #afsdb1.rrz.uni-koeln.de
- 134.95.19.30                    #fileserv3.rrz.uni-koeln.de
- 134.95.67.97                    #afs.thp.uni-koeln.de
- 134.95.140.190                  #rzkbserv.rrz.uni-koeln.de
- >physik.uni-mainz.de    #institute of physics, university Mainz, Germany
- 134.93.130.93                   #hardy.physik.uni-mainz.de
- >uni-mannheim.de        #Uni Mannheim (Rechenzentrum)
- 134.155.97.204                  #afsdb1.uni-mannheim.de
- 134.155.97.205                  #afsdb2.uni-mannheim.de
- 134.155.97.206                  #afsdb3.uni-mannheim.de
- >uni-paderborn.de       #University of Paderborn, Germany
- 131.234.137.10                  #afsdb1.uni-paderborn.de
- 131.234.137.11                  #afsdb2.uni-paderborn.de
- 131.234.137.12                  #afsdb3.uni-paderborn.de
- >physik.uni-wuppertal.de #Physics department of Bergische Universität Wuppertal
- 132.195.104.3                   #afs1.physik.uni-wuppertal.de
- 132.195.104.230                 #afs2.physik.uni-wuppertal.de
- >s-et.aau.dk            #Aalborg Univ., The Student Society, Denmark
- 130.225.196.22                  #afs.s-et.aau.dk
- >ies.auc.dk             #Aalborg Univ., Inst. of Electronic Systems, Denmark
- 130.225.51.73                   #afsdb1.kom.auc.dk
- 130.225.51.74                   #afsdb2.kom.auc.dk
- 130.225.51.85                   #afsdb3.kom.auc.dk
- >asu.edu                #Arizona State University
- 129.219.10.69                   #authen2.asu.edu
- 129.219.10.70                   #authen1.asu.edu
- 129.219.10.72                   #authen3.asu.edu
- 129.219.100.16                  #authen4.asu.edu
- >hep.caltech.edu        #CalTech High Energy Physics
- 131.215.126.150                 #afs.hep.caltech.edu
- >clarkson.edu           #Clarkson University, Potsdam, New York USA
- 128.153.1.111                   #arthur.clarkson.edu
- 128.153.9.111                   #lancelot.clarkson.edu
- 128.153.17.111                  #uther.clarkson.edu
- >andrew.cmu.edu         #Carnegie Mellon University - Computing Services Cell
- 128.2.10.2                      #vice2.fs.andrew.cmu.edu
- 128.2.10.7                      #vice7.fs.andrew.cmu.edu
- 128.2.10.11                     #vice11.fs.andrew.cmu.edu
- 128.2.10.28                     #vice28.fs.andrew.cmu.edu
- 128.2.32.44                     #new-vice12.fs.andrew.cmu.edu
- >club.cc.cmu.edu        #Carnegie Mellon University Computer Club
- 128.237.157.11                  #sodium.club.cc.cmu.edu
- 128.237.157.13                  #potassium.club.cc.cmu.edu
- >chem.cmu.edu           #Carnegie Mellon University - Chemistry Dept.
- 128.2.40.134                    #afs.chem.cmu.edu
- 128.2.40.140                    #afs2.chem.cmu.edu
- >cs.cmu.edu             #Carnegie Mellon University - School of Comp. Sci.
- 128.2.194.178                   #cherry.srv.cs.cmu.edu
- 128.2.194.179                   #pumpkin.srv.cs.cmu.edu
- 128.2.194.180                   #strawberry.srv.cs.cmu.edu
- >ece.cmu.edu            #Carnegie Mellon University - Elec. Comp. Eng. Dept.
- 128.2.129.7                     #porok.ece.cmu.edu
- 128.2.129.8                     #vicio.ece.cmu.edu
- 128.2.129.9                     #e-xing.ece.cmu.edu
- >scotch.ece.cmu.edu     #CMU ECE CALCM research group
- 128.2.134.82                    #lagavulin.ece.cmu.edu
- >qatar.cmu.edu          #Carnegie Mellon University - Qatar Campus Cell
- 204.194.25.7                    #afs1.qatar.cmu.edu
- 204.194.25.8                    #afs2.qatar.cmu.edu
- >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
- 128.2.56.129                    #nihao.sbp.ri.cmu.edu
- 128.2.56.136                    #youtheman.sbp.ri.cmu.edu
- >msc.cornell.edu        #Cornell University Materials Science Center
- 128.84.231.242                  #miranda.ccmr.cornell.edu
- 128.84.241.35                   #co.ccmr.cornell.edu
- 128.84.249.78                   #dax.ccmr.cornell.edu
- >dbic.dartmouth.edu     #Dartmouth Brain Imaging Center
- 129.170.30.143                  #dbicafs1.dartmouth.edu
- 129.170.30.144                  #dbicafs2.dartmouth.edu
- 129.170.30.145                  #dbicafs3.dartmouth.edu
- >northstar.dartmouth.edu #Dartmouth College Research Computing
- 129.170.16.22                   #halley.dartmouth.edu
- 129.170.16.42                   #oort.dartmouth.edu
- 129.170.16.43                   #cygnusx1.dartmouth.edu
- >eecs.harvard.edu       #Harvard - EECS
- 140.247.60.61                   #zermelo.eecs.harvard.edu
- 140.247.60.83                   #corfu.eecs.harvard.edu
- >iastate.edu            #Iowa State University
- 129.186.1.243                   #afsdb-1.iastate.edu
- 129.186.6.243                   #afsdb-2.iastate.edu
- 129.186.142.243                 #afsdb-3.iastate.edu
- >athena.mit.edu         #MIT/Athena cell
- 18.7.1.66                       #paris.mit.edu.
- 18.7.1.74                       #chimera.mit.edu.
- 18.158.0.37                     #prill.mit.edu.
- >dev.mit.edu            #MIT/IS Development cell
- 18.7.1.70                       #wham.mit.edu.
- 18.7.15.89                      #rattle.mit.edu.
- 18.7.15.93                      #hum.mit.edu.
- >net.mit.edu            #MIT/Network Group cell
- 18.7.7.73                       #gracie.mit.edu
- 18.7.21.95                      #george.mit.edu
- >sipb.mit.edu           #MIT/SIPB cell
- 18.181.0.19                     #reynelda.mit.edu.
- 18.181.0.22                     #rosebud.mit.edu.
- 18.181.0.23                     #ronald-ann.mit.edu.
- >soap.mit.edu           #MIT School Of Architecture & Planning
- 18.89.1.204                     #crypt.mit.edu
- 18.89.1.209                     #grotto.mit.edu
- 18.89.2.156                     #ac.mit.edu
- >msu.edu                #Michigan State University Main Cell
- 35.9.7.10                       #afsdb0.cl.msu.edu
- >nd.edu                 #University of Notre Dame
- 129.74.223.17                   #john.helios.nd.edu
- 129.74.223.33                   #lizardo.helios.nd.edu
- 129.74.223.65                   #buckaroo.helios.nd.edu
- >pitt.edu               #University of Pittsburgh
- 136.142.8.15                    #afs09.srv.cis.pitt.edu
- 136.142.8.20                    #afs10.srv.cis.pitt.edu
- 136.142.8.21                    #afs11.srv.cis.pitt.edu
- >cs.pitt.edu            #University of Pittsburgh - Computer Science
- 130.49.220.11                   #afs01.cs.pitt.edu
- 130.49.220.12                   #afs02.cs.pitt.edu
- 130.49.220.13                   #afs03.cs.pitt.edu
- >psc.edu                #PSC (Pittsburgh Supercomputing Center)
- 128.182.59.182                  #shaggy.psc.edu
- 128.182.66.184                  #velma.psc.edu
- 128.182.66.185                  #daphne.psc.edu
- >scoobydoo.psc.edu      #PSC Test Cell
- 128.182.59.181                  #scooby.psc.edu
- >cede.psu.edu           #Penn State - Center for Engr. Design & Entrepeneurship
- 146.186.218.10                  #greenly.cede.psu.edu
- 146.186.218.60                  #b50.cede.psu.edu
- 146.186.218.246                 #stalin.cede.psu.edu
- >rose-hulman.edu        #Rose-Hulman Institute of Technology
- 137.112.7.11                    #afs1.rose-hulman.edu
- 137.112.7.12                    #afs2.rose-hulman.edu
- 137.112.7.13                    #afs3.rose-hulman.edu
- >cs.rose-hulman.edu     #Rose-Hulman CS Department
- 137.112.40.10                   #galaxy.cs.rose-hulman.edu
- >rpi.edu                #Rensselaer Polytechnic Institute
- 128.113.22.11                   #saul.server.rpi.edu
- 128.113.22.12                   #joab.server.rpi.edu
- 128.113.22.13                   #korah.server.rpi.edu
- 128.113.22.14                   #achan.server.rpi.edu
- >hep.sc.edu             #University of South Carolina, Dept. of Physics
- 129.252.78.77                   #cpeven.physics.sc.edu
- >cs.stanford.edu        #Stanford University Computer Science Department
- 171.64.64.10                    #cs-afs-1.Stanford.EDU
- 171.64.64.66                    #cs-afs-2.stanford.edu
- 171.64.64.69                    #cs-afs-3.stanford.edu
- >ir.stanford.edu        #Stanford University
- 171.64.7.222                    #afsdb1.stanford.edu
- 171.64.7.234                    #afsdb2.stanford.edu
- 171.64.7.246                    #afsdb3.stanford.edu
- >slac.stanford.edu      #Stanford Linear Accelerator Center
- 134.79.18.25                    #afsdb1.slac.stanford.edu
- 134.79.18.26                    #afsdb2.slac.stanford.edu
- 134.79.18.27                    #afsdb3.slac.stanford.edu
- >cats.ucsc.edu          #UC Santa Cruz, Comm. and Tech. Services, California U.S.A
- 128.114.129.14                  #elan.ucsc.edu
- 128.114.129.15                  #ichabod.ucsc.edu
- 128.114.129.18                  #maneki.ucsc.edu
- >acm.uiuc.edu           #ACM at the University of Illinois
- 128.174.251.8                   #alnitak.acm.uiuc.edu
- 128.174.251.9                   #alnilam.acm.uiuc.edu
- 128.174.251.10                  #mintaka.acm.uiuc.edu
- >ncsa.uiuc.edu          #University of Illinois
- 141.142.3.5                     #congo.ncsa.uiuc.edu
- 141.142.3.8                     #nile.ncsa.uiuc.edu
- 141.142.3.9                     #kaskaskia.ncsa.uiuc.edu
- >umbc.edu               #University of Maryland, Baltimore County
- 130.85.24.23                    #db2.afs.umbc.edu
- 130.85.24.87                    #db3.afs.umbc.edu
- 130.85.24.101                   #db1.afs.umbc.edu
- >glue.umd.edu           #University of Maryland - Project Glue
- 128.8.70.11                     #olmec.umd.edu
- 128.8.236.4                     #egypt.umd.edu
- 128.8.236.230                   #babylon.umd.edu
- >wam.umd.edu            #University of Maryland Network WAM Project
- 128.8.70.9                      #csc-srv.wam.umd.edu
- 128.8.236.5                     #avw-srv.wam.umd.edu
- 128.8.236.231                   #ptx-srv.wam.umd.edu
- >umich.edu              #University of Michigan - Campus
- 141.211.1.32                    #fear.ifs.umich.edu
- 141.211.1.33                    #surprise.ifs.umich.edu
- 141.211.1.34                    #ruthless.ifs.umich.edu
- >atlas.umich.edu        #ATLAS group cell in physics at University of Michigan
- 141.211.43.102                  #linat02.grid.umich.edu
- 141.211.43.106                  #linat06.grid.umich.edu
- 141.211.43.109                  #atgrid.grid.umich.edu
- >citi.umich.edu         #Center for Information Technology Integration
- 141.211.133.5                   #babylon.citi.umich.edu
- >lsa.umich.edu          #University of Michigan - College of LS&A
- 141.211.211.53                  #gerow.lsa.umich.edu
- 141.211.211.72                  #collines.lsa.umich.edu
- 141.211.211.153                 #hodges.lsa.umich.edu
- >umr.edu                #University of Missouri - Rolla
- 131.151.1.59                    #afsdb1.umr.edu
- 131.151.1.70                    #afsdb3.umr.edu
- 131.151.1.146                   #afsdb2.umr.edu
- >physics.unc.edu        #Univ. of NC at Chapel Hill, Dept. of Physics
- 152.2.4.1                       #who.physics.unc.edu
- 152.2.4.3                       #what.physics.unc.edu
- 152.2.4.5                       #when.physics.unc.edu
- >uncc.edu               #University of NC at Charlotte Mosaic AFS Cell
- 152.15.10.70                    #as-sm1.uncc.edu
- 152.15.13.7                     #as-sm2.uncc.edu
- 152.15.30.27                    #fs-kenn3.uncc.edu
- >eng.utah.edu           #University of Utah - Engineering
- 155.99.222.9                    #lenny.eng.utah.edu
- 155.99.222.10                   #carl.eng.utah.edu
- >cs.uwm.edu             #University of Wisconsin--Milwaukee
- 129.89.38.124                   #solomons.cs.uwm.edu
- >cs.wisc.edu            #Univ. of Wisconsin-Madison, Computer Sciences Dept.
- 128.105.132.14                  #timon.cs.wisc.edu
- 128.105.132.15                  #pumbaa.cs.wisc.edu
- 128.105.132.16                  #zazu.cs.wisc.edu
- >engr.wisc.edu          #University of Wisconsin-Madison, College of Engineering
- 144.92.13.14                    #larry.cae.wisc.edu
- 144.92.13.15                    #curly.cae.wisc.edu
- 144.92.13.16                    #moe.cae.wisc.edu
- >hep.wisc.edu           #University of Wisconsin -- High Energy Physics
- 128.104.28.219                  #anise.hep.wisc.edu
- >physics.wisc.edu       #Univ. of Wisconsin-Madison, Physics Department
- 128.104.160.13                  #kendra.physics.wisc.edu
- 128.104.160.14                  #fray.physics.wisc.edu
- 128.104.160.15                  #buffy.physics.wisc.edu
- >ciemat.es              #Ciemat, Madrid, Spain
- 130.206.11.42                   #afsdb1.ciemat.es
- 130.206.11.217                  #afsdb2.ciemat.es
- 130.206.11.247                  #afsdb3.ciemat.es
- >ifca.unican.es         #Instituto de Fisica de Cantabria (IFCA), Santander, Spain
- 193.144.209.20                  #gridwall.ifca.unican.es
- >ific.uv.es             #Instituto de Fisica Corpuscular, Valencia, Spain
- 147.156.163.11                  #alpha.ific.uv.es
- >biocenter.helsinki.fi  #University of Helsinki, Institute of Biotechnology
- 128.214.58.174                  #afsdb1.biocenter.helsinki.fi
- 128.214.88.114                  #afsdb2.biocenter.helsinki.fi
- >dapnia.saclay.cea.fr   #CEA DAPNIA
- 132.166.32.7                    #dphrsg.saclay.cea.fr
- 132.166.32.12                   #dphrsl.saclay.cea.fr
- >in2p3.fr               #IN2P3 production cell
- 134.158.232.11                  #ccafsdb1.in2p3.fr
- 134.158.232.12                  #ccafsdb2.in2p3.fr
- 134.158.232.13                  #ccafsdb3.in2p3.fr
- >anl.gov                #Argonne National Laboratory
- 146.137.96.33                   #arteus.ctd.anl.gov
- 146.137.162.88                  #agamemnon.ctd.anl.gov
- 146.137.194.80                  #antenor.ctd.anl.gov
- >rhic.bnl.gov           #Relativistic Heavy Ion Collider
- 130.199.6.51                    #rafs03.rcf.bnl.gov
- 130.199.6.52                    #rafs02.rcf.bnl.gov
- 130.199.6.69                    #rafs01.rcf.bnl.gov
- >usatlas.bnl.gov        #US Atlas Tier 1 Facility at BNL
- 130.199.48.32                   #aafs01.usatlas.bnl.gov
- 130.199.48.33                   #aafs02.usatlas.bnl.gov
- 130.199.48.34                   #aafs03.usatlas.bnl.gov
- >fnal.gov               #Fermi National Acclerator Laboratory
- 131.225.68.1                    #fsus01.fnal.gov
- 131.225.68.4                    #fsus03.fnal.gov
- 131.225.68.14                   #fsus04.fnal.gov
- >ic-afs.arc.nasa.gov    #Code IC, Ames Research Center
- 128.102.105.62                  #udanax.arc.nasa.gov
- >jpl.nasa.gov           #Jet Propulsion Laboratory
- 137.78.160.21                   #afsdb08.jpl.nasa.gov
- 137.78.160.22                   #afsdb09.jpl.nasa.gov
- 137.78.160.23                   #afsdb10.jpl.nasa.gov
- >nersc.gov              #National Energy Research Supercomputer Center
- 128.55.128.250                  #mars.nersc.gov
- 128.55.128.252                  #alfred.nersc.gov
- 128.55.128.254                  #lurch.nersc.gov
- >bme.hu                 #Budapest University of Technology and Economics
- 152.66.241.6                    #afs.iit.bme.hu
- >kfki.hu                #Research Institute for Nuclear and Particle Physics - Budapest,H
- 148.6.8.14                      #afs.kfki.hu
- >caspur.it              #CASPUR Inter-University Computing Consortium, Rome
- 193.204.5.45                    #pomodoro.caspur.it
- 193.204.5.46                    #banana.caspur.it
- 193.204.5.50                    #maslo.caspur.it
- >enea.it                #ENEA New Tech. Energy & Environment Agency, Italy
- 192.107.54.5                    #aixfs.frascati.enea.it
- 192.107.54.11                   #rs2ced.frascati.enea.it
- 192.107.54.12                   #43p.frascati.enea.it
- 192.107.61.235                  #serverinfo02.bologna.enea.it
- 192.107.71.6                    #glauco.casaccia.enea.it
- 192.107.96.233                  #riscdb.trisaia.enea.it
- >fusione.it             #Assoz. FUSIONE/Euratom, ENEA, Frascati-Italy
- 192.107.90.2                    #fusafs1.frascati.enea.it
- 192.107.90.3                    #fusafs2.frascati.enea.it
- 192.107.90.4                    #fusafs3.frascati.enea.it
- >icemb.it               #ICEMB, Universita' La Sapienza - Rome - Italy
- 193.204.6.130                   #icembfs.caspur.it
- >infn.it                #Istituto Nazionale di Fisica Nucleare (INFN), Italia
- 131.154.1.7                     #afscnaf.infn.it
- 141.108.26.75                   #afsrm1.roma1.infn.it
- 192.84.134.75                   #afsna.na.infn.it
- >ba.infn.it             #INFN, Sezione di Bari
- 193.206.185.235                 #baafsserver.ba.infn.it
- >kloe.infn.it           #INFN, KLOE experiment at Laboratori di Frascati
- 192.135.25.111                  #kloeafs1.lnf.infn.it
- 192.135.25.112                  #kloeafs2.lnf.infn.it
- >le.infn.it             #INFN, Sezione di Lecce
- 192.84.152.40                   #afs01.le.infn.it
- 192.84.152.148                  #afs02.le.infn.it
- >lnf.infn.it            #INFN, Laboratori Nazionali di Frascati
- 193.206.84.121                  #afs1.lnf.infn.it
- 193.206.84.122                  #afs2.lnf.infn.it
- 193.206.84.123                  #afs3.lnf.infn.it
- >lngs.infn.it           #INFN, Laboratori Nazionali di Gran Sasso
- 192.84.135.21                   #rsgs05.lngs.infn.it
- >pi.infn.it             #INFN, Sezione di Pisa
- 131.114.134.26                  #unknownhost.pi.infn.it
- 192.84.133.50                   #aix1.pi.infn.it
- >psm.it                 #Progetto San Marco, Universita' di Roma-1
- 151.100.1.65                    #atlante.psm.uniroma1.it
- >tgrid.it               #CASPUR-CILEA-CINECA Grid Cell
- 193.204.5.33                    #cccgrid.caspur.it
- >ictp.trieste.it        #The Abdus Salam International Centre for Theoretical Physics (IC
- 140.105.16.8                    #fs1.ictp.trieste.it
- 140.105.16.9                    #fs2.ictp.trieste.it
- >math.unifi.it          #math.unifi.it
- 150.217.34.182                  #xeno.math.unifi.it
- >ing.uniroma1.it        #Universita' La Sapienza, Fac. Ingeneria
- 151.100.85.253                  #alfa.ing.uniroma1.it
- >dia.uniroma3.it        #University Roma Tre - DIA
- 193.204.161.79                  #plm.dia.uniroma3.it
- 193.204.161.118                 #afs.dia.uniroma3.it
- >vn.uniroma3.it         #University of Rome 3, Area Vasca Navale
- 193.204.161.136                 #alfa.dia.uniroma3.it
- 193.204.161.137                 #beta.dia.uniroma3.it
- 193.204.161.138                 #gamma.dia.uniroma3.it
- >italia                 #Italian public AFS cell
- 193.204.5.9                     #afs.caspur.it
- >cmf.nrl.navy.mil       #Naval Research Lab - CCS
- 134.207.10.68                   #picard.cmf.nrl.navy.mil
- 134.207.10.69                   #riker.cmf.nrl.navy.mil
- 134.207.10.70                   #kirk.cmf.nrl.navy.mil
- >lcp.nrl.navy.mil       #Naval Research Lab - Lab for Computational Physics
- 132.250.114.2                   #afs1.lcp.nrl.navy.mil
- 132.250.114.4                   #afs2.lcp.nrl.navy.mil
- 132.250.114.6                   #afs3.lcp.nrl.navy.mil
- >es.net                 #Energy Sciences Net
- 198.128.3.21                    #fs1.es.net
- 198.128.3.22                    #fs2.es.net
- 198.128.3.23                    #fs3.es.net
- >laroia.net             #Laroia Networks
- 66.66.102.254                   #supercore.laroia.net
- >sinenomine.net         #Sine Nomine Associates
- 66.92.236.139                   #afs.sinenomine.net
- >slackers.net           #The Slackers' Network
- 63.201.48.27                    #alexandria.slackers.net
- >tproa.net              #The People's Republic of Ames
- 209.234.76.70                   #service-3.tproa.net
- >nikhef.nl              #The Dutch National Institute for High Energy Physics
- 192.16.185.26                   #afs1.nikhef.nl
- 192.16.185.27                   #afs2.nikhef.nl
- >1ts.org                #1TS.ORG, Cambridge, MA
- 4.36.43.102                     #dol-guldur.1ts.org
- 69.25.196.51                    #pancake.1ts.org
- >bazquux.org            #Baz Quux Organization
- 66.207.142.196                  #baxquux.org
- >coed.org               #Adam Pennington's Cell
- 66.93.61.184                    #vice1.coed.org
- 128.237.157.35                  #vice3.coed.org
- >dementia.org           #Dementia Unlimited
- 128.2.12.45                     #alycia.dementia.org
- 128.2.120.216                   #meredith.dementia.org
- >hackish.org            #Hackish.org
- 24.167.65.213                   #avatar.sys.hackish.org
- 128.2.120.138                   #kurma.sys.hackish.org
- >idahofuturetruck.org   #University of Idaho hybrid vehicle development
- 12.18.238.210                   #dsle210.fsr.net
- >nimlabs.org            #Nimlabs, Ink. Cell.
- 18.238.1.103                    #olfin.nimlabs.org
- 18.238.1.105                    #caerbanog.nimlabs.org
- >nomh.org               #nomh.org
- 204.29.154.12                   #iota.nomh.org
- 204.29.154.32                   #adversity.xi.nomh.org
- >oc7.org                #The OC7 Project
- 128.2.122.140                   #knife.oc7.org
- 207.22.77.170                   #spoon.oc7.org
- >openafs.org            #OpenAFS Project
- 18.7.14.88                      #grand-opening.mit.edu
- 128.2.191.224                   #penn.central.org
- 130.237.48.87                   #andrew.e.kth.se
- >e.kth.se               #Royal Institute of Technology, Elektro
- 130.237.32.145                  #sonen.e.kth.se
- 130.237.48.7                    #anden.e.kth.se
- 130.237.48.244                  #fadern.e.kth.se
- >hallf.kth.se           #Royal Institute of Technology, HALLF
- 130.237.24.141                  #rasmus13.hallf.kth.se
- 130.237.24.152                  #rasmus3.hallf.kth.se
- 130.237.24.177                  #rasmus29.hallf.kth.se
- >isk.kth.se             #Royal Institute of Technology, ISK
- 130.237.202.12                  #afsdb2.isk.kth.se
- 130.237.206.13                  #afsdb1.isk.kth.se
- 130.237.209.141                 #afsdb3.isk.kth.se
- >it.kth.se              #Royal Institute of Technology, IT
- 130.237.212.15                  #ptah.it.kth.se
- 130.237.212.16                  #toth.it.kth.se
- 130.237.215.7                   #isis.it.kth.se
- >md.kth.se              #Royal Institute of Technology, MMK
- 130.237.57.68                   #trinity.md.kth.se
- 130.237.57.72                   #morpheus.md.kth.se
- 130.237.67.230                  #neo.speech.kth.se
- >mech.kth.se            #Royal Institute of Technology, MECH
- 130.237.233.142                 #matterhorn.mech.kth.se
- 130.237.233.143                 #castor.mech.kth.se
- 130.237.233.144                 #pollux.mech.kth.se
- >nada.kth.se            #Royal Institute of Technology, NADA
- 130.237.222.20                  #kosmos.nada.kth.se
- 130.237.223.12                  #sputnik.nada.kth.se
- 130.237.224.78                  #mir.nada.kth.se
- 130.237.227.23                  #gagarin.nada.kth.se
- 130.237.228.28                  #laika.nada.kth.se
- >pdc.kth.se             #Royal Institute of Technology, PDC
- 130.237.232.29                  #crab.pdc.kth.se
- 130.237.232.112                 #anna.pdc.kth.se
- 130.237.232.114                 #hokkigai.pdc.kth.se
- >stacken.kth.se         #Stacken Computer Club
- 130.237.234.3                   #milko.stacken.kth.se
- 130.237.234.43                  #hot.stacken.kth.se
- 130.237.237.230                 #fishburger.stacken.kth.se
- >syd.kth.se             #Royal Institute of Technology, KTH-Syd
- 130.237.83.23                   #afs.haninge.kth.se
- >physto.se              #Physics department Stockholm University
- 130.237.205.36                  #sysafs1.physto.se
- 130.237.205.72                  #sysafs2.physto.se
- >sanchin.se             #Sanchin Consulting AB, Sweden
- 192.195.148.10                  #sesan.sanchin.se
- >su.se                  #Stockholm University
- 130.237.162.81                  #afsdb1.su.se
- 130.237.162.82                  #afsdb2.su.se
- 130.237.162.230                 #afsdb3.su.se
- >f9.ijs.si              #F9, Jozef Stefan Institue
- 194.249.156.1                   #brenta.ijs.si
- >p-ng.si                #Nova Gorica Polytechnic
- 193.2.120.2                     #solkan.p-ng.si
- >phy.bris.ac.uk         #Bristol University - phyics
- 137.222.58.9                    #afs1.phy.bris.ac.uk
- >hep.man.ac.uk          #Manchester HEP
- 194.36.2.3                      #afs1.hep.man.ac.uk
- 194.36.2.4                      #afs2.hep.man.ac.uk
- 194.36.2.5                      #afs3.hep.man.ac.uk
- >rl.ac.uk               #Rutherford Appleton Lab, England
- 130.246.183.164                 #wallace.cc.rl.ac.uk
- openafs-fileserver: non-standard-dir-perm
- openafs-fileserver: non-standard-dir-perm
- openafs-fileserver: non-standard-dir-perm
- openafs-fileserver: non-standard-dir-perm
- openafs-fileserver: non-standard-dir-perm
- openafs-fileserver: non-standard-dir-perm
- openafs-fileserver: non-standard-dir-perm
- openafs-fileserver: non-standard-dir-perm
--- 0 ----
Index: openafs/src/packaging/HP-UX/files/usr/vice/etc/CellServDB
diff -c openafs/src/packaging/HP-UX/files/usr/vice/etc/CellServDB:1.1.4.4 openafs/src/packaging/HP-UX/files/usr/vice/etc/CellServDB:removed
*** openafs/src/packaging/HP-UX/files/usr/vice/etc/CellServDB:1.1.4.4	Fri Mar  9 23:52:52 2007
--- openafs/src/packaging/HP-UX/files/usr/vice/etc/CellServDB	Thu Oct 11 16:05:10 2007
***************
*** 1,579 ****
- >grand.central.org      #GCO Public CellServDB 09 Mar 2007
- 18.92.0.108                     #grand-opening.mit.edu
- 128.2.203.61                    #penn.central.org
- 130.237.48.87                   #andrew.e.kth.se
- >wu-wien.ac.at          #University of Economics, Vienna, Austria
- 137.208.3.33                    #goya.wu-wien.ac.at
- 137.208.7.57                    #caravaggio.wu-wien.ac.at
- 137.208.127.57                  #vermeer.wu-wien.ac.at
- >hephy.at               #hephy-vienna
- 193.170.243.10                  #mowgli.oeaw.ac.at
- 193.170.243.12                  #baloo.oeaw.ac.at
- 193.170.243.14                  #akela.oeaw.ac.at
- >cgv.tugraz.at          #CGV cell
- 129.27.224.133                  #phobos.cgv.tugraz.at
- 129.27.224.134                  #deimos.cgv.tugraz.at
- 129.27.224.210                  #trinculo.cgv.tugraz.at
- >itp.tugraz.at          #Institute of Theoretical and Computational Physics, TU Graz, Aus
- 129.27.161.7                    #faepafs1.tu-graz.ac.at
- 129.27.161.15                   #faepafs2.tu-graz.ac.at
- 129.27.161.114                  #faepafs3.tu-graz.ac.at
- >cern.ch                #European Laboratory for Particle Physics, Geneva
- 137.138.128.148                 #afsdb1.cern.ch
- 137.138.246.50                  #afsdb3.cern.ch
- 137.138.246.51                  #afsdb2.cern.ch
- >ams.cern.ch            #AMS Experiment
- 137.138.188.185                 #ams.cern.ch
- 137.138.199.58                  #pcamsf4.cern.ch
- >epfl.ch                #Swiss Federal Institute of Technology at Lausanne
- 128.178.109.111                 #kd1.epfl.ch
- 128.178.109.112                 #kd2.epfl.ch
- 128.178.109.113                 #kd3.epfl.ch
- >ethz.ch                #Swiss Federal Inst. of Tech. - Zurich, Switzerland
- 129.132.97.19                   #amalthea.ethz.ch
- 129.132.97.27                   #nethzafs-001.ethz.ch
- 129.132.115.3                   #himalia.ethz.ch
- 129.132.115.37                  #nethzafs-005.ethz.ch
- 129.132.115.38                  #nethzafs-006.ethz.ch
- >psi.ch                 #Paul Scherrer Institut - Villigen, Switzerland
- 129.129.190.140                 #afs00.psi.ch
- 129.129.190.141                 #afs01.psi.ch
- 129.129.190.142                 #afs02.psi.ch
- >extundo.com            #Simon Josefsson's cell
- 195.42.214.241                  #slipsten.extundo.com
- >membrain.com           #membrain.com
- 66.93.118.125                   #stormy
- 130.85.24.11                    #weasel
- 130.85.24.13                    #straykitten
- >midnightlinux.com      #Midnight Linux, Pittsburgh PA
- 208.10.142.82                   #outpost.midnightlinux.com
- >setfilepointer.com     #SetFilePointer.com
- 63.224.10.2                     #hamlet.SetFilePointer.com
- 63.224.10.4                     #troilus.SetFilePointer.com
- >sodre.cx               #Sodre.cx
- 128.8.140.165                   #greed.sodre.cx
- >desy.de                #Deutsches Elektronen-Synchrotron
- 131.169.40.62                   #vayu.desy.de
- 131.169.244.60                  #solar00.desy.de
- >gppc.de                #GPP Chemnitz mbH
- 213.187.92.33                   #gpp1.gppc.de
- 213.187.92.34                   #paulchen.gppc.de
- 213.187.92.35                   #lotus.gppc.de
- >ifh.de                 #DESY Zeuthen
- 141.34.22.10                    #romulus.ifh.de
- 141.34.22.11                    #remus.ifh.de
- 141.34.22.29                    #hekate.ifh.de
- >lrz-muenchen.de        #Leibniz Computing Centre, Germany
- 129.187.10.36                   #afs1.lrz-muenchen.de
- 129.187.10.56                   #afs3.lrz-muenchen.de
- 129.187.10.57                   #afs2.lrz-muenchen.de
- >ipp-garching.mpg.de    #Institut fuer Plasmaphysik
- 130.183.9.5                     #afs-db1.rzg.mpg.de
- 130.183.100.10                  #afs-db2.aug.ipp-garching.mpg.de
- 130.183.100.23                  #afs-db3.aug.ipp-garching.mpg.de
- >mpe.mpg.de             #MPE cell
- 130.183.130.7                   #irafs1.mpe-garching.mpg.de
- 130.183.134.20                  #irafs2.mpe-garching.mpg.de
- >i1.informatik.rwth-aachen.de #Informatik I, RWTH Aachen
- 137.226.244.79                  #remus.informatik.rwth-aachen.de
- >tu-bs.de               #Technical University of Braunschweig, Germany
- 134.169.1.1                     #rzafs1.rz.tu-bs.de
- 134.169.1.5                     #rzafs2.rz.tu-bs.de
- 134.169.1.6                     #rzafs3.rz.tu-bs.de
- >tu-chemnitz.de         #Technische Universitaet Chemnitz, Germany
- 134.109.2.1                     #zuse.hrz.tu-chemnitz.de
- 134.109.2.15                    #phoenix.hrz.tu-chemnitz.de
- 134.109.200.7                   #aetius.hrz.tu-chemnitz.de
- >e18.ph.tum.de          #Experimental Physics, TU Munich, Germany
- 129.187.154.223                 #hamlet.e18.physik.tu-muenchen.de
- >uni-bonn.de            #University of Bonn, Computing Center
- 131.220.14.198                  #work15-eth.rhrz.uni-bonn.de
- 131.220.14.205                  #node05.rhrz.uni-bonn.de
- 131.220.15.197                  #afs-db1.rhrz.uni-bonn.de
- >atlass01.physik.uni-bonn.de #Bonn ATLAS
- 131.220.165.43                  #atlass01.physik.uni-bonn.de
- >uni-freiburg.de        #Albert-Ludwigs-Universitat Freiburg
- 132.230.6.235                   #sv6.ruf.uni-freiburg.de
- 132.230.6.236                   #sv7.ruf.uni-freiburg.de
- 132.230.6.237                   #sv8.ruf.uni-freiburg.de
- >physik.uni-freiburg.de #institute of physics, university Freiburg, Germany
- 132.230.77.16                   #hepafs.physik.uni-freiburg.de
- >urz.uni-heidelberg.de  #Uni Heidelberg (Rechenzentrum)
- 129.206.119.10                  #afsdb.urz.uni-heidelberg.de
- 129.206.119.16                  #afsdb1.urz.uni-heidelberg.de
- 129.206.119.17                  #afsdb2.urz.uni-heidelberg.de
- >uni-hohenheim.de       #University of Hohenheim
- 144.41.2.2                      #rs13.serv.uni-hohenheim.de
- 144.41.2.3                      #rs14.serv.uni-hohenheim.de
- 144.41.2.4                      #rs15.serv.uni-hohenheim.de
- >rz.uni-jena.de         #Rechenzentrum University of Jena, Germany
- 141.35.2.180                    #afs00.rz.uni-jena.de
- 141.35.2.181                    #afs01.rz.uni-jena.de
- 141.35.2.182                    #afs02.rz.uni-jena.de
- >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
- 134.95.144.22                   #afs1.meteo.uni-koeln.de
- 134.95.144.24                   #afs2.meteo.uni-koeln.de
- >rrz.uni-koeln.de       #University of Cologne - Reg Comp Center
- 134.95.19.3                     #afsdb1.rrz.uni-koeln.de
- 134.95.19.10                    #lyra.rrz.uni-koeln.de
- 134.95.67.97                    #afs.thp.uni-koeln.de
- 134.95.141.243                  #agrippina.rrz.uni-koeln.de
- >physik.uni-mainz.de    #institute of physics, university Mainz, Germany
- 134.93.130.93                   #hardy.physik.uni-mainz.de
- >uni-mannheim.de        #Uni Mannheim (Rechenzentrum)
- 134.155.97.204                  #afsdb1.uni-mannheim.de
- 134.155.97.205                  #afsdb2.uni-mannheim.de
- 134.155.97.206                  #afsdb3.uni-mannheim.de
- >uni-paderborn.de       #University of Paderborn, Germany
- 131.234.137.10                  #afsdb1.uni-paderborn.de
- 131.234.137.11                  #afsdb2.uni-paderborn.de
- 131.234.137.12                  #afsdb3.uni-paderborn.de
- >physik.uni-wuppertal.de #Physics department of Bergische Universität Wuppertal
- 132.195.104.3                   #afs1.physik.uni-wuppertal.de
- 132.195.104.230                 #afs2.physik.uni-wuppertal.de
- >s-et.aau.dk            #Aalborg Univ., The Student Society, Denmark
- 130.225.196.22                  #afs.s-et.aau.dk
- >ies.auc.dk             #Aalborg Univ., Inst. of Electronic Systems, Denmark
- 130.225.51.73                   #afsdb1.kom.auc.dk
- 130.225.51.74                   #afsdb2.kom.auc.dk
- 130.225.51.85                   #afsdb3.kom.auc.dk
- >asu.edu                #Arizona State University
- 129.219.10.69                   #authen2.asu.edu
- 129.219.10.70                   #authen1.asu.edu
- 129.219.10.72                   #authen3.asu.edu
- 129.219.100.16                  #authen4.asu.edu
- >hep.caltech.edu        #CalTech High Energy Physics
- 131.215.126.150                 #afs.hep.caltech.edu
- >clarkson.edu           #Clarkson University, Potsdam, New York USA
- 128.153.1.111                   #arthur.clarkson.edu
- 128.153.9.111                   #lancelot.clarkson.edu
- 128.153.17.111                  #uther.clarkson.edu
- >andrew.cmu.edu         #Carnegie Mellon University - Computing Services Cell
- 128.2.10.2                      #vice2.fs.andrew.cmu.edu
- 128.2.10.7                      #vice7.fs.andrew.cmu.edu
- 128.2.10.11                     #vice11.fs.andrew.cmu.edu
- 128.2.10.28                     #vice28.fs.andrew.cmu.edu
- 128.2.32.44                     #new-vice12.fs.andrew.cmu.edu
- >club.cc.cmu.edu        #Carnegie Mellon University Computer Club
- 128.237.157.11                  #sodium.club.cc.cmu.edu
- 128.237.157.13                  #potassium.club.cc.cmu.edu
- >chem.cmu.edu           #Carnegie Mellon University - Chemistry Dept.
- 128.2.40.134                    #afs.chem.cmu.edu
- 128.2.40.140                    #afs2.chem.cmu.edu
- >cs.cmu.edu             #Carnegie Mellon University - School of Comp. Sci.
- 128.2.194.178                   #cherry.srv.cs.cmu.edu
- 128.2.194.179                   #pumpkin.srv.cs.cmu.edu
- 128.2.194.180                   #strawberry.srv.cs.cmu.edu
- >ece.cmu.edu            #Carnegie Mellon University - Elec. Comp. Eng. Dept.
- 128.2.129.7                     #porok.ece.cmu.edu
- 128.2.129.8                     #vicio.ece.cmu.edu
- 128.2.129.9                     #e-xing.ece.cmu.edu
- >scotch.ece.cmu.edu     #CMU ECE CALCM research group
- 128.2.134.82                    #lagavulin.ece.cmu.edu
- >qatar.cmu.edu          #Carnegie Mellon University - Qatar Campus Cell
- 204.194.25.7                    #afs1.qatar.cmu.edu
- 204.194.25.8                    #afs2.qatar.cmu.edu
- >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
- 128.2.179.12                    #nihao.sbp.ri.cmu.edu
- 128.2.179.113                   #youtheman.sbp.ri.cmu.edu
- >cnf.cornell.edu        #Cornell Nanoscale Science and Technology Facility
- 128.253.198.9                   #hole.cnf.cornell.edu
- >msc.cornell.edu        #Cornell University Materials Science Center
- 128.84.231.242                  #miranda.ccmr.cornell.edu
- 128.84.241.35                   #co.ccmr.cornell.edu
- 128.84.249.78                   #dax.ccmr.cornell.edu
- >dbic.dartmouth.edu     #Dartmouth Brain Imaging Center
- 129.170.30.143                  #dbicafs1.dartmouth.edu
- 129.170.30.144                  #dbicafs2.dartmouth.edu
- 129.170.30.145                  #dbicafs3.dartmouth.edu
- >northstar.dartmouth.edu #Dartmouth College Research Computing
- 129.170.16.22                   #halley.dartmouth.edu
- 129.170.16.42                   #oort.dartmouth.edu
- 129.170.16.43                   #cygnusx1.dartmouth.edu
- >cs.fhm.edu             #Department Computer Science Munich University Of Applied Science
- 129.187.208.2                   #srv1.informatik.fh-muenchen.de
- >eecs.harvard.edu       #Harvard - EECS
- 140.247.60.61                   #zermelo.eecs.harvard.edu
- 140.247.60.83                   #corfu.eecs.harvard.edu
- >iastate.edu            #Iowa State University
- 129.186.1.243                   #afsdb-1.iastate.edu
- 129.186.6.243                   #afsdb-2.iastate.edu
- 129.186.142.243                 #afsdb-3.iastate.edu
- >athena.mit.edu         #MIT/Athena cell
- 18.7.1.66                       #paris.mit.edu.
- 18.7.1.74                       #chimera.mit.edu.
- 18.158.0.37                     #prill.mit.edu.
- >dev.mit.edu            #MIT/IS Development cell
- 18.7.1.70                       #wham.mit.edu.
- 18.92.1.219                     #click.mit.edu.
- 18.92.1.220                     #whirr.mit.edu.
- >net.mit.edu            #MIT/Network Group cell
- 18.7.7.73                       #gracie.mit.edu
- 18.7.21.95                      #george.mit.edu
- >sipb.mit.edu           #MIT/SIPB cell
- 18.181.0.19                     #reynelda.mit.edu.
- 18.181.0.22                     #rosebud.mit.edu.
- 18.181.0.23                     #ronald-ann.mit.edu.
- >soap.mit.edu           #MIT School Of Architecture & Planning
- 18.89.1.204                     #crypt.mit.edu
- 18.89.1.209                     #grotto.mit.edu
- 18.89.2.156                     #ac.mit.edu
- >msu.edu                #Michigan State University Main Cell
- 35.9.7.10                       #afsdb0.cl.msu.edu
- >nd.edu                 #University of Notre Dame
- 129.74.223.17                   #john.helios.nd.edu
- 129.74.223.33                   #lizardo.helios.nd.edu
- 129.74.223.65                   #buckaroo.helios.nd.edu
- >pitt.edu               #University of Pittsburgh
- 136.142.8.15                    #afs09.srv.cis.pitt.edu
- 136.142.8.20                    #afs10.srv.cis.pitt.edu
- 136.142.8.21                    #afs11.srv.cis.pitt.edu
- >cs.pitt.edu            #University of Pittsburgh - Computer Science
- 130.49.220.11                   #afs01.cs.pitt.edu
- 130.49.220.12                   #afs02.cs.pitt.edu
- 130.49.220.13                   #afs03.cs.pitt.edu
- >psc.edu                #PSC (Pittsburgh Supercomputing Center)
- 128.182.59.182                  #shaggy.psc.edu
- 128.182.66.184                  #velma.psc.edu
- 128.182.66.185                  #daphne.psc.edu
- >scoobydoo.psc.edu      #PSC Test Cell
- 128.182.59.181                  #scooby.psc.edu
- >cede.psu.edu           #Penn State - Center for Engr. Design & Entrepeneurship
- 146.186.218.10                  #greenly.cede.psu.edu
- 146.186.218.60                  #b50.cede.psu.edu
- 146.186.218.246                 #stalin.cede.psu.edu
- >rose-hulman.edu        #Rose-Hulman Institute of Technology
- 137.112.7.11                    #afs1.rose-hulman.edu
- 137.112.7.12                    #afs2.rose-hulman.edu
- 137.112.7.13                    #afs3.rose-hulman.edu
- >cs.rose-hulman.edu     #Rose-Hulman CS Department
- 137.112.40.10                   #galaxy.cs.rose-hulman.edu
- >rpi.edu                #Rensselaer Polytechnic Institute
- 128.113.22.11                   #saul.server.rpi.edu
- 128.113.22.12                   #joab.server.rpi.edu
- 128.113.22.13                   #korah.server.rpi.edu
- 128.113.22.14                   #achan.server.rpi.edu
- >hep.sc.edu             #University of South Carolina, Dept. of Physics
- 129.252.78.77                   #cpeven.physics.sc.edu
- >cs.stanford.edu        #Stanford University Computer Science Department
- 171.64.64.10                    #cs-afs-1.Stanford.EDU
- 171.64.64.66                    #cs-afs-2.stanford.edu
- 171.64.64.69                    #cs-afs-3.stanford.edu
- >ir.stanford.edu        #Stanford University
- 171.64.7.222                    #afsdb1.stanford.edu
- 171.64.7.234                    #afsdb2.stanford.edu
- 171.64.7.246                    #afsdb3.stanford.edu
- >slac.stanford.edu      #Stanford Linear Accelerator Center
- 134.79.18.25                    #afsdb1.slac.stanford.edu
- 134.79.18.26                    #afsdb2.slac.stanford.edu
- 134.79.18.27                    #afsdb3.slac.stanford.edu
- >ucdavis.edu            #University of California at Davis
- 169.237.104.100                 #afs1.ucdavis.edu
- 169.237.235.176                 #afs2.ucdavis.edu
- 169.237.247.91                  #afs3.ucdavis.edu
- >home.ucdavis.edu       #University of California at Davis home directories
- 169.237.105.91                  #home1.ucdavis.edu
- 169.237.105.92                  #home2.ucdavis.edu
- 169.237.105.93                  #home3.ucdavis.edu
- >physics.ucsb.edu       #UC Santa Barbara, Physics Dept
- 128.111.18.161                  #ledzeppelin.physics.ucsb.edu
- >cats.ucsc.edu          #UC Santa Cruz, Comp and Tech Services, California U.S.A
- 128.114.123.14                  #elan.ucsc.edu
- 128.114.123.15                  #ichabod.ucsc.edu
- 128.114.123.18                  #maneki.ucsc.edu
- >acm.uiuc.edu           #ACM at the University of Illinois
- 128.174.251.8                   #alnitak.acm.uiuc.edu
- 128.174.251.9                   #alnilam.acm.uiuc.edu
- 128.174.251.10                  #mintaka.acm.uiuc.edu
- >ncsa.uiuc.edu          #University of Illinois
- 141.142.3.5                     #congo.ncsa.uiuc.edu
- 141.142.3.8                     #nile.ncsa.uiuc.edu
- 141.142.3.9                     #kaskaskia.ncsa.uiuc.edu
- >umbc.edu               #University of Maryland, Baltimore County
- 130.85.24.23                    #db2.afs.umbc.edu
- 130.85.24.87                    #db3.afs.umbc.edu
- 130.85.24.101                   #db1.afs.umbc.edu
- >glue.umd.edu           #University of Maryland - Project Glue
- 128.8.70.11                     #olmec.umd.edu
- 128.8.236.4                     #egypt.umd.edu
- 128.8.236.230                   #babylon.umd.edu
- >wam.umd.edu            #University of Maryland Network WAM Project
- 128.8.70.9                      #csc-srv.wam.umd.edu
- 128.8.236.5                     #avw-srv.wam.umd.edu
- 128.8.236.231                   #ptx-srv.wam.umd.edu
- >umich.edu              #University of Michigan - Campus
- 141.211.1.32                    #fear.ifs.umich.edu
- 141.211.1.33                    #surprise.ifs.umich.edu
- 141.211.1.34                    #ruthless.ifs.umich.edu
- >atlas.umich.edu        #ATLAS group cell in physics at University of Michigan
- 141.211.43.102                  #linat02.grid.umich.edu
- 141.211.43.103                  #linat03.grid.umich.edu
- 141.211.43.104                  #linat04.grid.umich.edu
- >citi.umich.edu         #Center for Information Technology Integration
- 141.211.133.5                   #babylon.citi.umich.edu
- >lsa.umich.edu          #University of Michigan - College of LS&A
- 141.211.211.53                  #gerow.lsa.umich.edu
- 141.211.211.72                  #collines.lsa.umich.edu
- 141.211.211.153                 #hodges.lsa.umich.edu
- >sph.umich.edu          #University of Michigan -- School of Public  Health
- 141.211.51.137                  #afssph7.sph.umich.edu
- 141.211.51.139                  #afssph0.sph.umich.edu
- 141.211.51.142                  #afssph6.sph.umich.edu
- >isis.unc.edu           #Univ. of NC at Chapel Hill - ITS
- 152.2.1.5                       #db0.isis.unc.edu
- 152.2.1.6                       #db1.isis.unc.edu
- 152.2.1.7                       #db2.isis.unc.edu
- >physics.unc.edu        #Univ. of NC at Chapel Hill, Dept. of Physics
- 152.2.4.1                       #who.physics.unc.edu
- 152.2.4.3                       #what.physics.unc.edu
- 152.2.4.5                       #when.physics.unc.edu
- >uncc.edu               #University of NC at Charlotte Mosaic AFS Cell
- 152.15.10.70                    #as-sm1.uncc.edu
- 152.15.93.186                   #as-ece1.uncc.edu
- 152.15.181.175                  #as-me1.uncc.edu
- >eng.utah.edu           #University of Utah - Engineering
- 155.98.111.9                    #lenny.eng.utah.edu
- 155.98.111.10                   #carl.eng.utah.edu
- >cs.uwm.edu             #University of Wisconsin--Milwaukee
- 129.89.38.124                   #solomons.cs.uwm.edu
- >cs.wisc.edu            #Univ. of Wisconsin-Madison, Computer Sciences Dept.
- 128.105.132.14                  #timon.cs.wisc.edu
- 128.105.132.15                  #pumbaa.cs.wisc.edu
- 128.105.132.16                  #zazu.cs.wisc.edu
- >engr.wisc.edu          #University of Wisconsin-Madison, College of Engineering
- 144.92.13.14                    #larry.cae.wisc.edu
- 144.92.13.15                    #curly.cae.wisc.edu
- 144.92.13.16                    #moe.cae.wisc.edu
- >hep.wisc.edu           #University of Wisconsin -- High Energy Physics
- 128.104.28.219                  #anise.hep.wisc.edu
- >physics.wisc.edu       #Univ. of Wisconsin-Madison, Physics Department
- 128.104.160.13                  #kendra.physics.wisc.edu
- 128.104.160.14                  #fray.physics.wisc.edu
- 128.104.160.15                  #buffy.physics.wisc.edu
- >ciemat.es              #Ciemat, Madrid, Spain
- 130.206.11.42                   #afsdb1.ciemat.es
- 130.206.11.217                  #afsdb2.ciemat.es
- 130.206.11.247                  #afsdb3.ciemat.es
- >ifca.unican.es         #Instituto de Fisica de Cantabria (IFCA), Santander, Spain
- 193.144.209.20                  #gridwall.ifca.unican.es
- >ific.uv.es             #Instituto de Fisica Corpuscular, Valencia, Spain
- 147.156.163.11                  #alpha.ific.uv.es
- >biocenter.helsinki.fi  #University of Helsinki, Institute of Biotechnology
- 128.214.58.174                  #afsdb1.biocenter.helsinki.fi
- 128.214.88.114                  #afsdb2.biocenter.helsinki.fi
- >dapnia.saclay.cea.fr   #CEA DAPNIA
- 132.166.32.7                    #dphrsg.saclay.cea.fr
- 132.166.32.12                   #dphrsl.saclay.cea.fr
- >grif.fr                #GRIF cell
- 192.54.208.18                   #node03.datagrid.cea.fr
- >in2p3.fr               #IN2P3 production cell
- 134.158.232.11                  #ccafsdb1.in2p3.fr
- 134.158.232.12                  #ccafsdb2.in2p3.fr
- 134.158.232.13                  #ccafsdb3.in2p3.fr
- >anl.gov                #Argonne National Laboratory
- 146.137.96.33                   #arteus.ctd.anl.gov
- 146.137.162.88                  #agamemnon.ctd.anl.gov
- 146.137.194.80                  #antenor.ctd.anl.gov
- >rhic.bnl.gov           #Relativistic Heavy Ion Collider
- 130.199.6.51                    #rafs03.rcf.bnl.gov
- 130.199.6.52                    #rafs02.rcf.bnl.gov
- 130.199.6.69                    #rafs01.rcf.bnl.gov
- >usatlas.bnl.gov        #US Atlas Tier 1 Facility at BNL
- 130.199.48.32                   #aafs01.usatlas.bnl.gov
- 130.199.48.33                   #aafs02.usatlas.bnl.gov
- 130.199.48.34                   #aafs03.usatlas.bnl.gov
- >fnal.gov               #Fermi National Acclerator Laboratory
- 131.225.68.1                    #fsus01.fnal.gov
- 131.225.68.4                    #fsus03.fnal.gov
- 131.225.68.14                   #fsus04.fnal.gov
- >ic-afs.arc.nasa.gov    #Code IC, Ames Research Center
- 128.102.105.62                  #udanax.arc.nasa.gov
- >jpl.nasa.gov           #Jet Propulsion Laboratory
- 137.78.160.21                   #afsdb08.jpl.nasa.gov
- 137.78.160.22                   #afsdb09.jpl.nasa.gov
- 137.78.160.23                   #afsdb10.jpl.nasa.gov
- >nersc.gov              #National Energy Research Supercomputer Center
- 128.55.128.250                  #mars.nersc.gov
- 128.55.128.252                  #alfred.nersc.gov
- 128.55.128.254                  #lurch.nersc.gov
- >bme.hu                 #Budapest University of Technology and Economics
- 152.66.241.6                    #afs.iit.bme.hu
- >kfki.hu                #Research Institute for Nuclear and Particle Physics - Budapest,H
- 148.6.8.14                      #afs.kfki.hu
- >caspur.it              #CASPUR Inter-University Computing Consortium, Rome
- 193.204.5.45                    #pomodoro.caspur.it
- 193.204.5.46                    #banana.caspur.it
- 193.204.5.50                    #maslo.caspur.it
- >enea.it                #ENEA New Tech. Energy & Environment Agency, Italy
- 192.107.54.5                    #aixfs.frascati.enea.it
- 192.107.54.11                   #rs2ced.frascati.enea.it
- 192.107.54.12                   #43p.frascati.enea.it
- 192.107.61.235                  #serverinfo02.bologna.enea.it
- 192.107.71.6                    #glauco.casaccia.enea.it
- 192.107.96.233                  #riscdb.trisaia.enea.it
- >fusione.it             #Assoz. FUSIONE/Euratom, ENEA, Frascati-Italy
- 192.107.90.2                    #fusafs1.frascati.enea.it
- 192.107.90.3                    #fusafs2.frascati.enea.it
- 192.107.90.4                    #fusafs3.frascati.enea.it
- >icemb.it               #ICEMB, Universita' La Sapienza - Rome - Italy
- 193.204.6.130                   #icembfs.caspur.it
- >infn.it                #Istituto Nazionale di Fisica Nucleare (INFN), Italia
- 131.154.1.7                     #afscnaf.infn.it
- 141.108.26.75                   #afsrm1.roma1.infn.it
- 192.84.134.75                   #afsna.na.infn.it
- >ba.infn.it             #INFN, Sezione di Bari
- 193.206.185.235                 #baafsserver.ba.infn.it
- 193.206.185.236                 #debsrv.ba.infn.it
- >kloe.infn.it           #INFN, KLOE experiment at Laboratori di Frascati
- 192.135.25.111                  #kloeafs1.lnf.infn.it
- 192.135.25.112                  #kloeafs2.lnf.infn.it
- >le.infn.it             #INFN, Sezione di Lecce
- 192.84.152.40                   #afs01.le.infn.it
- 192.84.152.148                  #afs02.le.infn.it
- >lnf.infn.it            #INFN, Laboratori Nazionali di Frascati
- 193.206.84.121                  #afs1.lnf.infn.it
- 193.206.84.122                  #afs2.lnf.infn.it
- 193.206.84.123                  #afs3.lnf.infn.it
- >lngs.infn.it           #INFN, Laboratori Nazionali di Gran Sasso
- 192.84.135.21                   #rsgs05.lngs.infn.it
- >pi.infn.it             #INFN, Sezione di Pisa
- 131.114.134.26                  #unknownhost.pi.infn.it
- 192.84.133.50                   #aix1.pi.infn.it
- >psm.it                 #Progetto San Marco, Universita' di Roma-1
- 151.100.1.65                    #atlante.psm.uniroma1.it
- >tgrid.it               #CASPUR-CILEA-CINECA Grid Cell
- 193.204.5.33                    #cccgrid.caspur.it
- >ictp.trieste.it        #The Abdus Salam International Centre for Theoretical Physics (IC
- 140.105.16.8                    #fs1.ictp.trieste.it
- 140.105.16.9                    #fs2.ictp.trieste.it
- >math.unifi.it          #math.unifi.it
- 150.217.34.182                  #xeno.math.unifi.it
- >ing.uniroma1.it        #Universita' La Sapienza, Fac. Ingeneria
- 151.100.85.253                  #alfa.ing.uniroma1.it
- >dia.uniroma3.it        #University Roma Tre - DIA
- 193.204.161.79                  #plm.dia.uniroma3.it
- 193.204.161.118                 #afs.dia.uniroma3.it
- >vn.uniroma3.it         #University of Rome 3, Area Vasca Navale
- 193.204.161.136                 #alfa.dia.uniroma3.it
- 193.204.161.137                 #beta.dia.uniroma3.it
- 193.204.161.138                 #gamma.dia.uniroma3.it
- >italia                 #Italian public AFS cell
- 193.204.5.9                     #afs.caspur.it
- >cmf.nrl.navy.mil       #Naval Research Lab - CCS
- 134.207.10.68                   #picard.cmf.nrl.navy.mil
- 134.207.10.69                   #riker.cmf.nrl.navy.mil
- 134.207.10.70                   #kirk.cmf.nrl.navy.mil
- >lcp.nrl.navy.mil       #Naval Research Lab - Lab for Computational Physics
- 132.250.114.2                   #afs1.lcp.nrl.navy.mil
- 132.250.114.4                   #afs2.lcp.nrl.navy.mil
- 132.250.114.6                   #afs3.lcp.nrl.navy.mil
- >es.net                 #Energy Sciences Net
- 198.128.3.21                    #fs1.es.net
- 198.128.3.22                    #fs2.es.net
- 198.128.3.23                    #fs3.es.net
- >laroia.net             #Laroia Networks
- 66.66.102.254                   #supercore.laroia.net
- >sinenomine.net         #Sine Nomine Associates
- 192.204.203.218                 #va.sinenomine.net
- >slackers.net           #The Slackers' Network
- 63.201.48.27                    #alexandria.slackers.net
- >tproa.net              #The People's Republic of Ames
- 209.234.76.70                   #service-3.tproa.net
- 209.234.76.75                   #service-4.tproa.net
- 209.234.76.76                   #service-5.tproa.net
- >nikhef.nl              #The Dutch National Institute for High Energy Physics
- 192.16.185.26                   #afs1.nikhef.nl
- 192.16.185.27                   #afs2.nikhef.nl
- >1ts.org                #1TS.ORG, Cambridge, MA
- 69.25.196.51                    #pancake.1ts.org
- >acm-csuf.org           #California State Univerisity Fullerton ACM
- 137.151.29.193                  #afs1.acm-csuf.org
- >bazquux.org            #Baz Quux Organization
- 66.207.142.196                  #baxquux.org
- >coed.org               #Adam Pennington's Cell
- 66.93.61.184                    #vice1.coed.org
- 128.237.157.35                  #vice3.coed.org
- >dementia.org           #Dementia Unlimited
- 128.2.12.45                     #alycia.dementia.org
- 128.2.120.216                   #meredith.dementia.org
- >hackish.org            #Hackish.org
- 24.167.65.213                   #avatar.sys.hackish.org
- 128.2.120.138                   #kurma.sys.hackish.org
- >idahofuturetruck.org   #University of Idaho hybrid vehicle development
- 12.18.238.210                   #dsle210.fsr.net
- >nimlabs.org            #Nimlabs, Ink. Cell.
- 18.238.1.103                    #olfin.nimlabs.org
- 18.238.1.105                    #caerbanog.nimlabs.org
- >nomh.org               #nomh.org
- 204.29.154.12                   #iota.nomh.org
- 204.29.154.32                   #adversity.xi.nomh.org
- >oc7.org                #The OC7 Project
- 128.2.122.140                   #knife.oc7.org
- 207.22.77.170                   #spoon.oc7.org
- >kth.se                 #Royal Institute of Technology, Stockholm, Sweden
- 130.237.32.145                  #sonen.e.kth.se
- 130.237.48.7                    #anden.e.kth.se
- 130.237.48.244                  #fadern.e.kth.se
- >hallf.kth.se           #Royal Institute of Technology, HALLF
- 130.237.24.11                   #afs1.hallf.kth.se
- 130.237.24.104                  #afs2.hallf.kth.se
- >isk.kth.se             #Royal Institute of Technology, ISK
- 130.237.202.3                   #afsdb1.isk.kth.se
- 130.237.209.9                   #afsdb3.isk.kth.se
- 130.237.209.39                  #ezri.isk.kth.se
- >it.kth.se              #Royal Institute of Technology, IT
- 130.237.212.15                  #ptah.it.kth.se
- 130.237.212.16                  #toth.it.kth.se
- 130.237.215.7                   #isis.it.kth.se
- >md.kth.se              #Royal Institute of Technology, MMK
- 130.237.57.68                   #trinity.md.kth.se
- 130.237.57.72                   #morpheus.md.kth.se
- 130.237.67.230                  #neo.speech.kth.se
- >mech.kth.se            #Royal Institute of Technology, MECH
- 130.237.233.142                 #matterhorn.mech.kth.se
- 130.237.233.143                 #castor.mech.kth.se
- 130.237.233.144                 #pollux.mech.kth.se
- >nada.kth.se            #Royal Institute of Technology, NADA
- 130.237.222.20                  #kosmos.nada.kth.se
- 130.237.223.12                  #sputnik.nada.kth.se
- 130.237.224.78                  #mir.nada.kth.se
- 130.237.227.23                  #gagarin.nada.kth.se
- 130.237.228.28                  #laika.nada.kth.se
- >pdc.kth.se             #Royal Institute of Technology, PDC
- 130.237.232.29                  #crab.pdc.kth.se
- 130.237.232.112                 #anna.pdc.kth.se
- 130.237.232.114                 #hokkigai.pdc.kth.se
- >stacken.kth.se         #Stacken Computer Club
- 130.237.234.3                   #milko.stacken.kth.se
- 130.237.234.43                  #hot.stacken.kth.se
- 130.237.237.230                 #fishburger.stacken.kth.se
- >syd.kth.se             #Royal Institute of Technology, KTH-Syd
- 130.237.83.23                   #afs.haninge.kth.se
- >physto.se              #Physics department Stockholm University
- 130.237.205.36                  #sysafs1.physto.se
- 130.237.205.72                  #sysafs2.physto.se
- >sanchin.se             #Sanchin Consulting AB, Sweden
- 192.195.148.10                  #sesan.sanchin.se
- >su.se                  #Stockholm University
- 130.237.162.81                  #afsdb1.su.se
- 130.237.162.82                  #afsdb2.su.se
- 130.237.162.230                 #afsdb3.su.se
- >f9.ijs.si              #F9, Jozef Stefan Institue
- 194.249.156.1                   #brenta.ijs.si
- >p-ng.si                #Nova Gorica Polytechnic
- 193.2.120.2                     #solkan.p-ng.si
- >phy.bris.ac.uk         #Bristol University - phyics
- 137.222.58.9                    #afs1.phy.bris.ac.uk
- >inf.ed.ac.uk           #School of Informatics, University of Edinburgh
- 129.215.64.16                   #afsdb0.inf.ed.ac.uk
- 129.215.64.17                   #afsdb1.inf.ed.ac.uk
- 129.215.64.18                   #afsdb2.inf.ed.ac.uk
- >ic.ac.uk               #Imperial College London
- 155.198.63.148                  #icafs2.cc.ic.ac.uk
- 155.198.63.149                  #icafs1.cc.ic.ac.uk
- >hep.man.ac.uk          #Manchester HEP
- 194.36.2.3                      #afs1.hep.man.ac.uk
- 194.36.2.4                      #afs2.hep.man.ac.uk
- 194.36.2.5                      #afs3.hep.man.ac.uk
- >rl.ac.uk               #Rutherford Appleton Lab, England
- 130.246.183.164                 #wallace.cc.rl.ac.uk
--- 0 ----
Index: openafs/src/packaging/MacOS/CellServDB
diff -c openafs/src/packaging/MacOS/CellServDB:1.1.4.4 openafs/src/packaging/MacOS/CellServDB:removed
*** openafs/src/packaging/MacOS/CellServDB:1.1.4.4	Fri Mar  9 23:52:53 2007
--- openafs/src/packaging/MacOS/CellServDB	Thu Oct 11 16:05:10 2007
***************
*** 1,579 ****
- >grand.central.org      #GCO Public CellServDB 09 Mar 2007
- 18.92.0.108                     #grand-opening.mit.edu
- 128.2.203.61                    #penn.central.org
- 130.237.48.87                   #andrew.e.kth.se
- >wu-wien.ac.at          #University of Economics, Vienna, Austria
- 137.208.3.33                    #goya.wu-wien.ac.at
- 137.208.7.57                    #caravaggio.wu-wien.ac.at
- 137.208.127.57                  #vermeer.wu-wien.ac.at
- >hephy.at               #hephy-vienna
- 193.170.243.10                  #mowgli.oeaw.ac.at
- 193.170.243.12                  #baloo.oeaw.ac.at
- 193.170.243.14                  #akela.oeaw.ac.at
- >cgv.tugraz.at          #CGV cell
- 129.27.224.133                  #phobos.cgv.tugraz.at
- 129.27.224.134                  #deimos.cgv.tugraz.at
- 129.27.224.210                  #trinculo.cgv.tugraz.at
- >itp.tugraz.at          #Institute of Theoretical and Computational Physics, TU Graz, Aus
- 129.27.161.7                    #faepafs1.tu-graz.ac.at
- 129.27.161.15                   #faepafs2.tu-graz.ac.at
- 129.27.161.114                  #faepafs3.tu-graz.ac.at
- >cern.ch                #European Laboratory for Particle Physics, Geneva
- 137.138.128.148                 #afsdb1.cern.ch
- 137.138.246.50                  #afsdb3.cern.ch
- 137.138.246.51                  #afsdb2.cern.ch
- >ams.cern.ch            #AMS Experiment
- 137.138.188.185                 #ams.cern.ch
- 137.138.199.58                  #pcamsf4.cern.ch
- >epfl.ch                #Swiss Federal Institute of Technology at Lausanne
- 128.178.109.111                 #kd1.epfl.ch
- 128.178.109.112                 #kd2.epfl.ch
- 128.178.109.113                 #kd3.epfl.ch
- >ethz.ch                #Swiss Federal Inst. of Tech. - Zurich, Switzerland
- 129.132.97.19                   #amalthea.ethz.ch
- 129.132.97.27                   #nethzafs-001.ethz.ch
- 129.132.115.3                   #himalia.ethz.ch
- 129.132.115.37                  #nethzafs-005.ethz.ch
- 129.132.115.38                  #nethzafs-006.ethz.ch
- >psi.ch                 #Paul Scherrer Institut - Villigen, Switzerland
- 129.129.190.140                 #afs00.psi.ch
- 129.129.190.141                 #afs01.psi.ch
- 129.129.190.142                 #afs02.psi.ch
- >extundo.com            #Simon Josefsson's cell
- 195.42.214.241                  #slipsten.extundo.com
- >membrain.com           #membrain.com
- 66.93.118.125                   #stormy
- 130.85.24.11                    #weasel
- 130.85.24.13                    #straykitten
- >midnightlinux.com      #Midnight Linux, Pittsburgh PA
- 208.10.142.82                   #outpost.midnightlinux.com
- >setfilepointer.com     #SetFilePointer.com
- 63.224.10.2                     #hamlet.SetFilePointer.com
- 63.224.10.4                     #troilus.SetFilePointer.com
- >sodre.cx               #Sodre.cx
- 128.8.140.165                   #greed.sodre.cx
- >desy.de                #Deutsches Elektronen-Synchrotron
- 131.169.40.62                   #vayu.desy.de
- 131.169.244.60                  #solar00.desy.de
- >gppc.de                #GPP Chemnitz mbH
- 213.187.92.33                   #gpp1.gppc.de
- 213.187.92.34                   #paulchen.gppc.de
- 213.187.92.35                   #lotus.gppc.de
- >ifh.de                 #DESY Zeuthen
- 141.34.22.10                    #romulus.ifh.de
- 141.34.22.11                    #remus.ifh.de
- 141.34.22.29                    #hekate.ifh.de
- >lrz-muenchen.de        #Leibniz Computing Centre, Germany
- 129.187.10.36                   #afs1.lrz-muenchen.de
- 129.187.10.56                   #afs3.lrz-muenchen.de
- 129.187.10.57                   #afs2.lrz-muenchen.de
- >ipp-garching.mpg.de    #Institut fuer Plasmaphysik
- 130.183.9.5                     #afs-db1.rzg.mpg.de
- 130.183.100.10                  #afs-db2.aug.ipp-garching.mpg.de
- 130.183.100.23                  #afs-db3.aug.ipp-garching.mpg.de
- >mpe.mpg.de             #MPE cell
- 130.183.130.7                   #irafs1.mpe-garching.mpg.de
- 130.183.134.20                  #irafs2.mpe-garching.mpg.de
- >i1.informatik.rwth-aachen.de #Informatik I, RWTH Aachen
- 137.226.244.79                  #remus.informatik.rwth-aachen.de
- >tu-bs.de               #Technical University of Braunschweig, Germany
- 134.169.1.1                     #rzafs1.rz.tu-bs.de
- 134.169.1.5                     #rzafs2.rz.tu-bs.de
- 134.169.1.6                     #rzafs3.rz.tu-bs.de
- >tu-chemnitz.de         #Technische Universitaet Chemnitz, Germany
- 134.109.2.1                     #zuse.hrz.tu-chemnitz.de
- 134.109.2.15                    #phoenix.hrz.tu-chemnitz.de
- 134.109.200.7                   #aetius.hrz.tu-chemnitz.de
- >e18.ph.tum.de          #Experimental Physics, TU Munich, Germany
- 129.187.154.223                 #hamlet.e18.physik.tu-muenchen.de
- >uni-bonn.de            #University of Bonn, Computing Center
- 131.220.14.198                  #work15-eth.rhrz.uni-bonn.de
- 131.220.14.205                  #node05.rhrz.uni-bonn.de
- 131.220.15.197                  #afs-db1.rhrz.uni-bonn.de
- >atlass01.physik.uni-bonn.de #Bonn ATLAS
- 131.220.165.43                  #atlass01.physik.uni-bonn.de
- >uni-freiburg.de        #Albert-Ludwigs-Universitat Freiburg
- 132.230.6.235                   #sv6.ruf.uni-freiburg.de
- 132.230.6.236                   #sv7.ruf.uni-freiburg.de
- 132.230.6.237                   #sv8.ruf.uni-freiburg.de
- >physik.uni-freiburg.de #institute of physics, university Freiburg, Germany
- 132.230.77.16                   #hepafs.physik.uni-freiburg.de
- >urz.uni-heidelberg.de  #Uni Heidelberg (Rechenzentrum)
- 129.206.119.10                  #afsdb.urz.uni-heidelberg.de
- 129.206.119.16                  #afsdb1.urz.uni-heidelberg.de
- 129.206.119.17                  #afsdb2.urz.uni-heidelberg.de
- >uni-hohenheim.de       #University of Hohenheim
- 144.41.2.2                      #rs13.serv.uni-hohenheim.de
- 144.41.2.3                      #rs14.serv.uni-hohenheim.de
- 144.41.2.4                      #rs15.serv.uni-hohenheim.de
- >rz.uni-jena.de         #Rechenzentrum University of Jena, Germany
- 141.35.2.180                    #afs00.rz.uni-jena.de
- 141.35.2.181                    #afs01.rz.uni-jena.de
- 141.35.2.182                    #afs02.rz.uni-jena.de
- >meteo.uni-koeln.de     #Univ. of Cologne - Inst. for Geophysics & Meteorology
- 134.95.144.22                   #afs1.meteo.uni-koeln.de
- 134.95.144.24                   #afs2.meteo.uni-koeln.de
- >rrz.uni-koeln.de       #University of Cologne - Reg Comp Center
- 134.95.19.3                     #afsdb1.rrz.uni-koeln.de
- 134.95.19.10                    #lyra.rrz.uni-koeln.de
- 134.95.67.97                    #afs.thp.uni-koeln.de
- 134.95.141.243                  #agrippina.rrz.uni-koeln.de
- >physik.uni-mainz.de    #institute of physics, university Mainz, Germany
- 134.93.130.93                   #hardy.physik.uni-mainz.de
- >uni-mannheim.de        #Uni Mannheim (Rechenzentrum)
- 134.155.97.204                  #afsdb1.uni-mannheim.de
- 134.155.97.205                  #afsdb2.uni-mannheim.de
- 134.155.97.206                  #afsdb3.uni-mannheim.de
- >uni-paderborn.de       #University of Paderborn, Germany
- 131.234.137.10                  #afsdb1.uni-paderborn.de
- 131.234.137.11                  #afsdb2.uni-paderborn.de
- 131.234.137.12                  #afsdb3.uni-paderborn.de
- >physik.uni-wuppertal.de #Physics department of Bergische Universität Wuppertal
- 132.195.104.3                   #afs1.physik.uni-wuppertal.de
- 132.195.104.230                 #afs2.physik.uni-wuppertal.de
- >s-et.aau.dk            #Aalborg Univ., The Student Society, Denmark
- 130.225.196.22                  #afs.s-et.aau.dk
- >ies.auc.dk             #Aalborg Univ., Inst. of Electronic Systems, Denmark
- 130.225.51.73                   #afsdb1.kom.auc.dk
- 130.225.51.74                   #afsdb2.kom.auc.dk
- 130.225.51.85                   #afsdb3.kom.auc.dk
- >asu.edu                #Arizona State University
- 129.219.10.69                   #authen2.asu.edu
- 129.219.10.70                   #authen1.asu.edu
- 129.219.10.72                   #authen3.asu.edu
- 129.219.100.16                  #authen4.asu.edu
- >hep.caltech.edu        #CalTech High Energy Physics
- 131.215.126.150                 #afs.hep.caltech.edu
- >clarkson.edu           #Clarkson University, Potsdam, New York USA
- 128.153.1.111                   #arthur.clarkson.edu
- 128.153.9.111                   #lancelot.clarkson.edu
- 128.153.17.111                  #uther.clarkson.edu
- >andrew.cmu.edu         #Carnegie Mellon University - Computing Services Cell
- 128.2.10.2                      #vice2.fs.andrew.cmu.edu
- 128.2.10.7                      #vice7.fs.andrew.cmu.edu
- 128.2.10.11                     #vice11.fs.andrew.cmu.edu
- 128.2.10.28                     #vice28.fs.andrew.cmu.edu
- 128.2.32.44                     #new-vice12.fs.andrew.cmu.edu
- >club.cc.cmu.edu        #Carnegie Mellon University Computer Club
- 128.237.157.11                  #sodium.club.cc.cmu.edu
- 128.237.157.13                  #potassium.club.cc.cmu.edu
- >chem.cmu.edu           #Carnegie Mellon University - Chemistry Dept.
- 128.2.40.134                    #afs.chem.cmu.edu
- 128.2.40.140                    #afs2.chem.cmu.edu
- >cs.cmu.edu             #Carnegie Mellon University - School of Comp. Sci.
- 128.2.194.178                   #cherry.srv.cs.cmu.edu
- 128.2.194.179                   #pumpkin.srv.cs.cmu.edu
- 128.2.194.180                   #strawberry.srv.cs.cmu.edu
- >ece.cmu.edu            #Carnegie Mellon University - Elec. Comp. Eng. Dept.
- 128.2.129.7                     #porok.ece.cmu.edu
- 128.2.129.8                     #vicio.ece.cmu.edu
- 128.2.129.9                     #e-xing.ece.cmu.edu
- >scotch.ece.cmu.edu     #CMU ECE CALCM research group
- 128.2.134.82                    #lagavulin.ece.cmu.edu
- >qatar.cmu.edu          #Carnegie Mellon University - Qatar Campus Cell
- 204.194.25.7                    #afs1.qatar.cmu.edu
- 204.194.25.8                    #afs2.qatar.cmu.edu
- >sbp.ri.cmu.edu         #Carnegie Mellon University - Sensor Based Planning Lab
- 128.2.179.12                    #nihao.sbp.ri.cmu.edu
- 128.2.179.113                   #youtheman.sbp.ri.cmu.edu
- >cnf.cornell.edu        #Cornell Nanoscale Science and Technology Facility
- 128.253.198.9                   #hole.cnf.cornell.edu
- >msc.cornell.edu        #Cornell University Materials Science Center
- 128.84.231.242                  #miranda.ccmr.cornell.edu
- 128.84.241.35                   #co.ccmr.cornell.edu
- 128.84.249.78                   #dax.ccmr.cornell.edu
- >dbic.dartmouth.edu     #Dartmouth Brain Imaging Center
- 129.170.30.143                  #dbicafs1.dartmouth.edu
- 129.170.30.144                  #dbicafs2.dartmouth.edu
- 129.170.30.145                  #dbicafs3.dartmouth.edu
- >northstar.dartmouth.edu #Dartmouth College Research Computing
- 129.170.16.22                   #halley.dartmouth.edu
- 129.170.16.42                   #oort.dartmouth.edu
- 129.170.16.43                   #cygnusx1.dartmouth.edu
- >cs.fhm.edu             #Department Computer Science Munich University Of Applied Science
- 129.187.208.2                   #srv1.informatik.fh-muenchen.de
- >eecs.harvard.edu       #Harvard - EECS
- 140.247.60.61                   #zermelo.eecs.harvard.edu
- 140.247.60.83                   #corfu.eecs.harvard.edu
- >iastate.edu            #Iowa State University
- 129.186.1.243                   #afsdb-1.iastate.edu
- 129.186.6.243                   #afsdb-2.iastate.edu
- 129.186.142.243                 #afsdb-3.iastate.edu
- >athena.mit.edu         #MIT/Athena cell
- 18.7.1.66                       #paris.mit.edu.
- 18.7.1.74                       #chimera.mit.edu.
- 18.158.0.37                     #prill.mit.edu.
- >dev.mit.edu            #MIT/IS Development cell
- 18.7.1.70                       #wham.mit.edu.
- 18.92.1.219                     #click.mit.edu.
- 18.92.1.220                     #whirr.mit.edu.
- >net.mit.edu            #MIT/Network Group cell
- 18.7.7.73                       #gracie.mit.edu
- 18.7.21.95                      #george.mit.edu
- >sipb.mit.edu           #MIT/SIPB cell
- 18.181.0.19                     #reynelda.mit.edu.
- 18.181.0.22                     #rosebud.mit.edu.
- 18.181.0.23                     #ronald-ann.mit.edu.
- >soap.mit.edu           #MIT School Of Architecture & Planning
- 18.89.1.204                     #crypt.mit.edu
- 18.89.1.209                     #grotto.mit.edu
- 18.89.2.156                     #ac.mit.edu
- >msu.edu                #Michigan State University Main Cell
- 35.9.7.10                       #afsdb0.cl.msu.edu
- >nd.edu                 #University of Notre Dame
- 129.74.223.17                   #john.helios.nd.edu
- 129.74.223.33                   #lizardo.helios.nd.edu
- 129.74.223.65                   #buckaroo.helios.nd.edu
- >pitt.edu               #University of Pittsburgh
- 136.142.8.15                    #afs09.srv.cis.pitt.edu
- 136.142.8.20                    #afs10.srv.cis.pitt.edu
- 136.142.8.21                    #afs11.srv.cis.pitt.edu
- >cs.pitt.edu            #University of Pittsburgh - Computer Science
- 130.49.220.11                   #afs01.cs.pitt.edu
- 130.49.220.12                   #afs02.cs.pitt.edu
- 130.49.220.13                   #afs03.cs.pitt.edu
- >psc.edu                #PSC (Pittsburgh Supercomputing Center)
- 128.182.59.182                  #shaggy.psc.edu
- 128.182.66.184                  #velma.psc.edu
- 128.182.66.185                  #daphne.psc.edu
- >scoobydoo.psc.edu      #PSC Test Cell
- 128.182.59.181                  #scooby.psc.edu
- >cede.psu.edu           #Penn State - Center for Engr. Design & Entrepeneurship
- 146.186.218.10                  #greenly.cede.psu.edu
- 146.186.218.60                  #b50.cede.psu.edu
- 146.186.218.246                 #stalin.cede.psu.edu
- >rose-hulman.edu        #Rose-Hulman Institute of Technology
- 137.112.7.11                    #afs1.rose-hulman.edu
- 137.112.7.12                    #afs2.rose-hulman.edu
- 137.112.7.13                    #afs3.rose-hulman.edu
- >cs.rose-hulman.edu     #Rose-Hulman CS Department
- 137.112.40.10                   #galaxy.cs.rose-hulman.edu
- >rpi.edu                #Rensselaer Polytechnic Institute
- 128.113.22.11                   #saul.server.rpi.edu
- 128.113.22.12                   #joab.server.rpi.edu
- 128.113.22.13                   #korah.server.rpi.edu
- 128.113.22.14                   #achan.server.rpi.edu
- >hep.sc.edu             #University of South Carolina, Dept. of Physics
- 129.252.78.77                   #cpeven.physics.sc.edu
- >cs.stanford.edu        #Stanford University Computer Science Department
- 171.64.64.10                    #cs-afs-1.Stanford.EDU
- 171.64.64.66                    #cs-afs-2.stanford.edu
- 171.64.64.69                    #cs-afs-3.stanford.edu
- >ir.stanford.edu        #Stanford University
- 171.64.7.222                    #afsdb1.stanford.edu
- 171.64.7.234                    #afsdb2.stanford.edu
- 171.64.7.246                    #afsdb3.stanford.edu
- >slac.stanford.edu      #Stanford Linear Accelerator Center
- 134.79.18.25                    #afsdb1.slac.stanford.edu
- 134.79.18.26                    #afsdb2.slac.stanford.edu
- 134.79.18.27                    #afsdb3.slac.stanford.edu
- >ucdavis.edu            #University of California at Davis
- 169.237.104.100                 #afs1.ucdavis.edu
- 169.237.235.176                 #afs2.ucdavis.edu
- 169.237.247.91                  #afs3.ucdavis.edu
- >home.ucdavis.edu       #University of California at Davis home directories
- 169.237.105.91                  #home1.ucdavis.edu
- 169.237.105.92                  #home2.ucdavis.edu
- 169.237.105.93                  #home3.ucdavis.edu
- >physics.ucsb.edu       #UC Santa Barbara, Physics Dept
- 128.111.18.161                  #ledzeppelin.physics.ucsb.edu
- >cats.ucsc.edu          #UC Santa Cruz, Comp and Tech Services, California U.S.A
- 128.114.123.14                  #elan.ucsc.edu
- 128.114.123.15                  #ichabod.ucsc.edu
- 128.114.123.18                  #maneki.ucsc.edu
- >acm.uiuc.edu           #ACM at the University of Illinois
- 128.174.251.8                   #alnitak.acm.uiuc.edu
- 128.174.251.9                   #alnilam.acm.uiuc.edu
- 128.174.251.10                  #mintaka.acm.uiuc.edu
- >ncsa.uiuc.edu          #University of Illinois
- 141.142.3.5                     #congo.ncsa.uiuc.edu
- 141.142.3.8                     #nile.ncsa.uiuc.edu
- 141.142.3.9                     #kaskaskia.ncsa.uiuc.edu
- >umbc.edu               #University of Maryland, Baltimore County
- 130.85.24.23                    #db2.afs.umbc.edu
- 130.85.24.87                    #db3.afs.umbc.edu
- 130.85.24.101                   #db1.afs.umbc.edu
- >glue.umd.edu           #University of Maryland - Project Glue
- 128.8.70.11                     #olmec.umd.edu
- 128.8.236.4                     #egypt.umd.edu
- 128.8.236.230                   #babylon.umd.edu
- >wam.umd.edu            #University of Maryland Network WAM Project
- 128.8.70.9                      #csc-srv.wam.umd.edu
- 128.8.236.5                     #avw-srv.wam.umd.edu
- 128.8.236.231                   #ptx-srv.wam.umd.edu
- >umich.edu              #University of Michigan - Campus
- 141.211.1.32                    #fear.ifs.umich.edu
- 141.211.1.33                    #surprise.ifs.umich.edu
- 141.211.1.34                    #ruthless.ifs.umich.edu
- >atlas.umich.edu        #ATLAS group cell in physics at University of Michigan
- 141.211.43.102                  #linat02.grid.umich.edu
- 141.211.43.103                  #linat03.grid.umich.edu
- 141.211.43.104                  #linat04.grid.umich.edu
- >citi.umich.edu         #Center for Information Technology Integration
- 141.211.133.5                   #babylon.citi.umich.edu
- >lsa.umich.edu          #University of Michigan - College of LS&A
- 141.211.211.53                  #gerow.lsa.umich.edu
- 141.211.211.72                  #collines.lsa.umich.edu
- 141.211.211.153                 #hodges.lsa.umich.edu
- >sph.umich.edu          #University of Michigan -- School of Public  Health
- 141.211.51.137                  #afssph7.sph.umich.edu
- 141.211.51.139                  #afssph0.sph.umich.edu
- 141.211.51.142                  #afssph6.sph.umich.edu
- >isis.unc.edu           #Univ. of NC at Chapel Hill - ITS
- 152.2.1.5                       #db0.isis.unc.edu
- 152.2.1.6                       #db1.isis.unc.edu
- 152.2.1.7                       #db2.isis.unc.edu
- >physics.unc.edu        #Univ. of NC at Chapel Hill, Dept. of Physics
- 152.2.4.1                       #who.physics.unc.edu
- 152.2.4.3                       #what.physics.unc.edu
- 152.2.4.5                       #when.physics.unc.edu
- >uncc.edu               #University of NC at Charlotte Mosaic AFS Cell
- 152.15.10.70                    #as-sm1.uncc.edu
- 152.15.93.186                   #as-ece1.uncc.edu
- 152.15.181.175                  #as-me1.uncc.edu
- >eng.utah.edu           #University of Utah - Engineering
- 155.98.111.9                    #lenny.eng.utah.edu
- 155.98.111.10                   #carl.eng.utah.edu
- >cs.uwm.edu             #University of Wisconsin--Milwaukee
- 129.89.38.124                   #solomons.cs.uwm.edu
- >cs.wisc.edu            #Univ. of Wisconsin-Madison, Computer Sciences Dept.
- 128.105.132.14                  #timon.cs.wisc.edu
- 128.105.132.15                  #pumbaa.cs.wisc.edu
- 128.105.132.16                  #zazu.cs.wisc.edu
- >engr.wisc.edu          #University of Wisconsin-Madison, College of Engineering
- 144.92.13.14                    #larry.cae.wisc.edu
- 144.92.13.15                    #curly.cae.wisc.edu
- 144.92.13.16                    #moe.cae.wisc.edu
- >hep.wisc.edu           #University of Wisconsin -- High Energy Physics
- 128.104.28.219                  #anise.hep.wisc.edu
- >physics.wisc.edu       #Univ. of Wisconsin-Madison, Physics Department
- 128.104.160.13                  #kendra.physics.wisc.edu
- 128.104.160.14                  #fray.physics.wisc.edu
- 128.104.160.15                  #buffy.physics.wisc.edu
- >ciemat.es              #Ciemat, Madrid, Spain
- 130.206.11.42                   #afsdb1.ciemat.es
- 130.206.11.217                  #afsdb2.ciemat.es
- 130.206.11.247                  #afsdb3.ciemat.es
- >ifca.unican.es         #Instituto de Fisica de Cantabria (IFCA), Santander, Spain
- 193.144.209.20                  #gridwall.ifca.unican.es
- >ific.uv.es             #Instituto de Fisica Corpuscular, Valencia, Spain
- 147.156.163.11                  #alpha.ific.uv.es
- >biocenter.helsinki.fi  #University of Helsinki, Institute of Biotechnology
- 128.214.58.174                  #afsdb1.biocenter.helsinki.fi
- 128.214.88.114                  #afsdb2.biocenter.helsinki.fi
- >dapnia.saclay.cea.fr   #CEA DAPNIA
- 132.166.32.7                    #dphrsg.saclay.cea.fr
- 132.166.32.12                   #dphrsl.saclay.cea.fr
- >grif.fr                #GRIF cell
- 192.54.208.18                   #node03.datagrid.cea.fr
- >in2p3.fr               #IN2P3 production cell
- 134.158.232.11                  #ccafsdb1.in2p3.fr
- 134.158.232.12                  #ccafsdb2.in2p3.fr
- 134.158.232.13                  #ccafsdb3.in2p3.fr
- >anl.gov                #Argonne National Laboratory
- 146.137.96.33                   #arteus.ctd.anl.gov
- 146.137.162.88                  #agamemnon.ctd.anl.gov
- 146.137.194.80                  #antenor.ctd.anl.gov
- >rhic.bnl.gov           #Relativistic Heavy Ion Collider
- 130.199.6.51                    #rafs03.rcf.bnl.gov
- 130.199.6.52                    #rafs02.rcf.bnl.gov
- 130.199.6.69                    #rafs01.rcf.bnl.gov
- >usatlas.bnl.gov        #US Atlas Tier 1 Facility at BNL
- 130.199.48.32                   #aafs01.usatlas.bnl.gov
- 130.199.48.33                   #aafs02.usatlas.bnl.gov
- 130.199.48.34                   #aafs03.usatlas.bnl.gov
- >fnal.gov               #Fermi National Acclerator Laboratory
- 131.225.68.1                    #fsus01.fnal.gov
- 131.225.68.4                    #fsus03.fnal.gov
- 131.225.68.14                   #fsus04.fnal.gov
- >ic-afs.arc.nasa.gov    #Code IC, Ames Research Center
- 128.102.105.62                  #udanax.arc.nasa.gov
- >jpl.nasa.gov           #Jet Propulsion Laboratory
- 137.78.160.21                   #afsdb08.jpl.nasa.gov
- 137.78.160.22                   #afsdb09.jpl.nasa.gov
- 137.78.160.23                   #afsdb10.jpl.nasa.gov
- >nersc.gov              #National Energy Research Supercomputer Center
- 128.55.128.250                  #mars.nersc.gov
- 128.55.128.252                  #alfred.nersc.gov
- 128.55.128.254                  #lurch.nersc.gov
- >bme.hu                 #Budapest University of Technology and Economics
- 152.66.241.6                    #afs.iit.bme.hu
- >kfki.hu                #Research Institute for Nuclear and Particle Physics - Budapest,H
- 148.6.8.14                      #afs.kfki.hu
- >caspur.it              #CASPUR Inter-University Computing Consortium, Rome
- 193.204.5.45                    #pomodoro.caspur.it
- 193.204.5.46                    #banana.caspur.it
- 193.204.5.50                    #maslo.caspur.it
- >enea.it                #ENEA New Tech. Energy & Environment Agency, Italy
- 192.107.54.5                    #aixfs.frascati.enea.it
- 192.107.54.11                   #rs2ced.frascati.enea.it
- 192.107.54.12                   #43p.frascati.enea.it
- 192.107.61.235                  #serverinfo02.bologna.enea.it
- 192.107.71.6                    #glauco.casaccia.enea.it
- 192.107.96.233                  #riscdb.trisaia.enea.it
- >fusione.it             #Assoz. FUSIONE/Euratom, ENEA, Frascati-Italy
- 192.107.90.2                    #fusafs1.frascati.enea.it
- 192.107.90.3                    #fusafs2.frascati.enea.it
- 192.107.90.4                    #fusafs3.frascati.enea.it
- >icemb.it               #ICEMB, Universita' La Sapienza - Rome - Italy
- 193.204.6.130                   #icembfs.caspur.it
- >infn.it                #Istituto Nazionale di Fisica Nucleare (INFN), Italia
- 131.154.1.7                     #afscnaf.infn.it
- 141.108.26.75                   #afsrm1.roma1.infn.it
- 192.84.134.75                   #afsna.na.infn.it
- >ba.infn.it             #INFN, Sezione di Bari
- 193.206.185.235                 #baafsserver.ba.infn.it
- 193.206.185.236                 #debsrv.ba.infn.it
- >kloe.infn.it           #INFN, KLOE experiment at Laboratori di Frascati
- 192.135.25.111                  #kloeafs1.lnf.infn.it
- 192.135.25.112                  #kloeafs2.lnf.infn.it
- >le.infn.it             #INFN, Sezione di Lecce
- 192.84.152.40                   #afs01.le.infn.it
- 192.84.152.148                  #afs02.le.infn.it
- >lnf.infn.it            #INFN, Laboratori Nazionali di Frascati
- 193.206.84.121                  #afs1.lnf.infn.it
- 193.206.84.122                  #afs2.lnf.infn.it
- 193.206.84.123                  #afs3.lnf.infn.it
- >lngs.infn.it           #INFN, Laboratori Nazionali di Gran Sasso
- 192.84.135.21                   #rsgs05.lngs.infn.it
- >pi.infn.it             #INFN, Sezione di Pisa
- 131.114.134.26                  #unknownhost.pi.infn.it
- 192.84.133.50                   #aix1.pi.infn.it
- >psm.it                 #Progetto San Marco, Universita' di Roma-1
- 151.100.1.65                    #atlante.psm.uniroma1.it
- >tgrid.it               #CASPUR-CILEA-CINECA Grid Cell
- 193.204.5.33                    #cccgrid.caspur.it
- >ictp.trieste.it        #The Abdus Salam International Centre for Theoretical Physics (IC
- 140.105.16.8                    #fs1.ictp.trieste.it
- 140.105.16.9                    #fs2.ictp.trieste.it
- >math.unifi.it          #math.unifi.it
- 150.217.34.182                  #xeno.math.unifi.it
- >ing.uniroma1.it        #Universita' La Sapienza, Fac. Ingeneria
- 151.100.85.253                  #alfa.ing.uniroma1.it
- >dia.uniroma3.it        #University Roma Tre - DIA
- 193.204.161.79                  #plm.dia.uniroma3.it
- 193.204.161.118                 #afs.dia.uniroma3.it
- >vn.uniroma3.it         #University of Rome 3, Area Vasca Navale
- 193.204.161.136                 #alfa.dia.uniroma3.it
- 193.204.161.137                 #beta.dia.uniroma3.it
- 193.204.161.138                 #gamma.dia.uniroma3.it
- >italia                 #Italian public AFS cell
- 193.204.5.9                     #afs.caspur.it
- >cmf.nrl.navy.mil       #Naval Research Lab - CCS
- 134.207.10.68                   #picard.cmf.nrl.navy.mil
- 134.207.10.69                   #riker.cmf.nrl.navy.mil
- 134.207.10.70                   #kirk.cmf.nrl.navy.mil
- >lcp.nrl.navy.mil       #Naval Research Lab - Lab for Computational Physics
- 132.250.114.2                   #afs1.lcp.nrl.navy.mil
- 132.250.114.4                   #afs2.lcp.nrl.navy.mil
- 132.250.114.6                   #afs3.lcp.nrl.navy.mil
- >es.net                 #Energy Sciences Net
- 198.128.3.21                    #fs1.es.net
- 198.128.3.22                    #fs2.es.net
- 198.128.3.23                    #fs3.es.net
- >laroia.net             #Laroia Networks
- 66.66.102.254                   #supercore.laroia.net
- >sinenomine.net         #Sine Nomine Associates
- 192.204.203.218                 #va.sinenomine.net
- >slackers.net           #The Slackers' Network
- 63.201.48.27                    #alexandria.slackers.net
- >tproa.net              #The People's Republic of Ames
- 209.234.76.70                   #service-3.tproa.net
- 209.234.76.75                   #service-4.tproa.net
- 209.234.76.76                   #service-5.tproa.net
- >nikhef.nl              #The Dutch National Institute for High Energy Physics
- 192.16.185.26                   #afs1.nikhef.nl
- 192.16.185.27                   #afs2.nikhef.nl
- >1ts.org                #1TS.ORG, Cambridge, MA
- 69.25.196.51                    #pancake.1ts.org
- >acm-csuf.org           #California State Univerisity Fullerton ACM
- 137.151.29.193                  #afs1.acm-csuf.org
- >bazquux.org            #Baz Quux Organization
- 66.207.142.196                  #baxquux.org
- >coed.org               #Adam Pennington's Cell
- 66.93.61.184                    #vice1.coed.org
- 128.237.157.35                  #vice3.coed.org
- >dementia.org           #Dementia Unlimited
- 128.2.12.45                     #alycia.dementia.org
- 128.2.120.216                   #meredith.dementia.org
- >hackish.org            #Hackish.org
- 24.167.65.213                   #avatar.sys.hackish.org
- 128.2.120.138                   #kurma.sys.hackish.org
- >idahofuturetruck.org   #University of Idaho hybrid vehicle development
- 12.18.238.210                   #dsle210.fsr.net
- >nimlabs.org            #Nimlabs, Ink. Cell.
- 18.238.1.103                    #olfin.nimlabs.org
- 18.238.1.105                    #caerbanog.nimlabs.org
- >nomh.org               #nomh.org
- 204.29.154.12                   #iota.nomh.org
- 204.29.154.32                   #adversity.xi.nomh.org
- >oc7.org                #The OC7 Project
- 128.2.122.140                   #knife.oc7.org
- 207.22.77.170                   #spoon.oc7.org
- >kth.se                 #Royal Institute of Technology, Stockholm, Sweden
- 130.237.32.145                  #sonen.e.kth.se
- 130.237.48.7                    #anden.e.kth.se
- 130.237.48.244                  #fadern.e.kth.se
- >hallf.kth.se           #Royal Institute of Technology, HALLF
- 130.237.24.11                   #afs1.hallf.kth.se
- 130.237.24.104                  #afs2.hallf.kth.se
- >isk.kth.se             #Royal Institute of Technology, ISK
- 130.237.202.3                   #afsdb1.isk.kth.se
- 130.237.209.9                   #afsdb3.isk.kth.se
- 130.237.209.39                  #ezri.isk.kth.se
- >it.kth.se              #Royal Institute of Technology, IT
- 130.237.212.15                  #ptah.it.kth.se
- 130.237.212.16                  #toth.it.kth.se
- 130.237.215.7                   #isis.it.kth.se
- >md.kth.se              #Royal Institute of Technology, MMK
- 130.237.57.68                   #trinity.md.kth.se
- 130.237.57.72                   #morpheus.md.kth.se
- 130.237.67.230                  #neo.speech.kth.se
- >mech.kth.se            #Royal Institute of Technology, MECH
- 130.237.233.142                 #matterhorn.mech.kth.se
- 130.237.233.143                 #castor.mech.kth.se
- 130.237.233.144                 #pollux.mech.kth.se
- >nada.kth.se            #Royal Institute of Technology, NADA
- 130.237.222.20                  #kosmos.nada.kth.se
- 130.237.223.12                  #sputnik.nada.kth.se
- 130.237.224.78                  #mir.nada.kth.se
- 130.237.227.23                  #gagarin.nada.kth.se
- 130.237.228.28                  #laika.nada.kth.se
- >pdc.kth.se             #Royal Institute of Technology, PDC
- 130.237.232.29                  #crab.pdc.kth.se
- 130.237.232.112                 #anna.pdc.kth.se
- 130.237.232.114                 #hokkigai.pdc.kth.se
- >stacken.kth.se         #Stacken Computer Club
- 130.237.234.3                   #milko.stacken.kth.se
- 130.237.234.43                  #hot.stacken.kth.se
- 130.237.237.230                 #fishburger.stacken.kth.se
- >syd.kth.se             #Royal Institute of Technology, KTH-Syd
- 130.237.83.23                   #afs.haninge.kth.se
- >physto.se              #Physics department Stockholm University
- 130.237.205.36                  #sysafs1.physto.se
- 130.237.205.72                  #sysafs2.physto.se
- >sanchin.se             #Sanchin Consulting AB, Sweden
- 192.195.148.10                  #sesan.sanchin.se
- >su.se                  #Stockholm University
- 130.237.162.81                  #afsdb1.su.se
- 130.237.162.82                  #afsdb2.su.se
- 130.237.162.230                 #afsdb3.su.se
- >f9.ijs.si              #F9, Jozef Stefan Institue
- 194.249.156.1                   #brenta.ijs.si
- >p-ng.si                #Nova Gorica Polytechnic
- 193.2.120.2                     #solkan.p-ng.si
- >phy.bris.ac.uk         #Bristol University - phyics
- 137.222.58.9                    #afs1.phy.bris.ac.uk
- >inf.ed.ac.uk           #School of Informatics, University of Edinburgh
- 129.215.64.16                   #afsdb0.inf.ed.ac.uk
- 129.215.64.17                   #afsdb1.inf.ed.ac.uk
- 129.215.64.18                   #afsdb2.inf.ed.ac.uk
- >ic.ac.uk               #Imperial College London
- 155.198.63.148                  #icafs2.cc.ic.ac.uk
- 155.198.63.149                  #icafs1.cc.ic.ac.uk
- >hep.man.ac.uk          #Manchester HEP
- 194.36.2.3                      #afs1.hep.man.ac.uk
- 194.36.2.4                      #afs2.hep.man.ac.uk
- 194.36.2.5                      #afs3.hep.man.ac.uk
- >rl.ac.uk               #Rutherford Appleton Lab, England
- 130.246.183.164                 #wallace.cc.rl.ac.uk
--- 0 ----
Index: openafs/src/packaging/MacOS/OpenAFS.Info.plist
diff -c openafs/src/packaging/MacOS/OpenAFS.Info.plist:1.2.2.31 openafs/src/packaging/MacOS/OpenAFS.Info.plist:removed
*** openafs/src/packaging/MacOS/OpenAFS.Info.plist:1.2.2.31	Mon Mar 19 20:54:11 2007
--- openafs/src/packaging/MacOS/OpenAFS.Info.plist	Thu Oct 11 16:05:10 2007
***************
*** 1,44 ****
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
- <plist version="1.0">
- <dict>
- 	<key>CFBundleGetInfoString</key>
- 	<string>OpenAFS 1.4.4</string>
- 	<key>CFBundleIdentifier</key>
- 	<string>org.openafs.OpenAFS.pkg</string>
- 	<key>CFBundleName</key>
- 	<string>OpenAFS</string>
- 	<key>CFBundleShortVersionString</key>
- 	<string>1.4.4</string>
- 	<key>IFMajorVersion</key>
- 	<integer>1</integer>
- 	<key>IFMinorVersion</key>
- 	<integer>4</integer>
- 	<key>IFPkgFlagAllowBackRev</key>
- 	<false/>
- 	<key>IFPkgFlagAuthorizationAction</key>
- 	<string>RootAuthorization</string>
- 	<key>IFPkgFlagBackgroundAlignment</key>
- 	<string>bottomright</string>
- 	<key>IfPkgFlagBackgroundScaling</key>
- 	<string>proportional</string>
- 	<key>IFPkgFlagDefaultLocation</key>
- 	<string>/</string>
- 	<key>IFPkgFlagInstallFat</key>
- 	<false/>
- 	<key>IFPkgFlagIsRequired</key>
- 	<false/>
- 	<key>IFPkgFlagRelocatable</key>
- 	<false/>
- 	<key>IFPkgFlagRestartAction</key>
- 	<string>NoRestart</string>
- 	<key>IFPkgFlagRootVolumeOnly</key>
- 	<true/>
- 	<key>IFPkgFlagUpdateInstalledLanguages</key>
- 	<false/>
- 	<key>IFPkgFlagUseUserMask</key>
- 	<false/>
- 	<key>IFPkgFormatVersion</key>
- 	<real>0.10000000149011612</real>
- </dict>
- </plist>
--- 0 ----
Index: openafs/src/packaging/MacOS/OpenAFS.Info.plist.in
diff -c /dev/null openafs/src/packaging/MacOS/OpenAFS.Info.plist.in:1.1.4.2
*** /dev/null	Thu Oct 11 16:05:10 2007
--- openafs/src/packaging/MacOS/OpenAFS.Info.plist.in	Thu Oct 11 13:32:56 2007
***************
*** 0 ****
--- 1,44 ----
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+ <plist version="1.0">
+ <dict>
+ 	<key>CFBundleGetInfoString</key>
+ 	<string>OpenAFS @MACOS_VERSION@</string>
+ 	<key>CFBundleIdentifier</key>
+ 	<string>org.openafs.OpenAFS.pkg</string>
+ 	<key>CFBundleName</key>
+ 	<string>OpenAFS</string>
+ 	<key>CFBundleShortVersionString</key>
+ 	<string>@MACOS_VERSION@</string>
+ 	<key>IFMajorVersion</key>
+ 	<integer>1</integer>
+ 	<key>IFMinorVersion</key>
+ 	<integer>5</integer>
+ 	<key>IFPkgFlagAllowBackRev</key>
+ 	<false/>
+ 	<key>IFPkgFlagAuthorizationAction</key>
+ 	<string>RootAuthorization</string>
+ 	<key>IFPkgFlagBackgroundAlignment</key>
+ 	<string>bottomright</string>
+ 	<key>IfPkgFlagBackgroundScaling</key>
+ 	<string>proportional</string>
+ 	<key>IFPkgFlagDefaultLocation</key>
+ 	<string>/</string>
+ 	<key>IFPkgFlagInstallFat</key>
+ 	<false/>
+ 	<key>IFPkgFlagIsRequired</key>
+ 	<false/>
+ 	<key>IFPkgFlagRelocatable</key>
+ 	<false/>
+ 	<key>IFPkgFlagRestartAction</key>
+ 	<string>NoRestart</string>
+ 	<key>IFPkgFlagRootVolumeOnly</key>
+ 	<true/>
+ 	<key>IFPkgFlagUpdateInstalledLanguages</key>
+ 	<false/>
+ 	<key>IFPkgFlagUseUserMask</key>
+ 	<false/>
+ 	<key>IFPkgFormatVersion</key>
+ 	<real>0.10000000149011612</real>
+ </dict>
+ </plist>
Index: openafs/src/packaging/MacOS/OpenAFS.info
diff -c openafs/src/packaging/MacOS/OpenAFS.info:1.1.4.44 openafs/src/packaging/MacOS/OpenAFS.info:removed
*** openafs/src/packaging/MacOS/OpenAFS.info:1.1.4.44	Mon Mar 19 20:54:11 2007
--- openafs/src/packaging/MacOS/OpenAFS.info	Thu Oct 11 16:05:10 2007
***************
*** 1,16 ****
- Title OpenAFS
- Version 1.4.4
- 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)
- DeleteWarning 
- NeedsAuthorization YES
- DisableStop NO
- UseUserMask NO
- Application NO
- Relocatable NO
- Required NO
- InstallOnly NO
- RequiresReboot NO
- InstallFat NO
- rootVolumeOnly YES
--- 0 ----
Index: openafs/src/packaging/MacOS/OpenAFS.info.in
diff -c /dev/null openafs/src/packaging/MacOS/OpenAFS.info.in:1.1.4.2
*** /dev/null	Thu Oct 11 16:05:10 2007
--- openafs/src/packaging/MacOS/OpenAFS.info.in	Thu Oct 11 13:32:56 2007
***************
*** 0 ****
--- 1,16 ----
+ Title OpenAFS
+ Version @VERSION@
+ 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)
+ DeleteWarning 
+ NeedsAuthorization YES
+ DisableStop NO
+ UseUserMask NO
+ Application NO
+ Relocatable NO
+ Required NO
+ InstallOnly NO
+ RequiresReboot NO
+ InstallFat NO
+ rootVolumeOnly YES
Index: openafs/src/packaging/MacOS/buildpkg.sh
diff -c openafs/src/packaging/MacOS/buildpkg.sh:1.4.2.18 openafs/src/packaging/MacOS/buildpkg.sh:1.4.2.20
*** openafs/src/packaging/MacOS/buildpkg.sh:1.4.2.18	Fri Jan  5 18:34:01 2007
--- openafs/src/packaging/MacOS/buildpkg.sh	Wed Oct 10 13:43:36 2007
***************
*** 122,128 ****
      else
  	echo /Network/afs:/var/db/openafs/cache:30000 > $PKGROOT/private/var/db/openafs/etc/cacheinfo.sample
      fi
!     echo '-memcache -afsdb -stat 2000 -dcache 800 -daemons 3 -volumes 70 -dynroot -fakestat-all' > $PKGROOT/private/var/db/openafs/etc/config/afsd.options.sample
  
      strip -X -S $PKGROOT/Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs
  
--- 122,128 ----
      else
  	echo /Network/afs:/var/db/openafs/cache:30000 > $PKGROOT/private/var/db/openafs/etc/cacheinfo.sample
      fi
!     echo '-afsdb -stat 2000 -dcache 800 -daemons 3 -volumes 70 -dynroot -fakestat-all' > $PKGROOT/private/var/db/openafs/etc/config/afsd.options.sample
  
      strip -X -S $PKGROOT/Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs
  
Index: openafs/src/packaging/RedHat/kmodtool
diff -c /dev/null openafs/src/packaging/RedHat/kmodtool:1.1.4.2
*** /dev/null	Thu Oct 11 16:05:10 2007
--- openafs/src/packaging/RedHat/kmodtool	Thu Oct 11 10:16:23 2007
***************
*** 0 ****
--- 1,172 ----
+ #!/bin/bash
+ 
+ # kmodtool - Helper script for building kernel module RPMs
+ # Copyright (c) 2003-2007 Ville SkyttÃ¤ <ville.skytta@iki.fi>,
+ #                         Thorsten Leemhuis <fedora@leemhuis.info>
+ #
+ # Permission is hereby granted, free of charge, to any person obtaining
+ # a copy of this software and associated documentation files (the
+ # "Software"), to deal in the Software without restriction, including
+ # without limitation the rights to use, copy, modify, merge, publish,
+ # distribute, sublicense, and/or sell copies of the Software, and to
+ # permit persons to whom the Software is furnished to do so, subject to
+ # the following conditions:
+ #
+ # The above copyright notice and this permission notice shall be
+ # included in all copies or substantial portions of the Software.
+ #
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ 
+ shopt -s extglob
+ 
+ myprog="kmodtool"
+ myver="0.10.13"
+ knownvariants=@(BOOT|PAE?(-debug)|@(big|huge)mem|debug|enterprise|kdump|?(large)smp?(-debug)|uml|xen?([0U])?(-PAE))
+ kmod_name=
+ kver=
+ verrel=
+ variant=
+ 
+ get_verrel ()
+ {
+   verrel=${1:-$(uname -r)}
+   verrel=${verrel%%$knownvariants}
+ }
+ 
+ print_verrel ()
+ {
+   get_verrel $@
+   echo "${verrel}"
+ }
+ 
+ get_variant ()
+ {
+   get_verrel $@
+   variant=${1:-$(uname -r)}
+   variant=${variant##$verrel}
+   variant=${variant:-'""'}
+ }
+ 
+ print_variant ()
+ {
+   get_variant $@
+   echo "${variant}"
+ }
+ 
+ 
+ get_rpmtemplate ()
+ {
+     local variant="${1}"
+     local dashvariant="${variant:+-${variant}}"
+     case "$verrel" in
+         *.EL*) kdep="kernel${dashvariant}-%{_target_cpu} = ${verrel}" ;;
+         *)     kdep="kernel-%{_target_cpu} = ${verrel}${variant}"     ;;
+     esac
+     cat <<EOF
+ %package       -n kmod-${kmod_name}${dashvariant}
+ Summary:          ${kmod_name} kernel module(s)
+ Group:            System Environment/Kernel
+ Provides:         kernel-modules = ${verrel}${variant}
+ Provides:         ${kmod_name}-kmod = %{?epoch:%{epoch}:}%{version}-%{release}
+ Requires:         ${kdep}
+ Requires:         ${kmod_name}-kmod-common >= %{?epoch:%{epoch}:}%{version}
+ Requires(post):   /sbin/depmod
+ Requires(postun): /sbin/depmod
+ BuildRequires:    kernel${dashvariant}-devel-%{_target_cpu} = ${verrel}
+ %description   -n kmod-${kmod_name}${dashvariant}
+ This package provides the ${kmod_name} kernel modules built for the Linux
+ kernel ${verrel}${variant} for the %{_target_cpu} family of processors.
+ %post          -n kmod-${kmod_name}${dashvariant}
+ /sbin/depmod -aeF /boot/System.map-${verrel}${variant} ${verrel}${variant} > /dev/null || :
+ %postun        -n kmod-${kmod_name}${dashvariant}
+ /sbin/depmod -aF /boot/System.map-${verrel}${variant} ${verrel}${variant} &> /dev/null || :
+ %files         -n kmod-${kmod_name}${dashvariant}
+ %defattr(644,root,root,755)
+ /lib/modules/${verrel}${variant}/extra/${kmod_name}/
+ 
+ EOF
+ }
+ 
+ print_rpmtemplate ()
+ {
+   kmod_name="${1}"
+   shift
+   kver="${1}"
+   get_verrel "${1}"
+   shift
+   if [ -z "${kmod_name}" ] ; then
+     echo "Please provide the kmodule-name as first parameter." >&2
+     exit 2
+   elif [ -z "${kver}" ] ; then
+     echo "Please provide the kver as second parameter." >&2
+     exit 2
+   elif [ -z "${verrel}" ] ; then
+     echo "Couldn't find out the verrel." >&2
+     exit 2
+   fi
+ 
+   for variant in "$@" ; do
+     get_rpmtemplate "${variant}"
+   done
+ }
+ 
+ usage ()
+ {
+   cat <<EOF
+ You called: ${invocation}
+ 
+ Usage: ${myprog} <command> <option>+
+  Commands:
+   verrel <uname>                               
+     - Get "base" version-release.
+   variant <uname>                               
+     - Get variant from uname.
+   rpmtemplate <mainpgkname> <uname> <variants> 
+     - Return a template for
+   version  
+     - Output version number and exit.
+ EOF
+ }
+ 
+ invocation="$(basename ${0}) $@"
+ while [ "${1}" ] ; do
+   case "${1}" in
+     verrel)
+       shift
+       print_verrel $@
+       exit $?
+       ;;
+     variant)
+       shift
+       print_variant $@
+       exit $?
+       ;;
+     rpmtemplate)
+       shift
+       print_rpmtemplate "$@"
+       exit $?
+       ;;
+     version)
+       echo "${myprog} ${myver}"
+       exit 0
+       ;;
+     *)
+       echo "Error: Unknown option '${1}'." >&2
+       usage >&2
+       exit 2
+       ;;
+   esac
+ done
+ 
+ # Local variables:
+ # mode: sh
+ # sh-indentation: 2
+ # indent-tabs-mode: nil
+ # End:
+ # ex: ts=2 sw=2 et
Index: openafs/src/packaging/RedHat/openafs.spec.in
diff -c openafs/src/packaging/RedHat/openafs.spec.in:1.1.2.2 openafs/src/packaging/RedHat/openafs.spec.in:1.1.2.3
*** openafs/src/packaging/RedHat/openafs.spec.in:1.1.2.2	Fri Dec  1 13:34:13 2006
--- openafs/src/packaging/RedHat/openafs.spec.in	Thu Oct 11 10:16:23 2007
***************
*** 1,7 ****
! # Openafs Spec $Revision: 1.1.2.2 $
  
! %define afsvers 1.4.2
! %define pkgvers 1.4.2
  # for beta/rc releases make pkgrel 0.X.<tag>
  # for real releases make pkgrel 1 (or more for extra releases)
  #%define pkgrel 0.1.rc1
--- 1,7 ----
! # Openafs Spec $Revision: 1.1.2.3 $
  
! %define afsvers 1.4.5pre1
! %define pkgvers 1.4.5pre1
  # for beta/rc releases make pkgrel 0.X.<tag>
  # for real releases make pkgrel 1 (or more for extra releases)
  #%define pkgrel 0.1.rc1
***************
*** 11,16 ****
--- 11,18 ----
  %define osvers 1
  %endif
  
+ %{!?fedorakmod: %define fedorakmod 0}
+ 
  # Determine presence of rpmbuild command line --define arguments used for
  # option specification
  %define kernvers_on_cmdline %{?kernvers:1}%{!?kernvers:0}
***************
*** 24,29 ****
--- 26,55 ----
  %if !%{kernvers_on_cmdline}
  %define kernvers %(%{_sourcedir}/openafs-kernel-version.sh)
  %endif
+ 
+ %if %{fedorakmod}
+ %define kmodtool bash %{_sourcedir}/kmodtool
+ 
+ %define kmod_name openafs
+ %define kverrel %(%{kmodtool} verrel %{?kernvers} 2>/dev/null)
+ 
+ %define upvar ""
+ %ifarch i686
+ %define paevar PAE
+ %endif
+ %ifarch ppc
+ %define smpvar smp
+ %endif
+ %ifarch i686 x86_64
+ %define xenvar xen
+ %define kdumpvar kdump
+ %endif
+ %{!?kvariants: %define kvariants %{?upvar} %{?smpvar} %{?paevar} %{?xenvar} %{?kdumpvar}}
+ 
+ %define ksrcdir %{_usrsrc}/kernels/%{kverrel}-%{_target_cpu}
+ 
+ %else # Legacy kernel build stuff 
+ 
  %define kversis %{_sourcedir}/openafs-kvers-is.sh
  %define kvers %(%{kversis} parsev %{kernvers})
  %define kvers_is_24 %(%{kversis} %{kvers} "2.4")
***************
*** 51,56 ****
--- 77,85 ----
  %endif
  %define kxmoddir %{kmoddir}/%{kernvers}
  
+ # End legacy kernel build stuff
+ %endif 
+ 
  # Set 'debugspec' to 1 if you want to debug the spec file.  This will
  # not remove the installed tree as part of the %clean operation
  %if %{?debugspec:0}%{!?debugspec:1}
***************
*** 74,79 ****
--- 103,110 ----
  # Define the location of the PAM security module directory
  %define pamdir /%{_lib}/security
  
+ %if !%{fedorakmod}
+ 
  # Define the set of kernel module variations to be built:
  # For 2.4 kernels we just build everything at once for a particular
  # kernel.   So we build up, smp, and bigmem all at once.
***************
*** 138,143 ****
--- 169,177 ----
  %endif
  %endif
  
+ # End of legacy kernel module build
+ %endif 
+ 
  #######################################################################
  # You probably don't need to change anything beyond this line
  # NOTE: If you do, please email me!!!
***************
*** 206,242 ****
  Source1: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-doc.tar.bz2
  %define srcdir openafs-%{afsvers}
  
- Source2: openafs-ThisCell
- # http://grand.central.org/dl/cellservdb/CellServDB
- Source3: openafs-CellServDB
- Source4: openafs-SuidCells
- Source5: openafs-cacheinfo
- # Source6: openafs-afsmodname
- Source7: openafs-LICENSE.Sun
- Source8: openafs-README
  Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
  Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
  
- Source15: openafs.sysconfig
- Source16: openafs-client.init
- Source17: openafs-server.init
- 
- #  from ftp://ftp.cmf.nrl.navy.mil/pub/kerberos5/afs-krb5-2.0.tar.gz
- Source20: openafs-krb5-2.0.tar.gz
- 
  Source30: openafs-kernel-version.sh
! Source31: openafs-buildall.sh
! Source32: openafs-makesrc.sh
! Source33: openafs-kvers-is.sh
  
  Patch0:  openafs-1.4.0-kmodule26.patch
- #Patch1:  openafs-1.4.1-moduleparam.patch
- 
- Patch10: afs-krb5-2.0-krb524.patch
- Patch11: afs-krb5-2.0-libsocket.patch
- Patch12: afs-krb5-2.0-com_err.patch
- Patch13: afs-krb5-2.0-openafs1.3.patch
- Patch14: afs-krb5-2.0-res_search.patch
  
  %description
  The AFS distributed filesystem.  AFS is a distributed filesystem
--- 240,252 ----
  Source1: http://www.openafs.org/dl/openafs/%{afsvers}/openafs-%{afsvers}-doc.tar.bz2
  %define srcdir openafs-%{afsvers}
  
  Source10: http://www.openafs.org/dl/openafs/%{afsvers}/RELNOTES-%{afsvers}
  Source11: http://www.openafs.org/dl/openafs/%{afsvers}/ChangeLog
  
  Source30: openafs-kernel-version.sh
! Source999: kmodtool
  
  Patch0:  openafs-1.4.0-kmodule26.patch
  
  %description
  The AFS distributed filesystem.  AFS is a distributed filesystem
***************
*** 280,285 ****
--- 290,297 ----
                                    will be installed.  You probably don't
                                    need to change this ever.
  
+  --define "fedorakmod 1"	  Build 'Fedora' style kernel modules
+ 
  To a kernel module for your running kernel, just run:
    rpmbuild --rebuild --target=`uname -m` openafs-%{pkgvers}-%{osvers}.%{pkgrel}.src.rpm
  
***************
*** 291,297 ****
  %if %{build_userspace}
  
  %package client
! Requires: binutils, openafs-kernel, openafs = %{PACKAGE_VERSION}
  Summary: OpenAFS Filesystem Client
  Group: Networking/Filesystem
  
--- 303,317 ----
  %if %{build_userspace}
  
  %package client
! Requires: binutils, openafs = %{PACKAGE_VERSION}
! 
! %if %{fedorakmod}
! Requires: %{name}-kmod >= %{version}
! Provides: %{name}-kmod-common = %{version}
! %else
! Requires: openafs-kernel
! %endif
! 
  Summary: OpenAFS Filesystem Client
  Group: Networking/Filesystem
  
***************
*** 385,390 ****
--- 405,413 ----
  Summary: OpenAFS Kernel Module source tree
  Group: Networking/Filesystems
  Provides: openafs-kernel = %{PACKAGE_VERSION}
+ %if %{fedorakmod}
+ Provides: %{name}-kmod = %{PACKAGE_VERSION}
+ %endif
  
  %description kernel-source
  The AFS distributed filesystem.  AFS is a distributed filesystem
***************
*** 453,458 ****
--- 476,487 ----
  ##############################################################################
  %if %{build_modules}
  
+ %if %{fedorakmod}
+ %{expand:%(%{kmodtool} rpmtemplate %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null)}
+ 
+ %else
+ 
+ # Legacy kernel compilation code here ...
  %define modkversion %(echo %{kernvers} | cut -d- -f1)
  %define modkrelease %(echo %{kernvers} | cut -d- -f2)
  %define modpkgrel %{modkversion}_%{modkrelease}_%{pkgrel}
***************
*** 563,568 ****
--- 592,599 ----
  %endif
  
  %endif
+ # End legacy kernel compilation code ...
+ %endif
  
  ##############################################################################
  #
***************
*** 575,580 ****
--- 606,614 ----
  : @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  : @@@
  : @@@ kernel version:     %{kernvers}
+ %if %{fedorakmod}
+ : @@@ kernel variations:  %{kvariants}
+ %else
  : @@@ base kernel version:%{kversion}
  : @@@ kernel modules dir: %{kxmoddir}
  : @@@ kernel source dir:  %{ksrcdir}
***************
*** 587,592 ****
--- 621,627 ----
  : @@@ kernel type:        %{ktype}
  %endif
  %endif
+ %endif
  : @@@ PAM modules dir:    %{pamdir}
  : @@@ build userspace:    %{build_userspace}
  : @@@ build modules:      %{build_modules}
***************
*** 602,615 ****
  # Patch openafs to build a kernel module named "openafs" instead of "libafs"
  %patch0 -p1 -b .kmod26
  
- # Patch to work around the Linux 2.6.9 module_param function
- #%patch1 -p0 -b .modparam
- 
  %if %{build_userspace}
  # Save some time -- install these if we're building userspace
  
  # Install the Krb5 Migration Kit
! %setup -q -T -D -a 20 -n %{srcdir}
  
  #
  # patch afs-krb5 migration kit to work with openafs-1.3 and krb5-1.3;
--- 637,647 ----
  # Patch openafs to build a kernel module named "openafs" instead of "libafs"
  %patch0 -p1 -b .kmod26
  
  %if %{build_userspace}
  # Save some time -- install these if we're building userspace
  
  # Install the Krb5 Migration Kit
! tar -xzf src/packaging/RedHat/openafs-krb5-2.0.tar.gz
  
  #
  # patch afs-krb5 migration kit to work with openafs-1.3 and krb5-1.3;
***************
*** 617,642 ****
  #
  
  # krb524 is no longer in a separate library as of krb5-1.3; handle this
! %patch10 -p0 -b .krb524
  
  # make sure NETLIBS gets added to the proper programs (seems to be 
  # needed only for Solaris)
! %patch11 -p0 -b .libsocket
  
  # find an existing libcom_err and use that
! %patch12 -p0 -b .com_err
  
  # make afs-krb5 work with recent OpenAFS; includes and prototypes
! %patch13 -p0 -b .openafs13
  
  # nothing in afs-krb5 actually uses res_search
! %patch14 -p0 -b .res_search
  
  (cd afs-krb5/src && autoreconf) || exit 1
  
  %endif
  
- 
  ##############################################################################
  #
  # building
--- 649,673 ----
  #
  
  # krb524 is no longer in a separate library as of krb5-1.3; handle this
! patch -p0 -b -z .krb524 < src/packaging/RedHat/afs-krb5-2.0-krb524.patch
  
  # make sure NETLIBS gets added to the proper programs (seems to be 
  # needed only for Solaris)
! patch -p0 -b -z .libsocket < src/packaging/RedHat/afs-krb5-2.0-libsocket.patch
  
  # find an existing libcom_err and use that
! patch -p0 -b -z .com_err < src/packaging/RedHat/afs-krb5-2.0-com_err.patch
  
  # make afs-krb5 work with recent OpenAFS; includes and prototypes
! patch -p0 -b -z .openafs13 < src/packaging/RedHat/afs-krb5-2.0-openafs1.3.patch
  
  # nothing in afs-krb5 actually uses res_search
! patch -p0 -b -z .res_search < src/packaging/RedHat/afs-krb5-2.0-res_search.patch
  
  (cd afs-krb5/src && autoreconf) || exit 1
  
  %endif
  
  ##############################################################################
  #
  # building
***************
*** 784,803 ****
         --libdir=%{_libdir} \
         --bindir=%{_bindir} \
         --sbindir=%{_sbindir} \
         --with-linux-kernel-headers=%{ksrcdir} \
  %if %{krb5support}
  	--with-krb5-conf \
  %endif
         $config_opts \
         || exit 1
  
  %if %{build_userspace}
  # Build the user-space AFS stuff
  make dest_nolibafs || exit 1
  
- # Build the libafs tree
- make only_libafs_tree || exit 1
- 
  %if %{krb5support}
  # Now build ka-forwarder
  (cd afs-krb5/src &&
--- 815,857 ----
         --libdir=%{_libdir} \
         --bindir=%{_bindir} \
         --sbindir=%{_sbindir} \
+ %if %{build_modules}
         --with-linux-kernel-headers=%{ksrcdir} \
+ %endif
  %if %{krb5support}
  	--with-krb5-conf \
  %endif
         $config_opts \
         || exit 1
  
+ # Build the libafs tree
+ make only_libafs_tree || exit 1
+ 
+ # Configure each of our kernel modules
+ 
+ %if %{fedorakmod} && %{build_modules}
+ for kvariant in %{kvariants} ; do
+   cp -R libafs_tree _kmod_build_${kvariant}
+   pushd _kmod_build_${kvariant}
+   ./configure --with-afs-sysname=${sysname} \
+   	--prefix=%{_prefix} \
+ 	--libdir=%{_libdir} \
+ 	--bindir=%{_bindir} \
+ 	--sbindir=%{_sbindir} \
+ 	--with-linux-kernel-headers=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu} \
+ %if %{krb5support}
+ 	--with-krb5-conf \
+ %endif
+ 	$config_opts \
+ 	|| exit 1
+   popd
+ done
+ %endif
+ 
  %if %{build_userspace}
  # Build the user-space AFS stuff
  make dest_nolibafs || exit 1
  
  %if %{krb5support}
  # Now build ka-forwarder
  (cd afs-krb5/src &&
***************
*** 814,819 ****
--- 868,884 ----
  %endif
  
  %if %{build_modules}
+ %if %{fedorakmod}
+ for kvariant in %{kvariants}
+ do
+   pushd _kmod_build_$kvariant;
+   make all MPS=SP
+   popd
+ done
+ 
+ %else
+ # Begin legacy kernel module building code
+ 
  %if %{kvers_is_24}
  # Build all the kernel modules for linux 2.4.x
  for variation in %{kvariations}
***************
*** 843,848 ****
--- 908,915 ----
    make dest_only_libafs MPS=SP
  
  %endif
+ # End legacy kernel module building code
+ %endif
  %endif
  
  
***************
*** 905,913 ****
  ln -f $RPM_BUILD_ROOT%{_bindir}/kpasswd $RPM_BUILD_ROOT%{_bindir}/kapasswd
  
  # Copy root.client config files
! install -m 755 %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/openafs
! install -m 755 %{SOURCE16} $RPM_BUILD_ROOT%{initdir}/openafs-client
! install -m 755 %{SOURCE17} $RPM_BUILD_ROOT%{initdir}/openafs-server
  
  # Copy PAM modules
  install -m 755 ${sysname}/dest/lib/pam* $RPM_BUILD_ROOT%{pamdir}
--- 972,980 ----
  ln -f $RPM_BUILD_ROOT%{_bindir}/kpasswd $RPM_BUILD_ROOT%{_bindir}/kapasswd
  
  # Copy root.client config files
! install -m 755 src/packaging/RedHat/openafs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openafs
! install -m 755 src/packaging/RedHat/openafs-client.init $RPM_BUILD_ROOT%{initdir}/openafs-client
! install -m 755 src/packaging/RedHat/openafs-server.init $RPM_BUILD_ROOT%{initdir}/openafs-server
  
  # Copy PAM modules
  install -m 755 ${sysname}/dest/lib/pam* $RPM_BUILD_ROOT%{pamdir}
***************
*** 918,927 ****
  
  # Populate /usr/vice/etc
  uve=$RPM_BUILD_ROOT%{_prefix}/vice/etc
! install -p -m 644 %{SOURCE2} $uve/ThisCell
! install -p -m 644 %{SOURCE3} $uve/CellServDB.dist
! install -p -m 644 %{SOURCE4} $uve/SuidCells.dist
! install -p -m 644 %{SOURCE5} $uve/cacheinfo
  
  #
  # install kernel-source
--- 985,993 ----
  
  # Populate /usr/vice/etc
  uve=$RPM_BUILD_ROOT%{_prefix}/vice/etc
! install -p -m 644 src/packaging/RedHat/openafs-ThisCell $uve/ThisCell
! install -p -m 644 src/afsd/CellServDB $uve/CellServDB.dist
! install -p -m 644 src/packaging/RedHat/openafs-cacheinfo $uve/cacheinfo
  
  #
  # install kernel-source
***************
*** 934,941 ****
  
  # Next, copy the LICENSE Files, README
  install -m 644 src/LICENSE $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
! install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
! install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/README
  
  #
  # Install DOCUMENTATION
--- 1000,1007 ----
  
  # Next, copy the LICENSE Files, README
  install -m 644 src/LICENSE $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.IBM
! install -m 644 src/packaging/RedHat/openafs-LICENSE.Sun $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/LICENSE.Sun
! install -m 644 src/packaging/RedHat/openafs-README $RPM_BUILD_ROOT%{_prefix}/src/openafs-kernel-%{afsvers}/README
  
  #
  # Install DOCUMENTATION
***************
*** 1013,1019 ****
  %{_sbindir}/fms
  %{_sbindir}/fstrace
  %{_sbindir}/kas
- %{_sbindir}/kseal
  %{_sbindir}/read_tape
  %{_sbindir}/restorevol
  %{_sbindir}/rxdebug
--- 1079,1084 ----
***************
*** 1092,1097 ****
--- 1157,1174 ----
  %endif
  
  %if %{build_modules}
+ %if %{fedorakmod}
+ for kvariant in %{kvariants}
+ do
+     pushd _kmod_build_$kvariant
+     srcdir=src/libafs/MODLOAD-%{kverrel}${kvariant}-SP
+     dstdir=$RPM_BUILD_ROOT/lib/modules/%{kverrel}${kvariant}/extra/openafs
+ 
+     mkdir -p ${dstdir}
+     install -m 744 ${srcdir}/libafs-%{kverrel}${kvariant}.ko $dstdir/openafs.ko
+     popd
+ done
+ %else
  # Install the kernel modules
  for variation in %{kvariations}
  do
***************
*** 1114,1119 ****
--- 1191,1197 ----
      install -m 744 ${srcdir}/${modname} ${dstdir}/openafs${kmodend}
  done
  %endif
+ %endif
  
  ##############################################################################
  ###
***************
*** 1146,1160 ****
  	chmod 0755 /afs
  fi
  
! # Create the CellServDB and SuidCells
  [ -f /usr/vice/etc/CellServDB.local ] || touch /usr/vice/etc/CellServDB.local
- [ -f /usr/vice/etc/SuidCells.local ] || touch /usr/vice/etc/SuidCells.local
  
  ( cd /usr/vice/etc ; \
    cat CellServDB.local CellServDB.dist > CellServDB ; \
!   chmod 644 CellServDB ; \
!   cat SuidCells.local SuidCells.dist > SuidCells ; \
!   chmod 644 SuidCells )
  
  echo
  echo The AFS cache is configured for 100 MB. Edit the
--- 1224,1235 ----
  	chmod 0755 /afs
  fi
  
! # Create the CellServDB
  [ -f /usr/vice/etc/CellServDB.local ] || touch /usr/vice/etc/CellServDB.local
  
  ( cd /usr/vice/etc ; \
    cat CellServDB.local CellServDB.dist > CellServDB ; \
!   chmod 644 CellServDB )
  
  echo
  echo The AFS cache is configured for 100 MB. Edit the
***************
*** 1192,1200 ****
  if [ $1 = 0 ] ; then
          %{initdir}/openafs-client stop
          chkconfig --del openafs-client
- 
-         rm -f /usr/vice/etc/CellServDB /usr/vice/etc/SuidCells
-         rm -f /usr/vice/etc/CellServDB.local /usr/vice/etc/SuidCells.local
  fi
  
  %preun server
--- 1267,1272 ----
***************
*** 1206,1212 ****
  %endif
  
  %if %{build_modules}
! 
  %if %{up_package}
  %post kernel
  /sbin/depmod -ae %{kernvers}
--- 1278,1284 ----
  %endif
  
  %if %{build_modules}
! %if !%{fedorakmod}
  %if %{up_package}
  %post kernel
  /sbin/depmod -ae %{kernvers}
***************
*** 1247,1253 ****
  %postun kernel-hugemem
  /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
  %endif
! 
  %endif
  
  
--- 1319,1325 ----
  %postun kernel-hugemem
  /sbin/depmod -ae %{kernvers}%{?hugemem_ext:%{hugemem_ext}}
  %endif
! %endif
  %endif
  
  
***************
*** 1273,1279 ****
  %dir %{_prefix}/vice/cache
  %dir %{_prefix}/vice/etc
  %{_prefix}/vice/etc/CellServDB.dist
- %{_prefix}/vice/etc/SuidCells.dist
  %config %{_prefix}/vice/etc/ThisCell
  %config %{_prefix}/vice/etc/cacheinfo
  %{_bindir}/cmdebug
--- 1345,1350 ----
***************
*** 1289,1294 ****
--- 1360,1366 ----
  %{_mandir}/man5/afs*
  %{_mandir}/man5/cacheinfo.*
  %{_mandir}/man8/afsd.*
+ %{_mandir}/man5/CellAlias.*
  
  %files server
  %defattr(-,root,root)
***************
*** 1302,1307 ****
--- 1374,1380 ----
  %{_prefix}/afs/bin/fileserver
  # Should we support KAServer?
  %{_prefix}/afs/bin/kaserver
+ %{_prefix}/afs/bin/ka-forwarder
  %{_prefix}/afs/bin/pt_util
  %{_prefix}/afs/bin/ptserver
  %{_prefix}/afs/bin/salvager
***************
*** 1343,1350 ****
--- 1416,1425 ----
  %{_mandir}/man8/buserver.*
  %{_mandir}/man8/fileserver.*
  %{_mandir}/man8/kadb_check.*
+ %{_mandir}/man8/ka-forwarder.*
  %{_mandir}/man8/prdb_check.*
  %{_mandir}/man8/ptserver.*
+ %{_mandir}/man8/pt_util.*
  %{_mandir}/man8/salvager.*
  %{_mandir}/man8/upclient.*
  %{_mandir}/man8/upserver.*
***************
*** 1427,1432 ****
--- 1502,1508 ----
  
  %if %{build_modules}
  
+ %if !%{fedorakmod}
  %if %{up_package}
  %files kernel
  %defattr(-,root,root)
***************
*** 1456,1461 ****
--- 1532,1538 ----
  %defattr(-,root,root)
  %{kxmoddir}%{?hugemem_ext:%{hugemem_ext}}/kernel/fs/openafs/openafs.*
  %endif
+ %endif
  
  %endif
  
***************
*** 1465,1476 ****
  ###
  ##############################################################################
  %changelog
  * Fri Dec 01 2006  Derrick Brashear <shadow@dementia.org> 1.4.2-2
  - integrate s390x changes
  - allow for building libafs*.a and not libafs*.so into packages, for platforms
    that won't build the .so files.
  
! * Sun Aug 20 2006  Derrick Brashear <shadow@dementia.org> 1.4.2-1
  - update to 1.4.2
  - use installed aklog manpage.
  - moduleparam patch obsoleted.
--- 1542,1560 ----
  ###
  ##############################################################################
  %changelog
+ * Wed Oct 10 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.5pre1-1
+ - Use Fedora style kmods, which allows us to install multiple kernel types
+ 
+ * Thu Jun 07 2007  Simon Wilkinson <simon@sxw.org.uk> 1.4.4-3
+ - Use distributed files, rather than those in packager's SOURCE directory
+ - Remove SuidCells stuff, which was unused
+ 
  * Fri Dec 01 2006  Derrick Brashear <shadow@dementia.org> 1.4.2-2
  - integrate s390x changes
  - allow for building libafs*.a and not libafs*.so into packages, for platforms
    that won't build the .so files.
  
! * Wed Aug 23 2006  Derrick Brashear <shadow@dementia.org> 1.4.2-1
  - update to 1.4.2
  - use installed aklog manpage.
  - moduleparam patch obsoleted.
Index: openafs/src/ptserver/NTMakefile
diff -c openafs/src/ptserver/NTMakefile:1.9.2.4 openafs/src/ptserver/NTMakefile:1.9.2.5
*** openafs/src/ptserver/NTMakefile:1.9.2.4	Mon Jul 31 17:51:21 2006
--- openafs/src/ptserver/NTMakefile	Sat Aug 11 19:50:02 2007
***************
*** 10,16 ****
  RELDIR=ptserver
  !INCLUDE ..\config\NTMakefile.$(SYS_NAME)
  !include ..\config\NTMakefile.version
! AFSDEV_AUXCDEFINES = -DAFS_USE_GETTIMEOFDAY
  
  ############################################################################
  # Definitions for installing header files
--- 10,16 ----
  RELDIR=ptserver
  !INCLUDE ..\config\NTMakefile.$(SYS_NAME)
  !include ..\config\NTMakefile.version
! AFSDEV_AUXCDEFINES = -DAFS_USE_GETTIMEOFDAY -DSUPERGROUPS
  
  ############################################################################
  # Definitions for installing header files
***************
*** 52,57 ****
--- 52,58 ----
  	$(OUT)\ptutils.obj \
  	$(OUT)\ptprocs.obj \
  	$(OUT)\utils.obj \
+         $(OUT)\map.obj \
  	$(OUT)\ptserver.res
  
  
Index: openafs/src/ptserver/db_verify.c
diff -c openafs/src/ptserver/db_verify.c:1.16 openafs/src/ptserver/db_verify.c:1.16.2.3
*** openafs/src/ptserver/db_verify.c:1.16	Wed Jun 23 10:27:41 2004
--- openafs/src/ptserver/db_verify.c	Sat Aug 11 19:50:02 2007
***************
*** 12,18 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/db_verify.c,v 1.16 2004/06/23 14:27:41 shadow Exp $");
  
  /*
   *                      (3) Define a structure, idused, instead of an
--- 12,18 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/db_verify.c,v 1.16.2.3 2007/08/11 23:50:02 jaltman Exp $");
  
  /*
   *                      (3) Define a structure, idused, instead of an
***************
*** 57,62 ****
--- 57,63 ----
  #include <afs/afsutil.h>
  #include <ubik.h>
  #include <afs/cmd.h>
+ #include <afs/com_err.h>
  
  #include "ptint.h"
  #include "pterror.h"
***************
*** 121,127 ****
  
      code = pr_Read(0, (char *)&cheader, sizeof(cheader));
      if (code) {
! 	com_err(whoami, code, "couldn't read header");
  	return code;
      }
      /* Check and see if database exists and is approximately OK. */
--- 122,128 ----
  
      code = pr_Read(0, (char *)&cheader, sizeof(cheader));
      if (code) {
! 	afs_com_err(whoami, code, "couldn't read header");
  	return code;
      }
      /* Check and see if database exists and is approximately OK. */
***************
*** 129,135 ****
  	|| ntohl(cheader.eofPtr) == 0) {
  	if (code)
  	    return code;
! 	com_err(whoami, PRDBBAD, "header is bad");
  	return PRDBBAD;
      }
      return 0;
--- 130,136 ----
  	|| ntohl(cheader.eofPtr) == 0) {
  	if (code)
  	    return code;
! 	afs_com_err(whoami, PRDBBAD, "header is bad");
  	return PRDBBAD;
      }
      return 0;
***************
*** 313,319 ****
  
  	    id = ntohl(e.id);
  
! 	    if (((ntohl(e.flags) & (PRGRP | PRINST)) == 0)
  		&& (strchr(e.name, '@'))) {
  		/* Foreign user */
  		if (id > misc->maxForId)
--- 314,320 ----
  
  	    id = ntohl(e.id);
  
! 	    if (((e.flags & htonl((PRGRP | PRINST))) == 0)
  		&& (strchr(e.name, '@'))) {
  		/* Foreign user */
  		if (id > misc->maxForId)
***************
*** 468,475 ****
  		break;
  	}
  #if defined(SUPERGROUPS)
! 	sghead = g->nextsg;
! 	if ((e->flags & PRGRP)) {
  	    for (i = 0; i < SGSIZE; ++i) {
  		afs_int32 id = ntohl(g->supergroup[i]);
  		if (id == PRBADID)
--- 469,476 ----
  		break;
  	}
  #if defined(SUPERGROUPS)
! 	sghead = ntohl(g->nextsg);
! 	if ((e->flags & htonl(PRGRP))) {
  	    for (i = 0; i < SGSIZE; ++i) {
  		afs_int32 id = ntohl(g->supergroup[i]);
  		if (id == PRBADID)
***************
*** 501,507 ****
      for (na = sghead; na; na = ntohl(c.next)) {
  	code = ConvertDiskAddress(na, &ni);
  	if (code) {
! 	    fprintf(stderr, "Bad continuation ptr %d", na);
  	    if (PrintEntryError(misc, ea, e, 2))
  		return PRDBBAD;
  	    if (na != sghead) {
--- 502,508 ----
      for (na = sghead; na; na = ntohl(c.next)) {
  	code = ConvertDiskAddress(na, &ni);
  	if (code) {
! 	    fprintf(stderr, "Bad SGcontinuation ptr %d", na);
  	    if (PrintEntryError(misc, ea, e, 2))
  		return PRDBBAD;
  	    if (na != sghead) {
***************
*** 688,694 ****
  #if defined(SUPERGROUPS)
  	noErrors = 0;
      }
!     if (e && (e->flags & PRGRP) && (sgcount != ntohl(g->countsg))) {
  	fprintf(stderr, "SGCount was %d should be %d\n", sgcount,
  		ntohl(g->countsg));
  	if (PrintEntryError(misc, ea, e, 2))
--- 689,695 ----
  #if defined(SUPERGROUPS)
  	noErrors = 0;
      }
!     if (e && (e->flags & htonl(PRGRP)) && (sgcount != ntohl(g->countsg))) {
  	fprintf(stderr, "SGCount was %d should be %d\n", sgcount,
  		ntohl(g->countsg));
  	if (PrintEntryError(misc, ea, e, 2))
***************
*** 890,896 ****
  	    case PRFOREIGN:
  		fprintf(stderr,
  			"ENTRY IS unexpected type [PRFOREIGN] (flags=0x%x)\n",
! 			e.flags);
  		break;
  	    case PRINST:
  		misc->ninsts++;
--- 891,897 ----
  	    case PRFOREIGN:
  		fprintf(stderr,
  			"ENTRY IS unexpected type [PRFOREIGN] (flags=0x%x)\n",
! 			ntohl(e.flags));
  		break;
  	    case PRINST:
  		misc->ninsts++;
***************
*** 1225,1231 ****
  		    if (code)
  			return code;
  
! 		    if ((id == ntohl(c.id)) && (ntohl(c.flags) & PRCONT)) {
  			for (i = 0; i < COSIZE; i++) {
  			    afs_int32 uid = ntohl(c.entries[i]);
  			    if (uid == 0)
--- 1226,1232 ----
  		    if (code)
  			return code;
  
! 		    if ((id == ntohl(c.id)) && (c.flags & htonl(PRCONT))) {
  			for (i = 0; i < COSIZE; i++) {
  			    afs_int32 uid = ntohl(c.entries[i]);
  			    if (uid == 0)
***************
*** 1251,1257 ****
  		    if (code)
  			return code;
  
! 		    if ((id == ntohl(c.id)) && (ntohl(c.flags) & PRCONT)) {
  			for (i = 0; i < COSIZE; i++) {
  			    afs_int32 uid = ntohl(c.entries[i]);
  			    if (uid == 0)
--- 1252,1258 ----
  		    if (code)
  			return code;
  
! 		    if ((id == ntohl(c.id)) && (c.flags & htonl(PRCONT))) {
  			for (i = 0; i < COSIZE; i++) {
  			    afs_int32 uid = ntohl(c.entries[i]);
  			    if (uid == 0)
***************
*** 1301,1307 ****
      n = eof / sizeof(struct prentry);
      if ((eof < 0) || (n * sizeof(struct prentry) != eof)) {
  	code = PRDBBAD;
! 	com_err(whoami, code, "eof ptr no good: eof=%d, sizeof(prentry)=%d",
  		eof, sizeof(struct prentry));
        abort:
  	return code;
--- 1302,1308 ----
      n = eof / sizeof(struct prentry);
      if ((eof < 0) || (n * sizeof(struct prentry) != eof)) {
  	code = PRDBBAD;
! 	afs_com_err(whoami, code, "eof ptr no good: eof=%d, sizeof(prentry)=%d",
  		eof, sizeof(struct prentry));
        abort:
  	return code;
***************
*** 1318,1324 ****
      }
      code = WalkHashTable(cheader.nameHash, MAP_NAMEHASH, map, misc);
      if (code) {
! 	com_err(whoami, code, "walking name hash");
  	goto abort;
      }
      if (misc->verbose) {
--- 1319,1325 ----
      }
      code = WalkHashTable(cheader.nameHash, MAP_NAMEHASH, map, misc);
      if (code) {
! 	afs_com_err(whoami, code, "walking name hash");
  	goto abort;
      }
      if (misc->verbose) {
***************
*** 1327,1333 ****
      }
      code = WalkHashTable(cheader.idHash, MAP_IDHASH, map, misc);
      if (code) {
! 	com_err(whoami, code, "walking id hash");
  	goto abort;
      }
  
--- 1328,1334 ----
      }
      code = WalkHashTable(cheader.idHash, MAP_IDHASH, map, misc);
      if (code) {
! 	afs_com_err(whoami, code, "walking id hash");
  	goto abort;
      }
  
***************
*** 1339,1345 ****
      misc->idRange = n - misc->minId + 1;
      misc->idmap = (afs_int32 *) malloc(misc->idRange * sizeof(afs_int32));
      if (!misc->idmap) {
! 	com_err(whoami, 0, "Unable to malloc space for max ids of %d",
  		misc->idRange);
  	code = -1;
  	goto abort;
--- 1340,1346 ----
      misc->idRange = n - misc->minId + 1;
      misc->idmap = (afs_int32 *) malloc(misc->idRange * sizeof(afs_int32));
      if (!misc->idmap) {
! 	afs_com_err(whoami, 0, "Unable to malloc space for max ids of %d",
  		misc->idRange);
  	code = -1;
  	goto abort;
***************
*** 1353,1359 ****
      }
      code = WalkChains(map, misc);
      if (code) {
! 	com_err(whoami, code, "walking chains");
  	goto abort;
      }
      if (misc->verbose) {
--- 1354,1360 ----
      }
      code = WalkChains(map, misc);
      if (code) {
! 	afs_com_err(whoami, code, "walking chains");
  	goto abort;
      }
      if (misc->verbose) {
***************
*** 1362,1368 ****
      }
      code = WalkNextChain(map, misc, 0, 0);
      if (code) {
! 	com_err(whoami, code, "walking free list");
  	goto abort;
      }
      if (misc->verbose) {
--- 1363,1369 ----
      }
      code = WalkNextChain(map, misc, 0, 0);
      if (code) {
! 	afs_com_err(whoami, code, "walking free list");
  	goto abort;
      }
      if (misc->verbose) {
***************
*** 1371,1377 ****
      }
      code = WalkOwnedChain(map, misc, 0, 0);
      if (code) {
! 	com_err(whoami, code, "walking orphan list");
  	goto abort;
      }
  
--- 1372,1378 ----
      }
      code = WalkOwnedChain(map, misc, 0, 0);
      if (code) {
! 	afs_com_err(whoami, code, "walking orphan list");
  	goto abort;
      }
  
***************
*** 1381,1387 ****
      }
      code = GC(map, misc);
      if (code) {
! 	com_err(whoami, code, "looking for unreferenced entries");
  	goto abort;
      }
  
--- 1382,1388 ----
      }
      code = GC(map, misc);
      if (code) {
! 	afs_com_err(whoami, code, "looking for unreferenced entries");
  	goto abort;
      }
  
***************
*** 1453,1459 ****
  
      fd = open(pr_dbaseName, O_RDONLY, 0);
      if (fd == -1) {
! 	com_err(whoami, errno, "Open failed on db %s", pr_dbaseName);
  	exit(2);
      }
  
--- 1454,1460 ----
  
      fd = open(pr_dbaseName, O_RDONLY, 0);
      if (fd == -1) {
! 	afs_com_err(whoami, errno, "Open failed on db %s", pr_dbaseName);
  	exit(2);
      }
  
***************
*** 1471,1477 ****
      if (recreateFile) {
  	misc.recreate = fopen(recreateFile, "w");
  	if (misc.recreate == 0) {
! 	    com_err(whoami, errno,
  		    "can't create file for recreation instructions: %s",
  		    recreateFile);
  	    exit(4);
--- 1472,1478 ----
      if (recreateFile) {
  	misc.recreate = fopen(recreateFile, "w");
  	if (misc.recreate == 0) {
! 	    afs_com_err(whoami, errno,
  		    "can't create file for recreation instructions: %s",
  		    recreateFile);
  	    exit(4);
***************
*** 1479,1485 ****
      }
      code = CheckPrDatabase(&misc);
      if (code) {
! 	com_err(whoami, code, "Checking prserver database");
  	exit(3);
      }
      exit(0);
--- 1480,1486 ----
      }
      code = CheckPrDatabase(&misc);
      if (code) {
! 	afs_com_err(whoami, code, "Checking prserver database");
  	exit(3);
      }
      exit(0);
***************
*** 1515,1521 ****
  zeromap(struct idused *idmap)
  {
      while (idmap) {
! 	bzero((char *)idmap->idcount, sizeof idmap->idcount);
  	idmap = idmap->idnext;
      }
  }
--- 1516,1522 ----
  zeromap(struct idused *idmap)
  {
      while (idmap) {
! 	memset((char *)idmap->idcount, 0, sizeof idmap->idcount);
  	idmap = idmap->idnext;
      }
  }
***************
*** 1540,1546 ****
  	    perror("idmap");
  	    exit(1);
  	}
! 	bzero((char *)idmap, sizeof idmap);
  	idmap->idstart = id & ~(IDCOUNT - 1);
  	idmap->idnext = *idmapp;
  	*idmapp = idmap;
--- 1541,1547 ----
  	    perror("idmap");
  	    exit(1);
  	}
! 	memset((char *)idmap, 0, sizeof idmap);
  	idmap->idstart = id & ~(IDCOUNT - 1);
  	idmap->idnext = *idmapp;
  	*idmapp = idmap;
Index: openafs/src/ptserver/map.c
diff -c openafs/src/ptserver/map.c:1.3 openafs/src/ptserver/map.c:1.3.2.2
*** openafs/src/ptserver/map.c:1.3	Wed Jun 23 10:27:41 2004
--- openafs/src/ptserver/map.c	Sat Aug 11 19:50:02 2007
***************
*** 2,8 ****
   *	bit map routines (in-core).
   */
  /*
!  * Copyright (c) 1995, 1996 Marcus D. Watts  All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
--- 2,8 ----
   *	bit map routines (in-core).
   */
  /*
!  * Copyright (c) 1995, 1996, 2007 Marcus D. Watts  All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
***************
*** 12,21 ****
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in the
   *    documentation and/or other materials provided with the distribution.
!  * 3. All advertising materials mentioning features or use of this software
!  *    must display the following acknowledgement:
!  *	This product includes software developed by Marcus D. Watts.
!  * 4. The name of the developer may not be used to endorse or promote
   *    products derived from this software without specific prior written
   *    permission.
   *
--- 12,18 ----
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in the
   *    documentation and/or other materials provided with the distribution.
!  * 3. The name of the developer may not be used to endorse or promote
   *    products derived from this software without specific prior written
   *    permission.
   *
***************
*** 35,46 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/map.c,v 1.3 2004/06/23 14:27:41 shadow Exp $");
  
  #ifdef SUPERGROUPS
  #include <errno.h>
  #include "map.h"
! char *malloc();
  
  #undef PRINT_MAP_ERROR
  /* #define MAP_DEBUG /**/
--- 32,43 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/map.c,v 1.3.2.2 2007/08/11 23:50:02 jaltman Exp $");
  
  #ifdef SUPERGROUPS
  #include <errno.h>
  #include "map.h"
! #include "malloc.h"
  
  #undef PRINT_MAP_ERROR
  /* #define MAP_DEBUG /**/
***************
*** 52,64 ****
  struct bitmap {
      struct bitmap *m_next;
      int m_page;
!     long m_data[MDATA];
  };
  
! #define MAP(p)	((struct bitmap*)((long)(p)&~1))
  #define NEGMAP(p)	(((int)(p))&1)
  #define POSMAP(p)	(!NEGMAP(p))
! #define NOT_MAP(mp)	((struct map *) (((long)(mp)) ^ 1))
  
  #define NUMBERTOBIT(n)	((n) & ((1<<LSHIFT)-1))
  #define NUMBERTOINDEX(n)	((n>>LSHIFT) & ((1<<MSHIFT)-1))
--- 49,61 ----
  struct bitmap {
      struct bitmap *m_next;
      int m_page;
!     int m_data[MDATA];
  };
  
! #define MAP(p)	((struct bitmap*)((int)(p)&~1))
  #define NEGMAP(p)	(((int)(p))&1)
  #define POSMAP(p)	(!NEGMAP(p))
! #define NOT_MAP(mp)	((struct map *) (((int)(mp)) ^ 1))
  
  #define NUMBERTOBIT(n)	((n) & ((1<<LSHIFT)-1))
  #define NUMBERTOINDEX(n)	((n>>LSHIFT) & ((1<<MSHIFT)-1))
***************
*** 70,79 ****
  extern int debug_mask;
  
  int
! in_map(struct map *parm, long node)
  {
      struct bitmap *map;
!     long bit;
      int x, page;
      int result;
  
--- 67,76 ----
  extern int debug_mask;
  
  int
! in_map(struct map *parm, int node)
  {
      struct bitmap *map;
!     int bit;
      int x, page;
      int result;
  
***************
*** 91,97 ****
      if (Aflag)
  	if (TONUMBER(page, x, bit) != node) {
  	    printf
! 		("bxp mixup: node=%ld -> p=%d x=%d b=%d -> %ld, %ld, %ld = %ld\n",
  		 node, page, x, bit, TONUMBER(page, 0, 0), TONUMBER(0, x, 0),
  		 TONUMBER(0, 0, bit), TONUMBER(page, x, bit));
  	}
--- 88,94 ----
      if (Aflag)
  	if (TONUMBER(page, x, bit) != node) {
  	    printf
! 		("bxp mixup: node=%d -> p=%d x=%d b=%d -> %d, %d, %d = %d\n",
  		 node, page, x, bit, TONUMBER(page, 0, 0), TONUMBER(0, x, 0),
  		 TONUMBER(0, 0, bit), TONUMBER(page, x, bit));
  	}
***************
*** 129,138 ****
  }
  
  struct map *
! add_map(struct map *parm, long node)
  {
      struct bitmap *map;
!     long bit;
      int x, page;
  
  #ifdef MAP_DEBUG
--- 126,135 ----
  }
  
  struct map *
! add_map(struct map *parm, int node)
  {
      struct bitmap *map;
!     int bit;
      int x, page;
  
  #ifdef MAP_DEBUG
***************
*** 161,167 ****
  	    return 0;
  	}
  	map->m_page = page;
! 	bzero((char *)map->m_data, sizeof map->m_data);
  	if (NEGMAP(parm)) {
  	    int i;
  	    for (i = 0; i < MDATA; ++i)
--- 158,164 ----
  	    return 0;
  	}
  	map->m_page = page;
! 	memset((char *) map->m_data, 0, sizeof map->m_data);
  	if (NEGMAP(parm)) {
  	    int i;
  	    for (i = 0; i < MDATA; ++i)
***************
*** 192,200 ****
  {
      struct bitmap **mpp, *mp2;
      int i;
!     for (mpp = &map; mp2 = *mpp;) {
  	for (i = 0; i < MDATA; ++i)
! 	    if (map->m_data[i])
  		break;
  	if (i == MDATA) {
  #ifdef PRINT_MAP_ERROR
--- 189,197 ----
  {
      struct bitmap **mpp, *mp2;
      int i;
!     for (mpp = &map; (mp2 = *mpp);) {
  	for (i = 0; i < MDATA; ++i)
! 	    if (mp2->m_data[i])
  		break;
  	if (i == MDATA) {
  #ifdef PRINT_MAP_ERROR
***************
*** 215,221 ****
      struct bitmap **rightmp, *lmap, *rmap;
      int i;
      for (lmap = left; lmap; lmap = lmap->m_next) {
! 	for (rightmp = &right; rmap = *rightmp; rightmp = &rmap->m_next)
  	    if (rmap->m_page == lmap->m_page) {
  		for (i = 0; i < MDATA; ++i)
  		    lmap->m_data[i] |= rmap->m_data[i];
--- 212,218 ----
      struct bitmap **rightmp, *lmap, *rmap;
      int i;
      for (lmap = left; lmap; lmap = lmap->m_next) {
! 	for (rightmp = &right; (rmap = *rightmp); rightmp = &rmap->m_next)
  	    if (rmap->m_page == lmap->m_page) {
  		for (i = 0; i < MDATA; ++i)
  		    lmap->m_data[i] |= rmap->m_data[i];
***************
*** 224,230 ****
  		break;
  	    }
      }
!     for (rightmp = &left; *rightmp; rightmp = &(*rightmp)->m_next);
      *rightmp = right;
      return left;
  }
--- 221,228 ----
  		break;
  	    }
      }
!     for (rightmp = &left; *rightmp; rightmp = &(*rightmp)->m_next)
! 	;
      *rightmp = right;
      return left;
  }
***************
*** 234,243 ****
  {
      struct bitmap **rightmp, *lmap, *rmap, **leftmp;
      int i;
!     long sig;
!     for (leftmp = &left; lmap = *leftmp;) {
  	sig = 0;
! 	for (rightmp = &right; rmap = *rightmp; rightmp = &rmap->m_next)
  	    if (rmap->m_page == lmap->m_page) {
  		for (i = 0; i < MDATA; ++i)
  		    sig |= (lmap->m_data[i] &= rmap->m_data[i]);
--- 232,241 ----
  {
      struct bitmap **rightmp, *lmap, *rmap, **leftmp;
      int i;
!     int sig;
!     for (leftmp = &left; (lmap = *leftmp);) {
  	sig = 0;
! 	for (rightmp = &right; (rmap = *rightmp); rightmp = &rmap->m_next)
  	    if (rmap->m_page == lmap->m_page) {
  		for (i = 0; i < MDATA; ++i)
  		    sig |= (lmap->m_data[i] &= rmap->m_data[i]);
***************
*** 262,276 ****
  {
      struct bitmap **rightmp, *lmap, *rmap, **leftmp;
      int i;
!     long sig;
  #ifdef MAP_DEBUG
      if (Mflag) {
! 	printf("bic_bitmap: left=%#lx right=%#lx\n", left, right);
      }
  #endif
!     for (leftmp = &left; lmap = *leftmp;) {
  	sig = 0;
! 	for (rightmp = &right; rmap = *rightmp; rightmp = &rmap->m_next)
  	    if (rmap->m_page == lmap->m_page) {
  		for (i = 0; i < MDATA; ++i)
  		    sig |= (lmap->m_data[i] &= ~rmap->m_data[i]);
--- 260,274 ----
  {
      struct bitmap **rightmp, *lmap, *rmap, **leftmp;
      int i;
!     int sig;
  #ifdef MAP_DEBUG
      if (Mflag) {
! 	printf("bic_bitmap: left=%#lx right=%#lx\n", (long)left, (long)right);
      }
  #endif
!     for (leftmp = &left; (lmap = *leftmp);) {
  	sig = 0;
! 	for (rightmp = &right; (rmap = *rightmp); rightmp = &rmap->m_next)
  	    if (rmap->m_page == lmap->m_page) {
  		for (i = 0; i < MDATA; ++i)
  		    sig |= (lmap->m_data[i] &= ~rmap->m_data[i]);
***************
*** 289,295 ****
      left = simplify_bitmap(left);
  #ifdef MAP_DEBUG
      if (Mflag) {
! 	printf("bic_bitmap: result=%#lx\n", left);
      }
  #endif
      return left;
--- 287,293 ----
      left = simplify_bitmap(left);
  #ifdef MAP_DEBUG
      if (Mflag) {
! 	printf("bic_bitmap: result=%#lx\n", (long) left);
      }
  #endif
      return left;
***************
*** 308,318 ****
  #endif
      if (POSMAP(mp1))
  	if (POSMAP(mp2))
! 	    mp1 = (struct map *)and_bitmap(mp1, mp2);
  	else
! 	    mp1 = (struct map *)bic_bitmap(mp1, MAP(mp2));
      else if (POSMAP(mp2))
! 	mp1 = (struct map *)bic_bitmap(mp2, MAP(mp1));
      else
  	mp1 = NOT_MAP(or_bitmap(MAP(mp1), MAP(mp2)));
  #ifdef MAP_DEBUG
--- 306,317 ----
  #endif
      if (POSMAP(mp1))
  	if (POSMAP(mp2))
! 	    mp1 = (struct map *)and_bitmap((struct bitmap *) mp1,
! 		(struct bitmap *) mp2);
  	else
! 	    mp1 = (struct map *)bic_bitmap((struct bitmap *) mp1, MAP(mp2));
      else if (POSMAP(mp2))
! 	mp1 = (struct map *)bic_bitmap((struct bitmap *) mp2, MAP(mp1));
      else
  	mp1 = NOT_MAP(or_bitmap(MAP(mp1), MAP(mp2)));
  #ifdef MAP_DEBUG
***************
*** 338,348 ****
  #endif
      if (POSMAP(mp1))
  	if (POSMAP(mp2))
! 	    mp1 = (struct map *)or_bitmap(mp1, mp2);
  	else
! 	    mp1 = NOT_MAP(bic_bitmap(MAP(mp2), mp1));
      else if (POSMAP(mp2))
! 	mp1 = NOT_MAP(bic_bitmap(MAP(mp1), mp2));
      else
  	mp1 = NOT_MAP(and_bitmap(MAP(mp1), MAP(mp2)));
  #ifdef MAP_DEBUG
--- 337,348 ----
  #endif
      if (POSMAP(mp1))
  	if (POSMAP(mp2))
! 	    mp1 = (struct map *)or_bitmap((struct bitmap *) mp1,
! 		(struct bitmap *) mp2);
  	else
! 	    mp1 = NOT_MAP(bic_bitmap(MAP(mp2), (struct bitmap *) mp1));
      else if (POSMAP(mp2))
! 	mp1 = NOT_MAP(bic_bitmap(MAP(mp1), (struct bitmap *) mp2));
      else
  	mp1 = NOT_MAP(and_bitmap(MAP(mp1), MAP(mp2)));
  #ifdef MAP_DEBUG
***************
*** 380,386 ****
      }
  #endif
      map = MAP(parm);
!     for (mpp = &result; *mpp = 0, map; map = map->m_next) {
  	*mpp = (struct bitmap *)malloc(sizeof **mpp);
  	if (!*mpp) {
  #ifdef MAP_DEBUG
--- 380,386 ----
      }
  #endif
      map = MAP(parm);
!     for (mpp = &result; (*mpp = 0), map; map = map->m_next) {
  	*mpp = (struct bitmap *)malloc(sizeof **mpp);
  	if (!*mpp) {
  #ifdef MAP_DEBUG
***************
*** 400,416 ****
  	return (struct map *)result;
  }
  
! long
  count_map(struct map *parm)
  {
!     long nf;
      struct bitmap *map;
!     register i, j;
  
      nf = 0;
      for (map = MAP(parm); map; map = map->m_next) {
  	for (i = 0; i < MDATA; ++i) {
! 	    if (!map->m_data[i]);
  	    else if (!~map->m_data[i])
  		nf += (1 << LSHIFT);
  	    else
--- 400,417 ----
  	return (struct map *)result;
  }
  
! int
  count_map(struct map *parm)
  {
!     int nf;
      struct bitmap *map;
!     int i, j;
  
      nf = 0;
      for (map = MAP(parm); map; map = map->m_next) {
  	for (i = 0; i < MDATA; ++i) {
! 	    if (!map->m_data[i])
! 		;
  	    else if (!~map->m_data[i])
  		nf += (1 << LSHIFT);
  	    else
***************
*** 431,441 ****
      return nf;
  }
  
! long
! next_map(struct map *parm, long node)
  {
      struct bitmap *map, *lowest;
!     long bit, mask;
      int x, page;
      int best;
      int i;
--- 432,442 ----
      return nf;
  }
  
! int
! next_map(struct map *parm, int node)
  {
      struct bitmap *map, *lowest;
!     int bit, mask;
      int x, page;
      int best;
      int i;
***************
*** 480,486 ****
  		if (Aflag) {
  		    if (bn == (1 << LSHIFT)) {
  			printf
! 			    ("next_map: botch; pageno %d index %d data %#lx mask %#lx x,bit %d,%#lx\n",
  			     map->m_page, i, map->m_data[i], mask, x, bit);
  			continue;
  		    }
--- 481,487 ----
  		if (Aflag) {
  		    if (bn == (1 << LSHIFT)) {
  			printf
! 			    ("next_map: botch; pageno %d index %d data %#x mask %#x x,bit %d,%#x\n",
  			     map->m_page, i, map->m_data[i], mask, x, bit);
  			continue;
  		    }
***************
*** 494,500 ****
  #ifdef MAP_DEBUG
      if (Aflag) {
  	printf(" -> %d\n", best);
! 	if (best >= 0 && !in_map((struct map *)parm, best)) {
  	    printf("next_map: botch; %d not in map\n", best);
  	    return -1;
  	}
--- 495,501 ----
  #ifdef MAP_DEBUG
      if (Aflag) {
  	printf(" -> %d\n", best);
! 	if (best >= 0 && !in_map(parm, best)) {
  	    printf("next_map: botch; %d not in map\n", best);
  	    return -1;
  	}
***************
*** 503,519 ****
      return best;
  }
  
! long
  first_map(struct map *parm)
  {
      return next_map(parm, -9999);
  }
  
! long
! prev_map(struct map *parm, long node)
  {
      struct bitmap *map, *lowest;
!     long bit, mask;
      int x, page;
      int best;
      int i;
--- 504,520 ----
      return best;
  }
  
! int
  first_map(struct map *parm)
  {
      return next_map(parm, -9999);
  }
  
! int
! prev_map(struct map *parm, int node)
  {
      struct bitmap *map, *lowest;
!     int bit, mask;
      int x, page;
      int best;
      int i;
***************
*** 534,540 ****
      }
  
      if (node < 0)
! 	node = ((unsigned long)~0) >> 1;
  
      --node;
      bit = NUMBERTOBIT(node);
--- 535,541 ----
      }
  
      if (node < 0)
! 	node = ((unsigned int)~0) >> 1;
  
      --node;
      bit = NUMBERTOBIT(node);
***************
*** 561,567 ****
  		if (Aflag) {
  		    if (bn < 0) {
  			printf
! 			    ("prev_map: botch; pageno %d index %d data %#lx mask %#lx x,bit %d,%#lx\n",
  			     map->m_page, i, map->m_data[i], mask, x, bit);
  			continue;
  		    }
--- 562,568 ----
  		if (Aflag) {
  		    if (bn < 0) {
  			printf
! 			    ("prev_map: botch; pageno %d index %d data %#x mask %#x x,bit %d,%#x\n",
  			     map->m_page, i, map->m_data[i], mask, x, bit);
  			continue;
  		    }
***************
*** 584,590 ****
      return best;
  }
  
! long
  last_map(struct map *parm)
  {
      return prev_map(parm, 0x7fffffff);
--- 585,591 ----
      return best;
  }
  
! int
  last_map(struct map *parm)
  {
      return prev_map(parm, 0x7fffffff);
***************
*** 630,638 ****
      }
      map = MAP(parm);
      if (!map)
! 	printf(" nil(%lx)", parm);
      else
! 	printf(" %lx", parm);
      lastbitno = -100;
      firstbitno = -100;
      for (; map; map = map->m_next)
--- 631,639 ----
      }
      map = MAP(parm);
      if (!map)
! 	printf(" nil(%lx)", (long)parm);
      else
! 	printf(" %lx", (long)parm);
      lastbitno = -100;
      firstbitno = -100;
      for (; map; map = map->m_next)
***************
*** 667,678 ****
  
  #ifdef NEED_READ_WRITE
  struct map *
! read_map(int (*f) (), char *arg)
  {
      struct bitmap *map, *result, **mp;
      int page;
!     int bitno, lastno, thisno, prevno;
!     int i, j;
      int data;
  
  /* count, then startbitno, then bits. */
--- 668,678 ----
  
  #ifdef NEED_READ_WRITE
  struct map *
! read_map(int (*f) (void *), char *arg)
  {
      struct bitmap *map, *result, **mp;
      int page;
!     int bitno, lastno;
      int data;
  
  /* count, then startbitno, then bits. */
***************
*** 700,706 ****
  	    continue;
  	page = NUMBERTOPAGE(bitno);
  	if (!map || map->m_page != page)
! 	    for (mp = &result; map = *mp; mp = &map->m_next)
  		if (map->m_page == page)
  		    break;
  	if (!map) {
--- 700,706 ----
  	    continue;
  	page = NUMBERTOPAGE(bitno);
  	if (!map || map->m_page != page)
! 	    for (mp = &result; (map = *mp); mp = &map->m_next)
  		if (map->m_page == page)
  		    break;
  	if (!map) {
***************
*** 713,719 ****
  		    free_map((struct map *)result);
  		return 0;
  	    }
! 	    bzero((char *)map->m_data, sizeof map->m_data);
  	    map->m_page = page;
  	    map->m_next = 0;
  	    *mp = map;
--- 713,719 ----
  		    free_map((struct map *)result);
  		return 0;
  	    }
! 	    memset((char *) map->m_data, 0, sizeof map->m_data);
  	    map->m_page = page;
  	    map->m_next = 0;
  	    *mp = map;
***************
*** 724,730 ****
  }
  
  int 
! write_map(struct map *parm, int (*f) (), char *arg)
  {
      struct bitmap *map;
      int page;
--- 724,730 ----
  }
  
  int 
! write_map(struct map *parm, int (*f) (void *, int), char *arg)
  {
      struct bitmap *map;
      int page;
Index: openafs/src/ptserver/map.h
diff -c openafs/src/ptserver/map.h:1.1 openafs/src/ptserver/map.h:1.1.2.1
*** openafs/src/ptserver/map.h:1.1	Wed Jan 15 12:36:07 2003
--- openafs/src/ptserver/map.h	Wed May 16 15:45:50 2007
***************
*** 2,8 ****
   *	map.h - header routines for in-core bitmap routines.
   */
  /*
!  * Copyright (c) 1995 Marcus D. Watts  All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
--- 2,8 ----
   *	map.h - header routines for in-core bitmap routines.
   */
  /*
!  * Copyright (c) 1995, 2007 Marcus D. Watts  All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
***************
*** 12,21 ****
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in the
   *    documentation and/or other materials provided with the distribution.
!  * 3. All advertising materials mentioning features or use of this software
!  *    must display the following acknowledgement:
!  *	This product includes software developed by Marcus D. Watts.
!  * 4. The name of the developer may not be used to endorse or promote
   *    products derived from this software without specific prior written
   *    permission.
   *
--- 12,18 ----
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in the
   *    documentation and/or other materials provided with the distribution.
!  * 3. The name of the developer may not be used to endorse or promote
   *    products derived from this software without specific prior written
   *    permission.
   *
***************
*** 33,50 ****
  
  struct map;
  
! int in_map(struct map *, long);
  void free_map(struct map *);
! struct map *add_map(struct map *, long);
  struct map *and_map(struct map *, struct map *);
  struct map *or_map(struct map *, struct map *);
  struct map *not_map(struct map *);
  struct map *copy_map(struct map *);
! long count_map(struct map *);
! long next_map(struct map *, long);
! long first_map(struct map *);
! long prev_map(struct map *, long);
! long last_map(struct map *);
  struct map *negative_map(struct map *);
  struct map *bic_map(struct map *, struct map *);
  int print_map(struct map *);
--- 30,47 ----
  
  struct map;
  
! int in_map(struct map *, int);
  void free_map(struct map *);
! struct map *add_map(struct map *, int);
  struct map *and_map(struct map *, struct map *);
  struct map *or_map(struct map *, struct map *);
  struct map *not_map(struct map *);
  struct map *copy_map(struct map *);
! int count_map(struct map *);
! int next_map(struct map *, int);
! int first_map(struct map *);
! int prev_map(struct map *, int);
! int last_map(struct map *);
  struct map *negative_map(struct map *);
  struct map *bic_map(struct map *, struct map *);
  int print_map(struct map *);
Index: openafs/src/ptserver/pt_util.c
diff -c openafs/src/ptserver/pt_util.c:1.9.2.2 openafs/src/ptserver/pt_util.c:1.9.2.3
*** openafs/src/ptserver/pt_util.c:1.9.2.2	Fri Jul 15 15:19:36 2005
--- openafs/src/ptserver/pt_util.c	Tue Apr 10 14:43:45 2007
***************
*** 1,4 ****
! /* $Id: pt_util.c,v 1.9.2.2 2005/07/15 19:19:36 shadow Exp $ */
  
  /*
   *
--- 1,4 ----
! /* $Id: pt_util.c,v 1.9.2.3 2007/04/10 18:43:45 shadow Exp $ */
  
  /*
   *
***************
*** 23,29 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/pt_util.c,v 1.9.2.2 2005/07/15 19:19:36 shadow Exp $");
  
  #include <afs/cmd.h>		/*Command line parsing */
  #include <errno.h>
--- 23,29 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/pt_util.c,v 1.9.2.3 2007/04/10 18:43:45 shadow Exp $");
  
  #include <afs/cmd.h>		/*Command line parsing */
  #include <errno.h>
***************
*** 242,248 ****
  			    if (code)
  				fprintf(stderr,
  					"Error setting group count on %s: %s\n",
! 					name, error_message(code));
  			}
  			code = CreateEntry(0, u->name, &uid, 1 /*idflag */ ,
  					   1 /*gflag */ ,
--- 242,248 ----
  			    if (code)
  				fprintf(stderr,
  					"Error setting group count on %s: %s\n",
! 					name, afs_error_message(code));
  			}
  			code = CreateEntry(0, u->name, &uid, 1 /*idflag */ ,
  					   1 /*gflag */ ,
***************
*** 251,257 ****
  		    }
  		    if (code)
  			fprintf(stderr, "Error while creating %s: %s\n",
! 				u->name, error_message(code));
  		    continue;
  		}
  		/* Add user to group */
--- 251,257 ----
  		    }
  		    if (code)
  			fprintf(stderr, "Error while creating %s: %s\n",
! 				u->name, afs_error_message(code));
  		    continue;
  		}
  		/* Add user to group */
***************
*** 271,277 ****
  
  		if (code)
  		    fprintf(stderr, "Error while adding %s to %s: %s\n", mem,
! 			    name, error_message(code));
  	    } else {
  		sscanf(buffer, "%s %d/%d %d %d %d", name, &flags, &quota, &id,
  		       &oid, &cid);
--- 271,277 ----
  
  		if (code)
  		    fprintf(stderr, "Error while adding %s to %s: %s\n", mem,
! 			    name, afs_error_message(code));
  	    } else {
  		sscanf(buffer, "%s %d/%d %d %d %d", name, &flags, &quota, &id,
  		       &oid, &cid);
***************
*** 289,295 ****
  		    usr_head = u;
  		} else if (code) {
  		    fprintf(stderr, "Error while creating %s: %s\n", name,
! 			    error_message(code));
  		} else if ((flags & PRACCESS)
  			   || (flags & (PRGRP | PRQUOTA)) ==
  			   (PRGRP | PRQUOTA)) {
--- 289,295 ----
  		    usr_head = u;
  		} else if (code) {
  		    fprintf(stderr, "Error while creating %s: %s\n", name,
! 			    afs_error_message(code));
  		} else if ((flags & PRACCESS)
  			   || (flags & (PRGRP | PRQUOTA)) ==
  			   (PRGRP | PRQUOTA)) {
***************
*** 303,316 ****
  		    if (code)
  			fprintf(stderr,
  				"Error while setting flags on %s: %s\n", name,
! 				error_message(code));
  		}
  	    }
  	}
  	for (u = usr_head; u; u = u->next)
  	    if (u->uid)
  		fprintf(stderr, "Error while creating %s: %s\n", u->name,
! 			error_message(PRBADNAM));
      } else {
  	for (i = 0; i < HASHSIZE; i++) {
  	    upos = nflag ? ntohl(prh.nameHash[i]) : ntohl(prh.idHash[i]);
--- 303,316 ----
  		    if (code)
  			fprintf(stderr,
  				"Error while setting flags on %s: %s\n", name,
! 				afs_error_message(code));
  		}
  	    }
  	}
  	for (u = usr_head; u; u = u->next)
  	    if (u->uid)
  		fprintf(stderr, "Error while creating %s: %s\n", u->name,
! 			afs_error_message(PRBADNAM));
      } else {
  	for (i = 0; i < HASHSIZE; i++) {
  	    upos = nflag ? ntohl(prh.nameHash[i]) : ntohl(prh.idHash[i]);
Index: openafs/src/ptserver/ptclient.c
diff -c openafs/src/ptserver/ptclient.c:1.12.2.2 openafs/src/ptserver/ptclient.c:1.12.2.4
*** openafs/src/ptserver/ptclient.c:1.12.2.2	Mon Jul 31 17:51:21 2006
--- openafs/src/ptserver/ptclient.c	Sat Aug 11 19:50:02 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptclient.c,v 1.12.2.2 2006/07/31 21:51:21 shadow Exp $");
  
  #ifdef	AFS_AIX32_ENV
  #include <signal.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptclient.c,v 1.12.2.4 2007/08/11 23:50:02 jaltman Exp $");
  
  #ifdef	AFS_AIX32_ENV
  #include <signal.h>
***************
*** 237,243 ****
  
      code = pr_Initialize(security, confdir, cell);
      if (code) {
! 	com_err(whoami, code, "Couldn't initialize protection library");
  	exit(1);
      }
  
--- 237,243 ----
  
      code = pr_Initialize(security, confdir, cell);
      if (code) {
! 	afs_com_err(whoami, code, "Couldn't initialize protection library");
  	exit(1);
      }
  
***************
*** 252,258 ****
  
  	code = GetString(op, sizeof(op));
  	if (code) {
! 	    com_err(whoami, PRBADARG,
  		    "error reading opcode in line '%s', got '%.*s'", line,
  		    sizeof(op), op);
  	    exit(1);
--- 252,258 ----
  
  	code = GetString(op, sizeof(op));
  	if (code) {
! 	    afs_com_err(whoami, PRBADARG,
  		    "error reading opcode in line '%s', got '%.*s'", line,
  		    sizeof(op), op);
  	    exit(1);
***************
*** 269,275 ****
  	    else
  		code = ubik_PR_INewEntry(pruclient, 0, name, id, oid);
  	    if (CodeOk(code))
! 		com_err(whoami, code, "on %s %s %d %d", op, name, id, oid);
  	} else if (!strcmp(op, "sf")) {
  	    afs_int32 mask, access, gq, uq;
  	    if (GetInt32(&id) || GetXInt32(&mask) || GetXInt32(&access)
--- 269,275 ----
  	    else
  		code = ubik_PR_INewEntry(pruclient, 0, name, id, oid);
  	    if (CodeOk(code))
! 		afs_com_err(whoami, code, "on %s %s %d %d", op, name, id, oid);
  	} else if (!strcmp(op, "sf")) {
  	    afs_int32 mask, access, gq, uq;
  	    if (GetInt32(&id) || GetXInt32(&mask) || GetXInt32(&access)
***************
*** 280,286 ****
  		    ubik_PR_SetFieldsEntry(pruclient, 0, id, mask,
  			      access, gq, uq, 0, 0);
  	    if (CodeOk(code))
! 		com_err(whoami, code, "on %s %d %x %x %d %d", op, id, mask,
  			access, gq, uq);
  	} else if (!strcmp(op, "ce")) {
  	    char newname[PR_MAXNAMELEN];
--- 280,286 ----
  		    ubik_PR_SetFieldsEntry(pruclient, 0, id, mask,
  			      access, gq, uq, 0, 0);
  	    if (CodeOk(code))
! 		afs_com_err(whoami, code, "on %s %d %x %x %d %d", op, id, mask,
  			access, gq, uq);
  	} else if (!strcmp(op, "ce")) {
  	    char newname[PR_MAXNAMELEN];
***************
*** 293,299 ****
  		    ubik_PR_ChangeEntry(pruclient, 0, id, newname, oid,
  			      newid);
  	    if (CodeOk(code))
! 		com_err(whoami, code, "on %s %d %s %d %d", op, id, newname,
  			oid, newid);
  	} else if (!strcmp(op, "wh")) {
  	    /* scanf("%d",&id); */
--- 293,299 ----
  		    ubik_PR_ChangeEntry(pruclient, 0, id, newname, oid,
  			      newid);
  	    if (CodeOk(code))
! 		afs_com_err(whoami, code, "on %s %d %s %d %d", op, id, newname,
  			oid, newid);
  	} else if (!strcmp(op, "wh")) {
  	    /* scanf("%d",&id); */
***************
*** 334,340 ****
  	    else
  		code = ubik_PR_AddToGroup(pruclient, 0, id, gid);
  	    if (CodeOk(code))
! 		com_err(whoami, code, "on %s %d %d", op, id, gid);
  	} else if (!strcmp(op, "iton")) {
  	    lid.idlist_val = (afs_int32 *) malloc(20 * sizeof(afs_int32));
  	    ptr = lid.idlist_val;
--- 334,340 ----
  	    else
  		code = ubik_PR_AddToGroup(pruclient, 0, id, gid);
  	    if (CodeOk(code))
! 		afs_com_err(whoami, code, "on %s %d %d", op, id, gid);
  	} else if (!strcmp(op, "iton")) {
  	    lid.idlist_val = (afs_int32 *) malloc(20 * sizeof(afs_int32));
  	    ptr = lid.idlist_val;
***************
*** 648,654 ****
  	else if (!strcmp(op, "fih")) {
  	    char tname[128];
  	    struct PrUpdateEntry uentry;
! 	    bzero(&uentry, sizeof(uentry));
  	    /* scanf("%s",name); */
  	    if (GetString(name, sizeof(name))) {
  		code = PRBADARG;
--- 648,654 ----
  	else if (!strcmp(op, "fih")) {
  	    char tname[128];
  	    struct PrUpdateEntry uentry;
! 	    memset(&uentry, 0, sizeof(uentry));
  	    /* scanf("%s",name); */
  	    if (GetString(name, sizeof(name))) {
  		code = PRBADARG;
***************
*** 675,681 ****
  	} else if (!strcmp(op, "fnh")) {
  	    int tid;
  	    struct PrUpdateEntry uentry;
! 	    bzero(&uentry, sizeof(uentry));
  	    /* scanf("%d", &id); */
  	    if (GetInt32(&id)) {
  		code = PRBADARG;
--- 675,681 ----
  	} else if (!strcmp(op, "fnh")) {
  	    int tid;
  	    struct PrUpdateEntry uentry;
! 	    memset(&uentry, 0, sizeof(uentry));
  	    /* scanf("%d", &id); */
  	    if (GetInt32(&id)) {
  		code = PRBADARG;
Index: openafs/src/ptserver/ptclient.h
diff -c openafs/src/ptserver/ptclient.h:1.4 openafs/src/ptserver/ptclient.h:1.4.2.1
*** openafs/src/ptserver/ptclient.h:1.4	Tue Jan 14 23:30:25 2003
--- openafs/src/ptserver/ptclient.h	Tue Apr 10 14:43:45 2007
***************
*** 46,49 ****
  extern int PR_ListSuperGroups();
  #endif
  
! #define pr_ErrorMsg error_message
--- 46,49 ----
  extern int PR_ListSuperGroups();
  #endif
  
! #define pr_ErrorMsg afs_error_message
Index: openafs/src/ptserver/pts.c
diff -c openafs/src/ptserver/pts.c:1.13.2.1 openafs/src/ptserver/pts.c:1.13.2.4
*** openafs/src/ptserver/pts.c:1.13.2.1	Mon Oct 18 03:12:04 2004
--- openafs/src/ptserver/pts.c	Sat Aug 11 19:54:04 2007
***************
*** 7,29 ****
   * directory or online at http://www.openafs.org/dl/license10.html
   */
  
- /*
-  *                      (3) add new pts commands:
-  *
-  *                          Interactive - allow the pts command
-  *                                        to be run interactively.
-  *                          Quit        - quit interactive mode.
-  *                          Source      - allow input to come from a file(s).
-  *                          Sleep       - pause for a specified number
-  *                                        of seconds.
-  *
-  */
- 
  #include <afsconfig.h>
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/pts.c,v 1.13.2.1 2004/10/18 07:12:04 shadow Exp $");
  
  #include <stdio.h>
  #include <string.h>
--- 7,17 ----
   * directory or online at http://www.openafs.org/dl/license10.html
   */
  
  #include <afsconfig.h>
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/pts.c,v 1.13.2.4 2007/08/11 23:54:04 jaltman Exp $");
  
  #include <stdio.h>
  #include <string.h>
***************
*** 46,68 ****
  #include "ptclient.h"
  #include "pterror.h"
  #include <afs/afsutil.h>
  
  #undef FOREIGN
  
  char *whoami;
  int force = 0;
  
- #if defined(SUPERGROUPS)
- 
- /*
-  *  Add new pts commands:
-  *
-  *      Interactive - allow the pts command to be run interactively.
-  *      Quit        - quit interactive mode.
-  *      Source      - allow input to come from a file(s).
-  *      Sleep       - pause for a specified number of seconds.
-  */
- 
  static int finished;
  static FILE *source;
  extern struct ubik_client *pruclient;
--- 34,46 ----
  #include "ptclient.h"
  #include "pterror.h"
  #include <afs/afsutil.h>
+ #include <afs/com_err.h>
  
  #undef FOREIGN
  
  char *whoami;
  int force = 0;
  
  static int finished;
  static FILE *source;
  extern struct ubik_client *pruclient;
***************
*** 73,93 ****
  } *shead;
  
  int
! Interactive(register struct cmd_syndesc *as)
  {
      finished = 0;
      return 0;
  }
  
  int
! Quit(register struct cmd_syndesc *as)
  {
      finished = 1;
      return 0;
  }
  
  int
! Source(register struct cmd_syndesc *as)
  {
      FILE *fd;
      struct sourcestack *sp;
--- 51,71 ----
  } *shead;
  
  int
! pts_Interactive(register struct cmd_syndesc *as)
  {
      finished = 0;
      return 0;
  }
  
  int
! pts_Quit(register struct cmd_syndesc *as)
  {
      finished = 1;
      return 0;
  }
  
  int
! pts_Source(register struct cmd_syndesc *as)
  {
      FILE *fd;
      struct sourcestack *sp;
***************
*** 115,121 ****
  }
  
  int
! Sleep(register struct cmd_syndesc *as)
  {
      int delay;
      if (!as->parms[0].items) {
--- 93,99 ----
  }
  
  int
! pts_Sleep(register struct cmd_syndesc *as)
  {
      int delay;
      if (!as->parms[0].items) {
***************
*** 124,129 ****
--- 102,108 ----
      }
      delay = atoi(as->parms[0].items->data);
      IOMGR_Sleep(delay);
+     return 0;
  }
  
  int
***************
*** 140,147 ****
      return 1;
  }
  
- #endif /* SUPERGROUPS */
- 
  int
  osi_audit()
  {
--- 119,124 ----
***************
*** 176,182 ****
  	code = pr_Initialize(sec, AFSDIR_CLIENT_ETC_DIRPATH, cell);
      }
      if (code) {
! 	com_err(whoami, code, "while initializing");
  	return code;
      }
      if (as->parms[19].items)
--- 153,159 ----
  	code = pr_Initialize(sec, AFSDIR_CLIENT_ETC_DIRPATH, cell);
      }
      if (code) {
! 	afs_com_err(whoami, code, "while initializing");
  	return code;
      }
      if (as->parms[19].items)
***************
*** 187,193 ****
  int
  CleanUp(register struct cmd_syndesc *as)
  {
- #if defined(SUPERGROUPS)
      if (as && !strcmp(as->name, "help"))
  	return 0;
      if (pruclient) {
--- 164,169 ----
***************
*** 195,208 ****
  	pr_End();
  	rx_Finalize();
      }
- #else
-     if (!strcmp(as->name, "help"))
- 	return 0;
-     /* Need to shutdown the ubik_client & other connections */
-     pr_End();
-     rx_Finalize();
- #endif /* SUPERGROUPS */
- 
      return 0;
  }
  
--- 171,176 ----
***************
*** 226,247 ****
  	if (idi) {
  	    code = util_GetInt32(idi->data, &id);
  	    if (code) {
! 		com_err(whoami, code, "because group id was: '%s'",
  			idi->data);
  		return code;
  	    }
  	    if (id >= 0) {
  		code = PRBADARG;
! 		com_err(whoami, code, "because group id %d was not negative",
  			id);
  		return code;
  	    }
! #if defined(SUPERGROUPS)
! 	    if (id == 0) {
  		printf("0 isn't a valid user id; aborting\n");
  		return EINVAL;
  	    }
! #endif
  	    idi = idi->next;
  	} else
  	    id = 0;
--- 194,215 ----
  	if (idi) {
  	    code = util_GetInt32(idi->data, &id);
  	    if (code) {
! 		afs_com_err(whoami, code, "because group id was: '%s'",
  			idi->data);
  		return code;
  	    }
  	    if (id >= 0) {
  		code = PRBADARG;
! 		afs_com_err(whoami, code, "because group id %d was not negative",
  			id);
  		return code;
  	    }
! 	    
!             if (id == 0) {
  		printf("0 isn't a valid user id; aborting\n");
  		return EINVAL;
  	    }
! 
  	    idi = idi->next;
  	} else
  	    id = 0;
***************
*** 249,261 ****
  	code = pr_CreateGroup(namei->data, owner, &id);
  	if (code) {
  	    if (owner || id)
! 		com_err(whoami, code,
  			"; unable to create group %s with id %d%s%s%s%s",
  			namei->data, id, owner ? " owned by '" : "",
  			owner ? owner : "", owner ? "'" : "",
  			(force ? " (ignored)" : ""));
  	    else
! 		com_err(whoami, code, "; unable to create group %s %s",
  			namei->data, (force ? "(ignored)" : ""));
  	    if (!force)
  		return code;
--- 217,229 ----
  	code = pr_CreateGroup(namei->data, owner, &id);
  	if (code) {
  	    if (owner || id)
! 		afs_com_err(whoami, code,
  			"; unable to create group %s with id %d%s%s%s%s",
  			namei->data, id, owner ? " owned by '" : "",
  			owner ? owner : "", owner ? "'" : "",
  			(force ? " (ignored)" : ""));
  	    else
! 		afs_com_err(whoami, code, "; unable to create group %s %s",
  			namei->data, (force ? "(ignored)" : ""));
  	    if (!force)
  		return code;
***************
*** 281,287 ****
  	if (idi) {
  	    code = util_GetInt32(idi->data, &id);
  	    if (code) {
! 		com_err(whoami, code, "because id was: '%s'", idi->data);
  		return code;
  	    }
  	    if (id == 0) {
--- 249,255 ----
  	if (idi) {
  	    code = util_GetInt32(idi->data, &id);
  	    if (code) {
! 		afs_com_err(whoami, code, "because id was: '%s'", idi->data);
  		return code;
  	    }
  	    if (id == 0) {
***************
*** 295,305 ****
  	code = pr_CreateUser(namei->data, &id);
  	if (code) {
  	    if (id)
! 		com_err(whoami, code,
  			"; unable to create user %s with id %d %s",
  			namei->data, id, (force ? "(ignored)" : ""));
  	    else
! 		com_err(whoami, code, "; unable to create user %s %s",
  			namei->data, (force ? "(ignored)" : ""));
  	    if (!force)
  		return code;
--- 263,273 ----
  	code = pr_CreateUser(namei->data, &id);
  	if (code) {
  	    if (id)
! 		afs_com_err(whoami, code,
  			"; unable to create user %s with id %d %s",
  			namei->data, id, (force ? "(ignored)" : ""));
  	    else
! 		afs_com_err(whoami, code, "; unable to create user %s %s",
  			namei->data, (force ? "(ignored)" : ""));
  	    if (!force)
  		return code;
***************
*** 321,331 ****
      int goodCount;
  
      if (!(as->parms[0].items || as->parms[1].items)) {
! 	com_err(whoami, 0, "must specify either a name or an id.");
  	return -1;
      }
      if (as->parms[0].items && as->parms[1].items) {
! 	com_err(whoami, 0, "can't specify both a name and id.");
  	return -1;
      }
  
--- 289,299 ----
      int goodCount;
  
      if (!(as->parms[0].items || as->parms[1].items)) {
! 	afs_com_err(whoami, 0, "must specify either a name or an id.");
  	return -1;
      }
      if (as->parms[0].items && as->parms[1].items) {
! 	afs_com_err(whoami, 0, "can't specify both a name and id.");
  	return -1;
      }
  
***************
*** 354,364 ****
  
  	code = pr_NameToId(nl, lids);
  	if (code)
! 	    com_err(whoami, code, "so couldn't look up names");
  	else {
  	    for (n = 0; n < lids->idlist_len; n++) {
  		if ((lids->idlist_val[n] == ANONYMOUSID)) {
! 		    com_err(whoami, PRNOENT, "so couldn't look up id for %s",
  			    nl->namelist_val[n]);
  		} else
  		    goodCount++;
--- 322,332 ----
  
  	code = pr_NameToId(nl, lids);
  	if (code)
! 	    afs_com_err(whoami, code, "so couldn't look up names");
  	else {
  	    for (n = 0; n < lids->idlist_len; n++) {
  		if ((lids->idlist_val[n] == ANONYMOUSID)) {
! 		    afs_com_err(whoami, PRNOENT, "so couldn't look up id for %s",
  			    nl->namelist_val[n]);
  		} else
  		    goodCount++;
***************
*** 380,386 ****
  	for (i = as->parms[1].items; i; i = i->next) {
  	    code = util_GetInt32(i->data, &lids->idlist_val[n]);
  	    if (code)
! 		com_err(whoami, code =
  			PRNOENT, "because a bogus id '%s' was specified",
  			i->data);
  	    n++;
--- 348,354 ----
  	for (i = as->parms[1].items; i; i = i->next) {
  	    code = util_GetInt32(i->data, &lids->idlist_val[n]);
  	    if (code)
! 		afs_com_err(whoami, code =
  			PRNOENT, "because a bogus id '%s' was specified",
  			i->data);
  	    n++;
***************
*** 390,396 ****
  	    lnames->namelist_len = 0;
  	    code = pr_IdToName(lids, lnames);
  	    if (code)
! 		com_err(whoami, code, "translating ids");
  	}
      }
      if (code) {
--- 358,364 ----
  	    lnames->namelist_len = 0;
  	    code = pr_IdToName(lids, lnames);
  	    if (code)
! 		afs_com_err(whoami, code, "translating ids");
  	}
      }
      if (code) {
***************
*** 447,457 ****
      tids.idlist_val = 0;
      code = pr_NameToId(&names, &tids);
      if (code)
! 	com_err(whoami, code, "so couldn't look up names");
      else {
  	for (n = 0; n < tids.idlist_len; n++) {
  	    if ((tids.idlist_val[n] == ANONYMOUSID)) {
! 		com_err(whoami, PRNOENT, "so couldn't look up id for %s",
  			names.namelist_val[n]);
  	    } else
  		goodCount++;
--- 415,425 ----
      tids.idlist_val = 0;
      code = pr_NameToId(&names, &tids);
      if (code)
! 	afs_com_err(whoami, code, "so couldn't look up names");
      else {
  	for (n = 0; n < tids.idlist_len; n++) {
  	    if ((tids.idlist_val[n] == ANONYMOUSID)) {
! 		afs_com_err(whoami, PRNOENT, "so couldn't look up id for %s",
  			names.namelist_val[n]);
  	    } else
  		goodCount++;
***************
*** 470,476 ****
  	tnames.namelist_len = 0;
  	code = pr_IdToName(&ids, &tnames);
  	if (code)
! 	    com_err(whoami, code, "translating ids");
  	else
  	    goodCount++;
  	if (lnames) {
--- 438,444 ----
  	tnames.namelist_len = 0;
  	code = pr_IdToName(&ids, &tnames);
  	if (code)
! 	    afs_com_err(whoami, code, "translating ids");
  	else
  	    goodCount++;
  	if (lnames) {
***************
*** 501,507 ****
  	for (g = as->parms[1].items; g; g = g->next) {
  	    code = pr_AddToGroup(u->data, g->data);
  	    if (code) {
! 		com_err(whoami, code,
  			"; unable to add user %s to group %s %s", u->data,
  			g->data, (force ? "(ignored)" : ""));
  		if (!force)
--- 469,475 ----
  	for (g = as->parms[1].items; g; g = g->next) {
  	    code = pr_AddToGroup(u->data, g->data);
  	    if (code) {
! 		afs_com_err(whoami, code,
  			"; unable to add user %s to group %s %s", u->data,
  			g->data, (force ? "(ignored)" : ""));
  		if (!force)
***************
*** 522,528 ****
  	for (g = as->parms[1].items; g; g = g->next) {
  	    code = pr_RemoveUserFromGroup(u->data, g->data);
  	    if (code) {
! 		com_err(whoami, code,
  			"; unable to remove user %s from group %s %s",
  			u->data, g->data, (force ? "(ignored)" : ""));
  		if (!force)
--- 490,496 ----
  	for (g = as->parms[1].items; g; g = g->next) {
  	    code = pr_RemoveUserFromGroup(u->data, g->data);
  	    if (code) {
! 		afs_com_err(whoami, code,
  			"; unable to remove user %s from group %s %s",
  			u->data, g->data, (force ? "(ignored)" : ""));
  		if (!force)
***************
*** 557,563 ****
  	list.namelist_len = 0;
  	code = pr_IDListMembers(ids.idlist_val[i], &list);
  	if (code) {
! 	    com_err(whoami, code, "; unable to get membership of %s (id: %d)",
  		    name, id);
  	    continue;
  	}
--- 525,531 ----
  	list.namelist_len = 0;
  	code = pr_IDListMembers(ids.idlist_val[i], &list);
  	if (code) {
! 	    afs_com_err(whoami, code, "; unable to get membership of %s (id: %d)",
  		    name, id);
  	    continue;
  	}
***************
*** 598,604 ****
  
  	code = pr_DeleteByID(id);
  	if (code) {
! 	    com_err(whoami, code, "deleting %s (id: %d) %s", name, id,
  		    (force ? "(ignored)" : ""));
  	    if (!force)
  		return code;
--- 566,572 ----
  
  	code = pr_DeleteByID(id);
  	if (code) {
! 	    afs_com_err(whoami, code, "deleting %s (id: %d) %s", name, id,
  		    (force ? "(ignored)" : ""));
  	    if (!force)
  		return code;
***************
*** 646,652 ****
  	code = pr_ListEntry(id, &aentry);
  	if (code) {
  	    rcode = code;
! 	    com_err(whoami, code, "; unable to find entry for (id: %d)", id);
  	    continue;
  	}
  
--- 614,620 ----
  	code = pr_ListEntry(id, &aentry);
  	if (code) {
  	    rcode = code;
! 	    afs_com_err(whoami, code, "; unable to find entry for (id: %d)", id);
  	    continue;
  	}
  
***************
*** 655,661 ****
  	code = pr_IdToName(&lids, &lnames);
  	if (code) {
  	    rcode = code;
! 	    com_err(whoami, code,
  		    "translating owner (%d) and creator (%d) ids",
  		    aentry.owner, aentry.creator);
  	    continue;
--- 623,629 ----
  	code = pr_IdToName(&lids, &lnames);
  	if (code) {
  	    rcode = code;
! 	    afs_com_err(whoami, code,
  		    "translating owner (%d) and creator (%d) ids",
  		    aentry.owner, aentry.creator);
  	    continue;
***************
*** 736,742 ****
  	    pr_ListEntries(flag, startindex, &nentries, &entriesp,
  			   &nextstartindex);
  	if (code) {
! 	    com_err(whoami, code, "; unable to list entries\n");
  	    if (entriesp)
  		free(entriesp);
  	    break;
--- 704,710 ----
  	    pr_ListEntries(flag, startindex, &nentries, &entriesp,
  			   &nextstartindex);
  	if (code) {
! 	    afs_com_err(whoami, code, "; unable to list entries\n");
  	    if (entriesp)
  		free(entriesp);
  	    break;
***************
*** 764,770 ****
      owner = as->parms[1].items->data;
      code = pr_ChangeEntry(name, "", 0, owner);
      if (code)
! 	com_err(whoami, code, "; unable to change owner of %s to %s", name,
  		owner);
      return code;
  }
--- 732,738 ----
      owner = as->parms[1].items->data;
      code = pr_ChangeEntry(name, "", 0, owner);
      if (code)
! 	afs_com_err(whoami, code, "; unable to change owner of %s to %s", name,
  		owner);
      return code;
  }
***************
*** 780,786 ****
      newname = as->parms[1].items->data;
      code = pr_ChangeEntry(oldname, newname, 0, "");
      if (code)
! 	com_err(whoami, code, "; unable to change name of %s to %s", oldname,
  		newname);
      return code;
  }
--- 748,754 ----
      newname = as->parms[1].items->data;
      code = pr_ChangeEntry(oldname, newname, 0, "");
      if (code)
! 	afs_com_err(whoami, code, "; unable to change name of %s to %s", oldname,
  		newname);
      return code;
  }
***************
*** 793,803 ****
  
      code = pr_ListMaxUserId(&maxUser);
      if (code)
! 	com_err(whoami, code, "getting maximum user id");
      else {
  	code = pr_ListMaxGroupId(&maxGroup);
  	if (code)
! 	    com_err(whoami, code, "getting maximum group id");
  	else {
  	    printf("Max user id is %d and max group id is %d.\n", maxUser,
  		   maxGroup);
--- 761,771 ----
  
      code = pr_ListMaxUserId(&maxUser);
      if (code)
! 	afs_com_err(whoami, code, "getting maximum user id");
      else {
  	code = pr_ListMaxGroupId(&maxGroup);
  	if (code)
! 	    afs_com_err(whoami, code, "getting maximum group id");
  	else {
  	    printf("Max user id is %d and max group id is %d.\n", maxUser,
  		   maxGroup);
***************
*** 817,828 ****
  	/* set user max */
  	code = util_GetInt32(as->parms[1].items->data, &maxid);
  	if (code) {
! 	    com_err(whoami, code, "because id was: '%s'",
  		    as->parms[1].items->data);
  	} else {
  	    code = pr_SetMaxUserId(maxid);
  	    if (code)
! 		com_err(whoami, code, "so couldn't set Max User Id to %d",
  			maxid);
  	}
      }
--- 785,796 ----
  	/* set user max */
  	code = util_GetInt32(as->parms[1].items->data, &maxid);
  	if (code) {
! 	    afs_com_err(whoami, code, "because id was: '%s'",
  		    as->parms[1].items->data);
  	} else {
  	    code = pr_SetMaxUserId(maxid);
  	    if (code)
! 		afs_com_err(whoami, code, "so couldn't set Max User Id to %d",
  			maxid);
  	}
      }
***************
*** 830,841 ****
  	/* set group max */
  	code = util_GetInt32(as->parms[0].items->data, &maxid);
  	if (code) {
! 	    com_err(whoami, code, "because id was: '%s'",
  		    as->parms[0].items->data);
  	} else {
  	    code = pr_SetMaxGroupId(maxid);
  	    if (code)
! 		com_err(whoami, code, "so couldn't set Max Group Id to %d",
  			maxid);
  	}
      }
--- 798,809 ----
  	/* set group max */
  	code = util_GetInt32(as->parms[0].items->data, &maxid);
  	if (code) {
! 	    afs_com_err(whoami, code, "because id was: '%s'",
  		    as->parms[0].items->data);
  	} else {
  	    code = pr_SetMaxGroupId(maxid);
  	    if (code)
! 		afs_com_err(whoami, code, "so couldn't set Max Group Id to %d",
  			maxid);
  	}
      }
***************
*** 904,910 ****
      if (as->parms[2].items) {	/* limitgroups */
  	code = util_GetInt32(as->parms[2].items->data, &ngroups);
  	if (code) {
! 	    com_err(whoami, code, "because ngroups was: '%s'",
  		    as->parms[2].items->data);
  	    return code;
  	}
--- 872,878 ----
      if (as->parms[2].items) {	/* limitgroups */
  	code = util_GetInt32(as->parms[2].items->data, &ngroups);
  	if (code) {
! 	    afs_com_err(whoami, code, "because ngroups was: '%s'",
  		    as->parms[2].items->data);
  	    return code;
  	}
***************
*** 914,920 ****
      if (as->parms[3].items) {	/* limitgroups */
  	code = util_GetInt32(as->parms[3].items->data, &nusers);
  	if (code) {
! 	    com_err(whoami, code, "because nusers was: '%s'",
  		    as->parms[3].items->data);
  	    return code;
  	}
--- 882,888 ----
      if (as->parms[3].items) {	/* limitgroups */
  	code = util_GetInt32(as->parms[3].items->data, &nusers);
  	if (code) {
! 	    afs_com_err(whoami, code, "because nusers was: '%s'",
  		    as->parms[3].items->data);
  	    return code;
  	}
***************
*** 929,935 ****
  	    continue;
  	code = pr_SetFieldsEntry(id, mask, flags, ngroups, nusers);
  	if (code) {
! 	    com_err(whoami, code, "; unable to set fields for %s (id: %d)",
  		    name, id);
  	    return code;
  	}
--- 897,903 ----
  	    continue;
  	code = pr_SetFieldsEntry(id, mask, flags, ngroups, nusers);
  	if (code) {
! 	    afs_com_err(whoami, code, "; unable to set fields for %s (id: %d)",
  		    name, id);
  	    return code;
  	}
***************
*** 971,977 ****
  	    list.namelist_len = 0;
  	    code = pr_ListOwned(oid, &list, &more);
  	    if (code) {
! 		com_err(whoami, code,
  			"; unable to get owner list for %s (id: %d)", name,
  			oid);
  		break;
--- 939,945 ----
  	    list.namelist_len = 0;
  	    code = pr_ListOwned(oid, &list, &more);
  	    if (code) {
! 		afs_com_err(whoami, code,
  			"; unable to get owner list for %s (id: %d)", name,
  			oid);
  		break;
***************
*** 1022,1034 ****
  {
      register afs_int32 code;
      register struct cmd_syndesc *ts;
! #if defined(SUPERGROUPS)
      char line[2048];
      char *cp, *lastp;
      int parsec;
      char *parsev[CMD_MAXPARMS];
      char *savec;
! #endif
  #ifdef WIN32
      WSADATA WSAjunk;
  #endif
--- 990,1002 ----
  {
      register afs_int32 code;
      register struct cmd_syndesc *ts;
! 
      char line[2048];
      char *cp, *lastp;
      int parsec;
      char *parsev[CMD_MAXPARMS];
      char *savec;
! 
  #ifdef WIN32
      WSADATA WSAjunk;
  #endif
***************
*** 1137,1165 ****
      cmd_AddParm(ts, "-groups", CMD_FLAG, CMD_OPTIONAL, "list group entries");
      add_std_args(ts);
  
! #if defined(SUPERGROUPS)
! 
!     ts = cmd_CreateSyntax("interactive", Interactive, 0,
  			  "enter interactive mode");
      add_std_args(ts);
      cmd_CreateAlias(ts, "in");
  
!     ts = cmd_CreateSyntax("quit", Quit, 0, "exit program");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("source", Source, 0, "read commands from file");
      cmd_AddParm(ts, "-file", CMD_SINGLE, 0, "filename");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("sleep", Sleep, 0, "pause for a bit");
      cmd_AddParm(ts, "-delay", CMD_SINGLE, 0, "seconds");
      add_std_args(ts);
  
- #endif /* SUPERGROUPS */
- 
      cmd_SetBeforeProc(GetGlobals, 0);
  
- #if defined(SUPERGROUPS)
      finished = 1;
      if (code = cmd_Dispatch(argc, argv)) {
  	CleanUp(0);
--- 1105,1128 ----
      cmd_AddParm(ts, "-groups", CMD_FLAG, CMD_OPTIONAL, "list group entries");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("interactive", pts_Interactive, 0,
  			  "enter interactive mode");
      add_std_args(ts);
      cmd_CreateAlias(ts, "in");
  
!     ts = cmd_CreateSyntax("quit", pts_Quit, 0, "exit program");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("source", pts_Source, 0, "read commands from file");
      cmd_AddParm(ts, "-file", CMD_SINGLE, 0, "filename");
      add_std_args(ts);
  
!     ts = cmd_CreateSyntax("sleep", pts_Sleep, 0, "pause for a bit");
      cmd_AddParm(ts, "-delay", CMD_SINGLE, 0, "seconds");
      add_std_args(ts);
  
      cmd_SetBeforeProc(GetGlobals, 0);
  
      finished = 1;
      if (code = cmd_Dispatch(argc, argv)) {
  	CleanUp(0);
***************
*** 1188,1194 ****
  	    cmd_ParseLine(line, parsev, &parsec,
  			  sizeof(parsev) / sizeof(*parsev));
  	if (code) {
! 	    com_err(whoami, code, "parsing line: <%s>", line);
  	    exit(2);
  	}
  	savec = parsev[0];
--- 1151,1157 ----
  	    cmd_ParseLine(line, parsev, &parsec,
  			  sizeof(parsev) / sizeof(*parsev));
  	if (code) {
! 	    afs_com_err(whoami, code, "parsing line: <%s>", line);
  	    exit(2);
  	}
  	savec = parsev[0];
***************
*** 1199,1209 ****
      }
      CleanUp(0);
      exit(0);
- 
- #else /* SUPERGROUPS */
- 
-     cmd_SetAfterProc(CleanUp, 0);
-     code = cmd_Dispatch(argc, argv);
-     exit(code != 0);
- #endif /* SUPERGROUPS */
  }
--- 1162,1166 ----
      }
      CleanUp(0);
      exit(0);
  }
+ 
Index: openafs/src/ptserver/ptserver.c
diff -c openafs/src/ptserver/ptserver.c:1.21.2.7 openafs/src/ptserver/ptserver.c:1.21.2.8
*** openafs/src/ptserver/ptserver.c:1.21.2.7	Tue Jun 20 16:35:01 2006
--- openafs/src/ptserver/ptserver.c	Tue Apr 10 14:43:45 2007
***************
*** 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
--- 113,119 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptserver.c,v 1.21.2.8 2007/04/10 18:43:45 shadow Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
***************
*** 149,154 ****
--- 149,155 ----
  #include "error_macros.h"
  #include "afs/audit.h"
  #include <afs/afsutil.h>
+ #include <afs/com_err.h>
  
  
  /* make	all of these into a structure if you want */
***************
*** 460,466 ****
      code =
  	afsconf_GetExtendedCellInfo(prdir, NULL, "afsprot", &info, &clones);
      if (code) {
! 	com_err(whoami, code, "Couldn't get server list");
  	PT_EXIT(2);
      }
      pr_realmName = info.name;
--- 461,467 ----
      code =
  	afsconf_GetExtendedCellInfo(prdir, NULL, "afsprot", &info, &clones);
      if (code) {
! 	afs_com_err(whoami, code, "Couldn't get server list");
  	PT_EXIT(2);
      }
      pr_realmName = info.name;
***************
*** 470,476 ****
      /* get keys */
      code = afsconf_GetKey(prdir, 999, &tkey);
      if (code) {
! 	com_err(whoami, code,
  		"couldn't get bcrypt keys from key file, ignoring.");
      }
  #endif
--- 471,477 ----
      /* get keys */
      code = afsconf_GetKey(prdir, 999, &tkey);
      if (code) {
! 	afs_com_err(whoami, code,
  		"couldn't get bcrypt keys from key file, ignoring.");
      }
  #endif
***************
*** 528,534 ****
  	ubik_ServerInitByInfo(myHost, htons(AFSCONF_PROTPORT), &info, &clones,
  			      pr_dbaseName, &dbase);
      if (code) {
! 	com_err(whoami, code, "Ubik init failed");
  	PT_EXIT(2);
      }
  #if defined(SUPERGROUPS)
--- 529,535 ----
  	ubik_ServerInitByInfo(myHost, htons(AFSCONF_PROTPORT), &info, &clones,
  			      pr_dbaseName, &dbase);
      if (code) {
! 	afs_com_err(whoami, code, "Ubik init failed");
  	PT_EXIT(2);
      }
  #if defined(SUPERGROUPS)
Index: openafs/src/ptserver/ptuser.c
diff -c openafs/src/ptserver/ptuser.c:1.16.2.14 openafs/src/ptserver/ptuser.c:1.16.2.15
*** openafs/src/ptserver/ptuser.c:1.16.2.14	Fri Jan  5 13:23:25 2007
--- openafs/src/ptserver/ptuser.c	Tue Apr 10 14:43:45 2007
***************
*** 15,21 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptuser.c,v 1.16.2.14 2007/01/05 18:23:25 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
--- 15,21 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptuser.c,v 1.16.2.15 2007/04/10 18:43:45 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "afs/sysincludes.h"
***************
*** 54,59 ****
--- 54,60 ----
  #include <afs/auth.h>
  #include <afs/cellconfig.h>
  #include <afs/afsutil.h>
+ #include <afs/com_err.h>
  #include "ptclient.h"
  #include "ptuser.h"
  #include "pterror.h"
***************
*** 187,193 ****
  	if (code)
  	    fprintf(stderr,
  		    "libprot: clientauthsecure returns %d %s"
! 		    " (so trying noauth)\n", code, error_message(code));
  	if (code)
  	    scIndex = 0;	/* use noauth */
  	if (scIndex != 2)
--- 188,194 ----
  	if (code)
  	    fprintf(stderr,
  		    "libprot: clientauthsecure returns %d %s"
! 		    " (so trying noauth)\n", code, afs_error_message(code));
  	if (code)
  	    scIndex = 0;	/* use noauth */
  	if (scIndex != 2)
***************
*** 223,229 ****
      if ((scIndex == 0) && (sc[0] == 0))
  	sc[0] = rxnull_NewClientSecurityObject();
      if ((scIndex == 0) && (secLevel != 0))
! 	com_err(whoami, code,
  		"Could not get afs tokens, running unauthenticated.");
  
      memset(serverconns, 0, sizeof(serverconns));	/* terminate list!!! */
--- 224,230 ----
      if ((scIndex == 0) && (sc[0] == 0))
  	sc[0] = rxnull_NewClientSecurityObject();
      if ((scIndex == 0) && (secLevel != 0))
! 	afs_com_err(whoami, code,
  		"Could not get afs tokens, running unauthenticated.");
  
      memset(serverconns, 0, sizeof(serverconns));	/* terminate list!!! */
***************
*** 235,241 ****
  
      code = ubik_ClientInit(serverconns, &pruclient);
      if (code) {
! 	com_err(whoami, code, "ubik client init failed.");
  	return code;
      }
      lastLevel = scIndex;
--- 236,242 ----
  
      code = ubik_ClientInit(serverconns, &pruclient);
      if (code) {
! 	afs_com_err(whoami, code, "ubik client init failed.");
  	return code;
      }
      lastLevel = scIndex;
Index: openafs/src/ptserver/ptutils.c
diff -c openafs/src/ptserver/ptutils.c:1.18.2.1 openafs/src/ptserver/ptutils.c:1.18.2.4
*** openafs/src/ptserver/ptutils.c:1.18.2.1	Fri Apr 15 15:40:43 2005
--- openafs/src/ptserver/ptutils.c	Sat Aug 11 19:50:02 2007
***************
*** 24,30 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptutils.c,v 1.18.2.1 2005/04/15 19:40:43 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 24,30 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptutils.c,v 1.18.2.4 2007/08/11 23:50:02 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 113,183 ****
  	    c = ENTRYSIZE - o;
  	    if (c > l)
  		c = l;
  #if DEBUG_SG_MAP
  	    if (o)
  		fprintf(stderr, "Writing %d bytes of entry @ %#lx(+%d)\n", c,
  			p - o, o);
  	    else if (c == ENTRYSIZE)
  		fprintf(stderr,
! 			"Writing %d bytes of entry @ %#lx (%d<%s>,%d)\n", c,
! 			p, ((struct prentry *)cp)->flags,
! 			(((struct prentry *)cp)->flags & PRTYPE) ==
! 			PRUSER ? "user" : (((struct prentry *)cp)->
! 					   flags & PRTYPE) ==
! 			PRFREE ? "free" : (((struct prentry *)cp)->
! 					   flags & PRTYPE) ==
! 			PRGRP ? "group" : (((struct prentry *)cp)->
! 					   flags & PRTYPE) ==
! 			PRCONT ? "cont" : (((struct prentry *)cp)->
! 					   flags & PRTYPE) ==
! 			PRCELL ? "cell" : (((struct prentry *)cp)->
! 					   flags & PRTYPE) ==
! 			PRFOREIGN ? "foreign" : (((struct prentry *)cp)->
! 						 flags & PRTYPE) ==
! 			PRINST ? "sub/super instance" : "?",
! 			((struct prentry *)cp)->id);
  	    else if (c >= 8)
  		fprintf(stderr,
  			"Writing first %d bytes of entry @ %#lx (%d<%s>,%d)\n",
! 			c, p, ((struct prentry *)cp)->flags,
! 			(((struct prentry *)cp)->flags & PRTYPE) ==
! 			PRUSER ? "user" : (((struct prentry *)cp)->
! 					   flags & PRTYPE) ==
! 			PRFREE ? "free" : (((struct prentry *)cp)->
! 					   flags & PRTYPE) ==
! 			PRGRP ? "group" : (((struct prentry *)cp)->
! 					   flags & PRTYPE) ==
! 			PRCONT ? "cont" : (((struct prentry *)cp)->
! 					   flags & PRTYPE) ==
! 			PRCELL ? "cell" : (((struct prentry *)cp)->
! 					   flags & PRTYPE) ==
! 			PRFOREIGN ? "foreign" : (((struct prentry *)cp)->
! 						 flags & PRTYPE) ==
! 			PRINST ? "sub/super instance" : "?",
! 			((struct prentry *)cp)->id);
  	    else
  		fprintf(stderr, "Writing %d bytes of entry @ %#lx\n", c, p);
  #endif
! 	    if (!o && c >= 8
! 		&& (((struct prentry *)cp)->flags & PRTYPE) == PRGRP) {
  #if DEBUG_SG_MAP
! 		if (in_map(sg_found, -((struct prentry *)cp)->id))
  		    fprintf(stderr, "Unfound: Removing group %d\n",
! 			    ((struct prentry *)cp)->id);
! 		if (in_map(sg_flagged, -((struct prentry *)cp)->id))
  		    fprintf(stderr, "Unflag: Removing group %d\n",
! 			    ((struct prentry *)cp)->id);
  #endif
  		sg_found =
  		    bic_map(sg_found,
! 			    add_map(NIL_MAP, -((struct prentry *)cp)->id));
  		sg_flagged =
  		    bic_map(sg_flagged,
! 			    add_map(NIL_MAP, -((struct prentry *)cp)->id));
  	    }
  	    cp += c;
  	    p += c;
  	    l -= c;
  	}
      }
      return (*pt_save_dbase_write) (tdb, fno, bp, pos, count);
--- 113,164 ----
  	    c = ENTRYSIZE - o;
  	    if (c > l)
  		c = l;
+ #define xPT(p,x) ((((struct prentry *)(p))->flags & htonl(PRTYPE)) == htonl(x))
  #if DEBUG_SG_MAP
  	    if (o)
  		fprintf(stderr, "Writing %d bytes of entry @ %#lx(+%d)\n", c,
  			p - o, o);
  	    else if (c == ENTRYSIZE)
  		fprintf(stderr,
! 			"Writing %d bytes of entry @ %#lx (%d<%s>,%d)\n",
! 			c, p, ntohl(((struct prentry *)cp)->flags),
! 			xPT(cp,PRUSER) ? "user" : xPT(cp,PRFREE) ? "free" :
! 			xPT(cp,PRGRP) ? "group" : xPT(cp,PRCONT) ? "cont" :
! 			xPT(cp,PRCELL) ? "cell" : xPT(cp,PRFOREIGN) ? "foreign" :
! 			xPT(cp,PRINST) ? "sub/super instance" : "?",
! 			ntohl(((struct prentry *)cp)->id));
  	    else if (c >= 8)
  		fprintf(stderr,
  			"Writing first %d bytes of entry @ %#lx (%d<%s>,%d)\n",
! 			c, p, ntohl(((struct prentry *)cp)->flags),
! 			xPT(cp,PRUSER) ? "user" : xPT(cp,PRFREE) ? "free" :
! 			xPT(cp,PRGRP) ? "group" : xPT(cp,PRCONT) ? "cont" :
! 			xPT(cp,PRCELL) ? "cell" : xPT(cp,PRFOREIGN) ? "foreign" :
! 			xPT(cp,PRINST) ? "sub/super instance" : "?",
! 			ntohl(((struct prentry *)cp)->id));
  	    else
  		fprintf(stderr, "Writing %d bytes of entry @ %#lx\n", c, p);
  #endif
! 	    if (!o && c >= 8 && xPT(cp,PRGRP)) {
  #if DEBUG_SG_MAP
! 		if (in_map(sg_found, -ntohl(((struct prentry *)cp)->id)))
  		    fprintf(stderr, "Unfound: Removing group %d\n",
! 			    ntohl(((struct prentry *)cp)->id));
! 		if (in_map(sg_flagged, -ntohl(((struct prentry *)cp)->id)))
  		    fprintf(stderr, "Unflag: Removing group %d\n",
! 			    ntohl(((struct prentry *)cp)->id));
  #endif
  		sg_found =
  		    bic_map(sg_found,
! 			add_map(NIL_MAP, -ntohl(((struct prentry *)cp)->id)));
  		sg_flagged =
  		    bic_map(sg_flagged,
! 			add_map(NIL_MAP, -ntohl(((struct prentry *)cp)->id)));
  	    }
  	    cp += c;
  	    p += c;
  	    l -= c;
+ #undef xPT
  	}
      }
      return (*pt_save_dbase_write) (tdb, fno, bp, pos, count);
***************
*** 744,750 ****
      }
  
      nptr = tentry.next;
!     while (nptr != NULL) {
  	code = pr_ReadCoEntry(at, 0, nptr, &centry);
  	if (code != 0)
  	    return code;
--- 725,731 ----
      }
  
      nptr = tentry.next;
!     while (nptr) {
  	code = pr_ReadCoEntry(at, 0, nptr, &centry);
  	if (code != 0)
  	    return code;
***************
*** 803,809 ****
      if (code != 0)
  	return code;
  #ifdef PR_REMEMBER_TIMES
!     tentry.removeTime = time((afs_int32 *) 0);
  #endif
      tentryg = (struct prentryg *)&tentry;
      for (i = 0; i < SGSIZE; i++) {
--- 784,790 ----
      if (code != 0)
  	return code;
  #ifdef PR_REMEMBER_TIMES
!     tentry.removeTime = time(NULL);
  #endif
      tentryg = (struct prentryg *)&tentry;
      for (i = 0; i < SGSIZE; i++) {
***************
*** 821,827 ****
      }
      hloc = 0;
      nptr = tentryg->nextsg;
!     while (nptr != NULL) {
  	code = pr_ReadCoEntry(at, 0, nptr, &centry);
  	if (code != 0)
  	    return code;
--- 802,808 ----
      }
      hloc = 0;
      nptr = tentryg->nextsg;
!     while (nptr) {
  	code = pr_ReadCoEntry(at, 0, nptr, &centry);
  	if (code != 0)
  	    return code;
***************
*** 867,873 ****
  	}			/* for all coentry slots */
  	hloc = nptr;
  	nptr = centry.next;
! 	bcopy((char *)&centry, (char *)&hentry, sizeof(centry));
      }				/* while there are coentries */
      return PRNOENT;
  }
--- 848,854 ----
  	}			/* for all coentry slots */
  	hloc = nptr;
  	nptr = centry.next;
! 	memcpy((char *)&centry, (char *)&hentry, sizeof(centry));
      }				/* while there are coentries */
      return PRNOENT;
  }
***************
*** 1158,1164 ****
      if (entry->id == aid)
  	return PRINCONSISTENT;
  #ifdef PR_REMEMBER_TIMES
!     entry->addTime = time((afs_int32 *) 0);
  #endif
      entryg = (struct prentryg *)entry;
      for (i = 0; i < SGSIZE; i++) {
--- 1139,1145 ----
      if (entry->id == aid)
  	return PRINCONSISTENT;
  #ifdef PR_REMEMBER_TIMES
!     entry->addTime = time(NULL);
  #endif
      entryg = (struct prentryg *)entry;
      for (i = 0; i < SGSIZE; i++) {
***************
*** 1177,1183 ****
      }
      last = 0;
      nptr = entryg->nextsg;
!     while (nptr != NULL) {
  	code = pr_ReadCoEntry(tt, 0, nptr, &nentry);
  	if (code != 0)
  	    return code;
--- 1158,1164 ----
      }
      last = 0;
      nptr = entryg->nextsg;
!     while (nptr) {
  	code = pr_ReadCoEntry(tt, 0, nptr, &nentry);
  	if (code != 0)
  	    return code;
***************
*** 1237,1243 ****
      memset(&aentry, 0, sizeof(aentry));
      aentry.flags |= PRCONT;
      aentry.id = entry->id;
!     aentry.next = NULL;
      aentry.entries[0] = aid;
      code = pr_WriteCoEntry(tt, 0, nptr, &aentry);
      if (code != 0)
--- 1218,1224 ----
      memset(&aentry, 0, sizeof(aentry));
      aentry.flags |= PRCONT;
      aentry.id = entry->id;
!     aentry.next = 0;
      aentry.entries[0] = aid;
      code = pr_WriteCoEntry(tt, 0, nptr, &aentry);
      if (code != 0)
***************
*** 1531,1537 ****
      }
  
      nptr = tentryg->nextsg;
!     while (nptr != NULL) {
  	didsomething = 1;
  	/* look through cont entries */
  	code = pr_ReadCoEntry(at, 0, nptr, &centry);
--- 1512,1518 ----
      }
  
      nptr = tentryg->nextsg;
!     while (nptr) {
  	didsomething = 1;
  	/* look through cont entries */
  	code = pr_ReadCoEntry(at, 0, nptr, &centry);
***************
*** 1599,1605 ****
      }
  
      nptr = tentryg->nextsg;
!     while (nptr != NULL) {
  	/* look through cont entries */
  	code = pr_ReadCoEntry(at, 0, nptr, &centry);
  	if (code != 0)
--- 1580,1586 ----
      }
  
      nptr = tentryg->nextsg;
!     while (nptr) {
  	/* look through cont entries */
  	code = pr_ReadCoEntry(at, 0, nptr, &centry);
  	if (code != 0)
***************
*** 1697,1703 ****
  
      code = pr_Read(tt, 0, 0, (char *)&cheader, sizeof(cheader));
      if (code != 0) {
! 	com_err(whoami, code, "Couldn't read header");
      }
      return code;
  }
--- 1678,1684 ----
  
      code = pr_Read(tt, 0, 0, (char *)&cheader, sizeof(cheader));
      if (code != 0) {
! 	afs_com_err(whoami, code, "Couldn't read header");
      }
      return code;
  }
***************
*** 1735,1741 ****
      len = sizeof(cheader);
      code = pr_Read(tt, 0, 0, (char *)&cheader, len);
      if (code != 0) {
! 	com_err(whoami, code, "couldn't read header");
  	ubik_AbortTrans(tt);
  	return code;
      }
--- 1716,1722 ----
      len = sizeof(cheader);
      code = pr_Read(tt, 0, 0, (char *)&cheader, len);
      if (code != 0) {
! 	afs_com_err(whoami, code, "couldn't read header");
  	ubik_AbortTrans(tt);
  	return code;
      }
***************
*** 1762,1775 ****
  	for (i = 0; i < sizeof(cheader); i++)
  	    if (bp[i]) {
  		code = PRDBBAD;
! 		com_err(whoami, code,
  			"Can't rebuild database because it is not empty");
  		return code;
  	    }
      }
      if (!pr_noAuth) {
  	code = PRDBBAD;
! 	com_err(whoami, code,
  		"Can't rebuild database because not running NoAuth");
  	return code;
      }
--- 1743,1756 ----
  	for (i = 0; i < sizeof(cheader); i++)
  	    if (bp[i]) {
  		code = PRDBBAD;
! 		afs_com_err(whoami, code,
  			"Can't rebuild database because it is not empty");
  		return code;
  	    }
      }
      if (!pr_noAuth) {
  	code = PRDBBAD;
! 	afs_com_err(whoami, code,
  		"Can't rebuild database because not running NoAuth");
  	return code;
      }
***************
*** 1804,1810 ****
      if ((code = set_header_word(tt, version, htonl(PRDBVERSION)))
  	|| (code = set_header_word(tt, headerSize, htonl(sizeof(cheader))))
  	|| (code = set_header_word(tt, eofPtr, cheader.headerSize))) {
! 	com_err(whoami, code, "couldn't write header words");
  	ubik_AbortTrans(tt);
  	return code;
      }
--- 1785,1791 ----
      if ((code = set_header_word(tt, version, htonl(PRDBVERSION)))
  	|| (code = set_header_word(tt, headerSize, htonl(sizeof(cheader))))
  	|| (code = set_header_word(tt, eofPtr, cheader.headerSize))) {
! 	afs_com_err(whoami, code, "couldn't write header words");
  	ubik_AbortTrans(tt);
  	return code;
      }
***************
*** 1814,1820 ****
      code = CreateEntry		      \
  	(tt, (name), &temp, /*idflag*/1, flag, SYSADMINID, SYSADMINID); \
      if (code) {			      \
! 	com_err (whoami, code, "couldn't create %s with id %di.", 	\
  		 (name), (id));	      \
  	ubik_AbortTrans(tt);	      \
  	return code;		      \
--- 1795,1801 ----
      code = CreateEntry		      \
  	(tt, (name), &temp, /*idflag*/1, flag, SYSADMINID, SYSADMINID); \
      if (code) {			      \
! 	afs_com_err (whoami, code, "couldn't create %s with id %di.", 	\
  		 (name), (id));	      \
  	ubik_AbortTrans(tt);	      \
  	return code;		      \
***************
*** 1832,1838 ****
       * it back to 0 */
      code = set_header_word(tt, maxID, 0);	/* correct in any byte order */
      if (code) {
! 	com_err(whoami, code, "couldn't reset max id");
  	ubik_AbortTrans(tt);
  	return code;
      }
--- 1813,1819 ----
       * it back to 0 */
      code = set_header_word(tt, maxID, 0);	/* correct in any byte order */
      if (code) {
! 	afs_com_err(whoami, code, "couldn't reset max id");
  	ubik_AbortTrans(tt);
  	return code;
      }
***************
*** 1942,1948 ****
  		break;
  	}
  	pos = tentry.next;
! 	while (pos != NULL) {
  #define centry  (*(struct contentry*)&tent)
  	    code = pr_ReadCoEntry(at, 0, pos, &centry);
  	    if ((centry.id != aid)
--- 1923,1929 ----
  		break;
  	}
  	pos = tentry.next;
! 	while (pos) {
  #define centry  (*(struct contentry*)&tent)
  	    code = pr_ReadCoEntry(at, 0, pos, &centry);
  	    if ((centry.id != aid)
Index: openafs/src/ptserver/readgroup.c
diff -c openafs/src/ptserver/readgroup.c:1.10 openafs/src/ptserver/readgroup.c:1.10.2.1
*** openafs/src/ptserver/readgroup.c:1.10	Wed Jun 23 10:27:42 2004
--- openafs/src/ptserver/readgroup.c	Tue Apr 10 14:43:45 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/readgroup.c,v 1.10 2004/06/23 14:27:42 shadow Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/readgroup.c,v 1.10.2.1 2007/04/10 18:43:45 shadow Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
***************
*** 29,34 ****
--- 29,35 ----
  #include <rx/xdr.h>
  #include <afs/cellconfig.h>
  #include <afs/afsutil.h>
+ #include <afs/com_err.h>
  #include "ptclient.h"
  #include "pterror.h"
  
Index: openafs/src/ptserver/readpwd.c
diff -c openafs/src/ptserver/readpwd.c:1.9 openafs/src/ptserver/readpwd.c:1.9.2.1
*** openafs/src/ptserver/readpwd.c:1.9	Wed Jun 23 10:27:42 2004
--- openafs/src/ptserver/readpwd.c	Tue Apr 10 14:43:45 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/readpwd.c,v 1.9 2004/06/23 14:27:42 shadow Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/readpwd.c,v 1.9.2.1 2007/04/10 18:43:45 shadow Exp $");
  
  #include <stdio.h>
  #ifdef AFS_NT40_ENV
***************
*** 28,33 ****
--- 28,34 ----
  #include <rx/xdr.h>
  #include <afs/cellconfig.h>
  #include <afs/afsutil.h>
+ #include <afs/com_err.h>
  #include "ptclient.h"
  
  int
Index: openafs/src/ptserver/testpt.c
diff -c openafs/src/ptserver/testpt.c:1.14 openafs/src/ptserver/testpt.c:1.14.2.2
*** openafs/src/ptserver/testpt.c:1.14	Wed Jun 23 10:27:42 2004
--- openafs/src/ptserver/testpt.c	Sat Aug 11 19:50:02 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/testpt.c,v 1.14 2004/06/23 14:27:42 shadow Exp $");
  
  #include <ctype.h>
  #include <errno.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/testpt.c,v 1.14.2.2 2007/08/11 23:50:02 jaltman Exp $");
  
  #include <ctype.h>
  #include <errno.h>
***************
*** 49,54 ****
--- 49,55 ----
  #include "ptclient.h"
  #include "pterror.h"
  #include <afs/afsutil.h>
+ #include <afs/com_err.h>
  
  static char *whoami = "testpr";
  static struct afsconf_dir *conf;	/* cell info, set by MyBeforeProc */
***************
*** 78,84 ****
  
      code = pr_Initialize(1, conf_dir, NULL);
      if (code) {
! 	com_err(whoami, code, "initializing pruser");
  	exit(1);
      }
      if (startId < 0) {
--- 79,85 ----
  
      code = pr_Initialize(1, conf_dir, NULL);
      if (code) {
! 	afs_com_err(whoami, code, "initializing pruser");
  	exit(1);
      }
      if (startId < 0) {
***************
*** 86,92 ****
  	code = pr_ListMaxGroupId(&maxId);
  	if (code) {
  	  bad_max:
! 	    com_err(whoami, code, "getting maximum id");
  	    exit(2);
  	}
  	if (startId < maxId) {
--- 87,93 ----
  	code = pr_ListMaxGroupId(&maxId);
  	if (code) {
  	  bad_max:
! 	    afs_com_err(whoami, code, "getting maximum id");
  	    exit(2);
  	}
  	if (startId < maxId) {
***************
*** 132,138 ****
  	lids.idlist_len = i;
  	code = pr_IdToName(&lids, &lnames);
  	if (code) {
! 	    com_err(whoami, code, "converting id to name");
  	    exit(2);
  	}
  	for (j = 0; j < lnames.namelist_len; j++) {
--- 133,139 ----
  	lids.idlist_len = i;
  	code = pr_IdToName(&lids, &lnames);
  	if (code) {
! 	    afs_com_err(whoami, code, "converting id to name");
  	    exit(2);
  	}
  	for (j = 0; j < lnames.namelist_len; j++) {
***************
*** 255,261 ****
  		}
  	    }
  	}
! 	com_err(whoami, code, "couldn't create %s", name);
  	exit(12);
      }
    done:
--- 256,262 ----
  		}
  	    }
  	}
! 	afs_com_err(whoami, code, "couldn't create %s", name);
  	exit(12);
      }
    done:
***************
*** 307,320 ****
      }
  
      sprintf(name, "%s:%s%d", ownerName, createPrefix, g);
!     code = ubik_Call(PR_NewEntry, pruclient, 0, name, PRGRP, owner, &id);
      if (code) {
  	if (code == PREXIST) {
  	    code = pr_Delete(name);
  	    if (code == 0) {
  		nGDels++;
  		code =
! 		    ubik_Call(PR_NewEntry, pruclient, 0, name, PRGRP, owner,
  			      &id);
  		if (code == 0) {
  		    if (verbose)
--- 308,321 ----
      }
  
      sprintf(name, "%s:%s%d", ownerName, createPrefix, g);
!     code = ubik_PR_NewEntry(pruclient, 0, name, PRGRP, owner, &id);
      if (code) {
  	if (code == PREXIST) {
  	    code = pr_Delete(name);
  	    if (code == 0) {
  		nGDels++;
  		code =
! 		    ubik_PR_NewEntry(pruclient, 0, name, PRGRP, owner,
  			      &id);
  		if (code == 0) {
  		    if (verbose)
***************
*** 323,329 ****
  		}
  	    }
  	}
! 	com_err(whoami, code, "couldn't create %s w/ owner=%d", name, owner);
  	exit(13);
      }
    done:
--- 324,330 ----
  		}
  	    }
  	}
! 	afs_com_err(whoami, code, "couldn't create %s w/ owner=%d", name, owner);
  	exit(13);
      }
    done:
***************
*** 350,358 ****
      for (j = 0; j < number; j++) {	/* find an undeleted id */
  	m = (k + j) % number;
  	if (id = list[m]) {
! 	    code = ubik_Call(PR_Delete, pruclient, 0, id);
  	    if (code) {
! 		com_err(whoami, code, "Couldn't delete %di", id);
  		exit(22);
  	    }
  	    list[m] = 0;
--- 351,359 ----
      for (j = 0; j < number; j++) {	/* find an undeleted id */
  	m = (k + j) % number;
  	if (id = list[m]) {
! 	    code = ubik_PR_Delete(pruclient, 0, id);
  	    if (code) {
! 		afs_com_err(whoami, code, "Couldn't delete %di", id);
  		exit(22);
  	    }
  	    list[m] = 0;
***************
*** 378,386 ****
  	CreateGroup(g);
      ui = users[u];
      gi = groups[g];
!     code = ubik_Call(PR_AddToGroup, pruclient, 0, ui, gi);
      if (code) {
! 	com_err(whoami, code, "couldn't add %d to %d", ui, gi);
  	exit(14);
      }
      if (verbose)
--- 379,387 ----
  	CreateGroup(g);
      ui = users[u];
      gi = groups[g];
!     code = ubik_PR_AddToGroup(pruclient, 0, ui, gi);
      if (code) {
! 	afs_com_err(whoami, code, "couldn't add %d to %d", ui, gi);
  	exit(14);
      }
      if (verbose)
***************
*** 397,405 ****
  
      ui = users[u];
      gi = groups[g];
!     code = ubik_Call(PR_RemoveFromGroup, pruclient, 0, ui, gi);
      if (code) {
! 	com_err(whoami, code, "couldn't remove %d from %d", ui, gi);
  	exit(14);
      }
      if (verbose)
--- 398,406 ----
  
      ui = users[u];
      gi = groups[g];
!     code = ubik_PR_RemoveFromGroup(pruclient, 0, ui, gi);
      if (code) {
! 	afs_com_err(whoami, code, "couldn't remove %d from %d", ui, gi);
  	exit(14);
      }
      if (verbose)
***************
*** 424,430 ****
  
      code = pr_Initialize(1, conf_dir, NULL);
      if (code) {
! 	com_err(whoami, code, "initializing pruser");
  	exit(1);
      }
      /* get name of person running command */
--- 425,431 ----
  
      code = pr_Initialize(1, conf_dir, NULL);
      if (code) {
! 	afs_com_err(whoami, code, "initializing pruser");
  	exit(1);
      }
      /* get name of person running command */
***************
*** 439,445 ****
  	    exit(2);
  	code = ktc_GetToken(&afs, &token, sizeof(token), &user);
  	if (code) {
! 	    com_err(whoami, code, "getting afs tokens");
  	    exit(3);
  	}
  	if (strlen(user.instance) > 0) {
--- 440,446 ----
  	    exit(2);
  	code = ktc_GetToken(&afs, &token, sizeof(token), &user);
  	if (code) {
! 	    afs_com_err(whoami, code, "getting afs tokens");
  	    exit(3);
  	}
  	if (strlen(user.instance) > 0) {
***************
*** 451,457 ****
  	    callerId = atoi(user.name + 7);
  	    code = pr_SIdToName(callerId, callerName);
  	    if (code) {
! 		com_err(whoami, code, "call get name for id %d", callerId);
  		exit(6);
  	    }
  	} else {
--- 452,458 ----
  	    callerId = atoi(user.name + 7);
  	    code = pr_SIdToName(callerId, callerName);
  	    if (code) {
! 		afs_com_err(whoami, code, "call get name for id %d", callerId);
  		exit(6);
  	    }
  	} else {
***************
*** 465,471 ****
  	    callerId = 0;
  	    code = pr_CreateUser(callerName, &callerId);
  	    if (code) {
! 		com_err(whoami, code, "can't create caller %s", callerName);
  		exit(5);
  	    }
  	    printf("Creating caller %s (%di)\n", callerName, callerId);
--- 466,472 ----
  	    callerId = 0;
  	    code = pr_CreateUser(callerName, &callerId);
  	    if (code) {
! 		afs_com_err(whoami, code, "can't create caller %s", callerName);
  		exit(5);
  	    }
  	    printf("Creating caller %s (%di)\n", callerName, callerId);
***************
*** 473,479 ****
  	/* else */
  #endif
  	if (code) {
! 	    com_err(whoami, code, "can't find caller %s", callerName);
  	    exit(6);
  	} else
  	    printf("Assuming caller is %s (%di)\n", callerName, callerId);
--- 474,480 ----
  	/* else */
  #endif
  	if (code) {
! 	    afs_com_err(whoami, code, "can't find caller %s", callerName);
  	    exit(6);
  	} else
  	    printf("Assuming caller is %s (%di)\n", callerName, callerId);
***************
*** 599,605 ****
  		proc = PR_GetCPS;
  	    code = ubik_Call(proc, pruclient, 0, ui, &alist, &over);
  	    if (code) {
! 		com_err(whoami, code,
  			"getting membership list of (%di) using %s", ui,
  			((proc == PR_GetCPS) ? "GetCPR" : "ListElements"));
  		exit(24);
--- 600,606 ----
  		proc = PR_GetCPS;
  	    code = ubik_Call(proc, pruclient, 0, ui, &alist, &over);
  	    if (code) {
! 		afs_com_err(whoami, code,
  			"getting membership list of (%di) using %s", ui,
  			((proc == PR_GetCPS) ? "GetCPR" : "ListElements"));
  		exit(24);
***************
*** 655,663 ****
  		}
  #define GETOWNED(xlist,xid) \
    (xlist).prlist_val = 0; (xlist).prlist_len = 0; \
!   code = ubik_Call (PR_ListOwned, pruclient, 0, (xid), &(xlist), &over); \
    if (code) { \
!       com_err (whoami, code, "getting owner list of (%di)", (xid)); \
        exit (23); } \
    if (over) \
        { fprintf (stderr, "membership of id %di too long\n", (xid)); }
--- 656,664 ----
  		}
  #define GETOWNED(xlist,xid) \
    (xlist).prlist_val = 0; (xlist).prlist_len = 0; \
!   code = ubik_PR_ListOwned(pruclient, 0, (xid), &(xlist), &over); \
    if (code) { \
!       afs_com_err (whoami, code, "getting owner list of (%di)", (xid)); \
        exit (23); } \
    if (over) \
        { fprintf (stderr, "membership of id %di too long\n", (xid)); }
***************
*** 778,784 ****
  
      code = pr_Initialize(1, conf_dir, NULL);
      if (code) {
! 	com_err(whoami, code, "initializing pruser");
  	exit(1);
      }
  
--- 779,785 ----
  
      code = pr_Initialize(1, conf_dir, NULL);
      if (code) {
! 	afs_com_err(whoami, code, "initializing pruser");
  	exit(1);
      }
  
***************
*** 789,795 ****
      id = 0;
      code = pr_CreateUser(name, &id);
      if ((code != RXGEN_CC_MARSHAL) && (code != PRBADNAM)) {
! 	com_err(whoami, code, "succeeded creating %s", name);
  	exit(2);
      }
      name[i] = 0;
--- 790,796 ----
      id = 0;
      code = pr_CreateUser(name, &id);
      if ((code != RXGEN_CC_MARSHAL) && (code != PRBADNAM)) {
! 	afs_com_err(whoami, code, "succeeded creating %s", name);
  	exit(2);
      }
      name[i] = 0;
***************
*** 799,815 ****
  	fprintf(stderr, "group already exists, skipping\n");
  	pr_SNameToId(name, &id);
      } else if (code) {
! 	com_err(whoami, code, "failed creating %s", name);
  	exit(3);
      }
      if ((code = pr_ListEntry(id, &ent))
  	|| (code = pr_SIdToName(ent.creator, creator))) {
! 	com_err(whoami, code, "getting creator's name");
  	exit(5);
      }
      code = pr_DeleteByID(id);
      if (code) {
! 	com_err(whoami, code, "deleting %s", name);
  	exit(6);
      }
      /* now make sure the illegal chars are detected */
--- 800,816 ----
  	fprintf(stderr, "group already exists, skipping\n");
  	pr_SNameToId(name, &id);
      } else if (code) {
! 	afs_com_err(whoami, code, "failed creating %s", name);
  	exit(3);
      }
      if ((code = pr_ListEntry(id, &ent))
  	|| (code = pr_SIdToName(ent.creator, creator))) {
! 	afs_com_err(whoami, code, "getting creator's name");
  	exit(5);
      }
      code = pr_DeleteByID(id);
      if (code) {
! 	afs_com_err(whoami, code, "deleting %s", name);
  	exit(6);
      }
      /* now make sure the illegal chars are detected */
***************
*** 820,826 ****
  	    id = 0;
  	    code = pr_CreateUser(name, &id);
  	    if (code != PRBADNAM) {
! 		com_err(whoami, code, "succeeded creating %s", name);
  		exit(8);
  	    }
  	}
--- 821,827 ----
  	    id = 0;
  	    code = pr_CreateUser(name, &id);
  	    if (code != PRBADNAM) {
! 		afs_com_err(whoami, code, "succeeded creating %s", name);
  		exit(8);
  	    }
  	}
***************
*** 842,853 ****
  	} else if (code) {
  	    char ascii[BUFSIZ];
  	    ka_ConvertBytes(ascii, sizeof(ascii), name, strlen(name));
! 	    com_err(whoami, code, "failed creating %s", ascii);
  	    exit(4);
  	}
  	code = pr_DeleteByID(id);
  	if (code) {
! 	    com_err(whoami, code, "deleting %s", name);
  	    exit(7);
  	}
      }
--- 843,854 ----
  	} else if (code) {
  	    char ascii[BUFSIZ];
  	    ka_ConvertBytes(ascii, sizeof(ascii), name, strlen(name));
! 	    afs_com_err(whoami, code, "failed creating %s", ascii);
  	    exit(4);
  	}
  	code = pr_DeleteByID(id);
  	if (code) {
! 	    afs_com_err(whoami, code, "deleting %s", name);
  	    exit(7);
  	}
      }
***************
*** 859,865 ****
      id = 0;
      code = pr_CreateGroup(name, &id);
      if (code != PRNOENT) {	/* owner doesn't exist */
! 	com_err(whoami, code, "succeeded creating %s", name);
  	exit(9);
      }
      name[0] = creator[0];	/* fix owner */
--- 860,866 ----
      id = 0;
      code = pr_CreateGroup(name, &id);
      if (code != PRNOENT) {	/* owner doesn't exist */
! 	afs_com_err(whoami, code, "succeeded creating %s", name);
  	exit(9);
      }
      name[0] = creator[0];	/* fix owner */
***************
*** 871,877 ****
  	    id = 0;
  	    code = pr_CreateGroup(name, creator, &id);
  	    if (code != PRBADNAM) {
! 		com_err(whoami, code, "succeeded creating %s", name);
  		exit(10);
  	    }
  	}
--- 872,878 ----
  	    id = 0;
  	    code = pr_CreateGroup(name, creator, &id);
  	    if (code != PRBADNAM) {
! 		afs_com_err(whoami, code, "succeeded creating %s", name);
  		exit(10);
  	    }
  	}
***************
*** 892,903 ****
  	} else if (code) {
  	    char ascii[BUFSIZ];
  	    ka_ConvertBytes(ascii, sizeof(ascii), name, strlen(name));
! 	    com_err(whoami, code, "failed creating %s", ascii);
  	    exit(4);
  	}
  	code = pr_DeleteByID(id);
  	if (code) {
! 	    com_err(whoami, code, "deleting %s", name);
  	    exit(7);
  	}
      }
--- 893,904 ----
  	} else if (code) {
  	    char ascii[BUFSIZ];
  	    ka_ConvertBytes(ascii, sizeof(ascii), name, strlen(name));
! 	    afs_com_err(whoami, code, "failed creating %s", ascii);
  	    exit(4);
  	}
  	code = pr_DeleteByID(id);
  	if (code) {
! 	    afs_com_err(whoami, code, "deleting %s", name);
  	    exit(7);
  	}
      }
***************
*** 1003,1009 ****
  		(unsigned long)getpid());
  	code = mkdir(tmp_conf_dir, 0777);
  	if ((code < 0) && (errno != EEXIST)) {
! 	    com_err(whoami, errno, "can't create temporary afsconf dir: %s",
  		    cdir);
  	    return errno;
  	}
--- 1004,1010 ----
  		(unsigned long)getpid());
  	code = mkdir(tmp_conf_dir, 0777);
  	if ((code < 0) && (errno != EEXIST)) {
! 	    afs_com_err(whoami, errno, "can't create temporary afsconf dir: %s",
  		    cdir);
  	    return errno;
  	}
***************
*** 1013,1019 ****
  	f = fopen(tmp_conf_file, "w");
  	if (f == 0) {
  	  cantcreate:
! 	    com_err(whoami, errno, "can't create conf file %s",
  		    tmp_conf_file);
  	    return errno;
  	}
--- 1014,1020 ----
  	f = fopen(tmp_conf_file, "w");
  	if (f == 0) {
  	  cantcreate:
! 	    afs_com_err(whoami, errno, "can't create conf file %s",
  		    tmp_conf_file);
  	    return errno;
  	}
***************
*** 1026,1032 ****
  	}
  	if (fclose(f) == EOF) {
  	  cantclose:
! 	    com_err(whoami, errno, "can't write to conf file %s",
  		    tmp_conf_file);
  	    return errno;
  	}
--- 1027,1033 ----
  	}
  	if (fclose(f) == EOF) {
  	  cantclose:
! 	    afs_com_err(whoami, errno, "can't write to conf file %s",
  		    tmp_conf_file);
  	    return errno;
  	}
***************
*** 1135,1140 ****
  
      code = cmd_Dispatch(argc, argv);
      if (code)
! 	com_err(whoami, code, "calling cmd_Dispatch");
      exit(code);
  }
--- 1136,1141 ----
  
      code = cmd_Dispatch(argc, argv);
      if (code)
! 	afs_com_err(whoami, code, "calling cmd_Dispatch");
      exit(code);
  }
Index: openafs/src/rx/rx.c
diff -c openafs/src/rx/rx.c:1.58.2.36 openafs/src/rx/rx.c:1.58.2.39
*** openafs/src/rx/rx.c:1.58.2.36	Thu Feb 15 12:11:40 2007
--- openafs/src/rx/rx.c	Wed May 16 16:46:47 2007
***************
*** 17,23 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx.c,v 1.58.2.36 2007/02/15 17:11:40 shadow Exp $");
  
  #ifdef KERNEL
  #include "afs/sysincludes.h"
--- 17,23 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx.c,v 1.58.2.39 2007/05/16 20:46:47 shadow Exp $");
  
  #ifdef KERNEL
  #include "afs/sysincludes.h"
***************
*** 1039,1044 ****
--- 1039,1062 ----
      USERPRI;
  }
  
+ /* Wait for the transmit queue to no longer be busy. 
+  * requires the call->lock to be held */
+ static void rxi_WaitforTQBusy(struct rx_call *call) {
+     while (call->flags & RX_CALL_TQ_BUSY) {
+ 	call->flags |= RX_CALL_TQ_WAIT;
+ 	call->tqWaiters++;
+ #ifdef RX_ENABLE_LOCKS
+ 	osirx_AssertMine(&call->lock, "rxi_WaitforTQ lock");
+ 	CV_WAIT(&call->cv_tq, &call->lock);
+ #else /* RX_ENABLE_LOCKS */
+ 	osi_rxSleep(&call->tq);
+ #endif /* RX_ENABLE_LOCKS */
+ 	call->tqWaiters--;
+ 	if (call->tqWaiters == 0) {
+ 	    call->flags &= ~RX_CALL_TQ_WAIT;
+ 	}
+     }
+ }
  /* Start a new rx remote procedure call, on the specified connection.
   * If wait is set to 1, wait for a free call channel; otherwise return
   * 0.  Maxtime gives the maximum number of seconds this call may take,
***************
*** 1164,1183 ****
  #ifdef	AFS_GLOBAL_RXLOCK_KERNEL
      /* Now, if TQ wasn't cleared earlier, do it now. */
      MUTEX_ENTER(&call->lock);
!     while (call->flags & RX_CALL_TQ_BUSY) {
! 	call->flags |= RX_CALL_TQ_WAIT;
! 	call->tqWaiters++;
! #ifdef RX_ENABLE_LOCKS
! 	osirx_AssertMine(&call->lock, "rxi_Start lock4");
! 	CV_WAIT(&call->cv_tq, &call->lock);
! #else /* RX_ENABLE_LOCKS */
! 	osi_rxSleep(&call->tq);
! #endif /* RX_ENABLE_LOCKS */
! 	call->tqWaiters--;
! 	if (call->tqWaiters == 0) {
! 	    call->flags &= ~RX_CALL_TQ_WAIT;
! 	}
!     }
      if (call->flags & RX_CALL_TQ_CLEARME) {
  	rxi_ClearTransmitQueue(call, 0);
  	queue_Init(&call->tq);
--- 1182,1188 ----
  #ifdef	AFS_GLOBAL_RXLOCK_KERNEL
      /* Now, if TQ wasn't cleared earlier, do it now. */
      MUTEX_ENTER(&call->lock);
!     rxi_WaitforTQBusy(call);
      if (call->flags & RX_CALL_TQ_CLEARME) {
  	rxi_ClearTransmitQueue(call, 0);
  	queue_Init(&call->tq);
***************
*** 3346,3354 ****
  
  	    /* We need to send an ack of the packet is out of sequence, 
  	     * or if an ack was requested by the peer. */
! 	    if (seq != prev + 1 || missing || (flags & RX_REQUEST_ACK)) {
  		ackNeeded = RX_ACK_OUT_OF_SEQUENCE;
! 	    }
  
  	    /* Acknowledge the last packet for each call */
  	    if (flags & RX_LAST_PACKET) {
--- 3351,3361 ----
  
  	    /* We need to send an ack of the packet is out of sequence, 
  	     * or if an ack was requested by the peer. */
! 	    if (seq != prev + 1 || missing) {
  		ackNeeded = RX_ACK_OUT_OF_SEQUENCE;
! 	    } else if (flags & RX_REQUEST_ACK) {
! 		ackNeeded = RX_ACK_REQUESTED;
!             }
  
  	    /* Acknowledge the last packet for each call */
  	    if (flags & RX_LAST_PACKET) {
***************
*** 3829,3847 ****
  	    return np;
  	}
  	call->flags |= RX_CALL_FAST_RECOVER_WAIT;
! 	while (call->flags & RX_CALL_TQ_BUSY) {
! 	    call->flags |= RX_CALL_TQ_WAIT;
! 	    call->tqWaiters++;
! #ifdef RX_ENABLE_LOCKS
! 	    osirx_AssertMine(&call->lock, "rxi_Start lock2");
! 	    CV_WAIT(&call->cv_tq, &call->lock);
! #else /* RX_ENABLE_LOCKS */
! 	    osi_rxSleep(&call->tq);
! #endif /* RX_ENABLE_LOCKS */
! 	    call->tqWaiters--;
! 	    if (call->tqWaiters == 0)
! 		call->flags &= ~RX_CALL_TQ_WAIT;
! 	}
  	MUTEX_ENTER(&peer->peer_lock);
  #endif /* AFS_GLOBAL_RXLOCK_KERNEL */
  	call->flags &= ~RX_CALL_FAST_RECOVER_WAIT;
--- 3836,3842 ----
  	    return np;
  	}
  	call->flags |= RX_CALL_FAST_RECOVER_WAIT;
! 	rxi_WaitforTQBusy(call);
  	MUTEX_ENTER(&peer->peer_lock);
  #endif /* AFS_GLOBAL_RXLOCK_KERNEL */
  	call->flags &= ~RX_CALL_FAST_RECOVER_WAIT;
***************
*** 5020,5038 ****
  	    return;
  	}
  	call->flags |= RX_CALL_FAST_RECOVER_WAIT;
! 	while (call->flags & RX_CALL_TQ_BUSY) {
! 	    call->flags |= RX_CALL_TQ_WAIT;
! 	    call->tqWaiters++;
! #ifdef RX_ENABLE_LOCKS
! 	    osirx_AssertMine(&call->lock, "rxi_Start lock1");
! 	    CV_WAIT(&call->cv_tq, &call->lock);
! #else /* RX_ENABLE_LOCKS */
! 	    osi_rxSleep(&call->tq);
! #endif /* RX_ENABLE_LOCKS */
! 	    call->tqWaiters--;
! 	    if (call->tqWaiters == 0)
! 		call->flags &= ~RX_CALL_TQ_WAIT;
! 	}
  #endif /* AFS_GLOBAL_RXLOCK_KERNEL */
  	call->flags &= ~RX_CALL_FAST_RECOVER_WAIT;
  	call->flags |= RX_CALL_FAST_RECOVER;
--- 5015,5021 ----
  	    return;
  	}
  	call->flags |= RX_CALL_FAST_RECOVER_WAIT;
! 	rxi_WaitforTQBusy(call);
  #endif /* AFS_GLOBAL_RXLOCK_KERNEL */
  	call->flags &= ~RX_CALL_FAST_RECOVER_WAIT;
  	call->flags |= RX_CALL_FAST_RECOVER;
***************
*** 5547,5552 ****
--- 5530,5536 ----
  			    (char *)&error, sizeof(error), 0);
  	rxi_FreePacket(packet);
      }
+     CALL_RELE(call, RX_CALL_REFCOUNT_ABORT);
      MUTEX_EXIT(&call->lock);
  }
  
Index: openafs/src/rx/rx.h
diff -c openafs/src/rx/rx.h:1.22.2.5 openafs/src/rx/rx.h:1.22.2.6
*** openafs/src/rx/rx.h:1.22.2.5	Mon Jun 12 17:53:43 2006
--- openafs/src/rx/rx.h	Wed May 16 16:53:05 2007
***************
*** 635,641 ****
  #define	RX_ACK_PING_RESPONSE	7	/* Ack'ing because we were pinged */
  #define	RX_ACK_DELAY		8	/* Ack generated since nothing has happened since receiving packet */
  #define RX_ACK_IDLE             9	/* Similar to RX_ACK_DELAY, but can 
! 					 * be */
  
  /* Packet acknowledgement type */
  #define	RX_ACK_TYPE_NACK	0	/* I Don't have this packet */
--- 635,641 ----
  #define	RX_ACK_PING_RESPONSE	7	/* Ack'ing because we were pinged */
  #define	RX_ACK_DELAY		8	/* Ack generated since nothing has happened since receiving packet */
  #define RX_ACK_IDLE             9	/* Similar to RX_ACK_DELAY, but can 
! 					 * be used to compute RTT */
  
  /* Packet acknowledgement type */
  #define	RX_ACK_TYPE_NACK	0	/* I Don't have this packet */
Index: openafs/src/rx/rx_kcommon.h
diff -c openafs/src/rx/rx_kcommon.h:1.27.2.7 openafs/src/rx/rx_kcommon.h:1.27.2.8
*** openafs/src/rx/rx_kcommon.h:1.27.2.7	Thu Jan  4 16:26:35 2007
--- openafs/src/rx/rx_kcommon.h	Fri Oct  5 18:23:50 2007
***************
*** 158,163 ****
--- 158,167 ----
  extern struct domain inetdomain;
  #endif /* AFS_XBSD_ENV */
  
+ #if defined(AFS_SUN510_ENV)
+ extern struct afs_ifinfo afsifinfo[ADDRSPERSITE];
+ #endif
+ 
  #endif /* _RX_KCOMMON_H_ */
  
  #endif
Index: openafs/src/rx/rx_lwp.c
diff -c openafs/src/rx/rx_lwp.c:1.17.2.1 openafs/src/rx/rx_lwp.c:1.17.2.2
*** openafs/src/rx/rx_lwp.c:1.17.2.1	Tue Dec  7 01:10:06 2004
--- openafs/src/rx/rx_lwp.c	Thu Jun 14 15:05:03 2007
***************
*** 22,28 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_lwp.c,v 1.17.2.1 2004/12/07 06:10:06 shadow Exp $");
  
  # include <sys/types.h>		/* fd_set on older platforms */
  # include <errno.h>
--- 22,28 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_lwp.c,v 1.17.2.2 2007/06/14 19:05:03 jaltman Exp $");
  
  # include <sys/types.h>		/* fd_set on older platforms */
  # include <errno.h>
***************
*** 445,456 ****
  	    if (!(sfds = IOMGR_AllocFDSet())) {
  		(osi_Msg "rx failed to alloc fd_set: ");
  		perror("rx_sendmsg");
! 		return 3;
  	    }
  	    FD_SET(socket, sfds);
  	}
  #ifdef AFS_NT40_ENV
! 	if (errno)
  #elif defined(AFS_LINUX22_ENV)
  	/* linux unfortunately returns ECONNREFUSED if the target port
  	 * is no longer in use */
--- 445,456 ----
  	    if (!(sfds = IOMGR_AllocFDSet())) {
  		(osi_Msg "rx failed to alloc fd_set: ");
  		perror("rx_sendmsg");
! 		return -1;
  	    }
  	    FD_SET(socket, sfds);
  	}
  #ifdef AFS_NT40_ENV
! 	if (WSAGetLastError())
  #elif defined(AFS_LINUX22_ENV)
  	/* linux unfortunately returns ECONNREFUSED if the target port
  	 * is no longer in use */
***************
*** 463,469 ****
  	{
  	    (osi_Msg "rx failed to send packet: ");
  	    perror("rx_sendmsg");
! 	    return 3;
  	}
  	while ((err = select(socket + 1, 0, sfds, 0, 0)) != 1) {
  	    if (err >= 0 || errno != EINTR)
--- 463,469 ----
  	{
  	    (osi_Msg "rx failed to send packet: ");
  	    perror("rx_sendmsg");
! 	    return -1;
  	}
  	while ((err = select(socket + 1, 0, sfds, 0, 0)) != 1) {
  	    if (err >= 0 || errno != EINTR)
Index: openafs/src/rx/rx_packet.c
diff -c openafs/src/rx/rx_packet.c:1.35.2.30 openafs/src/rx/rx_packet.c:1.35.2.33
*** openafs/src/rx/rx_packet.c:1.35.2.30	Thu Jan 11 22:51:23 2007
--- openafs/src/rx/rx_packet.c	Sat Jun 23 02:27:22 2007
***************
*** 15,21 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_packet.c,v 1.35.2.30 2007/01/12 03:51:23 shadow Exp $");
  
  #ifdef KERNEL
  #if defined(UKERNEL)
--- 15,21 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_packet.c,v 1.35.2.33 2007/06/23 06:27:22 shadow Exp $");
  
  #ifdef KERNEL
  #if defined(UKERNEL)
***************
*** 2209,2233 ****
  	    p->retryTime = p->timeSent;	/* resend it very soon */
  	    clock_Addmsec(&(p->retryTime),
  			  10 + (((afs_uint32) p->backoff) << 8));
! 
! #ifdef AFS_NT40_ENV
! 	    /* Windows is nice -- it can tell us right away that we cannot
! 	     * reach this recipient by returning an WSAEHOSTUNREACH error
! 	     * code.  So, when this happens let's "down" the host NOW so
  	     * we don't sit around waiting for this host to timeout later.
  	     */
! 		if (call && code == -1 && errno == WSAEHOSTUNREACH)
! 			call->lastReceiveTime = 0;
  #endif
! #if defined(KERNEL) && defined(AFS_LINUX20_ENV)
! 	    /* Linux is nice -- it can tell us right away that we cannot
! 	     * reach this recipient by returning an ENETUNREACH error
! 	     * code.  So, when this happens let's "down" the host NOW so
! 	     * we don't sit around waiting for this host to timeout later.
! 	     */
! 	    if (call && code == -ENETUNREACH)
  		call->lastReceiveTime = 0;
- #endif
  	}
  #ifdef KERNEL
  #ifdef RX_KERNEL_TRACE
--- 2209,2231 ----
  	    p->retryTime = p->timeSent;	/* resend it very soon */
  	    clock_Addmsec(&(p->retryTime),
  			  10 + (((afs_uint32) p->backoff) << 8));
! 	    /* Some systems are nice and tell us right away that we cannot
! 	     * reach this recipient by returning an error code. 
! 	     * So, when this happens let's "down" the host NOW so
  	     * we don't sit around waiting for this host to timeout later.
  	     */
! 	    if (call && 
! #ifdef AFS_NT40_ENV
! 		code == -1 && WSAGetLastError() == WSAEHOSTUNREACH
! #elif defined(AFS_LINUX20_ENV) && defined(KERNEL)
! 		code == -ENETUNREACH
! #elif defined(AFS_DARWIN_ENV) && defined(KERNEL)
! 		code == EHOSTUNREACH
! #else
! 		0
  #endif
! 		)
  		call->lastReceiveTime = 0;
  	}
  #ifdef KERNEL
  #ifdef RX_KERNEL_TRACE
***************
*** 2403,2426 ****
  		clock_Addmsec(&(p->retryTime),
  			      10 + (((afs_uint32) p->backoff) << 8));
  	    }
! #ifdef AFS_NT40_ENV
! 	    /* Windows is nice -- it can tell us right away that we cannot
! 	     * reach this recipient by returning an WSAEHOSTUNREACH error
! 	     * code.  So, when this happens let's "down" the host NOW so
  	     * we don't sit around waiting for this host to timeout later.
  	     */
! 	    if (call && code == -1 && errno == WSAEHOSTUNREACH)
! 		call->lastReceiveTime = 0;
  #endif
! #if defined(KERNEL) && defined(AFS_LINUX20_ENV)
! 	    /* Linux is nice -- it can tell us right away that we cannot
! 	     * reach this recipient by returning an ENETUNREACH error
! 	     * code.  So, when this happens let's "down" the host NOW so
! 	     * we don't sit around waiting for this host to timeout later.
! 	     */
! 	    if (call && code == -ENETUNREACH)
  		call->lastReceiveTime = 0;
- #endif
  	}
  #if	defined(AFS_SUN5_ENV) && defined(KERNEL)
  	if (!istack && waslocked)
--- 2401,2423 ----
  		clock_Addmsec(&(p->retryTime),
  			      10 + (((afs_uint32) p->backoff) << 8));
  	    }
! 	    /* Some systems are nice and tell us right away that we cannot
! 	     * reach this recipient by returning an error code. 
! 	     * So, when this happens let's "down" the host NOW so
  	     * we don't sit around waiting for this host to timeout later.
  	     */
! 	    if (call && 
! #ifdef AFS_NT40_ENV
! 		code == -1 && WSAGetLastError() == WSAEHOSTUNREACH
! #elif defined(AFS_LINUX20_ENV) && defined(KERNEL)
! 		code == -ENETUNREACH
! #elif defined(AFS_DARWIN_ENV) && defined(KERNEL)
! 		code == EHOSTUNREACH
! #else
! 		0
  #endif
! 		)
  		call->lastReceiveTime = 0;
  	}
  #if	defined(AFS_SUN5_ENV) && defined(KERNEL)
  	if (!istack && waslocked)
Index: openafs/src/rx/rx_prototypes.h
diff -c openafs/src/rx/rx_prototypes.h:1.14.2.17 openafs/src/rx/rx_prototypes.h:1.14.2.19
*** openafs/src/rx/rx_prototypes.h:1.14.2.17	Thu Jan 11 22:51:23 2007
--- openafs/src/rx/rx_prototypes.h	Fri Oct  5 18:23:50 2007
***************
*** 377,383 ****
  #endif
  extern void osi_StopListener(void);
  
- 
  /* ARCH/rx_kmutex.c */
  #if defined(KERNEL) && defined(AFS_LINUX20_ENV)
  extern void afs_mutex_init(afs_kmutex_t * l);
--- 377,382 ----
***************
*** 399,404 ****
--- 398,408 ----
  #endif
  extern int osi_NetReceive(osi_socket so, struct sockaddr_in *addr,
  			  struct iovec *dvec, int nvecs, int *lengthp);
+ #if defined(KERNEL) && defined(AFS_SUN510_ENV)
+ extern void osi_StartNetIfPoller(void);
+ extern void osi_NetIfPoller(void);
+ extern struct afs_ifinfo afsifinfo[ADDRSPERSITE];
+ #endif
  extern void osi_StopListener(void);
  extern int rxi_FindIfMTU(afs_uint32 addr);
  #ifndef RXK_LISTENER_ENV
Index: openafs/src/rx/LINUX/rx_kmutex.c
diff -c openafs/src/rx/LINUX/rx_kmutex.c:1.7.2.7 openafs/src/rx/LINUX/rx_kmutex.c:1.7.2.8
*** openafs/src/rx/LINUX/rx_kmutex.c:1.7.2.7	Thu Dec 28 16:32:09 2006
--- openafs/src/rx/LINUX/rx_kmutex.c	Tue Jun 12 01:47:48 2007
***************
*** 17,23 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/LINUX/rx_kmutex.c,v 1.7.2.7 2006/12/28 21:32:09 shadow Exp $");
  
  #include "rx/rx_kcommon.h"
  #include "rx_kmutex.h"
--- 17,23 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/LINUX/rx_kmutex.c,v 1.7.2.8 2007/06/12 05:47:48 rra Exp $");
  
  #include "rx/rx_kcommon.h"
  #include "rx_kmutex.h"
***************
*** 122,128 ****
--- 122,132 ----
  #if defined(STRUCT_TASK_STRUCT_HAS_TODO)
  	    !current->todo
  #else
+ #if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
  	    test_ti_thread_flag(current->thread_info, TIF_FREEZE)
+ #else
+ 	    test_ti_thread_flag(task_thread_info(current), TIF_FREEZE)
+ #endif
  #endif
  #endif
  	    )
Index: openafs/src/rx/LINUX/rx_knet.c
diff -c openafs/src/rx/LINUX/rx_knet.c:1.23.2.12 openafs/src/rx/LINUX/rx_knet.c:1.23.2.14
*** openafs/src/rx/LINUX/rx_knet.c:1.23.2.12	Mon Feb 26 12:59:21 2007
--- openafs/src/rx/LINUX/rx_knet.c	Tue Jun 12 01:47:48 2007
***************
*** 16,22 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/LINUX/rx_knet.c,v 1.23.2.12 2007/02/26 17:59:21 shadow Exp $");
  
  #include <linux/version.h>
  #ifdef AFS_LINUX22_ENV
--- 16,22 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/LINUX/rx_knet.c,v 1.23.2.14 2007/06/12 05:47:48 rra Exp $");
  
  #include <linux/version.h>
  #ifdef AFS_LINUX22_ENV
***************
*** 173,179 ****
--- 173,183 ----
  #if defined(STRUCT_TASK_STRUCT_HAS_TODO)
  	    !current->todo
  #else
+ #if defined(STRUCT_TASK_STRUCT_HAS_THREAD_INFO)
              test_ti_thread_flag(current->thread_info, TIF_FREEZE)
+ #else
+             test_ti_thread_flag(task_thread_info(current), TIF_FREEZE)
+ #endif
  #endif
  #endif
  	    )
***************
*** 213,242 ****
      struct task_struct *listener;
      extern int rxk_ListenerPid;
  
  #ifdef EXPORTED_TASKLIST_LOCK
!     if (&tasklist_lock)
!       read_lock(&tasklist_lock);
  #endif
  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
  #ifdef EXPORTED_TASKLIST_LOCK
!     else
  #endif
!       rcu_read_lock();
  #endif
!     listener = find_task_by_pid(rxk_ListenerPid);
  #ifdef EXPORTED_TASKLIST_LOCK
!     if (&tasklist_lock)
!        read_unlock(&tasklist_lock);
  #endif
  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
  #ifdef EXPORTED_TASKLIST_LOCK
!     else
  #endif
!       rcu_read_unlock();
  #endif
!     while (rxk_ListenerPid) {
! 	flush_signals(listener);
! 	force_sig(SIGKILL, listener);
  	afs_osi_Sleep(&rxk_ListenerPid);
      }
      sock_release(rx_socket);
--- 217,250 ----
      struct task_struct *listener;
      extern int rxk_ListenerPid;
  
+     while (rxk_ListenerPid) {
  #ifdef EXPORTED_TASKLIST_LOCK
! 	if (&tasklist_lock)
! 	   read_lock(&tasklist_lock);
  #endif
  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
  #ifdef EXPORTED_TASKLIST_LOCK
! 	else
  #endif
! 	   rcu_read_lock();
  #endif
! 	listener = find_task_by_pid(rxk_ListenerPid);
!         if (listener) {
! 	    flush_signals(listener);
! 	    force_sig(SIGKILL, listener);
! 	}
  #ifdef EXPORTED_TASKLIST_LOCK
! 	if (&tasklist_lock)
! 	    read_unlock(&tasklist_lock);
  #endif
  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
  #ifdef EXPORTED_TASKLIST_LOCK
! 	else
  #endif
! 	   rcu_read_unlock();
  #endif
! 	if (!listener)
! 	    break;
  	afs_osi_Sleep(&rxk_ListenerPid);
      }
      sock_release(rx_socket);
Index: openafs/src/rx/SOLARIS/rx_knet.c
diff -c openafs/src/rx/SOLARIS/rx_knet.c:1.19.2.1 openafs/src/rx/SOLARIS/rx_knet.c:1.19.2.2
*** openafs/src/rx/SOLARIS/rx_knet.c:1.19.2.1	Fri Apr 15 14:37:19 2005
--- openafs/src/rx/SOLARIS/rx_knet.c	Thu Oct  4 22:54:10 2007
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/SOLARIS/rx_knet.c,v 1.19.2.1 2005/04/15 18:37:19 shadow Exp $");
  
  #ifdef AFS_SUN5_ENV
  #include "rx/rx_kcommon.h"
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/SOLARIS/rx_knet.c,v 1.19.2.2 2007/10/05 02:54:10 shadow Exp $");
  
  #ifdef AFS_SUN5_ENV
  #include "rx/rx_kcommon.h"
***************
*** 36,41 ****
--- 36,51 ----
  #include "inet/ip.h"
  #include "inet/ip_if.h"
  #include "netinet/udp.h"
+ #ifdef AFS_SUN510_ENV
+ #include "h/ddi.h"
+ #include "h/ksynch.h"
+ #include "h/sunddi.h"
+ #include "h/sunldi.h"
+ #include "h/sockio.h"
+ #include "h/cmn_err.h"
+ #include "h/socket.h"
+ #include "netinet/in.h"
+ #endif
  
  /*
   * Function pointers for kernel socket routines
***************
*** 68,81 ****
  {
      int i = 0;
      int different = 0;
! 
      ill_t *ill;
      ipif_t *ipif;
-     int rxmtu, maxmtu;
- #ifdef AFS_SUN510_ENV
-     ill_walk_context_t ctx;
  #endif
! 
      int mtus[ADDRSPERSITE];
      afs_uint32 addrs[ADDRSPERSITE];
      afs_uint32 ifinaddr;
--- 78,88 ----
  {
      int i = 0;
      int different = 0;
! #ifndef AFS_SUN510_ENV
      ill_t *ill;
      ipif_t *ipif;
  #endif
!     int rxmtu, maxmtu;
      int mtus[ADDRSPERSITE];
      afs_uint32 addrs[ADDRSPERSITE];
      afs_uint32 ifinaddr;
***************
*** 84,93 ****
      memset(addrs, 0, sizeof(addrs));
  
  #ifdef AFS_SUN510_ENV
!     for (ill = ILL_START_WALK_ALL(&ctx) ; ill ; ill = ill_next(&ctx, ill)) {
  #else
      for (ill = ill_g_head; ill; ill = ill->ill_next) {
- #endif
  #ifdef AFS_SUN58_ENV
  	/* Make sure this is an IPv4 ILL */
  	if (ill->ill_isv6)
--- 91,148 ----
      memset(addrs, 0, sizeof(addrs));
  
  #ifdef AFS_SUN510_ENV
!     (void) rw_enter(&afsifinfo_lock, RW_READER);
! 
!     for (i = 0; (afsifinfo[i].ipaddr != NULL) && (i < ADDRSPERSITE); i++) {
! 
!              /* Ignore addresses which are down.. */
!             if (!(afsifinfo[i].flags & IFF_UP))
!                 continue;
! 
!             /* Compute the Rx interface MTU */
! 	    rxmtu = (afsifinfo[i].mtu - RX_IPUDP_SIZE);
! 
! 	    ifinaddr = afsifinfo[i].ipaddr;
! 	    if (myNetAddrs[i] != ifinaddr)
! 		different++;
! 
! 	    /* Copy interface MTU and address; adjust maxmtu */
! 	    mtus[i] = rxmtu;
! 	    rxmtu = rxi_AdjustIfMTU(rxmtu);
! 	    maxmtu = rxmtu * rxi_nRecvFrags +
! 	        ((rxi_nRecvFrags - 1) * UDP_HDR_SIZE);
! 	    maxmtu = rxi_AdjustMaxMTU(rxmtu, maxmtu);
! 	    addrs[i] = ifinaddr;
! 
! 	    if (ifinaddr != 0x7f000001 && maxmtu > rx_maxReceiveSize) {
! 		rx_maxReceiveSize = MIN(RX_MAX_PACKET_SIZE, maxmtu);
! 		rx_maxReceiveSize =
! 		    MIN(rx_maxReceiveSize, rx_maxReceiveSizeUser);
! 	    }
!             
!     }
!     
!     (void) rw_exit(&afsifinfo_lock);
! 
!     rx_maxJumboRecvSize =
! 	RX_HEADER_SIZE + rxi_nDgramPackets * RX_JUMBOBUFFERSIZE +
! 	(rxi_nDgramPackets - 1) * RX_JUMBOHEADERSIZE;
!     rx_maxJumboRecvSize = MAX(rx_maxJumboRecvSize, rx_maxReceiveSize);
! 
!     if (different) {
! 	int j;
! 
! 	for (j = 0; j < i; j++) {
! 	    myNetMTUs[j] = mtus[j];
! 	    myNetAddrs[j] = addrs[j];
! 	}
!     }
! 
!     return different;
! }
! 
  #else
      for (ill = ill_g_head; ill; ill = ill->ill_next) {
  #ifdef AFS_SUN58_ENV
  	/* Make sure this is an IPv4 ILL */
  	if (ill->ill_isv6)
***************
*** 144,160 ****
  
      return different;
  }
  
  int
  rxi_FindIfMTU(afs_uint32 addr)
  {
-     ill_t *ill;
-     ipif_t *ipif;
      afs_uint32 myAddr, netMask;
      int match_value = 0;
      int mtu = -1;
  #ifdef AFS_SUN510_ENV
!     ill_walk_context_t ctx;
  #endif
  
      if (numMyNetAddrs == 0)
--- 199,217 ----
  
      return different;
  }
+ #endif
  
  int
  rxi_FindIfMTU(afs_uint32 addr)
  {
      afs_uint32 myAddr, netMask;
      int match_value = 0;
      int mtu = -1;
  #ifdef AFS_SUN510_ENV
!     int i = 0;
! #else
!     ill_t *ill;
!     ipif_t *ipif;
  #endif
  
      if (numMyNetAddrs == 0)
***************
*** 171,180 ****
  	netMask = 0;
  
  #ifdef AFS_SUN510_ENV
!     for (ill = ILL_START_WALK_ALL(&ctx) ; ill ; ill = ill_next(&ctx, ill)) {
  #else
      for (ill = ill_g_head; ill; ill = ill->ill_next) {
- #endif
  #ifdef AFS_SUN58_ENV
  	/* Make sure this is an IPv4 ILL */
  	if (ill->ill_isv6)
--- 228,273 ----
  	netMask = 0;
  
  #ifdef AFS_SUN510_ENV
!     (void) rw_enter(&afsifinfo_lock, RW_READER);
! 
!     for (i = 0; (afsifinfo[i].ipaddr != NULL) && (i < ADDRSPERSITE); i++) {
!         afs_uint32 thisAddr, subnetMask;
!     	int thisMtu;
! 
!         /* Ignore addresses which are down.. */
!         if ((afsifinfo[i].flags & IFF_UP) == 0)
!             continue;
! 
!         thisAddr = afsifinfo[i].ipaddr;
!         subnetMask = afsifinfo[i].netmask;
!         thisMtu = afsifinfo[i].mtu;
! 
!         if ((myAddr & netMask) == (thisAddr & netMask)) {
! 	   if ((myAddr & subnetMask) == (thisAddr & subnetMask)) {
! 	        if (myAddr == thisAddr) {
!                     match_value = 4;
!                     mtu = thisMtu;
!                 }
! 
!                 if (match_value < 3) {
!                     match_value = 3;
!                     mtu = thisMtu;
!                 }
!            }
! 
!            if (match_value < 2) {
!                 match_value = 2;
!                 mtu = thisMtu;
!            }
!         }
!      }
!      
!      (void) rw_exit(&afsifinfo_lock);
! 
!      return mtu;
! }
  #else
      for (ill = ill_g_head; ill; ill = ill->ill_next) {
  #ifdef AFS_SUN58_ENV
  	/* Make sure this is an IPv4 ILL */
  	if (ill->ill_isv6)
***************
*** 213,218 ****
--- 306,312 ----
  
      return mtu;
  }
+ #endif
  
  /* rxi_NewSocket, rxi_FreeSocket and osi_NetSend are from the now defunct
   * afs_osinet.c. 
***************
*** 462,467 ****
--- 556,729 ----
      return error;
  }
  
+ #if defined(AFS_SUN510_ENV)
+ /* How often afs collects interface info. Tunable via /etc/system:      */
+ /* set afs:afs_if_poll_interval = integer (value is in seconds)         */
+ static int afs_if_poll_interval = 30;
+ 
+ /* Global array which holds the interface info for consumers            */
+ struct afs_ifinfo afsifinfo[ADDRSPERSITE];
+ 
+ void
+ osi_StartNetIfPoller()
+ {
+     (void) ddi_taskq_dispatch(afs_taskq, (void(*) (void*)) osi_NetIfPoller,
+             NULL, DDI_SLEEP);
+ }
+ 
+ void
+ osi_NetIfPoller()
+ {
+     cred_t *cr;
+     ldi_ident_t li;
+     ldi_handle_t lh;
+     struct lifnum lifn;
+     struct lifconf lifc;
+     struct lifreq lifr;
+     struct lifreq *lifrp;
+     struct sockaddr_in *sin4_local;
+     struct sockaddr_in *sin4_dst;
+     major_t udpmajor;
+     caddr_t lifcbuf;
+     int i, count, error, rv;
+     int ifcount;
+     int metric;
+     int index;
+     uint_t mtu;
+     uint64_t flags;
+ 
+     /* Get our permissions */
+     cr = CRED();
+ 
+     /* Initialize and open /dev/udp for receiving ioctls */
+     udpmajor = ddi_name_to_major(UDP_MOD_NAME);
+ 
+     error = ldi_ident_from_major(udpmajor, &li);
+     if (error)
+         cmn_err(CE_PANIC, "osi_NetIfPoller: ldi_ident_from_major failed: %d",
+             error);
+ 
+     error = ldi_open_by_name(UDP_DEV_NAME, FREAD, cr, &lh, li);
+     if (error)
+         cmn_err(CE_PANIC,
+             "osi_NetIfPoller: ldi_open_by_name failed: %d", error);
+ 
+ 
+     /* First, how many interfaces do we have? */
+     (void) bzero((void *)&lifn, sizeof(struct lifnum));
+     lifn.lifn_family   = AF_INET;
+ 
+     error = ldi_ioctl(lh, SIOCGLIFNUM, (intptr_t)&lifn,
+         FKIOCTL, cr, &rv);
+     if (error)
+      cmn_err(CE_PANIC,
+          "osi_NetIfPoller: ldi_ioctl: SIOCGLIFNUM failed: %d", error);
+ 
+     ifcount = lifn.lifn_count;
+ 
+     /* Set up some stuff for storing the results of SIOCGLIFCONF */
+     (void) bzero((void *)&lifc, sizeof(struct lifconf));
+ 
+     lifcbuf = kmem_zalloc(ifcount * sizeof(struct lifreq), KM_SLEEP);
+ 
+     lifc.lifc_family  = AF_INET;
+     lifc.lifc_flags   = IFF_UP;
+     lifc.lifc_len     = ifcount * sizeof(struct lifreq);
+     lifc.lifc_buf     = lifcbuf;
+ 
+     /* Get info on each of our available interfaces. */
+     error = ldi_ioctl(lh, SIOCGLIFCONF, (intptr_t)&lifc,
+         FKIOCTL, cr, &rv);
+     if (error)
+         cmn_err(CE_PANIC,
+             "osi_NetIfPoller: ldi_ioctl: SIOCGLIFCONF failed: %d", error);
+ 
+     lifrp = lifc.lifc_req;
+ 
+     count = 0;
+ 
+     /* Loop through our interfaces and pick out the info we want */
+     for (i = lifc.lifc_len / sizeof(struct lifreq);
+         i > 0; i--, lifrp++) {
+                 
+         if (count >= ADDRSPERSITE)
+                 break;
+ 
+         (void) bzero((void *)&lifr, sizeof(struct lifreq));
+ 
+         (void) strncpy(lifr.lifr_name, lifrp->lifr_name,
+             sizeof(lifr.lifr_name));
+ 
+         /* Get this interface's Flags */
+         error = ldi_ioctl(lh, SIOCGLIFFLAGS, (intptr_t)&lifr,
+             FKIOCTL, cr, &rv);
+         if (error)
+             cmn_err(CE_PANIC,
+                 "osi_NetIfPoller: ldi_ioctl: SIOCGLIFFLAGS failed: %d",
+                     error);
+ 
+         /* Ignore plumbed but down interfaces. */
+         if ((lifr.lifr_flags & IFF_UP) == 0)
+             continue;
+ 
+         flags = lifr.lifr_flags;
+ 
+         /* Get this interface's MTU */
+         error = ldi_ioctl(lh, SIOCGLIFMTU, (intptr_t)&lifr,
+             FKIOCTL, cr, &rv);
+ 
+         if (error) {
+             mtu = 1125;
+         } else {
+             mtu = lifr.lifr_metric;
+         }
+ 
+         /* Get this interface's Metric */
+         error = ldi_ioctl(lh, SIOCGLIFMETRIC, (intptr_t)&lifr,
+             FKIOCTL, cr, &rv);
+ 
+         if (error) {
+             metric = 0;
+         } else {
+             metric = lifr.lifr_metric;
+         }
+ 
+         sin4_local = (struct sockaddr_in *) &lifrp->lifr_addr;
+         sin4_dst = (struct sockaddr_in *) &lifrp->lifr_dstaddr;
+ 
+         /* Acquire global array write lock */
+         (void) rw_enter(&afsifinfo_lock, RW_WRITER);
+ 
+         /* Copy our collected data into the global array */
+         (void) strncpy(afsifinfo[count].ifname, lifrp->lifr_name,
+             sizeof(afsifinfo[count].ifname));
+         afsifinfo[count].ipaddr     = ntohl(sin4_local->sin_addr.s_addr);
+         afsifinfo[count].mtu        = mtu;
+         afsifinfo[count].netmask    = lifrp->lifr_addrlen;
+         afsifinfo[count].flags      = flags;
+         afsifinfo[count].metric     = metric;
+         afsifinfo[count].dstaddr    = ntohl(sin4_dst->sin_addr.s_addr);
+ 
+         /* Release global array write lock */
+         (void) rw_exit(&afsifinfo_lock);
+ 
+         count++;
+ 
+     } /* Bottom of loop: for each interface ... */
+ 
+     kmem_free(lifcbuf, ifcount * sizeof(struct lifreq));
+ 
+     /* End of thread. Time to clean up */
+     (void) ldi_close(lh, FREAD, cr);
+     (void) ldi_ident_release(li);
+ 
+     /* Schedule this to run again after afs_if_poll_interval seconds */
+     (void) timeout((void(*) (void *)) osi_StartNetIfPoller, NULL,
+         drv_usectohz((clock_t)afs_if_poll_interval * MICROSEC));
+ 
+ }
+ #endif /* AFS_SUN510_ENV */
+ 
  void
  shutdown_rxkernel(void)
  {
Index: openafs/src/rxkad/bg-fcrypt.c
diff -c openafs/src/rxkad/bg-fcrypt.c:1.5.2.3 openafs/src/rxkad/bg-fcrypt.c:1.5.2.5
*** openafs/src/rxkad/bg-fcrypt.c:1.5.2.3	Wed Aug  2 15:07:04 2006
--- openafs/src/rxkad/bg-fcrypt.c	Tue Jul 31 18:22:21 2007
***************
*** 38,44 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/bg-fcrypt.c,v 1.5.2.3 2006/08/02 19:07:04 shadow Exp $");
  
  #define DEBUG 0
  #ifdef KERNEL
--- 38,44 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/bg-fcrypt.c,v 1.5.2.5 2007/07/31 22:22:21 shadow Exp $");
  
  #define DEBUG 0
  #ifdef KERNEL
***************
*** 550,557 ****
      const unsigned char *key = key_;
  
      /* Do we have 56 bit longs or even longer longs? */
! #if ((1ul << 31) << 1) && defined(ULONG_MAX) && ((ULONG_MAX >> 55) != 0) && ((1ul << 55) != 0)
!     unsigned long k;		/* k holds all 56 non parity bits */
  
      /* Compress out parity bits */
      k = (*key++) >> 1;
--- 550,557 ----
      const unsigned char *key = key_;
  
      /* Do we have 56 bit longs or even longer longs? */
! #ifdef AFS_64BIT_ENV
!     afs_uint64 k;		/* k holds all 56 non parity bits */
  
      /* Compress out parity bits */
      k = (*key++) >> 1;
Index: openafs/src/rxkad/rxkad_server.c
diff -c openafs/src/rxkad/rxkad_server.c:1.14.2.8 openafs/src/rxkad/rxkad_server.c:1.14.2.9
*** openafs/src/rxkad/rxkad_server.c:1.14.2.8	Sat Nov  4 18:50:38 2006
--- openafs/src/rxkad/rxkad_server.c	Sun Jun 10 10:22:49 2007
***************
*** 15,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/rxkad_server.c,v 1.14.2.8 2006/11/04 23:50:38 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 15,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/rxkad_server.c,v 1.14.2.9 2007/06/10 14:22:49 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 361,368 ****
  	return RXKADEXPIRED;
      else if (code < -1)
  	return RXKADBADTICKET;
-     else if (code <= 0)
- 	return RXKADBADTICKET;
  
      code = fc_keysched(&sessionkey, sconn->keysched);
      if (code)
--- 361,366 ----
Index: openafs/src/rxkad/test/stress.c
diff -c openafs/src/rxkad/test/stress.c:1.9 openafs/src/rxkad/test/stress.c:1.9.2.1
*** openafs/src/rxkad/test/stress.c:1.9	Tue Jul 15 19:16:47 2003
--- openafs/src/rxkad/test/stress.c	Tue Apr 10 14:43:45 2007
***************
*** 13,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/test/stress.c,v 1.9 2003/07/15 23:16:47 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 13,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/test/stress.c,v 1.9.2.1 2007/04/10 18:43:45 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 154,160 ****
  	/* These options not compatible with -server */
  	if (cParms->stopServer) {
  	    code = RXKST_BADARGS;
! 	    com_err(whoami, code, "stop server not compatible with -client");
  	    return code;
  	}
  
--- 154,160 ----
  	/* These options not compatible with -server */
  	if (cParms->stopServer) {
  	    code = RXKST_BADARGS;
! 	    afs_com_err(whoami, code, "stop server not compatible with -client");
  	    return code;
  	}
  
***************
*** 176,182 ****
  
  	    code = pthread_attr_init(&tattr);
  	    if (code) {
! 		com_err(whoami, code,
  			"can't pthread_attr_init server process");
  		return code;
  	    }
--- 176,182 ----
  
  	    code = pthread_attr_init(&tattr);
  	    if (code) {
! 		afs_com_err(whoami, code,
  			"can't pthread_attr_init server process");
  		return code;
  	    }
***************
*** 184,190 ****
  	    code =
  		pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED);
  	    if (code) {
! 		com_err(whoami, code,
  			"can't pthread_attr_setdetachstate server process");
  		return code;
  	    }
--- 184,190 ----
  	    code =
  		pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED);
  	    if (code) {
! 		afs_com_err(whoami, code,
  			"can't pthread_attr_setdetachstate server process");
  		return code;
  	    }
***************
*** 199,205 ****
  			      (opaque) sParms, "Server Process", &pid);
  #endif
  	if (code) {
! 	    com_err(whoami, code, "can't create server process");
  	    return code;
  	}
      } else {
--- 199,205 ----
  			      (opaque) sParms, "Server Process", &pid);
  #endif
  	if (code) {
! 	    afs_com_err(whoami, code, "can't create server process");
  	    return code;
  	}
      } else {
***************
*** 258,264 ****
  
  	code = rxkst_StartClient(cParms);
  	if (code) {
! 	    com_err(whoami, code, "StartClient returned");
  	    return code;
  	}
      } else {
--- 258,264 ----
  
  	code = rxkst_StartClient(cParms);
  	if (code) {
! 	    afs_com_err(whoami, code, "StartClient returned");
  	    return code;
  	}
      } else {
***************
*** 266,272 ****
  	    || as->parms[aFASTCALLS].items || as->parms[aSLOWCALLS].items
  	    || as->parms[aCOPIOUSCALLS].items) {
  	    code = RXKST_BADARGS;
! 	    com_err(whoami, code,
  		    "send/recv len and # calls are client options");
  	    return code;
  	}
--- 266,272 ----
  	    || as->parms[aFASTCALLS].items || as->parms[aSLOWCALLS].items
  	    || as->parms[aCOPIOUSCALLS].items) {
  	    code = RXKST_BADARGS;
! 	    afs_com_err(whoami, code,
  		    "send/recv len and # calls are client options");
  	    return code;
  	}
***************
*** 299,312 ****
      code = rx_Init(0);
      rx_SetRxDeadTime(120);
      if (code < 0) {
! 	com_err(whoami, code, "can't init Rx");
  	exit(1);
      }
  #ifndef AFS_PTHREAD_ENV
      initialProcess = 0;
      code = LWP_CurrentProcess(&initialProcess);
      if (code) {
! 	com_err(whoami, code, "LWP initialization failed");
  	exit(1);
      }
  #endif
--- 299,312 ----
      code = rx_Init(0);
      rx_SetRxDeadTime(120);
      if (code < 0) {
! 	afs_com_err(whoami, code, "can't init Rx");
  	exit(1);
      }
  #ifndef AFS_PTHREAD_ENV
      initialProcess = 0;
      code = LWP_CurrentProcess(&initialProcess);
      if (code) {
! 	afs_com_err(whoami, code, "LWP initialization failed");
  	exit(1);
      }
  #endif
Index: openafs/src/rxkad/test/stress_c.c
diff -c openafs/src/rxkad/test/stress_c.c:1.9 openafs/src/rxkad/test/stress_c.c:1.9.2.1
*** openafs/src/rxkad/test/stress_c.c:1.9	Tue Jul 15 19:16:47 2003
--- openafs/src/rxkad/test/stress_c.c	Tue Apr 10 14:43:45 2007
***************
*** 13,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/test/stress_c.c,v 1.9 2003/07/15 23:16:47 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 13,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/test/stress_c.c,v 1.9.2.1 2007/04/10 18:43:45 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 318,324 ****
  
  	    code = pthread_attr_init(&tattr);
  	    if (code) {
! 		com_err(whoami, code,
  			"can't pthread_attr_init worker process");
  		return code;
  	    }
--- 318,324 ----
  
  	    code = pthread_attr_init(&tattr);
  	    if (code) {
! 		afs_com_err(whoami, code,
  			"can't pthread_attr_init worker process");
  		return code;
  	    }
***************
*** 326,332 ****
  	    code =
  		pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED);
  	    if (code) {
! 		com_err(whoami, code,
  			"can't pthread_attr_setdetachstate worker process");
  		return code;
  	    }
--- 326,332 ----
  	    code =
  		pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED);
  	    if (code) {
! 		afs_com_err(whoami, code,
  			"can't pthread_attr_setdetachstate worker process");
  		return code;
  	    }
***************
*** 339,345 ****
  			      (opaque) w, "Worker Process", &pid);
  #endif
  	if (code) {
! 	    com_err(whoami, code, "can't create worker process");
  	    return code;
  	}
      }
--- 339,345 ----
  			      (opaque) w, "Worker Process", &pid);
  #endif
  	if (code) {
! 	    afs_com_err(whoami, code, "can't create worker process");
  	    return code;
  	}
      }
***************
*** 428,434 ****
      start = ftime();
      code = CallSimultaneously(parms->threads, &c, DoClient);
      if (code) {
! 	com_err(whoami, code, "in DoClient");
  	return code;
      }
      interval = ftime() - start;
--- 428,434 ----
      start = ftime();
      code = CallSimultaneously(parms->threads, &c, DoClient);
      if (code) {
! 	afs_com_err(whoami, code, "in DoClient");
  	return code;
      }
      interval = ftime() - start;
***************
*** 611,620 ****
      code = CallSimultaneously(RX_MAXCALLS, &mc, UniChannelCall);
      if (((expectedCode == RXKST_INCFAILED) || (expectedCode == -1)) && ((code == expectedCode) || (code == -3)));	/* strange cases */
      else if (code != expectedCode) {
! 	com_err(whoami, code,
  		"problem making multichannel call, expected '%s'",
  		((expectedCode == 0)
! 		 ? "no error" : (char *)error_message(expectedCode)));
      }
      return code;
  }
--- 611,620 ----
      code = CallSimultaneously(RX_MAXCALLS, &mc, UniChannelCall);
      if (((expectedCode == RXKST_INCFAILED) || (expectedCode == -1)) && ((code == expectedCode) || (code == -3)));	/* strange cases */
      else if (code != expectedCode) {
! 	afs_com_err(whoami, code,
  		"problem making multichannel call, expected '%s'",
  		((expectedCode == 0)
! 		 ? "no error" : (char *)afs_error_message(expectedCode)));
      }
      return code;
  }
***************
*** 646,659 ****
  		    someZero++;
  		    fprintf(stderr, "  %d no error\n", i);
  		} else
! 		    fprintf(stderr, "  %d %s\n", i, error_message(codes[i]));
  	    }
  	    if (someZero) {
  		char buf[100];
  		sprintf(buf, "connection dead following %s", msg);
  		code = FastCall(conn);
  		if (code)
! 		    com_err(whoami, code, buf);
  	    }
  	}
      }
--- 646,659 ----
  		    someZero++;
  		    fprintf(stderr, "  %d no error\n", i);
  		} else
! 		    fprintf(stderr, "  %d %s\n", i, afs_error_message(codes[i]));
  	    }
  	    if (someZero) {
  		char buf[100];
  		sprintf(buf, "connection dead following %s", msg);
  		code = FastCall(conn);
  		if (code)
! 		    afs_com_err(whoami, code, buf);
  	    }
  	}
      }
***************
*** 674,680 ****
  #ifndef rx_GetPacketCksum
  
      code = RXKST_BADARGS;
!     com_err(whoami, code,
  	    "Older versions of Rx don't support Get/Set callNumber Vector procedures: can't run this CallTest");
      return code;
  
--- 674,680 ----
  #ifndef rx_GetPacketCksum
  
      code = RXKST_BADARGS;
!     afs_com_err(whoami, code,
  	    "Older versions of Rx don't support Get/Set callNumber Vector procedures: can't run this CallTest");
      return code;
  
***************
*** 1049,1055 ****
  #ifndef rx_GetPacketCksum
  
      code = RXKST_BADARGS;
!     com_err(whoami, code,
  	    "Older versions of Rx don't export packet tracing routines: can't run this HijackTest");
      return code;
  
--- 1049,1055 ----
  #ifndef rx_GetPacketCksum
  
      code = RXKST_BADARGS;
!     afs_com_err(whoami, code,
  	    "Older versions of Rx don't export packet tracing routines: can't run this HijackTest");
      return code;
  
***************
*** 1095,1101 ****
      outgoingOps.op = OO_ZEROCKSUM;
      code = FastCall(conn);
      if (code) {
! 	com_err(whoami, code, "doing FastCall with ZEROCKSUM");
  	return code;
      }
      /* The server thinks we're an old style client.  Now start sending cksums.
--- 1095,1101 ----
      outgoingOps.op = OO_ZEROCKSUM;
      code = FastCall(conn);
      if (code) {
! 	afs_com_err(whoami, code, "doing FastCall with ZEROCKSUM");
  	return code;
      }
      /* The server thinks we're an old style client.  Now start sending cksums.
***************
*** 1103,1109 ****
      outgoingOps.op = OO_NOOP;
      code = FastCall(conn);
      if (code) {
! 	com_err(whoami, code, "doing FastCall with non-ZEROCKSUM");
  	return code;
      }
      /* The server now thinks we're a new style client, we can't go back now. */
--- 1103,1109 ----
      outgoingOps.op = OO_NOOP;
      code = FastCall(conn);
      if (code) {
! 	afs_com_err(whoami, code, "doing FastCall with non-ZEROCKSUM");
  	return code;
      }
      /* The server now thinks we're a new style client, we can't go back now. */
***************
*** 1112,1122 ****
      if (code == 0)
  	code = RXKST_NOBADCKSUM;
      if (code != RXKADSEALEDINCON) {
! 	com_err(whoami, code, "doing FastCall with ZEROCKSUM");
  	return code;
      } else if (!conn->error) {
  	code = RXKST_NOCONNERROR;
! 	com_err(whoami, code, "doing FastCall with ZEROCKSUM");
  	return code;
      } else
  	code = 0;
--- 1112,1122 ----
      if (code == 0)
  	code = RXKST_NOBADCKSUM;
      if (code != RXKADSEALEDINCON) {
! 	afs_com_err(whoami, code, "doing FastCall with ZEROCKSUM");
  	return code;
      } else if (!conn->error) {
  	code = RXKST_NOCONNERROR;
! 	afs_com_err(whoami, code, "doing FastCall with ZEROCKSUM");
  	return code;
      } else
  	code = 0;
***************
*** 1130,1140 ****
      if (code == 0)
  	code = RXKST_NOBADCKSUM;
      if (code != RXKADSEALEDINCON) {
! 	com_err(whoami, code, "doing FastCall with ZEROCKSUM");
  	return code;
      } else if (!conn->error) {
  	code = RXKST_NOCONNERROR;
! 	com_err(whoami, code, "doing FastCall with ZEROCKSUM");
  	return code;
      } else
  	code = 0;
--- 1130,1140 ----
      if (code == 0)
  	code = RXKST_NOBADCKSUM;
      if (code != RXKADSEALEDINCON) {
! 	afs_com_err(whoami, code, "doing FastCall with ZEROCKSUM");
  	return code;
      } else if (!conn->error) {
  	code = RXKST_NOCONNERROR;
! 	afs_com_err(whoami, code, "doing FastCall with ZEROCKSUM");
  	return code;
      } else
  	code = 0;
***************
*** 1172,1178 ****
      if (outgoingOps.counts[RX_PACKET_TYPE_RESPONSE] > 0) {
        oracle:
  	code = RXKST_CHALLENGEORACLE;
! 	com_err(whoami, code, "misdirecting challenge");
  	return code;
      }
      code = FastCall(otherConn);	/* generate some activity here */
--- 1172,1178 ----
      if (outgoingOps.counts[RX_PACKET_TYPE_RESPONSE] > 0) {
        oracle:
  	code = RXKST_CHALLENGEORACLE;
! 	afs_com_err(whoami, code, "misdirecting challenge");
  	return code;
      }
      code = FastCall(otherConn);	/* generate some activity here */
***************
*** 1206,1219 ****
  
  	code = pthread_attr_init(&tattr);
  	if (code) {
! 	    com_err(whoami, code,
  		    "can't pthread_attr_init slow call process");
  	    return code;
  	}
  
  	code = pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED);
  	if (code) {
! 	    com_err(whoami, code,
  		    "can't pthread_attr_setdetachstate slow call process");
  	    return code;
  	}
--- 1206,1219 ----
  
  	code = pthread_attr_init(&tattr);
  	if (code) {
! 	    afs_com_err(whoami, code,
  		    "can't pthread_attr_init slow call process");
  	    return code;
  	}
  
  	code = pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED);
  	if (code) {
! 	    afs_com_err(whoami, code,
  		    "can't pthread_attr_setdetachstate slow call process");
  	    return code;
  	}
***************
*** 1226,1232 ****
  			  (opaque) otherConn, "Slow Call Process", &pid);
  #endif
      if (code) {
! 	com_err(whoami, code, "can't create slow call process");
  	return code;
      }
  #ifdef AFS_PTHREAD_ENV
--- 1226,1232 ----
  			  (opaque) otherConn, "Slow Call Process", &pid);
  #endif
      if (code) {
! 	afs_com_err(whoami, code, "can't create slow call process");
  	return code;
      }
  #ifdef AFS_PTHREAD_ENV
***************
*** 1339,1345 ****
  	if (conn) {
  	    code = RXKST_Kill(conn);
  	    if (code) {
! 		com_err(whoami, code, "trying to stop server");
  	    }
  	    rx_DestroyConnection(conn);
  	} else
--- 1339,1345 ----
  	if (conn) {
  	    code = RXKST_Kill(conn);
  	    if (code) {
! 		afs_com_err(whoami, code, "trying to stop server");
  	    }
  	    rx_DestroyConnection(conn);
  	} else
***************
*** 1357,1363 ****
      rxs_Release(sc);
      rx_Finalize();
      if (code) {
! 	com_err(parms->whoami, code, "test fails");
  	exit(13);
      } else {
  	printf("Test Okay\n");
--- 1357,1363 ----
      rxs_Release(sc);
      rx_Finalize();
      if (code) {
! 	afs_com_err(parms->whoami, code, "test fails");
  	exit(13);
      } else {
  	printf("Test Okay\n");
Index: openafs/src/shlibafsrpc/afsrpc.exp
diff -c openafs/src/shlibafsrpc/afsrpc.exp:1.1.4.1 openafs/src/shlibafsrpc/afsrpc.exp:1.1.4.2
*** openafs/src/shlibafsrpc/afsrpc.exp:1.1.4.1	Mon May 30 00:57:39 2005
--- openafs/src/shlibafsrpc/afsrpc.exp	Tue Apr 10 14:43:45 2007
***************
*** 84,91 ****
  rxkad_stats_key
  _et_list
  et_list_mutex
! com_err
! error_message
  rx_socket
  des_pcbc_init
  rx_BusyError
--- 84,91 ----
  rxkad_stats_key
  _et_list
  et_list_mutex
! afs_com_err
! afs_error_message
  rx_socket
  des_pcbc_init
  rx_BusyError
Index: openafs/src/shlibafsrpc/mapfile
diff -c openafs/src/shlibafsrpc/mapfile:1.3.2.3 openafs/src/shlibafsrpc/mapfile:1.3.2.4
*** openafs/src/shlibafsrpc/mapfile:1.3.2.3	Wed Jul  5 14:34:41 2006
--- openafs/src/shlibafsrpc/mapfile	Tue Apr 10 14:43:45 2007
***************
*** 57,64 ****
  	rxkad_global_stats;
  	rxkad_global_stats_lock;
  	rxkad_stats_key;
! 	com_err;
! 	error_message;
  	rx_socket;
  	rxevent_debugFile;
  	rx_debugFile;
--- 57,64 ----
  	rxkad_global_stats;
  	rxkad_global_stats_lock;
  	rxkad_stats_key;
! 	afs_com_err;
! 	afs_error_message;
  	rx_socket;
  	rxevent_debugFile;
  	rx_debugFile;
Index: openafs/src/shlibafsrpc/mapfile.afs_xdr
diff -c openafs/src/shlibafsrpc/mapfile.afs_xdr:1.1.4.2 openafs/src/shlibafsrpc/mapfile.afs_xdr:1.1.4.3
*** openafs/src/shlibafsrpc/mapfile.afs_xdr:1.1.4.2	Sun Aug 20 18:24:10 2006
--- openafs/src/shlibafsrpc/mapfile.afs_xdr	Tue Apr 10 14:43:45 2007
***************
*** 57,64 ****
  	rxkad_global_stats;
  	rxkad_global_stats_lock;
  	rxkad_stats_key;
! 	com_err;
! 	error_message;
  	rx_socket;
  	rxevent_debugFile;
  	rx_debugFile;
--- 57,64 ----
  	rxkad_global_stats;
  	rxkad_global_stats_lock;
  	rxkad_stats_key;
! 	afs_com_err;
! 	afs_error_message;
  	rx_socket;
  	rxevent_debugFile;
  	rx_debugFile;
Index: openafs/src/sys/pagsh.c
diff -c openafs/src/sys/pagsh.c:1.9.2.3 openafs/src/sys/pagsh.c:1.9.2.4
*** openafs/src/sys/pagsh.c:1.9.2.3	Fri Oct  6 08:44:43 2006
--- openafs/src/sys/pagsh.c	Tue Jul 10 16:30:57 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/sys/pagsh.c,v 1.9.2.3 2006/10/06 12:44:43 shadow Exp $");
  
  #ifdef	AFS_AIX32_ENV
  #include <signal.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/sys/pagsh.c,v 1.9.2.4 2007/07/10 20:30:57 shadow Exp $");
  
  #ifdef	AFS_AIX32_ENV
  #include <signal.h>
***************
*** 119,136 ****
--- 119,140 ----
      afs_uint32 pag;
      struct stat sbuf;
      char fname[256], *prefix = "/ticket/";
+     char fname5[256], *prefix5 = "FILE:/ticket/krb5cc_";
      int numenv;
      char **newenv, **senv, **denv;
  
      if (stat("/ticket", &sbuf) == -1) {
  	prefix = "/tmp/tkt";
+ 	prefix5 = "FILE:/tmp/krb5cc_";
      }
  
      pag = curpag() & 0xffffffff;
      if (pag == -1) {
  	sprintf(fname, "%s%d", prefix, getuid());
+ 	sprintf(fname5, "%s%d", prefix5, getuid());
      } else {
  	sprintf(fname, "%sp%ld", prefix, pag);
+ 	sprintf(fname5, "%sp%ld", prefix5, pag);
      }
  /*    ktc_set_tkt_string(fname); */
  
***************
*** 139,151 ****
      newenv = (char **)malloc((numenv + 2) * sizeof(char *));
  
      for (senv = environ, denv = newenv; *senv; *senv++) {
! 	if (strncmp(*senv, "KRBTKFILE=", 10) != 0)
  	    *denv++ = *senv;
      }
  
!     *denv = malloc(10 + strlen(fname) + 1);
      strcpy(*denv, "KRBTKFILE=");
      strcat(*denv, fname);
      *++denv = 0;
      environ = newenv;
  }
--- 143,160 ----
      newenv = (char **)malloc((numenv + 2) * sizeof(char *));
  
      for (senv = environ, denv = newenv; *senv; *senv++) {
! 	if (strncmp(*senv, "KRBTKFILE=", 10) != 0 &&
! 		strncmp(*senv, "KRB5CCNAME=", 11) != 0)
  	    *denv++ = *senv;
      }
  
!     *denv = malloc(10+11 + strlen(fname) + strlen(fname5) + 2);
      strcpy(*denv, "KRBTKFILE=");
      strcat(*denv, fname);
+     *(denv+1) = *denv + strlen(*denv) + 1;
+     denv++;
+     strcpy(*denv, "KRB5CCNAME=");
+     strcat(*denv, fname5);
      *++denv = 0;
      environ = newenv;
  }
Index: openafs/src/sys/pioctl_nt.c
diff -c openafs/src/sys/pioctl_nt.c:1.18.2.12 openafs/src/sys/pioctl_nt.c:1.18.2.13
*** openafs/src/sys/pioctl_nt.c:1.18.2.12	Sat Oct 15 17:48:28 2005
--- openafs/src/sys/pioctl_nt.c	Sun Jun 10 01:54:10 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/sys/pioctl_nt.c,v 1.18.2.12 2005/10/15 21:48:28 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <windows.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/sys/pioctl_nt.c,v 1.18.2.13 2007/06/10 05:54:10 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <windows.h>
***************
*** 844,849 ****
--- 844,853 ----
  
      MarshallString(&preq, fullPath);
      if (blobp->in_size) {
+         if (blobp->in_size > sizeof(preq.data) - (preq.mp - preq.data)*sizeof(char)) {
+             errno = E2BIG;
+             return -1;
+         }
  	memcpy(preq.mp, blobp->in, blobp->in_size);
  	preq.mp += blobp->in_size;
      }
Index: openafs/src/tests/afscp.c
diff -c openafs/src/tests/afscp.c:1.4 openafs/src/tests/afscp.c:1.4.2.1
*** openafs/src/tests/afscp.c:1.4	Tue Nov 18 23:02:29 2003
--- openafs/src/tests/afscp.c	Tue Apr 10 14:43:46 2007
***************
*** 351,362 ****
  	    dfd = open(destpath, O_RDWR | O_TRUNC, 0666);
  	    if (dfd < 0) {
  		fprintf(stderr, "Cannot open %s (%s)\n", destpath,
! 			error_message(errno));
  		goto Fail_dconn;
  	    }
  	} else if (dfd < 0) {
  	    fprintf(stderr, "Cannot open %s (%s)\n", destpath,
! 		    error_message(errno));
  	    goto Fail_dconn;
  	}
      } else {
--- 351,362 ----
  	    dfd = open(destpath, O_RDWR | O_TRUNC, 0666);
  	    if (dfd < 0) {
  		fprintf(stderr, "Cannot open %s (%s)\n", destpath,
! 			afs_error_message(errno));
  		goto Fail_dconn;
  	    }
  	} else if (dfd < 0) {
  	    fprintf(stderr, "Cannot open %s (%s)\n", destpath,
! 		    afs_error_message(errno));
  	    goto Fail_dconn;
  	}
      } else {
***************
*** 372,378 ****
  		    code = 0;
  	    } else {
  		printf("Cannot create %s (%s)\n", destpath,
! 		       error_message(code));
  		if (code)
  		    goto Fail_dconn;
  	    }
--- 372,378 ----
  		    code = 0;
  	    } else {
  		printf("Cannot create %s (%s)\n", destpath,
! 		       afs_error_message(code));
  		if (code)
  		    goto Fail_dconn;
  	    }
***************
*** 383,401 ****
  	sfd = open(srcf, O_RDONLY, 0);
  	if (sfd < 0) {
  	    fprintf(stderr, "Cannot open %s (%s)\n", srcf,
! 		    error_message(errno));
  	    goto Fail_dconn;
  	}
  	if (fstat(sfd, &statbuf) < 0) {
  	    fprintf(stderr, "Cannot stat %s (%s)\n", srcf,
! 		    error_message(errno));
  	    close(sfd);
  	    goto Fail_dconn;
  	}
      } else {
  	if ((code = RXAFS_FetchStatus(sconn, &sf, &fst, &scb, &vs))) {
  	    printf("Cannot fetchstatus of %d.%d (%s)\n", sf.Volume, sf.Vnode,
! 		   error_message(code));
  	    goto Fail_dconn;
  	}
      }
--- 383,401 ----
  	sfd = open(srcf, O_RDONLY, 0);
  	if (sfd < 0) {
  	    fprintf(stderr, "Cannot open %s (%s)\n", srcf,
! 		    afs_error_message(errno));
  	    goto Fail_dconn;
  	}
  	if (fstat(sfd, &statbuf) < 0) {
  	    fprintf(stderr, "Cannot stat %s (%s)\n", srcf,
! 		    afs_error_message(errno));
  	    close(sfd);
  	    goto Fail_dconn;
  	}
      } else {
  	if ((code = RXAFS_FetchStatus(sconn, &sf, &fst, &scb, &vs))) {
  	    printf("Cannot fetchstatus of %d.%d (%s)\n", sf.Volume, sf.Vnode,
! 		   afs_error_message(code));
  	    goto Fail_dconn;
  	}
      }
***************
*** 420,426 ****
      if (!slcl) {
  	if ((code = StartRXAFS_FetchData(scall, &sf, 0, filesz))) {
  	    printf("Unable to fetch data from %s (%s)\n", srcf,
! 		   error_message(code));
  	    goto Fail_call;
  	}
      }
--- 420,426 ----
      if (!slcl) {
  	if ((code = StartRXAFS_FetchData(scall, &sf, 0, filesz))) {
  	    printf("Unable to fetch data from %s (%s)\n", srcf,
! 		   afs_error_message(code));
  	    goto Fail_call;
  	}
      }
***************
*** 441,447 ****
  	if ((code =
  	     StartRXAFS_StoreData(dcall, &df, &sst, 0, filesz, filesz))) {
  	    printf("Unable to store data to %s (%s)\n", destpath,
! 		   error_message(code));
  	    goto Fail_call;
  	}
      }
--- 441,447 ----
  	if ((code =
  	     StartRXAFS_StoreData(dcall, &df, &sst, 0, filesz, filesz))) {
  	    printf("Unable to store data to %s (%s)\n", destpath,
! 		   afs_error_message(code));
  	    goto Fail_call;
  	}
      }
***************
*** 500,506 ****
  	fetchcode = rx_EndCall(scall, fetchcode);
      }
      if (fetchcode && printcallerrs)
! 	printf("Error returned from fetch: %s\n", error_message(fetchcode));
  
      if (dlcl) {
  	if (close(dfd) && !storecode)
--- 500,506 ----
  	fetchcode = rx_EndCall(scall, fetchcode);
      }
      if (fetchcode && printcallerrs)
! 	printf("Error returned from fetch: %s\n", afs_error_message(fetchcode));
  
      if (dlcl) {
  	if (close(dfd) && !storecode)
***************
*** 509,515 ****
  	storecode = rx_EndCall(dcall, storecode);
      }
      if (storecode && printcallerrs)
! 	printf("Error returned from store: %s\n", error_message(storecode));
  
      gettimeofday(&finish, &tz);
  
--- 509,515 ----
  	storecode = rx_EndCall(dcall, storecode);
      }
      if (storecode && printcallerrs)
! 	printf("Error returned from store: %s\n", afs_error_message(storecode));
  
      gettimeofday(&finish, &tz);
  
***************
*** 521,527 ****
  	scb.CallBackType = CB_DROPPED;
  	if ((code = RXAFS_GiveUpCallBacks(sconn, &theFids, &theCBs)))
  	    printf("Could not give up source callback: %s\n",
! 		   error_message(code));
      }
  
      if (!dlcl) {
--- 521,527 ----
  	scb.CallBackType = CB_DROPPED;
  	if ((code = RXAFS_GiveUpCallBacks(sconn, &theFids, &theCBs)))
  	    printf("Could not give up source callback: %s\n",
! 		   afs_error_message(code));
      }
  
      if (!dlcl) {
***************
*** 532,538 ****
  	dcb.CallBackType = CB_DROPPED;
  	if ((code = RXAFS_GiveUpCallBacks(dconn, &theFids, &theCBs)))
  	    printf("Could not give up target callback: %s\n",
! 		   error_message(code));
      }
  
      if (code == 0)
--- 532,538 ----
  	dcb.CallBackType = CB_DROPPED;
  	if ((code = RXAFS_GiveUpCallBacks(dconn, &theFids, &theCBs)))
  	    printf("Could not give up target callback: %s\n",
! 		   afs_error_message(code));
      }
  
      if (code == 0)
Index: openafs/src/tests/afsdump_dirlist.c
diff -c openafs/src/tests/afsdump_dirlist.c:1.2 openafs/src/tests/afsdump_dirlist.c:1.2.2.1
*** openafs/src/tests/afsdump_dirlist.c:1.2	Tue Jul 15 19:16:55 2003
--- openafs/src/tests/afsdump_dirlist.c	Tue Apr 10 14:43:46 2007
***************
*** 114,120 ****
      error_count++;
      if (!quiet) {
  	va_start(alist, msg);
! 	com_err_va(argv0, code, msg, alist);
  	va_end(alist);
      }
  }
--- 114,120 ----
      error_count++;
      if (!quiet) {
  	va_start(alist, msg);
! 	afs_com_err_va(argv0, code, msg, alist);
  	va_end(alist);
      }
  }
***************
*** 137,143 ****
      initialize_xFil_error_table();
      r = xfopen(&input_file, O_RDONLY, input_path);
      if (r) {
! 	com_err(argv0, r, "opening %s", input_path);
  	exit(2);
      }
  
--- 137,143 ----
      initialize_xFil_error_table();
      r = xfopen(&input_file, O_RDONLY, input_path);
      if (r) {
! 	afs_com_err(argv0, r, "opening %s", input_path);
  	exit(2);
      }
  
***************
*** 153,158 ****
      if (verbose && error_count)
  	fprintf(stderr, "*** %d errors\n", error_count);
      if (r && !quiet)
! 	fprintf(stderr, "*** FAILED: %s\n", error_message(r));
      exit(0);
  }
--- 153,158 ----
      if (verbose && error_count)
  	fprintf(stderr, "*** %d errors\n", error_count);
      if (r && !quiet)
! 	fprintf(stderr, "*** FAILED: %s\n", afs_error_message(r));
      exit(0);
  }
Index: openafs/src/tests/afsdump_extract.c
diff -c openafs/src/tests/afsdump_extract.c:1.2 openafs/src/tests/afsdump_extract.c:1.2.2.1
*** openafs/src/tests/afsdump_extract.c:1.2	Tue Jul 15 19:16:55 2003
--- openafs/src/tests/afsdump_extract.c	Tue Apr 10 14:43:46 2007
***************
*** 320,326 ****
      error_count++;
      if (!quiet) {
  	va_start(alist, msg);
! 	com_err_va(argv0, code, msg, alist);
  	va_end(alist);
      }
  }
--- 320,326 ----
      error_count++;
      if (!quiet) {
  	va_start(alist, msg);
! 	afs_com_err_va(argv0, code, msg, alist);
  	va_end(alist);
      }
  }
***************
*** 547,553 ****
      initialize_xFil_error_table();
      r = xfopen(&input_file, O_RDONLY, input_path);
      if (r) {
! 	com_err(argv0, r, "opening %s", input_path);
  	exit(2);
      }
  
--- 547,553 ----
      initialize_xFil_error_table();
      r = xfopen(&input_file, O_RDONLY, input_path);
      if (r) {
! 	afs_com_err(argv0, r, "opening %s", input_path);
  	exit(2);
      }
  
***************
*** 568,574 ****
  	if ((r = xftell(&input_file, &where))
  	    || (r = Path_PreScan(&input_file, &phi, 1))
  	    || (r = xfseek(&input_file, &where))) {
! 	    com_err(argv0, r, "- path initialization failed");
  	    xfclose(&input_file);
  	    exit(1);
  	}
--- 568,574 ----
  	if ((r = xftell(&input_file, &where))
  	    || (r = Path_PreScan(&input_file, &phi, 1))
  	    || (r = xfseek(&input_file, &where))) {
! 	    afs_com_err(argv0, r, "- path initialization failed");
  	    xfclose(&input_file);
  	    exit(1);
  	}
***************
*** 596,601 ****
      if (verbose && error_count)
  	fprintf(stderr, "*** %d errors\n", error_count);
      if (r && !quiet)
! 	fprintf(stderr, "*** FAILED: %s\n", error_message(r));
      exit(0);
  }
--- 596,601 ----
      if (verbose && error_count)
  	fprintf(stderr, "*** %d errors\n", error_count);
      if (r && !quiet)
! 	fprintf(stderr, "*** FAILED: %s\n", afs_error_message(r));
      exit(0);
  }
Index: openafs/src/tests/afsdump_scan.c
diff -c openafs/src/tests/afsdump_scan.c:1.2 openafs/src/tests/afsdump_scan.c:1.2.2.1
*** openafs/src/tests/afsdump_scan.c:1.2	Tue Jul 15 19:16:56 2003
--- openafs/src/tests/afsdump_scan.c	Tue Apr 10 14:43:46 2007
***************
*** 223,229 ****
      error_count++;
      if (!quiet) {
  	va_start(alist, msg);
! 	com_err_va(argv0, code, msg, alist);
  	va_end(alist);
      }
  }
--- 223,229 ----
      error_count++;
      if (!quiet) {
  	va_start(alist, msg);
! 	afs_com_err_va(argv0, code, msg, alist);
  	va_end(alist);
      }
  }
***************
*** 290,296 ****
      initialize_xFil_error_table();
      r = xfopen(&input_file, O_RDONLY, input_path);
      if (r) {
! 	com_err(argv0, r, "opening %s", input_path);
  	exit(2);
      }
  
--- 290,296 ----
      initialize_xFil_error_table();
      r = xfopen(&input_file, O_RDONLY, input_path);
      if (r) {
! 	afs_com_err(argv0, r, "opening %s", input_path);
  	exit(2);
      }
  
***************
*** 311,317 ****
      }
  
      if (gendump_path && (r = setup_repair())) {
! 	com_err(argv0, r, "setting up repair output");
  	xfclose(&input_file);
  	exit(2);
      }
--- 311,317 ----
      }
  
      if (gendump_path && (r = setup_repair())) {
! 	afs_com_err(argv0, r, "setting up repair output");
  	xfclose(&input_file);
  	exit(2);
      }
***************
*** 326,332 ****
  	if ((r = xftell(&input_file, &where))
  	    || (r = Path_PreScan(&input_file, &phi, 0))
  	    || (r = xfseek(&input_file, &where))) {
! 	    com_err(argv0, r, "- path initialization failed");
  	    xfclose(&input_file);
  	    exit(2);
  	}
--- 326,332 ----
  	if ((r = xftell(&input_file, &where))
  	    || (r = Path_PreScan(&input_file, &phi, 0))
  	    || (r = xfseek(&input_file, &where))) {
! 	    afs_com_err(argv0, r, "- path initialization failed");
  	    xfclose(&input_file);
  	    exit(2);
  	}
***************
*** 353,358 ****
      if (verbose && error_count)
  	fprintf(stderr, "*** %d errors\n", error_count);
      if (r && !quiet)
! 	fprintf(stderr, "*** FAILED: %s\n", error_message(r));
      exit(0);
  }
--- 353,358 ----
      if (verbose && error_count)
  	fprintf(stderr, "*** %d errors\n", error_count);
      if (r && !quiet)
! 	fprintf(stderr, "*** FAILED: %s\n", afs_error_message(r));
      exit(0);
  }
Index: openafs/src/tests/afsdump_xsed.c
diff -c openafs/src/tests/afsdump_xsed.c:1.2 openafs/src/tests/afsdump_xsed.c:1.2.2.1
*** openafs/src/tests/afsdump_xsed.c:1.2	Tue Jul 15 19:16:56 2003
--- openafs/src/tests/afsdump_xsed.c	Tue Apr 10 14:43:46 2007
***************
*** 229,235 ****
      error_count++;
      if (!quiet) {
  	va_start(alist, msg);
! 	com_err_va(argv0, code, msg, alist);
  	va_end(alist);
      }
  }
--- 229,235 ----
      error_count++;
      if (!quiet) {
  	va_start(alist, msg);
! 	afs_com_err_va(argv0, code, msg, alist);
  	va_end(alist);
      }
  }
***************
*** 335,341 ****
      initialize_AVds_error_table();
      r = xfopen(&X, input_path, O_RDONLY, 0);
      if (r) {
! 	com_err(argv0, r, "opening %s", input_path);
  	exit(2);
      }
  
--- 335,341 ----
      initialize_AVds_error_table();
      r = xfopen(&X, input_path, O_RDONLY, 0);
      if (r) {
! 	afs_com_err(argv0, r, "opening %s", input_path);
  	exit(2);
      }
  
***************
*** 356,362 ****
      }
  
      if (gendump_path && (r = setup_repair())) {
! 	com_err(argv0, r, "setting up repair output");
  	xfclose(X);
  	exit(2);
      }
--- 356,362 ----
      }
  
      if (gendump_path && (r = setup_repair())) {
! 	afs_com_err(argv0, r, "setting up repair output");
  	xfclose(X);
  	exit(2);
      }
***************
*** 371,377 ****
  	if ((r = xftell(X, &where))
  	    || (r = Path_PreScan(X, &phi, 0))
  	    || (r = xfseek(X, &where))) {
! 	    com_err(argv0, r, "- path initialization failed");
  	    xfclose(X);
  	    exit(2);
  	}
--- 371,377 ----
  	if ((r = xftell(X, &where))
  	    || (r = Path_PreScan(X, &phi, 0))
  	    || (r = xfseek(X, &where))) {
! 	    afs_com_err(argv0, r, "- path initialization failed");
  	    xfclose(X);
  	    exit(2);
  	}
***************
*** 401,406 ****
      if (verbose && error_count)
  	fprintf(stderr, "*** %d errors\n", error_count);
      if (r && !quiet)
! 	fprintf(stderr, "*** FAILED: %s\n", error_message(r));
      exit(0);
  }
--- 401,406 ----
      if (verbose && error_count)
  	fprintf(stderr, "*** %d errors\n", error_count);
      if (r && !quiet)
! 	fprintf(stderr, "*** FAILED: %s\n", afs_error_message(r));
      exit(0);
  }
Index: openafs/src/tests/null-search.c
diff -c openafs/src/tests/null-search.c:1.2 openafs/src/tests/null-search.c:1.2.2.1
*** openafs/src/tests/null-search.c:1.2	Tue Jul 15 19:17:01 2003
--- openafs/src/tests/null-search.c	Tue Apr 10 14:43:46 2007
***************
*** 71,77 ****
      error_count++;
      if (!quiet) {
  	va_start(alist, msg);
! 	com_err_va(argv0, code, msg, alist);
  	va_end(alist);
      }
  }
--- 71,77 ----
      error_count++;
      if (!quiet) {
  	va_start(alist, msg);
! 	afs_com_err_va(argv0, code, msg, alist);
  	va_end(alist);
      }
  }
***************
*** 139,145 ****
      initialize_xFil_error_table();
      r = xfopen(&input_file, O_RDONLY, input_path);
      if (r) {
! 	com_err(argv0, r, "opening %s", input_path);
  	exit(2);
      }
  
--- 139,145 ----
      initialize_xFil_error_table();
      r = xfopen(&input_file, O_RDONLY, input_path);
      if (r) {
! 	afs_com_err(argv0, r, "opening %s", input_path);
  	exit(2);
      }
  
***************
*** 156,162 ****
  	if ((r = xftell(&input_file, &where))
  	    || (r = Path_PreScan(&input_file, &phi, 0))
  	    || (r = xfseek(&input_file, &where))) {
! 	    com_err(argv0, r, "- path initialization failed");
  	    xfclose(&input_file);
  	    exit(2);
  	}
--- 156,162 ----
  	if ((r = xftell(&input_file, &where))
  	    || (r = Path_PreScan(&input_file, &phi, 0))
  	    || (r = xfseek(&input_file, &where))) {
! 	    afs_com_err(argv0, r, "- path initialization failed");
  	    xfclose(&input_file);
  	    exit(2);
  	}
***************
*** 171,175 ****
      if (bad_count)
  	printf("*** %d bad files\n", bad_count);
      if (r && !quiet)
! 	printf("*** FAILED: %s\n", error_message(r));
  }
--- 171,175 ----
      if (bad_count)
  	printf("*** %d bad files\n", bad_count);
      if (r && !quiet)
! 	printf("*** FAILED: %s\n", afs_error_message(r));
  }
Index: openafs/src/tsm41/Makefile.in
diff -c openafs/src/tsm41/Makefile.in:1.7.6.2 openafs/src/tsm41/Makefile.in:1.7.6.3
*** openafs/src/tsm41/Makefile.in:1.7.6.2	Thu Jul 13 13:19:41 2006
--- openafs/src/tsm41/Makefile.in	Fri Jul 13 15:55:21 2007
***************
*** 48,53 ****
--- 48,56 ----
  		aix_auth_common.o \
  		aix_ktc_null.o
  
+ AUTH_KRB5_OBJS = \
+ 		aix_aklog.o 
+ 
  AUTH_KRB_OBJS = \
  		aix_auth.o \
  		aix_ident.o \
***************
*** 56,65 ****
--- 59,70 ----
  
  AUTHLIBS= \
  		afs_dynamic_auth \
+ 		aklog_dynamic_auth \
  		afs_dynamic_kerbauth
  
  IMPORTS = -bI:/lib/aio.exp -bI:/lib/netinet.exp -bI:/lib/sockets.exp -bI:/lib/statcmd.exp 
  LDFLAGS = -eafs_initialize ${IMPORTS} -lsys -lcsys -lc
+ AKLDFLAGS = -eaklog_initialize ${IMPORTS} -lsys -lcsys -lc
  
  all: $(AUTHLIBS)
  
***************
*** 71,82 ****
--- 76,93 ----
  afs_dynamic_auth: ${AUTH_OBJS} ${AFSLIBS} ${AUTHFILES}
  	$(LD) -o $@ ${AUTH_OBJS} $(AFSLIBS) ${AUTHFILES} ${XLIBS} ${LDFLAGS}
  
+ aklog_dynamic_auth: ${AUTH_KRB5_OBJS} ${AFSLIBS} ${AUTHFILES}
+ 	$(LD) -o $@ ${AUTH_KRB5_OBJS} $(AFSLIBS) ${AUTHFILES} @KRB5LIBS@ ${XLIBS} ${AKLDFLAGS}
+ 
  afs_dynamic_kerbauth: ${AUTH_KRB_OBJS} ${KAFSLIBS} ${AUTHFILES}
  	$(LD) -o $@ ${AUTH_KRB_OBJS} $(KAFSLIBS) ${AUTHFILES} ${XLIBS} ${LDFLAGS}
  
  aix_auth_common.o: ${srcdir}/aix_auth_common.c
  	${CCRULE}
  
+ aix_aklog.o: ${srcdir}/aix_aklog.c
+ 	${CCRULE} @KRB5CFLAGS@
+ 
  aix_ktc_krb.o: ${srcdir}/aix_ktc.c
  	${CCRULE} -DAFS_KERBEROS_ENV
  
Index: openafs/src/tsm41/aix_aklog.c
diff -c /dev/null openafs/src/tsm41/aix_aklog.c:1.1.4.2
*** /dev/null	Thu Oct 11 16:05:13 2007
--- openafs/src/tsm41/aix_aklog.c	Fri Jul 13 15:55:35 2007
***************
*** 0 ****
--- 1,563 ----
+ /*
+  * Copyright 2000, International Business Machines Corporation and others.
+  * All Rights Reserved.
+  * 
+  * This software has been released under the terms of the IBM Public
+  * License.  For details, see the LICENSE file in the top-level source
+  * directory or online at http://www.openafs.org/dl/license10.html
+  */
+ 
+ #include <afsconfig.h>
+ #include <afs/param.h>
+ 
+ RCSID
+     ("$Header: /cvs/openafs/src/tsm41/aix_aklog.c,v 1.1.4.2 2007/07/13 19:55:35 shadow Exp $");
+ 
+ #if defined(AFS_AIX51_ENV)
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <stdio.h>
+ #include <locale.h>
+ #include <nl_types.h>
+ #include <pwd.h>
+ #include <netdb.h>
+ #include <sys/socket.h>
+ #include <sys/file.h>
+ #include <errno.h>
+ #include <usersec.h>
+ 
+ #include <krb5.h>
+ 
+ #include <afs/cellconfig.h>
+ #include <afs/dirpath.h>
+ #include <rx/rxkad.h>
+ #include <afs/auth.h>
+ #include "aix_auth_prototypes.h"
+ 
+ struct afsconf_cell ak_cellconfig; /* General information about the cell */
+ static char linkedcell[MAXCELLCHARS+1];
+ static krb5_ccache  _krb425_ccache = NULL;
+ 
+ #define AFSKEY "afs"
+ #define AFSINST ""
+ 
+ #ifndef ANAME_SZ
+ #define ANAME_SZ 40
+ #endif /* ANAME_SZ */
+ #ifndef REALM_SZ
+ #define REALM_SZ 40
+ #endif /* REALM_SZ */
+ #ifndef SNAME_SZ
+ #define SNAME_SZ 40
+ #endif /* SNAME_SZ */
+ #ifndef INST_SZ
+ #define INST_SZ 40
+ #endif /* INST_SZ */
+ 
+ /*
+  * Why doesn't AFS provide these prototypes?
+  */
+ 
+ extern int pioctl(char *, afs_int32, struct ViceIoctl *, afs_int32);
+ 
+ /*
+  * Other prototypes
+  */
+ 
+ static krb5_error_code get_credv5(krb5_context context, char *, char *,
+ 				  char *, krb5_creds **);
+ static int get_user_realm(krb5_context, char *);
+ 
+ #if defined(HAVE_KRB5_PRINC_SIZE) || defined(krb5_princ_size)
+ 
+ #define get_princ_str(c, p, n) krb5_princ_component(c, p, n)->data
+ #define get_princ_len(c, p, n) krb5_princ_component(c, p, n)->length
+ #define second_comp(c, p) (krb5_princ_size(c, p) > 1)
+ #define realm_data(c, p) krb5_princ_realm(c, p)->data
+ #define realm_len(c, p) krb5_princ_realm(c, p)->length
+ 
+ #elif defined(HAVE_KRB5_PRINCIPAL_GET_COMP_STRING)
+ 
+ #define get_princ_str(c, p, n) krb5_principal_get_comp_string(c, p, n)
+ #define get_princ_len(c, p, n) strlen(krb5_principal_get_comp_string(c, p, n))
+ #define second_comp(c, p) (krb5_principal_get_comp_string(c, p, 1) != NULL)
+ #define realm_data(c, p) krb5_realm_data(krb5_principal_get_realm(c, p))
+ #define realm_len(c, p) krb5_realm_length(krb5_principal_get_realm(c, p))
+ 
+ #else
+ #error "Must have either krb5_princ_size or krb5_principal_get_comp_string"
+ #endif
+ 
+ #if defined(HAVE_KRB5_CREDS_KEYBLOCK)
+ 
+ #define get_cred_keydata(c) c->keyblock.contents
+ #define get_cred_keylen(c) c->keyblock.length
+ #define get_creds_enctype(c) c->keyblock.enctype
+ 
+ #elif defined(HAVE_KRB5_CREDS_SESSION)
+ 
+ #define get_cred_keydata(c) c->session.keyvalue.data
+ #define get_cred_keylen(c) c->session.keyvalue.length
+ #define get_creds_enctype(c) c->session.keytype
+ 
+ #else
+ #error "Must have either keyblock or session member of krb5_creds"
+ #endif
+ 
+ char *afs_realm_of_cell(krb5_context context, struct afsconf_cell *cellconfig, int fallback)
+ {
+     static char krbrlm[REALM_SZ+1];
+         char **hrealms = 0;
+         krb5_error_code retval;
+ 
+     if (!cellconfig)
+         return 0;
+ 
+     if (fallback) {
+         char * p;
+         p = strchr(cellconfig->hostName[0], '.');
+         if (p++)
+             strcpy(krbrlm, p);
+         else
+             strcpy(krbrlm, cellconfig->name);
+         for (p=krbrlm; *p; p++) {
+             if (islower(*p)) 
+                 *p = toupper(*p);
+         }
+     } else {
+         if (retval = krb5_get_host_realm(context,
+                                          cellconfig->hostName[0], &hrealms))
+             return 0; 
+         if(!hrealms[0]) return 0;
+         strcpy(krbrlm, hrealms[0]);
+ 
+         if (hrealms) krb5_free_host_realm(context, hrealms);
+     }
+     return krbrlm;
+ }
+ 
+ int
+ aklog_authenticate(char *userName, char *response, int *reenter, char **message)
+ {
+     char *reason, *pword, prompt[256];
+     struct passwd *pwd;
+     int code, unixauthneeded, password_expires = -1;
+     int status;
+     krb5_context context;
+ 
+     krb5_init_context(&context);
+     *reenter = 0;
+     *message = (char *)0;
+ 
+ #if 0
+     if ((pwd = getpwnam(userName)) == NULL) {
+ 	*message = (char *)malloc(256);
+ 	sprintf(*message, "getpwnam for user failed\n");
+ 	return AUTH_FAILURE;
+     }
+ #endif
+ 
+     status = auth_to_cell(context, NULL, NULL);
+     if (status) {
+ 	*message = (char *)malloc(1024);
+ 	sprintf(*message, "Unable to obtain AFS tokens: %s.\n",
+ 		afs_error_message(status));
+ 	return AUTH_FAILURE; /* NOTFOUND? */
+     }
+     
+ #if 0
+     /*
+      * Local hack - if the person has a file in their home
+      * directory called ".xlog", read that for a list of
+      * extra cells to authenticate to
+      */
+     
+     if ((pwd = getpwuid(getuid())) != NULL) {
+ 	struct stat sbuf;
+ 	FILE *f;
+ 	char fcell[100], xlog_path[512];
+ 	
+ 	strcpy(xlog_path, pwd->pw_dir);
+ 	strcat(xlog_path, "/.xlog");
+ 	
+ 	if ((stat(xlog_path, &sbuf) == 0) &&
+ 	    ((f = fopen(xlog_path, "r")) != NULL)) {
+ 	    
+ 	    while (fgets(fcell, 100, f) != NULL) {
+ 		int auth_status;
+ 		
+ 		fcell[strlen(fcell) - 1] = '\0';
+ 		
+ 		auth_status = auth_to_cell(context, fcell, NULL);
+ 		if (status == AKLOG_SUCCESS)
+ 		    status = auth_status;
+ 		else
+ 		    status = AKLOG_SOMETHINGSWRONG;
+ 	    }
+ 	}
+     }
+ #endif
+     return AUTH_SUCCESS;
+ }
+ 	
+ static krb5_error_code get_credv5(krb5_context context, 
+ 			char *name, char *inst, char *realm,
+ 			krb5_creds **creds)
+ {
+     krb5_creds increds;
+     krb5_error_code r;
+     static krb5_principal client_principal = 0;
+ 
+     memset((char *)&increds, 0, sizeof(increds));
+     /* instance may be ptr to a null string. Pass null then */
+     if ((r = krb5_build_principal(context, &increds.server,
+                      strlen(realm), realm,
+                      name,
+            (inst && strlen(inst)) ? inst : (void *) NULL,
+                      (void *) NULL))) {
+         return r;
+     }
+ 
+     if (!_krb425_ccache) {
+         r = krb5_cc_default(context, &_krb425_ccache);
+ 	if (r)
+ 	    return r;
+     }
+     if (!client_principal) {
+         r = krb5_cc_get_principal(context, _krb425_ccache, &client_principal);
+ 	if (r)
+ 	    return r;
+     }
+ 
+     increds.client = client_principal;
+     increds.times.endtime = 0;
+ 	/* Ask for DES since that is what V4 understands */
+     get_creds_enctype((&increds)) = ENCTYPE_DES_CBC_CRC;
+ 
+     r = krb5_get_credentials(context, 0, _krb425_ccache, &increds, creds);
+ 
+     return r;
+ }
+ 
+ 
+ static int get_user_realm(krb5_context context, char *realm)
+ {
+     static krb5_principal client_principal = 0;
+     int i;
+ 
+     if (!_krb425_ccache)
+         krb5_cc_default(context, &_krb425_ccache);
+     if (!client_principal)
+         krb5_cc_get_principal(context, _krb425_ccache, &client_principal);
+ 
+     i = realm_len(context, client_principal);
+     if (i > REALM_SZ-1) i = REALM_SZ-1;
+     strncpy(realm,realm_data(context, client_principal), i);
+     realm[i] = 0;
+ 
+     return 0;
+ }
+ 
+ int
+ aklog_chpass(char *userName, char *oldPasswd, char *newPasswd, char **message)
+ {
+     return AUTH_SUCCESS;
+ }
+ 
+ int
+ aklog_passwdexpired(char *userName, char **message)
+ {
+     return AUTH_SUCCESS;
+ }
+ 
+ int
+ aklog_passwdrestrictions(char *userName, char *newPasswd, char *oldPasswd,
+ 		       char **message)
+ {
+     return AUTH_SUCCESS;
+ }
+ 
+ char *
+ aklog_getpasswd(char * userName)
+ {
+     errno = ENOSYS;
+     return NULL;
+ }
+ 
+ 
+ static int get_cellconfig(char *cell, struct afsconf_cell *cellconfig, char *local_cell, char *linkedcell)
+ {
+     int status = 0;
+     struct afsconf_dir *configdir;
+ 
+     memset(local_cell, 0, sizeof(local_cell));
+     memset((char *)cellconfig, 0, sizeof(*cellconfig));
+ 
+     if (!(configdir = afsconf_Open(AFSDIR_CLIENT_ETC_DIRPATH))) {
+ 	return AFSCONF_NODB;
+     }
+ 
+     if (afsconf_GetLocalCell(configdir, local_cell, MAXCELLCHARS)) {
+ 	return AFSCONF_FAILURE;
+     }
+ 
+     if ((cell == NULL) || (cell[0] == 0))
+ 	cell = local_cell;
+ 
+ 	linkedcell[0] = '\0';
+     if (afsconf_GetCellInfo(configdir, cell, NULL, cellconfig)) {
+ 	status = AFSCONF_NOTFOUND;
+     }
+     if (cellconfig->linkedCell) 
+ 	strncpy(linkedcell,cellconfig->linkedCell,MAXCELLCHARS);
+ 
+     (void) afsconf_Close(configdir);
+ 
+     return(status);
+ }
+ 
+ /* 
+  * Log to a cell.  If the cell has already been logged to, return without
+  * doing anything.  Otherwise, log to it and mark that it has been logged
+  * to.
+  */
+ static int auth_to_cell(krb5_context context, char *cell, char *realm)
+ {
+     int status = 0;
+     char username[BUFSIZ];	/* To hold client username structure */
+     afs_int32 viceId;		/* AFS uid of user */
+ 
+     char name[ANAME_SZ];	/* Name of afs key */
+     char primary_instance[INST_SZ];	/* Instance of afs key */
+     char secondary_instance[INST_SZ];	/* Backup instance to try */
+     int try_secondary = 0;		/* Flag to indicate if we try second */
+     char realm_of_user[REALM_SZ]; /* Kerberos realm of user */
+     char realm_of_cell[REALM_SZ]; /* Kerberos realm of cell */
+     char local_cell[MAXCELLCHARS+1];
+     char cell_to_use[MAXCELLCHARS+1]; /* Cell to authenticate to */
+     static char lastcell[MAXCELLCHARS+1] = { 0 };
+     static char confname[512] = { 0 };
+     krb5_creds *v5cred = NULL;
+     struct ktc_principal aserver;
+     struct ktc_principal aclient;
+     struct ktc_token atoken, btoken;
+     int afssetpag = 1;
+ 
+     memset(name, 0, sizeof(name));
+     memset(primary_instance, 0, sizeof(primary_instance));
+     memset(secondary_instance, 0, sizeof(secondary_instance));
+     memset(realm_of_user, 0, sizeof(realm_of_user));
+     memset(realm_of_cell, 0, sizeof(realm_of_cell));
+ 
+     if (confname[0] == '\0') {
+ 	strncpy(confname, AFSDIR_CLIENT_ETC_DIRPATH, sizeof(confname));
+ 	confname[sizeof(confname) - 2] = '\0';
+     }
+ 
+     /* NULL or empty cell returns information on local cell */
+     if ((status = get_cellconfig(cell, &ak_cellconfig,
+ 			 local_cell, linkedcell)))
+ 	return(status);
+ 
+     strncpy(cell_to_use, ak_cellconfig.name, MAXCELLCHARS);
+     cell_to_use[MAXCELLCHARS] = 0;
+ 
+     /*
+      * Find out which realm we're supposed to authenticate to.  If one
+      * is not included, use the kerberos realm found in the credentials
+      * cache.
+      */
+     
+     if (realm && realm[0]) {
+ 	strcpy(realm_of_cell, realm);
+     }
+     else {
+ 	char *afs_realm = afs_realm_of_cell(context, &ak_cellconfig, FALSE);
+ 	
+ 	if (!afs_realm) {
+ 	    return AFSCONF_FAILURE;
+ 	}
+ 	
+ 	strcpy(realm_of_cell, afs_realm);
+     }
+     
+     /* We use the afs.<cellname> convention here... 
+      *
+      * Doug Engert's original code had principals of the form:
+      *
+      * "afsx/cell@realm"
+      *
+      * in the KDC, so the name wouldn't conflict with DFS.  Since we're
+      * not using DFS, I changed it just to look for the following
+      * principals:
+      *
+      * afs/<cell>@<realm>
+      * afs@<realm>
+      *
+      * Because people are transitioning from afs@realm to afs/cell,
+      * we configure things so that if the first one isn't found, we
+      * try the second one.  You can select which one you prefer with
+      * a configure option.
+      */
+     
+     strcpy(name, AFSKEY);
+     
+     if (1 || strcasecmp(cell_to_use, realm_of_cell) != 0) {
+ 	strncpy(primary_instance, cell_to_use, sizeof(primary_instance));
+ 	primary_instance[sizeof(primary_instance)-1] = '\0';
+ 	if (strcasecmp(cell_to_use, realm_of_cell) == 0) {
+ 	    try_secondary = 1;
+ 	    secondary_instance[0] = '\0';
+ 	}
+     } else {
+ 	primary_instance[0] = '\0';
+ 	try_secondary = 1;
+ 	strncpy(secondary_instance, cell_to_use,
+ 		sizeof(secondary_instance));
+ 	secondary_instance[sizeof(secondary_instance)-1] = '\0';
+     }
+     
+     /* 
+      * Extract the session key from the ticket file and hand-frob an
+      * afs style authenticator.
+      */
+     
+     /*
+      * Try to obtain AFS tickets.  Because there are two valid service
+      * names, we will try both, but trying the more specific first.
+      *
+      *	afs/<cell>@<realm> i.e. allow for single name with "."
+      * 	afs@<realm>
+      */
+     
+     status = get_credv5(context, name, primary_instance, realm_of_cell,
+ 			&v5cred);
+     
+     if ((status == KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN || 
+ 	 status == KRB5KRB_ERR_GENERIC) && !realm_of_cell[0]) {
+ 	char *afs_realm = afs_realm_of_cell(context, &ak_cellconfig, TRUE);
+ 	
+ 	if (!afs_realm) {
+ 	    return AFSCONF_FAILURE;
+ 	}
+ 	
+ 	strcpy(realm_of_cell, afs_realm);
+ 	
+ 	if (strcasecmp(cell_to_use, realm_of_cell) == 0) {
+ 	    try_secondary = 1;
+ 	    secondary_instance[0] = '\0';
+ 	}
+ 	
+ 	status = get_credv5(context, name, primary_instance, realm_of_cell,
+ 			    &v5cred);
+ 	
+     }
+     if (status == KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN || 
+ 	status == KRB5KRB_ERR_GENERIC) {
+ 	if (try_secondary)
+ 	    status = get_credv5(context, name, secondary_instance,
+ 				realm_of_cell, &v5cred);
+     }
+     
+     if (status) {
+ 	return status;
+     }
+     
+     strncpy(aserver.name, AFSKEY, MAXKTCNAMELEN - 1);
+     strncpy(aserver.instance, AFSINST, MAXKTCNAMELEN - 1);
+     strncpy(aserver.cell, cell_to_use, MAXKTCREALMLEN - 1);
+     
+     /*
+      * The default is to use rxkad2b, which means we put in a full
+      * V5 ticket.  If the user specifies -524, we talk to the
+      * 524 ticket converter.
+      */
+     
+     {
+ 	char *p;
+ 	int len;
+ 	
+ 	len = min(get_princ_len(context, v5cred->client, 0),
+ 		  second_comp(context, v5cred->client) ?
+ 		  MAXKTCNAMELEN - 2 : MAXKTCNAMELEN - 1);
+ 	strncpy(username, get_princ_str(context, v5cred->client, 0), len);
+ 	username[len] = '\0';
+ 	
+ 	if (second_comp(context, v5cred->client)) {
+ 	    strcat(username, ".");
+ 	    p = username + strlen(username);
+ 	    len = min(get_princ_len(context, v5cred->client, 1),
+ 		      MAXKTCNAMELEN - strlen(username) - 1);
+ 	    strncpy(p, get_princ_str(context, v5cred->client, 1), len);
+ 	    p[len] = '\0';
+ 	}
+ 	
+ 	memset(&atoken, 0, sizeof(atoken));
+ 	atoken.kvno = RXKAD_TKT_TYPE_KERBEROS_V5;
+ 	atoken.startTime = v5cred->times.starttime;;
+ 	atoken.endTime = v5cred->times.endtime;
+ 	memcpy(&atoken.sessionKey, get_cred_keydata(v5cred),
+ 	       get_cred_keylen(v5cred));
+ 	atoken.ticketLen = v5cred->ticket.length;
+ 	memcpy(atoken.ticket, v5cred->ticket.data, atoken.ticketLen);
+     }
+ 	
+     if ((status = get_user_realm(context, realm_of_user))) {
+ 	return KRB5_REALM_UNKNOWN;
+     }
+     if (strcmp(realm_of_user, realm_of_cell)) {
+ 	strcat(username, "@");
+ 	strcat(username, realm_of_user);
+     }
+     
+     strcpy(lastcell, aserver.cell);
+     
+     if (!pr_Initialize (0, confname, aserver.cell))
+ 	status = pr_SNameToId (username, &viceId);
+     
+     /*
+      * This is a crock, but it is Transarc's crock, so
+      * we have to play along in order to get the
+      * functionality.  The way the afs id is stored is
+      * as a string in the username field of the token.
+      * Contrary to what you may think by looking at
+      * the code for tokens, this hack (AFS ID %d) will
+      * not work if you change %d to something else.
+      */
+     
+     /* Reset the "aclient" structure before we call ktc_SetToken.
+      * This structure was first set by the ktc_GetToken call when
+      * we were comparing whether identical tokens already existed.
+      */
+     strncpy(aclient.name, username, MAXKTCNAMELEN - 1);
+     strcpy(aclient.instance, "");
+     strncpy(aclient.cell, realm_of_user, MAXKTCREALMLEN - 1);
+     
+     /* on AIX 4.1.4 with AFS 3.4a+ if a write is not done before 
+      * this routine, it will not add the token. It is not clear what 
+      * is going on here! So we will do the following operation
+      */
+     write(2,"",0); /* dummy write */
+     status = ktc_SetToken(&aserver, &atoken, &aclient, afssetpag);
+ 
+     return(status);
+ }
+ 
+ int
+ aklog_initialize(struct secmethod_table *meths)
+ {
+     memset(meths, 0, sizeof(struct secmethod_table));
+ 
+     /*
+      * Initialize the exported interface routines.
+      * Aside from method_authenticate, these are just no-ops.
+      */
+     meths->method_chpass = aklog_chpass;
+     meths->method_authenticate = aklog_authenticate;
+     meths->method_passwdexpired = aklog_passwdexpired;
+     meths->method_passwdrestrictions = aklog_passwdrestrictions;
+     meths->method_getpasswd = aklog_getpasswd;
+ 
+     return (0);
+ }
+ #endif /* AFS_AIX51_ENV */
Index: openafs/src/update/client.c
diff -c openafs/src/update/client.c:1.12 openafs/src/update/client.c:1.12.2.1
*** openafs/src/update/client.c:1.12	Wed Jun 23 10:27:46 2004
--- openafs/src/update/client.c	Tue Apr 10 14:43:46 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/update/client.c,v 1.12 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/client.c,v 1.12.2.1 2007/04/10 18:43:46 shadow Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
***************
*** 218,224 ****
      errcode = rx_Init(0);
      if (errcode) {
  	printf("Rx initialize failed \n");
! 	com_err(whoami, errcode, "calling Rx init");
  	exit(1);
      }
  
--- 218,224 ----
      errcode = rx_Init(0);
      if (errcode) {
  	printf("Rx initialize failed \n");
! 	afs_com_err(whoami, errcode, "calling Rx init");
  	exit(1);
      }
  
***************
*** 238,244 ****
  	exit(1);
      }
      if (errcode) {
! 	com_err(whoami, errcode, "Couldn't get security obect for localAuth");
  	exit(1);
      }
  
--- 238,244 ----
  	exit(1);
      }
      if (errcode) {
! 	afs_com_err(whoami, errcode, "Couldn't get security obect for localAuth");
  	exit(1);
      }
  
***************
*** 260,266 ****
  
  	    /* construct local path from canonical (wire-format) path */
  	    if ((errcode = ConstructLocalPath(df->name, "/", &curDir))) {
! 		com_err(whoami, errcode, "Unable to construct local path");
  		return errcode;
  	    }
  
--- 260,266 ----
  
  	    /* construct local path from canonical (wire-format) path */
  	    if ((errcode = ConstructLocalPath(df->name, "/", &curDir))) {
! 		afs_com_err(whoami, errcode, "Unable to construct local path");
  		return errcode;
  	    }
  
***************
*** 271,277 ****
  #else
  		if (mkdir(curDir, 0700) < 0) {
  #endif
! 		    com_err(whoami, errno, "can't create dir");
  		    printf("upclient: Can't update dir %s\n", curDir);
  		    return -1;
  		}
--- 271,277 ----
  #else
  		if (mkdir(curDir, 0700) < 0) {
  #endif
! 		    afs_com_err(whoami, errno, "can't create dir");
  		    printf("upclient: Can't update dir %s\n", curDir);
  		    return -1;
  		}
***************
*** 290,303 ****
  	    error = rx_EndCall(call, 0);
  	    if (error && !errcode) {
  		printf("could not end rx call \n");
! 		com_err(whoami, error, "calling EndCall");
  		goto fail;
  	    }
  	    if (errcode) {
  		printf
  		    ("warning: could not fetch the contents of directory %s \n",
  		     df->name);
! 		com_err(whoami, errcode, "calling FetchFile");
  		cnt++;
  		goto fail;
  	    }
--- 290,303 ----
  	    error = rx_EndCall(call, 0);
  	    if (error && !errcode) {
  		printf("could not end rx call \n");
! 		afs_com_err(whoami, error, "calling EndCall");
  		goto fail;
  	    }
  	    if (errcode) {
  		printf
  		    ("warning: could not fetch the contents of directory %s \n",
  		     df->name);
! 		afs_com_err(whoami, errcode, "calling FetchFile");
  		cnt++;
  		goto fail;
  	    }
***************
*** 305,311 ****
  	    stream = fopen(dirbuf, "r");
  	    if (stream == NULL) {
  		printf("fopen failed on %s \n", dirbuf);
! 		com_err(whoami, errno, "fopen");
  		goto fail;
  	    }
  	    umask(00);
--- 305,311 ----
  	    stream = fopen(dirbuf, "r");
  	    if (stream == NULL) {
  		printf("fopen failed on %s \n", dirbuf);
! 		afs_com_err(whoami, errno, "fopen");
  		goto fail;
  	    }
  	    umask(00);
***************
*** 354,360 ****
  
  		dirp = opendir(curDir);
  		if (dirp == 0) {
! 		    com_err(whoami, errno, "Can't open local dir %s", curDir);
  		    goto fail;
  		}
  
--- 354,360 ----
  
  		dirp = opendir(curDir);
  		if (dirp == 0) {
! 		    afs_com_err(whoami, errno, "Can't open local dir %s", curDir);
  		    goto fail;
  		}
  
***************
*** 373,379 ****
  			errcode = unlink(filename);
  			if (errcode) {
  			    printf("could not delete file %s \n", filename);
! 			    com_err(whoami, errno, "could not delete file %s",
  				    filename);
  			}
  		    }
--- 373,379 ----
  			errcode = unlink(filename);
  			if (errcode) {
  			    printf("could not delete file %s \n", filename);
! 			    afs_com_err(whoami, errno, "could not delete file %s",
  				    filename);
  			}
  		    }
***************
*** 415,421 ****
  
      /* construct a local path from canonical (wire-format) path */
      if ((error = ConstructLocalPath(filename, "/", &localname))) {
! 	com_err(whoami, error, "Unable to construct local path");
  	return error;
      }
  
--- 415,421 ----
  
      /* construct a local path from canonical (wire-format) path */
      if ((error = ConstructLocalPath(filename, "/", &localname))) {
! 	afs_com_err(whoami, error, "Unable to construct local path");
  	return error;
      }
  
***************
*** 448,459 ****
      fd = open(localFile, O_CREAT | O_TRUNC | O_WRONLY, 0666);
      if (fd < 0) {
  	printf("Could not create %s\n", localFile);
! 	com_err(whoami, errno, "Could not create %s", localFile);
  	error = UPDATE_ERROR;
  	return error;
      }
      if (fstat(fd, &status) < 0) {
! 	com_err(whoami, errno, "Could not stat %s", localFile);
  	close(fd);
  	printf("could not stast %s\n", localFile);
  	return UPDATE_ERROR;
--- 448,459 ----
      fd = open(localFile, O_CREAT | O_TRUNC | O_WRONLY, 0666);
      if (fd < 0) {
  	printf("Could not create %s\n", localFile);
! 	afs_com_err(whoami, errno, "Could not create %s", localFile);
  	error = UPDATE_ERROR;
  	return error;
      }
      if (fstat(fd, &status) < 0) {
! 	afs_com_err(whoami, errno, "Could not stat %s", localFile);
  	close(fd);
  	printf("could not stast %s\n", localFile);
  	return UPDATE_ERROR;
***************
*** 503,509 ****
  	if (!nbytes)
  	    error = UPDATE_ERROR;
  	if (write(fd, buffer, nbytes) != nbytes) {
! 	    com_err(whoami, errno, "File system write failed!");
  	    printf("File system write failed!\n");
  	    error = UPDATE_ERROR;
  	}
--- 503,509 ----
  	if (!nbytes)
  	    error = UPDATE_ERROR;
  	if (write(fd, buffer, nbytes) != nbytes) {
! 	    afs_com_err(whoami, errno, "File system write failed!");
  	    printf("File system write failed!\n");
  	    error = UPDATE_ERROR;
  	}
***************
*** 586,592 ****
      for (tf = okhostfiles; tf; tf = tf->next) {
  	/* construct local path from canonical (wire-format) path */
  	if ((rc = ConstructLocalPath(tf->name, "/", &hostfile))) {
! 	    com_err(whoami, rc, "Unable to construct local path");
  	    return -1;
  	}
  	if (PathsAreEquivalent(hostfile, filename)) {
--- 586,592 ----
      for (tf = okhostfiles; tf; tf = tf->next) {
  	/* construct local path from canonical (wire-format) path */
  	if ((rc = ConstructLocalPath(tf->name, "/", &hostfile))) {
! 	    afs_com_err(whoami, rc, "Unable to construct local path");
  	    return -1;
  	}
  	if (PathsAreEquivalent(hostfile, filename)) {
***************
*** 613,619 ****
      for (tf = modFiles; tf; tf = tf->next) {
  	/* construct local path from canonical (wire-format) path */
  	if ((errcode = ConstructLocalPath(tf->name, "/", &fname))) {
! 	    com_err(whoami, errcode, "Unable to construct local path");
  	    return errcode;
  	}
  	strcpy(newname, fname);
--- 613,619 ----
      for (tf = modFiles; tf; tf = tf->next) {
  	/* construct local path from canonical (wire-format) path */
  	if ((errcode = ConstructLocalPath(tf->name, "/", &fname))) {
! 	    afs_com_err(whoami, errcode, "Unable to construct local path");
  	    return errcode;
  	}
  	strcpy(newname, fname);
***************
*** 623,629 ****
  	errcode = renamefile(newname, fname);
  	if (errcode) {
  	    printf("could not rename %s to %s\n", newname, fname);
! 	    com_err(whoami, errno, "could not rename %s to %s", newname,
  		    fname);
  	}
  	free(fname);
--- 623,629 ----
  	errcode = renamefile(newname, fname);
  	if (errcode) {
  	    printf("could not rename %s to %s\n", newname, fname);
! 	    afs_com_err(whoami, errno, "could not rename %s to %s", newname,
  		    fname);
  	}
  	free(fname);
***************
*** 664,670 ****
      /* construct local path from canonical (wire-format) path */
      errcode = ConstructLocalPath(filename, "/", &lfile);
      if (errcode) {
! 	com_err(whoami, errcode, "Unable to construct local path");
  	return -1;
      }
      strcpy(newfile, lfile);
--- 664,670 ----
      /* construct local path from canonical (wire-format) path */
      errcode = ConstructLocalPath(filename, "/", &lfile);
      if (errcode) {
! 	afs_com_err(whoami, errcode, "Unable to construct local path");
  	return -1;
      }
      strcpy(newfile, lfile);
***************
*** 681,687 ****
  
      if (errcode) {
  	printf("failed to fetch file %s \n", filename);
! 	com_err(whoami, errcode, "fetching file");
  	return 1;
      }
  
--- 681,687 ----
  
      if (errcode) {
  	printf("failed to fetch file %s \n", filename);
! 	afs_com_err(whoami, errcode, "fetching file");
  	return 1;
      }
  
***************
*** 690,696 ****
      if (errcode) {
  	printf("could not change protection on %s to %u\n", newfile,
  	       (unsigned int)mode);
! 	com_err(whoami, errno, "could not change protection on %s to %u",
  		newfile, mode);
  	return 1;
      }
--- 690,696 ----
      if (errcode) {
  	printf("could not change protection on %s to %u\n", newfile,
  	       (unsigned int)mode);
! 	afs_com_err(whoami, errno, "could not change protection on %s to %u",
  		newfile, mode);
  	return 1;
      }
***************
*** 703,709 ****
      if (errcode) {
  	printf("warning: could not change uid and gid on %s to %u and %u \n",
  	       newfile, gid, uid);
! 	com_err(whoami, errno,
  		"warning: could not change uid and gid on %s to %u and %u",
  		newfile, gid, uid);
      }
--- 703,709 ----
      if (errcode) {
  	printf("warning: could not change uid and gid on %s to %u and %u \n",
  	       newfile, gid, uid);
! 	afs_com_err(whoami, errno,
  		"warning: could not change uid and gid on %s to %u and %u",
  		newfile, gid, uid);
      }
***************
*** 716,722 ****
      if (errcode) {
  	printf("could not change access and modify times on %s to %u %u\n",
  	       newfile, (unsigned int)atime, (unsigned int)mtime);
! 	com_err(whoami, errno,
  		"could not change access and modify times on %s to %u %u",
  		newfile, atime, mtime);
  	return 1;
--- 716,722 ----
      if (errcode) {
  	printf("could not change access and modify times on %s to %u %u\n",
  	       newfile, (unsigned int)atime, (unsigned int)mtime);
! 	afs_com_err(whoami, errno,
  		"could not change access and modify times on %s to %u %u",
  		newfile, atime, mtime);
  	return 1;
Index: openafs/src/update/server.c
diff -c openafs/src/update/server.c:1.13.2.2 openafs/src/update/server.c:1.13.2.3
*** openafs/src/update/server.c:1.13.2.2	Tue Jun 20 16:35:01 2006
--- openafs/src/update/server.c	Tue Apr 10 14:43:46 2007
***************
*** 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
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/update/server.c,v 1.13.2.3 2007/04/10 18:43:46 shadow Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
***************
*** 50,55 ****
--- 50,56 ----
  #include <afs/cellconfig.h>
  #include <afs/afsutil.h>
  #include <afs/fileutil.h>
+ #include <afs/com_err.h>
  #ifdef	AFS_AIX_ENV
  #include <sys/statfs.h>
  #endif
***************
*** 352,358 ****
  
      /* construct a local path from a canonical (wire-format) path */
      if ((error = ConstructLocalPath(name, "/", &reqObject))) {
! 	com_err(whoami, error, "Unable to construct local path");
  	return UPDATE_ERROR;
      }
  
--- 353,359 ----
  
      /* construct a local path from a canonical (wire-format) path */
      if ((error = ConstructLocalPath(name, "/", &reqObject))) {
! 	afs_com_err(whoami, error, "Unable to construct local path");
  	return UPDATE_ERROR;
      }
  
***************
*** 384,390 ****
  
      /* construct a local path from a canonical (wire-format) path */
      if ((error = ConstructLocalPath(name, "/", &reqObject))) {
! 	com_err(whoami, error, "Unable to construct local path");
  	return UPDATE_ERROR;
      }
  
--- 385,391 ----
  
      /* construct a local path from a canonical (wire-format) path */
      if ((error = ConstructLocalPath(name, "/", &reqObject))) {
! 	afs_com_err(whoami, error, "Unable to construct local path");
  	return UPDATE_ERROR;
      }
  
***************
*** 559,572 ****
  
      /* construct a local path from a canonical (wire-format) path */
      if ((error = ConstructLocalPath(dir, "/", expPath))) {
! 	com_err(whoami, error, "Unable to construct local path");
  	return error;
      }
  
      /* stat the object */
      error = stat(*expPath, &statbuf);
      if (error) {
! 	com_err(whoami, error, ";Can't stat object.");
  	return error;
      }
      /* now check if the object has an exportable (file/dir)  type */
--- 560,573 ----
  
      /* construct a local path from a canonical (wire-format) path */
      if ((error = ConstructLocalPath(dir, "/", expPath))) {
! 	afs_com_err(whoami, error, "Unable to construct local path");
  	return error;
      }
  
      /* stat the object */
      error = stat(*expPath, &statbuf);
      if (error) {
! 	afs_com_err(whoami, error, ";Can't stat object.");
  	return error;
      }
      /* now check if the object has an exportable (file/dir)  type */
Index: openafs/src/uss/uss_acl.c
diff -c openafs/src/uss/uss_acl.c:1.6 openafs/src/uss/uss_acl.c:1.6.2.1
*** openafs/src/uss/uss_acl.c:1.6	Tue Jul 15 19:17:12 2003
--- openafs/src/uss/uss_acl.c	Tue Apr 10 14:43:46 2007
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_acl.c,v 1.6 2003/07/15 23:17:12 shadow Exp $");
  
  #include "uss_acl.h"
  #include "uss_common.h"
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_acl.c,v 1.6.2.1 2007/04/10 18:43:46 shadow Exp $");
  
  #include "uss_acl.h"
  #include "uss_common.h"
***************
*** 604,610 ****
       */
      code = uss_fs_GetACL(path_field, tmp_str, MAXSIZE);
      if (code) {
! 	com_err(uss_whoami, code, "while getting access list for %s",
  		path_field);
  #ifdef USS_ACL_DB
  	printf("%s: Error code from uss_fs_GetACL %d, errno %d\n", rn, code,
--- 604,610 ----
       */
      code = uss_fs_GetACL(path_field, tmp_str, MAXSIZE);
      if (code) {
! 	afs_com_err(uss_whoami, code, "while getting access list for %s",
  		path_field);
  #ifdef USS_ACL_DB
  	printf("%s: Error code from uss_fs_GetACL %d, errno %d\n", rn, code,
***************
*** 674,680 ****
  	    printf("\t3. Non-existent user or group on ACL.\n");
  	    return (code);
  	} else {
! 	    com_err(uss_whoami, code, "while setting the access list");
  	    return (code);
  	}
      }
--- 674,680 ----
  	    printf("\t3. Non-existent user or group on ACL.\n");
  	    return (code);
  	} else {
! 	    afs_com_err(uss_whoami, code, "while setting the access list");
  	    return (code);
  	}
      }
***************
*** 724,730 ****
  
      code = uss_fs_SetVolStat(a_path, tmp_str, sizeof(*status) + 3);
      if (code) {
! 	com_err(uss_whoami, code, "while setting disk quota");
  #ifdef USS_ACL_DB
  	printf("%s: uss_fs_SetVolStat() error code: %d, errno is %d\n", rn,
  	       code, errno);
--- 724,730 ----
  
      code = uss_fs_SetVolStat(a_path, tmp_str, sizeof(*status) + 3);
      if (code) {
! 	afs_com_err(uss_whoami, code, "while setting disk quota");
  #ifdef USS_ACL_DB
  	printf("%s: uss_fs_SetVolStat() error code: %d, errno is %d\n", rn,
  	       code, errno);
Index: openafs/src/uss/uss_kauth.c
diff -c openafs/src/uss/uss_kauth.c:1.10 openafs/src/uss/uss_kauth.c:1.10.2.1
*** openafs/src/uss/uss_kauth.c:1.10	Mon Mar 15 13:51:04 2004
--- openafs/src/uss/uss_kauth.c	Tue Apr 10 14:43:46 2007
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_kauth.c,v 1.10 2004/03/15 18:51:04 shadow Exp $");
  
  #include "uss_kauth.h"		/*Module interface */
  #include "uss_common.h"		/*Common defs & operations */
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_kauth.c,v 1.10.2.1 2007/04/10 18:43:46 shadow Exp $");
  
  #include "uss_kauth.h"		/*Module interface */
  #include "uss_common.h"		/*Common defs & operations */
***************
*** 205,211 ****
  				       sizeof(longPassBuff),	/*Size of above */
  				       &reasonString);
  	    if (code) {
! 		com_err(uss_whoami, code, "while getting password ");
  #ifdef USS_KAUTH_DB
  		printf("%s: Error code from ka_UserReadPassword(): %d\n", rn,
  		       code);
--- 205,211 ----
  				       sizeof(longPassBuff),	/*Size of above */
  				       &reasonString);
  	    if (code) {
! 		afs_com_err(uss_whoami, code, "while getting password ");
  #ifdef USS_KAUTH_DB
  		printf("%s: Error code from ka_UserReadPassword(): %d\n", rn,
  		       code);
***************
*** 226,232 ****
  		 * to truncate the password to generate the appropriate
  		 * key.
  		 */
! 		com_err(uss_whoami, code,
  			"while getting administrator token (trying shortened password next...)");
  #ifdef USS_KAUTH_DB
  		printf("%s: Error code from ka_GetAdminToken: %d\n", rn,
--- 226,232 ----
  		 * to truncate the password to generate the appropriate
  		 * key.
  		 */
! 		afs_com_err(uss_whoami, code,
  			"while getting administrator token (trying shortened password next...)");
  #ifdef USS_KAUTH_DB
  		printf("%s: Error code from ka_GetAdminToken: %d\n", rn,
***************
*** 240,246 ****
  				     uss_Cell, &key, 24 * 60 * 60, &token,
  				     0 /*new */ );
  		if (code) {
! 		    com_err(uss_whoami, code,
  			    "while getting administrator token (possibly wrong password, or not an administrative account)");
  #ifdef USS_KAUTH_DB
  		    printf("%s: Error code from ka_GetAdminToken: %d\n", rn,
--- 240,246 ----
  				     uss_Cell, &key, 24 * 60 * 60, &token,
  				     0 /*new */ );
  		if (code) {
! 		    afs_com_err(uss_whoami, code,
  			    "while getting administrator token (possibly wrong password, or not an administrative account)");
  #ifdef USS_KAUTH_DB
  		    printf("%s: Error code from ka_GetAdminToken: %d\n", rn,
***************
*** 262,268 ****
  		 * We failed to get an admin token, but the password is
  		 * of a reasonable length, so we're just hosed.
  		 */
! 		com_err(uss_whoami, code,
  			"while getting administrator token (possibly wrong password, or not an administrative account)");
  #ifdef USS_KAUTH_DB
  		printf("%s: Error code from ka_GetAdminToken: %d\n", rn,
--- 262,268 ----
  		 * We failed to get an admin token, but the password is
  		 * of a reasonable length, so we're just hosed.
  		 */
! 		afs_com_err(uss_whoami, code,
  			"while getting administrator token (possibly wrong password, or not an administrative account)");
  #ifdef USS_KAUTH_DB
  		printf("%s: Error code from ka_GetAdminToken: %d\n", rn,
***************
*** 291,297 ****
  	ka_AuthServerConn(uss_Cell, KA_MAINTENANCE_SERVICE, &token,
  			  &uconn_kauthP);
      if (code) {
! 	com_err(uss_whoami, code,
  		"while establishing Authentication Server connection");
  #ifdef USS_KAUTH_DB
  	printf("%s: Error code from ka_AuthServerConn: %d\n", rn, code);
--- 291,297 ----
  	ka_AuthServerConn(uss_Cell, KA_MAINTENANCE_SERVICE, &token,
  			  &uconn_kauthP);
      if (code) {
! 	afs_com_err(uss_whoami, code,
  		"while establishing Authentication Server connection");
  #ifdef USS_KAUTH_DB
  	printf("%s: Error code from ka_AuthServerConn: %d\n", rn, code);
***************
*** 399,405 ****
  			    "%s: Warning: User '%s' already in Authentication DB\n",
  			    uss_whoami, a_user);
  	    } else {
! 		com_err(uss_whoami, code,
  			"while adding user '%s' to Authentication DB",
  			a_user);
  #ifdef USS_KAUTH_DB
--- 399,405 ----
  			    "%s: Warning: User '%s' already in Authentication DB\n",
  			    uss_whoami, a_user);
  	    } else {
! 		afs_com_err(uss_whoami, code,
  			"while adding user '%s' to Authentication DB",
  			a_user);
  #ifdef USS_KAUTH_DB
***************
*** 481,487 ****
  			 uss_whoami, a_user);
  		return (0);
  	    } else {
! 		com_err(uss_whoami, code,
  			"while deleting entry in Authentication DB\n");
  #ifdef USS_KAUTH_DB
  		printf("%s: Error code from KAM_DeleteUser: %d\n", rn, code);
--- 481,487 ----
  			 uss_whoami, a_user);
  		return (0);
  	    } else {
! 		afs_com_err(uss_whoami, code,
  			"while deleting entry in Authentication DB\n");
  #ifdef USS_KAUTH_DB
  		printf("%s: Error code from KAM_DeleteUser: %d\n", rn, code);
***************
*** 712,718 ****
  		    "Must specify one of the optional parameters. Continuing...\n");
  
  	if (code) {
! 	    com_err(uss_whoami, code, "calling KAM_SetFields for %s.%s",
  		    username, instance);
  
  	    return (code);
--- 712,718 ----
  		    "Must specify one of the optional parameters. Continuing...\n");
  
  	if (code) {
! 	    afs_com_err(uss_whoami, code, "calling KAM_SetFields for %s.%s",
  		    username, instance);
  
  	    return (code);
Index: openafs/src/uss/uss_ptserver.c
diff -c openafs/src/uss/uss_ptserver.c:1.7 openafs/src/uss/uss_ptserver.c:1.7.2.1
*** openafs/src/uss/uss_ptserver.c:1.7	Tue Jul 15 19:17:12 2003
--- openafs/src/uss/uss_ptserver.c	Tue Apr 10 14:43:46 2007
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_ptserver.c,v 1.7 2003/07/15 23:17:12 shadow Exp $");
  
  #include "uss_ptserver.h"	/*Module interface */
  #include <afs/ptclient.h>	/*Protection Server client interface */
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_ptserver.c,v 1.7.2.1 2007/04/10 18:43:46 shadow Exp $");
  
  #include "uss_ptserver.h"	/*Module interface */
  #include <afs/ptclient.h>	/*Protection Server client interface */
***************
*** 90,96 ****
  			 uss_ConfDir,	/*Config directory */
  			 uss_Cell);	/*Cell to touch */
      if (code) {
! 	com_err(uss_whoami, code,
  		"while initializing Protection Server library");
  	return (code);
      }
--- 90,96 ----
  			 uss_ConfDir,	/*Config directory */
  			 uss_Cell);	/*Cell to touch */
      if (code) {
! 	afs_com_err(uss_whoami, code,
  		"while initializing Protection Server library");
  	return (code);
      }
***************
*** 176,182 ****
  	     */
  	    mappedUserID = id;
  	    if (code = pr_SNameToId(a_user, &mappedUserID)) {
! 		com_err(uss_whoami, code,
  			"while getting uid from Protection Server");
  		return (code);
  	    }
--- 176,182 ----
  	     */
  	    mappedUserID = id;
  	    if (code = pr_SNameToId(a_user, &mappedUserID)) {
! 		afs_com_err(uss_whoami, code,
  			"while getting uid from Protection Server");
  		return (code);
  	    }
***************
*** 198,204 ****
  	    /*
  	     * Got a fatal error.
  	     */
! 	    com_err(uss_whoami, code, "while accessing Protection Server");
  	    return (code);
  	}
      }
--- 198,204 ----
  	    /*
  	     * Got a fatal error.
  	     */
! 	    afs_com_err(uss_whoami, code, "while accessing Protection Server");
  	    return (code);
  	}
      }
***************
*** 268,274 ****
  		    uss_whoami, a_name);
  	} /*User not registered */
  	else {
! 	    com_err(uss_whoami, code,
  		    "while deleting user from Protection DB");
  	    return (code);
  	}			/*Fatal PTS error */
--- 268,274 ----
  		    uss_whoami, a_name);
  	} /*User not registered */
  	else {
! 	    afs_com_err(uss_whoami, code,
  		    "while deleting user from Protection DB");
  	    return (code);
  	}			/*Fatal PTS error */
***************
*** 326,332 ****
      *a_uidP = 0;
      code = pr_SNameToId(a_user, a_uidP);
      if (code) {
! 	com_err(uss_whoami, code, "while getting uid from Protection DB");
  	return (code);
      }
      if (*a_uidP == ANONYMOUSID) {
--- 326,332 ----
      *a_uidP = 0;
      code = pr_SNameToId(a_user, a_uidP);
      if (code) {
! 	afs_com_err(uss_whoami, code, "while getting uid from Protection DB");
  	return (code);
      }
      if (*a_uidP == ANONYMOUSID) {
Index: openafs/src/uss/uss_vol.c
diff -c openafs/src/uss/uss_vol.c:1.10 openafs/src/uss/uss_vol.c:1.10.2.1
*** openafs/src/uss/uss_vol.c:1.10	Tue Jul 15 19:17:12 2003
--- openafs/src/uss/uss_vol.c	Tue Apr 10 14:43:46 2007
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_vol.c,v 1.10 2003/07/15 23:17:12 shadow Exp $");
  
  #include "uss_vol.h"		/*Interface to this module */
  #include "uss_common.h"		/*Common definitions */
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/uss/uss_vol.c,v 1.10.2.1 2007/04/10 18:43:46 shadow Exp $");
  
  #include "uss_vol.h"		/*Interface to this module */
  #include "uss_common.h"		/*Common definitions */
***************
*** 740,746 ****
      if (!initDone) {
  	code = InitThisModule(NoAuthFlag, uss_ConfDir, uss_Cell);
  	if (code) {
! 	    com_err(uss_whoami, code,
  		    "while inititializing VLDB connection(s)\n");
  	    return (code);
  	}
--- 740,746 ----
      if (!initDone) {
  	code = InitThisModule(NoAuthFlag, uss_ConfDir, uss_Cell);
  	if (code) {
! 	    afs_com_err(uss_whoami, code,
  		    "while inititializing VLDB connection(s)\n");
  	    return (code);
  	}
Index: openafs/src/venus/cmdebug.c
diff -c openafs/src/venus/cmdebug.c:1.15.2.5 openafs/src/venus/cmdebug.c:1.15.2.6
*** openafs/src/venus/cmdebug.c:1.15.2.5	Mon Jun 26 12:19:06 2006
--- openafs/src/venus/cmdebug.c	Tue Apr 10 14:43:46 2007
***************
*** 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>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/cmdebug.c,v 1.15.2.6 2007/04/10 18:43:46 shadow Exp $");
  
  
  #include <sys/types.h>
***************
*** 57,63 ****
      code = RXAFSCB_GetCacheConfig(aconn, 1, &srv_ver, &conflen, &c);
      if (code) {
  	printf("cmdebug: error checking cache config: %s\n",
! 	       error_message(code));
  	return 0;
      }
  
--- 57,63 ----
      code = RXAFSCB_GetCacheConfig(aconn, 1, &srv_ver, &conflen, &c);
      if (code) {
  	printf("cmdebug: error checking cache config: %s\n",
! 	       afs_error_message(code));
  	return 0;
      }
  
***************
*** 112,118 ****
          code = RXAFSCB_WhoAreYou(aconn, &addr);
      if (code) {
  	printf("cmdebug: error checking interfaces: %s\n",
! 	       error_message(code));
  	return 0;
      }
  
--- 112,118 ----
          code = RXAFSCB_WhoAreYou(aconn, &addr);
      if (code) {
  	printf("cmdebug: error checking interfaces: %s\n",
! 	       afs_error_message(code));
  	return 0;
      }
  
***************
*** 203,209 ****
  		break;
  	    /* otherwise we have an unrecognized error */
  	    printf("cmdebug: error checking locks: %s\n",
! 		   error_message(code));
  	    return code;
  	}
  	/* here we have the lock information, so display it, perhaps */
--- 203,209 ----
  		break;
  	    /* otherwise we have an unrecognized error */
  	    printf("cmdebug: error checking locks: %s\n",
! 		   afs_error_message(code));
  	    return code;
  	}
  	/* here we have the lock information, so display it, perhaps */
***************
*** 274,280 ****
  	    if (code == 1)
  		break;
  	    printf("cmdebug: failed to get cache entry %d (%s)\n", i,
! 		   error_message(code));
  	    return code;
  	}
  
--- 274,280 ----
  	    if (code == 1)
  		break;
  	    printf("cmdebug: failed to get cache entry %d (%s)\n", i,
! 		   afs_error_message(code));
  	    return code;
  	}
  
***************
*** 366,372 ****
  	    if (code == 1)
  		break;
  	    printf("cmdebug: failed to get cache entry %d (%s)\n", i,
! 		   error_message(code));
  	    return code;
  	}
  
--- 366,372 ----
  	    if (code == 1)
  		break;
  	    printf("cmdebug: failed to get cache entry %d (%s)\n", i,
! 		   afs_error_message(code));
  	    return code;
  	}
  
Index: openafs/src/venus/fs.c
diff -c openafs/src/venus/fs.c:1.24.2.5 openafs/src/venus/fs.c:1.24.2.7
*** openafs/src/venus/fs.c:1.24.2.5	Mon Jul 31 13:07:52 2006
--- openafs/src/venus/fs.c	Tue Jun 12 15:20:21 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/fs.c,v 1.24.2.5 2006/07/31 17:07:52 shadow Exp $");
  
  #include <afs/afs_args.h>
  #include <rx/xdr.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/fs.c,v 1.24.2.7 2007/06/12 19:20:21 shadow Exp $");
  
  #include <afs/afs_args.h>
  #include <rx/xdr.h>
***************
*** 69,75 ****
  static struct ubik_client *uclient;
  
  static int GetClientAddrsCmd(), SetClientAddrsCmd(), FlushMountCmd();
! static int RxStatProcCmd(), RxStatPeerCmd(), GetFidCmd();
  
  extern char *hostutil_GetNameByINet();
  extern struct hostent *hostutil_GetHostByName();
--- 69,75 ----
  static struct ubik_client *uclient;
  
  static int GetClientAddrsCmd(), SetClientAddrsCmd(), FlushMountCmd();
! static int RxStatProcCmd(), RxStatPeerCmd(), GetFidCmd(), NewUuidCmd();
  
  extern char *hostutil_GetNameByINet();
  extern struct hostent *hostutil_GetHostByName();
***************
*** 1245,1250 ****
--- 1245,1268 ----
  }
  
  static int
+ NewUuidCmd(struct cmd_syndesc *as, char *arock)
+ {
+     afs_int32 code;
+     struct ViceIoctl blob;
+ 
+     blob.in_size = 0;
+     blob.out_size = 0;
+     code = pioctl(0, VIOC_NEWUUID, &blob, 1);
+     if (code) {
+ 	Die(errno, 0);
+ 	return 1;
+     }
+ 
+     printf("New uuid generated.\n");
+     return 0;
+ }
+ 
+ static int
  FlushCmd(struct cmd_syndesc *as, char *arock)
  {
      afs_int32 code;
***************
*** 3442,3447 ****
--- 3460,3468 ----
  			  "get fid for file(s)");
      cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
  
+     ts = cmd_CreateSyntax("newuuid", NewUuidCmd, 0,
+ 			  "force a new uuid");
+ 
      code = cmd_Dispatch(argc, argv);
      if (rxInitDone)
  	rx_Finalize();
***************
*** 3487,3493 ****
  	    fprintf(stderr, "%s:'%s'", pn, filename);
  	else
  	    fprintf(stderr, "%s", pn);
! 	fprintf(stderr, ": %s\n", error_message(errnum));
  	break;
      }
  }
--- 3508,3514 ----
  	    fprintf(stderr, "%s:'%s'", pn, filename);
  	else
  	    fprintf(stderr, "%s", pn);
! 	fprintf(stderr, ": %s\n", afs_error_message(errnum));
  	break;
      }
  }
Index: openafs/src/venus/kdump.c
diff -c openafs/src/venus/kdump.c:1.33.2.6 openafs/src/venus/kdump.c:1.33.2.7
*** openafs/src/venus/kdump.c:1.33.2.6	Wed Aug  2 15:07:05 2006
--- openafs/src/venus/kdump.c	Tue Mar 20 15:24:12 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/kdump.c,v 1.33.2.6 2006/08/02 19:07:05 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/kdump.c,v 1.33.2.7 2007/03/20 19:24:12 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
***************
*** 2515,2529 ****
       struct nfsclientpag *ep, *ptr;
  {
      char sysname[100];
  
-     if (ep->sysname) {
- 	kread(kmem, (off_t) ep->sysname, sysname, (KDUMP_SIZE_T) 30);
- 	Sum_nfssysnames += MAXSYSNAME;
-     }
      if (pnt)
! 	printf("%lx: uid=%d, host=%x, pag=%x, @sys=%s, lastt=%d, ref=%d\n",
  	       ptr, ep->uid, ep->host, ep->pag,
! 	       (ep->sysname ? sysname : "nil"), ep->lastcall, ep->refCount);
  }
  
  
--- 2515,2533 ----
       struct nfsclientpag *ep, *ptr;
  {
      char sysname[100];
+ 	int count;
  
      if (pnt)
! 	printf("%lx: uid=%d, host=%x, pag=%x, lastt=%d, ref=%d count=%d\n",
  	       ptr, ep->uid, ep->host, ep->pag,
! 	       ep->lastcall, ep->refCount, ep->sysnamecount);
! 
! 	for(count = 0; count < ep->sysnamecount; count++){
! 		kread(kmem, (off_t) ep->sysname[count], sysname, (KDUMP_SIZE_T) 30);
! 		printf("   %lx: @sys[%d]=%s\n",
! 			ep->sysname[count], count, sysname);
! 		Sum_nfssysnames += MAXSYSNAME;
! 	}
  }
  
  
Index: openafs/src/venus/livesys.c
diff -c openafs/src/venus/livesys.c:1.4 openafs/src/venus/livesys.c:1.4.2.1
*** openafs/src/venus/livesys.c:1.4	Tue Jul 15 19:17:22 2003
--- openafs/src/venus/livesys.c	Tue Apr 10 14:43:46 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/livesys.c,v 1.4 2003/07/15 23:17:22 shadow Exp $");
  
  #include <afs/afs_args.h>
  #include <rx/xdr.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/livesys.c,v 1.4.2.1 2007/04/10 18:43:46 shadow Exp $");
  
  #include <afs/afs_args.h>
  #include <rx/xdr.h>
***************
*** 71,77 ****
      memcpy(space, &setp, sizeof(afs_int32));
      code = pioctl(0, VIOC_AFS_SYSNAME, &blob, 1);
      if (code) {
! 	fprintf(stderr, "livesys: %s\n", error_message(code));
  	return 1;
      }
      input = space;
--- 71,77 ----
      memcpy(space, &setp, sizeof(afs_int32));
      code = pioctl(0, VIOC_AFS_SYSNAME, &blob, 1);
      if (code) {
! 	fprintf(stderr, "livesys: %s\n", afs_error_message(code));
  	return 1;
      }
      input = space;
Index: openafs/src/venus/twiddle.c
diff -c openafs/src/venus/twiddle.c:1.7 openafs/src/venus/twiddle.c:1.7.2.1
*** openafs/src/venus/twiddle.c:1.7	Tue Jul 15 19:17:22 2003
--- openafs/src/venus/twiddle.c	Tue Apr 10 14:43:46 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/twiddle.c,v 1.7 2003/07/15 23:17:22 shadow Exp $");
  
  #include <rx/xdr.h>
  #include <sys/ioctl.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/twiddle.c,v 1.7.2.1 2007/04/10 18:43:46 shadow Exp $");
  
  #include <rx/xdr.h>
  #include <sys/ioctl.h>
***************
*** 206,211 ****
  	    fprintf(stderr, "%s:'%s'", pn, filename);
  	else
  	    fprintf(stderr, "%s", pn);
! 	fprintf(stderr, ": %s\n", error_message(errno));
      }
  }				/*Die */
--- 206,211 ----
  	    fprintf(stderr, "%s:'%s'", pn, filename);
  	else
  	    fprintf(stderr, "%s", pn);
! 	fprintf(stderr, ": %s\n", afs_error_message(errno));
      }
  }				/*Die */
Index: openafs/src/venus/up.c
diff -c openafs/src/venus/up.c:1.13 openafs/src/venus/up.c:1.13.2.1
*** openafs/src/venus/up.c:1.13	Tue Jul 15 19:17:22 2003
--- openafs/src/venus/up.c	Mon May  7 13:23:11 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/up.c,v 1.13 2003/07/15 23:17:22 shadow Exp $");
  
  /* missing type from C language */
  #define Boolean short
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/up.c,v 1.13.2.1 2007/05/07 17:23:11 rra Exp $");
  
  /* missing type from C language */
  #define Boolean short
***************
*** 528,533 ****
--- 528,534 ----
  	char f1[MAXPATHLEN], f2[MAXPATHLEN];
  	char *p1, *p2;
  	struct dirent *d;
+ 	struct timeval tv[2];
  
  	if (verbose) {
  	    printf("Level %d: Directory %s to %s\n", level, file1, file2);
***************
*** 689,694 ****
--- 690,704 ----
  		printf("Not setting acls\n");
  	    }
  	}
+ 
+         /* preserve access and modification times: ("-x" disables) */
+         if (preserveDate) {
+             tv[0].tv_sec = s1.st_atime;
+             tv[0].tv_usec = 0;
+             tv[1].tv_sec = s1.st_mtime;
+             tv[1].tv_usec = 0;
+             utimes(file2, tv);
+         }
      }
  
      return rcode;
Index: openafs/src/venus/whatfid.c
diff -c openafs/src/venus/whatfid.c:1.5 openafs/src/venus/whatfid.c:1.5.2.1
*** openafs/src/venus/whatfid.c:1.5	Tue Jul 15 19:17:22 2003
--- openafs/src/venus/whatfid.c	Tue Apr 10 14:43:46 2007
***************
*** 14,20 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/whatfid.c,v 1.5 2003/07/15 23:17:22 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
--- 14,20 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/whatfid.c,v 1.5.2.1 2007/04/10 18:43:46 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
***************
*** 149,154 ****
  	    fprintf(stderr, "%s:'%s'", pn, filename);
  	else
  	    fprintf(stderr, "%s", pn);
! 	fprintf(stderr, ": %s\n", error_message(errno));
      }
  }				/*Die */
--- 149,154 ----
  	    fprintf(stderr, "%s:'%s'", pn, filename);
  	else
  	    fprintf(stderr, "%s", pn);
! 	fprintf(stderr, ": %s\n", afs_error_message(errno));
      }
  }				/*Die */
Index: openafs/src/viced/afsfileprocs.c
diff -c openafs/src/viced/afsfileprocs.c:1.81.2.39 openafs/src/viced/afsfileprocs.c:1.81.2.43
*** openafs/src/viced/afsfileprocs.c:1.81.2.39	Mon Feb 26 13:52:48 2007
--- openafs/src/viced/afsfileprocs.c	Tue Aug 21 04:28:37 2007
***************
*** 29,35 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/afsfileprocs.c,v 1.81.2.39 2007/02/26 18:52:48 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.43 2007/08/21 08:28:37 jaltman Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
***************
*** 319,324 ****
--- 319,329 ----
      H_LOCK;
    retry:
      tclient = h_FindClient_r(*tconn);
+     if (!tclient) {
+ 	ViceLog(0, ("CallPreamble: Couldn't get CPS. Too many lockers\n"));
+ 	H_UNLOCK;
+ 	return VBUSY;
+     }
      thost = tclient->host;
      if (tclient->prfail == 1) {	/* couldn't get the CPS */
  	if (!retry_flag) {
***************
*** 422,427 ****
--- 427,434 ----
  
      H_LOCK;
      tclient = h_FindClient_r(aconn);
+     if (!tclient) 
+ 	goto busyout;
      thost = tclient->host;
      if (thost->hostFlags & HERRORTRANS)
  	translate = 1;
***************
*** 443,448 ****
--- 450,456 ----
  		afs_inet_ntoa_r(thost->host, hoststr), ntohs(thost->port),
  		thost));
      }
+  busyout:
      H_UNLOCK;
      return (translate ? sys_error_to_et(ret) : ret);
  }				/*CallPostamble */
***************
*** 1137,1143 ****
      }
  
      ino = VN_GET_INO(targetptr);
!     assert(VALID_INO(ino));
      targFdP = IH_OPEN(targetptr->handle);
      if (targFdP == NULL) {
  	rc = errno;
--- 1145,1157 ----
      }
  
      ino = VN_GET_INO(targetptr);
!     if (!VALID_INO(ino)) {
! 	free(buff);
! 	VTakeOffline(volptr);
! 	ViceLog(0, ("Volume %u now offline, must be salvaged.\n",
! 		    volptr->hashid));
! 	return EIO;
!     }    
      targFdP = IH_OPEN(targetptr->handle);
      if (targFdP == NULL) {
  	rc = errno;
***************
*** 1300,1305 ****
--- 1314,1322 ----
        */
      if ((*targetptr)->disk.uniquifier != fileFid->Unique) {
  	VTakeOffline(volptr);
+ 	ViceLog(0,
+ 		("Volume %u now offline, must be salvaged.\n",
+ 		 volptr->hashid));
  	errorCode = VSALVAGE;
  	return errorCode;
      }
***************
*** 1327,1336 ****
  			 errno));
  		if (errno != ENOENT)
  		{
  		    ViceLog(0,
  			    ("Volume %u now offline, must be salvaged.\n",
  			     volptr->hashid));
- 		    VTakeOffline(volptr);
  		    return (EIO);
  		}
  		DT1++;
--- 1344,1353 ----
  			 errno));
  		if (errno != ENOENT)
  		{
+ 		    VTakeOffline(volptr);
  		    ViceLog(0,
  			    ("Volume %u now offline, must be salvaged.\n",
  			     volptr->hashid));
  		    return (EIO);
  		}
  		DT1++;
***************
*** 1353,1362 ****
  		("Error %d deleting %s\n", code,
  		 (((*targetptr)->disk.type ==
  		   Directory) ? "directory" : "file")));
  	ViceLog(0,
  		("Volume %u now offline, must be salvaged.\n",
  		 volptr->hashid));
- 	VTakeOffline(volptr);
  	if (!errorCode)
  	    errorCode = code;
      }
--- 1370,1379 ----
  		("Error %d deleting %s\n", code,
  		 (((*targetptr)->disk.type ==
  		   Directory) ? "directory" : "file")));
+ 	VTakeOffline(volptr);
  	ViceLog(0,
  		("Volume %u now offline, must be salvaged.\n",
  		 volptr->hashid));
  	if (!errorCode)
  	    errorCode = code;
      }
***************
*** 1760,1766 ****
  		0;
  	Time += AFS_LOCKWAIT;
  	if (LockingType == LockRead) {
! 	    if ( !(rights & PRSFS_LOCK) )
  		return(EACCES);
   
  	    if (targetptr->disk.lock.lockCount >= 0) {
--- 1777,1785 ----
  		0;
  	Time += AFS_LOCKWAIT;
  	if (LockingType == LockRead) {
! 	    if ( !(rights & PRSFS_LOCK) &&
!                  !(rights & PRSFS_WRITE) &&
!                  !(OWNSp(client, targetptr) && (rights & PRSFS_INSERT)) )
  		return(EACCES);
   
  	    if (targetptr->disk.lock.lockCount >= 0) {
***************
*** 4105,4110 ****
--- 4124,4132 ----
  	    VPutVnode(&errorCode, testvptr);
  	    if ((top == 1) && (testnode != 0)) {
  		VTakeOffline(volptr);
+ 		ViceLog(0,
+ 			("Volume %u now offline, must be salvaged.\n",
+ 			 volptr->hashid));
  		errorCode = EIO;
  		goto Bad_Rename;
  	    }
***************
*** 4434,4443 ****
  
      /* Write the contents of the symbolic link name into the target inode */
      fdP = IH_OPEN(targetptr->handle);
!     assert(fdP != NULL);
      len = strlen((char *) LinkContents);
!      code = (len == FDH_WRITE(fdP, (char *) LinkContents, len)) ? 0 : VDISKFULL;
!      if (code) ViceLog(0, ("SAFSS_Symlink FDH_WRITE failed for len=%d, Fid=%u.%d.%d\n", len, OutFid->Volume, OutFid->Vnode, OutFid->Unique));
      FDH_CLOSE(fdP);
      /*
       * Set up and return modified status for the parent dir and new symlink
--- 4456,4473 ----
  
      /* Write the contents of the symbolic link name into the target inode */
      fdP = IH_OPEN(targetptr->handle);
!     if (fdP == NULL) {
! 	(void)PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr,
! 			       volptr, &client);
! 	VTakeOffline(volptr);
! 	ViceLog(0, ("Volume %u now offline, must be salvaged.\n",
! 		    volptr->hashid));
! 	return EIO;
!     }    
      len = strlen((char *) LinkContents);
!     code = (len == FDH_WRITE(fdP, (char *) LinkContents, len)) ? 0 : VDISKFULL;
!     if (code) 
! 	ViceLog(0, ("SAFSS_Symlink FDH_WRITE failed for len=%d, Fid=%u.%d.%d\n", len, OutFid->Volume, OutFid->Vnode, OutFid->Unique));
      FDH_CLOSE(fdP);
      /*
       * Set up and return modified status for the parent dir and new symlink
***************
*** 6920,6925 ****
--- 6950,6957 ----
      fdP = IH_OPEN(ihP);
      if (fdP == NULL) {
  	VTakeOffline(volptr);
+ 	ViceLog(0, ("Volume %u now offline, must be salvaged.\n",
+ 		    volptr->hashid));
  	return EIO;
      }
      optSize = sendBufSize;
***************
*** 6929,6934 ****
--- 6961,6968 ----
      if (tlen < 0) {
  	FDH_CLOSE(fdP);
  	VTakeOffline(volptr);
+ 	ViceLog(0, ("Volume %u now offline, must be salvaged.\n",
+ 		    volptr->hashid));
  	return EIO;
      }
      if (Pos > tlen) {
***************
*** 6967,6972 ****
--- 7001,7008 ----
  	    FDH_CLOSE(fdP);
  	    FreeSendBuffer((struct afs_buffer *)tbuffer);
  	    VTakeOffline(volptr);
+ 	    ViceLog(0, ("Volume %u now offline, must be salvaged.\n",
+ 			volptr->hashid));
  	    return EIO;
  	}
  	errorCode = rx_Write(Call, tbuffer, wlen);
***************
*** 6981,6986 ****
--- 7017,7024 ----
  	if (errorCode != wlen) {
  	    FDH_CLOSE(fdP);
  	    VTakeOffline(volptr);
+ 	    ViceLog(0, ("Volume %u now offline, must be salvaged.\n",
+ 			volptr->hashid));
  	    return EIO;
  	}
  	errorCode = rx_Writev(Call, tiov, tnio, wlen);
***************
*** 7153,7158 ****
--- 7191,7198 ----
  	if (GetLinkCountAndSize(volptr, fdP, &linkCount, &DataLength) < 0) {
  	    FDH_CLOSE(fdP);
  	    VTakeOffline(volptr);
+ 	    ViceLog(0, ("Volume %u now offline, must be salvaged.\n",
+ 			volptr->hashid));
  	    return EIO;
  	}
  
***************
*** 7196,7202 ****
  	}
  	tinode = VN_GET_INO(targetptr);
      }
!     assert(VALID_INO(tinode));
  
      /* compute new file length */
      NewLength = DataLength;
--- 7236,7247 ----
  	}
  	tinode = VN_GET_INO(targetptr);
      }
!     if (!VALID_INO(tinode)) {
! 	VTakeOffline(volptr);
! 	ViceLog(0,("Volume %u now offline, must be salvaged.\n",
! 		   volptr->hashid));
! 	return EIO;
!     }
  
      /* compute new file length */
      NewLength = DataLength;
***************
*** 7518,7534 ****
  #else
      H_LOCK;
      tclient = h_FindClient_r(tcon);
      thost = tclient->host;
      
      /* nothing more can be done */
      if ( !thost->interface ) 
  	goto Bad_CallBackRxConnAddr;
      
-     assert(thost->interface->numberOfInterfaces > 0 );
-     
      /* the only address is the primary interface */
      /* can't change when there's only 1 address, anyway */
!     if ( thost->interface->numberOfInterfaces == 1 ) 
  	goto Bad_CallBackRxConnAddr;
      
      /* initialise a security object only once */
--- 7563,7581 ----
  #else
      H_LOCK;
      tclient = h_FindClient_r(tcon);
+     if (!tclient) {
+ 	errorCode = VBUSY;
+ 	goto Bad_CallBackRxConnAddr;
+     }
      thost = tclient->host;
      
      /* nothing more can be done */
      if ( !thost->interface ) 
  	goto Bad_CallBackRxConnAddr;
      
      /* the only address is the primary interface */
      /* can't change when there's only 1 address, anyway */
!     if ( thost->interface->numberOfInterfaces <= 1 ) 
  	goto Bad_CallBackRxConnAddr;
      
      /* initialise a security object only once */
Index: openafs/src/viced/callback.c
diff -c openafs/src/viced/callback.c:1.55.2.14 openafs/src/viced/callback.c:1.55.2.17
*** openafs/src/viced/callback.c:1.55.2.14	Thu Feb  2 16:48:39 2006
--- openafs/src/viced/callback.c	Tue Aug 21 04:28:37 2007
***************
*** 83,89 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/callback.c,v 1.55.2.14 2006/02/02 21:48:39 jaltman Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>		/* for malloc() */
--- 83,89 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/callback.c,v 1.55.2.17 2007/08/21 08:28:37 jaltman Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>		/* for malloc() */
***************
*** 2039,2048 ****
      if (!host->interface)
  	return 1;		/* failure */
  
-     assert(host->interface->numberOfInterfaces > 0);
- 
      /* the only address is the primary interface */
!     if (host->interface->numberOfInterfaces == 1)
  	return 1;		/* failure */
  
      /* initialise a security object only once */
--- 2039,2046 ----
      if (!host->interface)
  	return 1;		/* failure */
  
      /* the only address is the primary interface */
!     if (host->interface->numberOfInterfaces <= 1)
  	return 1;		/* failure */
  
      /* initialise a security object only once */
***************
*** 2087,2094 ****
--- 2085,2094 ----
  	    if (host->callback_rxcon)
  		rx_DestroyConnection(host->callback_rxcon);
  	    host->callback_rxcon = conns[multi_i];
+             hashDelete_r(host->host, host->port, host);
  	    host->host = interfaces[multi_i].addr;
  	    host->port = interfaces[multi_i].port;
+             hashInsert_r(host->host, host->port, host);
  	    connSuccess = conns[multi_i];
  	    rx_SetConnDeadTime(host->callback_rxcon, 50);
  	    rx_SetConnHardDeadTime(host->callback_rxcon, AFS_HARDDEADTIME);
***************
*** 2134,2144 ****
      if (!host->interface)
  	return 1;		/* failure */
  
-     assert(host->interface->numberOfInterfaces > 0);
- 
      /* the only address is the primary interface */
!     if (host->interface->numberOfInterfaces == 1)
! 	return 1;		/* failure */
  
      /* initialise a security object only once */
      if (!sc)
--- 2134,2142 ----
      if (!host->interface)
  	return 1;		/* failure */
  
      /* the only address is the primary interface */
!     if (host->interface->numberOfInterfaces <= 1)
!         return 1;               /* failure */
  
      /* initialise a security object only once */
      if (!sc)
***************
*** 2161,2168 ****
  
  	interfaces[j] = host->interface->interface[i];
  	conns[j] =
! 	    rx_NewConnection(interfaces[i].addr, 
! 			     interfaces[i].port, 1, sc, 0);
  	rx_SetConnDeadTime(conns[j], 2);
  	rx_SetConnHardDeadTime(conns[j], AFS_HARDDEADTIME);
  	j++;
--- 2159,2166 ----
  
  	interfaces[j] = host->interface->interface[i];
  	conns[j] =
! 	    rx_NewConnection(interfaces[j].addr, 
! 			     interfaces[j].port, 1, sc, 0);
  	rx_SetConnDeadTime(conns[j], 2);
  	rx_SetConnHardDeadTime(conns[j], AFS_HARDDEADTIME);
  	j++;
***************
*** 2180,2200 ****
  	    H_LOCK;
  	    if (host->callback_rxcon)
  		rx_DestroyConnection(host->callback_rxcon);
  	    host->callback_rxcon = conns[multi_i];
  	    host->host = interfaces[multi_i].addr;
  	    host->port = interfaces[multi_i].port;
  	    connSuccess = conns[multi_i];
  	    rx_SetConnDeadTime(host->callback_rxcon, 50);
  	    rx_SetConnHardDeadTime(host->callback_rxcon, AFS_HARDDEADTIME);
  	    ViceLog(125,
! 		    ("multiprobe success with addr %s\n",
! 		     afs_inet_ntoa_r(interfaces[multi_i].addr, hoststr)));
  	    H_UNLOCK;
  	    multi_Abort;
  	} else {
  	    ViceLog(125,
! 		    ("multiprobe failure with addr %s\n",
! 		     afs_inet_ntoa_r(interfaces[multi_i].addr, hoststr)));
              
              /* This is less than desirable but its the best we can do.
               * The AFS Cache Manager will return either 0 for a Uuid  
--- 2178,2202 ----
  	    H_LOCK;
  	    if (host->callback_rxcon)
  		rx_DestroyConnection(host->callback_rxcon);
+             hashDelete_r(host->host, host->port, host);
  	    host->callback_rxcon = conns[multi_i];
  	    host->host = interfaces[multi_i].addr;
  	    host->port = interfaces[multi_i].port;
+             hashInsert_r(host->host, host->port, host);
  	    connSuccess = conns[multi_i];
  	    rx_SetConnDeadTime(host->callback_rxcon, 50);
  	    rx_SetConnHardDeadTime(host->callback_rxcon, AFS_HARDDEADTIME);
  	    ViceLog(125,
! 		    ("multiprobe success for host %x; new primary addr %s:%d\n",
! 		     host, afs_inet_ntoa_r(host->host, hoststr),
!                      ntohs(host->port)));
  	    H_UNLOCK;
  	    multi_Abort;
  	} else {
  	    ViceLog(125,
! 		    ("multiprobe failure with addr %s:%d\n",
! 		     afs_inet_ntoa_r(interfaces[multi_i].addr, hoststr),
!                      ntohs(interfaces[multi_i].port)));
              
              /* This is less than desirable but its the best we can do.
               * The AFS Cache Manager will return either 0 for a Uuid  
***************
*** 2204,2221 ****
               * Uuid and fix the host tables.
               */
              if (multi_error == 1) {
-                 struct host * newhost;
- 
                  /* remove the current alternate address from this host */
                  H_LOCK;
!                 for (i = 0, j = 0; i < host->interface->numberOfInterfaces; i++) {
!                     if (interfaces[multi_i].addr != host->interface->interface[i].addr &&
! 			interfaces[multi_i].port != host->interface->interface[i].port) {
!                         host->interface->interface[j] = host->interface->interface[i];
!                         j++;
!                     }
!                 }
!                 host->interface->numberOfInterfaces--;
                  H_UNLOCK;
              }
          }
--- 2206,2214 ----
               * Uuid and fix the host tables.
               */
              if (multi_error == 1) {
                  /* remove the current alternate address from this host */
                  H_LOCK;
!                 removeInterfaceAddr_r(host, interfaces[multi_i].addr, interfaces[multi_i].port);
                  H_UNLOCK;
              }
          }
Index: openafs/src/viced/host.c
diff -c openafs/src/viced/host.c:1.57.2.44 openafs/src/viced/host.c:1.57.2.49
*** openafs/src/viced/host.c:1.57.2.44	Tue Sep  5 18:09:00 2006
--- openafs/src/viced/host.c	Thu Sep  6 23:55:40 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/host.c,v 1.57.2.44 2006/09/05 22:09:00 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.49 2007/09/07 03:55:40 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
***************
*** 52,57 ****
--- 52,58 ----
  #include <afs/prs_fs.h>
  #include <afs/auth.h>
  #include <afs/afsutil.h>
+ #include <afs/com_err.h>
  #include <rx/rx.h>
  #include <afs/cellconfig.h>
  #include <stdlib.h>
***************
*** 74,79 ****
--- 75,81 ----
  extern int lwps;		/* the max number of server threads */
  extern afsUUID FS_HostUUID;
  
+ afsUUID nulluuid;
  int CEs = 0;			/* active clients */
  int CEBlocks = 0;		/* number of blocks of CEs */
  struct client *CEFree = 0;	/* first free client */
***************
*** 81,86 ****
--- 83,90 ----
  int hostCount = 0;		/* number of hosts in hostList */
  int rxcon_ident_key;
  int rxcon_client_key;
+ static struct rx_securityClass *sc = NULL;
+ 
  
  #define CESPERBLOCK 73
  struct CEBlock {		/* block of CESPERBLOCK file entries */
***************
*** 88,94 ****
  };
  
  static void h_TossStuff_r(register struct host *host);
- static int hashDelete_r(afs_uint32 addr, afs_uint16 port, struct host *host);
  
  /*
   * Make sure the subnet macros have been defined.
--- 92,97 ----
***************
*** 182,189 ****
   * to map IP addresses onto host pointers, and another
   * to map host UUIDs onto host pointers.
   */
! static struct h_hashChain *hostHashTable[h_HASHENTRIES];
! static struct h_hashChain *hostUuidHashTable[h_HASHENTRIES];
  #define h_HashIndex(hostip) ((hostip) & (h_HASHENTRIES-1))
  #define h_UuidHashIndex(uuidp) (((int)(afs_uuid_hash(uuidp))) & (h_HASHENTRIES-1))
  
--- 185,192 ----
   * to map IP addresses onto host pointers, and another
   * to map host UUIDs onto host pointers.
   */
! static struct h_AddrHashChain *hostAddrHashTable[h_HASHENTRIES];
! static struct h_UuidHashChain *hostUuidHashTable[h_HASHENTRIES];
  #define h_HashIndex(hostip) ((hostip) & (h_HASHENTRIES-1))
  #define h_UuidHashIndex(uuidp) (((int)(afs_uuid_hash(uuidp))) & (h_HASHENTRIES-1))
  
***************
*** 307,313 ****
      if ((afsconf_GetLatestKey(tdir, 0, 0) == 0)) {
          code = afsconf_ClientAuthSecure(tdir, &sc[2], &scIndex);
          if (code)
! 	    ViceLog(0, ("hpr_Initialize: clientauthsecure returns %d %s (so trying noauth)", code, error_message(code)));
          if (code)
              scIndex = 0;        /* use noauth */
          if (scIndex != 2)
--- 310,316 ----
      if ((afsconf_GetLatestKey(tdir, 0, 0) == 0)) {
          code = afsconf_ClientAuthSecure(tdir, &sc[2], &scIndex);
          if (code)
! 	    ViceLog(0, ("hpr_Initialize: clientauthsecure returns %d %s (so trying noauth)", code, afs_error_message(code)));
          if (code)
              scIndex = 0;        /* use noauth */
          if (scIndex != 2)
***************
*** 750,756 ****
  {
      struct servent *serverentry;
      register struct host *host;
-     static struct rx_securityClass *sc = 0;
      afs_int32 now;
  #if FS_STATS_DETAILED
      afs_uint32 newHostAddr_HBO;	/*New host IP addr, in host byte order */
--- 753,758 ----
***************
*** 821,833 ****
  h_Lookup_r(afs_uint32 haddr, afs_uint16 hport, int *heldp)
  {
      register afs_int32 now;
!     register struct host *host = 0;
!     register struct h_hashChain *chain;
      register index = h_HashIndex(haddr);
      extern int hostaclRefresh;
  
    restart:
!     for (chain = hostHashTable[index]; chain; chain = chain->next) {
  	host = chain->hostPtr;
  	assert(host);
  	if (!(host->hostFlags & HOSTDELETED) && chain->addr == haddr
--- 823,835 ----
  h_Lookup_r(afs_uint32 haddr, afs_uint16 hport, int *heldp)
  {
      register afs_int32 now;
!     register struct host *host = NULL;
!     register struct h_AddrHashChain *chain;
      register index = h_HashIndex(haddr);
      extern int hostaclRefresh;
  
    restart:
!     for (chain = hostAddrHashTable[index]; chain; chain = chain->next) {
  	host = chain->hostPtr;
  	assert(host);
  	if (!(host->hostFlags & HOSTDELETED) && chain->addr == haddr
***************
*** 868,874 ****
  h_LookupUuid_r(afsUUID * uuidp)
  {
      register struct host *host = 0;
!     register struct h_hashChain *chain;
      register index = h_UuidHashIndex(uuidp);
  
      for (chain = hostUuidHashTable[index]; chain; chain = chain->next) {
--- 870,876 ----
  h_LookupUuid_r(afsUUID * uuidp)
  {
      register struct host *host = 0;
!     register struct h_UuidHashChain *chain;
      register index = h_UuidHashIndex(uuidp);
  
      for (chain = hostUuidHashTable[index]; chain; chain = chain->next) {
***************
*** 959,965 ****
      host->hostFlags &= ~CLIENTDELETED;
  
      if (host->hostFlags & HOSTDELETED) {
! 	register struct h_hashChain **hp, *th;
  	register struct rx_connection *rxconn;
  	afsUUID *uuidp;
  	struct AddrPort hostAddrPort;
--- 961,967 ----
      host->hostFlags &= ~CLIENTDELETED;
  
      if (host->hostFlags & HOSTDELETED) {
!         register struct h_AddrHashChain **ahp, *ath;
  	register struct rx_connection *rxconn;
  	afsUUID *uuidp;
  	struct AddrPort hostAddrPort;
***************
*** 980,1028 ****
  
  	/* if alternate addresses do not exist */
  	if (!(host->interface)) {
! 	    for (hp = &hostHashTable[h_HashIndex(host->host)]; (th = *hp);
! 		 hp = &th->next) {
! 		assert(th->hostPtr);
! 		if (th->hostPtr == host) {
! 		    *hp = th->next;
! 		    h_DeleteList_r(host);
! 		    FreeHT(host);
! 		    free(th);
  		    break;
  		}
  	    }
  	} else {
! 	    /* delete all hash entries for the UUID */
  	    uuidp = &host->interface->uuid;
! 	    for (hp = &hostUuidHashTable[h_UuidHashIndex(uuidp)]; (th = *hp);
! 		 hp = &th->next) {
! 		assert(th->hostPtr);
! 		if (th->hostPtr == host) {
! 		    *hp = th->next;
! 		    free(th);
  		    break;
  		}
  	    }
! 	    /* delete all hash entries for alternate addresses */
! 	    assert(host->interface->numberOfInterfaces > 0);
  	    for (i = 0; i < host->interface->numberOfInterfaces; i++) {
  		hostAddrPort = host->interface->interface[i];
  
! 		for (hp = &hostHashTable[h_HashIndex(hostAddrPort.addr)]; (th = *hp);
! 		     hp = &th->next) {
! 		    assert(th->hostPtr);
! 		    if (th->hostPtr == host) {
! 			*hp = th->next;
! 			free(th);
  			break;
  		    }
  		}
  	    }
  	    free(host->interface);
  	    host->interface = NULL;
- 	    h_DeleteList_r(host);	/* remove host from global host List */
- 	    FreeHT(host);
  	}			/* if alternate address exists */
      }
  }				/*h_TossStuff_r */
  
--- 982,1032 ----
  
  	/* if alternate addresses do not exist */
  	if (!(host->interface)) {
! 	    for (ahp = &hostAddrHashTable[h_HashIndex(host->host)]; (ath = *ahp);
! 		 ahp = &ath->next) {
! 		assert(ath->hostPtr);
! 		if (ath->hostPtr == host) {
! 		    *ahp = ath->next;
! 		    free(ath);
  		    break;
  		}
  	    }
  	} else {
!             register struct h_UuidHashChain **uhp, *uth;
! 	    /* delete the hash entry for the UUID */
  	    uuidp = &host->interface->uuid;
! 	    for (uhp = &hostUuidHashTable[h_UuidHashIndex(uuidp)]; (uth = *uhp);
! 		 uhp = &uth->next) {
! 		assert(uth->hostPtr);
! 		if (uth->hostPtr == host) {
! 		    *uhp = uth->next;
! 		    free(uth);
  		    break;
  		}
  	    }
! 	    /* delete the hash entry for each alternate addresses */
  	    for (i = 0; i < host->interface->numberOfInterfaces; i++) {
  		hostAddrPort = host->interface->interface[i];
  
!                 if (!hostAddrPort.valid)
!                     continue;
! 
! 		for (ahp = &hostAddrHashTable[h_HashIndex(hostAddrPort.addr)]; (ath = *ahp);
! 		     ahp = &ath->next) {
! 		    assert(ath->hostPtr);
! 		    if (ath->hostPtr == host) {
! 			*ahp = ath->next;
! 			free(ath);
  			break;
  		    }
  		}
  	    }
  	    free(host->interface);
  	    host->interface = NULL;
  	}			/* if alternate address exists */
+ 
+         h_DeleteList_r(host);	/* remove host from global host List */
+         FreeHT(host);
      }
  }				/*h_TossStuff_r */
  
***************
*** 1109,1121 ****
  hashInsertUuid_r(struct afsUUID *uuid, struct host *host)
  {
      int index;
!     struct h_hashChain *chain;
  
      /* hash into proper bucket */
      index = h_UuidHashIndex(uuid);
  
      /* insert into beginning of list for this bucket */
!     chain = (struct h_hashChain *)malloc(sizeof(struct h_hashChain));
      if (!chain) {
  	ViceLog(0, ("Failed malloc in hashInsertUuid_r\n"));
  	assert(0);
--- 1113,1131 ----
  hashInsertUuid_r(struct afsUUID *uuid, struct host *host)
  {
      int index;
!     struct h_UuidHashChain *chain;
  
      /* hash into proper bucket */
      index = h_UuidHashIndex(uuid);
  
+     /* don't add the same entry multiple times */
+     for (chain = hostUuidHashTable[index]; chain; chain = chain->next) {
+ 	if (host->interface && afs_uuid_equal(&host->interface->uuid, uuid))
+ 	    return;
+     }
+ 
      /* insert into beginning of list for this bucket */
!     chain = (struct h_UuidHashChain *)malloc(sizeof(struct h_UuidHashChain));
      if (!chain) {
  	ViceLog(0, ("Failed malloc in hashInsertUuid_r\n"));
  	assert(0);
***************
*** 1132,1166 ****
  hashInsert_r(afs_uint32 addr, afs_uint16 port, struct host *host)
  {
      int index;
!     struct h_hashChain *chain;
! 
      /* hash into proper bucket */
      index = h_HashIndex(addr);
  
      /* don't add the same entry multiple times */
!     for (chain = hostHashTable[index]; chain; chain = chain->next) {
! 	if (chain->hostPtr == host && chain->addr == addr && chain->port == port)
! 	    return;
      }
  
      /* insert into beginning of list for this bucket */
!     chain = (struct h_hashChain *)malloc(sizeof(struct h_hashChain));
      if (!chain) {
  	ViceLog(0, ("Failed malloc in hashInsert_r\n"));
  	assert(0);
      }
      chain->hostPtr = host;
!     chain->next = hostHashTable[index];
      chain->addr = addr;
      chain->port = port;
!     hostHashTable[index] = chain;
  }
  
  /*
   * This is called with host locked and held. At this point, the
!  * hostHashTable should not be having entries for the alternate
   * interfaces. This function has to insert these entries in the
!  * hostHashTable.
   *
   * All addresses are in network byte order.
   */
--- 1142,1187 ----
  hashInsert_r(afs_uint32 addr, afs_uint16 port, struct host *host)
  {
      int index;
!     struct h_AddrHashChain *chain;
!     int found = 0;
!     char hoststr[16]; 
!   
      /* hash into proper bucket */
      index = h_HashIndex(addr);
  
      /* don't add the same entry multiple times */
!     for (chain = hostAddrHashTable[index]; chain; chain = chain->next) {
! 	if (chain->addr == addr && chain->port == port) {
! 	    if (chain->hostPtr == host)
! 		found = 1;
! 	    else if (!(host->hostFlags & HOSTDELETED))
! 		ViceLog(125, ("Addr %s:%d assigned to %x and %x.\n",
! 			    afs_inet_ntoa_r(addr, hoststr), ntohs(port),
! 			    host, chain));
! 	}
      }
  
+     if (found)
+ 	return;
+ 
      /* insert into beginning of list for this bucket */
!     chain = (struct h_AddrHashChain *)malloc(sizeof(struct h_AddrHashChain));
      if (!chain) {
  	ViceLog(0, ("Failed malloc in hashInsert_r\n"));
  	assert(0);
      }
      chain->hostPtr = host;
!     chain->next = hostAddrHashTable[index];
      chain->addr = addr;
      chain->port = port;
!     hostAddrHashTable[index] = chain;
  }
  
  /*
   * This is called with host locked and held. At this point, the
!  * hostAddrHashTable should not have entries for the alternate
   * interfaces. This function has to insert these entries in the
!  * hostAddrHashTable.
   *
   * All addresses are in network byte order.
   */
***************
*** 1176,1185 ****
      assert(host);
      assert(host->interface);
  
-     ViceLog(125, ("addInterfaceAddr : host %s:%d addr %s:%d\n", 
- 		   afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port), 
- 		   afs_inet_ntoa_r(addr, hoststr2), ntohs(port)));
- 
      /*
       * Make sure this address is on the list of known addresses
       * for this host.
--- 1197,1202 ----
***************
*** 1187,1195 ****
      number = host->interface->numberOfInterfaces;
      for (i = 0, found = 0; i < number && !found; i++) {
  	if (host->interface->interface[i].addr == addr &&
! 	    host->interface->interface[i].port == port)
  	    found = 1;
      }
      if (!found) {
  	interface = (struct Interface *)
  	    malloc(sizeof(struct Interface) + (sizeof(struct AddrPort) * number));
--- 1204,1219 ----
      number = host->interface->numberOfInterfaces;
      for (i = 0, found = 0; i < number && !found; i++) {
  	if (host->interface->interface[i].addr == addr &&
!             host->interface->interface[i].port == port) {
  	    found = 1;
+             host->interface->interface[i].valid = 1;
+         }
      }
+ 
+     ViceLog(125, ("addInterfaceAddr : host %x (%s:%d) addr %s:%d : found:%d\n", 
+ 		   host, afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port), 
+ 		   afs_inet_ntoa_r(addr, hoststr2), ntohs(port), found));
+     
      if (!found) {
  	interface = (struct Interface *)
  	    malloc(sizeof(struct Interface) + (sizeof(struct AddrPort) * number));
***************
*** 1203,1226 ****
  	    interface->interface[i] = host->interface->interface[i];
  	interface->interface[number].addr = addr;
  	interface->interface[number].port = port;
  	free(host->interface);
  	host->interface = interface;
      }
  
-     /*
-      * Create a hash table entry for this address
-      */
-     hashInsert_r(addr, port, host);
- 
      return 0;
  }
  
  
  /*
   * This is called with host locked and held. At this point, the
!  * hostHashTable should not be having entries for the alternate
   * interfaces. This function has to insert these entries in the
!  * hostHashTable.
   *
   * All addresses are in network byte order.
   */
--- 1227,1246 ----
  	    interface->interface[i] = host->interface->interface[i];
  	interface->interface[number].addr = addr;
  	interface->interface[number].port = port;
+         interface->interface[number].valid = 1;
  	free(host->interface);
  	host->interface = interface;
      }
  
      return 0;
  }
  
  
  /*
   * This is called with host locked and held. At this point, the
!  * hostAddrHashTable should not be having entries for the alternate
   * interfaces. This function has to insert these entries in the
!  * hostAddrHashTable.
   *
   * All addresses are in network byte order.
   */
***************
*** 1236,1243 ****
      assert(host);
      assert(host->interface);
  
!     ViceLog(125, ("removeInterfaceAddr : host %s:%d addr %s:%d\n", 
! 		   afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port), 
  		   afs_inet_ntoa_r(addr, hoststr2), ntohs(port)));
  
      /*
--- 1256,1263 ----
      assert(host);
      assert(host->interface);
  
!     ViceLog(125, ("removeInterfaceAddr : host %x (%s:%d) addr %s:%d\n", 
! 		   host, afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port), 
  		   afs_inet_ntoa_r(addr, hoststr2), ntohs(port)));
  
      /*
***************
*** 1246,1263 ****
       */
      interface = host->interface;
      number = host->interface->numberOfInterfaces;
!     for (i = 0, found = 0; i < number; i++) {
  	if (interface->interface[i].addr == addr &&
  	    interface->interface[i].port == port) {
  	    found = 1;
! 	    break;
  	}
      }
      if (found) {
  	number--;
  	for (; i < number; i++) {
! 	    interface->interface[i].addr = interface->interface[i+1].addr;
! 	    interface->interface[i].port = interface->interface[i+1].port;
  	}
  	interface->numberOfInterfaces = number;
      }
--- 1266,1282 ----
       */
      interface = host->interface;
      number = host->interface->numberOfInterfaces;
!     for (i = 0, found = 0; i < number && !found; i++) {
  	if (interface->interface[i].addr == addr &&
  	    interface->interface[i].port == port) {
  	    found = 1;
!             interface->interface[i].valid = 0;
  	}
      }
      if (found) {
  	number--;
  	for (; i < number; i++) {
! 	    interface->interface[i] = interface->interface[i+1];
  	}
  	interface->numberOfInterfaces = number;
      }
***************
*** 1270,1275 ****
--- 1289,1393 ----
      return 0;
  }
  
+ /*
+  * This is called with host locked and held.  This function differs
+  * from removeInterfaceAddr_r in that it is called when the address
+  * is being removed from the host regardless of whether or not there
+  * is an interface list for the host.  This function will delete the
+  * host if there are no addresses left on it.
+  *
+  * All addresses are in network byte order.
+  */
+ int
+ removeAddress_r(struct host *host, afs_uint32 addr, afs_uint16 port)
+ {
+     int i;
+     char hoststr[16], hoststr2[16];
+ 
+     if (!host->interface) {
+         if (host->host == addr && host->port == port) {
+             ViceLog(25,
+                     ("Removing only address for host %x (%s:%d), deleting host.\n",
+                      host, afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port)));
+             host->hostFlags |= HOSTDELETED;
+         }
+     } else {
+         removeInterfaceAddr_r(host, host->host, host->port);
+         if (host->interface->numberOfInterfaces == 0) {
+             ViceLog(25,
+                      ("Removed only address for host %x (%s:%d), no alternate interfaces, deleting host.\n",
+                        host, afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port)));
+             host->hostFlags |= HOSTDELETED;
+         } else {
+             struct rx_connection *rxconn;
+ 
+             rxconn = host->callback_rxcon;
+             host->callback_rxcon = NULL;
+ 
+             if (rxconn) {
+                 struct client *client;
+                 /*
+                 * If rx_DestroyConnection calls h_FreeConnection we will
+                 * deadlock on the host_glock_mutex. Work around the problem
+                 * by unhooking the client from the connection before
+                 * destroying the connection.
+                 */
+                 client = rx_GetSpecific(rxconn, rxcon_client_key);
+                 rx_SetSpecific(rxconn, rxcon_client_key, (void *)0);
+                 rx_DestroyConnection(rxconn);
+             }
+ 
+             for (i=0; i < host->interface->numberOfInterfaces; i++) {
+                 if (host->interface->interface[i].valid) {
+                     ViceLog(25,
+                              ("Removed address for host %x (%s:%d), new primary interface %s:%d.\n",
+                                host, afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port),
+                                afs_inet_ntoa_r(host->interface->interface[i].addr, hoststr2), 
+                                ntohs(host->interface->interface[i].port)));
+                     host->host = host->interface->interface[i].addr;
+                     host->port = host->interface->interface[i].port;
+                     hashInsert_r(host->host, host->port, host);
+                     break;
+                 }
+             }
+ 
+             if (i == host->interface->numberOfInterfaces) {
+                 ViceLog(25,
+                          ("Removed only address for host %x (%s:%d), no valid alternate interfaces, deleting host.\n",
+                            host, afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port)));
+                 host->hostFlags |= HOSTDELETED;
+             } else {
+                 if (!sc)
+                     sc = rxnull_NewClientSecurityObject();
+                 host->callback_rxcon =
+                     rx_NewConnection(host->host, host->port, 1, sc, 0);
+                 rx_SetConnDeadTime(host->callback_rxcon, 50);
+                 rx_SetConnHardDeadTime(host->callback_rxcon, AFS_HARDDEADTIME);
+             }
+         }
+     }
+ 
+     return 0;
+ }
+ 
+ int 
+ h_threadquota(int waiting) 
+ {
+     if (lwps > 64) {
+ 	if (waiting > 5)
+ 	    return 1;
+     } else if (lwps > 32) {
+ 	if (waiting > 4)
+ 	    return 1;
+     } else if (lwps > 16) {
+ 	if (waiting > 3)
+ 	    return 1;
+     } else {
+ 	if (waiting > 2)
+ 	    return 1;
+     }
+     return 0;
+ }
  
  /* Host is returned held */
  struct host *
***************
*** 1278,1284 ****
      struct host *host;
      struct host *oldHost;
      int code;
!     int held, oheld;
      struct interfaceAddr interf;
      int interfValid = 0;
      struct Identity *identP = NULL;
--- 1396,1402 ----
      struct host *host;
      struct host *oldHost;
      int code;
!     int held;
      struct interfaceAddr interf;
      int interfValid = 0;
      struct Identity *identP = NULL;
***************
*** 1306,1313 ****
--- 1424,1435 ----
  	 * structure for this address. Verify that the identity
  	 * of the caller matches the identity in the host structure.
  	 */
+ 	if ((host->hostFlags & HWHO_INPROGRESS) && 
+ 	    h_threadquota(host->lock.num_waiting))
+ 	    return 0;
  	h_Lock_r(host);
  	if (!(host->hostFlags & ALTADDR)) {
+ 	    host->hostFlags &= ~HWHO_INPROGRESS;
  	    /* Another thread is doing initialization */
  	    h_Unlock_r(host);
  	    if (!held)
***************
*** 1329,1335 ****
  	rx_PutConnection(cb_conn);
  	cb_conn=NULL;
  	H_LOCK;
! 	if (code == RXGEN_OPCODE) {
  	    identP = (struct Identity *)malloc(sizeof(struct Identity));
  	    if (!identP) {
  		ViceLog(0, ("Failed malloc in h_GetHost_r\n"));
--- 1451,1458 ----
  	rx_PutConnection(cb_conn);
  	cb_conn=NULL;
  	H_LOCK;
! 	if ((code == RXGEN_OPCODE) || 
! 	    (afs_uuid_equal(&interf.uuid, &nulluuid))) {
  	    identP = (struct Identity *)malloc(sizeof(struct Identity));
  	    if (!identP) {
  		ViceLog(0, ("Failed malloc in h_GetHost_r\n"));
***************
*** 1347,1352 ****
--- 1470,1476 ----
  			 afs_inet_ntoa_r(host->host, hoststr),
  			 ntohs(host->port)));
  		host->hostFlags |= HOSTDELETED;
+ 		host->hostFlags &= ~HWHO_INPROGRESS;
  		h_Unlock_r(host);
  		if (!held)
  		    h_Release_r(host);
***************
*** 1368,1377 ****
  	     * then this is not the same host as before. */
  	    if (!host->interface
  		|| !afs_uuid_equal(&interf.uuid, &host->interface->uuid)) {
! 		ViceLog(25,
! 			("Host %s:%d has changed its identity, deleting.\n",
! 			 afs_inet_ntoa_r(host->host, hoststr), host->port));
  		host->hostFlags |= HOSTDELETED;
  		h_Unlock_r(host);
  		if (!held)
  		    h_Release_r(host);
--- 1492,1502 ----
  	     * then this is not the same host as before. */
  	    if (!host->interface
  		|| !afs_uuid_equal(&interf.uuid, &host->interface->uuid)) {
!                 ViceLog(25,
!                          ("Uuid doesn't match host %x (%s:%d). Host deleted.\n",
!                            host, afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port)));
  		host->hostFlags |= HOSTDELETED;
+ 		host->hostFlags &= ~HWHO_INPROGRESS;
  		h_Unlock_r(host);
  		if (!held)
  		    h_Release_r(host);
***************
*** 1379,1387 ****
  		goto retry;
  	    }
  	} else {
- 	    afs_inet_ntoa_r(host->host, hoststr);
  	    ViceLog(0,
! 		    ("CB: WhoAreYou failed for %s:%d, error %d\n", hoststr,
  		     ntohs(host->port), code));
  	    host->hostFlags |= VENUSDOWN;
  	}
--- 1504,1512 ----
  		goto retry;
  	    }
  	} else {
  	    ViceLog(0,
! 		    ("CB: WhoAreYou failed for host %x (%s:%d), error %d\n", 
!                      host, afs_inet_ntoa_r(host->host, hoststr),
  		     ntohs(host->port), code));
  	    host->hostFlags |= VENUSDOWN;
  	}
***************
*** 1391,1396 ****
--- 1516,1522 ----
  	else
  	    host->hostFlags &= ~(HERRORTRANS);
  	host->hostFlags |= ALTADDR;
+ 	host->hostFlags &= ~HWHO_INPROGRESS;
  	h_Unlock_r(host);
      } else if (host) {
  	if (!(host->hostFlags & ALTADDR)) {
***************
*** 1400,1405 ****
--- 1526,1532 ----
  		     afs_inet_ntoa_r(host->host, hoststr),
  		     ntohs(host->port)));
  	    h_Lock_r(host);
+ 	    host->hostFlags &= ~HWHO_INPROGRESS;
  	    h_Unlock_r(host);
  	    if (!held)
  		h_Release_r(host);
***************
*** 1432,1437 ****
--- 1559,1565 ----
  
  	    /* The host in the cache is not the host for this connection */
  	    host->hostFlags |= HOSTDELETED;
+ 	    host->hostFlags &= ~HWHO_INPROGRESS;
  	    h_Unlock_r(host);
  	    if (!held)
  		h_Release_r(host);
***************
*** 1452,1458 ****
  	    rx_PutConnection(cb_conn);
  	    cb_conn=NULL;
  	    H_LOCK;
! 	    if (code == RXGEN_OPCODE) {
  		if (!identP)
  		    identP =
  			(struct Identity *)malloc(sizeof(struct Identity));
--- 1580,1587 ----
  	    rx_PutConnection(cb_conn);
  	    cb_conn=NULL;
  	    H_LOCK;
! 	    if ((code == RXGEN_OPCODE) || 
! 		afs_uuid_equal(&interf.uuid, &nulluuid)) {
  		if (!identP)
  		    identP =
  			(struct Identity *)malloc(sizeof(struct Identity));
***************
*** 1505,1513 ****
                  if (oldHost) {
                      int probefail = 0;
  
! 		    if (!(oheld = h_Held_r(oldHost)))
  			h_Hold_r(oldHost);
  		    h_Lock_r(oldHost);
  
                      if (oldHost->interface) {
  			int code2;
--- 1634,1643 ----
                  if (oldHost) {
                      int probefail = 0;
  
! 		    if (!h_Held_r(oldHost))
  			h_Hold_r(oldHost);
  		    h_Lock_r(oldHost);
+ 		    oldHost->hostFlags |= HWHO_INPROGRESS;
  
                      if (oldHost->interface) {
  			int code2;
***************
*** 1542,1556 ****
  		    /* This is a new address for an existing host. Update
  		     * the list of interfaces for the existing host and
  		     * delete the host structure we just allocated. */
  		    if (oldHost->host != haddr || oldHost->port != hport) {
  			struct rx_connection *rxconn;
  
  			ViceLog(25,
! 				("CB: new addr %s:%d for old host %s:%d\n",
! 				  afs_inet_ntoa_r(haddr, hoststr),
! 				  ntohs(hport), 
! 				  afs_inet_ntoa_r(oldHost->host, hoststr2),
! 				  ntohs(oldHost->port)));
  			if (probefail || oldHost->host == haddr) {
  			    /* The probe failed which means that the old address is 
  			     * either unreachable or is not the same host we were just
--- 1672,1691 ----
  		    /* This is a new address for an existing host. Update
  		     * the list of interfaces for the existing host and
  		     * delete the host structure we just allocated. */
+ 
+                     /* prevent warnings while manipulating interface lists */
+ 		    host->hostFlags |= HOSTDELETED;
+ 
  		    if (oldHost->host != haddr || oldHost->port != hport) {
  			struct rx_connection *rxconn;
  
  			ViceLog(25,
! 				("CB: Host %x (%s:%d) has new addr %s:%d\n",
! 				  oldHost, 
!                                   afs_inet_ntoa_r(oldHost->host, hoststr2),
! 				  ntohs(oldHost->port),
!                                   afs_inet_ntoa_r(haddr, hoststr),
! 				  ntohs(hport)));
  			if (probefail || oldHost->host == haddr) {
  			    /* The probe failed which means that the old address is 
  			     * either unreachable or is not the same host we were just
***************
*** 1578,1583 ****
--- 1713,1719 ----
  			    }
  			}
  			addInterfaceAddr_r(oldHost, haddr, hport);
+                         hashInsert_r(haddr, hport, oldHost);
  			oldHost->host = haddr;
  			oldHost->port = hport;
  			rxconn = oldHost->callback_rxcon;
***************
*** 1597,1603 ****
  			    rx_DestroyConnection(rxconn);
  			}
  		    }
! 		    host->hostFlags |= HOSTDELETED;
  		    h_Unlock_r(host);
  		    /* release host because it was allocated by h_Alloc_r */
  		    h_Release_r(host);
--- 1733,1739 ----
  			    rx_DestroyConnection(rxconn);
  			}
  		    }
! 		    host->hostFlags &= ~HWHO_INPROGRESS;
  		    h_Unlock_r(host);
  		    /* release host because it was allocated by h_Alloc_r */
  		    h_Release_r(host);
***************
*** 1626,1640 ****
  		}
  	    }
  	    if (code) {
- 		afs_inet_ntoa_r(host->host, hoststr);
  		ViceLog(0,
! 			("CB: RCallBackConnectBack failed for %s:%d\n",
! 			 hoststr, ntohs(host->port)));
  		host->hostFlags |= VENUSDOWN;
  	    } else {
  		ViceLog(125,
! 			("CB: RCallBackConnectBack succeeded for %s:%d\n",
! 			 hoststr, ntohs(host->port)));
  		host->hostFlags |= RESETDONE;
  	    }
  	}
--- 1762,1775 ----
  		}
  	    }
  	    if (code) {
  		ViceLog(0,
! 			("CB: RCallBackConnectBack failed for host %x (%s:%d)\n",
! 			 host, afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port)));
  		host->hostFlags |= VENUSDOWN;
  	    } else {
  		ViceLog(125,
! 			("CB: RCallBackConnectBack succeeded for host %x (%s:%d)\n",
! 			 host, afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port)));
  		host->hostFlags |= RESETDONE;
  	    }
  	}
***************
*** 1644,1649 ****
--- 1779,1785 ----
  	else
  	    host->hostFlags &= ~(HERRORTRANS);
  	host->hostFlags |= ALTADDR;	/* host structure initialization complete */
+ 	host->hostFlags &= ~HWHO_INPROGRESS;
  	h_Unlock_r(host);
      }
      if (caps.Capabilities_val)
***************
*** 1662,1667 ****
--- 1798,1804 ----
  void
  h_InitHostPackage()
  {
+     memset(&nulluuid, 0, sizeof(afsUUID));
      afsconf_GetLocalCell(confDir, localcellname, PR_MAXNAMELEN);
      if (!local_realm[0]) {
  	if (afs_krb_get_lrealm(local_realm, 0) != 0 /*KSUCCESS*/) {
***************
*** 1880,1885 ****
--- 2017,2025 ----
      if (!client) { /* loop */
  	host = h_GetHost_r(tcon);	/* Returns it h_Held */
  
+ 	if (!host) 
+ 	    return 0;
+ 
      retryfirstclient:
  	/* First try to find the client structure */
  	for (client = host->FirstClient; client; client = client->next) {
***************
*** 2529,2534 ****
--- 2669,2675 ----
      }
      if (host->LastCall < checktime) {
  	h_Lock_r(host);
+ 	host->hostFlags |= HWHO_INPROGRESS;
  	if (!(host->hostFlags & HOSTDELETED)) {
  	    cb_conn = host->callback_rxcon;
  	    rx_GetConnection(cb_conn);
***************
*** 2598,2603 ****
--- 2739,2745 ----
  	    cb_conn=NULL;
  	    H_LOCK;
  	}
+ 	host->hostFlags &= ~HWHO_INPROGRESS;
  	h_Unlock_r(host);
      }
      H_UNLOCK;
***************
*** 2605,2610 ****
--- 2747,2843 ----
  
  }				/*CheckHost */
  
+ int
+ CheckHost_r(register struct host *host, int held, char *dummy)
+ {
+     register struct client *client;
+     struct rx_connection *cb_conn = NULL;
+     int code;
+ 
+     /* Host is held by h_Enumerate_r */
+     for (client = host->FirstClient; client; client = client->next) {
+ 	if (client->refCount == 0 && client->LastCall < clientdeletetime) {
+ 	    client->deleted = 1;
+ 	    host->hostFlags |= CLIENTDELETED;
+ 	}
+     }
+     if (host->LastCall < checktime) {
+ 	h_Lock_r(host);
+ 	if (!(host->hostFlags & HOSTDELETED)) {
+ 	    cb_conn = host->callback_rxcon;
+ 	    rx_GetConnection(cb_conn);
+ 	    if (host->LastCall < clientdeletetime) {
+ 		host->hostFlags |= HOSTDELETED;
+ 		if (!(host->hostFlags & VENUSDOWN)) {
+ 		    host->hostFlags &= ~ALTADDR;	/* alternate address invalid */
+ 		    if (host->interface) {
+ 			H_UNLOCK;
+ 			code =
+ 			    RXAFSCB_InitCallBackState3(cb_conn,
+ 						       &FS_HostUUID);
+ 			H_LOCK;
+ 		    } else {
+ 			H_UNLOCK;
+ 			code =
+ 			    RXAFSCB_InitCallBackState(cb_conn);
+ 			H_LOCK;
+ 		    }
+ 		    host->hostFlags |= ALTADDR;	/* alternate addresses valid */
+ 		    if (code) {
+ 			char hoststr[16];
+ 			(void)afs_inet_ntoa_r(host->host, hoststr);
+ 			ViceLog(0,
+ 				("CB: RCallBackConnectBack (host.c) failed for host %s:%d\n",
+ 				 hoststr, ntohs(host->port)));
+ 			host->hostFlags |= VENUSDOWN;
+ 		    }
+ 		    /* Note:  it's safe to delete hosts even if they have call
+ 		     * back state, because break delayed callbacks (called when a
+ 		     * message is received from the workstation) will always send a 
+ 		     * break all call backs to the workstation if there is no
+ 		     *callback.
+ 		     */
+ 		}
+ 	    } else {
+ 		if (!(host->hostFlags & VENUSDOWN) && host->cblist) {
+ 		    char hoststr[16];
+ 		    (void)afs_inet_ntoa_r(host->host, hoststr);
+ 		    if (host->interface) {
+ 			afsUUID uuid = host->interface->uuid;
+ 			H_UNLOCK;
+ 			code = RXAFSCB_ProbeUuid(cb_conn, &uuid);
+ 			H_LOCK;
+ 			if (code) {
+ 			    if (MultiProbeAlternateAddress_r(host)) {
+ 				ViceLog(0,("CheckHost_r: Probing all interfaces of host %s:%d failed, code %d\n",
+ 					    hoststr, ntohs(host->port), code));
+ 				host->hostFlags |= VENUSDOWN;
+ 			    }
+ 			}
+ 		    } else {
+ 			H_UNLOCK;
+ 			code = RXAFSCB_Probe(cb_conn);
+ 			H_LOCK;
+ 			if (code) {
+ 			    ViceLog(0,
+ 				    ("CheckHost_r: Probe failed for host %s:%d, code %d\n", 
+ 				     hoststr, ntohs(host->port), code));
+ 			    host->hostFlags |= VENUSDOWN;
+ 			}
+ 		    }
+ 		}
+ 	    }
+ 	    H_UNLOCK;
+ 	    rx_PutConnection(cb_conn);
+ 	    cb_conn=NULL;
+ 	    H_LOCK;
+ 	}
+ 	h_Unlock_r(host);
+     }
+     return held;
+ 
+ }				/*CheckHost_r */
+ 
  
  /*
   * Set VenusDown for any hosts that have not had a call in 15 minutes and
***************
*** 2627,2641 ****
       */
      checktime = now - 15 * 60;
      clientdeletetime = now - 120 * 60;	/* 2 hours ago */
!     h_Enumerate(CheckHost, NULL);
! 
  }				/*h_CheckHosts */
  
  /*
   * This is called with host locked and held. At this point, the
!  * hostHashTable should not have any entries for the alternate
   * interfaces. This function has to insert these entries in the
!  * hostHashTable.
   *
   * The addresses in the interfaceAddr list are in host byte order.
   */
--- 2860,2876 ----
       */
      checktime = now - 15 * 60;
      clientdeletetime = now - 120 * 60;	/* 2 hours ago */
!     
!     H_LOCK;
!     h_Enumerate_r(CheckHost_r, hostList, NULL);
!     H_UNLOCK;
  }				/*h_CheckHosts */
  
  /*
   * This is called with host locked and held. At this point, the
!  * hostAddrHashTable should not have any entries for the alternate
   * interfaces. This function has to insert these entries in the
!  * hostAddrHashTable.
   *
   * The addresses in the interfaceAddr list are in host byte order.
   */
***************
*** 2649,2654 ****
--- 2884,2891 ----
      int found;
      struct Interface *interface;
      char hoststr[16];
+     char uuidstr[128];
+     afs_uint16 port7001 = htons(7001);
  
      assert(host);
      assert(interf);
***************
*** 2669,2676 ****
      }
  
      /*
!      * Convert IP addresses to network byte order, and remove for
!      * duplicate IP addresses from the interface list.
       */
      for (i = 0, count = 0, found = 0; i < number; i++) {
  	interf->addr_in[i] = htonl(interf->addr_in[i]);
--- 2906,2944 ----
      }
  
      /*
!      * The client's notion of its own IP addresses is not reliable.  
!      *
!      * 1. The client list might contain private address ranges which
!      *    are likely to be re-used by many clients allocated addresses
!      *    by a NAT.
!      *
!      * 2. The client list will not include any public addresses that
!      *    are hidden by a NAT.
!      *
!      * 3. Private address ranges that are exposed to the server will
!      *    be obtained from the rx connections that use them.
!      *
!      * 4. Lists provided by the client are not necessarily truthful.
!      *    Many existing clients (UNIX) do not refresh the IP address
!      *    list as the actual assigned addresses change.  The end result
!      *    is that they report the initial address list for the lifetime
!      *    of the process.  In other words, a client can report addresses
!      *    that they are in fact not using.  Adding these addresses to
!      *    the host interface list without verification is not only
!      *    pointless, it is downright dangerous.
!      *
!      * We therefore do not add alternate addresses to the addr hash table.
!      * We only use them for multi-rx callback breaks.
!      */
! 
!     /*
!      * Convert IP addresses to network byte order, and remove
!      * duplicate IP addresses from the interface list, and 
!      * determine whether or not the incoming addr/port is 
!      * listed.  Note that if the address matches it is not
!      * truly a match because the port number for the entries
!      * in the interface list are port 7001 and the port number
!      * for this connection might not be 7001.
       */
      for (i = 0, count = 0, found = 0; i < number; i++) {
  	interf->addr_in[i] = htonl(interf->addr_in[i]);
***************
*** 2680,2686 ****
  	}
  	if (j == count) {
  	    interf->addr_in[count] = interf->addr_in[i];
! 	    if (interf->addr_in[count] == myAddr)
  		found = 1;
  	    count++;
  	}
--- 2948,2955 ----
  	}
  	if (j == count) {
  	    interf->addr_in[count] = interf->addr_in[i];
! 	    if (interf->addr_in[count] == myAddr &&
!                 port7001 == myPort)
  		found = 1;
  	    count++;
  	}
***************
*** 2694,2724 ****
  	    malloc(sizeof(struct Interface) +
  		   (sizeof(struct AddrPort) * (count - 1)));
  	if (!interface) {
! 	    ViceLog(0, ("Failed malloc in initInterfaceAddr_r\n"));
  	    assert(0);
  	}
  	interface->numberOfInterfaces = count;
      } else {
  	interface = (struct Interface *)
  	    malloc(sizeof(struct Interface) + (sizeof(struct AddrPort) * count));
! 	assert(interface);
  	interface->numberOfInterfaces = count + 1;
  	interface->interface[count].addr = myAddr;
  	interface->interface[count].port = myPort;
      }
!     interface->uuid = interf->uuid;
      for (i = 0; i < count; i++) {
! 	interface->interface[i].addr = interf->addr_in[i];
! 	/* We store the port as 7001 because the addresses reported by 
  	 * TellMeAboutYourself and WhoAreYou RPCs are only valid if they
  	 * are coming from fully connected hosts (no NAT/PATs)
  	 */
! 	interface->interface[i].port = htons(7001);
      }
  
      assert(!host->interface);
      host->interface = interface;
  
      for (i = 0; i < host->interface->numberOfInterfaces; i++) {
  	ViceLog(125, ("--- alt address %s:%d\n", 
  		       afs_inet_ntoa_r(host->interface->interface[i].addr, hoststr),
--- 2963,3004 ----
  	    malloc(sizeof(struct Interface) +
  		   (sizeof(struct AddrPort) * (count - 1)));
  	if (!interface) {
! 	    ViceLog(0, ("Failed malloc in initInterfaceAddr_r 1\n"));
  	    assert(0);
  	}
  	interface->numberOfInterfaces = count;
      } else {
  	interface = (struct Interface *)
  	    malloc(sizeof(struct Interface) + (sizeof(struct AddrPort) * count));
! 	if (!interface) {
! 	    ViceLog(0, ("Failed malloc in initInterfaceAddr_r 2\n"));
! 	    assert(0);
! 	}
  	interface->numberOfInterfaces = count + 1;
  	interface->interface[count].addr = myAddr;
  	interface->interface[count].port = myPort;
+         interface->interface[count].valid = 1;
      }
! 
      for (i = 0; i < count; i++) {
! 
!         interface->interface[i].addr = interf->addr_in[i];
! 	/* We store the port as 7001 because the addresses reported by
  	 * TellMeAboutYourself and WhoAreYou RPCs are only valid if they
  	 * are coming from fully connected hosts (no NAT/PATs)
  	 */
! 	interface->interface[i].port = port7001;
!         interface->interface[i].valid = 1;      /* valid until a conflict is found */
      }
  
+     interface->uuid = interf->uuid;
+ 
      assert(!host->interface);
      host->interface = interface;
  
+     afsUUID_to_string(&interface->uuid, uuidstr, 127);
+ 
+     ViceLog(125, ("--- uuid %s\n", uuidstr));
      for (i = 0; i < host->interface->numberOfInterfaces; i++) {
  	ViceLog(125, ("--- alt address %s:%d\n", 
  		       afs_inet_ntoa_r(host->interface->interface[i].addr, hoststr),
***************
*** 2730,2742 ****
  
  /* deleted a HashChain structure for this address and host */
  /* returns 1 on success */
! static int
! hashDelete_r(afs_uint32 addr, afs_uint16 port, struct host *host)
  {
      int flag;
!     register struct h_hashChain **hp, *th;
  
!     for (hp = &hostHashTable[h_HashIndex(addr)]; (th = *hp);) {
  	assert(th->hostPtr);
  	if (th->hostPtr == host && th->addr == addr && th->port == port) {
  	    *hp = th->next;
--- 3010,3023 ----
  
  /* deleted a HashChain structure for this address and host */
  /* returns 1 on success */
! int
! hashDelete_r(afs_uint32 addr, afs_uint16 port, struct host *
! 				host)
  {
      int flag;
!     register struct h_AddrHashChain **hp, *th;
  
!     for (hp = &hostAddrHashTable[h_HashIndex(addr)]; (th = *hp);) {
  	assert(th->hostPtr);
  	if (th->hostPtr == host && th->addr == addr && th->port == port) {
  	    *hp = th->next;
***************
*** 2764,2773 ****
      if (host->interface) {
  	/* check alternate addresses */
  	number = host->interface->numberOfInterfaces;
! 	assert(number > 0);
! 	for (i = 0; i < number; i++)
! 	    ViceLog(level, ("%s:%d ", afs_inet_ntoa_r(host->interface->interface[i].addr, hoststr),
! 			     ntohs(host->interface->interface[i].port)));
      }
      ViceLog(level, ("\n"));
  }
--- 3045,3057 ----
      if (host->interface) {
  	/* check alternate addresses */
  	number = host->interface->numberOfInterfaces;
!         if (number == 0)
!             ViceLog(level, ("no-addresses "));
!         else {
!             for (i = 0; i < number; i++)
!                 ViceLog(level, ("%s:%d ", afs_inet_ntoa_r(host->interface->interface[i].addr, hoststr),
!                                 ntohs(host->interface->interface[i].port)));
!         }
      }
      ViceLog(level, ("\n"));
  }
Index: openafs/src/viced/host.h
diff -c openafs/src/viced/host.h:1.9.2.10 openafs/src/viced/host.h:1.9.2.12
*** openafs/src/viced/host.h:1.9.2.10	Mon Jul 31 13:15:49 2006
--- openafs/src/viced/host.h	Wed Aug  8 16:36:18 2007
***************
*** 52,57 ****
--- 52,58 ----
  struct AddrPort  {
      afs_uint32 addr;		/* in network byte order */
      afs_uint16 port;		/* in network byte order */
+     afs_int16  valid;
  };
  
  struct Interface {
***************
*** 103,115 ****
  /* * Don't zero the index, lock or condition varialbles */
  #define HOST_TO_ZERO(H) (int)(((char *)(&((H)->index))-(char *)(H)))
  
! struct h_hashChain {
      struct host *hostPtr;
!     struct h_hashChain *next;
      afs_uint32 addr;
      afs_uint16 port;
  };
  
  struct client {
      struct client *next;	/* next client entry for host */
      struct host *host;		/* ptr to parent host entry */
--- 104,121 ----
  /* * Don't zero the index, lock or condition varialbles */
  #define HOST_TO_ZERO(H) (int)(((char *)(&((H)->index))-(char *)(H)))
  
! struct h_AddrHashChain {
      struct host *hostPtr;
!     struct h_AddrHashChain *next;
      afs_uint32 addr;
      afs_uint16 port;
  };
  
+ struct h_UuidHashChain {
+     struct host *hostPtr;
+     struct h_UuidHashChain *next;
+ };
+ 
  struct client {
      struct client *next;	/* next client entry for host */
      struct host *host;		/* ptr to parent host entry */
***************
*** 216,221 ****
--- 222,235 ----
  extern void h_GetWorkStats();
  extern void h_flushhostcps(register afs_uint32 hostaddr,
  			   register afs_uint16 hport);
+ extern void hashInsertUuid_r(struct afsUUID *uuid, struct host *host);
+ extern void hashInsert_r(afs_uint32 addr, afs_uint16 port, struct host *host);
+ extern int hashDelete_r(afs_uint32 addr, afs_uint16 port, struct host *host);
+ extern int initInterfaceAddr_r(struct host *host, struct interfaceAddr *interf);
+ extern int addInterfaceAddr_r(struct host *host, afs_uint32 addr, afs_uint16 port);
+ extern int removeInterfaceAddr_r(struct host *host, afs_uint32 addr, afs_uint16 port);
+ extern int removeAddress_r(struct host *host, afs_uint32 addr, afs_uint16 port);
+ 
  struct Interface *MultiVerifyInterface_r();
  
  struct host *(hosttableptrs[h_MAXHOSTTABLES]);	/* Used by h_itoh */
***************
*** 241,245 ****
  #define RESETDONE			0x40	/* callback reset done */
  #define HFE_LATER                       0x80	/* host has FE_LATER callbacks */
  #define HERRORTRANS                    0x100	/* do error translation */
! 
! 
--- 255,258 ----
  #define RESETDONE			0x40	/* callback reset done */
  #define HFE_LATER                       0x80	/* host has FE_LATER callbacks */
  #define HERRORTRANS                    0x100	/* do error translation */
! #define HWHO_INPROGRESS                0x200    /* set when WhoAreYou running */
Index: openafs/src/vol/clone.c
diff -c openafs/src/vol/clone.c:1.17.2.4 openafs/src/vol/clone.c:1.17.2.5
*** openafs/src/vol/clone.c:1.17.2.4	Fri Oct  6 08:33:57 2006
--- openafs/src/vol/clone.c	Fri May 18 01:55:13 2007
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/clone.c,v 1.17.2.4 2006/10/06 12:33:57 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/clone.c,v 1.17.2.5 2007/05/18 05:55:13 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
***************
*** 403,417 ****
  }
  
  void
! CloneVolume(Error * error, Volume * original, Volume * new, Volume * old)
! {
!     VOL_LOCK;
!     CloneVolume_r(error, original, new, old);
!     VOL_UNLOCK;
! }
! 
! void
! CloneVolume_r(Error * rerror, Volume * original, Volume * new, Volume * old)
  {
      afs_int32 code, error = 0;
      afs_int32 reclone;
--- 403,409 ----
  }
  
  void
! CloneVolume(Error * rerror, Volume * original, Volume * new, Volume * old)
  {
      afs_int32 code, error = 0;
      afs_int32 reclone;
***************
*** 426,432 ****
      if (code)
  	ERROR_EXIT(code);
  
!     code = CopyVolumeHeader_r(&V_disk(original), &V_disk(new));
      if (code)
  	ERROR_EXIT(code);
  
--- 418,424 ----
      if (code)
  	ERROR_EXIT(code);
  
!     code = CopyVolumeHeader(&V_disk(original), &V_disk(new));
      if (code)
  	ERROR_EXIT(code);
  
Index: openafs/src/vol/fssync.c
diff -c openafs/src/vol/fssync.c:1.26.2.6 openafs/src/vol/fssync.c:1.26.2.7
*** openafs/src/vol/fssync.c:1.26.2.6	Thu Feb  8 18:59:47 2007
--- openafs/src/vol/fssync.c	Sat Jun 23 09:46:53 2007
***************
*** 51,57 ****
  #include <afs/afsutil.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/Attic/fssync.c,v 1.26.2.6 2007/02/08 23:59:47 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
--- 51,57 ----
  #include <afs/afsutil.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/Attic/fssync.c,v 1.26.2.7 2007/06/23 13:46:53 shadow Exp $");
  
  #include <sys/types.h>
  #include <stdio.h>
***************
*** 162,168 ****
  struct Lock FSYNC_handler_lock;
  
  int
! FSYNC_clientInit(void)
  {
  #ifdef USE_UNIX_SOCKETS
      struct sockaddr_un addr;
--- 162,168 ----
  struct Lock FSYNC_handler_lock;
  
  int
! FSYNC_clientInit(int f)
  {
  #ifdef USE_UNIX_SOCKETS
      struct sockaddr_un addr;
***************
*** 178,183 ****
--- 178,187 ----
  	FS_sd = getport(&addr);
  	if (connect(FS_sd, (struct sockaddr *)&addr, sizeof(addr)) >= 0)
  	    return 1;
+ 	if (!f) {
+ 	    FSYNC_clientFinis();
+ 	    return 0;
+ 	}
  	if (!*timeout)
  	    break;
  	if (!(*timeout & 1))
***************
*** 206,211 ****
--- 210,216 ----
      byte response;
      struct command command;
      int n;
+     int retrycount = 8;
      command.volume = volume;
      command.command = com;
      command.reason = reason;
***************
*** 213,250 ****
  	strcpy(command.partName, partName);
      else
  	command.partName[0] = 0;
-     assert(FS_sd != -1);
      VFSYNC_LOCK;
  #ifdef AFS_NT40_ENV
!     if (send(FS_sd, (char *)&command, sizeof(command), 0) != sizeof(command)) {
! 	printf("FSYNC_askfs: write to file server failed\n");
  	response = FSYNC_DENIED;
  	goto done;
      }
!     while ((n = recv(FS_sd, &response, 1, 0)) != 1) {
! 	if (n == 0 || WSAEINTR != WSAGetLastError()) {
! 	    printf("FSYNC_askfs: No response from file server\n");
! 	    response = FSYNC_DENIED;
! 	    goto done;
! 	}
!     }
! #else
!     if (write(FS_sd, &command, sizeof(command)) != sizeof(command)) {
! 	printf("FSYNC_askfs: write to file server failed\n");
  	response = FSYNC_DENIED;
  	goto done;
      }
-     while ((n = read(FS_sd, &response, 1)) != 1) {
- 	if (n == 0 || errno != EINTR) {
- 	    printf("FSYNC_askfs: No response from file server\n");
- 	    response = FSYNC_DENIED;
- 	    goto done;
- 	}
-     }
- #endif
      if (response == 0) {
! 	printf
! 	    ("FSYNC_askfs: negative response from file server; volume %u, command %d\n",
  	     command.volume, (int)command.command);
      }
    done:
--- 218,259 ----
  	strcpy(command.partName, partName);
      else
  	command.partName[0] = 0;
      VFSYNC_LOCK;
  #ifdef AFS_NT40_ENV
! #define FS_SEND(fd,cmd)	send(fd, (char*)&(cmd), sizeof(cmd), 0)
! #define FS_RECV(fd,resp) recv(fd, &(resp), 1, 0)
! #define FS_PERROR(m)	fprintf(stderr,"%s\n", m)
! #define FS_INTERRUPTED(n)	((n) && WSAEINTR == WSAGetLastError())
! #else
! #define FS_SEND(fd,cmd)	write(fd,&(cmd), sizeof (cmd))
! #define FS_RECV(fd,resp) read(fd, &(resp), 1)
! #define FS_PERROR(m)	perror(m)
! #define FS_INTERRUPTED(n)	(n && errno == EINTR)
! #endif
!     for (;;) {
! 	if (FS_sd != -1) {
! 	    if (FS_SEND(FS_sd, command) == sizeof(command)) break;
! 	    FS_PERROR("FSYNC_askfs: write to file server failed");
! 	}
! 	if (--retrycount > 0) {
! 	    FSYNC_clientFinis();
! 	    if (FSYNC_clientInit(1)) continue;
! 	}
  	response = FSYNC_DENIED;
  	goto done;
      }
!     for (;;) {
! 	errno = 0;
! 	n = FS_RECV(FS_sd, response);
! 	if (n == 1) break;
! 	if (FS_INTERRUPTED(n)) continue;
! 	fprintf(stderr,"FSYNC_askfs: No response from file server\n");
  	response = FSYNC_DENIED;
  	goto done;
      }
      if (response == 0) {
! 	fprintf(stderr,
! 	    "FSYNC_askfs: negative response from file server; volume %u, command %d\n",
  	     command.volume, (int)command.command);
      }
    done:
***************
*** 338,350 ****
      Log("Set thread id %d for FSYNC_sync\n", tid);
  #endif /* AFS_PTHREAD_ENV */
  
- #ifdef USE_UNIX_SOCKETS
-     strcompose(tbuffer, AFSDIR_PATH_MAX, AFSDIR_SERVER_LOCAL_DIRPATH, "/",
-                "fssync.sock", NULL);
-     /* ignore errors */
-     remove(tbuffer);
- #endif /* USE_UNIX_SOCKETS */
- 
      while (!VInit) {
  	/* Let somebody else run until level > 0.  That doesn't mean that 
  	 * all volumes have been attached. */
--- 347,352 ----
***************
*** 366,371 ****
--- 368,382 ----
  	if ((code =
  	     bind(AcceptSd, (struct sockaddr *)&addr, sizeof(addr))) == 0)
  	    break;
+ #ifdef USE_UNIX_SOCKETS
+ 	code = errno;
+ 	if (remove(addr.sun_path) == 0) {
+ 	    Log("FSYNC_sync: bind failed with (%d), removed bogus %s\n",
+ 		code, addr.sun_path);
+ 	    continue;
+ 	}
+ 	errno = code;
+ #endif
  	Log("FSYNC_sync: bind failed with (%d), will sleep and retry\n",
  	    errno);
  	sleep(5);
Index: openafs/src/vol/fssync.h
diff -c openafs/src/vol/fssync.h:1.4 openafs/src/vol/fssync.h:1.4.2.1
*** openafs/src/vol/fssync.h:1.4	Tue Jul 15 19:17:38 2003
--- openafs/src/vol/fssync.h	Sat Jun 23 09:46:53 2007
***************
*** 46,51 ****
  
  /* Prototypes from fssync.c */
  void FSYNC_clientFinis(void);
! int FSYNC_clientInit(void);
  void FSYNC_fsInit(void);
  int FSYNC_askfs(VolumeId volume, char *partName, int com, int reason);
--- 46,51 ----
  
  /* Prototypes from fssync.c */
  void FSYNC_clientFinis(void);
! int FSYNC_clientInit(int);
  void FSYNC_fsInit(void);
  int FSYNC_askfs(VolumeId volume, char *partName, int com, int reason);
Index: openafs/src/vol/ihandle.c
diff -c openafs/src/vol/ihandle.c:1.18.2.1 openafs/src/vol/ihandle.c:1.18.2.3
*** openafs/src/vol/ihandle.c:1.18.2.1	Wed Aug 25 03:14:19 2004
--- openafs/src/vol/ihandle.c	Mon Sep 10 17:55:58 2007
***************
*** 15,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/ihandle.c,v 1.18.2.1 2004/08/25 07:14:19 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
--- 15,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/ihandle.c,v 1.18.2.3 2007/09/10 21:55:58 jaltman Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
***************
*** 154,159 ****
--- 154,177 ----
      }
  #endif
      fdCacheSize = MIN(fdMaxCacheSize, FD_DEFAULT_CACHESIZE);
+ 
+     {
+ 	void *ih_sync_thread();
+ #ifdef AFS_PTHREAD_ENV
+ 	pthread_t syncer;
+ 	pthread_attr_t tattr;
+ 
+ 	pthread_attr_init(&tattr);
+ 	pthread_attr_setdetachstate(&tattr,PTHREAD_CREATE_DETACHED);
+ 
+ 	pthread_create(&syncer, &tattr, ih_sync_thread, NULL);
+ #else /* AFS_PTHREAD_ENV */
+ 	PROCESS syncer;
+ 	LWP_CreateProcess(ih_sync_thread, 16*1024, LWP_MAX_PRIORITY - 2,
+ 	    NULL, "ih_syncer", &syncer);
+ #endif /* AFS_PTHREAD_ENV */
+     }
+ 
  }
  
  /* Make the file descriptor cache as big as possible. Don't this call
***************
*** 840,845 ****
--- 858,924 ----
      return code;
  }
  
+ void
+ ih_sync_all() {
+     int ihash;
+ 
+     IH_LOCK;
+     for (ihash = 0; ihash < I_HANDLE_HASH_SIZE; ihash++) {
+ 	IHandle_t *ihP, *ihPnext;
+ 
+ 	ihP = ihashTable[ihash].ihash_head;
+ 	if (ihP)
+ 	    ihP->ih_refcnt++;	/* must not disappear over unlock */
+ 	for (; ihP; ihP = ihPnext) {
+ 	    
+ 	    if (ihP->ih_synced) {
+ 		FdHandle_t *fdP;
+ 
+ 		ihP->ih_synced = 0;
+ 		IH_UNLOCK;
+ 
+ 		fdP = IH_OPEN(ihP);
+ 		if (fdP) OS_SYNC(fdP->fd_fd);
+ 		FDH_CLOSE(fdP);
+ 
+ 	  	IH_LOCK;
+ 	    }
+ 
+ 	    /* when decrementing the refcount, the ihandle might disappear
+ 	       and we might not even be able to proceed to the next one.
+ 	       Hence the gymnastics putting a hold on the next one already */
+ 	    ihPnext = ihP->ih_next;
+ 	    if (ihPnext) ihPnext->ih_refcnt++;
+ 
+ 	    if (ihP->ih_refcnt > 1) {
+ 		ihP->ih_refcnt--;
+ 	    } else {
+ 		IH_UNLOCK;
+ 		ih_release(ihP);
+ 		IH_LOCK;
+ 	    }
+ 
+ 	}
+     }
+     IH_UNLOCK;
+ }
+ 
+ void *
+ ih_sync_thread() {
+     while(1) {
+ 
+ #ifdef AFS_PTHREAD_ENV
+ 	sleep(10);
+ #else /* AFS_PTHREAD_ENV */
+ 	IOMGR_Sleep(60);
+ #endif /* AFS_PTHREAD_ENV */
+ 
+ #ifndef AFS_NT40_ENV
+         sync();
+ #endif
+         ih_sync_all();
+     }
+ }
  
  
  /*************************************************************************
Index: openafs/src/vol/ihandle.h
diff -c openafs/src/vol/ihandle.h:1.8.2.1 openafs/src/vol/ihandle.h:1.8.2.2
*** openafs/src/vol/ihandle.h:1.8.2.1	Wed Aug 25 03:14:19 2004
--- openafs/src/vol/ihandle.h	Fri Sep  7 00:05:49 2007
***************
*** 211,216 ****
--- 211,217 ----
      int ih_vid;			/* Parent volume id. */
      int ih_dev;			/* device id. */
      int ih_flags;		/* Flags */
+     int ih_synced;		/* should be synced next time */
      Inode ih_ino;		/* Inode number */
      int ih_refcnt;		/* reference count */
      struct FdHandle_s *ih_fdhead;	/* List of open file desciptors */
***************
*** 466,472 ****
  #define FDH_WRITE(H, B, S) OS_WRITE((H)->fd_fd, B, S)
  #define FDH_SEEK(H, O, F) OS_SEEK((H)->fd_fd, O, F)
  
! #define FDH_SYNC(H) OS_SYNC((H)->fd_fd)
  #define FDH_TRUNC(H, L) OS_TRUNC((H)->fd_fd, L)
  #define FDH_SIZE(H) OS_SIZE((H)->fd_fd)
  
--- 467,473 ----
  #define FDH_WRITE(H, B, S) OS_WRITE((H)->fd_fd, B, S)
  #define FDH_SEEK(H, O, F) OS_SEEK((H)->fd_fd, O, F)
  
! #define FDH_SYNC(H) ((H->fd_ih!=NULL) ? ( H->fd_ih->ih_synced = 1) - 1 : 1)
  #define FDH_TRUNC(H, L) OS_TRUNC((H)->fd_fd, L)
  #define FDH_SIZE(H) OS_SIZE((H)->fd_fd)
  
Index: openafs/src/vol/namei_ops.c
diff -c openafs/src/vol/namei_ops.c:1.21.2.10 openafs/src/vol/namei_ops.c:1.21.2.13
*** openafs/src/vol/namei_ops.c:1.21.2.10	Wed Sep 20 01:52:35 2006
--- openafs/src/vol/namei_ops.c	Tue Sep 11 11:40:26 2007
***************
*** 13,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/namei_ops.c,v 1.21.2.10 2006/09/20 05:52:35 shadow Exp $");
  
  #ifdef AFS_NAMEI_ENV
  #include <stdio.h>
--- 13,19 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/namei_ops.c,v 1.21.2.13 2007/09/11 15:40:26 shadow Exp $");
  
  #ifdef AFS_NAMEI_ENV
  #include <stdio.h>
***************
*** 604,609 ****
--- 604,611 ----
  
      if (p2 == -1 && p3 == VI_LINKTABLE) {
  	/* hack at tmp to setup for set link count call. */
+ 	memset((void *)&tfd, 0, sizeof(FdHandle_t));	/* minimalistic still, but a little cleaner */
+ 	tfd.fd_ih = &tmp;
  	tfd.fd_fd = fd;
  	code = namei_SetLinkCount(&tfd, (Inode) 0, 1, 0);
      }
***************
*** 1144,1149 ****
--- 1146,1153 ----
      int ninodes;
      struct afs_stat status;
  
+     *forcep = 0; /* no need to salvage until further notice */
+ 
      if (resultFile) {
  	fp = afs_fopen(resultFile, "w");
  	if (!fp) {
***************
*** 1443,1448 ****
--- 1447,1453 ----
      char fpath[512];
      struct afs_stat status;
      int parm, tag;
+     lb64_string_t check;
  
      (void)strcpy(fpath, dpath);
      (void)strcat(fpath, "/");
***************
*** 1455,1460 ****
--- 1460,1469 ----
      info->byteCount = status.st_size;
      info->inodeNumber = (Inode) flipbase64_to_int64(name);
  
+     int64_to_flipbase64(check, info->inodeNumber);
+     if (strcmp(name, check))
+ 	return -1;
+     
      GetOGMFromStat(&status, &parm, &tag);
      if ((info->inodeNumber & NAMEI_INODESPECIAL) == NAMEI_INODESPECIAL) {
  	/* p1 - vid, p2 - -1, p3 - type, p4 - rwvid */
Index: openafs/src/vol/partition.c
diff -c openafs/src/vol/partition.c:1.30.2.2 openafs/src/vol/partition.c:1.30.2.4
*** openafs/src/vol/partition.c:1.30.2.2	Mon Oct 17 16:47:07 2005
--- openafs/src/vol/partition.c	Thu May 10 18:44:12 2007
***************
*** 21,27 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/partition.c,v 1.30.2.2 2005/10/17 20:47:07 shadow Exp $");
  
  #include <ctype.h>
  #ifdef AFS_NT40_ENV
--- 21,27 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/partition.c,v 1.30.2.4 2007/05/10 22:44:12 shadow Exp $");
  
  #include <ctype.h>
  #ifdef AFS_NT40_ENV
***************
*** 437,446 ****
      }
      while (!getmntent(mntfile, &mnt)) {
  	/* Ignore non ufs or non read/write partitions */
! 	if ((strcmp(mnt.mnt_fstype, "ufs") != 0)
  	    || (strncmp(mnt.mnt_mntopts, "ro,ignore", 9) == 0))
  	    continue;
! 
  	/* If we're going to always attach this partition, do it later. */
  	if (VIsAlwaysAttach(mnt.mnt_mountp))
  	    continue;
--- 437,453 ----
      }
      while (!getmntent(mntfile, &mnt)) {
  	/* Ignore non ufs or non read/write partitions */
! 	/* but allow zfs too if we're in the NAMEI environment */
! 	if (
! #ifdef AFS_NAMEI_ENV
! 	    ((!(strcmp(mnt.mnt_fstype, "ufs") &&
! 		strcmp(mnt.mnt_fstype, "zfs"))))
! #else
! 	    (strcmp(mnt.mnt_fstype, "ufs") != 0)
! #endif
  	    || (strncmp(mnt.mnt_mntopts, "ro,ignore", 9) == 0))
  	    continue;
! 	
  	/* If we're going to always attach this partition, do it later. */
  	if (VIsAlwaysAttach(mnt.mnt_mountp))
  	    continue;
Index: openafs/src/vol/vol-salvage.c
diff -c openafs/src/vol/vol-salvage.c:1.41.2.12 openafs/src/vol/vol-salvage.c:1.41.2.13
*** openafs/src/vol/vol-salvage.c:1.41.2.12	Tue Sep  5 19:48:50 2006
--- openafs/src/vol/vol-salvage.c	Fri Sep  7 00:05:49 2007
***************
*** 92,98 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/vol-salvage.c,v 1.41.2.12 2006/09/05 23:48:50 jaltman 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.13 2007/09/07 04:05:49 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
***************
*** 2875,2880 ****
--- 2875,2881 ----
  		  vnodeIndexOffset(vcp, dir->vnodeNumber), (char *)&vnode,
  		  sizeof(vnode));
      assert(lcode == sizeof(vnode));
+ #if 0
  #ifdef AFS_NT40_ENV
      nt_sync(fileSysDevice);
  #else
***************
*** 2882,2887 ****
--- 2883,2891 ----
  				 * an open FD on the file itself to fsync.
  				 */
  #endif
+ #else
+     vnodeInfo[vLarge].handle->ih_synced = 1;
+ #endif
      code = IH_DEC(dir->ds_linkH, oldinode, dir->rwVid);
      assert(code == 0);
      dir->dirHandle = newdir;
***************
*** 3345,3350 ****
--- 3349,3359 ----
  	SalvageDir(volHeader.name, vid, dirVnodeInfo, alinkH, i, &rootdir,
  		   &rootdirfound);
      }
+ #ifdef AFS_NT40_ENV
+     nt_sync(fileSysDevice);
+ #else
+     sync();				/* This used to be done lower level, for every dir */
+ #endif
      if (Showmode) {
  	IH_RELEASE(h);
  	return 0;
Index: openafs/src/vol/volume.c
diff -c openafs/src/vol/volume.c:1.35.2.9 openafs/src/vol/volume.c:1.35.2.10
*** openafs/src/vol/volume.c:1.35.2.9	Sat Oct 21 22:02:01 2006
--- openafs/src/vol/volume.c	Sat Jun 23 09:46:53 2007
***************
*** 20,26 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/volume.c,v 1.35.2.9 2006/10/22 02:02:01 jaltman Exp $");
  
  #include <rx/xdr.h>
  #include <afs/afsint.h>
--- 20,26 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/volume.c,v 1.35.2.10 2007/06/23 13:46:53 shadow Exp $");
  
  #include <rx/xdr.h>
  #include <afs/afsint.h>
***************
*** 379,387 ****
      VInit = 2;			/* Initialized, and all volumes have been attached */
      if (programType == volumeUtility && connect) {
  	if (!VConnectFS()) {
! 	    Log("Unable to connect to file server; aborted\n");
  	    Lock_Destroy(&FSYNC_handler_lock);
  	    exit(1);
  	}
      }
      return 0;
--- 379,389 ----
      VInit = 2;			/* Initialized, and all volumes have been attached */
      if (programType == volumeUtility && connect) {
  	if (!VConnectFS()) {
! 	    Log("Unable to connect to file server; will retry at need\n");
! #if 0
  	    Lock_Destroy(&FSYNC_handler_lock);
  	    exit(1);
+ #endif
  	}
      }
      return 0;
***************
*** 457,473 ****
  {
      int retVal;
      VOL_LOCK;
!     retVal = VConnectFS_r();
      VOL_UNLOCK;
      return retVal;
  }
  
  int
! VConnectFS_r(void)
  {
      int rc;
      assert(VInit == 2 && programType == volumeUtility);
!     rc = FSYNC_clientInit();
      if (rc)
  	VInit = 3;
      return rc;
--- 459,475 ----
  {
      int retVal;
      VOL_LOCK;
!     retVal = VConnectFS_r(0);
      VOL_UNLOCK;
      return retVal;
  }
  
  int
! VConnectFS_r(int f)
  {
      int rc;
      assert(VInit == 2 && programType == volumeUtility);
!     rc = FSYNC_clientInit(f);
      if (rc)
  	VInit = 3;
      return rc;
***************
*** 700,706 ****
      int isbusy = 0;
      *ec = 0;
      if (programType == volumeUtility) {
! 	assert(VInit == 3);
  	VLockPartition_r(partition);
      }
      if (programType == fileServer) {
--- 702,708 ----
      int isbusy = 0;
      *ec = 0;
      if (programType == volumeUtility) {
! 	assert(VInit == 3 || VConnectFS_r(1));
  	VLockPartition_r(partition);
      }
      if (programType == fileServer) {
Index: openafs/src/vol/volume.h
diff -c openafs/src/vol/volume.h:1.14.2.3 openafs/src/vol/volume.h:1.14.2.4
*** openafs/src/vol/volume.h:1.14.2.3	Mon May 30 00:41:29 2005
--- openafs/src/vol/volume.h	Sat Jun 23 09:46:53 2007
***************
*** 419,425 ****
  extern void VOffline(Volume * vp, char *message);
  extern void VOffline_r(Volume * vp, char *message);
  extern int VConnectFS(void);
! extern int VConnectFS_r(void);
  extern Volume *VAttachVolume(Error * ec, VolumeId volumeId, int mode);
  extern Volume *VAttachVolume_r(Error * ec, VolumeId volumeId, int mode);
  extern Volume *VCreateVolume(Error * ec, char *partname, VolId volumeId,
--- 419,425 ----
  extern void VOffline(Volume * vp, char *message);
  extern void VOffline_r(Volume * vp, char *message);
  extern int VConnectFS(void);
! extern int VConnectFS_r(int);
  extern Volume *VAttachVolume(Error * ec, VolumeId volumeId, int mode);
  extern Volume *VAttachVolume_r(Error * ec, VolumeId volumeId, int mode);
  extern Volume *VCreateVolume(Error * ec, char *partname, VolId volumeId,
Index: openafs/src/volser/common.c
diff -c openafs/src/volser/common.c:1.10 openafs/src/volser/common.c:1.10.2.1
*** openafs/src/volser/common.c:1.10	Fri Nov 14 23:59:16 2003
--- openafs/src/volser/common.c	Tue Apr 10 14:43:47 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/common.c,v 1.10 2003/11/15 04:59:16 shadow Exp $");
  
  #include <stdio.h>
  #include <afs/afsutil.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/common.c,v 1.10.2.1 2007/04/10 18:43:47 shadow Exp $");
  
  #include <stdio.h>
  #include <afs/afsutil.h>
***************
*** 33,39 ****
  LogError(afs_int32 errcode)
  {
      ViceLog(0,
! 	    ("%s: %s\n", error_table_name(errcode), error_message(errcode)));
  }
  
  #ifndef AFS_PTHREAD_ENV
--- 33,39 ----
  LogError(afs_int32 errcode)
  {
      ViceLog(0,
! 	    ("%s: %s\n", afs_error_table_name(errcode), afs_error_message(errcode)));
  }
  
  #ifndef AFS_PTHREAD_ENV
Index: openafs/src/volser/volint.xg
diff -c openafs/src/volser/volint.xg:1.4 openafs/src/volser/volint.xg:1.4.2.1
*** openafs/src/volser/volint.xg:1.4	Thu Jun 19 12:06:58 2003
--- openafs/src/volser/volint.xg	Thu Jul 19 14:52:40 2007
***************
*** 49,54 ****
--- 49,58 ----
  #define	    VOLFORWARDMULTIPLE  128
  #define     VOLCONVERTRO        65536
  #define     VOLGETSIZE          65537
+ #define     VOLDUMPV2           65538
+ 
+ /* Bits for flags for DumpV2 */
+ %#define     VOLDUMPV2_OMITDIRS 1
  
  const SIZE = 1024;
  
***************
*** 408,410 ****
--- 412,421 ----
    IN afs_int32 fromDate,
    OUT struct volintSize *size
  ) = VOLGETSIZE;
+ 
+ proc DumpV2(
+   IN afs_int32 fromTrans,
+   IN afs_int32 fromDate,
+   IN afs_int32 flags
+ ) split = VOLDUMPV2;
+ 
Index: openafs/src/volser/volmain.c
diff -c openafs/src/volser/volmain.c:1.18.2.8 openafs/src/volser/volmain.c:1.18.2.9
*** openafs/src/volser/volmain.c:1.18.2.8	Sun Sep  3 01:51:42 2006
--- openafs/src/volser/volmain.c	Wed Jun 27 22:13:44 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/volmain.c,v 1.18.2.8 2006/09/03 05:51:42 shadow 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.9 2007/06/28 02:13:44 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 422,427 ****
--- 422,431 ----
  	exit(1);
      }
  #endif
+     /* Open VolserLog and map stdout, stderr into it; VInitVolumePackage can
+        log, so we need to do this here */
+     OpenLog(AFSDIR_SERVER_VOLSERLOG_FILEPATH);
+ 
      VInitVolumePackage(volumeUtility, 0, 0, CONNECT_FS, 0);
      /* For nuke() */
      Lock_Init(&localLock);
***************
*** 471,478 ****
      rx_SetRxDeadTime(420);
      memset(busyFlags, 0, sizeof(busyFlags));
  
-     /* Open FileLog and map stdout, stderr into it */
-     OpenLog(AFSDIR_SERVER_VOLSERLOG_FILEPATH);
      SetupLogSignals();
  
      {
--- 475,480 ----
Index: openafs/src/volser/volprocs.c
diff -c openafs/src/volser/volprocs.c:1.34.2.7 openafs/src/volser/volprocs.c:1.34.2.8
*** openafs/src/volser/volprocs.c:1.34.2.7	Mon Dec 18 22:40:14 2006
--- openafs/src/volser/volprocs.c	Thu Jul 19 14:52:40 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/volprocs.c,v 1.34.2.7 2006/12/19 03:40:14 jaltman Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/volprocs.c,v 1.34.2.8 2007/07/19 18:52:40 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
***************
*** 1279,1291 ****
  {
      afs_int32 code;
  
!     code = VolDump(acid, fromTrans, fromDate);
      osi_auditU(acid, VS_DumpEvent, code, AUD_LONG, fromTrans, AUD_END);
      return code;
  }
  
  afs_int32
! VolDump(struct rx_call *acid, afs_int32 fromTrans, afs_int32 fromDate)
  {
      int code = 0;
      register struct volser_trans *tt;
--- 1279,1301 ----
  {
      afs_int32 code;
  
!     code = VolDump(acid, fromTrans, fromDate, 0);
      osi_auditU(acid, VS_DumpEvent, code, AUD_LONG, fromTrans, AUD_END);
      return code;
  }
  
  afs_int32
! SAFSVolDumpV2(struct rx_call *acid, afs_int32 fromTrans, afs_int32 fromDate, afs_int32 flags)
! {
!     afs_int32 code;
! 
!     code = VolDump(acid, fromTrans, fromDate, flags);
!     osi_auditU(acid, VS_DumpEvent, code, AUD_LONG, fromTrans, AUD_END);
!     return code;
! }
! 
! afs_int32
! VolDump(struct rx_call *acid, afs_int32 fromTrans, afs_int32 fromDate, afs_int32 flags)
  {
      int code = 0;
      register struct volser_trans *tt;
***************
*** 1303,1309 ****
      }
      strcpy(tt->lastProcName, "Dump");
      tt->rxCallPtr = acid;
!     code = DumpVolume(acid, tt->volume, fromDate, 1);	/* squirt out the volume's data, too */
      if (code) {
  	tt->rxCallPtr = (struct rx_call *)0;
  	TRELE(tt);
--- 1313,1320 ----
      }
      strcpy(tt->lastProcName, "Dump");
      tt->rxCallPtr = acid;
!     code = DumpVolume(acid, tt->volume, fromDate, (flags & VOLDUMPV2_OMITDIRS)
! 		      ? 0 : 1);	/* squirt out the volume's data, too */
      if (code) {
  	tt->rxCallPtr = (struct rx_call *)0;
  	TRELE(tt);
Index: openafs/src/volser/volser_prototypes.h
diff -c openafs/src/volser/volser_prototypes.h:1.4.2.1 openafs/src/volser/volser_prototypes.h:1.4.2.2
*** openafs/src/volser/volser_prototypes.h:1.4.2.1	Tue Nov  9 12:13:45 2004
--- openafs/src/volser/volser_prototypes.h	Thu Jul 19 14:52:40 2007
***************
*** 47,53 ****
  extern void dump_sig_handler(int x);
  extern int UV_DumpVolume(afs_int32 afromvol, afs_int32 afromserver,
  			 afs_int32 afrompart, afs_int32 fromdate,
! 			 afs_int32(*DumpFunction) (), char *rock);
  extern int UV_RestoreVolume(afs_int32 toserver, afs_int32 topart,
  			    afs_int32 tovolid, char tovolname[], int flags,
  			    afs_int32(*WriteData) (), char *rock);
--- 47,53 ----
  extern void dump_sig_handler(int x);
  extern int UV_DumpVolume(afs_int32 afromvol, afs_int32 afromserver,
  			 afs_int32 afrompart, afs_int32 fromdate,
! 			 afs_int32(*DumpFunction) (), char *rock, afs_int32 flags);
  extern int UV_RestoreVolume(afs_int32 toserver, afs_int32 topart,
  			    afs_int32 tovolid, char tovolname[], int flags,
  			    afs_int32(*WriteData) (), char *rock);
Index: openafs/src/volser/voltrans.c
diff -c openafs/src/volser/voltrans.c:1.10.2.1 openafs/src/volser/voltrans.c:1.10.2.2
*** openafs/src/volser/voltrans.c:1.10.2.1	Mon Oct 18 03:12:29 2004
--- openafs/src/volser/voltrans.c	Thu Mar 22 12:01:16 2007
***************
*** 18,24 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/voltrans.c,v 1.10.2.1 2004/10/18 07:12:29 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <afs/afsutil.h>
--- 18,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/voltrans.c,v 1.10.2.2 2007/03/22 16:01:16 shadow Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <afs/afsutil.h>
***************
*** 138,158 ****
      register struct volser_trans *tt, **lt;
      afs_int32 error;
  
      if (atrans->refCount > 1) {
  	/* someone else is using it now */
  	atrans->refCount--;
  	atrans->tflags |= TTDeleted;
  	return 0;
      }
  
      /* otherwise we zap it ourselves */
-     if (lock) VTRANS_LOCK;
      lt = &allTrans;
      for (tt = *lt; tt; lt = &tt->next, tt = *lt) {
  	if (tt == atrans) {
  	    if (tt->volume)
  		VDetachVolume(&error, tt->volume);
  	    tt->volume = NULL;
  	    *lt = tt->next;
  	    free(tt);
  	    if (lock) VTRANS_UNLOCK;
--- 138,161 ----
      register struct volser_trans *tt, **lt;
      afs_int32 error;
  
+     if (lock) VTRANS_LOCK;
      if (atrans->refCount > 1) {
  	/* someone else is using it now */
  	atrans->refCount--;
  	atrans->tflags |= TTDeleted;
+ 	if (lock) VTRANS_UNLOCK;
  	return 0;
      }
  
      /* otherwise we zap it ourselves */
      lt = &allTrans;
      for (tt = *lt; tt; lt = &tt->next, tt = *lt) {
  	if (tt == atrans) {
  	    if (tt->volume)
  		VDetachVolume(&error, tt->volume);
  	    tt->volume = NULL;
+ 	    if (tt->rxCallPtr)
+ 		rxi_CallError(tt->rxCallPtr, RX_CALL_DEAD);
  	    *lt = tt->next;
  	    free(tt);
  	    if (lock) VTRANS_UNLOCK;
***************
*** 169,186 ****
  afs_int32 
  TRELE(register struct volser_trans *at)
  {
      if (at->refCount == 0) {
  	Log("TRELE: bad refcount\n");
  	return VOLSERTRELE_ERROR;
      }
  
      at->time = FT_ApproxTime();	/* we're still using it */
      if (at->refCount == 1 && (at->tflags & TTDeleted)) {
! 	DeleteTrans(at, 1);
  	return 0;
      }
      /* otherwise simply drop refcount */
      at->refCount--;
      return 0;
  }
  
--- 172,193 ----
  afs_int32 
  TRELE(register struct volser_trans *at)
  {
+     VTRANS_LOCK;
      if (at->refCount == 0) {
  	Log("TRELE: bad refcount\n");
+ 	VTRANS_UNLOCK;
  	return VOLSERTRELE_ERROR;
      }
  
      at->time = FT_ApproxTime();	/* we're still using it */
      if (at->refCount == 1 && (at->tflags & TTDeleted)) {
! 	DeleteTrans(at, 0);
! 	VTRANS_UNLOCK;
  	return 0;
      }
      /* otherwise simply drop refcount */
      at->refCount--;
+     VTRANS_UNLOCK;
      return 0;
  }
  
Index: openafs/src/volser/vos.c
diff -c openafs/src/volser/vos.c:1.40.2.15 openafs/src/volser/vos.c:1.40.2.19
*** openafs/src/volser/vos.c:1.40.2.15	Mon Jul 31 11:24:09 2006
--- openafs/src/volser/vos.c	Thu Jul 19 14:52:40 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/vos.c,v 1.40.2.15 2006/07/31 15:24:09 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/vos.c,v 1.40.2.19 2007/07/19 18:52:40 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 57,63 ****
--- 57,68 ----
  #include <rx/rxkad.h>
  #include "volser.h"
  #include "volint.h"
+ #include <afs/ihandle.h>
+ #include <afs/vnode.h>
+ #include <afs/volume.h>
+ #include "dump.h"
  #include "lockdata.h"
+ 
  #ifdef	AFS_AIX32_ENV
  #include <signal.h>
  #endif
***************
*** 315,320 ****
--- 320,328 ----
      long blksize;
      afs_int32 error, code;
      int ufdIsOpen = 0;
+     afs_hyper_t filesize, currOffset; 
+     afs_uint32 buffer;		
+     afs_uint32 got; 		
  
      error = 0;
  
***************
*** 335,340 ****
--- 343,362 ----
  	    goto wfail;
  	}
      }
+     /* test if we have a valid dump */
+     hset64(filesize, 0, 0);
+     USD_SEEK(ufd, filesize, SEEK_END, &currOffset);
+     hset64(filesize, hgethi(currOffset), hgetlo(currOffset)-sizeof(afs_uint32));
+     USD_SEEK(ufd, filesize, SEEK_SET, &currOffset);
+     USD_READ(ufd, &buffer, sizeof(afs_uint32), &got);
+     if ((got != sizeof(afs_uint32)) || (ntohl(buffer) != DUMPENDMAGIC)) {
+ 	fprintf(STDERR, "Signature missing from end of file '%s'\n", filename);
+         error = VOLSERBADOP;
+         goto wfail;
+     }
+     hset64(filesize, 0, 0);
+     USD_SEEK(ufd, filesize, SEEK_SET, &currOffset);
+     /* rewind, we are done */
      code = SendFile(ufd, call, blksize);
      if (code) {
  	error = code;
***************
*** 2782,2789 ****
       register struct cmd_syndesc *as;
  
  {
!     afs_int32 avolid, aserver, apart, voltype, fromdate = 0, code, err, i;
!     char filename[NameLen];
      struct nvldbentry entry;
  
      rx_SetRxDeadTime(60 * 10);
--- 2804,2811 ----
       register struct cmd_syndesc *as;
  
  {
!     afs_int32 avolid, aserver, apart, voltype, fromdate = 0, code, err, i, flags;
!     char filename[MAXPATHLEN];
      struct nvldbentry entry;
  
      rx_SetRxDeadTime(60 * 10);
***************
*** 2842,2855 ****
  	strcpy(filename, "");
      }
  
      if (as->parms[5].items) {
  	code =
  	    UV_DumpClonedVolume(avolid, aserver, apart, fromdate,
! 				DumpFunction, filename);
      } else {
  	code =
  	    UV_DumpVolume(avolid, aserver, apart, fromdate, DumpFunction,
! 			  filename);
      }
      if (code) {
  	PrintDiagnostics("dump", code);
--- 2864,2883 ----
  	strcpy(filename, "");
      }
  
+     flags = as->parms[6].items ? VOLDUMPV2_OMITDIRS : 0;
+ retry_dump:
      if (as->parms[5].items) {
  	code =
  	    UV_DumpClonedVolume(avolid, aserver, apart, fromdate,
! 				DumpFunction, filename, flags);
      } else {
  	code =
  	    UV_DumpVolume(avolid, aserver, apart, fromdate, DumpFunction,
! 			  filename, flags);
!     }
!     if ((code == RXGEN_OPCODE) && (as->parms[6].items)) {
! 	flags &= ~VOLDUMPV2_OMITDIRS;
! 	goto retry_dump;
      }
      if (code) {
  	PrintDiagnostics("dump", code);
***************
*** 2883,2889 ****
      afs_int32 acreation = 0, alastupdate = 0;
      int restoreflags, readonly = 0, offline = 0, voltype = RWVOL;
      char prompt;
!     char afilename[NameLen], avolname[VOLSER_MAXVOLNAME + 1], apartName[10];
      char volname[VOLSER_MAXVOLNAME + 1];
      struct nvldbentry entry;
  
--- 2911,2917 ----
      afs_int32 acreation = 0, alastupdate = 0;
      int restoreflags, readonly = 0, offline = 0, voltype = RWVOL;
      char prompt;
!     char afilename[MAXPATHLEN], avolname[VOLSER_MAXVOLNAME + 1], apartName[10];
      char volname[VOLSER_MAXVOLNAME + 1];
      struct nvldbentry entry;
  
***************
*** 4164,4170 ****
  		fflush(STDOUT);
  		continue;
  	    }
! 	    vcode = ubik_Call(VL_DeleteEntry, cstruct, 0, avolid, RWVOL);
  	    if (vcode) {
  		fprintf(STDERR, "Could not delete entry for volume %s\n",
  			itp->data);
--- 4192,4198 ----
  		fflush(STDOUT);
  		continue;
  	    }
! 	    vcode = ubik_VL_DeleteEntry(cstruct, 0, avolid, RWVOL);
  	    if (vcode) {
  		fprintf(STDERR, "Could not delete entry for volume %s\n",
  			itp->data);
***************
*** 4277,4283 ****
  
  	/* Only matches the RW volume name */
  	avolid = vllist->volumeId[RWVOL];
! 	vcode = ubik_Call(VL_DeleteEntry, cstruct, 0, avolid, RWVOL);
  	if (vcode) {
  	    fprintf(STDOUT, "Could not delete VDLB entry for  %s\n",
  		    vllist->name);
--- 4305,4311 ----
  
  	/* Only matches the RW volume name */
  	avolid = vllist->volumeId[RWVOL];
! 	vcode = ubik_VL_DeleteEntry(cstruct, 0, avolid, RWVOL);
  	if (vcode) {
  	    fprintf(STDOUT, "Could not delete VDLB entry for  %s\n",
  		    vllist->name);
***************
*** 4912,4919 ****
  	vllist = &arrayEntries.nbulkentries_val[j];
  	volid = vllist->volumeId[RWVOL];
  	vcode =
! 	    ubik_Call(VL_ReleaseLock, cstruct, 0, volid, -1,
! 		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (vcode) {
  	    fprintf(STDERR, "Could not unlock entry for volume %s\n",
  		    vllist->name);
--- 4940,4948 ----
  	vllist = &arrayEntries.nbulkentries_val[j];
  	volid = vllist->volumeId[RWVOL];
  	vcode =
! 	    ubik_VL_ReleaseLock(cstruct, 0, volid, -1,
! 				LOCKREL_OPCODE | LOCKREL_AFSID | 
! 				LOCKREL_TIMESTAMP);
  	if (vcode) {
  	    fprintf(STDERR, "Could not unlock entry for volume %s\n",
  		    vllist->name);
***************
*** 5167,5174 ****
  		m_addrs.bulkaddrs_val = 0;
  		m_addrs.bulkaddrs_len = 0;
  		vcode =
! 		    ubik_Call(VL_GetAddrsU, cstruct, 0, &m_attrs, &m_uuid,
! 			      &vlcb, &m_nentries, &m_addrs);
  		if (vcode) {
  		    fprintf(STDERR,
  			    "vos: could not list the multi-homed server addresses\n");
--- 5196,5203 ----
  		m_addrs.bulkaddrs_val = 0;
  		m_addrs.bulkaddrs_len = 0;
  		vcode =
! 		    ubik_VL_GetAddrsU(cstruct, 0, &m_attrs, &m_uuid,
! 				      &vlcb, &m_nentries, &m_addrs);
  		if (vcode) {
  		    fprintf(STDERR,
  			    "vos: could not list the multi-homed server addresses\n");
***************
*** 5338,5344 ****
  		    as->parms[0].items->data);
  	exit(1);
      }
!     vcode = ubik_Call(VL_SetLock, cstruct, 0, avolid, -1, VLOP_DELETE);
      if (vcode) {
  	fprintf(STDERR, "Could not lock VLDB entry for volume %s\n",
  		as->parms[0].items->data);
--- 5367,5373 ----
  		    as->parms[0].items->data);
  	exit(1);
      }
!     vcode = ubik_VL_SetLock(cstruct, 0, avolid, -1, VLOP_DELETE);
      if (vcode) {
  	fprintf(STDERR, "Could not lock VLDB entry for volume %s\n",
  		as->parms[0].items->data);
***************
*** 5466,5472 ****
      }
  
      vcode =
! 	ubik_Call(VL_SetLock, cstruct, 0, entry.volumeId[RWVOL], RWVOL,
  		  VLOP_MOVE);
      aconn = UV_Bind(server, AFSCONF_VOLUMEPORT);
      code = AFSVolConvertROtoRWvolume(aconn, partition, volid);
--- 5495,5501 ----
      }
  
      vcode =
! 	ubik_VL_SetLock(cstruct, 0, entry.volumeId[RWVOL], RWVOL,
  		  VLOP_MOVE);
      aconn = UV_Bind(server, AFSCONF_VOLUMEPORT);
      code = AFSVolConvertROtoRWvolume(aconn, partition, volid);
***************
*** 5797,5802 ****
--- 5826,5833 ----
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition");
      cmd_AddParm(ts, "-clone", CMD_FLAG, CMD_OPTIONAL,
  		"dump a clone of the volume");
+     cmd_AddParm(ts, "-omitdirs", CMD_FLAG, CMD_OPTIONAL,
+ 		"omit unchanged directories from an incremental dump");
      COMMONPARMS;
  
      ts = cmd_CreateSyntax("restore", RestoreVolume, 0, "restore a volume");
Index: openafs/src/volser/vsprocs.c
diff -c openafs/src/volser/vsprocs.c:1.33.2.6 openafs/src/volser/vsprocs.c:1.33.2.11
*** openafs/src/volser/vsprocs.c:1.33.2.6	Tue Jan 24 22:49:53 2006
--- openafs/src/volser/vsprocs.c	Thu Jul 19 14:52:41 2007
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/vsprocs.c,v 1.33.2.6 2006/01/25 03:49:53 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/vsprocs.c,v 1.33.2.11 2007/07/19 18:52:41 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
***************
*** 399,406 ****
  	    initialize_VL_error_table();
  
  	    offset = errcode & ((1 << ERRCODE_RANGE) - 1);
! 	    fprintf(STDERR, "%s: %s\n", error_table_name(errcode),
! 		    error_message(errcode));
  	    break;
  	}
      }
--- 399,406 ----
  	    initialize_VL_error_table();
  
  	    offset = errcode & ((1 << ERRCODE_RANGE) - 1);
! 	    fprintf(STDERR, "%s: %s\n", afs_error_table_name(errcode),
! 		    afs_error_message(errcode));
  	    break;
  	}
      }
***************
*** 644,650 ****
  
      aconn = UV_Bind(aserver, AFSCONF_VOLUMEPORT);
      /* next the next 3 available ids from the VLDB */
!     vcode = ubik_Call(VL_GetNewVolumeId, cstruct, 0, 3, anewid);
      EGOTO1(cfail, vcode, "Could not get an Id for volume %s\n", aname);
  
      code =
--- 644,650 ----
  
      aconn = UV_Bind(aserver, AFSCONF_VOLUMEPORT);
      /* next the next 3 available ids from the VLDB */
!     vcode = ubik_VL_GetNewVolumeId(cstruct, 0, 3, anewid);
      EGOTO1(cfail, vcode, "Could not get an Id for volume %s\n", aname);
  
      code =
***************
*** 788,794 ****
      int notondisk = 0, notinvldb = 0;
  
      /* Find and read bhe VLDB entry for this volume */
!     code = ubik_Call(VL_SetLock, cstruct, 0, avolid, avoltype, VLOP_DELETE);
      if (code) {
  	if (code != VL_NOENT) {
  	    EGOTO1(error_exit, code,
--- 788,794 ----
      int notondisk = 0, notinvldb = 0;
  
      /* Find and read bhe VLDB entry for this volume */
!     code = ubik_VL_SetLock(cstruct, 0, avolid, avoltype, VLOP_DELETE);
      if (code) {
  	if (code != VL_NOENT) {
  	    EGOTO1(error_exit, code,
***************
*** 938,944 ****
  	    fprintf(STDOUT,
  		    "Last reference to the VLDB entry for %lu - deleting entry\n",
  		    (unsigned long)avolid);
! 	code = ubik_Call(VL_DeleteEntry, cstruct, 0, avolid, vtype);
  	EGOTO1(error_exit, code,
  	       "Could not delete the VLDB entry for the volume %u \n",
  	       avolid);
--- 938,944 ----
  	    fprintf(STDOUT,
  		    "Last reference to the VLDB entry for %lu - deleting entry\n",
  		    (unsigned long)avolid);
! 	code = ubik_VL_DeleteEntry(cstruct, 0, avolid, vtype);
  	EGOTO1(error_exit, code,
  	       "Could not delete the VLDB entry for the volume %u \n",
  	       avolid);
***************
*** 987,994 ****
  
      if (islocked) {
  	code =
! 	    ubik_Call(VL_ReleaseLock, cstruct, 0, avolid, -1,
! 		      (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
  	if (code) {
  	    EPRINT1(code,
  		    "Could not release the lock on the VLDB entry for the volume %u \n",
--- 987,995 ----
  
      if (islocked) {
  	code =
! 	    ubik_VL_ReleaseLock(cstruct, 0, avolid, -1,
! 				(LOCKREL_OPCODE | LOCKREL_AFSID | 
! 				 LOCKREL_TIMESTAMP));
  	if (code) {
  	    EPRINT1(code,
  		    "Could not release the lock on the VLDB entry for the volume %u \n",
***************
*** 1109,1115 ****
  	exit(1);
      }
  
!     vcode = ubik_Call(VL_SetLock, cstruct, 0, afromvol, RWVOL, VLOP_MOVE);
      EGOTO1(mfail, vcode, "Could not lock entry for volume %u \n", afromvol);
      islocked = 1;
  
--- 1110,1116 ----
  	exit(1);
      }
  
!     vcode = ubik_VL_SetLock(cstruct, 0, afromvol, RWVOL, VLOP_MOVE);
      EGOTO1(mfail, vcode, "Could not lock entry for volume %u \n", afromvol);
      islocked = 1;
  
***************
*** 1138,1144 ****
  		}
  	    }
  	    vcode =
! 		ubik_Call(VL_ReleaseLock, cstruct, 0, afromvol, -1,
  			  (LOCKREL_OPCODE | LOCKREL_AFSID |
  			   LOCKREL_TIMESTAMP));
  	    EGOTO1(mfail, vcode,
--- 1139,1145 ----
  		}
  	    }
  	    vcode =
! 		ubik_VL_ReleaseLock(cstruct, 0, afromvol, -1,
  			  (LOCKREL_OPCODE | LOCKREL_AFSID |
  			   LOCKREL_TIMESTAMP));
  	    EGOTO1(mfail, vcode,
***************
*** 1266,1272 ****
  	VPRINT1("Allocating new volume id for clone of volume %u ...",
  		afromvol);
  	newVol = 0;
! 	vcode = ubik_Call(VL_GetNewVolumeId, cstruct, 0, 1, &newVol);
  	EGOTO1(mfail, vcode,
  	       "Could not get an ID for the clone of volume %u from the VLDB\n",
  	       afromvol);
--- 1267,1273 ----
  	VPRINT1("Allocating new volume id for clone of volume %u ...",
  		afromvol);
  	newVol = 0;
! 	vcode = ubik_VL_GetNewVolumeId(cstruct, 0, 1, &newVol);
  	EGOTO1(mfail, vcode,
  	       "Could not get an ID for the clone of volume %u from the VLDB\n",
  	       afromvol);
***************
*** 1684,1690 ****
      if (islocked) {
  	VPRINT1("Cleanup: Releasing VLDB lock on volume %u ...", afromvol);
  	vcode =
! 	    ubik_Call(VL_ReleaseLock, cstruct, 0, afromvol, -1,
  		      (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
  	if (vcode) {
  	    VPRINT("\n");
--- 1685,1691 ----
      if (islocked) {
  	VPRINT1("Cleanup: Releasing VLDB lock on volume %u ...", afromvol);
  	vcode =
! 	    ubik_VL_ReleaseLock(cstruct, 0, afromvol, -1,
  		      (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
  	if (vcode) {
  	    VPRINT("\n");
***************
*** 1766,1772 ****
      /* unlock VLDB entry */
      if (islocked) {
  	VPRINT1("Recovery: Releasing VLDB lock on volume %u ...", afromvol);
! 	ubik_Call(VL_ReleaseLock, cstruct, 0, afromvol, -1,
  		  (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
  	VDONE;
      }
--- 1767,1773 ----
      /* unlock VLDB entry */
      if (islocked) {
  	VPRINT1("Recovery: Releasing VLDB lock on volume %u ...", afromvol);
! 	ubik_VL_ReleaseLock(cstruct, 0, afromvol, -1,
  		  (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
  	VDONE;
      }
***************
*** 1976,1982 ****
      /* unlock VLDB entry */
      VPRINT1("Recovery: Releasing lock on VLDB entry for volume %u ...",
  	    afromvol);
!     ubik_Call(VL_ReleaseLock, cstruct, 0, afromvol, -1,
  	      (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
      VDONE;
  
--- 1977,1983 ----
      /* unlock VLDB entry */
      VPRINT1("Recovery: Releasing lock on VLDB entry for volume %u ...",
  	    afromvol);
!     ubik_VL_ReleaseLock(cstruct, 0, afromvol, -1,
  	      (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
      VDONE;
  
***************
*** 2090,2096 ****
  	VPRINT1("Allocating new volume id for clone of volume %u ...",
  		afromvol);
  	cloneVol = 0;
! 	vcode = ubik_Call(VL_GetNewVolumeId, cstruct, 0, 1, &cloneVol);
  	EGOTO1(mfail, vcode,
  	   "Could not get an ID for the clone of volume %u from the VLDB\n",
  	   afromvol);
--- 2091,2097 ----
  	VPRINT1("Allocating new volume id for clone of volume %u ...",
  		afromvol);
  	cloneVol = 0;
! 	vcode = ubik_VL_GetNewVolumeId(cstruct, 0, 1, &cloneVol);
  	EGOTO1(mfail, vcode,
  	   "Could not get an ID for the clone of volume %u from the VLDB\n",
  	   afromvol);
***************
*** 2103,2109 ****
  	/* Get a new volume id */
  	VPRINT1("Allocating new volume id for copy of volume %u ...", afromvol);
  	newVol = 0;
! 	vcode = ubik_Call(VL_GetNewVolumeId, cstruct, 0, 1, &newVol);
  	EGOTO1(mfail, vcode,
  	       "Could not get an ID for the copy of volume %u from the VLDB\n",
  	       afromvol);
--- 2104,2110 ----
  	/* Get a new volume id */
  	VPRINT1("Allocating new volume id for copy of volume %u ...", afromvol);
  	newVol = 0;
! 	vcode = ubik_VL_GetNewVolumeId(cstruct, 0, 1, &newVol);
  	EGOTO1(mfail, vcode,
  	       "Could not get an ID for the copy of volume %u from the VLDB\n",
  	       afromvol);
***************
*** 2480,2486 ****
  	VPRINT1("Recovery: Creating transaction on clone volume %u ...",
  		cloneVol);
  	code =
! 	    AFSVolTransCreate(fromconn, newVol, afrompart, ITOffline,
  			      &clonetid);
  	if (!code) {
  	    VDONE;
--- 2481,2487 ----
  	VPRINT1("Recovery: Creating transaction on clone volume %u ...",
  		cloneVol);
  	code =
! 	    AFSVolTransCreate(fromconn, cloneVol, afrompart, ITOffline,
  			      &clonetid);
  	if (!code) {
  	    VDONE;
***************
*** 2561,2567 ****
  	(entry.flags & VLOP_ALLOPERS) ||	/* vldb lock already held */
  	(entry.volumeId[BACKVOL] == INVALID_BID)) {	/* no assigned backup volume id */
  
! 	code = ubik_Call(VL_SetLock, cstruct, 0, avolid, RWVOL, VLOP_BACKUP);
  	if (code) {
  	    fprintf(STDERR,
  		    "Could not lock the VLDB entry for the volume %lu\n",
--- 2562,2568 ----
  	(entry.flags & VLOP_ALLOPERS) ||	/* vldb lock already held */
  	(entry.volumeId[BACKVOL] == INVALID_BID)) {	/* no assigned backup volume id */
  
! 	code = ubik_VL_SetLock(cstruct, 0, avolid, RWVOL, VLOP_BACKUP);
  	if (code) {
  	    fprintf(STDERR,
  		    "Could not lock the VLDB entry for the volume %lu\n",
***************
*** 2595,2601 ****
  	/* Get a backup volume id from the VLDB and update the vldb
  	 * entry with it. 
  	 */
! 	code = ubik_Call(VL_GetNewVolumeId, cstruct, 0, 1, &backupID);
  	if (code) {
  	    fprintf(STDERR,
  		    "Could not allocate ID for the backup volume of  %lu from the VLDB\n",
--- 2596,2602 ----
  	/* Get a backup volume id from the VLDB and update the vldb
  	 * entry with it. 
  	 */
! 	code = ubik_VL_GetNewVolumeId(cstruct, 0, 1, &backupID);
  	if (code) {
  	    fprintf(STDERR,
  		    "Could not allocate ID for the backup volume of  %lu from the VLDB\n",
***************
*** 2759,2765 ****
  	    }
  	} else {
  	    code =
! 		ubik_Call(VL_ReleaseLock, cstruct, 0, avolid, RWVOL,
  			  (LOCKREL_OPCODE | LOCKREL_AFSID |
  			   LOCKREL_TIMESTAMP));
  	    if (code) {
--- 2760,2766 ----
  	    }
  	} else {
  	    code =
! 		ubik_VL_ReleaseLock(cstruct, 0, avolid, RWVOL,
  			  (LOCKREL_OPCODE | LOCKREL_AFSID |
  			   LOCKREL_TIMESTAMP));
  	    if (code) {
***************
*** 2826,2832 ****
  	/* Get a clone id */
  	VPRINT1("Allocating new volume id for clone of volume %u ...",
  		avolid);
! 	code = ubik_Call(VL_GetNewVolumeId, cstruct, 0, 1, &acloneid);
  	EGOTO1(bfail, code,
  	   "Could not get an ID for the clone of volume %u from the VLDB\n",
  	   avolid);
--- 2827,2833 ----
  	/* Get a clone id */
  	VPRINT1("Allocating new volume id for clone of volume %u ...",
  		avolid);
! 	code = ubik_VL_GetNewVolumeId(cstruct, 0, 1, &acloneid);
  	EGOTO1(bfail, code,
  	   "Could not get an ID for the clone of volume %u from the VLDB\n",
  	   avolid);
***************
*** 3174,3180 ****
      memset((char *)remembertime, 0, sizeof(remembertime));
      memset((char *)&results, 0, sizeof(results));
  
!     vcode = ubik_Call(VL_SetLock, cstruct, 0, afromvol, RWVOL, VLOP_RELEASE);
      if (vcode != VL_RERELEASE)
  	ONERROR(vcode, afromvol,
  		"Could not lock the VLDB entry for the volume %u.\n");
--- 3175,3181 ----
      memset((char *)remembertime, 0, sizeof(remembertime));
      memset((char *)&results, 0, sizeof(results));
  
!     vcode = ubik_VL_SetLock(cstruct, 0, afromvol, RWVOL, VLOP_RELEASE);
      if (vcode != VL_RERELEASE)
  	ONERROR(vcode, afromvol,
  		"Could not lock the VLDB entry for the volume %u.\n");
***************
*** 3216,3222 ****
      /* Make sure we have a RO volume id to work with */
      if (entry.volumeId[ROVOL] == INVALID_BID) {
  	/* need to get a new RO volume id */
! 	vcode = ubik_Call(VL_GetNewVolumeId, cstruct, 0, 1, &roVolId);
  	ONERROR(vcode, entry.name, "Cant allocate ID for RO volume of %s\n");
  
  	entry.volumeId[ROVOL] = roVolId;
--- 3217,3223 ----
      /* Make sure we have a RO volume id to work with */
      if (entry.volumeId[ROVOL] == INVALID_BID) {
  	/* need to get a new RO volume id */
! 	vcode = ubik_VL_GetNewVolumeId(cstruct, 0, 1, &roVolId);
  	ONERROR(vcode, entry.name, "Cant allocate ID for RO volume of %s\n");
  
  	entry.volumeId[ROVOL] = roVolId;
***************
*** 3791,3797 ****
      }
      if (islocked) {
  	vcode =
! 	    ubik_Call(VL_ReleaseLock, cstruct, 0, afromvol, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (vcode) {
  	    fprintf(STDERR,
--- 3792,3798 ----
      }
      if (islocked) {
  	vcode =
! 	    ubik_VL_ReleaseLock(cstruct, 0, afromvol, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (vcode) {
  	    fprintf(STDERR,
***************
*** 3832,3843 ****
   */
  int
  UV_DumpVolume(afs_int32 afromvol, afs_int32 afromserver, afs_int32 afrompart,
! 	      afs_int32 fromdate, afs_int32(*DumpFunction) (), char *rock)
  {
      struct rx_connection *fromconn = (struct rx_connection *)0;
      struct rx_call *fromcall = (struct rx_call *)0;
      afs_int32 fromtid = 0, rxError = 0, rcode = 0;
!     afs_int32 code, error = 0;
  
      if (setjmp(env))
  	ERROR_EXIT(EPIPE);
--- 3833,3845 ----
   */
  int
  UV_DumpVolume(afs_int32 afromvol, afs_int32 afromserver, afs_int32 afrompart,
! 	      afs_int32 fromdate, afs_int32(*DumpFunction) (), char *rock,
! 	      afs_int32 flags)
  {
      struct rx_connection *fromconn = (struct rx_connection *)0;
      struct rx_call *fromcall = (struct rx_call *)0;
      afs_int32 fromtid = 0, rxError = 0, rcode = 0;
!     afs_int32 code, error = 0, retry = 0;
  
      if (setjmp(env))
  	ERROR_EXIT(EPIPE);
***************
*** 3866,3888 ****
      fromcall = rx_NewCall(fromconn);
  
      VPRINT1("Starting volume dump on volume %u...", afromvol);
!     code = StartAFSVolDump(fromcall, fromtid, fromdate);
      EGOTO(error_exit, code, "Could not start the dump process \n");
      VDONE;
  
      VPRINT1("Dumping volume %u...", afromvol);
      code = DumpFunction(fromcall, rock);
      EGOTO(error_exit, code, "Error while dumping volume \n");
      VDONE;
  
    error_exit:
      if (fromcall) {
  	code = rx_EndCall(fromcall, rxError);
! 	if (code) {
  	    fprintf(STDERR, "Error in rx_EndCall\n");
! 	    if (!error)
! 		error = code;
! 	}
      }
      if (fromtid) {
  	VPRINT1("Ending transaction on volume %u...", afromvol);
--- 3868,3895 ----
      fromcall = rx_NewCall(fromconn);
  
      VPRINT1("Starting volume dump on volume %u...", afromvol);
!     if (flags & VOLDUMPV2_OMITDIRS) 
! 	code = StartAFSVolDumpV2(fromcall, fromtid, fromdate, flags);
!     else
!       retryold:
! 	code = StartAFSVolDump(fromcall, fromtid, fromdate);
      EGOTO(error_exit, code, "Could not start the dump process \n");
      VDONE;
  
      VPRINT1("Dumping volume %u...", afromvol);
      code = DumpFunction(fromcall, rock);
+     if (code == RXGEN_OPCODE) 
+ 	goto error_exit;
      EGOTO(error_exit, code, "Error while dumping volume \n");
      VDONE;
  
    error_exit:
      if (fromcall) {
  	code = rx_EndCall(fromcall, rxError);
! 	if (code && code != RXGEN_OPCODE) 
  	    fprintf(STDERR, "Error in rx_EndCall\n");
! 	if (code && !error)
! 	    error = code;
      }
      if (fromtid) {
  	VPRINT1("Ending transaction on volume %u...", afromvol);
***************
*** 3898,3904 ****
      if (fromconn)
  	rx_DestroyConnection(fromconn);
  
!     PrintError("", error);
      return (error);
  }
  
--- 3905,3914 ----
      if (fromconn)
  	rx_DestroyConnection(fromconn);
  
!     if (retry)
! 	goto retryold;
!     if (error != RXGEN_OPCODE)
! 	PrintError("", error);
      return (error);
  }
  
***************
*** 3911,3917 ****
  int
  UV_DumpClonedVolume(afs_int32 afromvol, afs_int32 afromserver,
  		    afs_int32 afrompart, afs_int32 fromdate,
! 		    afs_int32(*DumpFunction) (), char *rock)
  {
      struct rx_connection *fromconn = (struct rx_connection *)0;
      struct rx_call *fromcall = (struct rx_call *)0;
--- 3921,3927 ----
  int
  UV_DumpClonedVolume(afs_int32 afromvol, afs_int32 afromserver,
  		    afs_int32 afrompart, afs_int32 fromdate,
! 		    afs_int32(*DumpFunction) (), char *rock, afs_int32 flags)
  {
      struct rx_connection *fromconn = (struct rx_connection *)0;
      struct rx_call *fromcall = (struct rx_call *)0;
***************
*** 3947,3953 ****
  
      /* Get a clone id */
      VPRINT1("Allocating new volume id for clone of volume %u ...", afromvol);
!     code = ubik_Call(VL_GetNewVolumeId, cstruct, 0, 1, &clonevol);
      EGOTO1(error_exit, code,
  	   "Could not get an ID for the clone of volume %u from the VLDB\n",
  	   afromvol);
--- 3957,3963 ----
  
      /* Get a clone id */
      VPRINT1("Allocating new volume id for clone of volume %u ...", afromvol);
!     code = ubik_VL_GetNewVolumeId(cstruct, 0, 1, &clonevol);
      EGOTO1(error_exit, code,
  	   "Could not get an ID for the clone of volume %u from the VLDB\n",
  	   afromvol);
***************
*** 3993,3999 ****
      fromcall = rx_NewCall(fromconn);
  
      VPRINT1("Starting volume dump from cloned volume %u...", clonevol);
!     code = StartAFSVolDump(fromcall, clonetid, fromdate);
      EGOTO(error_exit, code, "Could not start the dump process \n");
      VDONE;
  
--- 4003,4012 ----
      fromcall = rx_NewCall(fromconn);
  
      VPRINT1("Starting volume dump from cloned volume %u...", clonevol);
!     if (flags & VOLDUMPV2_OMITDIRS) 
! 	code = StartAFSVolDumpV2(fromcall, clonetid, fromdate, flags);
!     else
! 	code = StartAFSVolDump(fromcall, clonetid, fromdate);
      EGOTO(error_exit, code, "Could not start the dump process \n");
      VDONE;
  
***************
*** 4098,4104 ****
      if (pvolid == 0) {		/*alot a new id if needed */
  	vcode = VLDB_GetEntryByName(tovolname, &entry);
  	if (vcode == VL_NOENT) {
! 	    vcode = ubik_Call(VL_GetNewVolumeId, cstruct, 0, 1, &pvolid);
  	    if (vcode) {
  		fprintf(STDERR, "Could not get an Id for the volume %s\n",
  			tovolname);
--- 4111,4117 ----
      if (pvolid == 0) {		/*alot a new id if needed */
  	vcode = VLDB_GetEntryByName(tovolname, &entry);
  	if (vcode == VL_NOENT) {
! 	    vcode = ubik_VL_GetNewVolumeId(cstruct, 0, 1, &pvolid);
  	    if (vcode) {
  		fprintf(STDERR, "Could not get an Id for the volume %s\n",
  			tovolname);
***************
*** 4348,4354 ****
  		fprintf(STDOUT, "------- New entry -------\n");
  	    }
  	    vcode =
! 		ubik_Call(VL_SetLock, cstruct, 0, pvolid, voltype,
  			  VLOP_RESTORE);
  	    if (vcode) {
  		fprintf(STDERR,
--- 4361,4367 ----
  		fprintf(STDOUT, "------- New entry -------\n");
  	    }
  	    vcode =
! 		ubik_VL_SetLock(cstruct, 0, pvolid, voltype,
  			  VLOP_RESTORE);
  	    if (vcode) {
  		fprintf(STDERR,
***************
*** 4379,4387 ****
  		same =
  		    VLDB_IsSameAddrs(toserver, entry.serverNumber[index],
  				     &errcode);
! 		EPRINT2(errcode,
! 			"Failed to get info about server's %d address(es) from vlserver (err=%d)\n",
! 			toserver, errcode);
  		if ((!errcode && !same)
  		    || (entry.serverPartition[index] != topart)) {
  		    tempconn =
--- 4392,4401 ----
  		same =
  		    VLDB_IsSameAddrs(toserver, entry.serverNumber[index],
  				     &errcode);
! 		if (errcode)
! 		    EPRINT2(errcode,
! 			    "Failed to get info about server's %d address(es) from vlserver (err=%d)\n",
! 			    toserver, errcode);
  		if ((!errcode && !same)
  		    || (entry.serverPartition[index] != topart)) {
  		    tempconn =
***************
*** 4467,4473 ****
      }
      if (islocked) {
  	vcode =
! 	    ubik_Call(VL_ReleaseLock, cstruct, 0, pvolid, voltype,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (vcode) {
  	    fprintf(STDERR,
--- 4481,4487 ----
      }
      if (islocked) {
  	vcode =
! 	    ubik_VL_ReleaseLock(cstruct, 0, pvolid, voltype,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (vcode) {
  	    fprintf(STDERR,
***************
*** 4527,4533 ****
  
      VPRINT("Binding to the VLDB server\n");
      vcode =
! 	ubik_Call(VL_ReleaseLock, cstruct, 0, volid, -1,
  		  LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
      if (vcode) {
  	fprintf(STDERR,
--- 4541,4547 ----
  
      VPRINT("Binding to the VLDB server\n");
      vcode =
! 	ubik_VL_ReleaseLock(cstruct, 0, volid, -1,
  		  LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
      if (vcode) {
  	fprintf(STDERR,
***************
*** 4551,4557 ****
      afs_int32 vcode, error = 0;
      char apartName[10];
  
!     error = ubik_Call(VL_SetLock, cstruct, 0, volid, RWVOL, VLOP_ADDSITE);
      if (error) {
  	fprintf(STDERR,
  		" Could not lock the VLDB entry for the volume %lu \n",
--- 4565,4571 ----
      afs_int32 vcode, error = 0;
      char apartName[10];
  
!     error = ubik_VL_SetLock(cstruct, 0, volid, RWVOL, VLOP_ADDSITE);
      if (error) {
  	fprintf(STDERR,
  		" Could not lock the VLDB entry for the volume %lu \n",
***************
*** 4635,4641 ****
    asfail:
      if (islocked) {
  	vcode =
! 	    ubik_Call(VL_ReleaseLock, cstruct, 0, volid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (vcode) {
  	    fprintf(STDERR,
--- 4649,4655 ----
    asfail:
      if (islocked) {
  	vcode =
! 	    ubik_VL_ReleaseLock(cstruct, 0, volid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (vcode) {
  	    fprintf(STDERR,
***************
*** 4657,4663 ****
      struct nvldbentry entry, storeEntry;
      int islocked;
  
!     vcode = ubik_Call(VL_SetLock, cstruct, 0, volid, RWVOL, VLOP_ADDSITE);
      if (vcode) {
  	fprintf(STDERR, " Could not lock the VLDB entry for volume %lu \n",
  		(unsigned long)volid);
--- 4671,4677 ----
      struct nvldbentry entry, storeEntry;
      int islocked;
  
!     vcode = ubik_VL_SetLock(cstruct, 0, volid, RWVOL, VLOP_ADDSITE);
      if (vcode) {
  	fprintf(STDERR, " Could not lock the VLDB entry for volume %lu \n",
  		(unsigned long)volid);
***************
*** 4678,4690 ****
  	/*this site doesnot exist  */
  	fprintf(STDERR, "This site is not a replication site \n");
  	vcode =
! 	    ubik_Call(VL_ReleaseLock, cstruct, 0, volid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (vcode) {
  	    fprintf(STDERR, "Could not update entry for volume %lu \n",
  		    (unsigned long)volid);
  	    PrintError("", vcode);
! 	    ubik_Call(VL_ReleaseLock, cstruct, 0, volid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	    return (vcode);
  	}
--- 4692,4704 ----
  	/*this site doesnot exist  */
  	fprintf(STDERR, "This site is not a replication site \n");
  	vcode =
! 	    ubik_VL_ReleaseLock(cstruct, 0, volid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (vcode) {
  	    fprintf(STDERR, "Could not update entry for volume %lu \n",
  		    (unsigned long)volid);
  	    PrintError("", vcode);
! 	    ubik_VL_ReleaseLock(cstruct, 0, volid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	    return (vcode);
  	}
***************
*** 4697,4703 ****
  	if (entry.nServers < 1) {	/*this is the last ref */
  	    VPRINT1("Deleting the VLDB entry for %u ...", volid);
  	    fflush(STDOUT);
! 	    vcode = ubik_Call(VL_DeleteEntry, cstruct, 0, volid, ROVOL);
  	    if (vcode) {
  		fprintf(STDERR,
  			"Could not delete VLDB entry for volume %lu \n",
--- 4711,4717 ----
  	if (entry.nServers < 1) {	/*this is the last ref */
  	    VPRINT1("Deleting the VLDB entry for %u ...", volid);
  	    fflush(STDOUT);
! 	    vcode = ubik_VL_DeleteEntry(cstruct, 0, volid, ROVOL);
  	    if (vcode) {
  		fprintf(STDERR,
  			"Could not delete VLDB entry for volume %lu \n",
***************
*** 4720,4726 ****
  		    "Could not release lock on volume entry for %lu \n",
  		    (unsigned long)volid);
  	    PrintError("", vcode);
! 	    ubik_Call(VL_ReleaseLock, cstruct, 0, volid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	    return (vcode);
  	}
--- 4734,4740 ----
  		    "Could not release lock on volume entry for %lu \n",
  		    (unsigned long)volid);
  	    PrintError("", vcode);
! 	    ubik_VL_ReleaseLock(cstruct, 0, volid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	    return (vcode);
  	}
***************
*** 4737,4743 ****
      struct nvldbentry entry, storeEntry;
      int index;
  
!     vcode = ubik_Call(VL_SetLock, cstruct, 0, volid, RWVOL, VLOP_ADDSITE);
      if (vcode) {
  	fprintf(STDERR, " Could not lock the VLDB entry for volume %lu \n",
  		(unsigned long)volid);
--- 4751,4757 ----
      struct nvldbentry entry, storeEntry;
      int index;
  
!     vcode = ubik_VL_SetLock(cstruct, 0, volid, RWVOL, VLOP_ADDSITE);
      if (vcode) {
  	fprintf(STDERR, " Could not lock the VLDB entry for volume %lu \n",
  		(unsigned long)volid);
***************
*** 4759,4765 ****
  	fprintf(STDERR, "No existing RW site for volume %lu",
  		(unsigned long)volid);
  	vcode =
! 	    ubik_Call(VL_ReleaseLock, cstruct, 0, volid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (vcode) {
  	    fprintf(STDERR,
--- 4773,4779 ----
  	fprintf(STDERR, "No existing RW site for volume %lu",
  		(unsigned long)volid);
  	vcode =
! 	    ubik_VL_ReleaseLock(cstruct, 0, volid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (vcode) {
  	    fprintf(STDERR,
***************
*** 4781,4787 ****
  	    fprintf(STDERR, "Could not update entry for volume %lu \n",
  		    (unsigned long)volid);
  	    PrintError("", vcode);
! 	    ubik_Call(VL_ReleaseLock, cstruct, 0, volid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	    return (vcode);
  	}
--- 4795,4801 ----
  	    fprintf(STDERR, "Could not update entry for volume %lu \n",
  		    (unsigned long)volid);
  	    PrintError("", vcode);
! 	    ubik_VL_ReleaseLock(cstruct, 0, volid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	    return (vcode);
  	}
***************
*** 4921,4927 ****
  	reuseCloneId = 1;
      else {			/*get a bunch of id's from vldb */
  	code =
! 	    ubik_Call(VL_GetNewVolumeId, cstruct, 0, arraySize, &curCloneId);
  	if (code) {
  	    fprintf(STDERR, "Could not get ID's for the clone from VLDB\n");
  	    PrintError("", code);
--- 4935,4941 ----
  	reuseCloneId = 1;
      else {			/*get a bunch of id's from vldb */
  	code =
! 	    ubik_VL_GetNewVolumeId(cstruct, 0, arraySize, &curCloneId);
  	if (code) {
  	    fprintf(STDERR, "Could not get ID's for the clone from VLDB\n");
  	    PrintError("", code);
***************
*** 5244,5250 ****
       * then make the changes to it (pass 2).
       */
      if (++pass == 2) {
! 	code = ubik_Call(VL_SetLock, cstruct, 0, rwvolid, RWVOL, VLOP_DELETE);
  	if (code) {
  	    fprintf(STDERR, "Could not lock VLDB entry for %lu\n",
  		    (unsigned long)rwvolid);
--- 5258,5264 ----
       * then make the changes to it (pass 2).
       */
      if (++pass == 2) {
! 	code = ubik_VL_SetLock(cstruct, 0, rwvolid, RWVOL, VLOP_DELETE);
  	if (code) {
  	    fprintf(STDERR, "Could not lock VLDB entry for %lu\n",
  		    (unsigned long)rwvolid);
***************
*** 5617,5623 ****
  	    *modentry = modified;
      } else if (pass == 2) {
  	code =
! 	    ubik_Call(VL_ReleaseLock, cstruct, 0, rwvolid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (code) {
  	    PrintError("Could not unlock VLDB entry ", code);
--- 5631,5637 ----
  	    *modentry = modified;
      } else if (pass == 2) {
  	code =
! 	    ubik_VL_ReleaseLock(cstruct, 0, rwvolid, RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (code) {
  	    PrintError("Could not unlock VLDB entry ", code);
***************
*** 5860,5875 ****
      /* Now check if the maxvolid is larger than that stored in the VLDB */
      if (maxvolid) {
  	afs_int32 maxvldbid = 0;
! 	code = ubik_Call(VL_GetNewVolumeId, cstruct, 0, 0, &maxvldbid);
  	if (code) {
  	    fprintf(STDERR,
  		    "Could not get the highest allocated volume id from the VLDB\n");
  	    if (!error)
  		error = code;
  	} else if (maxvolid > maxvldbid) {
! 	    afs_uint32 id, nid;
  	    id = maxvolid - maxvldbid + 1;
! 	    code = ubik_Call(VL_GetNewVolumeId, cstruct, 0, id, &nid);
  	    if (code) {
  		fprintf(STDERR,
  			"Error in increasing highest allocated volume id in VLDB\n");
--- 5874,5889 ----
      /* Now check if the maxvolid is larger than that stored in the VLDB */
      if (maxvolid) {
  	afs_int32 maxvldbid = 0;
! 	code = ubik_VL_GetNewVolumeId(cstruct, 0, 0, &maxvldbid);
  	if (code) {
  	    fprintf(STDERR,
  		    "Could not get the highest allocated volume id from the VLDB\n");
  	    if (!error)
  		error = code;
  	} else if (maxvolid > maxvldbid) {
! 	    afs_int32 id, nid;
  	    id = maxvolid - maxvldbid + 1;
! 	    code = ubik_VL_GetNewVolumeId(cstruct, 0, id, &nid);
  	    if (code) {
  		fprintf(STDERR,
  			"Error in increasing highest allocated volume id in VLDB\n");
***************
*** 6004,6020 ****
    error_exit:
      /* Now check if the maxvolid is larger than that stored in the VLDB */
      if (maxvolid) {
! 	afs_uint32 maxvldbid = 0;
! 	code = ubik_Call(VL_GetNewVolumeId, cstruct, 0, 0, &maxvldbid);
  	if (code) {
  	    fprintf(STDERR,
  		    "Could not get the highest allocated volume id from the VLDB\n");
  	    if (!error)
  		error = code;
  	} else if (maxvolid > maxvldbid) {
! 	    afs_uint32 id, nid;
  	    id = maxvolid - maxvldbid + 1;
! 	    code = ubik_Call(VL_GetNewVolumeId, cstruct, 0, id, &nid);
  	    if (code) {
  		fprintf(STDERR,
  			"Error in increasing highest allocated volume id in VLDB\n");
--- 6018,6034 ----
    error_exit:
      /* Now check if the maxvolid is larger than that stored in the VLDB */
      if (maxvolid) {
! 	afs_int32 maxvldbid = 0;
! 	code = ubik_VL_GetNewVolumeId(cstruct, 0, 0, &maxvldbid);
  	if (code) {
  	    fprintf(STDERR,
  		    "Could not get the highest allocated volume id from the VLDB\n");
  	    if (!error)
  		error = code;
  	} else if (maxvolid > maxvldbid) {
! 	    afs_int32 id, nid;
  	    id = maxvolid - maxvldbid + 1;
! 	    code = ubik_VL_GetNewVolumeId(cstruct, 0, id, &nid);
  	    if (code) {
  		fprintf(STDERR,
  			"Error in increasing highest allocated volume id in VLDB\n");
***************
*** 6257,6263 ****
       */
      if (++pass == 2) {
  	code =
! 	    ubik_Call(VL_SetLock, cstruct, 0, entry->volumeId[RWVOL], RWVOL,
  		      VLOP_DELETE);
  	if (code) {
  	    fprintf(STDERR, "Could not lock VLDB entry for %u \n",
--- 6271,6277 ----
       */
      if (++pass == 2) {
  	code =
! 	    ubik_VL_SetLock(cstruct, 0, entry->volumeId[RWVOL], RWVOL,
  		      VLOP_DELETE);
  	if (code) {
  	    fprintf(STDERR, "Could not lock VLDB entry for %u \n",
***************
*** 6307,6313 ****
  	    && !(entry->flags & RO_EXISTS)) {
  	    /* The RW, BK, nor RO volumes do not exist. Delete the VLDB entry */
  	    code =
! 		ubik_Call(VL_DeleteEntry, cstruct, 0, entry->volumeId[RWVOL],
  			  RWVOL);
  	    if (code) {
  		fprintf(STDERR,
--- 6321,6327 ----
  	    && !(entry->flags & RO_EXISTS)) {
  	    /* The RW, BK, nor RO volumes do not exist. Delete the VLDB entry */
  	    code =
! 		ubik_VL_DeleteEntry(cstruct, 0, entry->volumeId[RWVOL],
  			  RWVOL);
  	    if (code) {
  		fprintf(STDERR,
***************
*** 6349,6355 ****
  
      if (islocked) {
  	code =
! 	    ubik_Call(VL_ReleaseLock, cstruct, 0, entry->volumeId[RWVOL],
  		      RWVOL,
  		      (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
  	if (code) {
--- 6363,6369 ----
  
      if (islocked) {
  	code =
! 	    ubik_VL_ReleaseLock(cstruct, 0, entry->volumeId[RWVOL],
  		      RWVOL,
  		      (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
  	if (code) {
***************
*** 6474,6480 ****
      tid = 0;
      islocked = 0;
  
!     vcode = ubik_Call(VL_SetLock, cstruct, 0, entry->volumeId[RWVOL], RWVOL, VLOP_ADDSITE);	/*last param is dummy */
      if (vcode) {
  	fprintf(STDERR,
  		" Could not lock the VLDB entry for the  volume %u \n",
--- 6488,6494 ----
      tid = 0;
      islocked = 0;
  
!     vcode = ubik_VL_SetLock(cstruct, 0, entry->volumeId[RWVOL], RWVOL, VLOP_ADDSITE);	/*last param is dummy */
      if (vcode) {
  	fprintf(STDERR,
  		" Could not lock the VLDB entry for the  volume %u \n",
***************
*** 6660,6666 ****
    rvfail:
      if (islocked) {
  	vcode =
! 	    ubik_Call(VL_ReleaseLock, cstruct, 0, entry->volumeId[RWVOL],
  		      RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (vcode) {
--- 6674,6680 ----
    rvfail:
      if (islocked) {
  	vcode =
! 	    ubik_VL_ReleaseLock(cstruct, 0, entry->volumeId[RWVOL],
  		      RWVOL,
  		      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
  	if (vcode) {
